diff --git a/.eslintrc.json b/.eslintrc.json index 6eb16b973f22e..2a8eba04bcf60 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -26,6 +26,10 @@ "@typescript-eslint/no-inferrable-types": "error", "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-this-alias": "error", + + "no-unused-expressions": "off", + "@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }], + "@typescript-eslint/prefer-for-of": "error", "@typescript-eslint/prefer-function-type": "error", "@typescript-eslint/prefer-namespace-keyword": "error", @@ -36,6 +40,13 @@ "semi": "off", "@typescript-eslint/semi": "error", + "space-before-function-paren": "off", + "@typescript-eslint/space-before-function-paren": ["error", { + "asyncArrow": "always", + "anonymous": "always", + "named": "never" + }], + "@typescript-eslint/triple-slash-reference": "error", "@typescript-eslint/type-annotation-spacing": "error", "@typescript-eslint/unified-signatures": "error", @@ -97,7 +108,6 @@ "no-trailing-spaces": "error", "no-undef-init": "error", "no-unsafe-finally": "error", - "no-unused-expressions": ["error", { "allowTernary": true }], "no-unused-labels": "error", "no-var": "error", "object-shorthand": "error", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69f2bf06f8b28..927e62c4f3d1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,3 +35,6 @@ jobs: npm install npm update npm test + - name: Validate the browser can import TypeScript + run: gulp test-browser-integration + \ No newline at end of file diff --git a/.github/workflows/new-release-branch.yaml b/.github/workflows/new-release-branch.yaml new file mode 100644 index 0000000000000..1e145a0932f79 --- /dev/null +++ b/.github/workflows/new-release-branch.yaml @@ -0,0 +1,38 @@ +name: New Release Branch + +on: + repository_dispatch: + types: new-release-branch + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Use node version 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + - uses: actions/checkout@v2 + with: + fetch-depth: 5 + - run: | + git checkout -b ${{ github.event.client_payload.branch_name }} + sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json + sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts + sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts + sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts + sed -i -e 's/const version = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts + npm install + gulp LKG + npm test + git diff + git add package.json + git add src/compiler/corePublic.ts + git add tests/baselines/reference/api/typescript.d.ts + git add tests/baselines/reference/api/tsserverlibrary.d.ts + git add ./lib + git config user.email "ts_bot@rcavanaugh.com" + git config user.name "TypeScript Bot" + git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG' + git push --set-upstream origin ${{ github.event.client_payload.branch_name }} diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml new file mode 100644 index 0000000000000..99a8a007ac36d --- /dev/null +++ b/.github/workflows/nightly.yaml @@ -0,0 +1,32 @@ +name: Publish Nightly + +on: + schedule: + - cron: '0 7 * * *' + repository_dispatch: + types: publish-nightly + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use node version 12 + uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - name: Setup and publish nightly + run: | + npm whoami + npm i + gulp configure-nightly + gulp LKG + gulp runtests-parallel + gulp clean + npm publish --tag next + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + CI: true + diff --git a/.github/workflows/release-branch-artifact.yaml b/.github/workflows/release-branch-artifact.yaml new file mode 100644 index 0000000000000..ed50cfeb6464c --- /dev/null +++ b/.github/workflows/release-branch-artifact.yaml @@ -0,0 +1,44 @@ +name: Create Releasable Package Drop + +on: + push: + branches: + - release-* + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use node version 12 + uses: actions/setup-node@v1 + with: + node-version: 12 + - name: Remove existing TypeScript + run: | + npm uninstall typescript --no-save + npm uninstall tslint --no-save + - name: npm install and test + run: | + npm install + npm update + npm test + env: + CI: true + - name: Validate the browser can import TypeScript + run: gulp test-browser-integration + - name: LKG, clean, and pack + run: | + gulp LKG + gulp clean + npm pack ./ + mv typescript-*.tgz typescript.tgz + env: + CI: true + - name: Upload built tarfile + uses: actions/upload-artifact@v1 + with: + name: tgz + path: typescript.tgz + \ No newline at end of file diff --git a/.github/workflows/set-version.yaml b/.github/workflows/set-version.yaml new file mode 100644 index 0000000000000..a31d849cb4131 --- /dev/null +++ b/.github/workflows/set-version.yaml @@ -0,0 +1,44 @@ +name: Set branch version + +on: + repository_dispatch: + types: set-version + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Use node version 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.client_payload.branch_name }} + # notably, this is essentially the same script as `new-release-branch.yaml` (with fewer inputs), but it assumes the branch already exists + # do note that executing the transform below will prevent the `configurePrerelease` script from running on the source, as it makes the + # `version` identifier no longer match the regex it uses + # required client_payload members: + # branch_name - the target branch + # package_version - the full version string (eg, `3.9.1-rc` or `3.9.2`) + # core_major_minor - the major.minor pair associated with the desired package_version (eg, `3.9` for `3.9.3`) + - run: | + sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json + sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts + sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts + sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts + sed -i -e 's/const version = .*;/const version = "${{ github.event.client_payload.package_version }}" as string;/g' src/compiler/corePublic.ts + npm install + gulp LKG + npm test + git diff + git add package.json + git add src/compiler/corePublic.ts + git add tests/baselines/reference/api/typescript.d.ts + git add tests/baselines/reference/api/tsserverlibrary.d.ts + git add ./lib + git config user.email "ts_bot@rcavanaugh.com" + git config user.name "TypeScript Bot" + git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG' + git push diff --git a/.github/workflows/sync-branch.yaml b/.github/workflows/sync-branch.yaml new file mode 100644 index 0000000000000..642a353aa3c69 --- /dev/null +++ b/.github/workflows/sync-branch.yaml @@ -0,0 +1,29 @@ +name: Sync branch with master + +on: + repository_dispatch: + types: sync-branch + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Use node version 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.client_payload.branch_name }} + # This does a test post-merge and only pushes the result if the test succeeds + # required client_payload members: + # branch_name - the target branch + - run: | + git config user.email "ts_bot@rcavanaugh.com" + git config user.name "TypeScript Bot" + git fetch origin master + git merge master --no-ff + npm install + npm test + git push diff --git a/AUTHORS.md b/AUTHORS.md index 2ee14e49b41d4..b58f1a31efd33 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,348 +1,480 @@ TypeScript is authored by: -* Aaron Holmes -* Abubaker Bashir -* Adam Freidin -* Adi Dahiya -* Aditya Daflapurkar -* Adnan Chowdhury -* Adrian Leonhard -* Adrien Gibrat -* Ahmad Farid -* Akshar Patel -* Alan Agius -* Alex Chugaev -* Alex Eagle -* Alex Khomchenko -* Alex Ryan -* Alexander Kuvaev -* Alexander Rusakov -* Alexander Tarasyuk -* Ali Sabzevari -* Aliaksandr Radzivanovich -* Aluan Haddad -* Anatoly Ressin -* Anders Hejlsberg -* Andreas Martin -* Andrej Baran -* Andrew Casey -* Andrew Faulkner -* Andrew Ochsner -* Andrew Stegmaier -* Andrew Z Allen -* András Parditka -* Andy Hanson -* Anil Anar -* Anton Khlynovskiy -* Anton Tolmachev -* Anubha Mathur -* Armando Aguirre -* Arnaud Tournier -* Arnav Singh -* Artem Tyurin -* Arthur Ozga -* Asad Saeeduddin -* Avery Morin -* Basarat Ali Syed -* @begincalendar -* Ben Duffield -* Ben Mosher -* Benjamin Bock -* Benjamin Lichtman -* Benny Neugebauer -* Bill Ticehurst -* Blaine Bublitz -* Blake Embrey -* @bluelovers -* @bootstraponline -* Bowden Kelly -* Bowden Kenny -* Brandon Slade -* Brett Mayen -* Bryan Forbes -* Caitlin Potter -* Cameron Taggart -* @cedvdb -* Charles Pierce -* Charly POLY -* Chris Bubernak -* Christophe Vidal -* Chuck Jazdzewski -* Colby Russell -* Colin Snover -* Cotton Hou -* Cyrus Najmabadi -* Dafrok Zhang -* Dahan Gong -* Dan Corder -* Dan Freeman -* Dan Quirk -* Daniel Gooss -* Daniel Hollocher -* Daniel Król -* Daniel Lehenbauer -* Daniel Rosenwasser -* David Kmenta -* David Li -* David Sheldrick -* David Sherret -* David Souther -* David Staheli -* Denis Nedelyaev -* Derek P Sifford -* Dhruv Rajvanshi -* Dick van den Brink -* Diogo Franco (Kovensky) -* Dirk Bäumer -* Dirk Holtwick -* Dom Chen -* Donald Pipowitch -* Doug Ilijev -* @e-cloud -* Ecole Keine -* Elisée Maurer -* Elizabeth Dinella -* Emilio García-Pumarino -* Eric Grube -* Eric Tsang -* Erik Edrosa -* Erik McClenney -* Esakki Raj -* Ethan Resnick -* Ethan Rubio -* Eugene Timokhov -* Evan Martin -* Evan Sebastian -* Eyas Sharaiha -* Fabian Cook -* @falsandtru -* Filipe Silva -* @flowmemo -* Francois Wouts -* Frank Wallis -* Franklin Tse -* František Žiacik -* Gabe Moothart -* Gabriel Isenberg -* Gilad Peleg -* Godfrey Chan -* Graeme Wicksted -* Guilherme Oenning -* Guillaume Salles -* Guy Bedford -* Halasi Tamás -* Harald Niesche -* Hendrik Liebau -* Henry Mercer -* Herrington Darkholme -* Holger Jeromin -* Homa Wong -* Iain Monro -* @IdeaHunter -* Igor Novozhilov -* Ika -* Ingvar Stepanyan -* Isiah Meadows -* Ivan Enderlin -* Ivo Gabe de Wolff -* Iwata Hidetaka -* Jack Williams -* Jakub Korzeniowski -* Jakub Młokosiewicz -* James Henry -* James Whitney -* Jan Melcher -* Jason Freeman -* Jason Jarrett -* Jason Killian -* Jason Ramsay -* JBerger -* Jed Mao -* Jeffrey Morlan -* Jesse Schalken -* Jing Ma -* Jiri Tobisek -* Joe Calzaretta -* Joe Chung -* Joel Day -* Joey Wilson -* Johannes Rieken -* John Doe -* John Vilk -* Jonathan Bond-Caron -* Jonathan Park -* Jonathan Toland -* Jonathan Turner -* Jonathon Smith -* Jordi Oliveras Rovira -* Joscha Feth -* Josh Abernathy -* Josh Goldberg -* Josh Kalderimis -* Josh Soref -* Juan Luis Boya García -* Julian Williams -* Justin Bay -* Justin Johansson -* K. Preißer -* Kagami Sascha Rosylight -* Kanchalai Tanglertsampan -* Kate Miháliková -* Keith Mashinter -* Ken Howard -* Kenji Imamula -* Kerem Kat -* Kevin Donnelly -* Kevin Gibbons -* Kevin Lang -* Khải -* Kitson Kelly -* Klaus Meinhardt -* Kris Zyp -* Kyle Kelley -* Kārlis Gaņģis -* Lorant Pinter -* Lucien Greathouse -* Lukas Elmer -* Maarten Sijm -* Magnus Hiie -* Magnus Kulke -* Manish Giri -* Marin Marinov -* Marius Schulz -* Markus Johnsson -* Martin Hiller -* Martin Probst -* Martin Vseticka -* Martyn Janes -* Masahiro Wakame -* Mateusz Burzyński -* Matt Bierner -* Matt McCutchen -* Matt Mitchell -* Mattias Buelens -* Mattias Buelens -* Max Deepfield -* Maxwell Paul Brickner -* @meyer -* Micah Zoltu -* @micbou -* Michael -* Michael Bromley -* Mike Busyrev -* Mike Morearty -* Mine Starks -* Mohamed Hegazy -* Mohsen Azimi -* Myles Megyesi -* Nathan Shively-Sanders -* Nathan Yee -* Nicolas Henry -* Nicu Micleușanu -* @nieltg -* Nima Zahedi -* Noah Chen -* Noel Varanda -* Noj Vek -* Oleg Mihailik -* Oleksandr Chekhovskyi -* Omer Sheikh -* Orta Therox -* Oskar Segersva¨rd -* Oussama Ben Brahim -* Patrick Zhong -* Paul Jolly -* Paul Koerbitz -* Paul van Brenk -* @pcbro -* Pedro Maltez -* Perry Jiang -* Peter Burns -* Philip Bulley -* Philippe Voinov -* Pi Lanningham -* Piero Cangianiello -* @piloopin -* Prayag Verma -* Priyantha Lankapura -* @progre -* Punya Biswal -* Rado Kirov -* Raj Dosanjh -* Reiner Dolp -* Remo H. Jansen -* @rhysd -* Ricardo N Feliciano -* Richard Karmazín -* Richard Knoll -* Richard Sentino -* Robert Coie -* Rohit Verma -* Ron Buckton -* Rostislav Galimsky -* Rowan Wyborn -* Ryan Cavanaugh -* Ryohei Ikegami -* Sam Bostock -* Sam El-Husseini -* Sarangan Rajamanickam -* Sean Barag -* Sergey Rubanov -* Sergey Shandar -* Sergii Bezliudnyi -* Sharon Rolel -* Sheetal Nandi -* Shengping Zhong -* Shyyko Serhiy -* Simon Hürlimann -* Slawomir Sadziak -* Solal Pirelli -* Soo Jae Hwang -* Stan Thomas -* Stanislav Iliev -* Stanislav Sysoev -* Stas Vilchik -* Stephan Ginthör -* Steve Lucco -* @styfle -* Sudheesh Singanamalla -* Sébastien Arod -* @T18970237136 -* @t_ -* Taras Mankovski -* Tarik Ozket -* Tetsuharu Ohzeki -* Thomas den Hollander -* Thomas Loubiou -* Tien Hoanhtien -* Tim Lancina -* Tim Perry -* Tim Viiding-Spader -* Tingan Ho -* Todd Thomson -* togru -* Tomas Grubliauskas -* Torben Fitschen -* @TravCav -* TruongSinh Tran-Nguyen -* Tycho Grouwstra -* Vadi Taslim -* Vakhurin Sergey -* Vidar Tonaas Fauske -* Viktor Zozulyak -* Vilic Vane -* Vimal Raghubir -* Vladimir Kurchatkin -* Vladimir Matveev -* Vyacheslav Pukhanov -* Wenlu Wang -* Wesley Wigham -* William Orr -* Wilson Hobbs -* York Yao -* @yortus -* Yuichi Nukiyama -* Yuval Greenfield -* Zeeshan Ahmed -* Zev Spitz -* Zhengbo Li -* @Zzzen \ No newline at end of file + + - 0verk1ll + - Abubaker Bashir + - Adam Freidin + - Adam Postma + - Adi Dahiya + - Aditya Daflapurkar + - Adnan Chowdhury + - Adrian Leonhard + - Adrien Gibrat + - Ahmad Farid + - Ajay Poshak + - Alan Agius + - Alan Pierce + - Alessandro Vergani + - Alex Chugaev + - Alex Eagle + - Alex Khomchenko + - Alex Ryan + - Alexander + - Alexander Kuvaev + - Alexander Rusakov + - Alexander Tarasyuk + - Ali Sabzevari + - Aluan Haddad + - amaksimovich2 + - Anatoly Ressin + - Anders Hejlsberg + - Anders Kaseorg + - Andre Sutherland + - Andreas Martin + - Andrej Baran + - Andrew + - Andrew Branch + - Andrew Casey + - Andrew Faulkner + - Andrew Ochsner + - Andrew Stegmaier + - Andrew Z Allen + - Andrey Roenko + - Andrii Dieiev + - András Parditka + - Andy Hanson + - Anil Anar + - Anix + - Anton Khlynovskiy + - Anton Tolmachev + - Anubha Mathur + - AnyhowStep + - Armando Aguirre + - Arnaud Tournier + - Arnav Singh + - Arpad Borsos + - Artem Tyurin + - Arthur Ozga + - Asad Saeeduddin + - Austin Cummings + - Avery Morin + - Aziz Khambati + - Basarat Ali Syed + - @begincalendar + - Ben Duffield + - Ben Lichtman + - Ben Mosher + - Benedikt Meurer + - Benjamin Bock + - Benjamin Lichtman + - Benny Neugebauer + - BigAru + - Bill Ticehurst + - Blaine Bublitz + - Blake Embrey + - @bluelovers + - @bootstraponline + - Bowden Kelly + - Bowden Kenny + - Brad Zacher + - Brandon Banks + - Brandon Bloom + - Brandon Slade + - Brendan Kenny + - Brett Mayen + - Brian Terlson + - Bryan Forbes + - Caitlin Potter + - Caleb Sander + - Cameron Taggart + - @cedvdb + - Charles + - Charles Pierce + - Charly POLY + - Chris Bubernak + - Chris Patterson + - christian + - Christophe Vidal + - Chuck Jazdzewski + - Clay Miller + - Colby Russell + - Colin Snover + - Collins Abitekaniza + - Connor Clark + - Cotton Hou + - csigs + - Cyrus Najmabadi + - Dafrok Zhang + - Dahan Gong + - Daiki Nishikawa + - Dan Corder + - Dan Freeman + - Dan Quirk + - Dan Rollo + - Daniel Gooss + - Daniel Imms + - Daniel Krom + - Daniel Król + - Daniel Lehenbauer + - Daniel Rosenwasser + - David Li + - David Sheldrick + - David Sherret + - David Souther + - David Staheli + - Denis Nedelyaev + - Derek P Sifford + - Dhruv Rajvanshi + - Dick van den Brink + - Diogo Franco (Kovensky) + - Dirk Bäumer + - Dirk Holtwick + - Dmitrijs Minajevs + - Dom Chen + - Donald Pipowitch + - Doug Ilijev + - dreamran43@gmail.com + - @e-cloud + - Ecole Keine + - Eddie Jaoude + - Edward Thomson + - EECOLOR + - Eli Barzilay + - Elizabeth Dinella + - Ely Alamillo + - Eric Grube + - Eric Tsang + - Erik Edrosa + - Erik McClenney + - Esakki Raj + - Ethan Resnick + - Ethan Rubio + - Eugene Timokhov + - Evan Cahill + - Evan Martin + - Evan Sebastian + - ExE Boss + - Eyas Sharaiha + - Fabian Cook + - @falsandtru + - Filipe Silva + - @flowmemo + - Forbes Lindesay + - Francois Hendriks + - Francois Wouts + - Frank Wallis + - František Žiacik + - Frederico Bittencourt + - fullheightcoding + - Gabe Moothart + - Gabriel Isenberg + - Gabriela Araujo Britto + - Gabriela Britto + - gb714us + - Gilad Peleg + - Godfrey Chan + - Gorka Hernández Estomba + - Graeme Wicksted + - Guillaume Salles + - Guy Bedford + - hafiz + - Halasi Tamás + - Hendrik Liebau + - Henry Mercer + - Herrington Darkholme + - Hoang Pham + - Holger Jeromin + - Homa Wong + - Hye Sung Jung + - Iain Monro + - @IdeaHunter + - Igor Novozhilov + - Igor Oleinikov + - Ika + - iliashkolyar + - IllusionMH + - Ingvar Stepanyan + - Ingvar Stepanyan + - Isiah Meadows + - ispedals + - Ivan Enderlin + - Ivo Gabe de Wolff + - Iwata Hidetaka + - Jack Bates + - Jack Williams + - Jake Boone + - Jakub Korzeniowski + - Jakub Młokosiewicz + - James Henry + - James Keane + - James Whitney + - Jan Melcher + - Jason Freeman + - Jason Jarrett + - Jason Killian + - Jason Ramsay + - JBerger + - Jean Pierre + - Jed Mao + - Jeff Wilcox + - Jeffrey Morlan + - Jesse Schalken + - Jesse Trinity + - Jing Ma + - Jiri Tobisek + - Joe Calzaretta + - Joe Chung + - Joel Day + - Joey Watts + - Johannes Rieken + - John Doe + - John Vilk + - Jonathan Bond-Caron + - Jonathan Park + - Jonathan Toland + - Jordan Harband + - Jordi Oliveras Rovira + - Joscha Feth + - Joseph Wunderlich + - Josh Abernathy + - Josh Goldberg + - Josh Kalderimis + - Josh Soref + - Juan Luis Boya García + - Julian Williams + - Justin Bay + - Justin Johansson + - jwbay + - K. Preißer + - Kagami Sascha Rosylight + - Kanchalai Tanglertsampan + - karthikkp + - Kate Miháliková + - Keen Yee Liau + - Keith Mashinter + - Ken Howard + - Kenji Imamula + - Kerem Kat + - Kevin Donnelly + - Kevin Gibbons + - Kevin Lang + - Khải + - Kitson Kelly + - Klaus Meinhardt + - Kris Zyp + - Kyle Kelley + - Kārlis Gaņģis + - laoxiong + - Leon Aves + - Limon Monte + - Lorant Pinter + - Lucien Greathouse + - Luka Hartwig + - Lukas Elmer + - M.Yoshimura + - Maarten Sijm + - Magnus Hiie + - Magnus Kulke + - Manish Bansal + - Manish Giri + - Marcus Noble + - Marin Marinov + - Marius Schulz + - Markus Johnsson + - Markus Wolf + - Martin + - Martin Hiller + - Martin Johns + - Martin Probst + - Martin Vseticka + - Martyn Janes + - Masahiro Wakame + - Mateusz Burzyński + - Matt Bierner + - Matt McCutchen + - Matt Mitchell + - Matthew Aynalem + - Matthew Miller + - Mattias Buelens + - Max Heiber + - Maxwell Paul Brickner + - @meyer + - Micah Zoltu + - @micbou + - Michael + - Michael Crane + - Michael Henderson + - Michael Tamm + - Michael Tang + - Michal Przybys + - Mike Busyrev + - Mike Morearty + - Milosz Piechocki + - Mine Starks + - Minh Nguyen + - Mohamed Hegazy + - Mohsen Azimi + - Mukesh Prasad + - Myles Megyesi + - Nathan Day + - Nathan Fenner + - Nathan Shively-Sanders + - Nathan Yee + - ncoley + - Nicholas Yang + - Nicu Micleușanu + - @nieltg + - Nima Zahedi + - Noah Chen + - Noel Varanda + - Noel Yoo + - Noj Vek + - nrcoley + - Nuno Arruda + - Oleg Mihailik + - Oleksandr Chekhovskyi + - Omer Sheikh + - Orta Therox + - Orta Therox + - Oskar Grunning + - Oskar Segersva¨rd + - Oussama Ben Brahim + - Ozair Patel + - Patrick McCartney + - Patrick Zhong + - Paul Koerbitz + - Paul van Brenk + - @pcbro + - Pedro Maltez + - Pete Bacon Darwin + - Peter Burns + - Peter Šándor + - Philip Pesca + - Philippe Voinov + - Pi Lanningham + - Piero Cangianiello + - Pierre-Antoine Mills + - @piloopin + - Pranav Senthilnathan + - Prateek Goel + - Prateek Nayak + - Prayag Verma + - Priyantha Lankapura + - @progre + - Punya Biswal + - r7kamura + - Rado Kirov + - Raj Dosanjh + - rChaser53 + - Reiner Dolp + - Remo H. Jansen + - @rflorian + - Rhys van der Waerden + - @rhysd + - Ricardo N Feliciano + - Richard Karmazín + - Richard Knoll + - Roger Spratley + - Ron Buckton + - Rostislav Galimsky + - Rowan Wyborn + - rpgeeganage + - Ruwan Pradeep Geeganage + - Ryan Cavanaugh + - Ryan Clarke + - Ryohei Ikegami + - Salisbury, Tom + - Sam Bostock + - Sam Drugan + - Sam El-Husseini + - Sam Lanning + - Sangmin Lee + - Sanket Mishra + - Sarangan Rajamanickam + - Sasha Joseph + - Sean Barag + - Sergey Rubanov + - Sergey Shandar + - Sergey Tychinin + - Sergii Bezliudnyi + - Sergio Baidon + - Sharon Rolel + - Sheetal Nandi + - Shengping Zhong + - Sheon Han + - Shyyko Serhiy + - Siddharth Singh + - sisisin + - Slawomir Sadziak + - Solal Pirelli + - Soo Jae Hwang + - Stan Thomas + - Stanislav Iliev + - Stanislav Sysoev + - Stas Vilchik + - Stephan Ginthör + - Steve Lucco + - @styfle + - Sudheesh Singanamalla + - Suhas + - Suhas Deshpande + - superkd37 + - Sébastien Arod + - @T18970237136 + - @t_ + - Tan Li Hau + - Tapan Prakash + - Taras Mankovski + - Tarik Ozket + - Tetsuharu Ohzeki + - The Gitter Badger + - Thomas den Hollander + - Thorsten Ball + - Tien Hoanhtien + - Tim Lancina + - Tim Perry + - Tim Schaub + - Tim Suchanek + - Tim Viiding-Spader + - Tingan Ho + - Titian Cernicova-Dragomir + - tkondo + - Todd Thomson + - togru + - Tom J + - Torben Fitschen + - Toxyxer + - @TravCav + - Troy Tae + - TruongSinh Tran-Nguyen + - Tycho Grouwstra + - uhyo + - Vadi Taslim + - Vakhurin Sergey + - Valera Rozuvan + - Vilic Vane + - Vimal Raghubir + - Vladimir Kurchatkin + - Vladimir Matveev + - Vyacheslav Pukhanov + - Wenlu Wang + - Wes Souza + - Wesley Wigham + - William Orr + - Wilson Hobbs + - xiaofa + - xl1 + - Yacine Hmito + - Yang Cao + - York Yao + - @yortus + - Yoshiki Shibukawa + - Yuichi Nukiyama + - Yuval Greenfield + - Yuya Tanaka + - Z + - Zeeshan Ahmed + - Zev Spitz + - Zhengbo Li + - Zixiang Li + - @Zzzen + - 阿卡琳 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 785f4474e3330..d6ecd1d66ae1b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,9 +69,7 @@ Design changes will not be accepted at this time. If you have a design change pr ## Legal -You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright. - -Please submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit https://cla.microsoft.com to sign digitally. Alternatively, download the agreement ([Microsoft Contribution License Agreement.pdf](https://opensource.microsoft.com/pdf/microsoft-contribution-license-agreement.pdf)), sign, scan, and email it back to . Be sure to include your GitHub user name along with the agreement. Once we have received the signed CLA, we'll review the request. +You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright. Upon submitting a pull request, you will automatically be given instructions on how to sign the CLA. ## Housekeeping diff --git a/CopyrightNotice.txt b/CopyrightNotice.txt index 884a031325b65..fee4889c83ff9 100644 --- a/CopyrightNotice.txt +++ b/CopyrightNotice.txt @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/Gulpfile.js b/Gulpfile.js index 5d314da7ccbfd..94212344d380d 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -408,7 +408,18 @@ task("generate-types-map", generateTypesMap); const cleanTypesMap = () => del("built/local/typesMap.json"); cleanTasks.push(cleanTypesMap); -const buildOtherOutputs = parallel(buildCancellationToken, buildTypingsInstaller, buildWatchGuard, generateTypesMap); +// Drop a copy of diagnosticMessages.generated.json into the built/local folder. This allows +// it to be synced to the Azure DevOps repo, so that it can get picked up by the build +// pipeline that generates the localization artifacts that are then fed into the translation process. +const builtLocalDiagnosticMessagesGeneratedJson = "built/local/diagnosticMessages.generated.json"; +const copyBuiltLocalDiagnosticMessages = () => src(diagnosticMessagesGeneratedJson) + .pipe(newer(builtLocalDiagnosticMessagesGeneratedJson)) + .pipe(dest("built/local")); + +const cleanBuiltLocalDiagnosticMessages = () => del(builtLocalDiagnosticMessagesGeneratedJson); +cleanTasks.push(cleanBuiltLocalDiagnosticMessages); + +const buildOtherOutputs = parallel(buildCancellationToken, buildTypingsInstaller, buildWatchGuard, generateTypesMap, copyBuiltLocalDiagnosticMessages); task("other-outputs", series(preBuild, buildOtherOutputs)); task("other-outputs").description = "Builds miscelaneous scripts and documents distributed with the LKG"; @@ -430,7 +441,7 @@ const generateCodeCoverage = () => exec("istanbul", ["cover", "node_modules/moch task("generate-code-coverage", series(preBuild, buildTests, generateCodeCoverage)); task("generate-code-coverage").description = "Generates code coverage data via istanbul"; -const preTest = parallel(buildTests, buildServices, buildLssl); +const preTest = parallel(buildTsc, buildTests, buildServices, buildLssl); preTest.displayName = "preTest"; const postTest = (done) => cmdLineOptions.lint ? lint(done) : done(); @@ -456,7 +467,7 @@ task("runtests").flags = { " --shardId": "1-based ID of this shard (default: 1)", }; -const runTestsParallel = () => runConsoleTests("built/local/run.js", "min", /*runInParallel*/ true, /*watchMode*/ false); +const runTestsParallel = () => runConsoleTests("built/local/run.js", "min", /*runInParallel*/ cmdLineOptions.workers > 1, /*watchMode*/ false); task("runtests-parallel", series(preBuild, preTest, runTestsParallel, postTest)); task("runtests-parallel").description = "Runs all the tests in parallel using the built run.js file."; task("runtests-parallel").flags = { @@ -472,6 +483,11 @@ task("runtests-parallel").flags = { " --shardId": "1-based ID of this shard (default: 1)", }; + +task("test-browser-integration", () => exec(process.execPath, ["scripts/browserIntegrationTest.js"])); +task("test-browser-integration").description = "Runs scripts/browserIntegrationTest.ts which tests that typescript.js loads in a browser"; + + task("diff", () => exec(getDiffTool(), [refBaseline, localBaseline], { ignoreExitCode: true, waitForExit: false })); task("diff").description = "Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable"; diff --git a/lib/cancellationToken.js b/lib/cancellationToken.js index 12a1e5b265b99..76a6a60e72976 100644 --- a/lib/cancellationToken.js +++ b/lib/cancellationToken.js @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/cs/diagnosticMessages.generated.json b/lib/cs/diagnosticMessages.generated.json index fabd59da8cd18..cffe00f60eb7d 100644 --- a/lib/cs/diagnosticMessages.generated.json +++ b/lib/cs/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "Modifikátor {0} nejde použít s deklarací import.", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "Modifikátor {0} nejde použít s deklarací interface.", "A_0_parameter_must_be_the_first_parameter_2680": "Parametr {0} musí být prvním parametrem.", + "A_bigint_literal_cannot_use_exponential_notation_1352": "Literál typu bigint nemůže používat exponenciální notaci.", + "A_bigint_literal_must_be_an_integer_1353": "Literál typu bigint musí být celé číslo.", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "Parametr vzoru vazby nemůže být u podpisu implementace nepovinný.", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "Příkaz break se dá použít jenom uvnitř nadřazené iterace nebo příkazu switch.", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "Příkaz break může skočit jenom na popisek nadřazeného příkazu.", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "Třída může implementovat jenom identifikátor nebo kvalifikovaný název s volitelnými argumenty typu.", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "Třída může implementovat jen typ objektu nebo průsečík typů objektů se staticky známými členy.", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "Deklarace třídy bez modifikátoru default musí mít název.", "A_class_may_only_extend_another_class_2311": "Třída může rozšířit jenom jinou třídu.", - "A_class_may_only_implement_another_class_or_interface_2422": "Třída může implementovat jenom jinou třídu nebo rozhraní.", "A_class_member_cannot_have_the_0_keyword_1248": "Člen třídy nemůže mít klíčové slovo {0}.", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "Výraz s čárkou není v názvu počítané vlastnosti povolený.", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "Název počítané vlastnosti nemůže odkazovat na parametr typu z jeho nadřazeného typu.", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "Název počítané vlastnosti v rozhraní musí odkazovat na výraz, jehož typ je literál nebo unique symbol.", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "Název počítané vlastnosti musí být typu string, number, symbol nebo any.", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "Název počítané vlastnosti ve formátu {0} musí být typu symbol.", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "Kontrolní výrazy const se dají použít jen pro odkazy na členy výčtu, řetězec, číslo, logickou hodnotu, pole nebo literály objektů.", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "Ke členu konstantního výčtu se dá získat přístup jenom pomocí řetězcového literálu.", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "Inicializátor const v ambientním kontextu musí být řetězec (string) nebo číselný literál.", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "Inicializátor const v ambientním kontextu musí být řetězec, číselný literál nebo odkaz na výčet literálů.", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "Konstruktor nemůže obsahovat volání super, pokud jeho třída rozšiřuje null.", "A_constructor_cannot_have_a_this_parameter_2681": "Konstruktor nemůže mít parametr this.", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "Příkaz continue se dá použít jenom uvnitř příkazu nadřazené iterace.", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "Příkaz continue může přejít jenom na popisek příkazu nadřazené iterace.", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "Modifikátor declare se nedá použít v kontextu, který už je ambientní.", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": "Pro deklaraci na nejvyšší úrovni v souboru .d.ts se vyžaduje modifikátor declare.", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "Dekorátor může dekorovat jenom implementaci metody, ne přetížení.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "Klauzule default nemůže být v příkazu switch víc než jednou.", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "V modulu ve stylu ECMAScriptu se dá použít jenom výchozí export.", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "Generátor nemůže mít anotaci typu void.", "A_get_accessor_cannot_have_parameters_1054": "Přístupový objekt get nemůže obsahovat parametry.", "A_get_accessor_must_return_a_value_2378": "Přístupový objekt get musí vracet hodnotu.", + "A_label_is_not_allowed_here_1344": "Popisek se tady nepovoluje.", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Inicializátor členu v deklaraci výčtu nemůže odkazovat na členy deklarované až po výčtu, a to ani členy definované v jiných výčtech.", + "A_method_cannot_be_named_with_a_private_identifier_18022": "Metodu není možné pojmenovat privátním identifikátorem.", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Třída mixin musí mít konstruktor s jediným parametrem rest typu any[].", "A_module_cannot_have_multiple_default_exports_2528": "Modul nemůže mít víc výchozích exportů.", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Deklarace oboru názvů nemůže být v jiném souboru než třída nebo funkce, se kterou se slučuje.", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Deklarace oboru názvů nemůže být umístěná před třídou nebo funkcí, se kterou se slučuje.", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "Deklarace oboru názvů je povolená jenom v oboru názvů nebo v modulu.", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "Import stylu oboru názvů není možné vyvolat nebo konstruovat a způsobí selhání za běhu.", "A_non_dry_build_would_build_project_0_6357": "Build bez příznaku -dry by vytvořil projekt {0}.", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Build bez příznaku -dry by odstranil následující soubory: {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "Build bez příznaku -dry by aktualizoval výstup projektu {0}.", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "Build bez příznaku -dry by aktualizoval časová razítka pro výstup projektu {0}.", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "Inicializátor parametru je povolený jenom v implementaci funkce nebo konstruktoru.", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "Vlastnost parametru se nedá deklarovat pomocí parametru rest.", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "Vlastnost parametru je povolená jenom v implementaci konstruktoru.", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "Příslib musí mít metodu then.", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "Vlastnost třídy, jejíž typ je unique symbol, musí být static a readonly.", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "Vlastnost rozhraní nebo literálu typu, jehož typ je unique symbol, musí být readonly.", + "A_required_element_cannot_follow_an_optional_element_1257": "Povinný element nemůže následovat po nepovinném elementu.", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "Povinný parametr nemůže následovat po nepovinném parametru.", "A_rest_element_cannot_contain_a_binding_pattern_2501": "Element rest nemůže obsahovat vzor vazby.", "A_rest_element_cannot_have_a_property_name_2566": "Element rest nemůže mít název vlastnosti.", "A_rest_element_cannot_have_an_initializer_1186": "Element rest nemůže obsahovat inicializátor.", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "Element rest musí být ve vzoru destrukturalizace poslední.", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "Element rest musí být poslední v typu řazené kolekce členů.", + "A_rest_element_type_must_be_an_array_type_2574": "Typ elementu rest musí být typu pole.", "A_rest_parameter_cannot_be_optional_1047": "Parametr rest nemůže být nepovinný.", "A_rest_parameter_cannot_have_an_initializer_1048": "Parametr rest nemůže obsahovat inicializátor.", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "Parametr rest musí být posledním v seznamu parametrů.", @@ -77,13 +85,13 @@ "A_set_accessor_must_have_exactly_one_parameter_1049": "Přístupový objekt set musí obsahovat přesně jeden parametr.", "A_set_accessor_parameter_cannot_have_an_initializer_1052": "Parametr přístupového objektu set nemůže obsahovat inicializátor.", "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381": "Podpis s implementací nemůže používat typ řetězcového literálu.", - "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "Pokud třída obsahuje inicializované vlastnosti nebo má vlastnosti parametru, musí být volání super první příkaz v konstruktoru.", + "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "Pokud třída obsahuje inicializované vlastnosti, vlastnosti parametru nebo privátní identifikátory, musí být první příkaz v konstruktoru volání super.", "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "Ochrana typu this není kompatibilní s ochranou typu založeného na parametru.", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "Typ this je k dispozici jenom v nestatických členech třídy nebo rozhraní.", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "Soubor tsconfig.json je už v {0} definovaný.", - "A_tuple_type_element_list_cannot_be_empty_1122": "Seznam elementů typu řazené kolekce členů nemůže být prázdný.", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "Výraz potvrzení typu se na levé straně výrazu umocnění nepovoluje. Zvažte možnost uzavření výrazu do závorek.", "A_type_literal_property_cannot_have_an_initializer_1247": "Vlastnost literálu typu nemůže mít inicializátor.", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "Import, při kterém se importují jen typy, může určovat výchozí import nebo pojmenované vazby, ale ne obojí.", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "Predikát typu nemůže odkazovat na parametr rest.", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "Predikát typu nemůže odkazovat na element {0} ve vzoru vazby.", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "Predikát typu je povolený jenom na pozici návratového typu funkcí a metod.", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "Přidat {0} k existující deklaraci importu z {1}", "Add_0_to_unresolved_variable_90008": "Přidat {0}. k nerozpoznané proměnné", "Add_all_missing_async_modifiers_95041": "Přidat všechny chybějící modifikátory async", + "Add_all_missing_imports_95064": "Přidat všechny chybějící importy", "Add_all_missing_members_95022": "Přidat všechny chybějící členy", "Add_all_missing_super_calls_95039": "Přidat všechna chybějící volání pomocí super", "Add_async_modifier_to_containing_function_90029": "Přidat modifikátor async do obsahující funkce", + "Add_await_95083": "Přidat await", + "Add_await_to_initializer_for_0_95084": "Přidat await do inicializátoru pro {0}", + "Add_await_to_initializers_95089": "Přidat await do inicializátorů", "Add_braces_to_arrow_function_95059": "Přidat složené závorky k funkci šipky", + "Add_const_to_all_unresolved_variables_95082": "Přidat const ke všem nerozpoznaným proměnným", + "Add_const_to_unresolved_variable_95081": "Přidat const k nerozpoznané proměnné", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "Přidat výchozí import {0} do existující deklarace z {1}", "Add_definite_assignment_assertion_to_property_0_95020": "Přidat kontrolní výraz jednoznačného přiřazení k vlastnosti {0}", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "Přidat kontrolní výrazy jednoznačného přiřazení do všech neinicializovaných vlastností", + "Add_export_to_make_this_file_into_a_module_95097": "Přidat export {}, aby se tento soubor převedl na modul", "Add_index_signature_for_property_0_90017": "Přidat signaturu indexu pro vlastnost {0}", "Add_initializer_to_property_0_95019": "Přidat inicializační výraz k vlastnosti {0}", "Add_initializers_to_all_uninitialized_properties_95027": "Přidat inicializátory do všech neinicializovaných vlastností", + "Add_missing_enum_member_0_95063": "Přidat chybějící člen výčtu {0}", + "Add_missing_new_operator_to_all_calls_95072": "Přidat chybějící operátor new ke všem voláním", + "Add_missing_new_operator_to_call_95071": "Přidat chybějící operátor new k volání", "Add_missing_super_call_90001": "Přidat chybějící volání metody super()", "Add_missing_typeof_95052": "Přidat chybějící typeof", + "Add_names_to_all_parameters_without_names_95073": "Přidat názvy do všech parametrů bez názvů", "Add_or_remove_braces_in_an_arrow_function_95058": "Přidat nebo odebrat složené závorky ve funkci šipky", + "Add_parameter_name_90034": "Přidat název parametru", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "Přidat kvalifikátor do všech nerozpoznaných proměnných odpovídajících názvu členu", "Add_to_all_uncalled_decorators_95044": "Přidat () do všech nevolaných dekorátorů", "Add_ts_ignore_to_all_error_messages_95042": "Přidat @ts-ignore do všech chybových zpráv", "Add_undefined_type_to_all_uninitialized_properties_95029": "Přidat nedefinovaný typ do všech neinicializovaných vlastností", "Add_undefined_type_to_property_0_95018": "Přidat typ undefined k vlastnosti {0}", + "Add_unknown_conversion_for_non_overlapping_types_95069": "Přidat převod unknown pro typy, které se nepřekrývají", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "Přidat unknown do všech převodů pro typy, které se nepřekrývají", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "Přidání souboru tsconfig.json vám pomůže uspořádat projekty, které obsahují jak soubory TypeScript, tak soubory JavaScript. Další informace najdete na adrese https://aka.ms/tsconfig.", "Additional_Checks_6176": "Další kontroly", "Advanced_Options_6178": "Upřesnit možnosti", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "Všechny deklarace {0} musí mít stejné parametry typu.", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "Všechny deklarace abstraktní metody musí jít po sobě.", "All_destructured_elements_are_unused_6198": "Žádný z destrukturovaných elementů se nepoužívá.", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "Když se zadá příznak --isolatedModules, všechny soubory musí být moduly.", "All_imports_in_import_declaration_are_unused_6192": "Žádné importy z deklarace importu se nepoužívají.", + "All_type_parameters_are_unused_6205": "Všechny parametry typů jsou nevyužité.", "All_variables_are_unused_6199": "Žádná z proměnných se nepoužívá.", + "Allow_accessing_UMD_globals_from_modules_95076": "Povolit přístup ke globálním proměnným UMD z modulů", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "Povolte výchozí importy z modulů bez výchozího exportu. Nebude to mít vliv na generování kódu, jenom na kontrolu typů.", "Allow_javascript_files_to_be_compiled_6102": "Povolí kompilaci souborů javascript.", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "Když se zadá příznak --isolatedModules, nepovolují se ambientní výčty.", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "Název souboru {0}, který se už zahrnul, se od názvu souboru {1} liší jen ve velkých a malých písmenech.", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "Deklarace ambientního modulu nemůže uvádět relativní název modulu.", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "Ambientní moduly se nedají zanořovat do jiných modulů nebo oborů názvů.", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "Modul AMD nemůže obsahovat víc přiřazení názvů.", "An_abstract_accessor_cannot_have_an_implementation_1318": "Abstraktní přístupový objekt nemůže mít implementaci.", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "Přístupový objekt nemůže být deklarovaný v ambientním kontextu.", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "Modifikátor přístupnosti se nedá použít spolu s privátním identifikátorem.", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "Přístupový objekt není možné pojmenovat privátním identifikátorem.", "An_accessor_cannot_have_type_parameters_1094": "Přístupový objekt nemůže obsahovat parametry typu.", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "Deklarace ambientního modulu je povolená jenom na nejvyšší úrovni v souboru.", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "Aritmetický operand musí být typu any, number nebo typu výčtu.", + "An_argument_for_0_was_not_provided_6210": "Neposkytl se argument pro {0}.", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "Neposkytl se argument, který by odpovídal tomuto vzoru vazby.", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "Aritmetický operand musí být typu any, number, bigint nebo typu výčtu.", + "An_arrow_function_cannot_have_a_this_parameter_2730": "Funkce šipky nemůže mít parametr this.", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "Asynchronní funkce nebo metoda v ES5/ES3 vyžaduje konstruktor Promise. Ujistěte se, že máte deklaraci konstruktoru Promise, nebo do možnosti --lib přidejte ES2015.", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "Funkce nebo metoda async musí mít platný návratový typ pro await.", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "Asynchronní funkce nebo metoda musí vracet hodnotu příslibu. Přesvědčte se, že pro ni máte deklaraci, nebo zahrňte ES2015 do možnosti --lib.", "An_async_iterator_must_have_a_next_method_2519": "Asynchronní iterátor musí mít metodu next().", "An_element_access_expression_should_take_an_argument_1011": "Výraz přístupu k elementu by měl přijímat argument.", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "Člen výčtu není možné pojmenovat privátním identifikátorem.", "An_enum_member_cannot_have_a_numeric_name_2452": "Člen výčtu nemůže mít číselný název.", + "An_enum_member_name_must_be_followed_by_a_or_1357": "Za názvem členu výčtu musí následovat znak čárky (,), rovnítka (=) nebo pravé složené závorky (}).", "An_export_assignment_can_only_be_used_in_a_module_1231": "Přiřazení exportu jde použít jenom v modulu.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Přiřazení exportu se nedá použít v modulu s jinými exportovanými elementy.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Přiřazení exportu se nedá používat v oboru názvů.", "An_export_assignment_cannot_have_modifiers_1120": "Přiřazení exportu nemůže mít modifikátory.", "An_export_declaration_can_only_be_used_in_a_module_1233": "Deklarace exportu jde použít jenom v modulu.", "An_export_declaration_cannot_have_modifiers_1193": "Deklarace exportu nemůže mít modifikátory.", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "Není možné testovat pravdivost výrazu typu void.", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "Rozšířená řídicí hodnota Unicode musí být mezi 0x0 a 0x10FFFF (včetně).", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "Identifikátor nebo klíčové slovo nemůže následovat hned po číselném literálu.", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "Implementace se nedá deklarovat v ambientních kontextech.", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "Alias importu se nemůže odkazovat na deklaraci, která se exportovala pomocí export type.", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "Alias importu se nemůže odkazovat na deklaraci, která se importovala pomocí import type.", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "Deklarace importu jde použít jenom v oboru názvů nebo modulu.", "An_import_declaration_cannot_have_modifiers_1191": "Deklarace importu nemůže mít modifikátory.", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "Cesta pro import nemůže končit příponou {0}. Zvažte možnost importovat místo toho {1}.", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "V parametru signatury indexu nemůže být anotace typu.", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "Typ parametru signatury indexu nemůže být alias typu. Místo toho zvažte toto zadání: [{0}: {1}]: {2}.", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "Typ parametru signatury indexu nemůže být typ sjednocení. Místo toho zvažte použití namapovaného typu objektu.", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "Parametr signatury indexu musí být typu string nebo number.", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "Parametr signatury indexu musí být buď typu string, nebo number.", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "Rozhraní může rozšířit jenom identifikátor nebo kvalifikovaný název s volitelnými argumenty typu.", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "Rozhraní může rozšiřovat jenom třídu nebo jiné rozhraní.", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "Rozhraní může rozšiřovat jen typ objektu nebo průsečík typů objektů se staticky známými členy.", "An_interface_property_cannot_have_an_initializer_1246": "Vlastnost rozhraní nemůže mít inicializátor.", "An_iterator_must_have_a_next_method_2489": "Iterátor musí mít metodu next().", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "Literál objektu nemůže obsahovat několik přístupových objektů get/set se stejným názvem.", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "Literál objektu nemůže mít víc vlastností se stejným názvem ve striktním režimu.", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "Literál objektu nemůže obsahovat vlastnost a přístupový objekt se stejným názvem.", "An_object_member_cannot_be_declared_optional_1162": "Člen objektu nemůže být deklarovaný jako nepovinný.", + "An_optional_chain_cannot_contain_private_identifiers_18030": "Nepovinný řetěz nemůže obsahovat privátní identifikátory.", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "Tento kontejner zakrývá vnější hodnotu this.", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "Signatura přetížení nemůže být deklarovaný jako generátor.", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "Unární výraz s operátorem {0} se na levé straně výrazu umocnění nepovoluje. Zvažte možnost uzavření výrazu do závorek.", "Annotate_everything_with_types_from_JSDoc_95043": "Vše s typy z JSDoc opatřit poznámkami", "Annotate_with_type_from_JSDoc_95009": "Přidat poznámku s typem z JSDoc", "Annotate_with_types_from_JSDoc_95010": "Přidat poznámky s typy z JSDoc", + "Another_export_default_is_here_2753": "Další výchozí hodnota exportu je tady.", + "Are_you_missing_a_semicolon_2734": "Nechybí středník?", "Argument_expression_expected_1135": "Očekává se výraz argumentu.", "Argument_for_0_option_must_be_Colon_1_6046": "Argument možnosti {0} musí být {1}.", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "Argument typu {0} nejde přiřadit k parametru typu {1}.", "Array_element_destructuring_pattern_expected_1181": "Očekával se destrukturační vzor elementu pole.", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "Kontrolní výrazy vyžadují, aby se všechny názvy v cíli volání deklarovaly s explicitní anotací typu.", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "Kontrolní výrazy vyžadují, aby cíl volání byl identifikátor, nebo kvalifikovaný název.", "Asterisk_Slash_expected_1010": "Očekával se znak */.", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "Rozšíření pro globální rozsah může být jenom přímo vnořené v externích modulech nebo deklaracích ambientního modulu.", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "Rozšíření pro globální rozsah by měla mít modifikátor declare, pokud se neobjeví v kontextu, který je už ambientní.", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "Automatické zjišťování pro psaní je povolené v projektu {0}. Spouští se speciální průchod řešení pro modul {1} prostřednictvím umístění mezipaměti {2}.", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "Výrazy základní třídy nemůžou odkazovat na parametry typu třídy.", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "Návratový typ {0} základního konstruktoru není typu třída ani rozhraní.", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "Návratový typ základního konstruktoru {0} není typ objektu ani průsečík typů objektů se staticky známými členy.", "Base_constructors_must_all_have_the_same_return_type_2510": "Všechny základní konstruktory musí mít stejný návratový typ.", "Base_directory_to_resolve_non_absolute_module_names_6083": "Základní adresář pro překlad neabsolutních názvů modulů.", "Basic_Options_6172": "Základní možnosti", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "Když je cíl nastavený níže než ES2020, literály typu BigInt nejsou k dispozici.", "Binary_digit_expected_1177": "Očekává se binární číslice.", "Binding_element_0_implicitly_has_an_1_type_7031": "Element vazby {0} má implicitně typ {1}.", "Block_scoped_variable_0_used_before_its_declaration_2448": "Proměnná bloku {0} se používá před vlastní deklarací.", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "Sestavit všechny projekty včetně těch, které se zdají aktuální", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "Sestavit jeden nebo více projektů a jejich závislosti, pokud jsou zastaralé", + "Build_option_0_requires_a_value_of_type_1_5073": "Možnost buildu {0} vyžaduje hodnotu typu {1}.", "Building_project_0_6358": "Sestavuje se projekt {0}...", "Call_decorator_expression_90028": "Zavolat výraz dekorátoru", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "Návratové typy signatury volání {0} a {1} nejsou kompatibilní.", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "Signatura volání s chybějící anotací návratového typu má implicitně návratový typ any.", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "Signatury volání bez argumentů mají nekompatibilní návratové typy {0} a {1}.", "Call_target_does_not_contain_any_signatures_2346": "Cíl volání neobsahuje žádné signatury.", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "K {0}.{1} nelze získat přístup, protože {0} je typ, nikoli názvový prostor. Chtěli jste načíst typ vlastnosti {1} v {0} pomocí {0}[{1}]?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "Když se zadá příznak --isolatedModules, nedá se získat přístup k ambientnímu konstantnímu výčtu.", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "Typ konstruktoru {0} se nedá přiřadit k typu konstruktoru {1}.", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "Abstraktní typ konstruktoru nejde přiřadit neabstraktnímu typu konstruktoru.", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "Nejde přiřadit k vlastnosti {0}, protože je konstantní nebo jen pro čtení.", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "Nejde přiřadit k vlastnosti {0}, protože je konstantní.", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "Nejde přiřadit k vlastnosti {0}, protože je jen pro čtení.", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "Nejde přiřadit k položce {0}, to není proměnná.", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "Modul {0} se nedá rozšířit, protože se překládá do entity, která není modul.", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "Modul {0} se nedá rozšířit, protože se překládá na entitu, která není modul.", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "Moduly nejde kompilovat pomocí možnosti {0}, pokud příznak --module nemá hodnotu amd nebo system.", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "Když se zadá příznak --isolatedModules, nejde kompilovat obory názvů.", "Cannot_create_an_instance_of_an_abstract_class_2511": "Nejde vytvořit instance abstraktní třídy.", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "Iterace se nedá delegovat na hodnotu, protože metoda next jejího iterátoru očekává typ {1}, ale obsahující generátor vždy pošle {0}.", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "{0} se nedá exportovat. Z modulu je možné exportovat jenom místní deklarace.", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "Třída {0} se nedá rozšířit. Konstruktor třídy je označený jako privátní.", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "Nejde rozšířit rozhraní {0}. Měli jste na mysli 'implements'?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "Soubor tsconfig.json nejde najít v aktuálním adresáři: {0}", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "Soubor tsconfig.json nejde najít v zadaném adresáři: {0}", "Cannot_find_global_type_0_2318": "Globální typ {0} se nenašel.", "Cannot_find_global_value_0_2468": "Globální hodnota {0} se nenašla.", "Cannot_find_lib_definition_for_0_2726": "Nepovedlo se najít definici knihovny pro {0}.", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "Nepovedlo se najít definici knihovny pro {0}. Neměli jste na mysli spíš {1}?", "Cannot_find_module_0_2307": "Nenašel se modul {0}.", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "Nepovedlo se najít modul {0}. Zvažte možnost importovat modul s příponou .json pomocí --resolveJsonModule.", "Cannot_find_name_0_2304": "Název {0} se nenašel.", "Cannot_find_name_0_Did_you_mean_1_2552": "Nepovedlo se najít název {0}. Měli jste na mysli {1}?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "Název {0} se nedá najít. Měli jste na mysli člena instance this.{0}?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "Název {0} se nedá najít. Měli jste na mysli statický člen {1}.{0}?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "Nepovedlo se najít název {0}. Potřebujete změnit cílovou knihovnu? Zkuste změnit možnost kompilátoru lib na es2015 nebo novější.", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "Nepovedlo se najít název {0}. Potřebujete změnit cílovou knihovnu? Zkuste změnit možnost kompilátoru lib tak, aby obsahovala dom.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "Nepovedlo se najít název {0}. Potřebujete nainstalovat definice typů pro spouštěč testů? Zkuste npm i @types/jest nebo npm i @types/mocha.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "Nepovedlo se najít název {0}. Potřebujete nainstalovat definice typů pro spouštěč testů? Zkuste npm i @types/jest nebo npm i @types/mocha a pak do polí typů v tsconfig přidejte jest nebo mocha.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "Nepovedlo se najít název {0}. Potřebujete nainstalovat definice typů pro jQuery? Zkuste npm i @types/jquery.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "Nepovedlo se najít název {0}. Potřebujete nainstalovat definice typů pro jQuery? Zkuste npm i @types/jquery a pak pro pole typů v tsconfig přidejte jquery.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "Nepovedlo se najít název {0}. Potřebujete nainstalovat definice typů pro Node? Zkuste npm i @types/node.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "Nepovedlo se najít název {0}. Potřebujete nainstalovat definice typů pro Node? Zkuste npm i @types/node a pak do pole typů v tsconfig přidejte node.", "Cannot_find_namespace_0_2503": "Nenašel se obor názvů {0}.", "Cannot_find_parameter_0_1225": "Nenašel se parametr {0}.", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "Nenašla se společná cesta podadresářů pro vstupní soubory.", "Cannot_find_type_definition_file_for_0_2688": "Nejde najít soubor definice pro {0}.", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "Soubory deklarací typů nejde importovat. Zvažte možnost místo {1} naimportovat {0}.", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "Proměnnou {0} s vnějším oborem nejde inicializovat ve stejném oboru jako deklaraci {1} s oborem bloku.", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "Nejde vyvolat výraz, v jehož typu chybí signatura volání. Typ {0} nemá žádné kompatibilní signatury volání.", "Cannot_invoke_an_object_which_is_possibly_null_2721": "Nejde vyvolat objekt, který může být null.", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "Nejde vyvolat objekt, který může být null nebo nedefinovaný.", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "Nejde vyvolat objekt, který může být nedefinovaný.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "Hodnota se nedá iterovat, protože metoda next jejího iterátoru očekává typ {1}, ale při destrukci pole se vždy pošle {0}.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "Hodnota se nedá iterovat, protože metoda next jejího iterátoru očekává typ {1}, ale rozsah pole bude vždy posílat {0}.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "Hodnota se nedá iterovat, protože metoda next jejího iterátoru očekává typ {1}, ale for-of bude vždy posílat {0}.", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "Projekt {0} se nedá předřadit, protože nemá nastavenou hodnotu outFile.", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "Typ nejde znovu exportovat, pokud je zadaný příznak --isolatedModules.", "Cannot_read_file_0_Colon_1_5012": "Nejde číst soubor {0}: {1}", "Cannot_redeclare_block_scoped_variable_0_2451": "Nejde předeklarovat proměnnou bloku {0}.", "Cannot_redeclare_exported_variable_0_2323": "Exportovanou proměnnou {0} není možné znovu deklarovat.", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "Nejde předeklarovat identifikátor {0} v klauzuli catch.", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "Výstup projektu {0} se nedá aktualizovat, protože při čtení souboru {1} došlo k chybě.", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "Pokud se nezadá příznak -jsx, nepůjde JSX použít.", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "Nejde používat importy, exporty nebo rozšíření modulu, pokud má příznak --module hodnotu none.", "Cannot_use_namespace_0_as_a_type_2709": "Obor názvů {0} nejde použít jako typ.", "Cannot_use_namespace_0_as_a_value_2708": "Obor názvů {0} nejde použít jako hodnotu.", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "Nejde použít new s výrazem, kterému v typu chybí volání nebo signatura konstruktu.", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "Soubor {0} se nedá zapsat, protože přepíše soubor .tsbuildinfo vygenerovaný odkazovaným projektem {1}.", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "Do souboru {0} se nedá zapisovat, protože by se přepsal více vstupními soubory.", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "Do souboru {0} se nedá zapisovat, protože by přepsal vstupní soubor.", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "Proměnná klauzule catch nemůže mít anotaci typu.", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "Kontroluje se, jestli je {0} nejdelší odpovídající předpona pro {1}–{2}.", "Circular_definition_of_import_alias_0_2303": "Cyklická definice aliasu importu {0}", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "Při překladu konfigurace se zjistila cykličnost: {0}.", + "Circularity_originates_in_type_at_this_location_2751": "Zdrojem cykličnosti je typ na tomto umístění.", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "Třída {0} definuje členský přístupový objekt instance {1}, ale rozšířená třída {2} ho definuje jako členskou funkci instance.", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "Třída {0} definuje členskou funkci instance {1}, ale rozšířená třída {2} ji definuje jako členský přístupový objekt instance.", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "Třída {0} definuje členskou funkci instance {1}, ale rozšířená třída {2} ji definuje jako vlastnost člena instance.", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "Třída {0} definuje vlastnost člena instance {1}, ale rozšířená třída {2} ji definuje jako členskou funkci instance.", "Class_0_incorrectly_extends_base_class_1_2415": "Třída {0} nesprávně rozšiřuje základní třídu {1}.", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "Třída {0} nesprávně implementuje třídu {1}. Nechtěli jste rozšířit třídu {1} a dědit její členy jako podtřídu?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "Statická strana třídy {0} nesprávně rozšiřuje statickou stranu základní třídy {1}.", "Classes_can_only_extend_a_single_class_1174": "Třídy můžou rozšířit jenom jednu třídu.", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "Třídy obsahující abstraktní metody musí být označené jako abstraktní.", + "Classes_may_not_have_a_field_named_constructor_18006": "Třídy nemůžou mít pole s názvem constructor.", "Command_line_Options_6171": "Možnosti příkazového řádku", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "Zkompilujte projekt podle cesty k jeho konfiguračnímu souboru nebo do složky se souborem tsconfig.json.", "Compiler_option_0_expects_an_argument_6044": "Parametr kompilátoru {0} očekává argument.", "Compiler_option_0_requires_a_value_of_type_1_5024": "Parametr kompilátoru {0} vyžaduje hodnotu typu {1}.", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "Kompilátor si rezervuje název {0} při generování nižší úrovně privátního identifikátoru.", "Composite_projects_may_not_disable_declaration_emit_6304": "Složené projekty nemůžou zakázat generování deklarací.", + "Composite_projects_may_not_disable_incremental_compilation_6379": "Složené projekty nemůžou zakázat přírůstkovou kompilaci.", "Computed_property_names_are_not_allowed_in_enums_1164": "Názvy počítaných vlastností se ve výčtech nepovolují.", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "Ve výčtu, jehož členy mají hodnoty typu string, se nepovolují vypočítané hodnoty.", "Concatenate_and_emit_output_to_single_file_6001": "Zřetězit a generovat výstup do jednoho souboru", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "Našly se konfliktní definice pro: {0} v {1} a {2}. Zvažte možnost nainstalovat specifickou verzi této knihovny, aby se konflikt vyřešil.", + "Conflicts_are_in_this_file_6201": "V tomto souboru se nacházejí konflikty.", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "Návratové typy signatury konstruktu {0} a {1} nejsou kompatibilní.", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "Podpis konstruktoru s chybějící anotací návratového typu má implicitně návratový typ any.", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "Signatury konstruktů bez argumentů mají nekompatibilní návratové typy {0} a {1}.", "Constructor_implementation_is_missing_2390": "Chybí implementace konstruktoru.", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "Konstruktor třídy {0} je privátní a dostupný jenom v rámci deklarace třídy.", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "Konstruktor třídy {0} je chráněný a dostupný jenom v rámci deklarace třídy.", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "Konstruktory odvozených tříd musí obsahovat volání příkazu super.", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "Není zadaný obsažený soubor a nedá se určit kořenový adresář – přeskakuje se vyhledávání ve složce node_modules.", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "Převod typu {0} na typ {1} může být chyba, protože ani jeden z těchto typů se s tím druhým dostatečně nepřekrývá. Pokud je to záměr, převeďte nejdříve výraz na unknown.", "Convert_0_to_mapped_object_type_95055": "Převést {0} na typ mapovaného objektu", "Convert_all_constructor_functions_to_classes_95045": "Převést všechny funkce konstruktoru na třídy", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "Převést všechny importy, které se nepoužívají jako hodnota, na importy, při kterých se importují jen typy.", + "Convert_all_re_exported_types_to_type_only_exports_1365": "Převést všechny opětovně exportované typy na exporty, při kterých se exportují jen typy", "Convert_all_require_to_import_95048": "Převést všechna volání require na import", + "Convert_all_to_async_functions_95066": "Převést vše na asynchronní funkce", + "Convert_all_to_bigint_numeric_literals_95092": "Převést vše na číselné literály bigint", "Convert_all_to_default_imports_95035": "Převést vše na výchozí importy", + "Convert_const_to_let_95093": "Převést const na let", + "Convert_default_export_to_named_export_95061": "Převést výchozí export na pojmenovaný export", "Convert_function_0_to_class_95002": "Převést funkci {0} na třídu", "Convert_function_to_an_ES2015_class_95001": "Převést funkci na třídu ES2015", + "Convert_invalid_character_to_its_html_entity_code_95100": "Převést neplatný znak na jeho kód entity HTML", + "Convert_named_export_to_default_export_95062": "Převést pojmenovaný export na výchozí export", "Convert_named_imports_to_namespace_import_95057": "Převést pojmenované importy na import oboru názvů", "Convert_namespace_import_to_named_imports_95056": "Převést import oboru názvů na pojmenované importy", + "Convert_parameters_to_destructured_object_95075": "Převést parametry na destrukturovaný objekt", "Convert_require_to_import_95047": "Převést require na import", "Convert_to_ES6_module_95017": "Převést na modul ES6", + "Convert_to_a_bigint_numeric_literal_95091": "Převést na číselný literál bigint", + "Convert_to_async_function_95065": "Převést na asynchronní funkci", "Convert_to_default_import_95013": "Převést na výchozí import", + "Convert_to_template_string_95096": "Převést na řetězec šablony", + "Convert_to_type_only_export_1364": "Převést na export, při kterém se exportují jen typy", + "Convert_to_type_only_import_1373": "Převést na import, při kterém se importují jen typy", "Corrupted_locale_file_0_6051": "Soubor národního prostředí {0} je poškozený.", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "Nenašel se soubor deklarací pro modul {0}. {1} má implicitně typ any.", "Could_not_write_file_0_Colon_1_5033": "Nedá se zapisovat do souboru {0}: {1}", "DIRECTORY_6038": "ADRESÁŘ", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "Generování deklarací pro tento soubor vyžaduje, aby se použil privátní název {0}. Explicitní anotace typu může generování deklarací odblokovat.", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "Generování deklarací pro tento soubor vyžaduje, aby se použil privátní název {0} z modulu {1}. Explicitní anotace typu může generování deklarací odblokovat.", "Declaration_expected_1146": "Očekává se deklarace.", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "Název deklarace je v konfliktu s integrovaným globálním identifikátorem {0}.", "Declaration_or_statement_expected_1128": "Očekává se deklarace nebo příkaz.", + "Declare_a_private_field_named_0_90053": "Deklarovat privátní pole s názvem {0}", "Declare_method_0_90023": "Deklarovat metodu {0}", "Declare_property_0_90016": "Deklarovat vlastnost {0}", "Declare_static_method_0_90024": "Deklarovat statickou metodu {0}", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "Dekorátory tady nejsou platné.", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "Dekorátory nejde použít na víc přístupových objektů get/set se stejným názvem.", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "Výchozí export modulu má nebo používá privátní název {0}.", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "Jednoznačné kontrolní výrazy přiřazení se dají použít jen spolu s anotací typu.", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "Definice následujících identifikátorů je v konfliktu s definicemi v jiném souboru: {0}", "Delete_all_unused_declarations_95024": "Odstranit všechny nepoužívané deklarace", "Delete_the_outputs_of_all_projects_6365": "Odstranit výstupy všech projektů", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[Zastaralé] Použijte místo toho --jsxFactory. Určí objekt vyvolaný pro createElement při cílení na generování JSX react.", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[Zastaralé] Použijte místo toho --outFile. Zřetězí a vygeneruje výstup do jednoho souboru.", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[Zastaralé] Použijte místo toho --skipLibCheck. Přeskočí kontrolu typů výchozích souborů deklarací knihovny.", + "Did_you_forget_to_use_await_2773": "Nezapomněli jste použít await?", + "Did_you_mean_0_1369": "Měli jste na mysli {0}?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "Měli jste na mysli omezení {0} na typ new (...args: any[]) => {1}?", + "Did_you_mean_to_call_this_expression_6212": "Nechtěli jste zavolat tento výraz?", + "Did_you_mean_to_mark_this_function_as_async_1356": "Nechtěli jste označit tuto funkci jako async?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "Nechtěli jste uzavřít tento typ funkce do závorky?", + "Did_you_mean_to_use_new_with_this_expression_6213": "Nechtěli jste u tohoto výrazu použít new?", "Digit_expected_1124": "Očekává se číslice.", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "Adresář {0} neexistuje. Všechna vyhledávání v něm se přeskočí.", "Disable_checking_for_this_file_90018": "Zakázat kontrolu tohoto souboru", "Disable_size_limitations_on_JavaScript_projects_6162": "Zakázat omezení velikosti v projektech JavaScriptu", + "Disable_solution_searching_for_this_project_6224": "Zakažte vyhledávání řešení pro tento projekt.", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "Zakáže striktní kontroly generických signatur v typech funkcí.", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "Zakažte možnost používat zdrojové soubory místo souborů deklarací z odkazovaných projektů.", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "Zakažte odkazy na stejný soubor s nekonzistentně použitými malými a velkými písmeny.", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "Nepřidávat odkazy se třemi lomítky nebo importované moduly do seznamu kompilovaných souborů", "Do_not_emit_comments_to_output_6009": "Negenerovat komentáře pro výstup", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "Neoznamují se chyby v nepoužívaných popiscích.", "Do_not_resolve_the_real_path_of_symlinks_6013": "Nepřekládat skutečnou cestu symbolických odkazů", "Do_not_truncate_error_messages_6165": "Nezkracovat chybové zprávy", - "Duplicate_declaration_0_2718": "Duplicitní deklarace pro: {0}", "Duplicate_function_implementation_2393": "Duplicitní implementace funkce", "Duplicate_identifier_0_2300": "Duplicitní identifikátor {0}", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "Duplicitní identifikátor {0}. Kompilátor si vyhrazuje název {1} v oboru nejvyšší úrovně pro daný modul.", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "Duplicitní identifikátor _this. Kompilátor pomocí deklarace proměnné _this zaznamenává odkaz na příkaz this.", "Duplicate_label_0_1114": "Duplicitní popisek {0}", "Duplicate_number_index_signature_2375": "Duplicitní podpis číselného indexu", + "Duplicate_property_0_2718": "Duplicitní vlastnost {0}.", "Duplicate_string_index_signature_2374": "Duplicitní signatury řetězcového indexu", "Dynamic_import_cannot_have_type_arguments_1326": "Dynamický import nemůže mít argumenty typu.", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "Dynamický import se podporuje jenom tehdy, když je příznak --module nastavený na commonjs nebo esNext.", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "Dynamický import musí mít jako argument jeden specifikátor.", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Specifikátor dynamického importu musí být typu string, ale tady má typ {0}.", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "Dynamické importy se podporují jen v případě, že příznak --module je nastavený na es2020, esnext, commonjs, amd, system nebo umd.", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "Každý člen typu sjednocení {0} má signatury konstruktu, ale žádná z těchto signatur není kompatibilní s jinou signaturou.", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "Každý člen typu sjednocení {0} má signatury, ale žádná z těchto signatur není kompatibilní s jinou signaturou.", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "Element má implicitně typ any, protože pomocí výrazu typu {0} není možné indexovat typ {1}.", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "Element má implicitně typ any, protože indexový výraz není typu number.", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "Element má implicitně typ any, protože typ {0} nemá žádnou signaturu indexu.", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "Element má implicitně typ any, protože typ {0} nemá žádnou signaturu indexu. Nechtěli jste zavolat {1}?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "Vygeneruje na začátku výstupních souborů značku pořadí bajtů ve formátu UTF-8.", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "Vygeneruje jediný soubor se zdrojovými mapováními namísto samostatného souboru.", + "Emit_class_fields_with_Define_instead_of_Set_6222": "Vygenerujte pole třídy pomocí Define namísto Set.", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "Vygeneruje zdroj spolu se zdrojovými mapováními v jednom souboru. Vyžaduje, aby byla nastavená možnost --inlineSourceMap nebo --sourceMap.", "Enable_all_strict_type_checking_options_6180": "Povolí všechny možnosti striktní kontroly typů.", + "Enable_incremental_compilation_6378": "Povolit přírůstkovou kompilaci", "Enable_project_compilation_6302": "Povolit kompilování projektu", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "Povolte ve funkcích metody bind, call a apply.", "Enable_strict_checking_of_function_types_6186": "Povolí striktní kontrolu typů funkcí.", "Enable_strict_checking_of_property_initialization_in_classes_6187": "Povolí striktní kontrolu inicializace vlastností ve třídách.", "Enable_strict_null_checks_6113": "Povolte striktní kontroly hodnot null.", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "Povolte v konfiguračním souboru možnost experimentalDecorators.", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "Povolte v konfiguračním souboru příznak --jsx.", "Enable_tracing_of_the_name_resolution_process_6085": "Povolte trasování procesu překladu IP adres.", "Enable_verbose_logging_6366": "Povolit podrobné protokolování", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "Povolí interoperabilitu generování mezi moduly CommonJS a ES prostřednictvím vytváření objektů oboru názvů pro všechny importy. Implikuje allowSyntheticDefaultImports.", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "Očekává se člen výčtu.", "Enum_member_must_have_initializer_1061": "Člen výčtu musí mít inicializátor.", "Enum_name_cannot_be_0_2431": "Název výčtu nemůže být {0}.", + "Enum_type_0_circularly_references_itself_2586": "Výčtový typ {0} odkazuje cyklicky sám na sebe.", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "Typ výčtu {0} má členy s inicializátory, které nejsou literály.", "Examples_Colon_0_6026": "Příklady: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "Nadměrná hloubka zásobníku při porovnávání typů {0} a {1}", @@ -385,9 +490,9 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "Očekával se aspoň tento počet argumentů: {0}. Počet předaných argumentů: {1} nebo více.", "Expected_corresponding_JSX_closing_tag_for_0_17002": "Očekávala se odpovídající ukončující značka JSX pro {0}.", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "Pro fragment JSX se očekávala odpovídající uzavírací značka.", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "Očekávaný typ pole {0} v souboru package.json byl string, obdržený je {1}.", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "Očekávaný typ pole {0} v souboru package.json byl {1}, získal se typ {2}.", "Experimental_Options_6177": "Experimentální možnosti", - "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "Experimentální podpora dekorátorů je funkce, která se v budoucím vydání změní. Toto upozornění odstraníte nastavením možnosti experimentalDecorators.", + "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "Experimentální podpora dekorátorů je funkce, která se v budoucí verzi může změnit. Toto upozornění odstraníte nastavením možnosti experimentalDecorators v tsconfig nebo jsconfig.", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "Explicitně zadaný druh překladu modulu: {0}.", "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "Přiřazení exportu nelze použít, pokud jsou cílem moduly ECMAScript. Zkuste místo toho použít export default nebo jiný formát modulu.", "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "Když má příznak --module hodnotu system, nepodporuje se přiřazení exportu.", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "Exporty a přiřazení exportů nejsou povolené v rozšířeních modulů.", "Expression_expected_1109": "Očekával se výraz.", "Expression_or_comma_expected_1137": "Očekával se výraz nebo čárka.", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "Výraz vytvoří typ sjednocení, který se nedá reprezentovat, protože je příliš složitý.", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "Výraz se přeloží na identifikátor _super, pomocí kterého kompilátor zaznamenává odkaz na základní třídu.", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "Výraz se přeloží na deklaraci proměnné {0}, kterou kompilátor používá pro podporu asynchronních funkcí.", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "Výraz se vyhodnocuje na deklaraci proměnné _newTarget, kterou kompilátor používá k zachycení odkazu na metavlastnost new.target.", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "Extrahovat do {0} v {1}", "Extract_to_0_in_1_scope_95008": "Extrahovat do {0} v oboru {1}", "Extract_to_0_in_enclosing_scope_95007": "Extrahovat do {0} v nadřazeném oboru", + "Extract_to_interface_95090": "Extrahovat do rozhraní", + "Extract_to_type_alias_95078": "Extrahovat do aliasu typu", + "Extract_to_typedef_95079": "Extrahovat do typedef", + "Extract_type_95077": "Typ extrahování", "FILE_6035": "SOUBOR", "FILE_OR_DIRECTORY_6040": "SOUBOR NEBO ADRESÁŘ", "Failed_to_parse_file_0_Colon_1_5014": "Nepovedlo se parsovat soubor {0}: {1}.", "Fallthrough_case_in_switch_7029": "Případ Fallthrough v příkazu switch", "File_0_does_not_exist_6096": "Soubor {0} neexistuje.", "File_0_exist_use_it_as_a_name_resolution_result_6097": "Soubor {0} existuje – použijte ho jako výsledek překladu IP adres.", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "Soubor {0} má nepodporovanou příponu. Jediné podporované přípony jsou {1}.", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "Soubor {0} má nepodporovanou příponu, a proto se přeskočí.", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "Soubor {0} má nepodporovanou příponu. Jediné podporované přípony jsou {1}.", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "Soubor {0} je javascriptový soubor. Nechtěli jste povolit možnost allowJs?", "File_0_is_not_a_module_2306": "Soubor {0} není modul.", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "Soubor {0} se nenachází v seznamu souborů projektu. Projekty musí uvádět všechny soubory nebo používat vzor include.", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "Soubor {0} není uvedený na seznamu souborů projektu {1}. Projekty musí uvádět všechny soubory nebo používat vzor include.", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "Soubor {0} není pod kořenovým adresářem rootDir {1}. Očekává se, že rootDir bude obsahovat všechny zdrojové soubory.", "File_0_not_found_6053": "Soubor {0} se nenašel.", "File_change_detected_Starting_incremental_compilation_6032": "Zjistila se změna souboru. Spouští se přírůstková kompilace...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "Specifikace souboru nemůže obsahovat nadřazený adresář (..), který se vyskytuje za rekurzivním zástupným znakem adresáře (**): {0}.", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "Specifikace souboru nemůže končit rekurzivním zástupným znakem adresáře (**): {0}.", "Fix_all_detected_spelling_errors_95026": "Opravit všechny zjištěné pravopisné chyby", + "Fix_all_expressions_possibly_missing_await_95085": "Opravit všechny výrazy, kde je možné, že chybí await", + "Found_0_errors_6217": "Našel se tento počet chyb: {0}.", "Found_0_errors_Watching_for_file_changes_6194": "Byl nalezen tento počet chyb: {0}. Sledují se změny souborů.", + "Found_1_error_6216": "Našla se 1 chyba.", "Found_1_error_Watching_for_file_changes_6193": "Byla nalezena 1 chyba. Sledují se změny souborů.", "Found_package_json_at_0_6099": "Soubor package.json se našel v {0}.", - "Found_package_json_at_0_Package_ID_is_1_6190": "V {0} se našel soubor package.json. ID balíčku je {1}.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "Deklarace funkcí nejsou povolené uvnitř bloků ve striktním režimu, pokud je cíl ES3 nebo ES5.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "Deklarace funkcí nejsou povolené uvnitř bloků ve striktním režimu, pokud je cíl ES3 nebo ES5. Definice tříd jsou automaticky ve striktním režimu.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "Deklarace funkcí nejsou povolené uvnitř bloků ve striktním režimu, pokud je cíl ES3 nebo ES5. Moduly jsou automaticky ve striktním režimu.", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Ve funkci chybí koncový příkaz return a návratový typ neobsahuje undefined.", "Function_overload_must_be_static_2387": "Přetížení funkce musí být statické.", "Function_overload_must_not_be_static_2388": "Přetížení funkce nesmí být statické.", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "Typ funkce s chybějící anotací návratového typu má implicitně návratový typ {0}.", "Generate_get_and_set_accessors_95046": "Generovat přístupové objekty get a set", + "Generates_a_CPU_profile_6223": "Vygeneruje profil procesoru.", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "Pro každý odpovídající soubor .d.ts vygeneruje sourcemap.", "Generates_corresponding_d_ts_file_6002": "Generuje odpovídající soubor .d.ts.", "Generates_corresponding_map_file_6043": "Generuje odpovídající soubor .map.", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "Generátor má implicitně typ {0}, protože nevydává žádné hodnoty. Zvažte možnost přidání návratového typu.", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "Generátor má implicitně typ yield {0}, protože nevydává žádné hodnoty. Zvažte možnost přidat anotaci návratového typu.", "Generators_are_not_allowed_in_an_ambient_context_1221": "Generátory nejsou v ambientním kontextu povolené.", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "Generátory jsou dostupné jenom při cílení na ECMAScript 2015 nebo novější.", "Generic_type_0_requires_1_type_argument_s_2314": "Obecný typ {0} vyžaduje argumenty typu {1}.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "Obecný typ {0} vyžaduje konkrétní počet argumentů ({1} až {2}).", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "Vytvoření instance generického typu jde příliš hluboko a může být nekonečné.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Viditelnost přístupových objektů getter a setter vzájemně nesouhlasí.", "Global_module_exports_may_only_appear_at_top_level_1316": "Exporty globálního modulu se můžou objevit jenom na nejvyšší úrovni.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "Exporty globálního modulu se můžou objevit jenom v souborech deklarací.", "Global_module_exports_may_only_appear_in_module_files_1314": "Exporty globálního modulu se můžou objevit jenom v souborech modulů.", "Global_type_0_must_be_a_class_or_interface_type_2316": "Globální typ {0} musí být typu třída nebo rozhraní.", "Global_type_0_must_have_1_type_parameter_s_2317": "Globální typ {0} musí mít parametry typu {1}.", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "Opakované kompilace --incremental a --watch předpokládají, že změny v souboru budou mít vliv jen na soubory, které na něm přímo závisejí.", "Hexadecimal_digit_expected_1125": "Očekávala se šestnáctková číslice.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "Očekával se identifikátor. Ve striktním režimu je {0} rezervované slovo.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "Očekával se identifikátor. Ve striktním režimu je {0} rezervované slovo. Definice tříd jsou automaticky ve striktním režimu.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "Očekával se identifikátor. Ve striktním režimu je {0} rezervované slovo. Moduly jsou automaticky ve striktním režimu.", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "Očekává se identifikátor. {0} je rezervované slovo, které se tady nedá použít.", "Identifier_expected_1003": "Očekával se identifikátor.", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "Očekává se identifikátor. __esModule je při transformaci modulů ECMAScript rezervované jako označení exportu.", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "Pokud balíček {0} ve skutečnosti zveřejňuje tento modul, zvažte možnost poslat žádost o přijetí změn, aby se připojila adresa https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}.", "Ignore_this_error_message_90019": "Ignorovat tuto chybovou zprávu", "Implement_all_inherited_abstract_classes_95040": "Implementovat všechny zděděné abstraktní třídy", "Implement_all_unimplemented_interfaces_95032": "Implementovat všechna neimplementovaná rozhraní", "Implement_inherited_abstract_class_90007": "Implementovat zděděnou abstraktní třídu", "Implement_interface_0_90006": "Implementovat rozhraní {0}", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "Klauzule implements exportované třídy {0} má nebo používá privátní název {1}.", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "Implicitní převod symbol na string za běhu neproběhne úspěšně. Zvažte možnost zabalit tento výraz do String(...).", "Import_0_from_module_1_90013": "Importovat {0} z modulu {1}", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "Přiřazení importu nelze použít, pokud jsou cílem moduly ECMAScript. Zkuste místo toho použít import * as ns from \"mod\", import {a} from \"mod\", import d from \"mod\" nebo jiný formát modulu.", "Import_declaration_0_is_using_private_name_1_4000": "Deklarace importu {0} používá privátní název {1}.", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "Deklarace importu je v konfliktu s místní deklarací {0}.", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "Deklarace importu v oboru názvů nemůžou odkazovat na modul.", + "Import_default_0_from_module_1_90032": "Importovat výchozí {0} z modulu {1}", "Import_emit_helpers_from_tslib_6139": "Importovat pomocné rutiny pro generování z tslib", "Import_may_be_converted_to_a_default_import_80003": "Import se může převést na výchozí import.", "Import_name_cannot_be_0_2438": "Název importu nemůže být {0}.", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "Importy nejsou povolené v rozšířeních modulů. Zvažte jejich přesunutí do uzavírajícího externího modulu.", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "Inicializátor členu v deklaracích ambientního výčtu musí být konstantní výraz.", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "Ve výčtu s víc deklaracemi může být jenom u jedné deklarace vynechaný inicializátor u prvního elementu výčtu.", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "V inicializátoru člena deklarací výčtu const musí být konstantní výraz.", "Include_modules_imported_with_json_extension_6197": "Zahrnout moduly importované s příponou .json", "Index_signature_in_type_0_only_permits_reading_2542": "Signatura indexu v typu {0} povoluje jen čtení.", "Index_signature_is_missing_in_type_0_2329": "V typu {0} chybí signatura indexu.", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "Jednotlivé deklarace ve sloučené deklaraci {0} musí být všechny exportované nebo všechny místní.", "Infer_all_types_from_usage_95023": "Odvodit všechny typy z použití", "Infer_parameter_types_from_usage_95012": "Odvodit typy parametrů z využití", + "Infer_this_type_of_0_from_usage_95080": "Vyvodit typ this pro {0} z použití", "Infer_type_of_0_from_usage_95011": "Odvodit typ {0} z využití", "Initialize_property_0_in_the_constructor_90020": "Inicializovat vlastnost {0} v konstruktoru", "Initialize_static_property_0_90021": "Inicializovat statickou vlastnost {0}", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "JSDoc ... se může nacházet jen v posledním parametru signatury.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "Značka JSDoc @param má název {0}, ale neexistuje žádný parametr s tímto názvem.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "Značka JSDoc @param má název {0}, ale žádný parametr s tímto názvem neexistuje. Musí odpovídat hodnotě arguments, pokud má typ pole.", + "JSDoc_type_0_circularly_references_itself_2587": "Typ JSDoc {0} odkazuje cyklicky sám na sebe.", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "Značka JSDoc @typedef by měla mít poznámku k typu nebo by za ní měly následovat značky @property nebo @member.", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "Typy JSDoc se můžou používat jenom v dokumentačních komentářích.", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "Typy JSDoc se můžou přesunout na typy TypeScript.", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "Typ elementu JSX {0} nemá žádnou signaturu konstrukce nebo volání.", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "Typ elementu JSX {0} není funkce konstruktoru pro elementy JSX.", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "Elementy JSX nemůžou mít víc atributů se stejným názvem.", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "Výrazy JSX nemůžou používat operátor čárky. Nechtěli jste napsat pole?", "JSX_expressions_must_have_one_parent_element_2657": "Výrazy JSX musí mít jeden nadřazený element.", "JSX_fragment_has_no_corresponding_closing_tag_17014": "Fragment JSX nemá odpovídající uzavírací značku.", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "Při použití vložené direktivy pragma objektu pro vytváření JSX se nepodporuje fragment JSX.", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "Podřízený objekt JSX spread musí být typu pole.", "Jump_target_cannot_cross_function_boundary_1107": "Cíl odkazu nemůže překročit hranici funkce.", "KIND_6034": "DRUH", + "Keywords_cannot_contain_escape_characters_1260": "Klíčová slova nemůžou obsahovat řídicí znaky.", "LOCATION_6037": "UMÍSTĚNÍ", "Language_service_is_disabled_9004": "Služba jazyka je zakázaná.", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "Levá strana operátoru čárky se nepoužívá a nemá žádné vedlejší účinky.", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "Nastavit volání metody super() jako první příkaz v konstruktoru", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "Typu mapovaného objektu má implicitně typ šablony any.", "Member_0_implicitly_has_an_1_type_7008": "Člen {0} má implicitně typ {1}.", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "Člen {0} má implicitně typ {1}, ale je možné, že lepší typ by se vyvodil z použití.", "Merge_conflict_marker_encountered_1185": "Zjistila se značka konfliktu sloučení.", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "Spojená deklarace {0} nemůže obsahovat výchozí deklaraci exportu. Zvažte namísto toho možnost přidat samostatnou deklaraci export default {0}.", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "Metavlastnost {0} je povolená jenom v těle deklarace funkce, výrazu funkce nebo konstruktoru.", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "Metoda {0} z exportovaného rozhraní má nebo používá název {1} z privátního modulu {2}.", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "Metoda {0} z exportovaného rozhraní má nebo používá privátní název {1}.", "Modifiers_cannot_appear_here_1184": "Tady nejde použít modifikátory.", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "Modul {0} neodkazuje na typ, ale používá se tady jako typ.", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "Modul {0} se dá importovat podle výchozího nastavení jen pomocí příznaku {1}.", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "Modul {0} deklaruje {1} místně, ale exportuje se jako {2}.", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "Modul {0} deklaruje {1} místně, ale neexportuje se.", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "Modul {0} neodkazuje na typ, ale používá se tady jako typ. Měli jste na mysli typeof import('{0}')?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "Modul {0} neodkazuje na hodnotu, ale používá se tady jako hodnota.", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "Modul {0} už exportoval člena s názvem {1}. Zvažte možnost vyřešení nejednoznačnosti explicitním opakováním exportu.", "Module_0_has_no_default_export_1192": "Modul {0} nemá žádný výchozí export.", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "Modul {0} nemá žádný výchozí export. Nechtěli jste místo toho použít import { {1} } from {0}?", "Module_0_has_no_exported_member_1_2305": "V modulu {0} není žádný exportovaný člen {1}.", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "Modul {0} nemá žádný exportovaný člen {1}. Neměli jste na mysli {2}?", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "Modul {0} nemá žádný exportovaný člen {1}. Nechtěli jste místo toho použít import { {1} } from {0}?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "Modul {0} je skrytý místní deklarací se stejným názvem.", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "Modul {0} se překládá na nemodulovou entitu a nedá se importovat pomocí tohoto konstruktoru.", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "Modul {0} používá export = a nedá se použít s možností export *.", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "Modul {0} se převedl jako ambientní modul deklarovaný v {1}, protože tento soubor nebyl upraven.", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "Modul {0} se převedl jako lokálně deklarovaný ambientní modul v souboru {1}.", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "Modul {0} se přeložil na {1}, není ale nastavená možnost --jsx.", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "Modul {0} se přeložil na {1}, ale nepoužívá se --resolveJsonModule.", "Module_Resolution_Options_6174": "Možnosti překladu modulů", "Module_name_0_matched_pattern_1_6092": "Název modulu {0}, odpovídající vzor {1}", "Module_name_0_was_not_resolved_6090": "======== Název modulu {0} nebyl přeložen. ========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== Název modulu {0} byl úspěšně přeložen na {1}. ========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== Název modulu {0} se úspěšně přeložil na {1} s ID balíčku {2}. ========", "Module_resolution_kind_is_not_specified_using_0_6088": "Druh překladu modulu nebyl určen, použije se {0}.", "Module_resolution_using_rootDirs_has_failed_6111": "Překlad modulu pomocí rootDirs se nepovedl.", "Move_to_a_new_file_95049": "Přesunout do nového souboru", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "Pojmenovaná vlastnost {0} není u typu {1} stejná jako u typu {2}.", "Namespace_0_has_no_exported_member_1_2694": "Obor názvů {0} nemá žádný exportovaný člen {1}.", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "Žádný základní konstruktor nemá zadaný počet argumentů typu.", + "No_constituent_of_type_0_is_callable_2755": "Žádný konstituent typu {0} se nedá zavolat.", + "No_constituent_of_type_0_is_constructable_2759": "Žádný konstituent typu {0} se nedá vytvořit.", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "V typu {1} se nenašla žádná signatura indexu s typem parametru {0}.", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "V konfiguračním souboru {0} se nenašly žádné vstupy. Pro zahrnutí jsou zadané tyto cesty: {1} a pro vyloučení tyto cesty: {2}.", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "Žádné přetížení neočekává tento počet argumentů: {0}. Existují ale přetížení, která očekávají buď {1}, nebo tento počet argumentů: {2}", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "Žádné přetížení neočekává tento počet argumentů typů: {0}. Existují ale přetížení, která očekávají buď {1}, nebo tento počet argumentů typů: {2}", + "No_overload_matches_this_call_2769": "Žádné přetížení neodpovídá tomuto volání.", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "V oboru pro sdruženou vlastnost {0} neexistuje žádná hodnota. Buď nějakou deklarujte, nebo poskytněte inicializátor.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "Neabstraktní třída {0} neimplementuje zděděného abstraktního člena {1} ze třídy {2}.", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "Výraz neabstraktní třídy neimplementuje zděděný abstraktní člen {0} z třídy {1}.", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "Kontrolní výrazy jiné než null se dají používat jen v typescriptových souborech.", + "Non_simple_parameter_declared_here_1348": "Deklaroval se tady parametr, který není jednoduchý.", "Not_all_code_paths_return_a_value_7030": "Ne všechny cesty kódu vracejí hodnotu.", + "Not_all_constituents_of_type_0_are_callable_2756": "Ne všichni konstituenti typu {0} se dají zavolat.", + "Not_all_constituents_of_type_0_are_constructable_2760": "Ne všichni konstituenti typu {0} se dají vytvořit.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "Typ číselného indexu {0} se nedá přiřadit k typu indexu řetězce {1}.", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "Číselné literály s absolutními hodnotami, které se rovnají hodnotě 2^53 nebo větší, se nedají reprezentovat přesně jako celá čísla, protože jsou příliš velké.", "Numeric_separators_are_not_allowed_here_6188": "Číselné oddělovače tady nejsou povolené.", "Object_is_of_type_unknown_2571": "Objekt je typu Neznámý.", "Object_is_possibly_null_2531": "Objekt je pravděpodobně null.", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "Osmičkové literály nejsou povolené v inicializátoru členů výčtů. Použijte syntaxi {0}.", "Octal_literals_are_not_allowed_in_strict_mode_1121": "Osmičkové literály nejsou ve striktním režimu povolené.", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "Osmičkové literály nejsou dostupné při cílení na ECMAScript 5 a vyšší. Použijte syntaxi {0}.", + "Only_ECMAScript_imports_may_use_import_type_1370": "import type můžou používat jen importy ECMAScript.", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "V příkazu for...in se povoluje deklarovat jenom jednu proměnnou.", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "V příkazu for...of se povoluje deklarovat jenom jednu proměnnou.", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "Klíčovým slovem new se dá volat jenom funkce void.", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "Bude vydávat jen soubory deklarací .d.ts.", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "V klauzuli třídy extends se aktuálně podporují jenom identifikátory nebo kvalifikované názvy s volitelnými argumenty typu.", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "Prostřednictvím klíčového slova super jsou přístupné jenom veřejné a chráněné metody základní třídy.", + "Operator_0_cannot_be_applied_to_type_1_2736": "Operátor {0} se nedá použít na typ {1}.", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "Operátor {0} nejde použít u typů {1} a {2}.", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "Možnost {0} je možné zadat jenom v souboru tsconfig.json.", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "Možnost {0} jde použít jenom při zadání možnosti --inlineSourceMap nebo možnosti --sourceMap.", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "Když je možnost target nastavená na ES3, možnost {0} se nedá zadat.", "Option_0_cannot_be_specified_with_option_1_5053": "Možnosti {0} a {1} nejde zadat zároveň.", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "Možnost {0} nejde zadat bez možnosti {1}.", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "Možnost {0} nejde zadat bez možnosti {1} nebo {2}.", "Option_0_should_have_array_of_strings_as_a_value_6103": "Hodnota možnosti {0} by měla být pole řetězců.", "Option_build_must_be_the_first_command_line_argument_6369": "Možnost --build musí být prvním argumentem příkazového řádku.", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "Možnost --incremental se dá zadat jen pomocí tsconfig, při generování do jednoho souboru nebo když se zadá možnost --tsBuildInfoFile.", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "Možnost isolatedModules jde použít jenom v případě, že je poskytnutá možnost --module nebo že možnost target je ES2015 nebo vyšší verze.", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "Možnost paths se nedá použít bez zadání možnosti --baseUrl.", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "Možnost project se na příkazovém řádku nedá kombinovat se zdrojovým souborem.", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "Možnost --resolveJsonModule se dá zadat jen v případě, že generování kódu modulu je commonjs, amd, es2015 nebo esNext.", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "Možnost --resolveJsonModule se nedá zadat bez strategie překladu modulu node.", "Options_0_and_1_cannot_be_combined_6370": "Možnosti {0} a {1} nejde kombinovat.", "Options_Colon_6027": "Možnosti:", "Output_directory_for_generated_declaration_files_6166": "Výstupní adresář pro vygenerované soubory deklarace", "Output_file_0_from_project_1_does_not_exist_6309": "Výstupní soubor {0} z projektu {1} neexistuje.", "Output_file_0_has_not_been_built_from_source_file_1_6305": "Výstupní soubor {0} se nesestavil ze zdrojového souboru {1}.", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "Signatura přetížení není kompatibilní s implementací funkce.", + "Overload_0_of_1_2_gave_the_following_error_2772": "Přetížení {0} z {1}, {2}, vrátilo následující chybu.", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "Signatury přetížení musí být všechny abstraktní nebo neabstraktní.", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "Signatury přetížení musí být všechny ambientní nebo neambientní.", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "Signatury přetížení musí být všechny exportované nebo neexportované.", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "Signatury přetížení musí být všechny veřejné, privátní nebo chráněné.", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "Parametr {0} se nedá odkazovat v jeho vlastním inicializátoru.", "Parameter_0_implicitly_has_an_1_type_7006": "Parametr {0} má implicitně typ {1}.", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "Parametr {0} má implicitně typ {1}, ale je možné, že lepší typ by se vyvodil z použití.", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "Parametr {0} není na stejné pozici jako parametr {1}.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "Parametr {0} přístupového objektu má nebo používá název {1} z externího modulu {2}, ale nedá se pojmenovat.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "Parametr {0} přístupového objektu má nebo používá název {1} z privátního modulu {2}.", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "Parametr {0} přístupového objektu má nebo používá privátní název {1}.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "Parametr {0} signatury volání z exportovaného rozhraní má nebo používá název {1} z privátního modulu {2}.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "Parametr {0} signatury volání z exportovaného rozhraní má nebo používá privátní název {1}.", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "Parametr {0} konstruktoru z exportované třídy má nebo používá název {1} z externího modulu {2}, ale nedá se pojmenovat.", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "Parametr {0} veřejné statické metody z exportované třídy má nebo používá privátní název {1}.", "Parameter_cannot_have_question_mark_and_initializer_1015": "Parametr nemůže obsahovat otazník a inicializátor.", "Parameter_declaration_expected_1138": "Očekává se deklarace parametru.", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "Parametr má název, ale žádný typ. Měli jste na mysli {0}: {1}?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "Modifikátory parametrů se dají používat jen v typescriptových souborech.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "Typ parametru veřejné metody setter {0} z exportované třídy má nebo používá název {1} z privátního modulu {2}.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "Typ parametru veřejné metody setter {0} z exportované třídy má nebo používá privátní název {1}.", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "Typ parametru veřejné statické metody setter {0} z exportované třídy má nebo používá název {1} z privátního modulu {2}.", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "Parsovat ve striktním režimu a generovat striktní používání pro každý zdrojový soubor", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "Vzor {0} může obsahovat nanejvýš jeden znak * (hvězdička).", "Prefix_0_with_an_underscore_90025": "Předpona {0} s podtržítkem", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "Před všechny nesprávné deklarace vlastností přidejte declare.", "Prefix_all_unused_declarations_with_where_possible_95025": "Přidat příponu _ ke všem nepoužívaným deklaracím tam, kde je to možné", + "Prefix_with_declare_95094": "Přidat předponu declare", "Print_names_of_files_part_of_the_compilation_6155": "Část kompilace, při které se vypisují názvy souborů", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "Vypsat názvy souborů, které jsou součástí kompilace, a pak ukončit zpracovávání", "Print_names_of_generated_files_part_of_the_compilation_6154": "Část kompilace, při které se vypisují názvy generovaných souborů", "Print_the_compiler_s_version_6019": "Vytisknout verzi kompilátoru", + "Print_the_final_configuration_instead_of_building_1350": "Místo sestavení vypsat konečnou konfiguraci", "Print_this_message_6017": "Vytisknout tuto zprávu", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "Privátní identifikátory se v deklaracích proměnných nepovolují.", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "Privátní identifikátory se mimo těla tříd nepovolují.", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "Privátní identifikátory jsou dostupné jen při cílení na ECMAScript 2015 a novější.", + "Private_identifiers_cannot_be_used_as_parameters_18009": "Privátní identifikátory se nedají použít jako parametry.", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "K privátnímu nebo chráněnému členu {0} se nedá přistupovat v parametru typu.", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "Projekt {0} nejde sestavit, protože jeho závislost {1} obsahuje chyby.", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "Projekt {0} nejde sestavit, protože se nesestavila jeho závislost {1}.", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "Projekt {0} je zastaralý, protože jeho závislost {1} je zastaralá.", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "Projekt {0} je zastaralý, protože nejstarší výstup {1} je starší než nejnovější vstup {2}.", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "Projekt {0} je zastaralý, protože výstupní soubor {1} neexistuje.", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "Projekt {0} je zastaralý, protože jeho výstup se vygeneroval pomocí verze {1}, která se liší od aktuální verze {2}.", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "Projekt {0} je zastaralý, protože se změnil výstup jeho závislosti {1}.", "Project_0_is_up_to_date_6361": "Projekt {0} je aktuální.", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "Projekt {0} je aktuální, protože nejnovější vstup {1} je starší než nejstarší výstup {2}.", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "Projekt {0} je aktualizovaný soubory .d.ts z jeho závislostí.", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "Projekty, které se mají odkazovat", "Property_0_does_not_exist_on_const_enum_1_2479": "Vlastnost {0} ve výčtu const {1} neexistuje.", "Property_0_does_not_exist_on_type_1_2339": "Vlastnost {0} v typu {1} neexistuje.", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "Vlastnost {0} v typu {1} neexistuje. Nezapomněli jste použít await?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "Vlastnost {0} v typu {1} neexistuje. Měli jste na mysli {2}?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "Vlastnost {0} má konfliktní deklarace a v typu {1} není přístupná.", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "Vlastnost {0} nemá žádný inicializátor a není jednoznačně přiřazena v konstruktoru.", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "Vlastnost {0} má implicitně typ any, protože její přistupující objekt get nemá anotaci návratového typu.", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "Vlastnost {0} má implicitně typ any, protože její přistupující objekt set nemá anotaci parametrového typu.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "Vlastnost {0} má implicitně typ any, ale je možné, že lepší typ pro jeho přístupový objekt get by se vyvodil z použití.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "Vlastnost {0} má implicitně typ any, ale je možné, že lepší typ pro jeho přístupový objekt set by se vyvodil z použití.", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "Vlastnost {0} v typu {1} nejde přiřadit ke stejné vlastnosti v základním typu {2}.", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "Vlastnost {0} v typu {1} nejde přiřadit typu {2}.", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "Vlastnost {0} v typu {1} odkazuje na jiného člena, ke kterému není možné získat přístup z typu {2}.", + "Property_0_is_a_static_member_of_type_1_2576": "Vlastnost {0} není statický člen typu {1}.", "Property_0_is_declared_but_its_value_is_never_read_6138": "Deklaruje se vlastnost {0}, ale její hodnota se vůbec nečte.", "Property_0_is_incompatible_with_index_signature_2530": "Vlastnost {0} není kompatibilní se signaturou indexu.", + "Property_0_is_incompatible_with_rest_element_type_2573": "Vlastnost {0} není kompatibilní s typem elementu rest.", "Property_0_is_missing_in_type_1_2324": "Vlastnost {0} v typu {1} chybí.", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "Vlastnost {0} chybí v typu {1}, ale vyžaduje se v typu {2}.", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "Vlastnost {0} není přístupná mimo třídu {1}, protože má privátní identifikátor.", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "Vlastnost {0} je v typu {1} nepovinná, ale vyžaduje se v typu {2}.", "Property_0_is_private_and_only_accessible_within_class_1_2341": "Vlastnost {0} je privátní a dostupná jenom ve třídě {1}.", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "Vlastnost {0} je v typu {1} privátní, ale v typu {2} ne.", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "Vlastnost {0} je chráněná, ale typ {1} není třída odvozená od {2}.", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "Vlastnost {0} je v typu {1} chráněná, ale v typu {2} veřejná.", "Property_0_is_used_before_being_assigned_2565": "Vlastnost {0} je použitá před přiřazením.", + "Property_0_is_used_before_its_initialization_2729": "Vlastnost {0} se používá dříve, než se inicializuje.", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "Vlastnost {0} rozšířeného atributu JSX nejde přiřadit cílové vlastnosti.", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "Vlastnost {0} exportovaného výrazu třídy nesmí být privátní nebo chráněná.", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "Vlastnost {0} exportovaného rozhraní má nebo používá název {1} z privátního modulu {2}.", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "Vlastnost {0} exportovaného rozhraní má nebo používá privátní název {1}.", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "Vlastnost {0} typu {1} se nedá přiřadit k typu číselného indexu {2}.", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "Vlastnost {0} typu {1} se nedá přiřadit k typu indexu řetězce {2}.", + "Property_0_was_also_declared_here_2733": "Vlastnost {0} se deklarovala i tady.", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "Vlastnost {0} přepíše základní vlastnost v {1}. Pokud je to záměr, přidejte inicializátor. Jinak přidejte modifikátor declare nebo odeberte redundantní deklaraci.", "Property_assignment_expected_1136": "Očekává se přiřazení vlastnosti.", "Property_destructuring_pattern_expected_1180": "Očekává se vzor destruktoru vlastnosti.", "Property_or_signature_expected_1131": "Očekává se vlastnost nebo podpis.", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "Veřejná statická vlastnost {0} exportované třídy má nebo používá název {1} z externího modulu {2}, ale nedá se pojmenovat.", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "Veřejná statická vlastnost {0} exportované třídy má nebo používá název {1} z privátního modulu {2}.", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "Veřejná statická vlastnost {0} exportované třídy má nebo používá privátní název {1}.", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "Kvalifikovaný název {0} se nepovoluje bez @param {object} {1} na začátku.", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "Vyvolat chybu u výrazů a deklarací s implikovaným typem any", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Vyvolá chybu u výrazů this s implikovaným typem any.", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "Opětovný export typu ve chvíli, kdy se poskytl příznak --isolatedModules, vyžaduje, aby se použilo export type.", "Redirect_output_structure_to_the_directory_6006": "Přesměrování výstupní struktury do adresáře", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "Odkazovaný projekt {0} musí mít nastavení \"composite\": true.", + "Remove_all_unnecessary_uses_of_await_95087": "Odebrat všechna nepotřebná použití výrazu await", "Remove_all_unreachable_code_95051": "Odebrat veškerý nedosažitelný kód", "Remove_all_unused_labels_95054": "Odebrat všechny nepoužívané popisky", "Remove_braces_from_arrow_function_95060": "Odebrat složené závorky z funkce šipky", - "Remove_declaration_for_Colon_0_90004": "Odebrat deklaraci pro {0}", "Remove_destructuring_90009": "Odebrat destrukci", "Remove_import_from_0_90005": "Odebrat import z {0}", + "Remove_template_tag_90011": "Odebrat značku šablonu", + "Remove_type_parameters_90012": "Odebrat parametry typů", + "Remove_unnecessary_await_95086": "Odebrat nepotřebné výrazy await", "Remove_unreachable_code_95050": "Odebrat nedosažitelný kód", + "Remove_unused_declaration_for_Colon_0_90004": "Odebrat nepoužívané deklarace pro {0}", "Remove_unused_label_95053": "Odebrat nepoužitý popisek", "Remove_variable_statement_90010": "Odebrat příkaz proměnné", + "Replace_all_unused_infer_with_unknown_90031": "Nahradit všechny nepoužívané příkazy infer za unknown", "Replace_import_with_0_95015": "Nahradí import použitím: {0}.", + "Replace_infer_0_with_unknown_90030": "Nahradit infer {0} za unknown", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Oznámí se chyba, když některé cesty kódu ve funkci nevracejí hodnotu.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Oznámí se chyby v případech fallthrough v příkazu switch.", "Report_errors_in_js_files_8019": "Ohlásit chyby v souborech .js", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "Překládá se pomocí primárních cest hledání...", "Resolving_with_primary_search_path_0_6121": "Probíhá překlad pomocí primární cesty hledání {0}.", "Rest_parameter_0_implicitly_has_an_any_type_7019": "Parametr rest {0} implicitně obsahuje typ any[].", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "Parametr rest {0} má implicitně typ any[], ale je možné, že lepší typ by se vyvodil z použití.", + "Rest_signatures_are_incompatible_2572": "Signatury rest jsou nekompatibilní.", "Rest_types_may_only_be_created_from_object_types_2700": "Typy rest se dají vytvářet jenom z typů object.", + "Return_type_annotation_circularly_references_itself_2577": "Anotace návratového typu se cyklicky odkazuje sama na sebe.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "Návratový typ signatury volání z exportovaného rozhraní má nebo používá název {0} z privátního modulu {1}.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "Návratový typ signatury volání z exportovaného rozhraní má nebo používá privátní název {0}.", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "Návratový typ signatury konstruktoru z exportovaného rozhraní má nebo používá název {0} z privátního modulu {1}.", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "Nedá se určit kořenový adresář, přeskakují se primární cesty hledání.", "STRATEGY_6039": "STRATEGIE", "Scoped_package_detected_looking_in_0_6182": "Zjištěn balíček v oboru, hledání v: {0}", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "Nastavte možnost module v konfiguračním souboru na {0}.", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "Nastavte možnost target v konfiguračním souboru na {0}.", "Setters_cannot_return_a_value_2408": "Metody setter nemůžou vracet hodnotu.", "Show_all_compiler_options_6169": "Zobrazí všechny možnosti kompilátoru.", "Show_diagnostic_information_6149": "Zobrazí diagnostické informace.", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "Signatura {0} musí být predikát typu.", "Skip_type_checking_of_declaration_files_6012": "Přeskočit kontrolu typu souborů deklarace", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "Sestavení projektu {0} se přeskakuje, protože jeho závislost {1} obsahuje chyby.", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "Vyčištění se přeskakuje, protože některé projekty se nepodařilo najít.", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "Sestavení projektu {0} se přeskakuje, protože se nesestavila jeho závislost {1}.", "Source_Map_Options_6175": "Možnosti zdrojového mapování", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "Specializovaná signatura přetížení nejde přiřadit žádnému nespecializovanému podpisu.", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "Specifikátor dynamického importu nemůže být elementem Spread.", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "Zadejte cílovou verzi ECMAScriptu: ES3 (výchozí), ES5, ES2015, ES2016, ES2017, ES2018 nebo ESNEXT.", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "Zadejte cílovou verzi ECMAScript: ES3 (výchozí), ES5, ES2015, ES2016, ES2017, ES2018, ES2019, ES2020 nebo ESNEXT", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "Zadejte generování kódu JSX: preserve, react-native, nebo react.", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "Zadejte chování generování nebo kontroly pro importy, které se používají jen pro typy.", + "Specify_file_to_store_incremental_compilation_information_6380": "Zadejte soubor, do kterého se uloží informace o přírůstkové kompilaci.", "Specify_library_files_to_be_included_in_the_compilation_6079": "Zadejte soubory knihovny, které se mají zahrnout do kompilace.", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "Určete generování kódu modulu: none, commonjs, amd, system, umd, es2015 nebo ESNext.", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "Zadejte generování kódu modulu: none, commonjs, amd, system, umd, es2015, es2020 nebo ESNext", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "Zadejte strategii překladu modulu: node (Node.js) nebo classic (TypeScript verze nižší než 1.6).", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "Zadejte strategii pro vytvoření sledování načítání, když se ho nepovede vytvořit pomocí událostí souborového systému: FixedInterval (výchozí), PriorityInterval, DynamicPriority", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "Zadejte strategii pro sledování adresáře na platformách, které nepodporují nativně rekurzivní sledování: UseFsEvents (výchozí), FixedPollingInterval, DynamicPriorityPolling", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "Zadejte strategii pro sledování souboru: FixedPollingInterval (výchozí), PriorityPollingInterval, DynamicPriorityPolling, UseFsEvents, UseFsEventsOnParentDirectory", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "Zadejte funkci objektu pro vytváření JSX, která se použije při zaměření na generování JSX react, např. React.createElement nebo h.", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "Zdejte sekvenci konce řádku, která se má použít při generování souborů: CRLF (dos) nebo LF (unix).", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "Zadejte umístění, ve kterém by měl ladicí program najít soubory TypeScript namísto umístění zdroje.", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "Zadejte umístění, ve kterém by měl ladicí program najít soubory mapy namísto generovaných umístění.", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "Zadejte kořenový adresář vstupních souborů. Slouží ke kontrole struktury výstupního adresáře pomocí --outDir.", + "Split_all_invalid_type_only_imports_1367": "Rozdělit všechny neplatné importy, při kterých se importují jen typy", + "Split_into_two_separate_import_declarations_1366": "Rozdělit na dvě samostatné deklarace importu", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "Operátor rozšíření ve výrazech new je dostupný jenom při cílení na verzi ECMAScript 5 a vyšší.", "Spread_types_may_only_be_created_from_object_types_2698": "Typy spread se dají vytvářet jenom z typů object.", "Starting_compilation_in_watch_mode_6031": "Spouští se kompilace v režimu sledování...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "Deklarace následných vlastností musí obsahovat stejný typ. Vlastnost {0} musí být typu {1}, ale tady je typu {2}.", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "Deklarace následných proměnných musí obsahovat stejný typ. Proměnná {0} musí být typu {1}, ale tady je typu {2}.", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "Nahrazení {0} za vzor {1} má nesprávný typ, očekával se typ string, obdržený je {2}.", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "Nahrazení {0} ve vzoru {1} může obsahovat nanejvýš jeden znak * (hvězdička).", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "Nahrazení {0} ve vzoru {1} může obsahovat maximálně jeden znak * (hvězdička).", "Substitutions_for_pattern_0_should_be_an_array_5063": "Náhrady vzoru {0} by měly být pole.", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "Nahrazení vzoru {0} nesmí být prázdné pole.", "Successfully_created_a_tsconfig_json_file_6071": "Soubor tsconfig.json se úspěšně vytvořil.", @@ -840,78 +1033,122 @@ "Suppress_excess_property_checks_for_object_literals_6072": "Potlačit nadměrné kontroly vlastností pro literály objektů", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "Potlačit chyby noImplicitAny u objektů indexování bez signatur indexu", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "Odkaz Symbol neodkazuje na globální objekt konstruktoru Symbol.", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "Synchronně volat zpětná volání a aktualizovat stav sledování adresářů na platformách, které nepodporují nativně rekurzivní sledování", "Syntax_Colon_0_6023": "Syntaxe: {0}", + "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229": "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'.", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "Označené výrazy šablony se v nepovinném řetězu nepovolují.", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "Modifikátor {0} se dá používat jen v typescriptových souborech.", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "Operátor {0} nejde použít u typu symbol.", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "Operátor {0} není u logických typů povolený. Můžete ale použít {1}.", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "Vlastnost {0} asynchronního iterátoru musí být metoda.", + "The_0_property_of_an_iterator_must_be_a_method_2767": "Vlastnost {0} iterátoru musí být metoda.", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "Typ Object se dá přiřadit jen k malému počtu dalších typů. Nechtěli jste místo toho použít typ any?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "Funkce šipky v ES3 a ES5 nemůže odkazovat na objekt arguments. Zvažte použití standardního výrazu funkce.", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "V ES3 a ES5 se na objekt arguments nedá odkazovat v asynchronní funkci nebo metodě. Zvažte možnost použít standardní funkci nebo metodu.", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "Tělo příkazu if nemůže být prázdný příkaz.", "The_character_set_of_the_input_files_6163": "Znaková sada vstupních souborů", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "Obsahující funkce šipky zachytává globální hodnotu pro this.", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "Text obsahující funkce nebo modulu je pro analýzu toku řízení příliš dlouhý.", "The_current_host_does_not_support_the_0_option_5001": "Aktuální hostitel nepodporuje možnost {0}.", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "Deklarace {0}, kterou jste pravděpodobně chtěli použít, je definovaná tady.", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "Očekávaný typ pochází z vlastnosti {0}, která je deklarovaná tady v typu {1}.", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "Očekávaný typ pochází z návratového typu této signatury.", + "The_expected_type_comes_from_this_index_signature_6501": "Očekávaný typ pochází z této signatury indexu.", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "Výraz přiřazení exportu musí být identifikátor nebo kvalifikovaný název v ambientním kontextu.", "The_files_list_in_config_file_0_is_empty_18002": "Seznam files v konfiguračním souboru {0} je prázdný.", + "The_first_export_default_is_here_2752": "První výchozí nastavení exportu je tady.", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "První parametr metody then příslibu musí být zpětné volání.", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "Globální typ JSX.{0} by neměl mít více než jednu vlastnost.", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "Metavlastnost import.meta je povolená, jenom když se pro možnosti kompilátoru target a module použije ESNext.", + "The_implementation_signature_is_declared_here_2750": "Signatura implementace se deklarovala tady.", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "Metavlastnost import.meta se povoluje jen v případě, že možnost --module je nastavená na esnext nebo system.", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "Odvozený typ {0} se nedá pojmenovat bez odkazu na {1}. Pravděpodobně to nebude přenosné. Vyžaduje se anotace typu.", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "Odvozený typ {0} odkazuje na nepřístupný typ {1}. Musí se použít anotace typu.", + "The_last_overload_gave_the_following_error_2770": "Poslední přetížení vrátilo následující chybu.", + "The_last_overload_is_declared_here_2771": "Poslední přetížení je deklarované tady.", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "Levá strana příkazu for...in nemůže být destrukturačním vzorem.", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "Levá strana příkazu for...in nemůže používat anotaci typu.", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "Levá strana příkazu for...in nemůže představovat přístup k nepovinné vlastnosti.", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "Levá strana příkazu for..n musí být proměnná nebo přístup k vlastnosti.", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "Levá strana příkazu for...in musí být typu string nebo any.", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "Levá strana příkazu for...of nemůže používat anotaci typu.", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "Levá strana příkazu for...of nemůže představovat přístup k nepovinné vlastnosti.", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "Levá strana příkazu for...of musí být proměnná nebo přístup k vlastnosti.", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "Levá strana aritmetické operace musí mít typ any, number nebo být typu výčtu.", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "Levá strana aritmetické operace musí mít typ any, number, bigint nebo být typu výčtu.", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "Levá strana výrazu přiřazení nemůže představovat přístup k nepovinné vlastnosti.", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "Levá strana výrazu přiřazení musí být proměnná nebo přístup k vlastnosti.", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "Levá strana výrazu in musí být typu any, string, number nebo symbol.", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "Levá strana výrazu instanceof musí být typu any, typem objektu nebo parametrem typu.", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "Národní prostředí, které se používá při zobrazování zpráv uživateli (třeba cs-CZ)", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "Maximální hloubka závislostí pro vyhledávání pod node_modules a načítání javascriptových souborů", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "Operandem operátoru delete nemůže být privátní identifikátor.", "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "Operandem operátoru delete nemůže být vlastnost určená jen pro čtení.", "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "Operandem operátoru delete musí být odkaz na vlastnost.", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "Operandem operátoru inkrementace nebo dekrementace nemůže být přístup k nepovinné vlastnosti.", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "Operand operátoru inkrementace nebo dekrementace musí být proměnná nebo přístup k vlastnosti.", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "Parser očekával, že najde token }, který by odpovídal zdejšímu tokenu {.", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "K vlastnosti {0} se nedá přistupovat v typu {1} v této třídě, protože ho překrývá jiný privátní identifikátor se stejným zápisem.", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "Návratový typ konstruktoru elementu JSX musí vracet objektový typ.", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "Návratový typ funkce dekorátoru parametru funkce musí být void nebo any.", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "Návratový typ funkce dekorátoru vlastnosti musí být void nebo any.", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "Návratový typ asynchronní funkce musí být buď platný příslib, nebo nesmí obsahovat člen then, který se dá volat.", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "Návratový typ asynchronní funkce nebo metody musí být globální typ Promise.", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "Pravá strana příkazu for...in musí být typu any, typem objektu nebo parametrem typu, ale tady má typ {0}.", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "Pravá strana aritmetické operace musí mít typ any, number nebo být typu výčtu.", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "Pravá strana aritmetické operace musí mít typ any, number, bigint nebo být typu výčtu.", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "Pravá strana výrazu in musí být typu any, objektového typu nebo parametrem typu.", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "Pravá strana výrazu instanceof musí mít typ any nebo typ, který se dá přiřadit k typu rozhraní Function.", + "The_shadowing_declaration_of_0_is_defined_here_18017": "Překrývající se deklarace {0} je definovaná tady.", "The_specified_path_does_not_exist_Colon_0_5058": "Zadaná cesta neexistuje: {0}", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "Cíl přiřazení musí být proměnná nebo přístup k vlastnosti.", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "Cíl přiřazení rest objektu nemůže představovat přístup k nepovinné vlastnosti.", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "Cílem přiřazení zbytku objektu musí být proměnná nebo přístup k vlastnosti.", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "Kontext this typu {0} se nedá přiřadit k možnosti this metody typu {1}.", "The_this_types_of_each_signature_are_incompatible_2685": "Typy this jednotlivých signatur nejsou kompatibilní.", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "Typ {0} je readonly a nedá se přiřadit k neměnnému typu {1}.", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "Argument typu pro parametr typu {0} se nemůže odvozovat z využití. Argumenty typu ale můžete zadat explicitně.", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "Typ vrácený metodou next() asynchronního iterátoru musí být příslib pro typ s vlastností value.", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "Typ vrácený metodou next() iterátoru musí obsahovat vlastnost value.", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "Typ deklarace funkce musí odpovídat její signatuře.", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "Typ vrácený metodou {0}() asynchronního iterátoru musí být příslib pro typ s vlastností value.", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "Typ vrácený metodou {0}() iterátoru musí obsahovat vlastnost value.", + "The_types_of_0_are_incompatible_between_these_types_2200": "Typy {0} nejsou mezi těmito typy kompatibilní.", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "Typy vrácené metodou {0} nejsou mezi těmito typy kompatibilní.", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "Deklarace proměnné příkazu for...in nemůže obsahovat inicializátor.", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "Deklarace proměnné příkazu for...of nemůže obsahovat inicializátor.", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "Příkaz with není podporovaný. Všechny symboly s blokem with budou typu any.", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "Vlastnost {0} této značky JSX očekává jeden podřízený objekt typu {1}, ale poskytlo se jich více.", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "Vlastnost {0} této značky JSX očekává typ {1}, který vyžaduje více podřízených objektů, ale zadal se jen jeden.", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "Tato podmínka vždy vrátí {0}, protože typy {1} a {2} se nijak nepřekrývají.", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "Tato podmínka vždy vrátí true, protože funkce je vždy definovaná. Nechtěli jste ji spíše zavolat?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "Tato funkce konstruktoru se může převést na deklaraci třídy.", + "This_expression_is_not_callable_2349": "Tento výraz se nedá zavolat.", + "This_expression_is_not_constructable_2351": "Tento výraz se nedá vytvořit.", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "Tento import se nikdy nepoužívá jako hodnota a musí používat import type, protože importsNotUsedAsValues je nastavené na error.", + "This_may_be_converted_to_an_async_function_80006": "Toto je možné převést na asynchronní funkci.", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "Na tento modul je možné se pomocí importů nebo exportů ECMAScript odkazovat jen tak, že se zapne příznak {0} a odkáže se na výchozí export.", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "Tento modul se deklaroval pomocí export =, a když se používá příznak {0}, dá se použít jen s výchozím importem.", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "Tato signatura přetížení není kompatibilní se signaturou implementace.", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "Tento parametr se nepodporuje s direktivou use strict.", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Tato syntaxe vyžaduje importovanou podpůrnou aplikaci, ale modul {0} se nenašel.", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "Tato syntaxe vyžaduje importovanou podpůrnou aplikaci s názvem {1}, ale modul {0} nemá žádného exportovaného člena {1}.", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "Tato syntaxe vyžaduje importovanou pomocnou rutinu s názvem {1}, která v {0} neexistuje. Zvažte možnost upgradovat verzi {0}.", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "Výrazy await nejvyšší úrovně se povolují jen v případě, že možnost module je nastavená na esnext nebo system a možnost target je nastavená na es2017 nebo vyšší.", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Deklarace nejvyšší úrovně v souborech .d.ts musí začínat modifikátorem declare, nebo export.", "Trailing_comma_not_allowed_1009": "Čárka na konci není povolená.", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Transpiluje každý soubor jako samostatný modul (podobné jako ts.transpileModule).", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Vyzkoušejte deklaraci `npm install @types/{0}`, pokud existuje, nebo přidejte nový soubor deklarací (.d.ts) s deklarací `declare module '{0}';`.", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Vyzkoušejte deklaraci npm install @types/{1}, pokud existuje, nebo přidejte nový soubor deklarací (.d.ts) s deklarací declare module '{0}';.", "Trying_other_entries_in_rootDirs_6110": "Zkoušejí se další položky v rootDirs.", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "Zkouší se nahrazení {0}, umístění modulu kandidáta: {1}.", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "Typ řazené kolekce členů {0} o délce {1} se nedá přiřadit k řazené kolekci členů o délce {2}.", - "Type_0_cannot_be_converted_to_type_1_2352": "Typ {0} se nedá převést na typ {1}.", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "Typ řazené kolekce členů {0} délky {1} nemá na indexu {2} žádný prvek.", + "Tuple_type_arguments_circularly_reference_themselves_4110": "Argumenty typů řazené kolekce členů cyklicky odkazují samy na sebe.", "Type_0_cannot_be_used_as_an_index_type_2538": "Typ {0} se nedá použít jako typ indexu.", "Type_0_cannot_be_used_to_index_type_1_2536": "Typ {0} nejde použít k indexování typu {1}.", "Type_0_does_not_satisfy_the_constraint_1_2344": "Typ {0} nevyhovuje omezení {1}.", + "Type_0_has_no_call_signatures_2757": "Typ {0} nemá žádné signatury volání.", + "Type_0_has_no_construct_signatures_2761": "Typ {0} nemá žádné signatury konstruktu.", "Type_0_has_no_matching_index_signature_for_type_1_2537": "Typ {0} nemá odpovídající signaturu indexu pro typ {1}.", "Type_0_has_no_properties_in_common_with_type_1_2559": "Typ {0} nemá žádné vlastnosti společné s typem {1}.", - "Type_0_has_no_property_1_2460": "V typu {0} není žádná vlastnost {1}.", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "V typu {0} není žádná vlastnost {1} ani žádná signatura indexu řetězce.", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "V typu {0} chybí následující vlastnosti z typu {1}: {2}", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "V typu {0} chybí následující vlastnosti z typu {1}: {2} a ještě {3}", "Type_0_is_not_a_constructor_function_type_2507": "Typ {0} není typ funkce konstruktoru.", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "Typ {0} nepředstavuje platný návratový typ asynchronní funkce v ES5/ES3, protože neodkazuje na hodnotu konstruktoru kompatibilní s příslibem.", "Type_0_is_not_an_array_type_2461": "Typ {0} není typ pole.", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "Typ {0} není typem pole. Pokud chcete povolit iteraci iterátorů, použijte možnost kompilátoru --downlevelIteration.", "Type_0_is_not_an_array_type_or_a_string_type_2495": "Typ {0} není typem pole nebo řetězce.", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "Typ {0} není typem pole ani typem řetězce. Pokud chcete povolit iteraci iterátorů, použijte možnost kompilátoru --downlevelIteration.", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "Typ {0} není typem pole nebo řetězce, nebo nemá metodu [Symbol.iterator](), která vrací iterátor.", @@ -926,17 +1163,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "Typ {0} odkazuje rekurzivně sám na sebe jako na základní typ.", "Type_alias_0_circularly_references_itself_2456": "Alias typu {0} odkazuje cyklicky sám na sebe.", "Type_alias_name_cannot_be_0_2457": "Název aliasu typu nemůže být {0}.", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "Aliasy typů se dají používat jen v typescriptových souborech.", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "V deklaraci konstruktoru se nemůže objevit anotace typu.", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "Anotace typů se dají používat jen v typescriptových souborech.", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "Kandidát na argument typu {1} není platným argumentem typu, protože není nadtypem kandidáta {0}.", "Type_argument_expected_1140": "Očekává se argument typu.", "Type_argument_list_cannot_be_empty_1099": "Seznam argumentů typu nemůže být prázdný.", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "Argumenty typů se dají používat jen v typescriptových souborech.", "Type_arguments_cannot_be_used_here_1342": "Argumenty typu tady nejde použít.", + "Type_arguments_for_0_circularly_reference_themselves_4109": "Argumenty typů pro {0} se cyklicky odkazují samy na sebe.", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "Kontrolní výrazy typů se dají používat jen v typescriptových souborech.", "Type_declaration_files_to_be_included_in_compilation_6124": "Soubory deklarace typu, které se mají zahrnout do kompilace", "Type_expected_1110": "Očekával se typ.", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "Vytvoření instance typu je příliš hluboké a může být nekonečné.", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "Typ se přímo nebo nepřímo odkazuje ve zpětném volání jeho vlastní metody then při splnění.", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "Typ operandu await musí být buď platný příslib, nebo nesmí obsahovat člen then, který se dá volat.", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "Typ hodnoty počítané vlastnosti je {0} a nedá se přiřadit do typu {1}.", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "Typ iterovaných elementů yield* musí být buď platný příslib, nebo nesmí obsahovat člen then, který se dá volat.", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "Typ operandu yield v asynchronním generátoru musí být buď platný příslib, nebo nesmí obsahovat člen then, který se dá volat.", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "Typ pochází z tohoto importu. Import stylu oboru názvů není možné zavolat ani vytvořit a při běhu způsobí chybu. Zvažte možnost použít tady místo toho výchozí import nebo požadavek na import.", "Type_parameter_0_has_a_circular_constraint_2313": "Parametr typu {0} má cyklické omezení.", "Type_parameter_0_has_a_circular_default_2716": "Parametr typu {0} má cyklickou výchozí hodnotu.", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "Parametr typu {0} signatury volání z exportovaného rozhraní má nebo používá privátní název {1}.", @@ -944,17 +1189,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "Parametr typu {0} exportované třídy má nebo používá privátní název {1}.", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "Parametr typu {0} exportované funkce má nebo používá privátní název {1}.", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "Parametr typu {0} exportovaného rozhraní má nebo používá privátní název {1}.", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "Parametr typu {0} exportovaného typu namapovaného objektu typu má nebo používá privátní název {1}.", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "Parametr typu {0} exportovaného aliasu typu má nebo používá privátní název {1}.", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "Parametr typu {0} metody z exportovaného rozhraní má nebo používá privátní název {1}.", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "Parametr typu {0} veřejné metody z exportované třídy má nebo používá privátní název {1}.", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "Parametr typu {0} veřejné statické metody z exportované třídy má nebo používá privátní název {1}.", "Type_parameter_declaration_expected_1139": "Očekává se deklarace parametru typu.", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "Deklarace parametrů typů se dají používat jen v typescriptových souborech.", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "Výchozí parametry typů se můžou odkazovat jen na dříve deklarované parametry typů.", "Type_parameter_list_cannot_be_empty_1098": "Seznam parametrů typu nemůže být prázdný.", "Type_parameter_name_cannot_be_0_2368": "Název parametru typu nemůže být {0}.", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "Parametry typu se nemůžou vyskytovat v deklaraci konstruktoru.", "Type_predicate_0_is_not_assignable_to_1_1226": "Predikát typu {0} nejde přiřadit {1}.", "Type_reference_directive_0_was_not_resolved_6120": "======== Direktiva odkazu na typ {0} se nepřeložila. ========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== Direktiva odkazu na typ {0} se úspěšně přeložila na {1}, primární: {2}. ========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== Direktiva odkazu na typ {0} se úspěšně přeložila na {1} s ID balíčku {2}, primární: {3}. ========", "Types_have_separate_declarations_of_a_private_property_0_2442": "Typy mají samostatné deklarace privátní vlastnosti {0}.", "Types_of_parameters_0_and_1_are_incompatible_2328": "Typy parametrů {0} a {1} jsou nekompatibilní.", "Types_of_property_0_are_incompatible_2326": "Typy vlastnosti {0} nejsou kompatibilní.", @@ -967,10 +1216,18 @@ "Unexpected_token_1012": "Neočekávaný token", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "Neočekávaný token. Očekával se konstruktor, metoda, přístupový objekt nebo vlastnost.", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "Neočekávaný token. Očekával se název parametru typu bez složených závorek.", + "Unexpected_token_Did_you_mean_or_gt_1382": "Neočekávaný token. Měli jste na mysli {'>'} nebo >?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "Neočekávaný token. Měli jste na mysli {'}'} nebo }?", "Unexpected_token_expected_1179": "Neočekávaný token. Očekává se znak {.", + "Unknown_build_option_0_5072": "Neznámá možnost sestavení {0}", + "Unknown_build_option_0_Did_you_mean_1_5077": "Neznámá možnost sestavení {0}. Měli jste na mysli {1}?", "Unknown_compiler_option_0_5023": "Neznámá možnost kompilátoru {0}", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "Neznámá možnost kompilátoru {0}. Měli jste na mysli {1}?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "Neznámá možnost excludes. Měli jste na mysli exclude?", "Unknown_type_acquisition_option_0_17010": "Neznámá možnost získání typu {0}", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "Neznámá možnost získání typu {0}. Měli jste na mysli {1}?", + "Unknown_watch_option_0_5078": "Neznámá možnost sledování {0}", + "Unknown_watch_option_0_Did_you_mean_1_5079": "Neznámá možnost sledování {0}. Měli jste na mysli {1}?", "Unreachable_code_detected_7027": "Zjistil se nedosažitelný kód.", "Unsupported_locale_0_6049": "Nepodporované národní prostředí {0}", "Unterminated_Unicode_escape_sequence_1199": "Neukončená řídicí sekvence Unicode", @@ -980,34 +1237,52 @@ "Unterminated_template_literal_1160": "Neukončený literál šablony", "Untyped_function_calls_may_not_accept_type_arguments_2347": "Volání netypové funkce nemusí přijmout argumenty typu.", "Unused_label_7028": "Nepoužívaný popisek", + "Updating_output_of_project_0_6373": "Aktualizuje se výstup projektu {0}...", "Updating_output_timestamps_of_project_0_6359": "Aktualizují se výstupní časová razítka projektu {0}...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "Aktualizují se nezměněná výstupní časová razítka projektu {0}...", "Use_synthetic_default_member_95016": "Použije syntetického výchozího člena.", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "Použití řetězce v příkazu for...of se podporuje jenom v ECMAScript 5 nebo vyšší verzi.", + "Using_compiler_options_of_project_reference_redirect_0_6215": "Používají se možnosti kompilátoru přesměrování odkazu projektu {0}.", "VERSION_6036": "VERZE", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "Hodnota typu {0} nemá žádné vlastnosti společné s typem {1}. Chtěli jste ji volat?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "Hodnota typu {0} se nedá volat. Nechtěli jste zahrnout new?", "Variable_0_implicitly_has_an_1_type_7005": "Proměnná {0} má implicitně typ {1}.", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "Proměnná {0} má implicitně typ {1}, ale je možné, že lepší typ by se vyvodil z využití.", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "Proměnná {0} má na některých místech implicitně typ {1}, ale je možné, že lepší typ by se vyvodil z využití.", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "V některých umístěních, kde se nedá určit typ proměnné, má proměnná {0} implicitně typ {1}.", "Variable_0_is_used_before_being_assigned_2454": "Proměnná {0} je použitá před přiřazením.", "Variable_declaration_expected_1134": "Očekává se deklarace proměnné.", "Variable_declaration_list_cannot_be_empty_1123": "Seznam deklarací proměnných nemůže být prázdný.", "Version_0_6029": "Verze {0}", "Watch_input_files_6005": "Sledovat vstupní soubory", + "Watch_option_0_requires_a_value_of_type_1_5080": "Možnost sledování {0} vyžaduje hodnotu typu {1}.", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "Určuje, jestli se místo vymazání obrazovky má zachovat zastaralý výstup konzoly v režimu sledování.", + "Wrap_invalid_character_in_an_expression_container_95101": "Zabalit neplatný znak do kontejneru výrazu", + "You_cannot_rename_a_module_via_a_global_import_8031": "Přes globální import se modul nedá přejmenovat.", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "Nejde přejmenovat elementy definované ve standardní knihovně TypeScriptu.", "You_cannot_rename_this_element_8000": "Tento element nejde přejmenovat.", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "Objekt {0} přijímá málo argumentů k tomu, aby se dal použít jako dekoratér. Nechtěli jste ho nejprve volat a napsat @{0}()?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "Operace {0} a {1} se nedají kombinovat bez závorek.", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "Položka {0} je zadána dvakrát. Atribut s názvem {0} se přepíše.", - "_0_can_only_be_used_in_a_ts_file_8009": "{0} se dá použít jenom v souboru .ts.", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "{0} se nedá používat jako hodnota, protože se exportovalo pomocí export type.", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "{0} se nedá používat jako hodnota, protože se importovalo pomocí import type.", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "Komponenty {0} nepřijímají text jako podřízené prvky. Text v JSX má typ string, ale očekávaný typ {1} je {2}.", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "Deklarace {0} se dají používat jen v typescriptových souborech.", "_0_expected_1005": "Očekával se: {0}.", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "{0} má implicitně návratový typ {1}, ale je možné, že lepší typ by se vyvodil z využití.", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "{0} obsahuje implicitně návratový typ any, protože neobsahuje anotaci návratového typu a přímo nebo nepřímo se odkazuje v jednom ze svých návratových výrazů.", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "{0} má implicitně typ any, protože nemá anotaci typu a odkazuje se přímo nebo nepřímo v jeho vlastním inicializátoru.", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "{0} je primitivum, ale {1} je obálkový objekt. Pokud je to možné, použijte raději {0}.", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "{0} se dá přiřadit k omezení typu {1}, ale pro {1} se dala vytvořit instance s jiným podtypem omezení {2}.", "_0_is_declared_but_its_value_is_never_read_6133": "Deklaruje se {0}, ale jeho hodnota se vůbec nečte.", "_0_is_declared_but_never_used_6196": "{0} se nadeklarovalo, ale nepoužilo.", + "_0_is_declared_here_2728": "{0} je deklarované tady.", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "{0} je definované jako vlastnost ve třídě {1}, ale v {2} se tady přepisuje jako přístupový objekt.", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "{0} je definované jako přístupový objekt ve třídě {1}, ale v {2} se tady přepisuje jako vlastnost instance.", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "{0} není platnou metavlastností pro klíčové slovo {1}. Měli jste na mysli {2}?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "Na {0} se přímo nebo nepřímo odkazuje ve vlastním základním výrazu.", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "Na {0} se odkazuje přímo nebo nepřímo v jeho vlastní anotaci typu.", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "{0} se zadalo více než jednou, proto se toto použití přepíše.", "_0_list_cannot_be_empty_1097": "Seznam {0} nemůže být prázdný.", "_0_modifier_already_seen_1030": "Modifikátor {0} se už jednou vyskytl.", "_0_modifier_cannot_appear_on_a_class_element_1031": "Modifikátor {0} se nemůže objevit v elementu třídy.", @@ -1021,17 +1296,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "Modifikátor {0} nejde použít v ambientním kontextu.", "_0_modifier_cannot_be_used_with_1_modifier_1243": "Modifikátor {0} nejde použít s modifikátorem {1}.", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "Modifikátor {0} nejde použít s deklarací třídy.", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "Modifikátor {0} se nedá použít s privátním identifikátorem.", "_0_modifier_must_precede_1_modifier_1029": "Modifikátor {0} se musí vyskytovat před modifikátorem {1}.", + "_0_needs_an_explicit_type_annotation_2782": "{0} vyžaduje explicitní anotaci typu.", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "{0} jenom odkazuje na typ, ale tady se používá jako obor názvů.", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "{0} odkazuje jenom na typ, ale používá se tady jako hodnota.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "{0} se odkazuje jen na typ, ale používá se tady jako hodnota. Potřebujete změnit svou cílovou knihovnu? Zkuste změnit možnost kompilátoru lib na es2015 nebo novější.", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "{0} odkazuje na globální UMD, ale aktuální soubor je modul. Zvažte raději přidání importu.", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "{0} odkazuje na hodnotu, ale tady se používá jako typ.", "_0_tag_already_specified_1223": "Značka {0} se už specifikovala.", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "Značku {0} nejde používat nezávisle jako značku JSDoc nejvyšší úrovně.", + "_0_was_also_declared_here_6203": "{0} se deklarovalo i tady.", + "_0_was_exported_here_1377": "{0} se exportovalo tady.", + "_0_was_imported_here_1376": "{0} se importovalo tady.", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "{0} s chybějící anotací návratového typu má implicitně návratový typ {1}.", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "{0} s chybějící anotací návratového typu má implicitně typ yield {1}.", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "Modifikátor abstract se může objevit jenom v deklaraci třídy, metody nebo vlastnosti.", - "await_expression_is_only_allowed_within_an_async_function_1308": "Výraz await se povoluje jenom ve funkci async.", + "and_here_6204": "a tady.", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "Výrazy await se tady povolují jen na nejvyšší úrovni souboru, když je daný soubor modul, ale tento soubor nemá žádné importy ani exporty. Zvažte možnost přidat export {}, aby se tento soubor převedl na modul.", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "Výrazy await se povolují jen v asynchronních funkcích na nejvyšší úrovni modulů.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "Výrazy await nejdou použít v inicializátoru parametru.", + "await_has_no_effect_on_the_type_of_this_expression_80007": "Výraz await nemá žádný vliv na typ tohoto výrazu.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "Možnost baseUrl je nastavená na {0}, pomocí této hodnoty se přeloží název modulu {1}, který není relativní.", + "can_only_be_used_at_the_start_of_a_file_18026": "#! se dá použít jen na začátku souboru.", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "= jde použít jenom ve vlastnosti literálu objektu uvnitř destrukturujícího přiřazení.", "case_or_default_expected_1130": "Očekává se case nebo default.", "class_expressions_are_not_currently_supported_9003": "Výrazy class se v současnosti nepodporují.", @@ -1039,11 +1326,12 @@ "const_declarations_must_be_initialized_1155": "Deklarace const se musejí inicializovat.", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "Inicializátor člena výčtu const se vyhodnotil na nekonečnou hodnotu.", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "Inicializátor člena výčtu const se vyhodnotil na nepovolenou hodnotu NaN.", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "Inicializátory členů konstantního výčtu můžou obsahovat jen hodnoty literálů a další vypočítané hodnoty výčtu.", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "Výčty const se dají použít jenom ve výrazech přístupu k vlastnosti nebo indexu nebo na pravé straně deklarace importu, přiřazení exportu nebo dotazu na typ.", + "constructor_is_a_reserved_word_18012": "#constructor je rezervované slovo.", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "Příkaz delete nejde volat u identifikátoru ve striktním režimu.", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "odstranit toto – projekt {0} je aktuální, protože byl sestaven dříve", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "Deklarace enum se dají použít jen v souboru .ts.", - "export_can_only_be_used_in_a_ts_file_8003": "Možnost export= se dá použít jenom v souboru .ts.", + "export_can_only_be_used_in_TypeScript_files_8003": "export = se dá používat jen v typescriptových souborech.", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "Modifikátor export se nedá použít u ambientních modulů a rozšíření modulů, protože jsou vždy viditelné.", "extends_clause_already_seen_1172": "Klauzule extends se už jednou vyskytla.", "extends_clause_must_precede_implements_clause_1173": "Klauzule extends se musí vyskytovat před klauzulí implements.", @@ -1053,23 +1341,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "Přístupové objekty get a set musí mít stejný typ this.", "get_and_set_accessor_must_have_the_same_type_2380": "Přístupový objekt get a set musí obsahovat stejný typ.", "implements_clause_already_seen_1175": "Klauzule implements se už jednou vyskytla.", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "Klauzule implements se dají použít jenom v souboru .ts.", - "import_can_only_be_used_in_a_ts_file_8002": "Možnost import ... = se dá použít jenom v souboru .ts.", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "Klauzule implements se dají používat jen v typescriptových souborech.", + "import_can_only_be_used_in_TypeScript_files_8002": "import = se dá používat jen v typescriptových souborech.", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "Deklarace infer jsou povolené jenom v klauzuli extends podmíněného typu.", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "Deklarace rozhraní se dají použít jenom v souboru .ts.", "let_declarations_can_only_be_declared_inside_a_block_1157": "Deklarace let je možné deklarovat jenom uvnitř bloku.", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "Nepovoluje se používat let jako název v deklaracích let nebo const.", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "Deklarace modulů se dají použít jenom v souboru .ts.", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "Pole nejde vytvořit příkazem new T[]. Použijte syntaxi new Array().", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "Výraz new s chybějící signaturou konstruktoru v cíli má implicitně typ any.", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "Kontrolní výrazy nenabývající hodnoty null lze použít jen v souboru .ts.", "options_6024": "možnosti", "or_expected_1144": "Očekává se znak { nebo ;.", "package_json_does_not_have_a_0_field_6100": "Soubor package.json neobsahuje pole {0}.", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "package.json nemá položku typesVersions, která by odpovídala verzi {0}.", + "package_json_had_a_falsy_0_field_6220": "Soubor package.json obsahoval neplatné pole {0}.", "package_json_has_0_field_1_that_references_2_6101": "Soubor package.json má pole {0} {1}, které odkazuje na {2}.", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "Modifikátory parametrů se dají použít jenom v souboru .ts.", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "package.json má položku typesVersions {0}, která není platný rozsah semver.", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "package.json má položku typesVersions {0}, která odpovídá verzi kompilátoru {1}. Hledá se vzor, který bude odpovídat názvu modulu {2}.", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "package.json má pole typesVersions s mapováními cesty specifickými pro verzi.", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "Je zadaná možnost paths, hledá se vzor, který odpovídá názvu modulu {0}.", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "Modifikátor readonly se může objevit jenom v deklaraci vlastnosti nebo signatuře indexu.", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "Modifikátor typu readonly se povoluje jen pro typy literálů pole a řazené kolekce členů.", "require_call_may_be_converted_to_an_import_80005": "Volání require se dá převést na import.", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "Je nastavená možnost rootDirs, použije se k překladu relativního názvu modulu {0}.", "super_can_only_be_referenced_in_a_derived_class_2335": "Na vlastnost super se dá odkazovat jenom v odvozené třídě.", @@ -1077,6 +1366,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "Na vlastnost super se nedá odkazovat v názvu počítané vlastnosti.", "super_cannot_be_referenced_in_constructor_arguments_2336": "Na vlastnost super se nedá odkazovat v argumentech konstruktoru.", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "Možnost super je povolená jenom ve členech výrazů literálu objektu, pokud je možnost target ES2015 nebo vyšší.", + "super_may_not_use_type_arguments_2754": "super nemůže používat argumenty typů.", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "Před přístupem k vlastnosti super v konstruktoru odvozené třídy se musí zavolat super.", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "Možnost super se musí volat před přístupem k this v konstruktoru odvozené třídy.", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "Po vlastnosti super musí následovat seznam argumentů nebo přístup ke členu.", @@ -1087,14 +1377,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "Na vlastnost this se nedá odkazovat v argumentech konstruktoru.", "this_cannot_be_referenced_in_current_location_2332": "Na vlastnost this se nedá odkazovat v aktuálním umístění.", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "Možnost this má implicitně typ any, protože nemá anotaci typu.", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "Aliasy typu se dají použít jenom v souboru .ts.", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "Argumenty typu se dají použít jenom v souboru .ts.", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "Výrazy potvrzení typu se dají použít jenom v souboru .ts.", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "Deklarace parametru typu se dají použít jenom v souboru .ts.", - "types_can_only_be_used_in_a_ts_file_8010": "Typy se dají použít jenom v souboru .ts.", "unique_symbol_types_are_not_allowed_here_1335": "Typy unique symbol tady nejsou povolené.", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "Typy unique symbol jsou povolené jen u proměnných v příkazu proměnné.", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "Typy unique symbol nejde použít v deklaraci proměnné s názvem vazby.", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "Direktiva use strict se nedá použít se seznamem parametrů, které nejsou jednoduché.", + "use_strict_directive_used_here_1349": "Direktiva use strict se použila tady.", "with_statements_are_not_allowed_in_an_async_function_block_1300": "Příkazy with se ve funkčním bloku async nepovolují.", "with_statements_are_not_allowed_in_strict_mode_1101": "Příkazy with se ve striktním režimu nepovolují.", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "Výrazy yield nejde použít v inicializátoru parametru." diff --git a/lib/de/diagnosticMessages.generated.json b/lib/de/diagnosticMessages.generated.json index d010e95033962..8cce2d70bbd8c 100644 --- a/lib/de/diagnosticMessages.generated.json +++ b/lib/de/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "Ein Modifizierer \"{0}\" darf nicht mit einer Importdeklaration verwendet werden.", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "Ein Modifizierer \"{0}\" darf nicht mit einer Schnittstellendeklaration verwendet werden.", "A_0_parameter_must_be_the_first_parameter_2680": "Ein \"{0}\"-Parameter muss der erste Parameter sein.", + "A_bigint_literal_cannot_use_exponential_notation_1352": "A bigint literal cannot use exponential notation.", + "A_bigint_literal_must_be_an_integer_1353": "A bigint literal must be an integer.", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "Ein Bindungsmusterparameter darf in einer Implementierungssignatur nicht optional sein.", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "Eine break-Anweisung darf nur in einer einschließenden iteration- oder switch-Anweisung verwendet werden.", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "Eine break-Anweisung kann nur zu einer Bezeichnung einer einschließenden Anweisung springen.", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "Eine Klasse kann nur einen Bezeichner/\"qualified-name\" mit optionalen Typargumenten implementieren.", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "A class can only implement an object type or intersection of object types with statically known members.", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "Eine Klassendeklaration ohne den default-Modifizierer muss einen Namen besitzen.", "A_class_may_only_extend_another_class_2311": "Eine Klasse kann nur eine andere Klasse erweitern.", - "A_class_may_only_implement_another_class_or_interface_2422": "Eine Klasse kann nur eine andere Klasse oder Schnittstelle implementieren.", "A_class_member_cannot_have_the_0_keyword_1248": "Ein Klassenmember darf nicht das Schlüsselwort \"{0}\" aufweisen.", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "Ein Kommaausdruck ist in einem berechneten Eigenschaftennamen unzulässig.", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "Ein berechneter Eigenschaftenname kann nicht aus seinem enthaltenden Typ auf einen Typparameter verweisen.", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "Ein berechneter Eigenschaftenname in einer Schnittstelle muss auf einen Ausdruck verweisen, dessen Typ ein Literal oder ein \"unique symbol\"-Typ ist.", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "Ein berechneter Eigenschaftenname muss vom Typ \"string\", \"number\", \"symbol\" oder \"any\" sein.", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "Ein berechneter Eigenschaftenname in der Form \"{0}\" muss vom Typ \"symbol\" sein.", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals.", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "Auf einen const-Enumerationsmember kann nur mithilfe eines Zeichenfolgenliterals zugegriffen werden.", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "Bei einem const-Initialisierer in einem Umgebungskontext muss es sich um eine Zeichenfolge oder um ein numerisches Literal handeln.", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "Ein Konstruktor darf keinen super-Aufruf enthalten, wenn seine Klasse \"null\" erweitert.", "A_constructor_cannot_have_a_this_parameter_2681": "Ein Konstruktor darf keinen \"this\"-Parameter aufweisen.", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "Eine continue-Anweisung darf nur in einer einschließenden iteration-Anweisung verwendet werden.", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "Eine continue-Anweisung kann nur zu einer Bezeichnung einer einschließenden Iterationsanweisung springen.", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "Ein declare-Modifizierer darf nicht in einem Kontext verwendet werden, der bereits ein Umgebungskontext ist.", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": "Ein declare-Modifizierer ist für eine Deklaration auf oberster Ebene in einer .d.ts-Datei erforderlich.", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "Ein Decorator-Element kann nur für eine Methodenimplementierung und nicht für eine Überladung verwendet werden.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "Eine default-Klausel darf nicht mehrmals in einer switch-Anweisung auftreten.", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "Ein Standardexport kann nur in einem Modul des Typs ECMAScript verwendet werden.", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "Ein Generator darf keine void-Typanmerkung aufweisen.", "A_get_accessor_cannot_have_parameters_1054": "Eine get-Zugriffsmethode darf keine Parameter haben.", "A_get_accessor_must_return_a_value_2378": "Eine get-Zugriffsmethode muss einen Wert zurückgeben.", + "A_label_is_not_allowed_here_1344": "'A label is not allowed here.", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Ein Memberinitialisierer in einer Enumerationsdeklaration darf nicht auf Member verweisen, die anschließend deklariert werden (einschließlich Member, die in anderen Enumerationen definiert sind).", + "A_method_cannot_be_named_with_a_private_identifier_18022": "A method cannot be named with a private identifier.", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Eine Mixin-Klasse benötigt einen Konstruktor mit einem einzelnen REST-Parameter des Typs \"any[]\".", "A_module_cannot_have_multiple_default_exports_2528": "Ein Modul darf nicht mehrere Standardexporte aufweisen.", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Eine Namespacedeklaration darf sich nicht in einer anderen Datei als die Klasse oder Funktion befinden, mit der sie zusammengeführt wird.", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Eine Namespacedeklaration darf nicht vor der Klasse oder Funktion positioniert werden, mit der sie zusammengeführt wird.", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "Eine Namespacedeklaration ist nur in einem Namespace oder Modul zulässig.", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "Ein Import im Namespacestil kann nicht aufgerufen oder erstellt werden und verursacht zur Laufzeit einen Fehler.", "A_non_dry_build_would_build_project_0_6357": "Bei einem Build ohne das Flag \"-dry\" würde das Projekt \"{0}\" erstellt.", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Bei einem Build ohne das Flag \"-dry\" würden die folgenden Dateien gelöscht: {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "A non-dry build would update output of project '{0}'", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "A non-dry build would update timestamps for output of project '{0}'", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "Ein Parameterinitialisierer ist nur in einer Funktions- oder Konstruktorimplementierung zulässig.", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "Eine Parametereigenschaft darf nicht mithilfe eines rest-Parameters deklariert werden.", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "Eine Parametereigenschaft ist nur in einer Konstruktorimplementierung zulässig.", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "Ein Zusage muss eine \"then\"-Methode aufweisen.", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "Eine Eigenschaft einer Klasse, deren Typ ein \"unique symbol\"-Typ ist, muss sowohl \"static\" als auch \"readonly\" sein.", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "Eine Eigenschaft einer Schnittstelle oder eines Typliterals, deren Typ ein \"unique symbol\"-Typ ist, muss \"readonly\" sein.", + "A_required_element_cannot_follow_an_optional_element_1257": "A required element cannot follow an optional element.", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "Ein erforderlicher Parameter darf nicht auf einen optionalen Parameter folgen.", "A_rest_element_cannot_contain_a_binding_pattern_2501": "Ein rest-Element darf kein Bindungsmuster enthalten.", "A_rest_element_cannot_have_a_property_name_2566": "Ein rest-Element darf keinen Eigenschaftennamen aufweisen.", "A_rest_element_cannot_have_an_initializer_1186": "Ein rest-Element darf keinen Initialisierer aufweisen.", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "Ein rest-Element muss das letzte Element in einem Destrukturierungsmuster sein.", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "A rest element must be last in a tuple type.", + "A_rest_element_type_must_be_an_array_type_2574": "A rest element type must be an array type.", "A_rest_parameter_cannot_be_optional_1047": "Ein rest-Parameter darf nicht optional sein.", "A_rest_parameter_cannot_have_an_initializer_1048": "Ein rest-Parameter darf keinen Initialisierer aufweisen.", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "Ein rest-Parameter muss in einer Parameterliste der letzte Eintrag sein.", @@ -81,9 +89,9 @@ "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "Ein auf \"this\" basierender Typwächter ist nicht mit einem parameterbasierten Typwächter kompatibel.", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "Ein this-Typ ist nur in einem nicht statischen Member einer Klasse oder Schnittstelle verfügbar.", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "Eine Datei \"tsconfig.json\" ist bereits definiert unter: \"{0}\".", - "A_tuple_type_element_list_cannot_be_empty_1122": "Eine Tupeltyp-Elementliste darf nicht leer sein.", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "Typassertionsausdrücke sind in der linken Seite von Potenzierungsausdrücken nicht zulässig. Erwägen Sie, den Ausdruck in Klammern zu setzen.", "A_type_literal_property_cannot_have_an_initializer_1247": "Typliteraleigenschaften können keinen Initialisierer aufweisen.", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "A type-only import can specify a default import or named bindings, but not both.", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "Ein Typprädikat darf nicht auf einen rest-Parameter verweisen.", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "Ein Typprädikat darf nicht auf ein Element \"{0}\" in einem Bindungsmuster verweisen.", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "Ein Typprädikat ist nur an der Rückgabetypposition für Funktionen und Methoden zulässig.", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "\"{0}\" der vorhandenen Importdeklaration aus \"{1}\" hinzufügen", "Add_0_to_unresolved_variable_90008": "Der nicht aufgelösten Variablen \"{0}.\" hinzufügen", "Add_all_missing_async_modifiers_95041": "Alle fehlenden async-Modifizierer hinzufügen", + "Add_all_missing_imports_95064": "Add all missing imports", "Add_all_missing_members_95022": "Alle fehlenden Member hinzufügen", "Add_all_missing_super_calls_95039": "Alle fehlenden super-Aufrufe hinzufügen", "Add_async_modifier_to_containing_function_90029": "Async-Modifizierer zur enthaltenden Funktion hinzufügen", + "Add_await_95083": "Add 'await'", + "Add_await_to_initializer_for_0_95084": "Add 'await' to initializer for '{0}'", + "Add_await_to_initializers_95089": "Add 'await' to initializers", "Add_braces_to_arrow_function_95059": "Geschweifte Klammern zu Pfeilfunktion hinzufügen", + "Add_const_to_all_unresolved_variables_95082": "Add 'const' to all unresolved variables", + "Add_const_to_unresolved_variable_95081": "Add 'const' to unresolved variable", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "Add default import '{0}' to existing import declaration from \"{1}\"", "Add_definite_assignment_assertion_to_property_0_95020": "Definitive Zuweisungsassertion zu Eigenschaft \"{0}\" hinzufügen", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "Allen nicht initialisierten Eigenschaften definitive Zuweisungsassertionen hinzufügen", + "Add_export_to_make_this_file_into_a_module_95097": "Add 'export {}' to make this file into a module", "Add_index_signature_for_property_0_90017": "Indexsignatur für die Eigenschaft \"{0}\" hinzufügen", "Add_initializer_to_property_0_95019": "Initialisierer zu Eigenschaft \"{0}\" hinzufügen", "Add_initializers_to_all_uninitialized_properties_95027": "Allen nicht initialisierten Eigenschaften Initialisierer hinzufügen", + "Add_missing_enum_member_0_95063": "Add missing enum member '{0}'", + "Add_missing_new_operator_to_all_calls_95072": "Add missing 'new' operator to all calls", + "Add_missing_new_operator_to_call_95071": "Add missing 'new' operator to call", "Add_missing_super_call_90001": "Fehlenden super()-Aufruf hinzufügen", "Add_missing_typeof_95052": "Fehlenden \"typeof\" hinzufügen", + "Add_names_to_all_parameters_without_names_95073": "Add names to all parameters without names", "Add_or_remove_braces_in_an_arrow_function_95058": "Geschweifte Klammern zu einer Pfeilfunktion hinzufügen oder daraus entfernen", + "Add_parameter_name_90034": "Add parameter name", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "Allen nicht aufgelösten Variablen, die einem Membernamen entsprechen, Qualifizierer hinzufügen", "Add_to_all_uncalled_decorators_95044": "Allen nicht aufgerufenen Decorators \"()\" hinzufügen", "Add_ts_ignore_to_all_error_messages_95042": "Allen Fehlermeldungen \"@ts-ignore\" hinzufügen", "Add_undefined_type_to_all_uninitialized_properties_95029": "Allen nicht initialisierten Eigenschaften einen nicht definierten Typ hinzufügen", "Add_undefined_type_to_property_0_95018": "undefined-Typ zu Eigenschaft \"{0}\" hinzufügen", + "Add_unknown_conversion_for_non_overlapping_types_95069": "Add 'unknown' conversion for non-overlapping types", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "Add 'unknown' to all conversions of non-overlapping types", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "Das Hinzufügen einer \"tsconfig.json\"-Datei erleichtert die Organisation von Projekten, die sowohl TypeScript- als auch JavaScript-Dateien enthalten. Weitere Informationen finden Sie unter https://aka.ms/tsconfig.", "Additional_Checks_6176": "Zusätzliche Überprüfungen", "Advanced_Options_6178": "Erweiterte Optionen", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "Alle Deklarationen von \"{0}\" müssen identische Typparameter aufweisen.", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "Alle Deklarationen einer abstrakten Methode müssen aufeinanderfolgend sein.", "All_destructured_elements_are_unused_6198": "Alle destrukturierten Elemente werden nicht verwendet.", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "All files must be modules when the '--isolatedModules' flag is provided.", "All_imports_in_import_declaration_are_unused_6192": "Keiner der Importe in der Importdeklaration wird verwendet.", + "All_type_parameters_are_unused_6205": "All type parameters are unused", "All_variables_are_unused_6199": "Alle Variablen werden nicht verwendet.", + "Allow_accessing_UMD_globals_from_modules_95076": "Allow accessing UMD globals from modules.", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "Standardimporte von Modulen ohne Standardexport zulassen. Dies wirkt sich nicht auf die Codeausgabe aus, lediglich auf die Typprüfung.", "Allow_javascript_files_to_be_compiled_6102": "Kompilierung von JavaScript-Dateien zulassen.", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "const-Umgebungsenumerationen sind unzulässig, wenn das Flag \"-isolatedModules\" angegeben wird.", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "Already included file name '{0}' differs from file name '{1}' only in casing.", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "Die Umgebungsmoduldeklaration darf keinen relativen Modulnamen angeben.", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "Umgebungsmodule dürfen nicht in andere Module oder Namespaces geschachtelt werden.", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "Ein AMD-Modul darf nicht mehrere Namenzuweisungen aufweisen.", "An_abstract_accessor_cannot_have_an_implementation_1318": "Ein abstrakter Accessor kann keine Implementierung aufweisen.", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "Eine Zugriffsmethode darf nicht in einem Umgebungskontext deklariert werden.", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "An accessibility modifier cannot be used with a private identifier.", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "An accessor cannot be named with a private identifier.", "An_accessor_cannot_have_type_parameters_1094": "Eine Zugriffsmethode darf keine Typparameter aufweisen.", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "Eine Umgebungsmoduldeklaration ist nur auf der obersten Ebene in einer Datei zulässig.", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "Ein arithmetischer Operand muss vom Typ \"any\" bzw. \"number\" oder ein Enumerationstyp sein.", + "An_argument_for_0_was_not_provided_6210": "An argument for '{0}' was not provided.", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "An argument matching this binding pattern was not provided.", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.", + "An_arrow_function_cannot_have_a_this_parameter_2730": "An arrow function cannot have a 'this' parameter.", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "Eine Async-Funktion oder -Methode in ES5/ES3 erfordert den Konstruktur \"Promise\". Stellen Sie sicher, dass Sie über eine Deklaration für den Konstruktor \"Promise\" verfügen, oder schließen Sie \"ES2015\" in Ihre Option \"--lib\" ein.", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "Eine asynchrone Funktion oder Methode muss einen gültigen awaitable-Rückgabetyp aufweisen.", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "Eine asynchrone Funktion oder Methode muss \"Promise\" zurückgeben. Stellen Sie sicher, dass Sie über eine Deklaration für \"Promise\" verfügen, oder schließen Sie ES2015 in Ihrer Option \"--lib\" ein.", "An_async_iterator_must_have_a_next_method_2519": "Ein Async-Iterator muss eine \"next()\"-Async-Methode aufweisen.", "An_element_access_expression_should_take_an_argument_1011": "Ein Ausdruck für einen Elementzugriff muss ein Argument verwenden.", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "An enum member cannot be named with a private identifier.", "An_enum_member_cannot_have_a_numeric_name_2452": "Ein Enumerationsmember darf keinen numerischen Namen besitzen.", + "An_enum_member_name_must_be_followed_by_a_or_1357": "An enum member name must be followed by a ',', '=', or '}'.", "An_export_assignment_can_only_be_used_in_a_module_1231": "Eine Exportzuweisung kann nur in einem Modul verwendet werden.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Eine Exportzuweisung darf nicht in einem Modul mit anderen exportierten Elementen verwendet werden.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Eine Exportzuweisung darf nicht in einem Namespace verwendet werden.", "An_export_assignment_cannot_have_modifiers_1120": "Eine Exportzuweisung darf keine Modifizierer besitzen.", "An_export_declaration_can_only_be_used_in_a_module_1233": "Eine Exportdeklaration kann nur in einem Modul verwendet werden.", "An_export_declaration_cannot_have_modifiers_1193": "Eine Exportdeklaration darf keine Modifizierer besitzen.", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "An expression of type 'void' cannot be tested for truthiness", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "Ein erweiterter Unicode-Escapewert muss zwischen 0x0 und 0x10FFFF (einschließlich) liegen.", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "An identifier or keyword cannot immediately follow a numeric literal.", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "Eine Implementierung darf nicht in Umgebungskontexten deklariert werden.", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "An import alias cannot reference a declaration that was exported using 'export type'.", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "An import alias cannot reference a declaration that was imported using 'import type'.", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "Eine Importdeklaration darf nur in einem Namespace oder Modul verwendet werden.", "An_import_declaration_cannot_have_modifiers_1191": "Eine Importdeklaration darf keine Modifizierer besitzen.", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "Ein Importpfad darf nicht mit einer Erweiterung \"{0}\" enden. Importieren Sie ggf. stattdessen \"{1}\".", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "Ein Indexsignaturparameter muss eine Typanmerkung besitzen.", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "Ein Indexsignaturparametertyp darf kein Typalias sein. Erwägen Sie stattdessen die Schreibung \"[{0}: {1}]: {2}\".", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "Ein Indexsignaturparametertyp darf kein Union-Typ sein. Erwägen Sie stattdessen die Verwendung eines zugeordneten Objekttyps.", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "Ein Indexsignaturparameter-Typ muss \"string\" oder \"number\" sein.", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "An index signature parameter type must be either 'string' or 'number'.", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "Eine Schnittstelle kann nur einen Bezeichner/\"qualified-name\" mit optionalen Typargumenten erweitern.", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "Eine Schnittstelle kann nur eine Klasse oder eine andere Schnittstelle erweitern.", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "An interface can only extend an object type or intersection of object types with statically known members.", "An_interface_property_cannot_have_an_initializer_1246": "Schnittstelleneigenschaften können keinen Initialisierer aufweisen.", "An_iterator_must_have_a_next_method_2489": "Ein Iterator muss eine Methode \"next()\" besitzen.", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "Ein Objektliteral darf nicht mehrere get-/set-Zugriffsmethoden mit dem gleichen Namen besitzen.", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "Ein Objektliteral darf im Strict-Modus nicht mehrere Eigenschaften mit dem gleichen Namen besitzen.", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "Ein Objektliteral darf nicht eine Eigenschaft und eine Zugriffsmethode mit demselben Namen besitzen.", "An_object_member_cannot_be_declared_optional_1162": "Ein Objektmember darf nicht als optional deklariert werden.", + "An_optional_chain_cannot_contain_private_identifiers_18030": "An optional chain cannot contain private identifiers.", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "An outer value of 'this' is shadowed by this container.", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "Eine Überladungssignatur darf nicht als ein Generator deklariert werden.", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "Unäre Ausdrücke mit dem Operator \"{0}\" sind auf der linken Seite von Potenzierungsausdrücken nicht zulässig. Erwägen Sie, den Ausdruck in Klammern zu setzen.", "Annotate_everything_with_types_from_JSDoc_95043": "Alle Funktionen mit Typen aus JSDoc kommentieren", "Annotate_with_type_from_JSDoc_95009": "Mit Typ aus JSDoc kommentieren", "Annotate_with_types_from_JSDoc_95010": "Mit Typen aus JSDoc kommentieren", + "Another_export_default_is_here_2753": "Another export default is here.", + "Are_you_missing_a_semicolon_2734": "Are you missing a semicolon?", "Argument_expression_expected_1135": "Es wurde ein Argumentausdruck erwartet.", "Argument_for_0_option_must_be_Colon_1_6046": "Das Argument für die Option \"{0}\" muss \"{1}\" sein.", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "Das Argument vom Typ \"{0}\" kann dem Parameter vom Typ \"{1}\" nicht zugewiesen werden.", "Array_element_destructuring_pattern_expected_1181": "Ein Arrayelement-Destrukturierungsmuster wurde erwartet.", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "Assertions require every name in the call target to be declared with an explicit type annotation.", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "Assertions require the call target to be an identifier or qualified name.", "Asterisk_Slash_expected_1010": "\"*/\" wurde erwartet.", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "Erweiterungen für den globalen Bereich können nur in externen Modulen oder Umgebungsmoduldeklarationen direkt geschachtelt werden.", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "Erweiterungen für den globalen Bereich sollten den Modifizierer \"declare\" aufweisen, wenn sie nicht bereits in einem Umgebungskontext auftreten.", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "In Projekt \"{0}\" ist die automatische Erkennung von Eingaben aktiviert. Es wird ein zusätzlicher Auflösungsdurchlauf für das Modul \"{1}\" unter Verwendung von Cachespeicherort \"{2}\" ausgeführt.", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "Basisklassenausdrücke können nicht auf Klassentypparameter verweisen.", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "Der Rückgabetyp \"{0}\" des Basiskonstruktors ist keine Klasse oder kein Schnittstellentyp.", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members.", "Base_constructors_must_all_have_the_same_return_type_2510": "Basiskonstruktoren müssen alle den gleichen Rückgabetyp aufweisen.", "Base_directory_to_resolve_non_absolute_module_names_6083": "Das Basisverzeichnis zum Auflösen nicht absoluter Modulnamen.", "Basic_Options_6172": "Standardoptionen", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "BigInt literals are not available when targeting lower than ES2020.", "Binary_digit_expected_1177": "Es wurde eine Binärzahl erwartet.", "Binding_element_0_implicitly_has_an_1_type_7031": "Das Bindungselement \"{0}\" weist implizit einen Typ \"{1}\" auf.", "Block_scoped_variable_0_used_before_its_declaration_2448": "Die blockbezogene Variable \"{0}\" wurde vor ihrer Deklaration verwendet.", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "Alle Projekte erstellen, einschließlich solcher, die anscheinend auf dem neuesten Stand sind", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "Mindestens ein Projekt und die zugehörigen Abhängigkeiten erstellen, wenn veraltet", + "Build_option_0_requires_a_value_of_type_1_5073": "Build option '{0}' requires a value of type {1}.", "Building_project_0_6358": "Projekt \"{0}\" wird erstellt...", "Call_decorator_expression_90028": "Decorator-Ausdruck aufrufen", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "Call signature return types '{0}' and '{1}' are incompatible.", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "Eine Aufrufsignatur ohne Rückgabetypanmerkung weist implizit einen any-Rückgabetyp auf.", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Call_target_does_not_contain_any_signatures_2346": "Das Aufrufziel enthält keine Signaturen.", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "Der Zugriff auf \"{0}.{1}\" ist nicht möglich, da \"{0}\" ein Typ ist, aber kein Namespace. Wollten Sie den Typ der Eigenschaft \"{1}\" in \"{0}\" mit \"{0}[\"{1}\"]\" abrufen?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "Cannot access ambient const enums when the '--isolatedModules' flag is provided.", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "Ein Konstruktortyp \"{0}\" kann nicht einem Konstruktortyp \"{1}\" zugewiesen werden.", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "Ein abstrakter Konstruktortyp kann nicht einem nicht abstrakten Konstruktortyp zugewiesen werden.", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "Eine Zuweisung zu \"{0}\" ist nicht möglich, weil es sich um eine Konstante oder eine schreibgeschützte Eigenschaft handelt.", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "Cannot assign to '{0}' because it is a constant.", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "Cannot assign to '{0}' because it is a read-only property.", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "Eine Zuweisung zu \"{0}\" ist nicht möglich, weil es sich nicht um eine Variable handelt.", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "Das Modul \"{0}\" kann nicht erweitert werden, weil es in eine Nicht-Modulentität aufgelöst wird.", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "Das Modul \"{0}\" kann nicht mit Wertexporten vergrößert werden, da es zu einer Entität aufgelöst wird, die kein Modul darstellt.", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "Module können nur mithilfe der Option \"{0}\" kompiliert werden, wenn die Kennzeichnung \"-module\" den Wert \"amd\" oder \"system\" aufweist.", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "Namespaces können nicht kompiliert werden, wenn das Flag \"-isolatedModules\" angegeben wird.", "Cannot_create_an_instance_of_an_abstract_class_2511": "Eine Instanz der abstrakten Klasse kann nicht erstellt werden.", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'.", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "\"{0}\" kann nicht exportiert werden. Nur lokale Deklarationen können aus einem Modul exportiert werden.", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "Eine Klasse \"{0}\" kann nicht erweitert werden. Der Klassenkonstruktor ist als privat markiert.", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "Eine Schnittstelle \"{0}\" kann nicht erweitert werden. Meinten Sie \"implements\"?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "Cannot find a tsconfig.json file at the current directory: {0}.", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "Im angegebenen Verzeichnis \"{0}\" wurde keine \"tsconfig.json\"-Datei gefunden.", "Cannot_find_global_type_0_2318": "Der globale Typ \"{0}\" wurde nicht gefunden.", "Cannot_find_global_value_0_2468": "Der globale Wert \"{0}\" wurde nicht gefunden.", "Cannot_find_lib_definition_for_0_2726": "Die Bibliotheksdefinition für \"{0}\" wurde nicht gefunden.", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "Die Bibliotheksdefinition für \"{0}\" wurde nicht gefunden. Meinten Sie \"{1}\"?", "Cannot_find_module_0_2307": "Das Modul \"{0}\" wurde nicht gefunden.", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension", "Cannot_find_name_0_2304": "Der Name \"{0}\" wurde nicht gefunden.", "Cannot_find_name_0_Did_you_mean_1_2552": "Der Name \"{0}\" wurde nicht gefunden. Meinten Sie \"{1}\"?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "Der Name \"{0}\" wurde nicht gefunden. Meinten Sie den Instanzmember \"this.{0}\"?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "Der Name \"{0}\" wurde nicht gefunden. Meinten Sie den statischen Member \"{1}.{0}\"?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery` and then add `jquery` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.", "Cannot_find_namespace_0_2503": "Der Namespace \"{0}\" wurde nicht gefunden.", "Cannot_find_parameter_0_1225": "Der Parameter \"{0}\" wurde nicht gefunden.", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "Das gemeinsame Unterverzeichnis für die Eingabedateien wurde nicht gefunden.", "Cannot_find_type_definition_file_for_0_2688": "Die Typdefinitionsdatei für \"{0}\" wurde nicht gefunden.", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "Typdeklarationsdateien können nicht importiert werden. Importieren Sie ggf. \"{0}\" anstelle von \"{1}\".", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "Die Variable \"{0}\" mit dem äußeren Bereich im gleichen Bereich wie die Deklaration \"{1}\" mit dem Blockbereich kann nicht initialisiert werden.", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "Ein Ausdruck, dessen Typ eine Aufrufsignatur fehlt, kann nicht aufgerufen werden. Der Typ \"{0}\" weist keine kompatiblen Aufrufsignaturen auf.", "Cannot_invoke_an_object_which_is_possibly_null_2721": "Ein Objekt, das möglicherweise NULL ist, kann nicht aufgerufen werden.", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "Ein Objekt, das möglicherweise NULL oder nicht definiert ist, kann nicht aufgerufen werden.", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "Ein Objekt, das möglicherweise nicht definiert ist, kann nicht aufgerufen werden.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'.", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "Das Projekt \"{0}\" kann nicht vorgestellt werden, weil \"outFile\" nicht festgelegt wurde.", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "Ein Typ kann nicht erneut exportiert werden, wenn das Flag \"--isolatedModules\" angegeben ist.", "Cannot_read_file_0_Colon_1_5012": "Die Datei \"{0}\" kann nicht gelesen werden: {1}", "Cannot_redeclare_block_scoped_variable_0_2451": "Die blockbezogene Variable \"{0}\" Blockbereich kann nicht erneut deklariert werden.", "Cannot_redeclare_exported_variable_0_2323": "Die exportierte Variable \"{0}\" kann nicht erneut deklariert werden.", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "Der Bezeichner \"{0}\" in der Catch-Klausel kann nicht erneut deklariert werden.", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "Cannot update output of project '{0}' because there was error reading file '{1}'", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "JSX kann nur verwendet werden, wenn das Flag \"-jsx\" angegeben wird.", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "Es können keine imports-, exports- oder module-Erweiterungen verwendet werden, wenn \"-module\" den Wert \"none\" aufweist.", "Cannot_use_namespace_0_as_a_type_2709": "Der Namespace \"{0}\" kann nicht als Typ verwendet werden.", "Cannot_use_namespace_0_as_a_value_2708": "Der Namespace \"{0}\" kann nicht als Wert verwendet werden.", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "\"new\" darf nicht mit einem Ausdruck verwendet werden, in dessen Typ eine Aufruf- oder Konstruktsignatur fehlt.", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "Die Datei \"{0}\" kann nicht geschrieben werden, da sie durch mehrere Eingabedateien überschrieben würde.", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "Die Datei \"{0}\" kann nicht geschrieben werden, da sie eine Eingabedatei überschreiben würde.", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "Die Variable der Catch-Klausel darf keine Typanmerkung aufweisen.", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "Es wird überprüft, ob \"{0}\" das längste übereinstimmende Präfix für \"{1}\"–\"{2}\" ist.", "Circular_definition_of_import_alias_0_2303": "Zirkuläre Definition des Importalias \"{0}\".", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "Eine Zirkularität wurde beim Auflösen der Konfiguration erkannt: {0}", + "Circularity_originates_in_type_at_this_location_2751": "Circularity originates in type at this location.", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "Die Klasse \"{0}\" definiert die Instanzmember-Zugriffsmethode \"{1}\", die erweiterte Klasse \"{2}\" definiert diesen jedoch als Instanzmemberfunktion.", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "Die Klasse \"{0}\" definiert die Instanzmember-Zugriffsmethode \"{1}\", die erweiterte Klasse \"{2}\" definiert diese jedoch als Instanzmember-Zugriffsmethode.", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "Die Klasse \"{0}\" definiert die Instanzmemberfunktion \"{1}\", die erweiterte Klasse \"{2}\" definiert diese jedoch als Membereigenschaft.", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "Die Klasse \"{0}\" definiert die Instanzmembereigenschaft \"{1}\", die erweiterte Klasse \"{2}\" definiert diese jedoch als Instanzmemberfunktion.", "Class_0_incorrectly_extends_base_class_1_2415": "Die Klasse \"{0}\" erweitert fälschlicherweise die Basisklasse \"{1}\".", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "Die Klasse \"{0}\" implementiert fälschlicherweise die Klasse \"{1}\". Wollten Sie \"{1}\" erweitern und ihre Member als Unterklasse vererben?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "Die statische Seite der Klasse \"{0}\" erweitert fälschlicherweise die statische Seite der Basisklasse \"{1}\".", "Classes_can_only_extend_a_single_class_1174": "Klassen dürfen nur eine einzelne Klasse erweitern.", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "Klassen, die abstrakte Methoden enthalten, müssen als abstrakt markiert werden.", + "Classes_may_not_have_a_field_named_constructor_18006": "Classes may not have a field named 'constructor'.", "Command_line_Options_6171": "Befehlszeilenoptionen", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "Kompilieren Sie das dem Pfad zugewiesene Projekt zu dessen Konfigurationsdatei oder zu einem Ordner mit der Datei \"tsconfig.json\".", "Compiler_option_0_expects_an_argument_6044": "Die Compileroption \"{0}\" erwartet ein Argument.", "Compiler_option_0_requires_a_value_of_type_1_5024": "Die Compileroption \"{0}\" erfordert einen Wert vom Typ \"{1}\".", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "Compiler reserves name '{0}' when emitting private identifier downlevel.", "Composite_projects_may_not_disable_declaration_emit_6304": "In zusammengesetzten Projekten kann die Deklarationsausgabe nicht deaktiviert werden.", + "Composite_projects_may_not_disable_incremental_compilation_6379": "Composite projects may not disable incremental compilation.", "Computed_property_names_are_not_allowed_in_enums_1164": "Berechnete Eigenschaftennamen sind in Enumerationen unzulässig.", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "Berechnete Werte sind in einer Enumeration mit Membern mit Zeichenfolgenwerten nicht zulässig.", "Concatenate_and_emit_output_to_single_file_6001": "Verketten und Ausgabe in einer Datei speichern.", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "In Konflikt stehende Definitionen für \"{0}\" wurden unter \"{1}\" und \"{2}\" gefunden. Installieren Sie ggf. eine bestimmte Version dieser Bibliothek, um den Konflikt aufzulösen.", + "Conflicts_are_in_this_file_6201": "Conflicts are in this file.", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "Construct signature return types '{0}' and '{1}' are incompatible.", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "Eine Konstruktsignatur ohne Rückgabetypanmerkung weist implizit einen any-Rückgabetyp auf.", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Constructor_implementation_is_missing_2390": "Die Konstruktorimplementierung fehlt.", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "Der Konstruktor der Klasse \"{0}\" ist privat. Auf ihn kann nur innerhalb der Klassendeklaration zugegriffen werden.", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "Der Konstruktor der Klasse \"{0}\" ist geschützt. Auf ihn kann nur innerhalb der Klassendeklaration zugegriffen werden.", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "Konstruktoren für abgeleitete Klassen müssen einen Aufruf \"super\" enthalten.", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "Die enthaltene Datei wird nicht angegeben, und das Stammverzeichnis kann nicht ermittelt werden. Die Suche im Ordner \"node_modules\" wird übersprungen.", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.", "Convert_0_to_mapped_object_type_95055": "\"{0}\" in zugeordneten Objekttyp konvertieren", "Convert_all_constructor_functions_to_classes_95045": "Alle Konstruktorfunktionen in Klassen konvertieren", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "Convert all imports not used as a value to type-only imports", + "Convert_all_re_exported_types_to_type_only_exports_1365": "Convert all re-exported types to type-only exports", "Convert_all_require_to_import_95048": "Alle Aufrufe von \"require\" in \"import\" konvertieren", + "Convert_all_to_async_functions_95066": "Convert all to async functions", + "Convert_all_to_bigint_numeric_literals_95092": "Convert all to bigint numeric literals", "Convert_all_to_default_imports_95035": "Alle in Standardimporte konvertieren", + "Convert_const_to_let_95093": "Convert 'const' to 'let'", + "Convert_default_export_to_named_export_95061": "Convert default export to named export", "Convert_function_0_to_class_95002": "Funktion \"{0}\" in Klasse konvertieren", "Convert_function_to_an_ES2015_class_95001": "Funktion in eine ES2015-Klasse konvertieren", + "Convert_invalid_character_to_its_html_entity_code_95100": "Convert invalid character to its html entity code", + "Convert_named_export_to_default_export_95062": "Convert named export to default export", "Convert_named_imports_to_namespace_import_95057": "Benannte Importe in Namespaceimport konvertieren", "Convert_namespace_import_to_named_imports_95056": "Namespaceimport in benannte Importe konvertieren", + "Convert_parameters_to_destructured_object_95075": "Convert parameters to destructured object", "Convert_require_to_import_95047": "\"require\" in \"import\" konvertieren", "Convert_to_ES6_module_95017": "In ES6-Modul konvertieren", + "Convert_to_a_bigint_numeric_literal_95091": "Convert to a bigint numeric literal", + "Convert_to_async_function_95065": "Convert to async function", "Convert_to_default_import_95013": "In Standardimport konvertieren", + "Convert_to_template_string_95096": "Convert to template string", + "Convert_to_type_only_export_1364": "Convert to type-only export", + "Convert_to_type_only_import_1373": "Convert to type-only import", "Corrupted_locale_file_0_6051": "Die Gebietsschemadatei \"{0}\" ist beschädigt.", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "Es wurde keine Deklarationsdatei für das Modul \"{0}\" gefunden. \"{1}\" weist implizit den Typ \"any\" auf.", "Could_not_write_file_0_Colon_1_5033": "Die Datei \"{0}\" konnte nicht geschrieben werden. {1}.", "DIRECTORY_6038": "VERZEICHNIS", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit.", "Declaration_expected_1146": "Es wurde eine Deklaration erwartet.", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "Der Deklarationsname steht in Konflikt mit dem integrierten globalen Bezeichner \"{0}\".", "Declaration_or_statement_expected_1128": "Es wurde eine Deklaration oder Anweisung erwartet.", + "Declare_a_private_field_named_0_90053": "Declare a private field named '{0}'.", "Declare_method_0_90023": "Methode \"{0}\" deklarieren", "Declare_property_0_90016": "Eigenschaft \"{0}\" deklarieren", "Declare_static_method_0_90024": "Statische Methode \"{0}\" deklarieren", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "Decorators sind hier ungültig.", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "Decorators dürfen nicht auf mehrere get-/set-Zugriffsmethoden mit dem gleichen Namen angewendet werden.", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "Der Standardexport des Moduls besitzt oder verwendet den privaten Namen \"{0}\".", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "Definite assignment assertions can only be used along with a type annotation.", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "Definitions of the following identifiers conflict with those in another file: {0}", "Delete_all_unused_declarations_95024": "Alle nicht verwendeten Deklarationen löschen", "Delete_the_outputs_of_all_projects_6365": "Ausgaben aller Projekte löschen", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[Veraltet] Verwenden Sie stattdessen \"--jsxFactory\". Geben Sie das Objekt an, das für \"createElement\" aufgerufen wurde, wenn das Ziel die JSX-Ausgabe \"react\" ist.", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[Veraltet] Verwenden Sie stattdessen \"--outFile\". Verketten und Ausgeben in eine einzige Datei", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[Veraltet] Verwenden Sie stattdessen \"--skipLibCheck\". Überspringen Sie die Typüberprüfung der Standardbibliothek-Deklarationsdateien.", + "Did_you_forget_to_use_await_2773": "Did you forget to use 'await'?", + "Did_you_mean_0_1369": "Did you mean '{0}'?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?", + "Did_you_mean_to_call_this_expression_6212": "Did you mean to call this expression?", + "Did_you_mean_to_mark_this_function_as_async_1356": "Did you mean to mark this function as 'async'?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "Did you mean to parenthesize this function type?", + "Did_you_mean_to_use_new_with_this_expression_6213": "Did you mean to use 'new' with this expression?", "Digit_expected_1124": "Eine Ziffer wurde erwartet.", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "Das Verzeichnis \"{0}\" ist nicht vorhanden, Suchvorgänge darin werden übersprungen.", "Disable_checking_for_this_file_90018": "Überprüfung für diese Datei deaktivieren", "Disable_size_limitations_on_JavaScript_projects_6162": "Größenbeschränkungen für JavaScript-Projekte deaktivieren.", + "Disable_solution_searching_for_this_project_6224": "Disable solution searching for this project.", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "Deaktivieren Sie die strenge Überprüfung generischer Signaturen in Funktionstypen.", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "Disable use of source files instead of declaration files from referenced projects.", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "Verweise mit uneinheitlicher Groß-/Kleinschreibung auf die gleiche Datei nicht zulassen.", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "Fügen Sie keine Verweise mit dreifachen Schrägstrichen oder importierte Module zur Liste kompilierter Dateien hinzu.", "Do_not_emit_comments_to_output_6009": "Kommentare nicht an die Ausgabe ausgeben.", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "Fehler zu nicht verwendeten Bezeichnungen nicht melden.", "Do_not_resolve_the_real_path_of_symlinks_6013": "Tatsächlichen Pfad von symbolischen Verknüpfungen nicht auflösen.", "Do_not_truncate_error_messages_6165": "Kürzen Sie keine Fehlermeldungen.", - "Duplicate_declaration_0_2718": "Doppelte Deklaration \"{0}\".", "Duplicate_function_implementation_2393": "Doppelte Funktionsimplementierung.", "Duplicate_identifier_0_2300": "Doppelter Bezeichner \"{0}\".", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "Doppelter Bezeichner \"{0}\". Der Compiler reserviert den Namen \"{1}\" im Bereich der obersten Ebene eines Moduls.", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "Doppelter Bezeichner \"_this\". Der Compiler verwendet die Variablendeklaration \"_this\" zum Erfassen des this-Verweises.", "Duplicate_label_0_1114": "Doppelte Bezeichnung \"{0}\".", "Duplicate_number_index_signature_2375": "Doppelte Zahlenindexsignatur.", + "Duplicate_property_0_2718": "Duplicate property '{0}'.", "Duplicate_string_index_signature_2374": "Doppelte Zeichenfolgen-Indexsignatur.", "Dynamic_import_cannot_have_type_arguments_1326": "Der dynamische Import kann nicht über Typargumente verfügen.", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "Der dynamische Import wird nur unterstützt, wenn das Flag \"--module\" auf \"commonjs\" oder \"esNext\" festgelegt ist.", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "Der dynamische Import benötigt einen Spezifizierer als Argument.", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Der Spezifizierer des dynamischen Imports muss den Typ \"string\" aufweisen, hier ist er jedoch vom Typ \"{0}\".", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'esnext', 'commonjs', 'amd', 'system', or 'umd'.", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other.", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other.", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'.", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "Das Element weist implizit einen Typ \"any\" auf, weil der Indexausdruck nicht vom Typ \"number\" ist.", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "Das Element weist implizit einen Typ \"any\" auf, weil der Typ \"{0}\" keine Indexsignatur umfasst.", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "Geben Sie zu Beginn der Ausgabedateien eine UTF-8-Bytereihenfolge-Marke (BOM) aus.", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "Geben Sie eine einzelne Datei mit Quellzuordnungen anstelle einer separaten Datei aus.", + "Emit_class_fields_with_Define_instead_of_Set_6222": "Emit class fields with Define instead of Set.", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "Geben Sie die Quelle zusammen mit den Quellzuordnungen innerhalb einer einzelnen Datei aus; hierfür muss \"--inlineSourceMap\" oder \"--sourceMap\" festgelegt sein.", "Enable_all_strict_type_checking_options_6180": "Aktivieren Sie alle strengen Typüberprüfungsoptionen.", + "Enable_incremental_compilation_6378": "Inkrementelle Kompilierung aktivieren", "Enable_project_compilation_6302": "Projektkompilierung aktivieren", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "Enable strict 'bind', 'call', and 'apply' methods on functions.", "Enable_strict_checking_of_function_types_6186": "Aktivieren Sie die strenge Überprüfung für Funktionstypen.", "Enable_strict_checking_of_property_initialization_in_classes_6187": "Aktivieren Sie die strenge Überprüfung der Eigenschafteninitialisierung in Klassen.", "Enable_strict_null_checks_6113": "Strenge NULL-Überprüfungen aktivieren.", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "Enable the 'experimentalDecorators' option in your configuration file", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "Enable the '--jsx' flag in your configuration file", "Enable_tracing_of_the_name_resolution_process_6085": "Ablaufverfolgung des Namensauflösungsvorgangs aktivieren.", "Enable_verbose_logging_6366": "Ausführliche Protokollierung aktivieren", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "Ermöglicht Ausgabeinteroperabilität zwischen CommonJS- und ES-Modulen durch die Erstellung von Namespaceobjekten für alle Importe. Impliziert \"AllowSyntheticDefaultImports\".", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "Ein Enumerationsmember wurde erwartet.", "Enum_member_must_have_initializer_1061": "Ein Enumerationsmember muss einen Initialisierer aufweisen.", "Enum_name_cannot_be_0_2431": "Der Enumerationsname darf nicht \"{0}\" sein.", + "Enum_type_0_circularly_references_itself_2586": "Enum type '{0}' circularly references itself.", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "Der Enumerationstyp \"{0}\" weist Member mit Initialisierern auf, die keine Literale sind.", "Examples_Colon_0_6026": "Beispiele: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "Übermäßige Stapeltiefe beim Vergleichen der Typen \"{0}\" und \"{1}\".", @@ -385,7 +490,7 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "Mindestens {0} Argumente wurden erwartet, empfangen wurden aber mindestens {1}.", "Expected_corresponding_JSX_closing_tag_for_0_17002": "Das entsprechende schließende JSX-Tag wurde für \"{0}\" erwartet.", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "Für das JSX-Fragment wurde das entsprechende schließende Tag erwartet.", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "Der erwartete Typ des Felds \"{0}\" in der Datei \"package.json\" ist \"string\". Abgerufener Typ: \"{1}\".", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'.", "Experimental_Options_6177": "Experimentelle Optionen", "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "Experimentelle Unterstützung für Decorator-Elemente ist ein Feature, das in zukünftigen Versionen Änderungen unterliegt. Legen Sie die Option \"-experimentalDecorators\" fest, um diese Warnung zu entfernen.", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "Explizit angegebene Art der Modulauflösung: \"{0}\".", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "Exporte und Exportzuweisungen sind in Modulerweiterungen unzulässig.", "Expression_expected_1109": "Es wurde ein Ausdruck erwartet.", "Expression_or_comma_expected_1137": "Es wurde ein Ausdruck oder Komma erwartet.", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "Expression produces a union type that is too complex to represent.", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "Der Ausdruck wird in \"_super\" aufgelöst. Damit erfasst der Compiler den Basisklassenverweis.", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "Der Ausdruck wird in die Variablendeklaration \"{0}\" aufgelöst, die der Compiler verwendet, um asynchrone Funktionen zu unterstützen.", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "Der Ausdruck wird in die Variablendeklaration \"_newTarget\" aufgelöst, die der Compiler zum Erfassen der Metaeigenschaftenreferenz \"new.target\" verwendet.", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "Als {0} nach {1} extrahieren", "Extract_to_0_in_1_scope_95008": "Als {0} in {1}-Bereich extrahieren", "Extract_to_0_in_enclosing_scope_95007": "Als {0} in einschließenden Bereich extrahieren", + "Extract_to_interface_95090": "Extract to interface", + "Extract_to_type_alias_95078": "Extract to type alias", + "Extract_to_typedef_95079": "Extract to typedef", + "Extract_type_95077": "Extract type", "FILE_6035": "DATEI", "FILE_OR_DIRECTORY_6040": "DATEI ODER VERZEICHNIS", "Failed_to_parse_file_0_Colon_1_5014": "Fehler beim Analysieren der Datei \"{0}\": {1}.", "Fallthrough_case_in_switch_7029": "FallThrough-Fall in switch-Anweisung.", "File_0_does_not_exist_6096": "Die Datei \"{0}\" ist nicht vorhanden.", "File_0_exist_use_it_as_a_name_resolution_result_6097": "Die Datei \"{0}\" ist vorhanden – sie wird als Ergebnis der Namensauflösung verwendet.", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "File '{0}' has an unsupported extension. The only supported extensions are {1}.", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "Die Datei \"{0}\" hat eine nicht unterstützte Erweiterung und wird übersprungen.", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "Die Datei \"{0}\" weist eine nicht unterstützte Erweiterung auf. Die einzigen unterstützten Erweiterungen sind \"{1}\".", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?", "File_0_is_not_a_module_2306": "Die Datei \"{0}\" ist kein Modul.", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "Die Datei \"{0}\" befindet sich nicht in der Liste der Projektdateien. Projekte müssen alle Dateien auflisten oder ein include-Muster verwenden.", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern.", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "Datei \"{0}\" befindet sich nicht unter \"rootDir\" \"{1}\". \"rootDir\" muss alle Quelldateien enthalten.", "File_0_not_found_6053": "Die Datei \"{0}\" wurde nicht gefunden.", "File_change_detected_Starting_incremental_compilation_6032": "Es wurde eine Dateiänderung erkannt. Die inkrementelle Kompilierung wird gestartet...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "Die Dateispezifikation darf kein übergeordnetes Verzeichnis (\"..\") enthalten, das nach einem rekursiven Verzeichnisplatzhalter (\"**\") angegeben wird: \"{0}\".", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "Die Dateispezifikation darf nicht mit einem rekursiven Verzeichnisplatzhalter (\"**\") enden: \"{0}\".", "Fix_all_detected_spelling_errors_95026": "Alle erkannten Rechtschreibfehler korrigieren", + "Fix_all_expressions_possibly_missing_await_95085": "Fix all expressions possibly missing 'await'", + "Found_0_errors_6217": "{0} Fehler gefunden.", "Found_0_errors_Watching_for_file_changes_6194": "{0} Fehler gefunden. Es wird auf Dateiänderungen überwacht.", + "Found_1_error_6216": "1 Fehler gefunden.", "Found_1_error_Watching_for_file_changes_6193": "1 Fehler gefunden. Es wird auf Dateiänderungen überwacht.", "Found_package_json_at_0_6099": "\"package.json\" wurde unter \"{0}\" gefunden.", - "Found_package_json_at_0_Package_ID_is_1_6190": "\"Package.json\" unter \"{0}\" gefunden. Paket-ID: \"{1}\".", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "Funktionsdeklarationen sind in Blöcken im Strict-Modus unzulässig, wenn das Ziel \"ES3\" oder \"ES5\" ist.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "Funktionsdeklarationen sind in Blöcken im Strict-Modus unzulässig, wenn das Ziel \"ES3\" oder \"ES5\" ist. Klassendefinitionen befinden sich automatisch im Strict-Modus.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "Funktionsdeklarationen sind in Blöcken im Strict-Modus unzulässig, wenn das Ziel \"ES3\" oder \"ES5\" ist. Module befinden sich automatisch im Strict-Modus.", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Der Funktion fehlt die abschließende return-Anweisung, und der Rückgabetyp enthält nicht \"undefined\".", "Function_overload_must_be_static_2387": "Die Funktionsüberladung muss statisch sein.", "Function_overload_must_not_be_static_2388": "Die Funktionsüberladung darf nicht statisch sein.", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "Function type, which lacks return-type annotation, implicitly has an '{0}' return type.", "Generate_get_and_set_accessors_95046": "GET- und SET-Accessoren generieren", + "Generates_a_CPU_profile_6223": "Generates a CPU profile.", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "Generiert eine sourcemap für jede entsprechende .d.ts-Datei.", "Generates_corresponding_d_ts_file_6002": "Generiert die entsprechende .d.ts-Datei.", "Generates_corresponding_map_file_6043": "Generiert die entsprechende MAP-Datei.", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "Der Generator weist implizit den Typ \"{0}\" auf, weil er keine Werte ausgibt. Sie können ggf. einen Rückgabetyp angeben.", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.", "Generators_are_not_allowed_in_an_ambient_context_1221": "Generatoren sind in einem Umgebungskontext unzulässig.", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "Generatoren sind nur verfügbar, wenn das Ziel ECMAScript 2015 oder höher ist.", "Generic_type_0_requires_1_type_argument_s_2314": "Der generische Typ \"{0}\" erfordert {1} Typargument(e).", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "Der generische Typ \"{0}\" benötigt zwischen {1} und {2} Typargumente.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "Generische Typinstanziierung ist übermäßig tief und möglicherweise unendlich.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Die Sichtbarkeit der Getter- und Setter-Zugriffsmethoden stimmt nicht überein.", "Global_module_exports_may_only_appear_at_top_level_1316": "Globale Modulexporte dürfen nur auf der obersten Ebene auftreten.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "Globale Modulexporte dürfen nur in Deklarationsdateien auftreten.", "Global_module_exports_may_only_appear_in_module_files_1314": "Globale Modulexporte dürfen nur in Moduldateien auftreten.", "Global_type_0_must_be_a_class_or_interface_type_2316": "Der globale Typ \"{0}\" muss eine Klassen- oder Schnittstellentyp sein.", "Global_type_0_must_have_1_type_parameter_s_2317": "Der globale Typ \"{0}\" muss {1} Typparameter aufweisen.", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.", "Hexadecimal_digit_expected_1125": "Es wurde eine hexadezimale Zahl erwartet.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "Ein Bezeichner wird erwartet. \"{0}\" ist ein reserviertes Wort im Strict-Modus.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "Es wurde ein Bezeichner erwartet. \"{0}\" ist ein reserviertes Wort im Strict-Modus. Klassendefinitionen befinden sich automatisch im Strict-Modus.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "Es wurde ein Bezeichner erwartet. \"{0}\" ist ein reserviertes Wort im Strict-Modus. Module befinden sich automatisch im Strict-Modus.", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "Identifier expected. '{0}' is a reserved word that cannot be used here.", "Identifier_expected_1003": "Es wurde ein Bezeichner erwartet.", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "Bezeichner erwartet. \"__esModule\" ist als exportierter Marker für die Umwandlung von ECMAScript-Modulen reserviert.", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`", "Ignore_this_error_message_90019": "Diese Fehlermeldung ignorieren", "Implement_all_inherited_abstract_classes_95040": "Alle geerbten abstrakten Klassen implementieren", "Implement_all_unimplemented_interfaces_95032": "Alle nicht implementierten Schnittstellen implementieren", "Implement_inherited_abstract_class_90007": "Geerbte abstrakte Klasse implementieren", "Implement_interface_0_90006": "Schnittstelle \"{0}\" implementieren", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "Die implements-Klausel der exportierten Klasse \"{0}\" besitzt oder verwendet den privaten Namen \"{1}\".", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.", "Import_0_from_module_1_90013": "\"{0}\" aus dem Modul \"{1}\" importieren", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "Die Importzuweisung kann nicht verwendet werden, wenn das Ziel ECMAScript-Module sind. Verwenden Sie stattdessen ggf. \"import * as ns from 'mod'\", \"import {a} from 'mod'\", \"import d from 'mod'\" oder ein anderes Modulformat.", "Import_declaration_0_is_using_private_name_1_4000": "Die Importdeklaration \"{0}\" verwendet den privaten Namen \"{1}\".", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "Die Importdeklaration verursacht einen Konflikt mit der lokalen Deklaration von \"{0}\".", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "Importdeklarationen in einem Namespace dürfen nicht auf ein Modul verweisen.", + "Import_default_0_from_module_1_90032": "Import default '{0}' from module \"{1}\"", "Import_emit_helpers_from_tslib_6139": "Ausgabehilfsprogramme aus \"tslib\" importieren.", "Import_may_be_converted_to_a_default_import_80003": "Der Import kann in einen Standardimport konvertiert werden.", "Import_name_cannot_be_0_2438": "Der Importname darf nicht \"{0}\" sein.", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "Importe sind in Modulerweiterungen unzulässig. Verschieben Sie diese ggf. in das einschließende externe Modul.", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "In Umgebungsenumerationsdeklarationen muss der Memberinitialisierer ein konstanter Ausdruck sein.", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "In einer Enumeration mit mehreren Deklarationen kann nur eine Deklaration einen Initialisierer für das erste Enumerationselement ausgeben.", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "In const-Enumerationsdeklarationen muss der Memberinitialisierer ein konstanter Ausdruck sein.", "Include_modules_imported_with_json_extension_6197": "Importierte Module mit der Erweiterung \"JSON\" einschließen", "Index_signature_in_type_0_only_permits_reading_2542": "Die Indexsignatur in Typ \"{0}\" lässt nur Lesevorgänge zu.", "Index_signature_is_missing_in_type_0_2329": "Die Indexsignatur fehlt im Typ \"{0}\".", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "Einzelne Deklarationen in der gemergten Deklaration \"{0}\" müssen alle exportiert oder alle lokal sein.", "Infer_all_types_from_usage_95023": "Alle Typen aus der Syntax ableiten", "Infer_parameter_types_from_usage_95012": "Parametertypen aus der Nutzung ableiten", + "Infer_this_type_of_0_from_usage_95080": "Infer 'this' type of '{0}' from usage", "Infer_type_of_0_from_usage_95011": "Typ von \"{0}\" aus der Nutzung ableiten", "Initialize_property_0_in_the_constructor_90020": "Eigenschaft \"{0}\" im Konstruktor initialisieren", "Initialize_static_property_0_90021": "Statische Eigenschaft \"{0}\" initialisieren", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "Das JSDoc-Tag \"...\" wird möglicherweise nur im letzten Parameter einer Signatur angezeigt.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "Das JSDoc-Tag \"@param\" weist den Namen \"{0}\" auf, es gibt jedoch keinen Parameter dieses Namens.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "Das JSDoc-Tag \"@param\" weist den Namen \"{0}\" auf, es ist jedoch kein Parameter dieses Namens vorhanden. Es läge eine Übereinstimmung mit \"arguments\" vor, wenn ein Arraytyp vorläge.", + "JSDoc_type_0_circularly_references_itself_2587": "JSDoc type '{0}' circularly references itself.", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "Das JSDoc-Tag \"@typedef\" muss entweder eine Typanmerkung aufweisen, oder die Tags \"@property\" oder \"@member\" müssen darauf folgen.", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "JSDoc-Typen können nur innerhalb von Dokumentationskommentaren verwendet werden.", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "JSDoc-Typen können in TypeScript-Typen verschoben werden.", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "Der JSX-Elementtyp \"{0}\"weist keine Konstrukt- oder Aufrufsignaturen auf.", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "Der JSX-Elementtyp \"{0}\" ist keine Konstruktorfunktion für JSX-Elemente.", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "JSX-Elemente dürfen nicht mehrere Attribute mit dem gleichen Namen aufweisen.", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "JSX expressions may not use the comma operator. Did you mean to write an array?", "JSX_expressions_must_have_one_parent_element_2657": "JSX-Ausdrücke müssen ein übergeordnetes Element aufweisen.", "JSX_fragment_has_no_corresponding_closing_tag_17014": "Das JSX-Fragment weist kein entsprechendes schließendes Tag auf.", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "Ein JSX-Fragment wird bei Verwendung eines Inline-JSX-Factory-Pragmas nicht unterstützt.", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "Die untergeordnete JSX-Verteilung muss ein Arraytyp sein.", "Jump_target_cannot_cross_function_boundary_1107": "Das Sprungziel darf die Funktionsgrenze nicht überschreiten.", "KIND_6034": "ART", + "Keywords_cannot_contain_escape_characters_1260": "Keywords cannot contain escape characters.", "LOCATION_6037": "SPEICHERORT", "Language_service_is_disabled_9004": "Der Sprachdienst ist deaktiviert.", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "Die linke Seite des Kommaoperators wird nicht verwendet besitzt keine Nebenwirkungen.", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "super()-Aufruf als erste Anweisung im Konstruktor festlegen", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "Der zugeordnete Objekttyp weist implizit einen any-Vorlagentyp auf.", "Member_0_implicitly_has_an_1_type_7008": "Der Member \"{0}\" weist implizit den Typ \"{1}\" auf.", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Merge_conflict_marker_encountered_1185": "Mergekonfliktmarkierung", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "Die gemergte Deklaration \"{0}\" darf keine Exportstandarddeklaration enthalten. Fügen Sie ggf. eine separate Deklaration \"export default {0}\" hinzu.", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "Die Metaeigenschaft \"{0}\" ist nur im Text einer Funktionsdeklaration, eines Funktionsausdrucks oder eines Konstruktors zulässig.", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "Die Methode \"{0}\" der exportierten Schnittstelle besitzt oder verwendet den Namen \"{1}\" aus dem privaten Modul \"{2}\".", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "Die Methode \"{0}\" der exportierten Schnittstelle besitzt oder verwendet den privaten Namen \"{1}\".", "Modifiers_cannot_appear_here_1184": "Modifizierer dürfen hier nicht enthalten sein.", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "Das Modul \"{0}\" verweist nicht auf einen Typ, wird hier aber als Typ verwendet.", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "Module '{0}' can only be default-imported using the '{1}' flag", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "Module '{0}' declares '{1}' locally, but it is exported as '{2}'.", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "Module '{0}' declares '{1}' locally, but it is not exported.", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "Das Modul \"{0}\" verweist nicht auf einen Wert, wird hier aber als Wert verwendet.", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "Das Modul \"{0}\" hat bereits einen Member mit dem Namen \"{1}\" exportiert. Erwägen Sie, ihn explizit erneut zu exportieren, um die Mehrdeutigkeit zu vermeiden.", "Module_0_has_no_default_export_1192": "Das Modul \"{0}\" weist keinen Standardexport auf.", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?", "Module_0_has_no_exported_member_1_2305": "Das Modul \"{0}\" weist keinen exportierten Member \"{1}\" auf.", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "Das Modul \"{0}\" umfasst keinen exportierten Member \"{1}\". Meinten Sie \"{2}\"?", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "Das Modul \"{0}\" wird durch eine lokale Deklaration mit dem gleichen Namen ausgeblendet.", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "Das Modul \"{0}\" wird in eine Nicht-Modulentität aufgelöst und darf nicht mithilfe dieses Konstrukts importiert werden.", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "Das Modul \"{0}\" verwendet \"export =\" und darf nicht mit \"export *\" verwendet werden.", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "Das Modul \"{0}\" wurde als in \"{1}\" deklariertes Umgebungsmodul aufgelöst, weil diese Datei nicht geändert wurde.", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "Das Modul \"{0}\" wurde als lokal deklariertes Umgebungsmodul in der Datei \"{1}\" aufgelöst.", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "Das Modul \"{0}\" wurde zu \"{1}\" aufgelöst, aber \"--jsx\" wurde nicht festgelegt.", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used.", "Module_Resolution_Options_6174": "Modulauflösungsoptionen", "Module_name_0_matched_pattern_1_6092": "Modulname \"{0}\", übereinstimmendes Muster \"{1}\".", "Module_name_0_was_not_resolved_6090": "======== Der Modulname \"{0}\" wurde nicht aufgelöst. ========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== Der Modulname \"{0}\" wurde erfolgreich in \"{1}\" aufgelöst. ========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========", "Module_resolution_kind_is_not_specified_using_0_6088": "Die Art der Modulauflösung wird nicht angegeben. \"{0}\" wird verwendet.", "Module_resolution_using_rootDirs_has_failed_6111": "Fehler bei der Modulauflösung mithilfe von \"rootDirs\".", "Move_to_a_new_file_95049": "In neue Datei verschieben", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "Die benannte Eigenschaft \"{0}\" der Typen \"{1}\" und \"{2}\" ist nicht identisch.", "Namespace_0_has_no_exported_member_1_2694": "Der Namespace \"{0}\" besitzt keinen exportierten Member \"{1}\".", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "Kein Basiskonstruktor weist die angegebene Anzahl von Typargumenten auf.", + "No_constituent_of_type_0_is_callable_2755": "No constituent of type '{0}' is callable.", + "No_constituent_of_type_0_is_constructable_2759": "No constituent of type '{0}' is constructable.", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "No index signature with a parameter of type '{0}' was found on type '{1}'.", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "In der Konfigurationsdatei \"{0}\" wurden keine Eingaben gefunden. Als include-Pfade wurden \"{1}\", als exclude-Pfade wurden \"{2}\" angegeben.", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments.", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments.", + "No_overload_matches_this_call_2769": "No overload matches this call.", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "Die nicht abstrakte Klasse \"{0}\" implementiert nicht den geerbten abstrakten Member \"{1}\" aus der Klasse \"{2}\".", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "Der nicht abstrakte Ausdruck implementiert nicht den geerbten abstrakten Member \"{0}\" aus der Klasse \"{1}\".", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "Non-null assertions can only be used in TypeScript files.", + "Non_simple_parameter_declared_here_1348": "Non-simple parameter declared here.", "Not_all_code_paths_return_a_value_7030": "Nicht alle Codepfade geben einen Wert zurück.", + "Not_all_constituents_of_type_0_are_callable_2756": "Not all constituents of type '{0}' are callable.", + "Not_all_constituents_of_type_0_are_constructable_2760": "Not all constituents of type '{0}' are constructable.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "Der numerische Indextyp \"{0}\" kann dem Zeichenfolgen-Indextyp \"{1}\" nicht zugewiesen werden.", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers.", "Numeric_separators_are_not_allowed_here_6188": "Numerische Trennzeichen sind hier nicht zulässig.", "Object_is_of_type_unknown_2571": "Das Objekt ist vom Typ \"Unbekannt\".", "Object_is_possibly_null_2531": "Das Objekt ist möglicherweise \"NULL\".", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "Oktalliterale sind in einem Mitgliederenumerationsinitialisierer nicht zulässig. Verwenden Sie die Syntax \"{0}\".", "Octal_literals_are_not_allowed_in_strict_mode_1121": "Oktalliterale sind im Strict-Modus unzulässig.", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "Oktalliterale sind bei der Zielgruppenadressierung von ECMAScript 5 und höher nicht verfügbar. Verwenden Sie die Syntax \"{0}\".", + "Only_ECMAScript_imports_may_use_import_type_1370": "Only ECMAScript imports may use 'import type'.", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "In einer for...in-Anweisung ist nur eine einzige Variablendeklaration zulässig.", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "In einer for...of-Anweisung ist nur eine einzige Variablendeklaration zulässig.", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "Nur eine void-Funktion kann mit dem Schlüsselwort \"new\" aufgerufen werden.", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "Geben Sie nur .d.ts-Deklarationsdateien aus.", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "Derzeit werden nur Bezeichner/qualifizierte Namen mit optionalen Typargumenten in den \"extends\"-Klauseln einer Klasse unterstützt.", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "Nur auf öffentliche und geschützte Methoden der Basisklasse kann über das Schlüsselwort \"super\" zugegriffen werden.", + "Operator_0_cannot_be_applied_to_type_1_2736": "Operator '{0}' cannot be applied to type '{1}'.", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "Der Operator \"{0}\" darf nicht auf die Typen \"{1}\" und \"{2}\" angewendet werden.", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "Die Option \"{0}\" kann nur in der Datei \"tsconfig.json\" angegeben werden.", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "Die Option \"{0}\" kann nur verwendet werden, wenn die Option \"-inlineSourceMap\" oder \"-sourceMap\" angegeben wird.", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "Option '{0}' cannot be specified when option 'target' is 'ES3'.", "Option_0_cannot_be_specified_with_option_1_5053": "Die Option \"{0}\" darf nicht zusammen mit der Option \"{1}\" angegeben werden.", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "Die Option \"{0}\" darf nicht ohne die Option \"{1}\" angegeben werden.", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "Die Option \"{0}\" kann nicht ohne die Option \"{1}\" oder \"{2}\" angegeben werden.", "Option_0_should_have_array_of_strings_as_a_value_6103": "Die Option \"{0}\" muss ein Zeichenfolgenarray als Wert aufweisen.", "Option_build_must_be_the_first_command_line_argument_6369": "Die Option \"--build\" muss das erste Befehlszeilenargument sein.", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified.", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "Die Option \"isolatedModules\" kann nur verwendet werden, wenn entweder die Option \"--module\" angegeben ist oder die Option \"target\" den Wert \"ES2015\" oder höher aufweist.", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "Die \"path\"-Option kann nicht ohne Angabe der \"-baseUrl\"-Option angegeben werden.", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "Die Option \"project\" darf nicht mit Quelldateien in einer Befehlszeile kombiniert werden.", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'.", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "Die Option \"--resolveJsonModule\" kann nicht ohne die Modulauflösungsstrategie \"node\" angegeben werden.", "Options_0_and_1_cannot_be_combined_6370": "Die Optionen \"{0}\" und \"{1}\" können nicht kombiniert werden.", "Options_Colon_6027": "Optionen:", "Output_directory_for_generated_declaration_files_6166": "Ausgabeverzeichnis für erstellte Deklarationsdateien.", "Output_file_0_from_project_1_does_not_exist_6309": "Die Ausgabedatei \"{0}\" aus dem Projekt \"{1}\" ist nicht vorhanden.", "Output_file_0_has_not_been_built_from_source_file_1_6305": "Die Ausgabedatei \"{0}\" wurde nicht aus der Quelldatei \"{1}\" erstellt.", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "Die Überladungssignatur ist nicht mit der Funktionsimplementierung kompatibel.", + "Overload_0_of_1_2_gave_the_following_error_2772": "Overload {0} of {1}, '{2}', gave the following error.", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "Überladungssignaturen müssen alle abstrakt oder nicht abstrakt sein.", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "Überladungssignaturen müssen alle umgebend oder nicht umgebend sein.", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "Überladungssignaturen müssen alle exportiert oder nicht exportiert sein.", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "Überladungssignaturen müssen alle öffentlich, privat oder geschützt sein.", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "Auf den Parameter \"{0}\" darf in diesem Initialisierer nicht verwiesen werden.", "Parameter_0_implicitly_has_an_1_type_7006": "Der Parameter \"{0}\" weist implizit einen Typ \"{1}\" auf.", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "Der Parameter \"{0}\" befindet sich nicht an der gleichen Position wie der Parameter \"{1}\".", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "Parameter '{0}' of accessor has or is using private name '{1}'.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "Der Parameter \"{0}\" der Aufrufsignatur aus der exportierten Schnittstelle besitzt oder verwendet den Namen \"{1}\" aus dem privaten Modul \"{2}\".", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "Der Parameter \"{0}\" der Aufrufsignatur aus der exportierten Schnittstelle besitzt oder verwendet den privaten Namen \"{1}\".", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "Der Parameter \"{0}\" des Konstruktors aus der exportierten Klasse besitzt oder verwendet den Namen \"{1}\" aus dem externen Modul \"{2}\", kann aber nicht benannt werden.", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "Der Parameter \"{0}\" der öffentlichen statischen Methode aus der exportierten Klasse besitzt oder verwendet den privaten Namen \"{1}\".", "Parameter_cannot_have_question_mark_and_initializer_1015": "Der Parameter darf kein Fragezeichen und keinen Initialisierer aufweisen.", "Parameter_declaration_expected_1138": "Eine Parameterdeklaration wurde erwartet.", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "Parameter has a name but no type. Did you mean '{0}: {1}'?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "Parameter modifiers can only be used in TypeScript files.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "Der Parametertyp des öffentlichen Setters \"{0}\" aus der exportierten Klasse besitzt oder verwendet den Namen \"{1}\" aus dem privaten Modul \"{2}\".", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "Der Parametertyp des öffentlichen Setters \"{0}\" aus der exportierten Klasse besitzt oder verwendet den privaten Namen \"{1}\".", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "Der Parametertyp des öffentlichen statischen Setters \"{0}\" aus der exportierten Klasse besitzt oder verwendet den Namen \"{1}\" aus dem privaten Modul \"{2}\".", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "Im Strict-Modus analysieren und \"use strict\" für jede Quelldatei ausgeben.", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "Das Muster \"{0}\" darf höchstens ein Zeichen \"*\" aufweisen.", "Prefix_0_with_an_underscore_90025": "\"{0}\" einen Unterstrich voranstellen", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "Prefix all incorrect property declarations with 'declare'", "Prefix_all_unused_declarations_with_where_possible_95025": "Alle nicht verwendeten Deklarationen nach Möglichkeit mit dem Präfix \"_\" versehen", + "Prefix_with_declare_95094": "Prefix with 'declare'", "Print_names_of_files_part_of_the_compilation_6155": "Drucknamen des Dateiteils der Kompilierung.", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "Print names of files that are part of the compilation and then stop processing.", "Print_names_of_generated_files_part_of_the_compilation_6154": "Drucknamen des generierten Dateiteils der Kompilierung.", "Print_the_compiler_s_version_6019": "Die Version des Compilers ausgeben.", + "Print_the_final_configuration_instead_of_building_1350": "Print the final configuration instead of building.", "Print_this_message_6017": "Diese Nachricht ausgeben.", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "Private identifiers are not allowed in variable declarations.", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "Private identifiers are not allowed outside class bodies.", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "Private identifiers are only available when targeting ECMAScript 2015 and higher.", + "Private_identifiers_cannot_be_used_as_parameters_18009": "Private identifiers cannot be used as parameters", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "Private or protected member '{0}' cannot be accessed on a type parameter.", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "Projekt \"{0}\" kann nicht erstellt werden, weil die Abhängigkeit \"{1}\" Fehler enthält.", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "Project '{0}' can't be built because its dependency '{1}' was not built", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "Projekt \"{0}\" ist veraltet, weil die Abhängigkeit \"{1}\" veraltet ist.", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "Projekt \"{0}\" ist veraltet, weil die älteste Ausgabe \"{1}\" älter ist als die neueste Eingabe \"{2}\".", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "Projekt \"{0}\" ist veraltet, weil die Ausgabedatei \"{1}\" nicht vorhanden ist.", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "Project '{0}' is out of date because output of its dependency '{1}' has changed", "Project_0_is_up_to_date_6361": "Projekt \"{0}\" ist auf dem neuesten Stand.", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "Projekt \"{0}\" ist auf dem neuesten Stand, weil die neueste Eingabe \"{1}\" älter ist als die älteste Ausgabe \"{2}\".", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "Projekt \"{0}\" ist mit .d.ts-Dateien aus den zugehörigen Abhängigkeiten auf dem neuesten Stand.", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "Zu referenzierende Projekte", "Property_0_does_not_exist_on_const_enum_1_2479": "Die Eigenschaft \"{0}\" ist für die const-Enumeration \"{1}\" nicht vorhanden.", "Property_0_does_not_exist_on_type_1_2339": "Die Eigenschaft \"{0}\" ist für den Typ \"{1}\" nicht vorhanden.", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "Die Eigenschaft \"{0}\" ist im Typ \"{1}\" nicht vorhanden. Haben Sie \"await\" nicht verwendet?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "Die Eigenschaft \"{0}\" existiert nicht für Typ \"{1}\". Meinten Sie \"{2}\"?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "Eigenschaft \"{0}\" weist widersprüchliche Deklarationen auf und ein Zugriff in Typ \"{1}\" ist nicht möglich.", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "Die Eigenschaft \"{0}\" weist keinen Initialisierer auf und ist im Konstruktor nicht definitiv zugewiesen.", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "Die Eigenschaft \"{0}\" weist implizit den Typ \"any\" auf, weil ihrem get-Accessor eine Parametertypanmerkung fehlt.", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "Die Eigenschaft \"{0}\" weist implizit den Typ \"any\" auf, weil ihrem set-Accessor eine Parametertypanmerkung fehlt.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage.", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "Die Eigenschaft \"{0}\" im Typ \"{1}\" kann nicht der gleichen Eigenschaft in Basistyp \"{2}\" zugewiesen werden.", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "Die Eigenschaft \"{0}\" im Typ \"{1}\" kann dem Typ \"{2}\" nicht zugewiesen werden.", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'.", + "Property_0_is_a_static_member_of_type_1_2576": "Property '{0}' is a static member of type '{1}'", "Property_0_is_declared_but_its_value_is_never_read_6138": "Die Eigenschaft \"{0}\" ist deklariert, aber ihr Wert wird nie gelesen.", "Property_0_is_incompatible_with_index_signature_2530": "Die Eigenschaft \"{0}\" ist nicht mit der Indexsignatur kompatibel.", + "Property_0_is_incompatible_with_rest_element_type_2573": "Property '{0}' is incompatible with rest element type.", "Property_0_is_missing_in_type_1_2324": "Die Eigenschaft \"{0}\" fehlt im Typ \"{1}\".", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "Property '{0}' is missing in type '{1}' but required in type '{2}'.", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "Property '{0}' is not accessible outside class '{1}' because it has a private identifier.", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "Die Eigenschaft \"{0}\" ist im Typ \"{1}\" optional, im Typ \"{2}\" aber erforderlich.", "Property_0_is_private_and_only_accessible_within_class_1_2341": "Die Eigenschaft \"{0}\" ist privat. Auf sie kann nur innerhalb der Klasse \"{1}\" zugegriffen werden.", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "Die Eigenschaft \"{0}\" ist im Typ \"{1}\" privat, im Typ \"{2}\" hingegen nicht.", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "Die Eigenschaft \"{0}\" ist geschützt, Typ \"{1}\" ist aber keine von \"{2}\" abgeleitete Klasse.", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "Die Eigenschaft \"{0}\" ist im Typ \"{1}\" geschützt, im Typ \"{2}\" aber öffentlich.", "Property_0_is_used_before_being_assigned_2565": "Die Eigenschaft \"{0}\" wird vor ihrer Zuweisung verwendet.", + "Property_0_is_used_before_its_initialization_2729": "Property '{0}' is used before its initialization.", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "Die Eigenschaft \"{0}\" des JSX-Verteilungsattributs kann nicht der Zieleigenschaft zugewiesen werden.", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "Die Eigenschaft \"{0}\" des exportierten Klassenausdrucks ist unter Umständen nicht privat oder geschützt.", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "Die Eigenschaft \"{0}\" der exportierten Schnittstelle besitzt oder verwendet den Namen \"{1}\" aus dem privaten Modul \"{2}\".", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "Die Eigenschaft \"{0}\" der exportierten Schnittstelle besitzt oder verwendet den privaten Namen \"{1}\".", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "Die Eigenschaft \"{0}\" vom Typ \"{1}\" kann dem numerischen Indextyp \"{2}\" nicht zugewiesen werden.", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "Die Eigenschaft \"{0}\" vom Typ \"{1}\" kann dem Zeichenfolgen-Indextyp \"{2}\" nicht zugewiesen werden.", + "Property_0_was_also_declared_here_2733": "Property '{0}' was also declared here.", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.", "Property_assignment_expected_1136": "Die Zuweisung einer Eigenschaft wurde erwartet.", "Property_destructuring_pattern_expected_1180": "Ein Eigenschaftendestrukturierungsmuster wurde erwartet.", "Property_or_signature_expected_1131": "Eine Eigenschaft oder Signatur wurde erwartet.", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "Die öffentliche statische Eigenschaft \"{0}\" der exportierten Klasse besitzt oder verwendet den Namen \"{1}\" aus dem externen Modul \"{2}\", kann aber nicht benannt werden.", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "Die öffentliche statische Eigenschaft \"{0}\" der exportierten Klasse besitzt oder verwendet den Namen \"{1}\" aus dem privaten Modul \"{2}\".", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "Die öffentliche statische Eigenschaft \"{0}\" der exportierten Klasse besitzt oder verwendet den privaten Namen \"{1}\".", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'.", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "Fehler für Ausdrücke und Deklarationen mit einem impliziten any-Typ auslösen.", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Fehler für \"this\"-Ausdrücke mit einem impliziten any-Typ auslösen.", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.", "Redirect_output_structure_to_the_directory_6006": "Die Ausgabestruktur in das Verzeichnis umleiten.", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "Das referenzierte Projekt \"{0}\" muss für die Einstellung \"composite\" den Wert TRUE aufweisen.", + "Remove_all_unnecessary_uses_of_await_95087": "Remove all unnecessary uses of 'await'", "Remove_all_unreachable_code_95051": "Gesamten nicht erreichbaren Code entfernen", "Remove_all_unused_labels_95054": "Alle nicht verwendeten Bezeichnungen entfernen", "Remove_braces_from_arrow_function_95060": "Geschweifte Klammern aus Pfeilfunktion entfernen", - "Remove_declaration_for_Colon_0_90004": "Deklaration entfernen für: {0}", "Remove_destructuring_90009": "Destrukturierung entfernen", "Remove_import_from_0_90005": "Import aus \"{0}\" entfernen", + "Remove_template_tag_90011": "Remove template tag", + "Remove_type_parameters_90012": "Remove type parameters", + "Remove_unnecessary_await_95086": "Remove unnecessary 'await'", "Remove_unreachable_code_95050": "Nicht erreichbaren Code entfernen", + "Remove_unused_declaration_for_Colon_0_90004": "Remove unused declaration for: '{0}'", "Remove_unused_label_95053": "Nicht verwendete Bezeichnung entfernen", "Remove_variable_statement_90010": "Variablenanweisung entfernen", + "Replace_all_unused_infer_with_unknown_90031": "Replace all unused 'infer' with 'unknown'", "Replace_import_with_0_95015": "Ersetzen Sie den Import durch \"{0}\".", + "Replace_infer_0_with_unknown_90030": "Replace 'infer {0}' with 'unknown'", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Fehler melden, wenn nicht alle Codepfade in der Funktion einen Wert zurückgeben.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Für FallTrough-Fälle in switch-Anweisung Fehler melden.", "Report_errors_in_js_files_8019": "Fehler in .js-Dateien melden.", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "Auflösung mithilfe primärer Suchpfade...", "Resolving_with_primary_search_path_0_6121": "Die Auflösung erfolgt mit dem primären Suchpfad \"{0}\".", "Rest_parameter_0_implicitly_has_an_any_type_7019": "Der rest-parameter \"{0}\" weist implizit einen Typ \"any[]\" auf.", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage.", + "Rest_signatures_are_incompatible_2572": "Rest signatures are incompatible.", "Rest_types_may_only_be_created_from_object_types_2700": "Rest-Typen dürfen nur aus object-Typen erstellt werden.", + "Return_type_annotation_circularly_references_itself_2577": "Return type annotation circularly references itself.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "Der Rückgabetyp der Aufrufsignatur aus der exportierten Schnittstelle besitzt oder verwendet den Namen \"{0}\" aus dem privaten Modul \"{1}\".", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "Der Rückgabetyp der Aufrufsignatur aus der exportierten Schnittstelle besitzt oder verwendet den privaten Namen \"{0}\".", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "Der Rückgabetyp der Konstruktorsignatur aus der exportierten Schnittstelle besitzt oder verwendet den Namen \"{0}\" aus dem privaten Modul \"{1}\".", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "Das Stammverzeichnis kann nicht ermittelt werden. Die primären Suchpfade werden übersprungen.", "STRATEGY_6039": "STRATEGIE", "Scoped_package_detected_looking_in_0_6182": "Bereichsbezogenes Paket erkannt. In \"{0}\" wird gesucht", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "Set the 'module' option in your configuration file to '{0}'", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "Set the 'target' option in your configuration file to '{0}'", "Setters_cannot_return_a_value_2408": "Setter können keinen Wert zurückgeben.", "Show_all_compiler_options_6169": "Alle Compileroptionen anzeigen.", "Show_diagnostic_information_6149": "Diagnoseinformationen anzeigen.", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "Die Signatur \"{0}\" muss ein Typprädikat sein.", "Skip_type_checking_of_declaration_files_6012": "Überspringen Sie die Typüberprüfung von Deklarationsdateien.", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "Das Erstellen von Projekt \"{0}\" wird übersprungen, weil die Abhängigkeit \"{1}\" einen Fehler aufweist.", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "Das Bereinigen wird übersprungen, weil nicht alle Projekte gefunden werden konnten.", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "Skipping build of project '{0}' because its dependency '{1}' was not built", "Source_Map_Options_6175": "Quellzuordnungsoptionen", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "Eine spezialisierte Überladungssignatur kann keiner nicht spezialisierten Signatur zugewiesen werden.", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "Der Spezifizierer des dynamischen Imports darf kein Spread-Element sein.", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "ECMAScript-Zielversion angeben: ES3 (Standard), ES5, ES2015, ES2016, ES2017, ES2018 oder ESNEXT.", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'.", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "JSX-Codegenerierung angeben: \"preserve\", \"react-native\" oder \"react\".", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "Specify emit/checking behavior for imports that are only used for types", + "Specify_file_to_store_incremental_compilation_information_6380": "Specify file to store incremental compilation information", "Specify_library_files_to_be_included_in_the_compilation_6079": "Geben Sie Bibliotheksdateien an, die in die Kompilierung eingeschlossen werden sollen.", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "Geben Sie die Codegenerierung für das Modul an: \"none\", \"commonjs\", \"amd\", \"system\", \"umd\", \"es2015\" oder \"ESNext\".", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'.", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "Geben Sie die Modulauflösungsstrategie an: \"node\" (Node.js) oder \"classic\" (TypeScript vor Version 1.6).", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'.", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'.", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'.", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "Geben Sie die JSX-Factoryfunktion an, die für eine react-JSX-Ausgabe verwendet werden soll, z. B. \"React.createElement\" oder \"h\".", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "Geben Sie die Zeilenendesequenz an, die beim Ausgeben von Dateien verwendet werden soll: \"CRLF\" (DOS) oder \"LF\" (Unix).", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "Geben Sie den Speicherort an, an dem der Debugger TypeScript-Dateien ermitteln soll, anstatt Quellspeicherorte zu verwenden.", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "Geben Sie den Speicherort an, an dem der Debugger Zuordnungsdateien ermitteln soll, anstatt generierte Speicherorte zu verwenden.", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "Geben Sie das Stammverzeichnis der Eingabedateien an. Verwenden Sie diese Angabe, um die Ausgabeverzeichnisstruktur mithilfe von \"-outDir\" zu steuern.", + "Split_all_invalid_type_only_imports_1367": "Split all invalid type-only imports", + "Split_into_two_separate_import_declarations_1366": "Split into two separate import declarations", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "Der Verteilungsoperator in new-Ausdrücken ist nur verfügbar, wenn das Ziel ECMAScript 5 oder höher ist.", "Spread_types_may_only_be_created_from_object_types_2698": "Spread-Typen dürfen nur aus object-Typen erstellt werden.", "Starting_compilation_in_watch_mode_6031": "Kompilierung im Überwachungsmodus wird gestartet...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "Nachfolgende Eigenschaftendeklarationen müssen den gleichen Typ aufweisen. Die Eigenschaft \"{0}\" muss den Typ \"{1}\" aufweisen, ist hier aber vom Typ \"{2}\".", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "Nachfolgende Variablendeklarationen müssen den gleichen Typ aufweisen. Die Variable \"{0}\" muss den Typ \"{1}\" aufweisen, ist hier aber vom Typ \"{2}\".", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "Die Ersetzung \"{0}\" für das Muster \"{1}\" weist einen falschen Typ auf. Erwartet wurde \"string\", abgerufen wurde \"{2}\".", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "Die Ersetzung \"{0}\" im Muster \"{1}\" darf höchstens ein Zeichen \"*\" aufweisen.", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "Substitution '{0}' in pattern '{1}' can have at most one '*' character.", "Substitutions_for_pattern_0_should_be_an_array_5063": "Die Ersetzung für das Muster \"{0}\" muss ein Array sein.", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "Ersetzungen für das Muster \"{0}\" dürfen kein leeres Array sein.", "Successfully_created_a_tsconfig_json_file_6071": "Eine Datei \"tsconfig.json\" wurde erfolgreich erstellt.", @@ -840,78 +1033,121 @@ "Suppress_excess_property_checks_for_object_literals_6072": "Übermäßige Eigenschaftenüberprüfungen für Objektliterale unterdrücken.", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "noImplicitAny-Fehler für die Indizierung von Objekten unterdrücken, denen Indexsignaturen fehlen.", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "Der Symbol-Verweis verweist nicht auf das globale Symbolkonstruktorobjekt.", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively.", "Syntax_Colon_0_6023": "Syntax: {0}", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "Tagged template expressions are not permitted in an optional chain.", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "The '{0}' modifier can only be used in TypeScript files.", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "Der Operator \"{0}\" darf nicht den Typ \"symbol\" angewendet werden.", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "Der Operator \"{0}\" ist für boolesche Typen unzulässig. Verwenden Sie stattdessen ggf. \"{1}\".", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "The '{0}' property of an async iterator must be a method.", + "The_0_property_of_an_iterator_must_be_a_method_2767": "The '{0}' property of an iterator must be a method.", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "Der Typ \"Object\" kann nur wenigen anderen Typen zugewiesen werden. Wollten Sie stattdessen den Typ \"any\" verwenden?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "Auf das Objekt \"arguments\" darf in einer Pfeilfunktion in ES3 und ES5 nicht verwiesen werden. Verwenden Sie ggf. einen Standardfunktionsausdruck.", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "Auf das Objekt \"arguments\" darf in einer asynchronen Funktion oder Methode in ES3 und ES5 nicht verwiesen werden. Verwenden Sie ggf. eine Standardfunktion oder -methode.", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "Der Text einer \"if\"-Anweisung kann keine leere Anweisung sein.", "The_character_set_of_the_input_files_6163": "Der Zeichensatz der Eingabedateien.", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "The containing arrow function captures the global value of 'this'.", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "Der beinhaltende Funktions- oder Modulkörper ist zu groß für eine Ablaufsteuerungsanalyse.", "The_current_host_does_not_support_the_0_option_5001": "Der aktuelle Host unterstützt die Option \"{0}\" nicht.", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "The declaration of '{0}' that you probably intended to use is defined here", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "The expected type comes from property '{0}' which is declared here on type '{1}'", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "The expected type comes from the return type of this signature.", + "The_expected_type_comes_from_this_index_signature_6501": "The expected type comes from this index signature.", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "Der Ausdruck einer Exportzuweisung muss ein Bezeichner oder ein qualifizierter Name in einem Umgebungskontext sein.", "The_files_list_in_config_file_0_is_empty_18002": "Die Liste \"files\" in der Konfigurationsdatei \"{0}\" ist leer.", + "The_first_export_default_is_here_2752": "The first export default is here.", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "Der erste Parameter der \"then\"-Methode einer Zusage muss ein Rückruf sein.", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "Der globale Typ \"JSX.{0}\" darf nur eine Eigenschaft aufweisen.", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "Die Metaeigenschaft \"import.meta\" ist nur bei Verwendung von \"ESNext\" für die Compileroptionen \"target\" und \"module\" zulässig.", + "The_implementation_signature_is_declared_here_2750": "The implementation signature is declared here.", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "The 'import.meta' meta-property is only allowed when the '--module' option is 'esnext' or 'system'.", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary.", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "Der abgeleitete Typ von \"{0}\" verweist auf einen Typ \"{1}\", auf den nicht zugegriffen werden kann. Eine Typanmerkung ist erforderlich.", + "The_last_overload_gave_the_following_error_2770": "The last overload gave the following error.", + "The_last_overload_is_declared_here_2771": "The last overload is declared here.", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "Die linke Seite einer for...in-Anweisung darf kein Destrukturierungsmuster sein.", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "Die linke Seite einer for...in-Anweisung darf keine Typanmerkung verwenden.", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "The left-hand side of a 'for...in' statement may not be an optional property access.", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "Die linke Seite einer for...in-Anweisung muss eine Variable oder ein Eigenschaftenzugriff sein.", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "Die linke Seite einer for...in-Anweisung muss vom Typ \"string\" oder \"any\" sein.", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "Die linke Seite einer for...of-Anweisung darf keine Typanmerkung verwenden.", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "The left-hand side of a 'for...of' statement may not be an optional property access.", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "Die linke Seite einer for...of-Anweisung muss eine Variable oder ein Eigenschaftenzugriff sein.", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "Die linke Seite einer arithmetischen Operation muss den Typ \"any\" oder \"number\" aufweisen oder ein Enumerationstyp sein.", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "The left-hand side of an assignment expression may not be an optional property access.", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "Die linke Seite eines Zuweisungsausdrucks muss eine Variable oder ein Eigenschaftenzugriff sein.", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "Die linke Seite eines in-Ausdrucks muss vom Typ \"any\", \"string\", \"number\" oder \"symbol\" sein.", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "Die linke Seite eines instanceof-Ausdrucks muss den Typ \"any\" aufweisen oder ein Objekttyp bzw. ein Typparameter sein.", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "Das beim Anzeigen von Meldungen für den Benutzer verwendete Gebietsschema (z. B. \"de-de\").", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "Die maximale Abhängigkeitstiefe, die unter \"node_modules\" durchsucht und für die JavaScript-Dateien geladen werden sollen.", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "The operand of a 'delete' operator cannot be a private identifier.", "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "Der Operand eines delete-Operators darf keine schreibgeschützte Eigenschaft sein.", "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "Der Operand eines delete-Operators muss eine Eigenschaftenreferenz sein.", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "The operand of an increment or decrement operator may not be an optional property access.", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "Der Operand eines Inkrement- oder Dekrementoperators muss eine Variable oder ein Eigenschaftenzugriff sein.", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "The parser expected to find a '}' to match the '{' token here.", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "Der Rückgabetyp eines JSX-Elementkonstruktors muss einen Objekttyp zurückgeben.", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "Der Rückgabetyp einer Parameter-Decorator-Funktion muss \"void\" oder \"any\" sein.", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "Der Rückgabetyp einer Eigenschaften-Decorator-Funktion muss \"void\" oder \"any\" sein.", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "Der Rückgabetyp einer asynchronen Funktion muss entweder eine gültige Zusage sein oder darf keinen aufrufbaren \"then\"-Member enthalten.", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "Der Rückgabetyp einer asynchronen Funktion oder Methode muss der globale Typ \"Promise\" sein.", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "Die rechte Seite einer for...in-Anweisung muss den Typ \"any\" aufweisen oder ein Objekttyp bzw. ein Typparameter sein. Sie weist hier jedoch den Typ \"{0}\" auf.", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "Die rechte Seite einer arithmetischen Operation muss den Typ \"any\" oder \"number\" aufweisen oder ein Enumerationstyp sein.", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "Die rechte Seite eines in-Ausdrucks muss den Typ \"any\" aufweisen oder ein Objekttyp bzw. ein Typparameter sein.", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "Die rechte Seite eines instanceof-Ausdrucks muss den Typ \"any\" oder einen Typ aufweisen, der dem Schnittstellentyp \"Function\" zugewiesen werden kann.", + "The_shadowing_declaration_of_0_is_defined_here_18017": "The shadowing declaration of '{0}' is defined here", "The_specified_path_does_not_exist_Colon_0_5058": "Der angegebene Pfad \"{0}\" ist nicht vorhanden.", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "Das Ziel einer Zuweisung muss eine Variable oder ein Eigenschaftenzugriff sein.", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "The target of an object rest assignment may not be an optional property access.", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "Das Ziel einer REST-Zuweisung für ein Objekt muss eine Variable oder ein Eigenschaftenzugriff sein.", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "Der \"this\"-Kontext vom Typ \"{0}\" kann \"this\" vom Typ \"{1}\" der Methode nicht zugewiesen werden.", "The_this_types_of_each_signature_are_incompatible_2685": "Die \"this\"-Typen jeder Signatur sind nicht kompatibel.", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'.", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "Das Typargument für den Typparameter \"{0}\" kann nicht aus der Syntax abgeleitet werden. Geben Sie die Typargumente ggf. explizit an.", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "Der von der \"next()\"-Methode eines Async-Iterators zurückgegebene Typ muss eine Zusage für einen Typ mit einer \"value\"-Eigenschaft sein.", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "Der von der Methode \"next()\" eines Iterators zurückgegebene Typ muss eine Eigenschaft \"value\" besitzen.", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "The type of a function declaration must match the function's signature.", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property.", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "The type returned by the '{0}()' method of an iterator must have a 'value' property.", + "The_types_of_0_are_incompatible_between_these_types_2200": "The types of '{0}' are incompatible between these types.", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "The types returned by '{0}' are incompatible between these types.", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "Die Variablendeklaration einer for...in-Anweisung darf keinen Initialisierer aufweisen.", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "Die Variablendeklaration einer for...of-Anweisung darf keinen Initialisierer aufweisen.", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "Die with-Anweisung wird nicht unterstützt. Alle Symbole in einem with-Block weisen den Typ \"any\" auf.", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided.", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "This condition will always return true since the function is always defined. Did you mean to call it instead?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "Diese Konstruktorfunktion kann in eine Klassendeklaration konvertiert werden.", + "This_expression_is_not_callable_2349": "This expression is not callable.", + "This_expression_is_not_constructable_2351": "This expression is not constructable.", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.", + "This_may_be_converted_to_an_async_function_80006": "This may be converted to an async function.", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export.", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag.", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "This overload signature is not compatible with its implementation signature.", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "This parameter is not allowed with 'use strict' directive.", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Diese Syntax erfordert ein importiertes Hilfsprogramm, aber das Modul \"{0}\" wurde nicht gefunden.", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "Diese Syntax erfordert ein importiertes Hilfsprogramm namens \"{1}\", aber das Modul \"{0}\" enthält keinen exportierten Member \"{1}\".", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'.", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.", "Trailing_comma_not_allowed_1009": "Ein nachgestelltes Komma ist unzulässig.", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Jede Datei als separates Modul transpilieren (ähnlich wie bei \"ts.transpileModule\").", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Versuchen Sie \"npm install @types/{0}\", sofern vorhanden, oder fügen Sie eine neue Deklarationsdatei (.d.ts) hinzu, die \"declare module '{0}';\" enthält.", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`", "Trying_other_entries_in_rootDirs_6110": "Andere Einträge in \"rootDirs\" werden versucht.", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "Die Ersetzung \"{0}\" wird versucht. Speicherort des Kandidatenmoduls: \"{1}\".", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "Der Tupeltyp \"{0}\" mit der Länge \"{1}\" kann dem Tupel mit der Länge \"{2}\" nicht zugewiesen werden.", - "Type_0_cannot_be_converted_to_type_1_2352": "Der Typ \"{0}\" kann nicht in den Typ \"{1}\" konvertiert werden.", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "Tuple type '{0}' of length '{1}' has no element at index '{2}'.", + "Tuple_type_arguments_circularly_reference_themselves_4110": "Tuple type arguments circularly reference themselves.", "Type_0_cannot_be_used_as_an_index_type_2538": "Der Typ \"{0}\" kann nicht als Indextyp verwendet werden.", "Type_0_cannot_be_used_to_index_type_1_2536": "Der Typ \"{0}\" kann nicht zum Indizieren von Typ \"{1}\" verwendet werden.", "Type_0_does_not_satisfy_the_constraint_1_2344": "Der Typ \"{0}\" erfüllt die Einschränkung \"{1}\" nicht.", + "Type_0_has_no_call_signatures_2757": "Type '{0}' has no call signatures.", + "Type_0_has_no_construct_signatures_2761": "Type '{0}' has no construct signatures.", "Type_0_has_no_matching_index_signature_for_type_1_2537": "Der Typ \"{0}\" weist keine übereinstimmende Indexsignatur für den Typ \"{1}\" auf.", "Type_0_has_no_properties_in_common_with_type_1_2559": "Der Typ \"{0}\" verfügt über keine gemeinsamen Eigenschaften mit Typ \"{1}\".", - "Type_0_has_no_property_1_2460": "Der Typ \"{0}\" besitzt keine Eigenschaft \"{1}\".", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "Der Typ \"{0}\" verfügt über keine Eigenschaft \"{1}\" und keine Zeichenfolgen-Indexsignatur.", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "Type '{0}' is missing the following properties from type '{1}': {2}", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.", "Type_0_is_not_a_constructor_function_type_2507": "Der Typ \"{0}\" ist kein Konstruktorfunktionstyp.", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "Der Typ \"{0}\" ist in ES5/ES3 kein gültiger Rückgabetyp einer asynchronen Funktion, weil er nicht auf einen Promise-kompatiblen Konstruktorwert verweist.", "Type_0_is_not_an_array_type_2461": "Der Typ \"{0}\" ist kein Arraytyp.", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "Der Typ \"{0}\" ist kein Arraytyp. Verwenden Sie die Compileroption \"--downlevelIteration\", um das Durchlaufen von Iteratoren zuzulassen.", "Type_0_is_not_an_array_type_or_a_string_type_2495": "Der Typ \"{0}\" ist kein Array- oder Zeichenfolgentyp.", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "Der Typ \"{0}\" ist kein Arraytyp oder Zeichenfolgentyp. Verwenden Sie die Compileroption \"--downlevelIteration\", um das Durchlaufen von Iteratoren zuzulassen.", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "Typ \"{0}\" ist kein Array-Typ oder Zeichenfolgentyp oder weist keine \"[Symbol.iterator]()\"-Methode auf, die einen Iterator zurückgibt.", @@ -926,17 +1162,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "Der Typ \"{0}\" verweist rekursiv auf sich selbst als ein Basistyp.", "Type_alias_0_circularly_references_itself_2456": "Der Typalias \"{0}\" verweist zirkulär auf sich selbst.", "Type_alias_name_cannot_be_0_2457": "Der Typaliasname darf nicht \"{0}\" sein.", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "Type aliases can only be used in TypeScript files.", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "Die Typanmerkung darf nicht für eine Konstruktordeklaration verwendet werden.", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "Type annotations can only be used in TypeScript files.", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "Der Typargumentkandidat \"{1}\" ist kein gültiges Typargument, weil er kein Obertyp des Kandidaten \"{0}\" ist.", "Type_argument_expected_1140": "Ein Typargument wurde erwartet.", "Type_argument_list_cannot_be_empty_1099": "Die Typargumentliste darf nicht leer sein.", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "Type arguments can only be used in TypeScript files.", "Type_arguments_cannot_be_used_here_1342": "Typargumente können an dieser Stelle nicht verwendet werden.", + "Type_arguments_for_0_circularly_reference_themselves_4109": "Type arguments for '{0}' circularly reference themselves.", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "Type assertion expressions can only be used in TypeScript files.", "Type_declaration_files_to_be_included_in_compilation_6124": "Typdeklarationsdateien, die in die Kompilierung eingeschlossen werden sollen.", "Type_expected_1110": "Es wurde ein Typ erwartet.", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "Type instantiation is excessively deep and possibly infinite.", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "Auf den Typ wird direkt oder indirekt im Erfüllungsrückruf der eigenen \"then\"-Methode verwiesen.", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "Der Typ des \"await\"-Operanden muss entweder eine gültige Zusage sein oder darf keinen aufrufbaren \"then\"-Member enthalten.", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "Type of computed property's value is '{0}', which is not assignable to type '{1}'.", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "Der Typ iterierter Elemente eines \"yield*\"-Operanden muss entweder eine gültige Zusage sein oder darf keinen aufrufbaren \"then\"-Member enthalten.", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "Der Typ eines \"yield\"-Operanden in einem asynchronen Generator muss entweder eine gültige Zusage sein oder darf keinen aufrufbaren \"then\"-Member enthalten.", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.", "Type_parameter_0_has_a_circular_constraint_2313": "Der Typparameter \"{0}\" weist eine zirkuläre Einschränkung auf.", "Type_parameter_0_has_a_circular_default_2716": "Der Typparameter \"{0}\" besitzt einen zirkulären Standardwert.", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "Der Typparameter \"{0}\" der Aufrufsignatur aus der exportierten Schnittstelle besitzt oder verwendet den privaten Namen \"{1}\".", @@ -944,17 +1188,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "Der Typparameter \"{0}\" der exportierten Klasse besitzt oder verwendet den privaten Namen \"{1}\".", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "Der Typparameter \"{0}\" der exportierten Funktion besitzt oder verwendet den privaten Namen \"{1}\".", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "Der Typparameter \"{0}\" der exportierten Schnittstelle besitzt oder verwendet den privaten Namen \"{1}\".", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "Type parameter '{0}' of exported mapped object type is using private name '{1}'.", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "Der Typparameter \"{0}\" des exportierten Typalias enthält oder verwendet den privaten Namen \"{1}\".", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "Der Typparameter \"{0}\" der Methode aus der exportierten Schnittstelle besitzt oder verwendet den privaten Namen \"{1}\".", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "Der Typparameter \"{0}\" der öffentlichen Methode aus der exportierten Klasse besitzt oder verwendet den privaten Namen \"{1}\".", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "Der Typparameter \"{0}\" der öffentlichen statischen Methode aus der exportierten Klasse besitzt oder verwendet den privaten Namen \"{1}\".", "Type_parameter_declaration_expected_1139": "Eine Typparameterdeklaration wurde erwartet.", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "Type parameter declarations can only be used in TypeScript files.", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "Type parameter defaults can only reference previously declared type parameters.", "Type_parameter_list_cannot_be_empty_1098": "Die Typparameterliste darf nicht leer sein.", "Type_parameter_name_cannot_be_0_2368": "Der Name des Typparameters darf nicht \"{0}\" sein.", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "Typparameter dürfen nicht für eine Konstruktordeklaration verwendet werden.", "Type_predicate_0_is_not_assignable_to_1_1226": "Das Typprädikat \"{0}\" kann \"{1}\" nicht zugewiesen werden.", "Type_reference_directive_0_was_not_resolved_6120": "======== Die Typverweisdirektive \"{0}\" wurde nicht aufgelöst. ========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== Die Typverweisdirektive \"{0}\" wurde erfolgreich in \"{1}\" aufgelöst. Primär: {2}. ========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========", "Types_have_separate_declarations_of_a_private_property_0_2442": "Typen weisen separate Deklarationen einer privaten Eigenschaft \"{0}\" auf.", "Types_of_parameters_0_and_1_are_incompatible_2328": "Die Typen der Parameter \"{0}\" und \"{1}\" sind nicht kompatibel.", "Types_of_property_0_are_incompatible_2326": "Die Typen der Eigenschaft \"{0}\" sind nicht kompatibel.", @@ -967,10 +1215,18 @@ "Unexpected_token_1012": "Unerwartetes Token.", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "Unerwartetes Token. Ein Konstruktor, eine Methode, eine Zugriffsmethode oder eine Eigenschaft wurde erwartet.", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "Unerwartetes Token. Es wurde ein Typparametername ohne geschweifte Klammern erwartet.", + "Unexpected_token_Did_you_mean_or_gt_1382": "Unexpected token. Did you mean `{'>'}` or `>`?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "Unexpected token. Did you mean `{'}'}` or `}`?", "Unexpected_token_expected_1179": "Unerwartetes Token. \"{\" wurde erwartet.", + "Unknown_build_option_0_5072": "Unknown build option '{0}'.", + "Unknown_build_option_0_Did_you_mean_1_5077": "Unknown build option '{0}'. Did you mean '{1}'?", "Unknown_compiler_option_0_5023": "Unbekannte Compileroption \"{0}\".", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "Unknown compiler option '{0}'. Did you mean '{1}'?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "Unbekannte Option \"exclude\". Meinten Sie \"exclude\"?", "Unknown_type_acquisition_option_0_17010": "Unbekannte Option zur Typerfassung: {0}.", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "Unknown type acquisition option '{0}'. Did you mean '{1}'?", + "Unknown_watch_option_0_5078": "Unknown watch option '{0}'.", + "Unknown_watch_option_0_Did_you_mean_1_5079": "Unknown watch option '{0}'. Did you mean '{1}'?", "Unreachable_code_detected_7027": "Es wurde unerreichbarer Code erkannt.", "Unsupported_locale_0_6049": "Nicht unterstütztes Gebietsschema \"{0}\".", "Unterminated_Unicode_escape_sequence_1199": "Nicht abgeschlossene Unicode-Escapesequenz.", @@ -980,34 +1236,52 @@ "Unterminated_template_literal_1160": "Nicht abgeschlossenes Vorlagenliteral.", "Untyped_function_calls_may_not_accept_type_arguments_2347": "Nicht typisierte Funktionsaufrufe dürfen keine Typargumente annehmen.", "Unused_label_7028": "Nicht verwendete Bezeichnung.", + "Updating_output_of_project_0_6373": "Updating output of project '{0}'...", "Updating_output_timestamps_of_project_0_6359": "Ausgabezeitstempel von Projekt \"{0}\" werden aktualisiert...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "Updating unchanged output timestamps of project '{0}'...", "Use_synthetic_default_member_95016": "Verwenden Sie den synthetischen Member \"default\".", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "Das Verwenden einer Zeichenfolge in einer for...of-Anweisung wird nur in ECMAScript 5 oder höher unterstützt.", + "Using_compiler_options_of_project_reference_redirect_0_6215": "Using compiler options of project reference redirect '{0}'.", "VERSION_6036": "VERSION", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "Der Wert des Typs \"{0}\" verfügt über keine gemeinsamen Eigenschaften mit dem Typ \"{1}\". Wollten Sie ihn aufrufen?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "Der Wert des Typs \"{0}\" kann nicht aufgerufen werden. Wollten Sie \"new\" einschließen?", "Variable_0_implicitly_has_an_1_type_7005": "Die Variable \"{0}\" weist implizit einen Typ \"{1}\" auf.", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage.", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "Die Variable \"{0}\" weist an manchen Stellen implizit den Typ \"{1}\" auf, an denen der Typ nicht ermittelt werden kann.", "Variable_0_is_used_before_being_assigned_2454": "Die Variable \"{0}\" wird vor ihrer Zuweisung verwendet.", "Variable_declaration_expected_1134": "Eine Variablendeklaration wurde erwartet.", "Variable_declaration_list_cannot_be_empty_1123": "Die Variablendeklarationsliste darf nicht leer sein.", "Version_0_6029": "Version {0}", "Watch_input_files_6005": "Eingabedateien überwachen.", + "Watch_option_0_requires_a_value_of_type_1_5080": "Watch option '{0}' requires a value of type {1}.", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "Gibt an, ob eine veraltete Konsolenausgabe im Überwachungsmodus beibehalten wird, statt den Bildschirm zu löschen.", + "Wrap_invalid_character_in_an_expression_container_95101": "Wrap invalid character in an expression container", + "You_cannot_rename_a_module_via_a_global_import_8031": "You cannot rename a module via a global import.", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "Sie können keine Elemente umbenennen, die in der TypeScript-Standardbibliothek definiert sind.", "You_cannot_rename_this_element_8000": "Sie können dieses Element nicht umbenennen.", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "\"{0}\" akzeptiert zu wenige Argumente, um hier als Decorator verwendet zu werden. Wollten Sie es zuerst aufrufen und \"@{0}()\" schreiben?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "'{0}' and '{1}' operations cannot be mixed without parentheses.", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "\"{0}\" ist zweimal angegeben. Das Attribut mit dem Namen \"{0}\" wird überschrieben.", - "_0_can_only_be_used_in_a_ts_file_8009": "\"{0}\" kann nur in einer TS-Datei verwendet werden.", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "'{0}' cannot be used as a value because it was exported using 'export type'.", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "'{0}' cannot be used as a value because it was imported using 'import type'.", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'.", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "'{0}' declarations can only be used in TypeScript files.", "_0_expected_1005": "\"{0}\" wurde erwartet.", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage.", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "\"{0}\" weist implizit den Typ \"any\" auf, weil keine Rückgabetypanmerkung vorhanden ist und darauf direkt oder indirekt in einem der Rückgabeausdrücke des Objekts verwiesen wird.", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "\"{0}\" weist implizit den Typ \"any\" auf, weil keine Typanmerkung vorhanden ist und darauf direkt oder indirekt im eigenen Initialisierer verwiesen wird.", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "\"{0}\" ist ein primitiver Typ, aber \"{1}\" ist ein Wrapperobjekt. Verwenden Sie vorzugsweise \"{0}\", wenn möglich.", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'.", "_0_is_declared_but_its_value_is_never_read_6133": "\"{0}\" ist deklariert, aber der zugehörige Wert wird nie gelesen.", "_0_is_declared_but_never_used_6196": "\"{0}\" ist deklariert, wird aber nie verwendet.", + "_0_is_declared_here_2728": "'{0}' is declared here.", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor.", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property.", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "\"{0}\" ist keine gültige Metaeigenschaft für das Schlüsselwort \"{1}\". Meinten Sie \"{2}\"?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "Auf \"{0}\" wird direkt oder indirekt im eigenen Basisausdruck verwiesen.", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "Auf \"{0}\" wird direkt oder indirekt in der eigenen Typanmerkung verwiesen.", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}' is specified more than once, so this usage will be overwritten.", "_0_list_cannot_be_empty_1097": "Die {0}-Liste darf nicht leer sein.", "_0_modifier_already_seen_1030": "Der {0}-Modifizierer ist bereits vorhanden.", "_0_modifier_cannot_appear_on_a_class_element_1031": "Der Modifizierer \"{0}\" darf nicht für ein Klassenelement verwendet werden.", @@ -1021,17 +1295,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "Der Modifizierer \"{0}\" kann nicht in einem Umgebungskontext verwendet werden.", "_0_modifier_cannot_be_used_with_1_modifier_1243": "Der Modifizierer \"{0}\" darf nicht mit dem Modifizierer \"{1}\" verwendet werden.", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "Der Modifizierer \"{0}\" darf nicht mit einer Klassendeklaration verwendet werden.", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "'{0}' modifier cannot be used with a private identifier", "_0_modifier_must_precede_1_modifier_1029": "Der Modifizierer \"{0}\" muss dem Modifizierer \"{1}\" vorangestellt sein.", + "_0_needs_an_explicit_type_annotation_2782": "'{0}' needs an explicit type annotation.", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "\"{0}\" bezieht sich nur auf einen Typ, wird hier jedoch als Namespace verwendet.", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "\"{0}\" bezieht sich nur auf einen Typ, wird aber hier als Wert verwendet.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "\"{0}\" bezieht sich auf eine globale UMD, die aktuelle Datei ist jedoch ein Modul. Ziehen Sie in Betracht, stattdessen einen Import hinzuzufügen.", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "'{0}' refers to a value, but is being used as a type here.", "_0_tag_already_specified_1223": "Das Tag \"{0}\" wurde bereits angegeben.", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "Das Tag \"{0}\" kann nicht unabhängig als ein JSDoc-Tag der obersten Ebene verwendet werden.", + "_0_was_also_declared_here_6203": "'{0}' was also declared here.", + "_0_was_exported_here_1377": "'{0}' was exported here.", + "_0_was_imported_here_1376": "'{0}' was imported here.", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "\"{0}\" ohne Rückgabetypanmerkung weist implizit einen Rückgabetyp \"{1}\" auf.", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type.", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "Der Modifizierer \"abstract\" darf nur für eine Klassen-, Methoden- oder Eigenschaftendeklaration verwendet werden.", - "await_expression_is_only_allowed_within_an_async_function_1308": "Der Ausdruck \"await\" ist nur in einer asynchronen Funktion zulässig.", + "and_here_6204": "and here.", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "'await' expressions are only allowed within async functions and at the top levels of modules.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "await-Ausdrücke dürfen nicht in einem Parameterinitialisierer verwendet werden.", + "await_has_no_effect_on_the_type_of_this_expression_80007": "'await' has no effect on the type of this expression.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "Die Option \"baseUrl\" ist auf \"{0}\" festgelegt. Dieser Wert wird verwendet, um den nicht relativen Modulnamen \"{1}\" aufzulösen.", + "can_only_be_used_at_the_start_of_a_file_18026": "'#!' can only be used at the start of a file.", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "\"=\" kann nur in einer Objektliteraleigenschaft innerhalb eines Destrukturierungszuweisung verwendet werden.", "case_or_default_expected_1130": "\"case\" oder \"default\" wurde erwartet.", "class_expressions_are_not_currently_supported_9003": "class-Ausdrücke werden zurzeit nicht unterstützt.", @@ -1039,11 +1325,12 @@ "const_declarations_must_be_initialized_1155": "const-Deklarationen müssen initialisiert werden.", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "Der const-Enumerationsmemberinitialisierer wurde in einen unendlichen Wert ausgewertet.", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "Der const-Enumerationsmemberinitialisierer wurde in den unzulässigen Wert \"NaN\" ausgewertet.", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "const enum member initializers can only contain literal values and other computed enum values.", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "const-Enumerationen können nur in Eigenschaften- bzw. Indexzugriffsausdrücken oder auf der rechten Seite einer Importdeklaration oder Exportzuweisung verwendet werden.", + "constructor_is_a_reserved_word_18012": "'#constructor' is a reserved word.", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "\"delete\" kann für einen Bezeichner im Strict-Modus nicht aufgerufen werden.", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "Dies löschen – Projekt \"{0}\" ist auf dem neuesten Stand, da es bereits zuvor erstellt wurde", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "enum-Deklarationen können nur in einer TS-Datei verwendet werden.", - "export_can_only_be_used_in_a_ts_file_8003": "\"export=\" kann nur in einer TS-Datei verwendet werden.", + "export_can_only_be_used_in_TypeScript_files_8003": "'export =' can only be used in TypeScript files.", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "Der Modifizierer \"export\" kann nicht auf Umgebungsmodule und Modulerweiterungen angewendet werden, da diese immer sichtbar sind.", "extends_clause_already_seen_1172": "Die extends-Klausel ist bereits vorhanden.", "extends_clause_must_precede_implements_clause_1173": "Die extends-Klausel muss der implements-Klausel vorangestellt sein.", @@ -1053,23 +1340,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "Die get- und set-Accessoren müssen den gleichen this-Typ aufweisen.", "get_and_set_accessor_must_have_the_same_type_2380": "Die get- und set-Zugriffsmethoden müssen den gleichen Typ aufweisen.", "implements_clause_already_seen_1175": "Die implements-Klausel ist bereits vorhanden.", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "\"implements clauses\" kann nur in einer TS-Datei verwendet werden.", - "import_can_only_be_used_in_a_ts_file_8002": "\"import... =\" kann nur in einer TS-Datei verwendet werden.", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "'implements' clauses can only be used in TypeScript files.", + "import_can_only_be_used_in_TypeScript_files_8002": "'import ... =' can only be used in TypeScript files.", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "infer-Deklarationen sind nur in der extends-Klausel eines bedingten Typs zulässig.", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "\"interface declarations\" kann nur in einer TS-Datei verwendet werden.", "let_declarations_can_only_be_declared_inside_a_block_1157": "let-Deklarationen können nur innerhalb eines Blocks deklariert werden.", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "\"let\" darf nicht als Name in let- oder const-Deklarationen verwendet werden.", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "\"module declarations\" kann nur in einer TS-Datei verwendet werden.", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "\"new T[]\" kann nicht zum Erstellen eines Arrays verwendet werden. Verwenden Sie stattdessen \"new Array()\".", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "Der new-Ausdruck, in dessen Ziel eine Konstruktsignatur fehlt, weist implizit einen Typ \"any\" auf.", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "Assertions, die nicht NULL sind, können nur in einer TS-Datei verwendet werden.", "options_6024": "Optionen", "or_expected_1144": "\"{\" oder \";\" wurde erwartet.", "package_json_does_not_have_a_0_field_6100": "\"package.json\" besitzt kein \"{0}\"-Feld.", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "'package.json' does not have a 'typesVersions' entry that matches version '{0}'.", + "package_json_had_a_falsy_0_field_6220": "'package.json' had a falsy '{0}' field.", "package_json_has_0_field_1_that_references_2_6101": "\"package.json\" weist das {0}-Feld \"{1}\" auf, das auf \"{2}\" verweist.", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "\"parameter modifiers\" kann nur in einer TS-Datei verwendet werden.", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range.", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'.", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "'package.json' has a 'typesVersions' field with version-specific path mappings.", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "Die Option \"paths\" wurde angegeben. Es wird nach einem Muster gesucht, das mit dem Modulnamen \"{0}\" übereinstimmt.", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "Der Modifizierer \"readonly\" darf nur für eine Eigenschaftendeklaration oder Indexsignatur verwendet werden.", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "'readonly' type modifier is only permitted on array and tuple literal types.", "require_call_may_be_converted_to_an_import_80005": "Der Aufruf von \"require\" kann in einen Aufruf von \"import\" konvertiert werden.", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "Die Option \"rootDirs\" wurde festgelegt. Sie wird zum Auflösen des relativen Modulnamens \"{0}\" verwendet.", "super_can_only_be_referenced_in_a_derived_class_2335": "Auf \"super\" kann nur in einer abgeleiteten Klasse verwiesen werden.", @@ -1077,6 +1365,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "Auf \"super\" kann nicht in einem berechneten Eigenschaftennamen verwiesen werden.", "super_cannot_be_referenced_in_constructor_arguments_2336": "Auf \"super\" kann nicht in Konstruktorargumenten verwiesen werden.", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "\"super\" ist nur in Membern von Objektliteralausdrücken zulässig, wenn die Option \"target\" den Wert \"ES2015\" oder höher aufweist.", + "super_may_not_use_type_arguments_2754": "'super' may not use type arguments.", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "Vor dem Zugriff auf eine Eigenschaft von \"super\" im Konstruktor einer abgeleiteten Klasse muss \"super\" aufgerufen werden.", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "\"super\" muss vor dem Zugreifen auf \"this\" im Konstruktor einer abgeleiteten Klasse aufgerufen werden.", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "Auf \"super\" muss eine Argumentliste oder Memberzugriff folgen.", @@ -1087,14 +1376,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "Auf \"this\" kann nicht in Konstruktorargumenten verwiesen werden.", "this_cannot_be_referenced_in_current_location_2332": "Auf \"this\" kann am aktuellen Speicherort nicht verwiesen werden.", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "\"this\" weist implizit den Typ \"any\" auf, weil keine Typanmerkung vorhanden ist.", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "\"type aliases\" kann nur in einer TS-Datei verwendet werden.", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "Typargumente können nur in einer TS-Datei verwendet werden.", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "\"type assertion expressions\" kann nur in einer TS-Datei verwendet werden.", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "\"type parameter declarations\" kann nur in einer TS-Datei verwendet werden.", - "types_can_only_be_used_in_a_ts_file_8010": "\"types\" kann nur in einer TS-Datei verwendet werden.", "unique_symbol_types_are_not_allowed_here_1335": "\"unique symbol\"-Typen sind hier nicht zulässig.", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "\"unique symbol\"-Typen sind nur für Variablen in einer Variablenanweisung zulässig.", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "\"unique symbol\"-Typen dürfen für eine Variablendeklaration mit einem Bindungsnamen nicht verwendet werden.", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "'use strict' directive cannot be used with non-simple parameter list.", + "use_strict_directive_used_here_1349": "'use strict' directive used here.", "with_statements_are_not_allowed_in_an_async_function_block_1300": "with-Anweisungen sind in einem asynchronen Funktionsblock unzulässig.", "with_statements_are_not_allowed_in_strict_mode_1101": "this-Anweisungen sind im Strict-Modus unzulässig.", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "yield-Ausdrücke dürfen nicht in einem Parameterinitialisierer verwendet werden." diff --git a/lib/es/diagnosticMessages.generated.json b/lib/es/diagnosticMessages.generated.json index c0ce6ef5b8d6a..f78d79ac50105 100644 --- a/lib/es/diagnosticMessages.generated.json +++ b/lib/es/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "Un modificador '{0}' no se puede usar con una declaración de importación.", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "Un modificador '{0}' no se puede usar con una declaración de interfaz.", "A_0_parameter_must_be_the_first_parameter_2680": "El parámetro \"{0}\" debe ser el primer parámetro.", + "A_bigint_literal_cannot_use_exponential_notation_1352": "Un literal bigint no puede usar la notación exponencial.", + "A_bigint_literal_must_be_an_integer_1353": "Un literal bigint debe ser un entero.", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "Un parámetro de patrón de enlace no puede ser opcional en una signatura de implementación.", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "Una instrucción \"break\" solo se puede usar dentro de una iteración envolvente o en una instrucción switch.", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "Una instrucción \"break\" solo puede saltar a una etiqueta de una instrucción envolvente.", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "Una clase solo puede implementar un identificador o nombre completo con argumentos de tipo opcional.", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "Una clase solo puede implementar un tipo de objeto o una intersección de tipos de objeto con miembros conocidos estáticamente.", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "Una declaración de clase sin el modificador \"default\" debe tener un nombre.", "A_class_may_only_extend_another_class_2311": "Una clase solo puede extender otra clase.", - "A_class_may_only_implement_another_class_or_interface_2422": "Una clase solo puede implementar otra clase o interfaz.", "A_class_member_cannot_have_the_0_keyword_1248": "Un miembro de clase no puede tener la palabra clave '{0}'.", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "No se admite una expresión de coma en un nombre de propiedad calculada.", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "Un nombre de propiedad calculada no puede hacer referencia a un parámetro de tipo desde su tipo contenedor.", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "Un nombre de propiedad calculada en una interfaz debe hacer referencia a una expresión que sea de tipo literal o \"unique symbol\".", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "Un nombre de propiedad calculada debe ser de tipo \"string\", \"number\", \"symbol\" o \"any\".", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "Un nombre de propiedad calculada con el formato '{0}' debe ser de tipo \"symbol\".", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "Las aserciones \"const\" solo pueden aplicarse a las referencias a miembros de enumeración o a literales de cadena, numéricos, booleanos, de matriz o de objeto.", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "Solo se puede acceder a un miembro de enumeración const mediante un literal de cadena.", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "Un inicializador 'const' en un contexto de ambiente debe ser un literal de cadena o numérico.", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "Un inicializador \"const\" en un contexto de ambiente debe ser un literal de cadena o numérico o bien una referencia de enumeración de literal.", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "Un constructor no puede contener una llamada a \"super\" si su clase extiende \"null\".", "A_constructor_cannot_have_a_this_parameter_2681": "Un constructor no puede tener un parámetro 'this'.", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "Una instrucción \"continue\" solo se puede usar en una instrucción de iteración envolvente.", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "Una instrucción \"continue\" solo puede saltar a una etiqueta de una instrucción de iteración envolvente.", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "Un modificador \"declare\" no se puede usar en un contexto de ambiente.", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": "Se necesita un modificador \"declare\" para una declaración de nivel superior de un archivo .d.ts.", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "Un decorador solo puede modificar la implementación de un método, no una sobrecarga.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "Una cláusula \"default\" no puede aparecer más de una vez en una instrucción \"switch\".", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "Solo se puede usar una exportación predeterminada en un módulo de estilo ECMAScript.", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "Un generador no puede tener una anotación de tipo \"void\".", "A_get_accessor_cannot_have_parameters_1054": "Un descriptor de acceso \"get\" no puede tener parámetros.", "A_get_accessor_must_return_a_value_2378": "Un descriptor de acceso \"get\" debe devolver un valor.", + "A_label_is_not_allowed_here_1344": "'A label is not allowed here.", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Un inicializador de miembro de una declaración de enumeración no puede hacer referencia a los miembros que se declaran después de este, incluidos aquellos definidos en otras enumeraciones.", + "A_method_cannot_be_named_with_a_private_identifier_18022": "No se puede denominar un método con un identificador privado.", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Una clase mixin debe tener un constructor con un solo parámetro rest de tipo \"any[]\"", "A_module_cannot_have_multiple_default_exports_2528": "Un módulo no puede tener varias exportaciones predeterminadas.", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Una declaración de espacio de nombres no puede estar en un archivo distinto de una clase o función con la que se combina.", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Una declaración de espacio de nombres no se puede situar antes que una clase o función con la que se combina.", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "Una declaración de espacio de nombres solo se permite en un espacio de nombres o en un módulo.", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "No se puede llamar o construir una importación de estilo de espacio de nombres, y provocará un error en tiempo de ejecución.", "A_non_dry_build_would_build_project_0_6357": "Una compilación no -dry compilaría el proyecto \"{0}\"", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Una compilación no -dry eliminaría los archivos siguientes: {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "A non-dry build would update output of project '{0}'", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "A non-dry build would update timestamps for output of project '{0}'", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "Un inicializador de parámetros solo se permite en una implementación de función o de constructor.", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "Una propiedad de parámetro no se puede declarar mediante un parámetro rest.", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "Una propiedad de parámetro solo se permite en una implementación de constructor.", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "Una promesa debe tener un método \"then\".", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "Una propiedad de una clase cuyo tipo sea \"unique symbol\" debe ser \"static\" y \"readonly\".", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "Una propiedad de una interfaz o un literal de tipo cuyo tipo sea \"unique symbol\" debe ser \"readonly\".", + "A_required_element_cannot_follow_an_optional_element_1257": "Un elemento obligatorio no puede seguir a un elemento opcional.", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "Un parámetro obligatorio no puede seguir a un parámetro opcional.", "A_rest_element_cannot_contain_a_binding_pattern_2501": "Un elemento rest no puede contener un patrón de enlace.", "A_rest_element_cannot_have_a_property_name_2566": "Un elemento rest no puede tener un nombre de propiedad.", "A_rest_element_cannot_have_an_initializer_1186": "Un elemento rest no puede tener un inicializador.", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "Un elemento rest debe ser el último en un patrón de desestructuración.", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "Un elemento rest debe ser el último en un tipo de tupla.", + "A_rest_element_type_must_be_an_array_type_2574": "Un tipo de elemento rest debe ser de un tipo de matriz.", "A_rest_parameter_cannot_be_optional_1047": "Un parámetro rest no puede ser opcional.", "A_rest_parameter_cannot_have_an_initializer_1048": "Un parámetro rest no puede tener un inicializador.", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "Un parámetro rest debe ser el último de una lista de parámetros.", @@ -77,13 +85,13 @@ "A_set_accessor_must_have_exactly_one_parameter_1049": "Un descriptor de acceso \"set\" debe tener exactamente un parámetro.", "A_set_accessor_parameter_cannot_have_an_initializer_1052": "Un parámetro de descriptor de acceso \"set\" no puede tener un inicializador.", "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381": "Una signatura con una implementación no puede usar un tipo de literal de cadena.", - "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "Una llamada a \"super\" debe ser la primera instrucción del constructor cuando una clase contiene propiedades inicializadas o tiene propiedades de parámetro.", + "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "Una llamada a \"super\" debe ser la primera instrucción del constructor cuando una clase contiene propiedades inicializadas, propiedades de parámetro o identificadores privados.", "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "Una restricción de tipo basada en 'this' no es compatible con una restricción de tipo basada en un parámetro.", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "El tipo \"this\" solo está disponible en un miembro no estático de una clase o interfaz.", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "Ya hay un archivo \"tsconfig.json\" definido en: '{0}'.", - "A_tuple_type_element_list_cannot_be_empty_1122": "Una lista de elementos de tipo de tupla no puede estar vacía.", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "No se admite una expresión de aserción de tipo en el lado izquierdo de una expresión de exponenciación. Considere la posibilidad de incluir la expresión entre paréntesis.", "A_type_literal_property_cannot_have_an_initializer_1247": "Una propiedad de literal de tipo no puede tener un inicializador.", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "A type-only import can specify a default import or named bindings, but not both.", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "Un predicado de tipo no puede hacer referencia a un parámetro rest.", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "Un predicado de tipo no puede hacer referencia al elemento '{0}' de un patrón de enlace.", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "En las funciones y los métodos, un predicado de tipo solo se permite en la posición de tipo de valor devuelto.", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "Agregar \"{0}\" a una declaración de importación existente desde \"{1}\"", "Add_0_to_unresolved_variable_90008": "Agregar \"{0}.\" a una variable no resuelta", "Add_all_missing_async_modifiers_95041": "Agregar todos los modificadores \"async\" que faltan", + "Add_all_missing_imports_95064": "Agregar todas las importaciones que faltan", "Add_all_missing_members_95022": "Agregar todos los miembros que faltan", "Add_all_missing_super_calls_95039": "Agregar todas las llamadas a super que faltan", "Add_async_modifier_to_containing_function_90029": "Agregar el modificador async a la función contenedora", + "Add_await_95083": "Agregar \"await\"", + "Add_await_to_initializer_for_0_95084": "Agregar \"await\" al inicializador de \"{0}\"", + "Add_await_to_initializers_95089": "Agregar \"await\" a los inicializadores", "Add_braces_to_arrow_function_95059": "Agregar llaves a la función de flecha", + "Add_const_to_all_unresolved_variables_95082": "Agregar \"const\" a todas las variables no resueltas", + "Add_const_to_unresolved_variable_95081": "Agregar \"const\" a una variable no resuelta", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "Agregar la importación \"{0}\" predeterminada a la declaración de importación existente de \"{1}\"", "Add_definite_assignment_assertion_to_property_0_95020": "Agregar aserción de asignación definitiva a la propiedad \"{0}\"", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "Agregar aserciones de asignación definitiva a todas las propiedades sin inicializar", + "Add_export_to_make_this_file_into_a_module_95097": "Agregar \"export {}\" para introducir este archivo en un módulo", "Add_index_signature_for_property_0_90017": "Agregar una signatura de índice para la propiedad \"{0}\"", "Add_initializer_to_property_0_95019": "Agregar inicializador a la propiedad \"{0}\"", "Add_initializers_to_all_uninitialized_properties_95027": "Agregar inicializadores a todas las propiedades sin inicializar", + "Add_missing_enum_member_0_95063": "Agregar el miembro de enumeración \"{0}\" que falta", + "Add_missing_new_operator_to_all_calls_95072": "Agregar el operador \"new\" que falta a todas las llamadas", + "Add_missing_new_operator_to_call_95071": "Agregar el operador \"new\" que falta a la llamada", "Add_missing_super_call_90001": "Agregar la llamada a \"super()\" que falta", "Add_missing_typeof_95052": "Agregar el elemento \"typeof\" que falta", + "Add_names_to_all_parameters_without_names_95073": "Agregar nombres a todos los parámetros sin nombre", "Add_or_remove_braces_in_an_arrow_function_95058": "Agregar o quitar llaves en una función de flecha", + "Add_parameter_name_90034": "Agregar un nombre de parámetro", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "Agregar un calificador a todas las variables no resueltas que coincidan con un nombre de miembro", "Add_to_all_uncalled_decorators_95044": "Agregar \"()\" a todos los elementos Decorator a los que no se llama", "Add_ts_ignore_to_all_error_messages_95042": "Agregar \"@ts-ignore\" a todos los mensajes de error", "Add_undefined_type_to_all_uninitialized_properties_95029": "Agregar un tipo no definido a todas las propiedades sin inicializar", "Add_undefined_type_to_property_0_95018": "Agregar un tipo \"undefined\" a la propiedad \"{0}\"", + "Add_unknown_conversion_for_non_overlapping_types_95069": "Agregar una conversión \"unknown\" para los tipos que no se superponen", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "Agregar \"unknown\" a todas las conversiones de tipos que no se superponen", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "Agregar un archivo tsconfig.json ayuda a organizar los proyectos que contienen archivos TypeScript y JavaScript. Más información en https://aka.ms/tsconfig.", "Additional_Checks_6176": "Comprobaciones adicionales", "Advanced_Options_6178": "Opciones avanzadas", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "Todas las declaraciones de '{0}' deben tener parámetros de tipo idénticos.", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "Todas las declaraciones de un método abstracto deben ser consecutivas.", "All_destructured_elements_are_unused_6198": "Todos los elementos desestructurados están sin utilizar.", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "Todos los archivos deben ser módulos si se proporciona la marca \"--isolatedModules\".", "All_imports_in_import_declaration_are_unused_6192": "Todas las importaciones de la declaración de importación están sin utilizar.", + "All_type_parameters_are_unused_6205": "All type parameters are unused", "All_variables_are_unused_6199": "Todas las variables son no utilizadas.", + "Allow_accessing_UMD_globals_from_modules_95076": "Allow accessing UMD globals from modules.", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "Permitir las importaciones predeterminadas de los módulos sin exportación predeterminada. Esto no afecta a la emisión de código, solo a la comprobación de tipos.", "Allow_javascript_files_to_be_compiled_6102": "Permitir que se compilen los archivos de JavaScript.", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "No se permiten enumeraciones const de ambiente cuando se proporciona la marca \"--isolatedModules\".", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "El nombre de archivo \"{0}\" ya incluido es diferente del nombre de archivo \"{1}\" solo en el uso de mayúsculas y minúsculas.", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "La declaración de módulo de ambiente no puede especificar un nombre de módulo relativo.", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "Los módulos de ambiente no se pueden anidar en otros módulos o espacios de nombres.", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "Un módulo AMD no puede tener varias asignaciones de nombre.", "An_abstract_accessor_cannot_have_an_implementation_1318": "Un descriptor de acceso abstracto no puede tener una implementación.", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "Un descriptor de acceso no se puede declarar en un contexto de ambiente.", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "No se puede usar un modificador de accesibilidad con un identificador privado.", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "No se puede denominar un descriptor de acceso con un identificador privado.", "An_accessor_cannot_have_type_parameters_1094": "Un descriptor de acceso no puede tener parámetros de tipo.", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "Una declaración de módulo de ambiente solo se permite en el nivel superior de un archivo.", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "Un operando aritmético debe ser de tipo \"any\", \"number\" o un tipo de enumeración.", + "An_argument_for_0_was_not_provided_6210": "No se proporcionó ningún argumento para \"{0}\".", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "No se proporcionó ningún argumento que coincida con este patrón de enlace.", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "Un operando aritmético debe ser de tipo \"any\", \"number\", \"bigint\" o un tipo de enumeración.", + "An_arrow_function_cannot_have_a_this_parameter_2730": "Una función de flecha no puede tener un parámetro \"this\".", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "Una función o un método de asincronía en ES5/ES3 requiere el constructor \"Promise\". Asegúrese de que tiene una declaración para el constructor \"Promise\" o incluya \"ES2015\" en su opción \"--lib\".", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "Una función o un método asincrónico deben tener un tipo de valor devuelto válido que admita await.", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "Una función o un método asincrónicos deben devolver una \"promesa\". Asegúrese de que hay una declaración de \"promesa\" o incluya \"ES2015\" en la opción \"--lib\".", "An_async_iterator_must_have_a_next_method_2519": "Un iterador de asincronía debe tener un método \"next()\".", "An_element_access_expression_should_take_an_argument_1011": "Una expresión de acceso de elemento debe admitir un argumento.", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "No se puede denominar un miembro de enumeración con un identificador privado.", "An_enum_member_cannot_have_a_numeric_name_2452": "Un miembro de enumeración no puede tener un nombre numérico.", + "An_enum_member_name_must_be_followed_by_a_or_1357": "El nombre de un miembro de enumeración debe ir seguido de \",\", \"=\" o \"}\".", "An_export_assignment_can_only_be_used_in_a_module_1231": "Una asignación de exportación solo se puede usar en un módulo.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Una asignación de exportación no se puede usar en un módulo con otros elementos exportados.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Una asignación de exportación no se puede usar en espacios de nombres.", "An_export_assignment_cannot_have_modifiers_1120": "Una asignación de exportación no puede tener modificadores.", "An_export_declaration_can_only_be_used_in_a_module_1233": "Una declaración de exportación solo se puede usar en un módulo.", "An_export_declaration_cannot_have_modifiers_1193": "Una declaración de exportación no puede tener modificadores.", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "No se puede probar la veracidad de una expresión de tipo \"void\".", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "Un valor de escape Unicode extendido debe estar entre 0x0 y 0x10FFFF, incluidos.", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "Un identificador o una palabra clave no puede seguir inmediatamente a un literal numérico.", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "Una implementación no se puede declarar en contextos de ambiente.", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "An import alias cannot reference a declaration that was exported using 'export type'.", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "An import alias cannot reference a declaration that was imported using 'import type'.", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "Una declaración de importación solo se puede usar en un espacio de nombres o un módulo.", "An_import_declaration_cannot_have_modifiers_1191": "Una declaración de importación no puede tener modificadores.", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "Una ruta de acceso de importación no puede terminar con una extensión '{0}'. Puede importar '{1}' en su lugar.", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "Un parámetro de signatura de índice debe tener una anotación de tipo.", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "Un tipo de parámetro de firma de índice no puede ser un alias de tipo. Considere la posibilidad de escribir en su lugar \"[{0}: {1}]: {2}\".", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "Un tipo de parámetro de firma de índice no puede ser un tipo de unión. Considere la posibilidad de usar en su lugar un tipo de objeto asignado.", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "El tipo de un parámetro de signatura de índice debe ser \"string\" o \"number\".", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "El tipo de un parámetro de signatura de índice debe ser \"string\" o \"number\".", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "Una interfaz solo puede extender un identificador o nombre completo con argumentos de tipo opcional.", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "Una interfaz solo puede extender una clase u otra interfaz.", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "An interface can only extend an object type or intersection of object types with statically known members.", "An_interface_property_cannot_have_an_initializer_1246": "Una propiedad de interfaz no puede tener un inicializador.", "An_iterator_must_have_a_next_method_2489": "Un iterador debe tener un método \"next()\".", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "Un literal de objeto no puede tener varios descriptores de acceso get o set con el mismo nombre.", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "Un literal de objeto no puede tener varias propiedades con el mismo nombre en modo strict.", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "Un literal de objeto no puede tener una propiedad y un descriptor de acceso con el mismo nombre.", "An_object_member_cannot_be_declared_optional_1162": "Un miembro de objeto no se puede declarar como opcional.", + "An_optional_chain_cannot_contain_private_identifiers_18030": "An optional chain cannot contain private identifiers.", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "An outer value of 'this' is shadowed by this container.", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "Una signatura de sobrecarga no se puede declarar como generador.", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "No se admite una expresión unaria con el operador '{0}' en el lado izquierdo de una expresión de exponenciación. Considere la posibilidad de incluir la expresión entre paréntesis.", "Annotate_everything_with_types_from_JSDoc_95043": "Anotar todo con tipos de JSDoc", "Annotate_with_type_from_JSDoc_95009": "Anotar con tipo de JSDoc", "Annotate_with_types_from_JSDoc_95010": "Anotar con tipos de JSDoc", + "Another_export_default_is_here_2753": "Another export default is here.", + "Are_you_missing_a_semicolon_2734": "¿Falta un punto y coma?", "Argument_expression_expected_1135": "Se esperaba una expresión de argumento.", "Argument_for_0_option_must_be_Colon_1_6046": "El argumento para la opción \"{0}\" debe ser {1}.", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "No se puede asignar un argumento de tipo \"{0}\" al parámetro de tipo \"{1}\".", "Array_element_destructuring_pattern_expected_1181": "Se esperaba un patrón de desestructuración de elementos de matriz.", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "Assertions require every name in the call target to be declared with an explicit type annotation.", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "Assertions require the call target to be an identifier or qualified name.", "Asterisk_Slash_expected_1010": "Se esperaba \"*/\".", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "Los aumentos del ámbito global solo pueden anidarse directamente en módulos externos o en declaraciones de módulos de ambiente.", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "Los aumentos del ámbito global deben tener el modificador 'declare', a menos que aparezcan en un contexto de ambiente.", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "La detección automática de escritura está habilitada en el proyecto '{0}'. Se va a ejecutar un paso de resolución extra para el módulo '{1}' usando la ubicación de caché '{2}'.", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "Las expresiones de clase base no pueden hacer referencia a parámetros de tipo de clase.", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "El tipo de valor devuelto del constructor base '{0}' no es un tipo de clase o interfaz.", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members.", "Base_constructors_must_all_have_the_same_return_type_2510": "Todos los constructores base deben tener el mismo tipo de valor devuelto.", "Base_directory_to_resolve_non_absolute_module_names_6083": "Directorio base para resolver nombres de módulos no absolutos.", "Basic_Options_6172": "Opciones básicas", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "BigInt literals are not available when targeting lower than ES2020.", "Binary_digit_expected_1177": "Se esperaba un dígito binario.", "Binding_element_0_implicitly_has_an_1_type_7031": "El elemento de enlace '{0}' tiene un tipo '{1}' implícito.", "Block_scoped_variable_0_used_before_its_declaration_2448": "Variable con ámbito de bloque '{0}' usada antes de su declaración.", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "Compilar todos los proyectos, incluidos los que aparecen actualizados", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "Generar uno o varios proyectos y sus dependencias, si no están actualizados", + "Build_option_0_requires_a_value_of_type_1_5073": "La opción de compilación \"{0}\" requiere un valor de tipo {1}.", "Building_project_0_6358": "Compilando el proyecto \"{0}\"...", "Call_decorator_expression_90028": "Llamar a la expresión decorador", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "Call signature return types '{0}' and '{1}' are incompatible.", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "La signatura de llamada, que carece de una anotación de tipo de valor devuelto, tiene implícitamente un tipo de valor devuelto \"any\".", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Call_target_does_not_contain_any_signatures_2346": "El destino de llamada no contiene signaturas.", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "No se puede acceder a \"{0}.{1}\" porque \"{0}\" es un tipo, no un espacio de nombres. ¿Su intención era recuperar el tipo de la propiedad \"{1}\" en \"{0}\" con \"{0}[\"{1}\"]\"?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "Cannot access ambient const enums when the '--isolatedModules' flag is provided.", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "No se puede asignar un tipo de constructor '{0}' a un tipo de constructor '{1}'.", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "No se puede asignar un tipo de constructor abstracto a uno no abstracto.", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "No se puede asignar a '{0}' porque es una constante o una propiedad de solo lectura.", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "No se puede asignar a \"{0}\" porque es una constante.", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "No se puede asignar a \"{0}\" porque es una propiedad de solo lectura.", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "No se puede asignar a '{0}' porque no es una variable.", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "No se puede aumentar el módulo '{0}' porque se resuelve como una entidad que no es un módulo.", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "No se puede aumentar el módulo \"{0}\" con exportaciones de valores porque se resuelve como una entidad que no es un módulo.", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "No se pueden compilar los módulos con la opción '{0}' a no ser que la marca \"--module\" sea \"amd\" o \"system\".", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "Los espacios de nombres no se pueden compilar si se proporciona la marca \"--isolatedModules\".", "Cannot_create_an_instance_of_an_abstract_class_2511": "No se puede crear una instancia de una clase abstracta.", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'.", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "No se puede exportar '{0}'. Solo se pueden exportar declaraciones locales desde un módulo.", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "No se puede extender una clase '{0}'. El constructor de la clase está marcado como privado.", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "No se puede extender una interfaz '{0}'. ¿Quiso decir 'implements'?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "No se encuentra ningún archivo tsconfig.json en el directorio actual: {0}", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "No se encuentra ningún archivo tsconfig.json en el directorio especificado: \"{0}\".", "Cannot_find_global_type_0_2318": "No se encuentra el tipo '{0}' global.", "Cannot_find_global_value_0_2468": "No se encuentra el valor '{0}' global.", "Cannot_find_lib_definition_for_0_2726": "No se encuentra la definición lib para \"{0}\".", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "No se encuentra la definición lib para \"{0}\". ¿Quiso decir \"{1}\"?", "Cannot_find_module_0_2307": "No se encuentra el módulo '{0}'.", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension", "Cannot_find_name_0_2304": "No se encuentra el nombre '{0}'.", "Cannot_find_name_0_Did_you_mean_1_2552": "No se encuentra el nombre \"{0}\". ¿Quería decir \"{1}\"?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "No se encuentra el nombre '{0}'. ¿Quería decir el miembro de instancia 'this.{0}'?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "No se encuentra el nombre '{0}'. ¿Quería decir el miembro estático '{1}.{0}'?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery` and then add `jquery` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.", "Cannot_find_namespace_0_2503": "No se encuentra el espacio de nombres '{0}'.", "Cannot_find_parameter_0_1225": "No se encuentra el parámetro '{0}'.", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "No se encuentra la ruta de acceso de subdirectorio común para los archivos de entrada.", "Cannot_find_type_definition_file_for_0_2688": "No se puede encontrar el archivo de definición de tipo para '{0}'.", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "No se pueden importar archivos de declaración de tipos. Considere importar \"{0}\" en lugar de \"{1}\".", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "No se puede inicializar la variable '{0}' de ámbito externo en el mismo ámbito que la declaración '{1}' con ámbito de bloque.", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "No se puede invocar una expresión con un tipo sin signatura de llamada. El tipo '{0}' no tiene ninguna signatura de llamada compatible.", "Cannot_invoke_an_object_which_is_possibly_null_2721": "No se puede invocar un objeto que es posiblemente \"null\".", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "No se puede invocar un objeto que es posiblemente \"null\" o \"no definido\".", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "No se puede invocar un objeto que es posiblemente \"no definido\".", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'.", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "No se puede anteponer el proyecto \"{0}\" porque no se ha establecido \"outFile\".", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "No se puede volver a exportar un tipo si se proporciona la marca \"--isolatedModules\".", "Cannot_read_file_0_Colon_1_5012": "No se puede leer el archivo \"{0}\": {1}.", "Cannot_redeclare_block_scoped_variable_0_2451": "No se puede volver a declarar la variable con ámbito de bloque '{0}'.", "Cannot_redeclare_exported_variable_0_2323": "No se puede volver a declarar la variable '{0}' exportada.", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "No se puede volver a declarar el identificador \"{0}\" en la cláusula catch.", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "Cannot update output of project '{0}' because there was error reading file '{1}'", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "JSX no se puede usar si no se proporciona la marca \"--jsx\".", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "No se pueden usar importaciones, exportaciones o aumentos de módulos si el valor de \"--module\" es \"none\".", "Cannot_use_namespace_0_as_a_type_2709": "No se puede utilizar el espacio de nombres '{0}' como un tipo.", "Cannot_use_namespace_0_as_a_value_2708": "No se puede utilizar el espacio de nombres '{0}' como un valor.", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "No se puede usar \"new\" con una expresión cuyo tipo carece de una signatura de construcción o de llamada.", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "No se puede escribir en el archivo '{0}' porque se sobrescribiría con varios archivos de entrada.", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "No se puede escribir en el archivo '{0}' porque sobrescribiría el archivo de entrada.", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "La variable de la cláusula catch no puede tener una anotación de tipo.", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "Comprobando si '{0}' es el prefijo coincidente más largo para '{1}' - '{2}'.", "Circular_definition_of_import_alias_0_2303": "Definición circular del alias de importación '{0}'.", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "Se detectó circularidad al resolver la configuración: {0}", + "Circularity_originates_in_type_at_this_location_2751": "Circularity originates in type at this location.", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "La clase '{0}' define el descriptor de acceso del miembro de instancia como '{1}', pero la clase extendida '{2}' lo define como función miembro de instancia.", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "La clase '{0}' define la función miembro de instancia como '{1}', pero la clase extendida '{2}' la define como descriptor de acceso de miembro de instancia.", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "La clase '{0}' define la función miembro de instancia como '{1}', pero la clase extendida '{2}' la define como propiedad de miembro de instancia.", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "La clase '{0}' define la propiedad de miembro de instancia como '{1}', pero la clase extendida '{2}' la define como función miembro de instancia.", "Class_0_incorrectly_extends_base_class_1_2415": "La clase '{0}' extiende la clase base '{1}' de forma incorrecta.", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "La clase \"{0}\" no implementa correctamente la clase \"{1}\". ¿Pretendía extender \"{1}\" y heredar sus miembros como una subclase?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "El lado estático de la clase '{0}' extiende el lado estático de la clase base '{1}' de forma incorrecta.", "Classes_can_only_extend_a_single_class_1174": "Las clases solo pueden extender una clase única.", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "Las clases con métodos abstractos deben marcarse como abstractas.", + "Classes_may_not_have_a_field_named_constructor_18006": "Classes may not have a field named 'constructor'.", "Command_line_Options_6171": "Opciones de la línea de comandos", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "Compila el proyecto teniendo en cuenta la ruta de acceso a su archivo de configuración o a una carpeta con un archivo \"tsconfig.json\".", "Compiler_option_0_expects_an_argument_6044": "La opción '{0}' del compilador espera un argumento.", "Compiler_option_0_requires_a_value_of_type_1_5024": "La opción '{0}' del compilador requiere un valor de tipo {1}.", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "Compiler reserves name '{0}' when emitting private identifier downlevel.", "Composite_projects_may_not_disable_declaration_emit_6304": "Los proyectos compuestos no pueden deshabilitar la emisión de declaración.", + "Composite_projects_may_not_disable_incremental_compilation_6379": "Composite projects may not disable incremental compilation.", "Computed_property_names_are_not_allowed_in_enums_1164": "No se permiten nombres de propiedad calculada en las enumeraciones.", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "No se permiten valores calculados en una enumeración que tiene miembros con valores de cadena.", "Concatenate_and_emit_output_to_single_file_6001": "Concatenar y emitir la salida en un único archivo.", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "Se encontraron definiciones de '{0}' en conflicto en '{1}' y '{2}'. Puede instalar una versión específica de esta biblioteca para resolver el conflicto.", + "Conflicts_are_in_this_file_6201": "Conflicts are in this file.", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "Construct signature return types '{0}' and '{1}' are incompatible.", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "La signatura de construcción, que carece de una anotación de tipo de valor devuelto, tiene implícitamente un tipo de valor devuelto \"any\".", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Constructor_implementation_is_missing_2390": "Falta la implementación del constructor.", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "El constructor de la clase '{0}' es privado y solo es accesible desde la declaración de la clase.", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "El constructor de la clase '{0}' está protegido y solo es accesible desde la declaración de la clase.", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "Los constructores de las clases derivadas deben contener una llamada a \"super\".", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "El archivo contenedor no se ha especificado y no se puede determinar el directorio raíz. Se omitirá la búsqueda en la carpeta 'node_modules'.", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.", "Convert_0_to_mapped_object_type_95055": "Convertir \"{0}\" en el tipo de objeto asignado", "Convert_all_constructor_functions_to_classes_95045": "Convertir todas las funciones de constructor en clases", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "Convert all imports not used as a value to type-only imports", + "Convert_all_re_exported_types_to_type_only_exports_1365": "Convert all re-exported types to type-only exports", "Convert_all_require_to_import_95048": "Convertir todas las repeticiones de \"require\" en \"import\"", + "Convert_all_to_async_functions_95066": "Convert all to async functions", + "Convert_all_to_bigint_numeric_literals_95092": "Convert all to bigint numeric literals", "Convert_all_to_default_imports_95035": "Convertir todo en importaciones predeterminadas", + "Convert_const_to_let_95093": "Convertir \"const\" en \"let\"", + "Convert_default_export_to_named_export_95061": "Convertir una exportación predeterminada en exportación con nombre", "Convert_function_0_to_class_95002": "Convertir la función \"{0}\" en una clase", "Convert_function_to_an_ES2015_class_95001": "Convertir la función en una clase ES2015", + "Convert_invalid_character_to_its_html_entity_code_95100": "Convertir un carácter no válido a su código de entidad HTML", + "Convert_named_export_to_default_export_95062": "Convertir una exportación con nombre en exportación predeterminada", "Convert_named_imports_to_namespace_import_95057": "Convertir importaciones con nombre en una importación de espacio de nombres", "Convert_namespace_import_to_named_imports_95056": "Convertir una importación de espacio de nombres en importaciones con nombre", + "Convert_parameters_to_destructured_object_95075": "Convertir los parámetros en un objeto desestructurado", "Convert_require_to_import_95047": "Convertir \"require\" en \"import\"", "Convert_to_ES6_module_95017": "Convertir en módulo ES6", + "Convert_to_a_bigint_numeric_literal_95091": "Convertir en un literal numérico bigint", + "Convert_to_async_function_95065": "Convertir en función asincrónica", "Convert_to_default_import_95013": "Convertir en importación predeterminada", + "Convert_to_template_string_95096": "Convertir en cadena de plantilla", + "Convert_to_type_only_export_1364": "Convert to type-only export", + "Convert_to_type_only_import_1373": "Convertir en importación solo de tipo", "Corrupted_locale_file_0_6051": "Archivo de configuración regional {0} dañado.", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "No se encontró ningún archivo de declaración para el módulo '{0}'. '{1}' tiene un tipo \"any\" de forma implícita.", "Could_not_write_file_0_Colon_1_5033": "No se puede escribir en el archivo \"{0}\": \"{1}\".", "DIRECTORY_6038": "DIRECTORIO", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit.", "Declaration_expected_1146": "Se esperaba una declaración.", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "Conflictos entre nombres de declaración con el identificador global '{0}' integrado.", "Declaration_or_statement_expected_1128": "Se esperaba una declaración o una instrucción.", + "Declare_a_private_field_named_0_90053": "Declare a private field named '{0}'.", "Declare_method_0_90023": "Declarar el método \"{0}\"", "Declare_property_0_90016": "Declarar la propiedad \"{0}\"", "Declare_static_method_0_90024": "Declarar el método estático \"{0}\"", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "Los elementos Decorator no son válidos aquí.", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "No se pueden aplicar elementos Decorator a varios descriptores de acceso get o set con el mismo nombre.", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "La exportación predeterminada del módulo tiene o usa el nombre privado '{0}'.", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "Definite assignment assertions can only be used along with a type annotation.", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "Definitions of the following identifiers conflict with those in another file: {0}", "Delete_all_unused_declarations_95024": "Eliminar todas las declaraciones sin usar", "Delete_the_outputs_of_all_projects_6365": "Eliminar las salidas de todos los proyectos", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[En desuso] Use \"--jsxFactory\" en su lugar. Especifique el objeto invocado para createElement cuando el destino sea la emisión de JSX \"react\"", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[En desuso] Use \"--outFile\" en su lugar. Concatena y emite la salida en un solo archivo.", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[En desuso] Use \"--skipLibCheck\" en su lugar. Omite la comprobación de tipos de los archivos de declaración de biblioteca predeterminados.", + "Did_you_forget_to_use_await_2773": "¿Olvidó usar \"await\"?", + "Did_you_mean_0_1369": "Did you mean '{0}'?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?", + "Did_you_mean_to_call_this_expression_6212": "Did you mean to call this expression?", + "Did_you_mean_to_mark_this_function_as_async_1356": "Did you mean to mark this function as 'async'?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "Did you mean to parenthesize this function type?", + "Did_you_mean_to_use_new_with_this_expression_6213": "Did you mean to use 'new' with this expression?", "Digit_expected_1124": "Se esperaba un dígito.", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "El directorio \"{0}\" no existe, se omitirán todas las búsquedas en él.", "Disable_checking_for_this_file_90018": "Deshabilitar la comprobación para este archivo", "Disable_size_limitations_on_JavaScript_projects_6162": "Deshabilitar los límites de tamaño de proyectos de JavaScript.", + "Disable_solution_searching_for_this_project_6224": "Disable solution searching for this project.", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "Deshabilite la comprobación estricta de firmas genéricas en tipos de función.", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "Disable use of source files instead of declaration files from referenced projects.", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "No permitir referencias al mismo archivo con un uso incoherente de mayúsculas y minúsculas.", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "No agregar módulos importados ni referencias con triple barra diagonal a la lista de archivos compilados.", "Do_not_emit_comments_to_output_6009": "No emitir comentarios en la salida.", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "No notificar los errores de las etiquetas no usadas.", "Do_not_resolve_the_real_path_of_symlinks_6013": "No resolver la ruta de acceso real de los vínculos simbólicos.", "Do_not_truncate_error_messages_6165": "No truncar los mensajes de error.", - "Duplicate_declaration_0_2718": "Declaración duplicada \"{0}\".", "Duplicate_function_implementation_2393": "Implementación de función duplicada.", "Duplicate_identifier_0_2300": "Identificador '{0}' duplicado.", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "Identificador '{0}' duplicado. El compilador se reserva el nombre '{1}' en el ámbito de nivel superior de un módulo.", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "Identificador \"_this\" duplicado. El compilador usa la declaración de variable \"_this\" para capturar una referencia \"this\".", "Duplicate_label_0_1114": "Etiqueta \"{0}\" duplicada.", "Duplicate_number_index_signature_2375": "Signatura de índice de número duplicada.", + "Duplicate_property_0_2718": "Propiedad \"{0}\" duplicada.", "Duplicate_string_index_signature_2374": "Signatura de índice de cadena duplicada.", "Dynamic_import_cannot_have_type_arguments_1326": "La importación dinámica no puede tener argumentos de tipo", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "La importación dinámica solo se admite cuando la marca \"--module\" es \"commonjs\" o \"esNext\".", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "La importación dinámica debe tener un especificador como argumento.", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "El especificador de la importación dinámica debe ser de tipo \"string\", pero aquí tiene el tipo \"{0}\".", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'esnext', 'commonjs', 'amd', 'system', or 'umd'.", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other.", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other.", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'.", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "El elemento tiene un tipo 'any' implícito porque la expresión de índice no es de tipo 'number'.", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "El elemento tiene un tipo \"any\" implícito porque el tipo '{0}' no tiene signatura de índice.", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "El elemento tiene un tipo \"any\" implícito porque el tipo \"{0}\" no tiene ninguna signatura de índice. ¿Pretendía llamar a \"{1}\"?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "Emitir una marca BOM UTF-8 al principio de los archivos de salida.", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "Emitir un solo archivo con mapas de origen en lugar de tener un archivo aparte.", + "Emit_class_fields_with_Define_instead_of_Set_6222": "Emit class fields with Define instead of Set.", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "Emitir el origen junto a los mapas de origen en un solo archivo; requiere que se establezca \"--inlineSourceMap\" o \"--sourceMap\".", "Enable_all_strict_type_checking_options_6180": "Habilitar todas las opciones de comprobación de tipos estricta.", + "Enable_incremental_compilation_6378": "Habilitar compilación incremental", "Enable_project_compilation_6302": "Habilitar la compilación de proyecto", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "Enable strict 'bind', 'call', and 'apply' methods on functions.", "Enable_strict_checking_of_function_types_6186": "Habilite la comprobación estricta de los tipos de función.", "Enable_strict_checking_of_property_initialization_in_classes_6187": "Habilite la comprobación estricta de inicialización de propiedades en las clases.", "Enable_strict_null_checks_6113": "Habilitar comprobaciones estrictas de elementos nulos.", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "Enable the 'experimentalDecorators' option in your configuration file", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "Enable the '--jsx' flag in your configuration file", "Enable_tracing_of_the_name_resolution_process_6085": "Habilitar seguimiento del proceso de resolución de nombres.", "Enable_verbose_logging_6366": "Habilitar el registro detallado", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "Permite emitir interoperabilidad entre módulos CommonJS y ES mediante la creación de objetos de espacio de nombres para todas las importaciones. Implica \"allowSyntheticDefaultImports\".", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "Se esperaba un miembro de enumeración.", "Enum_member_must_have_initializer_1061": "El miembro de enumeración debe tener un inicializador.", "Enum_name_cannot_be_0_2431": "El nombre de la enumeración no puede ser \"{0}\".", + "Enum_type_0_circularly_references_itself_2586": "Enum type '{0}' circularly references itself.", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "El tipo de enumeración \"{0}\" tiene miembros con inicializadores que no son literales.", "Examples_Colon_0_6026": "Ejemplos: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "Profundidad excesiva de la pila al comparar los tipos '{0}' y '{1}'.", @@ -385,9 +490,9 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "Se esperaban al menos {0} argumentos, pero se obtuvieron {1} o más.", "Expected_corresponding_JSX_closing_tag_for_0_17002": "Se esperaba la etiqueta de cierre JSX correspondiente de '{0}'.", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "Se esperaba la etiqueta de cierre correspondiente para el fragmento de JSX.", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "Se esperaba que el tipo del campo '{0}' en 'package.json' fuese 'string', pero se obtuvo '{1}'.", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "Se esperaba que el tipo del campo \"{0}\" en \"package.json\" fuese \"{1}\", pero se obtuvo \"{2}\".", "Experimental_Options_6177": "Opciones experimentales", - "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "La compatibilidad experimental con decoradores es una característica que está sujeta a cambios en una próxima versión. Establezca la opción 'experimentalDecorators' para quitar esta advertencia.", + "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "La compatibilidad experimental con los decoradores es una característica que está sujeta a cambios en una próxima versión. Establezca la opción \"experimentalDecorators\" en \"tsconfig\" o \"jsconfig\" para quitar esta advertencia.", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "Tipo de resolución de módulo especificado de forma explícita: '{0}'.", "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "No se puede usar una asignación de exportación cuando se eligen módulos de ECMAScript como destino. Considere la posibilidad de usar \"export default\" u otro formato de módulo en su lugar.", "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "La asignación de exportación no es compatible cuando la marca \"--module\" es \"system\".", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "En aumentos de módulos, no se admiten exportaciones ni asignaciones de exportación.", "Expression_expected_1109": "Se esperaba una expresión.", "Expression_or_comma_expected_1137": "Se esperaba una expresión o una coma.", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "Expression produces a union type that is too complex to represent.", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "La expresión se resuelve en el valor \"_super\" que el compilador usa para capturar una referencia a la clase base.", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "La expresión se resuelve en la declaración de variable '{0}' que el compilador usa para admitir funciones asincrónicas.", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "La expresión se resuelve en una declaración de variable \"_newTarget\" que el compilador usa para capturar la referencia de la propiedad Meta \"new.target\".", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "Extraer a {0} en {1}", "Extract_to_0_in_1_scope_95008": "Extraer a {0} en el ámbito {1}", "Extract_to_0_in_enclosing_scope_95007": "Extraer a {0} en el ámbito de inclusión", + "Extract_to_interface_95090": "Extract to interface", + "Extract_to_type_alias_95078": "Extract to type alias", + "Extract_to_typedef_95079": "Extract to typedef", + "Extract_type_95077": "Tipo de extracto", "FILE_6035": "ARCHIVO", "FILE_OR_DIRECTORY_6040": "ARCHIVO O DIRECTORIO", "Failed_to_parse_file_0_Colon_1_5014": "Error al analizar el archivo '{0}': {1}.", "Fallthrough_case_in_switch_7029": "Caso de Fallthrough en instrucción switch.", "File_0_does_not_exist_6096": "El archivo '{0}' no existe.", "File_0_exist_use_it_as_a_name_resolution_result_6097": "El archivo '{0}' existe. Utilícelo como resultado de resolución de nombres.", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "La extensión del archivo \"{0}\" no es compatible. Las únicas extensiones compatibles son {1}.", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "El archivo \"{0}\" tiene una extensión no admitida, así que se omitirá.", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "La extensión del archivo '{0}' no es compatible. Las únicas extensiones compatibles son {1}.", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?", "File_0_is_not_a_module_2306": "El archivo '{0}' no es un módulo.", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "El archivo \"{0}\" no está en la lista de archivos del proyecto. Los proyectos deben enumerar todos los archivos o usar un patrón \"include\".", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "El archivo \"{0}\" no está en la lista de archivos del proyecto \"{1}\". Los proyectos deben enumerar todos los archivos o usar un patrón \"include\".", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "El archivo '{0}' no está en \"rootDir\" '{1}'. Se espera que \"rootDir\" contenga todos los archivos de origen.", "File_0_not_found_6053": "Archivo '{0}' no encontrado.", "File_change_detected_Starting_incremental_compilation_6032": "Se detectó un cambio de archivo. Iniciando la compilación incremental...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "La especificación del archivo no puede contener un directorio primario ('..') que aparezca después de un comodín de directorios recursivo ('**'): '{0}'.", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "La especificación de archivo no puede finalizar en un comodín de directorio recursivo ('**'): '{0}'.", "Fix_all_detected_spelling_errors_95026": "Corregir todos los errores ortográficos detectados", + "Fix_all_expressions_possibly_missing_await_95085": "Fix all expressions possibly missing 'await'", + "Found_0_errors_6217": "Se encontró {0} errores.", "Found_0_errors_Watching_for_file_changes_6194": "Se encontraron {0} errores. Supervisando los cambios del archivo.", + "Found_1_error_6216": "Se encontró 1 error.", "Found_1_error_Watching_for_file_changes_6193": "Se encontró un error. Supervisando los cambios del archivo.", "Found_package_json_at_0_6099": "Se encontró 'package.json' en '{0}'.", - "Found_package_json_at_0_Package_ID_is_1_6190": "Se encontró \"package.json\" en \"{0}\". El identificador de paquete es \"{1}\".", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "No se permiten declaraciones de función en bloques en modo strict cuando el destino es 'ES3' o 'ES5'.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "No se permiten declaraciones de función en bloques en modo strict cuando el destino es 'ES3' o 'ES5'. Las definiciones de clase están en modo strict de forma automática.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "No se permiten declaraciones de función en bloques en modo strict cuando el destino es 'ES3' o 'ES5'. Los módulos están en modo strict de forma automática.", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Falta la instrucción \"return\" final en la función y el tipo de valor devuelto no incluye 'undefined'.", "Function_overload_must_be_static_2387": "La sobrecarga de función debe ser estática.", "Function_overload_must_not_be_static_2388": "La sobrecarga de función no debe ser estática.", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "El tipo de función, que carece de una anotación de tipo de valor devuelto, tiene implícitamente un tipo de valor devuelto \"{0}\".", "Generate_get_and_set_accessors_95046": "Generar los descriptores de acceso \"get\" y \"set\"", + "Generates_a_CPU_profile_6223": "Generates a CPU profile.", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "Genera un mapa de origen para cada archivo \".d.ts\" correspondiente.", "Generates_corresponding_d_ts_file_6002": "Genera el archivo \".d.ts\" correspondiente.", "Generates_corresponding_map_file_6043": "Genera el archivo \".map\" correspondiente.", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "El generador tiene el tipo '{0}' implícitamente porque no produce ningún valor. Considere la posibilidad de proporcionar un tipo de valor devuelto.", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "El generador tiene el tipo yield \"{0}\" implícitamente porque no produce ningún valor. Considere la posibilidad de proporcionar una anotación de tipo de valor devuelto.", "Generators_are_not_allowed_in_an_ambient_context_1221": "Los generadores no se permiten en un contexto de ambiente.", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "Los generadores solo están disponibles cuando el destino es ECMAScript 2015 o una versión posterior.", "Generic_type_0_requires_1_type_argument_s_2314": "El tipo genérico '{0}' requiere los siguientes argumentos de tipo: {1}.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "El tipo genérico \"{0}\" requiere entre {1} y {2} argumentos de tipo.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "La creación de una instancia de tipo genérico es excesivamente profunda y posiblemente infinita.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Los descriptores de acceso de captador y establecedor no se corresponden respecto a la visibilidad.", "Global_module_exports_may_only_appear_at_top_level_1316": "Las exportaciones de módulos globales solo pueden aparecer en el nivel superior.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "Las exportaciones de módulos globales solo pueden aparecer en archivos de declaración.", "Global_module_exports_may_only_appear_in_module_files_1314": "Las exportaciones de módulos globales solo pueden aparecer en archivos de módulo.", "Global_type_0_must_be_a_class_or_interface_type_2316": "El tipo global '{0}' debe ser un tipo de clase o de interfaz.", "Global_type_0_must_have_1_type_parameter_s_2317": "El tipo global '{0}' debe tener los siguientes parámetros de tipo: {1}.", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.", "Hexadecimal_digit_expected_1125": "Se esperaba un dígito hexadecimal.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "Se esperaba un identificador. \"{0}\" es una palabra reservada en modo strict.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "Se esperaba un identificador. '{0}' es una palabra reservada en modo strict. Las definiciones de clase están en modo strict automáticamente.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "Se esperaba un identificador. '{0}' es una palabra reservada en modo strict. Los módulos están en modo strict automáticamente.", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "Se esperaba un identificador. \"{0}\" es una palabra reservada que no se puede usar aquí.", "Identifier_expected_1003": "Se esperaba un identificador.", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "Identificador esperado. \"__esModule\" está reservado como marcador exportado al transformar módulos ECMAScript.", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`", "Ignore_this_error_message_90019": "Ignorar este mensaje de error", "Implement_all_inherited_abstract_classes_95040": "Implementar todas las clases abstractas heredadas", "Implement_all_unimplemented_interfaces_95032": "Implementar todas las interfaces no implementadas", "Implement_inherited_abstract_class_90007": "Implementar clase abstracta heredada", "Implement_interface_0_90006": "Implementar la interfaz \"{0}\"", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "La cláusula implements de la clase '{0}' exportada tiene o usa el nombre privado '{1}'.", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.", "Import_0_from_module_1_90013": "Importar \"{0}\" desde el módulo \"{1}\"", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "No se puede usar una asignación de importación cuando se eligen módulos de ECMAScript como destino. Considere la posibilidad de usar \"import * as ns from 'mod'\", \"import {a} from 'mod'\", \"import d from 'mod'\" u otro formato de módulo en su lugar.", "Import_declaration_0_is_using_private_name_1_4000": "La declaración de importación '{0}' usa el nombre privado '{1}'.", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "La declaración de importación está en conflicto con la declaración local de \"{0}\".", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "Las declaraciones de importación de un espacio de nombres no pueden hacer referencia a un módulo.", + "Import_default_0_from_module_1_90032": "Import default '{0}' from module \"{1}\"", "Import_emit_helpers_from_tslib_6139": "Importe asistentes de emisión de \"tslib\".", "Import_may_be_converted_to_a_default_import_80003": "La importación puede convertirse a una importación predeterminada.", "Import_name_cannot_be_0_2438": "El nombre de importación no puede ser \"{0}\".", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "No se permiten importaciones en aumentos de módulos. Considere la posibilidad de moverlas al módulo externo envolvente.", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "En las declaraciones de enumeración de ambiente, el inicializador de miembro debe ser una expresión constante.", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "En una enumeración con varias declaraciones, solo una declaración puede omitir un inicializador para el primer elemento de la enumeración.", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "El inicializador de miembro de las declaraciones de enumeración \"const\" debe ser una expresión constante.", "Include_modules_imported_with_json_extension_6197": "Incluir módulos importados con la extensión \".json\"", "Index_signature_in_type_0_only_permits_reading_2542": "La signatura de índice del tipo '{0}' solo permite lectura.", "Index_signature_is_missing_in_type_0_2329": "Falta la signatura de índice en el tipo '{0}'.", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "Las declaraciones individuales de la declaración '{0}' combinada deben ser todas exportadas o todas locales.", "Infer_all_types_from_usage_95023": "Deducir todos los tipos del uso", "Infer_parameter_types_from_usage_95012": "Deducir los tipos de parámetro del uso", + "Infer_this_type_of_0_from_usage_95080": "Infer 'this' type of '{0}' from usage", "Infer_type_of_0_from_usage_95011": "Deducir el tipo de \"{0}\" del uso", "Initialize_property_0_in_the_constructor_90020": "Inicializar la propiedad \"{0}\" en el constructor", "Initialize_static_property_0_90021": "Inicializar la propiedad estática \"{0}\"", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "\"...\" de JSDoc solo puede aparecer en el último parámetro de una signatura.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "La etiqueta \"@param\" de JSDoc tiene el nombre \"{0}\", pero no hay ningún parámetro con ese nombre.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "La etiqueta de JSDoc \"@param\" tiene el nombre \"{0}\", pero no hay ningún parámetro con ese nombre. Coincidiría con \"arguments\" si tuviera un tipo de matriz.", + "JSDoc_type_0_circularly_references_itself_2587": "JSDoc type '{0}' circularly references itself.", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "La etiqueta \"@typedef\" de JSDoc debe tener una anotación de tipo o ir seguida de las etiquetas \"@property\" o \"@member\".", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "Los tipos JSDoc solo se pueden usar en los comentarios de la documentación.", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "Los tipos de JSDoc pueden moverse a tipos de TypeScript.", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "El tipo de elemento JSX '{0}' no tiene ninguna signatura de construcción ni de llamada.", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "El tipo de elemento JSX '{0}' no es una función de constructor de los elementos JSX.", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "Los elementos JSX no pueden tener varios atributos con el mismo nombre.", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "JSX expressions may not use the comma operator. Did you mean to write an array?", "JSX_expressions_must_have_one_parent_element_2657": "Las expresiones JSX deben tener un elemento primario.", "JSX_fragment_has_no_corresponding_closing_tag_17014": "El fragmento de JSX no tiene la etiqueta de cierre correspondiente.", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "El fragmento JSX no se admite cuando se usa una pragma de fábrica JSX en línea", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "El elemento secundario de propagación JSX debe ser de tipo matriz.", "Jump_target_cannot_cross_function_boundary_1107": "Un destino de salto no puede atravesar el límite de función.", "KIND_6034": "TIPO", + "Keywords_cannot_contain_escape_characters_1260": "Las palabras clave no pueden contener caracteres de escape.", "LOCATION_6037": "UBICACIÓN", "Language_service_is_disabled_9004": "El servicio de idioma está deshabilitado.", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "La parte izquierda del operador de coma no se usa y no tiene efectos secundarios.", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "Hacer que la llamada a \"super()\" sea la primera instrucción del constructor", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "El tipo de objeto asignado tiene implícitamente un tipo de plantilla \"any\".", "Member_0_implicitly_has_an_1_type_7008": "El miembro '{0}' tiene un tipo '{1}' implícitamente.", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Merge_conflict_marker_encountered_1185": "Se encontró un marcador de conflicto de combinación.", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "La declaración combinada '{0}' no puede incluir una declaración de exportación predeterminada. Considere la posibilidad de agregar una declaración \"export default {0}\" independiente en su lugar.", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "La propiedad Meta \"{0}\" solo se permite en el cuerpo de una declaración de función, una expresión de función o un constructor.", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "El método \"{0}\" de la interfaz exportada tiene o usa el nombre \"{1}\" del módulo privado \"{2}\".", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "El método \"{0}\" de la interfaz exportada tiene o usa el nombre privado \"{1}\".", "Modifiers_cannot_appear_here_1184": "Los modificadores no pueden aparecer aquí.", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "El módulo \"{0}\" no hace referencia a un tipo, pero aquí se usa como tipo.", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "Module '{0}' can only be default-imported using the '{1}' flag", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "Module '{0}' declares '{1}' locally, but it is exported as '{2}'.", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "Module '{0}' declares '{1}' locally, but it is not exported.", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "El módulo \"{0}\" no hace referencia a un tipo, pero aquí se usa como tipo. ¿Quiso decir \"typeof import('{0}')\"?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "El módulo \"{0}\" no hace referencia a un valor, pero aquí se usa como valor.", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "El módulo {0} ya ha exportado un miembro denominado '{1}'. Considere la posibilidad de volver a exportarlo de forma explícita para resolver la ambigüedad.", "Module_0_has_no_default_export_1192": "El módulo '{0}' no tiene ninguna exportación predeterminada.", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?", "Module_0_has_no_exported_member_1_2305": "El módulo '{0}' no tiene ningún miembro '{1}' exportado.", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "El módulo \"{0}\" no tiene ningún miembro exportado \"{1}\". ¿Pretendía utilizar \"{2}\"?", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "El módulo \"{0}\" está oculto por una declaración local con el mismo nombre.", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "El módulo '{0}' se resuelve en una entidad que no es un módulo y no se puede importar mediante esta construcción.", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "El módulo '{0}' usa \"export =\" y no se puede usar con \"export *\".", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "El módulo '{0}' se resolvió como un módulo de ambiente declarado en '{1}', porque este archivo no se había modificado.", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "El módulo '{0}' se resolvió como un módulo de ambiente declarado localmente en el archivo '{1}'.", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "El módulo '{0}' se resolvió en '{1}', pero \"--jsx\" no está establecido.", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used.", "Module_Resolution_Options_6174": "Opciones de resolución de módulo", "Module_name_0_matched_pattern_1_6092": "Nombre del módulo: '{0}', patrón coincidente: '{1}'.", "Module_name_0_was_not_resolved_6090": "======== No se resolvió el nombre de módulo '{0}'. ========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== El nombre del módulo '{0}' se resolvió correctamente como '{1}'. ========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== El nombre del módulo '{0}' se resolvió correctamente como \"{1}\" con el identificador de paquete \"{2}\". ========", "Module_resolution_kind_is_not_specified_using_0_6088": "No se ha especificado el tipo de resolución del módulo, se usará '{0}'.", "Module_resolution_using_rootDirs_has_failed_6111": "No se pudo resolver el módulo con \"rootDirs\".", "Move_to_a_new_file_95049": "Mover a un nuevo archivo", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "La propiedad '{0}' con nombre de los tipos '{1}' y '{2}' no es idéntica en ambos.", "Namespace_0_has_no_exported_member_1_2694": "El espacio de nombres '{0}' no tiene ningún miembro '{1}' exportado.", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "No hay ningún constructor base con el número especificado de argumentos de tipo.", + "No_constituent_of_type_0_is_callable_2755": "No constituent of type '{0}' is callable.", + "No_constituent_of_type_0_is_constructable_2759": "No constituent of type '{0}' is constructable.", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "No index signature with a parameter of type '{0}' was found on type '{1}'.", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "No se encontraron entradas en el archivo de configuración '{0}'. Las rutas 'include' especificadas fueron '{1}' y las rutas 'exclude' fueron '{2}'.", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments.", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments.", + "No_overload_matches_this_call_2769": "No overload matches this call.", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "La clase '{0}' no abstracta no implementa el miembro abstracto heredado '{1}' de la clase '{2}'.", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "Una expresión de clase no abstracta no implementa el miembro abstracto heredado '{0}' de la clase '{1}'.", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "Non-null assertions can only be used in TypeScript files.", + "Non_simple_parameter_declared_here_1348": "Non-simple parameter declared here.", "Not_all_code_paths_return_a_value_7030": "No todas las rutas de acceso de código devuelven un valor.", + "Not_all_constituents_of_type_0_are_callable_2756": "Not all constituents of type '{0}' are callable.", + "Not_all_constituents_of_type_0_are_constructable_2760": "Not all constituents of type '{0}' are constructable.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "El tipo de índice numérico '{0}' no se puede asignar a un tipo de índice de cadena '{1}'.", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers.", "Numeric_separators_are_not_allowed_here_6188": "Aquí no se permiten separadores numéricos.", "Object_is_of_type_unknown_2571": "El objeto es de tipo \"desconocido\".", "Object_is_possibly_null_2531": "El objeto es posiblemente \"null\".", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "No se permiten literales octales en el inicializador de miembros de enumeraciones. Use la sintaxis \"{0}\".", "Octal_literals_are_not_allowed_in_strict_mode_1121": "Los literales octales no se permiten en modo strict.", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "Los literales octales no están disponibles cuando el destino es ECMAScript 5 y superior. Use la sintaxis \"{0}\".", + "Only_ECMAScript_imports_may_use_import_type_1370": "Only ECMAScript imports may use 'import type'.", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "Solo se permite una declaración de variable en una instrucción \"for...in\".", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "Solo se permite una declaración de variable en una instrucción \"for...of\".", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "Solo se puede llamar a una función void con la palabra clave \"new\".", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "Solo deben emitirse archivos de declaración \".d.ts\".", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "Actualmente, solo se admiten identificadores o nombres completos con argumentos de tipo opcional en la cláusula \"extends\" de una clase.", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "Solo es posible tener acceso a los métodos públicos y protegidos de la clase base mediante la palabra clave \"super\".", + "Operator_0_cannot_be_applied_to_type_1_2736": "El operador \"{0}\" no se puede aplicar al tipo \"{1}\".", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "El operador '{0}' no se puede aplicar a los tipos '{1}' y '{2}'.", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "La opción '{0}' solo se puede especificar en el archivo 'tsconfig.json'.", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "La opción '{0}' solo se puede usar cuando se proporciona '--inlineSourceMap' o '--sourceMap'.", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "Option '{0}' cannot be specified when option 'target' is 'ES3'.", "Option_0_cannot_be_specified_with_option_1_5053": "La opción '{0}' no se puede especificar con la opción '{1}'.", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "La opción '{0}' no se puede especificar sin la opción '{1}'.", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "La opción \"{0}\" no se puede especificar sin la opción \"{1}\" o la opción \"{2}\".", "Option_0_should_have_array_of_strings_as_a_value_6103": "La opción '{0}' debe tener una matriz de cadenas como valor.", "Option_build_must_be_the_first_command_line_argument_6369": "La opción \"--build\" debe ser el primer argumento de la línea de comandos.", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified.", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "La opción \"isolatedModules\" solo se puede usar cuando se proporciona la opción \"--module\" o si la opción \"target\" es \"ES2015\" o una versión posterior.", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "La opción 'paths' no se puede usar sin especificar la opción '--baseUrl'.", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "La opción \"project\" no se puede combinar con archivos de origen en una línea de comandos.", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'.", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "No se puede especificar la opción \"--resolveJsonModule\" sin la estrategia de resolución de módulos \"node\".", "Options_0_and_1_cannot_be_combined_6370": "\"{0}\" y \"{1}\" no se pueden combinar.", "Options_Colon_6027": "Opciones:", "Output_directory_for_generated_declaration_files_6166": "Directorio de salida para los archivos de declaración generados.", "Output_file_0_from_project_1_does_not_exist_6309": "El archivo de salida \"{0}\" del proyecto \"{1}\" no existe.", "Output_file_0_has_not_been_built_from_source_file_1_6305": "El archivo de salida \"{0}\" no se compiló desde el archivo de origen \"{1}\".", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "La signatura de sobrecarga no es compatible con la implementación de función.", + "Overload_0_of_1_2_gave_the_following_error_2772": "Overload {0} of {1}, '{2}', gave the following error.", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "Las signaturas de sobrecarga deben ser todas abstractas o no abstractas.", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "Las signaturas de sobrecarga deben ser todas de ambiente o de no ambiente.", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "Las signaturas de sobrecarga deben ser todas exportadas o no exportadas.", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "Las signaturas de sobrecarga deben ser todas públicas, privadas o protegidas.", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "No se puede hacer referencia al parámetro '{0}' en su inicializador.", "Parameter_0_implicitly_has_an_1_type_7006": "El parámetro '{0}' tiene un tipo '{1}' implícitamente.", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "El parámetro '{0}' no está en la misma posición que el parámetro '{1}'.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "El parámetro \"{0}\" del descriptor de acceso tiene o usa el nombre \"{1}\" del módulo \"{2}\" externo, pero no se puede nombrar.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "El parámetro \"{0}\" del descriptor de acceso tiene o usa el nombre \"{1}\" del módulo \"{2}\" privado.", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "El parámetro \"{0}\" del descriptor de acceso tiene o usa el nombre privado \"{1}\".", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "El parámetro '{0}' de la signatura de llamada de una interfaz exportada tiene o usa el nombre '{1}' del módulo '{2}' privado.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "El parámetro '{0}' de la signatura de llamada de una interfaz exportada tiene o usa el nombre privado '{1}'.", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "El parámetro '{0}' del constructor de la clase exportada tiene o usa el nombre '{1}' del módulo {2} externo, pero no se puede nombrar.", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "El parámetro '{0}' del método estático público de la clase exportada tiene o usa el nombre privado '{1}'.", "Parameter_cannot_have_question_mark_and_initializer_1015": "El parámetro no puede tener un signo de interrogación y un inicializador.", "Parameter_declaration_expected_1138": "Se espera una declaración de parámetros.", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "Parameter has a name but no type. Did you mean '{0}: {1}'?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "Parameter modifiers can only be used in TypeScript files.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "El tipo de parámetro del establecedor público \"{0}\" de la clase exportada tiene o usa el nombre \"{1}\" del módulo \"{2}\" privado.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "El tipo de parámetro del establecedor público \"{0}\" de la clase exportada tiene o usa el nombre privado \"{1}\".", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "El tipo de parámetro del establecedor estático público \"{0}\" de la clase exportada tiene o usa el nombre \"{1}\" del módulo \"{2}\" privado.", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "Analiza en modo strict y emite \"use strict\" para cada archivo de código fuente.", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "El patrón \"{0}\" puede tener un carácter '*' como máximo.", "Prefix_0_with_an_underscore_90025": "Prefijo \"{0}\" con guion bajo", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "Prefix all incorrect property declarations with 'declare'", "Prefix_all_unused_declarations_with_where_possible_95025": "Agregar \"_\" como prefijo a todas las declaraciones sin usar, cuando sea posible", + "Prefix_with_declare_95094": "Prefix with 'declare'", "Print_names_of_files_part_of_the_compilation_6155": "Imprimir los nombres de los archivos que forman parte de la compilación.", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "Print names of files that are part of the compilation and then stop processing.", "Print_names_of_generated_files_part_of_the_compilation_6154": "Imprimir los nombres de los archivos generados que forman parte de la compilación.", "Print_the_compiler_s_version_6019": "Imprima la versión del compilador.", + "Print_the_final_configuration_instead_of_building_1350": "Print the final configuration instead of building.", "Print_this_message_6017": "Imprima este mensaje.", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "Private identifiers are not allowed in variable declarations.", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "Private identifiers are not allowed outside class bodies.", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "Los identificadores privados solo están disponibles cuando el destino es ECMAScript 2015 y versiones posteriores.", + "Private_identifiers_cannot_be_used_as_parameters_18009": "Private identifiers cannot be used as parameters", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "Private or protected member '{0}' cannot be accessed on a type parameter.", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "El proyecto \"{0}\" no puede generarse porque su dependencia \"{1}\" tiene errores", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "El proyecto \"{0}\" no puede compilarse porque su dependencia \"{1}\" no se ha compilado.", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "El proyecto \"{0}\" está obsoleto porque su dependencia \"{1}\" no está actualizada", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "El proyecto \"{0}\" está obsoleto porque la salida más antigua \"{1}\" es anterior a la entrada más reciente \"{2}\"", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "El proyecto \"{0}\" está obsoleto porque el archivo de salida \"{1}\" no existe", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "El proyecto \"{0}\" está obsoleto porque la salida de su dependencia \"{1}\" ha cambiado.", "Project_0_is_up_to_date_6361": "El proyecto \"{0}\" está actualizado", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "El proyecto \"{0}\" está actualizado porque la entrada más reciente \"{1}\" es anterior a la salida más antigua \"{2}\"", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "El proyecto \"{0}\" está actualizado con archivos .d.ts de sus dependencias", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "Proyectos a los que se hará referencia", "Property_0_does_not_exist_on_const_enum_1_2479": "La propiedad '{0}' no existe en la enumeración 'const' '{1}'.", "Property_0_does_not_exist_on_type_1_2339": "La propiedad '{0}' no existe en el tipo '{1}'.", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "La propiedad \"{0}\" no existe en el tipo \"{1}\". ¿Olvidó usar \"await\"?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "La propiedad \"{0}\" no existe en el tipo \"{1}\". ¿Quería decir \"{2}\"?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "La propiedad \"{0}\" tiene declaraciones en conflicto y no está accesible en el tipo \"{1}\".", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "La propiedad \"{0}\" no tiene inicializador y no está asignada de forma definitiva en el constructor.", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "La propiedad '{0}' tiene el tipo 'any' de forma implícita, porque a su descriptor de acceso get le falta una anotación de tipo de valor devuelto.", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "La propiedad '{0}' tiene el tipo 'any' de forma implícita, porque a su descriptor de acceso set le falta una anotación de tipo de parámetro.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage.", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "La propiedad \"{0}\" del tipo \"{1}\" no se puede asignar a la misma propiedad del tipo base \"{2}\".", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "La propiedad \"{0}\" del tipo \"{1}\" no se puede asignar al tipo \"{2}\".", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'.", + "Property_0_is_a_static_member_of_type_1_2576": "La propiedad \"{0}\" es un miembro estático de tipo \"{1}\".", "Property_0_is_declared_but_its_value_is_never_read_6138": "La propiedad \"{0}\" se declara, pero su valor no se lee nunca.", "Property_0_is_incompatible_with_index_signature_2530": "La propiedad '{0}' es incompatible con la signatura de índice.", + "Property_0_is_incompatible_with_rest_element_type_2573": "Property '{0}' is incompatible with rest element type.", "Property_0_is_missing_in_type_1_2324": "Falta la propiedad '{0}' en el tipo '{1}'.", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "La propiedad \"{0}\" falta en el tipo \"{1}\", pero es obligatoria en el tipo \"{2}\".", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "Property '{0}' is not accessible outside class '{1}' because it has a private identifier.", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "La propiedad '{0}' es opcional en el tipo '{1}', pero obligatoria en el tipo '{2}'.", "Property_0_is_private_and_only_accessible_within_class_1_2341": "La propiedad '{0}' es privada y solo se puede acceder a ella en la clase '{1}'.", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "La propiedad '{0}' es privada en el tipo '{1}', pero no en el tipo '{2}'.", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "La propiedad '{0}' está protegida, pero el tipo '{1}' no es una clase derivada de '{2}'.", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "La propiedad '{0}' está protegida en el tipo '{1}', pero es pública en el tipo '{2}'.", "Property_0_is_used_before_being_assigned_2565": "La propiedad \"{0}\" se usa antes de asignarla.", + "Property_0_is_used_before_its_initialization_2729": "Property '{0}' is used before its initialization.", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "La propiedad '{0}' del atributo spread de JSX no se puede asignar a la propiedad de destino.", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "La propiedad \"{0}\" de la expresión de clase exportada no puede ser privada ni estar protegida.", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "La propiedad '{0}' de la interfaz exportada tiene o usa el nombre '{1}' del módulo '{2}' privado.", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "La propiedad '{0}' de la interfaz exportada tiene o usa el nombre privado '{1}'.", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "La propiedad '{0}' de tipo '{1}' no se puede asignar al tipo de índice numérico '{2}'.", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "La propiedad '{0}' de tipo '{1}' no se puede asignar al tipo de índice de cadena '{2}'.", + "Property_0_was_also_declared_here_2733": "La propiedad \"{0}\" también se ha declarado aquí.", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.", "Property_assignment_expected_1136": "Se esperaba una asignación de propiedad.", "Property_destructuring_pattern_expected_1180": "Se esperaba un patrón de desestructuración de propiedad.", "Property_or_signature_expected_1131": "Se esperaba una propiedad o una signatura.", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "La propiedad estática pública '{0}' de la clase exportada tiene o usa el nombre '{1}' del módulo {2} externo, pero no se puede nombrar.", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "La propiedad estática pública '{0}' de la clase exportada tiene o usa el nombre '{1}' del módulo {2} privado.", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "La propiedad estática pública '{0}' de la clase exportada tiene o usa el nombre privado '{1}'.", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'.", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "Generar un error en las expresiones y las declaraciones con un tipo \"any\" implícito.", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Generar un error en expresiones 'this' con un tipo 'any' implícito.", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.", "Redirect_output_structure_to_the_directory_6006": "Redirija la estructura de salida al directorio.", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "El proyecto \"{0}\" al que se hace referencia debe tener el valor \"composite\": true.", + "Remove_all_unnecessary_uses_of_await_95087": "Remove all unnecessary uses of 'await'", "Remove_all_unreachable_code_95051": "Quitar todo el código inaccesible", "Remove_all_unused_labels_95054": "Quitar todas las etiquetas no utilizadas", "Remove_braces_from_arrow_function_95060": "Quitar las llaves de la función de flecha", - "Remove_declaration_for_Colon_0_90004": "Quitar declaración de: \"{0}\"", "Remove_destructuring_90009": "Quitar la desestructuración", "Remove_import_from_0_90005": "Quitar importación de \"{0}\"", + "Remove_template_tag_90011": "Remove template tag", + "Remove_type_parameters_90012": "Quitar los parámetros de tipo", + "Remove_unnecessary_await_95086": "Remove unnecessary 'await'", "Remove_unreachable_code_95050": "Quitar el código inaccesible", + "Remove_unused_declaration_for_Colon_0_90004": "Remove unused declaration for: '{0}'", "Remove_unused_label_95053": "Quitar etiqueta no utilizada", "Remove_variable_statement_90010": "Quitar la declaración de variable", + "Replace_all_unused_infer_with_unknown_90031": "Replace all unused 'infer' with 'unknown'", "Replace_import_with_0_95015": "Reemplazar importación por \"{0}\".", + "Replace_infer_0_with_unknown_90030": "Replace 'infer {0}' with 'unknown'", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Notificar un error cuando no todas las rutas de acceso de código en funcionamiento devuelven un valor.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Notificar errores de los casos de fallthrough en la instrucción switch.", "Report_errors_in_js_files_8019": "Notifique los errores de los archivos .js.", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "Resolviendo con las rutas de búsqueda principales...", "Resolving_with_primary_search_path_0_6121": "Resolviendo con la ruta de búsqueda principal \"{0}\".", "Rest_parameter_0_implicitly_has_an_any_type_7019": "El parámetro rest '{0}' tiene un tipo \"any[]\" implícitamente.", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage.", + "Rest_signatures_are_incompatible_2572": "Las signaturas rest no son compatibles.", "Rest_types_may_only_be_created_from_object_types_2700": "Los tipos rest solo se pueden crear a partir de tipos de objeto.", + "Return_type_annotation_circularly_references_itself_2577": "Return type annotation circularly references itself.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "El tipo de valor devuelto de la signatura de llamada de la interfaz exportada tiene o usa el nombre '{0}' del módulo '{1}' privado.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "El tipo de valor devuelto de la signatura de llamada de la interfaz exportada tiene o usa el nombre privado '{0}'.", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "El tipo de valor devuelto de la signatura de constructor de la interfaz exportada tiene o usa el nombre '{0}' del módulo '{1}' privado.", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "No se puede determinar el directorio raíz, se omitirán las rutas de búsqueda principales.", "STRATEGY_6039": "ESTRATEGIA", "Scoped_package_detected_looking_in_0_6182": "Se detectó un paquete con ámbito al buscar en \"{0}\"", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "Set the 'module' option in your configuration file to '{0}'", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "Set the 'target' option in your configuration file to '{0}'", "Setters_cannot_return_a_value_2408": "Los establecedores no pueden devolver un valor.", "Show_all_compiler_options_6169": "Mostrar todas las opciones de compilador.", "Show_diagnostic_information_6149": "Mostrar información de diagnóstico.", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "La signatura '{0}' debe tener un predicado de tipo.", "Skip_type_checking_of_declaration_files_6012": "Omita la comprobación de tipos de los archivos de declaración.", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "Omitiendo la compilación del proyecto \"{0}\" porque su dependencia \"{1}\" tiene errores", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "Omitiendo la limpieza porque no se encontraron todos los proyectos", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "Omitiendo la compilación del proyecto \"{0}\" porque su dependencia \"{1}\" no se ha compilado", "Source_Map_Options_6175": "Opciones de mapa de origen", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "La signatura de sobrecarga especializada no se puede asignar a ninguna signatura no especializada.", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "El especificador de importación dinámica no puede ser un elemento de propagación.", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "Especifique la versión de ECMAScript de destino: \"ES3\" (valor predeterminado), \"ES5\", \"ES2015\", \"ES2016\", \"ES2017\", \"ES2018\" o \"ESNEXT\".", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "Especificar la versión de destino de ECMAScript: \"ES3\" (predeterminada), \"ES5\", \"ES2015\", \"ES2016\", \"ES2017\", \"ES2018\", \"ES2019\", \"ES2020\" o \"ESNEXT\".", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "Especifique la generación de código JSX: \"preserve\", \"react-native\" o \"react\".", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "Specify emit/checking behavior for imports that are only used for types", + "Specify_file_to_store_incremental_compilation_information_6380": "Specify file to store incremental compilation information", "Specify_library_files_to_be_included_in_the_compilation_6079": "Especifique los archivos de biblioteca que se van a incluir en la compilación.", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "Especifique la generación de código del módulo: \"none\", \"commonjs\", \"amd\", \"system\", \"umd\", \"es2015\" o \"ESNext\".", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'.", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "Especifique la estrategia de resolución de módulos: 'node' (Node.js) o 'classic' (TypeScript pre-1.6).", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'.", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'.", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "Especifique la estrategia para inspeccionar el archivo: \"FixedPollingInterval\" (valor predeterminado), \"PriorityPollingInterval\", \"DynamicPriorityPolling\", \"UseFsEvents\", \"UseFsEventsOnParentDirectory\".", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "Especifique la función de generador JSX que se usará cuando el destino sea la emisión de JSX \"react\"; por ejemplo, \"React.createElement\" o \"h\".", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "Especifique la secuencia de final de línea que debe usarse para emitir archivos: 'CRLF' (Dos) o 'LF' (Unix).", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "Especifique la ubicación donde el depurador debe colocar los archivos de TypeScript en lugar de sus ubicaciones de origen.", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "Especifique la ubicación donde el depurador debe colocar los archivos de asignaciones en lugar de las ubicaciones generadas.", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "Especifique el directorio raíz de los archivos de entrada. Úselo para controlar la estructura del directorio de salida con --outDir.", + "Split_all_invalid_type_only_imports_1367": "Split all invalid type-only imports", + "Split_into_two_separate_import_declarations_1366": "Split into two separate import declarations", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "El operador spread de las expresiones \"new\" solo está disponible si el destino es ECMAScript 5 y versiones posteriores.", "Spread_types_may_only_be_created_from_object_types_2698": "Los tipos spread solo se pueden crear a partir de tipos de objeto.", "Starting_compilation_in_watch_mode_6031": "Iniciando la compilación en modo de inspección...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "Las declaraciones de propiedad subsiguientes deben tener el mismo tipo. La propiedad \"{0}\" debe ser de tipo \"{1}\", pero aquí tiene el tipo \"{2}\".", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "Las declaraciones de variable subsiguientes deben tener el mismo tipo. La variable '{0}' debe ser de tipo '{1}', pero aquí tiene el tipo '{2}'.", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "La sustitución '{0}' para el patrón '{1}' tiene un tipo incorrecto. Se esperaba 'string', pero se obtuvo '{2}'.", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "La sustitución \"{0}\" del patrón \"{1}\" puede tener un carácter '*' como máximo.", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "La sustitución \"{0}\" del patrón \"{1}\" puede tener un carácter \"*\" como máximo.", "Substitutions_for_pattern_0_should_be_an_array_5063": "Las sustituciones para el patrón '{0}' deben ser una matriz.", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "Las sustituciones para el patrón '{0}' no deben ser una matriz vacía.", "Successfully_created_a_tsconfig_json_file_6071": "Archivo tsconfig.json creado correctamente.", @@ -840,78 +1033,121 @@ "Suppress_excess_property_checks_for_object_literals_6072": "Suprima las comprobaciones de propiedades en exceso de los literales de objeto.", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "Eliminar errores de noImplicitAny para los objetos de indexación a los que les falten firmas de índice.", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "La referencia \"Symbol\" no hace referencia al objeto de constructor Symbol global.", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively.", "Syntax_Colon_0_6023": "Sintaxis: {0}", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "Tagged template expressions are not permitted in an optional chain.", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "The '{0}' modifier can only be used in TypeScript files.", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "El operador '{0}' no se puede aplicar al tipo \"symbol\".", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "No se permite usar el operador '{0}' para los tipos booleanos. Como alternativa, puede usar '{1}'.", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "The '{0}' property of an async iterator must be a method.", + "The_0_property_of_an_iterator_must_be_a_method_2767": "The '{0}' property of an iterator must be a method.", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "El tipo 'Object' se puede asignar a muy pocos tipos. ¿Se refería a usar el tipo 'any' en realidad?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "No se puede hacer referencia al objeto \"arguments\" en una función de flecha en ES3 ni ES5. Considere la posibilidad de usar una expresión de función estándar.", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "No se puede hacer referencia al objeto \"arguments\" en una función o método asincrónico en ES3 ni ES5. Considere la posibilidad de usar un método o función estándar.", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "El cuerpo de una instrucción \"if\" no puede ser la instrucción vacía.", "The_character_set_of_the_input_files_6163": "Conjunto de caracteres de los archivos de entrada.", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "The containing arrow function captures the global value of 'this'.", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "El cuerpo de la función o del módulo contenedor es demasiado grande para realizar un análisis de flujo de control.", "The_current_host_does_not_support_the_0_option_5001": "El host actual no admite la opción '{0}'.", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "The declaration of '{0}' that you probably intended to use is defined here", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "The expected type comes from property '{0}' which is declared here on type '{1}'", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "The expected type comes from the return type of this signature.", + "The_expected_type_comes_from_this_index_signature_6501": "The expected type comes from this index signature.", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "La expresión de una asignación de exportación debe ser un identificador o un nombre completo en un contexto de ambiente.", "The_files_list_in_config_file_0_is_empty_18002": "La lista de archivos del archivo de configuración '{0}' está vacía.", + "The_first_export_default_is_here_2752": "The first export default is here.", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "El primer parámetro del método \"then\" de una promesa debe ser una devolución de llamada.", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "El tipo \"JSX.{0}\" global no puede tener más de una propiedad.", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "La propiedad Meta \"import.meta\" solo se admite si se usa \"ESNext\" para las opciones del compilador \"target\" y \"module\".", + "The_implementation_signature_is_declared_here_2750": "The implementation signature is declared here.", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "The 'import.meta' meta-property is only allowed when the '--module' option is 'esnext' or 'system'.", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary.", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "El tipo inferido de \"{0}\" hace referencia a un tipo \"{1}\" no accesible. Se requiere una anotación de tipo.", + "The_last_overload_gave_the_following_error_2770": "The last overload gave the following error.", + "The_last_overload_is_declared_here_2771": "The last overload is declared here.", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "La parte izquierda de una instrucción \"for...in\" no puede ser un patrón de desestructuración.", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "La parte izquierda de una instrucción \"for...in\" no puede usar una anotación de tipo.", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "The left-hand side of a 'for...in' statement may not be an optional property access.", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "La parte izquierda de una instrucción 'for...in' debe ser una variable o el acceso a una propiedad.", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "La parte izquierda de una instrucción \"for...in\" debe ser de tipo \"string\" o \"any\".", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "La parte izquierda de una instrucción \"for...of\" no puede usar una anotación de tipo.", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "The left-hand side of a 'for...of' statement may not be an optional property access.", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "La parte izquierda de una instrucción 'for...of' debe ser una variable o el acceso a una propiedad.", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "La parte izquierda de una operación aritmética debe ser de tipo \"any\", \"number\" o un tipo de enumeración.", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "La parte izquierda de una operación aritmética debe ser de tipo \"any\", \"number\", \"bigint\" o un tipo de enumeración.", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "The left-hand side of an assignment expression may not be an optional property access.", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "La parte izquierda de una expresión de asignación debe ser una variable o el acceso a una propiedad.", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "La parte izquierda de una expresión \"in\" debe ser de tipo \"any\", \"string\", \"number\" o \"symbol\".", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "La parte izquierda de una expresión \"instanceof\" debe ser de tipo \"any\", un tipo de objeto o un parámetro de tipo.", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "Configuración regional utilizada para mostrar los mensajes al usuario (por ejemplo, \"es-es\")", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "La profundidad máxima de dependencia para buscar en node_modules y cargar los archivos de JavaScript.", - "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "El operando de un operador de eliminación no puede ser una propiedad de solo lectura.", - "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "El operando de un operador de eliminación debe ser una referencia de propiedad.", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "The operand of a 'delete' operator cannot be a private identifier.", + "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "El operando de un operador \"delete\" no puede ser una propiedad de solo lectura.", + "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "El operando de un operador \"delete\" debe ser una referencia de propiedad.", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "The operand of an increment or decrement operator may not be an optional property access.", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "El operando de un operador de incremento o decremento debe ser una variable o el acceso a una propiedad.", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "The parser expected to find a '}' to match the '{' token here.", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "El tipo de valor devuelto de un constructor de elemento JSX debe devolver un tipo de objeto.", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "El tipo de valor devuelto de una función Decorator de parámetro debe ser \"void\" o \"any\".", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "El tipo de valor devuelto de una función Decorator de propiedad debe ser \"void\" o \"any\".", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "El tipo de valor devuelto de una función asincrónica debe ser una promesa válida o no debe contener un miembro \"then\" invocable.", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "El tipo de valor devuelto de una función o un método asincrónicos debe ser el tipo Promise global.", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "La parte derecha de una instrucción \"for...in\" debe ser de tipo \"any\", un tipo de objeto o un parámetro de tipo, pero aquí tiene el tipo \"{0}\".", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "La parte derecha de una operación aritmética debe ser de tipo \"any\", \"number\" o un tipo de enumeración.", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "La parte derecha de una operación aritmética debe ser de tipo \"any\", \"number\", \"bigint\" o un tipo de enumeración.", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "La parte derecha de una expresión \"in\" debe ser de tipo \"any\", un tipo de objeto o un parámetro de tipo.", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "La parte derecha de una expresión \"instanceof\" debe ser de tipo \"any\" o un tipo que pueda asignarse al tipo de interfaz \"Function\".", + "The_shadowing_declaration_of_0_is_defined_here_18017": "The shadowing declaration of '{0}' is defined here", "The_specified_path_does_not_exist_Colon_0_5058": "La ruta de acceso especificada no existe: \"{0}\".", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "El destino de la asignación debe ser una variable o el acceso a una propiedad.", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "The target of an object rest assignment may not be an optional property access.", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "El destino de una asignación de reposo de objetos debe ser una variable o un acceso a propiedad.", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "El contexto 'this' de tipo '{0}' no se puede asignar al contexto 'this' de tipo '{1}' del método.", "The_this_types_of_each_signature_are_incompatible_2685": "Los tipos 'this' de cada signatura son incompatibles.", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'.", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "El argumento de tipo del parámetro de tipo '{0}' no se puede inferir del uso. Puede especificar los argumentos de tipo explícitamente.", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "El tipo devuelto por el método \"next()\" de un iterador de asincronía debe ser una promesa para un tipo con una propiedad \"value\".", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "El tipo devuelto por el método \"next()\" de un iterador debe tener una propiedad \"value\".", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "The type of a function declaration must match the function's signature.", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "El tipo devuelto por el método \"{0}()\" de un iterador de asincronía debe ser una promesa para un tipo con una propiedad \"value\".", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "El tipo devuelto por el método \"{0}()\" de un iterador debe tener una propiedad \"value\".", + "The_types_of_0_are_incompatible_between_these_types_2200": "The types of '{0}' are incompatible between these types.", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "The types returned by '{0}' are incompatible between these types.", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "La declaración de variable de una instrucción \"for...in\" no puede tener un inicializador.", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "La declaración de variable de una instrucción \"for...of\" no puede tener un inicializador.", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "No se admite la instrucción 'with'. Todos los símbolos de un bloque 'with' tendrán el tipo 'any'.", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided.", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "This condition will always return true since the function is always defined. Did you mean to call it instead?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "Esta función de constructor puede convertirse en una declaración de clase.", + "This_expression_is_not_callable_2349": "This expression is not callable.", + "This_expression_is_not_constructable_2351": "This expression is not constructable.", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.", + "This_may_be_converted_to_an_async_function_80006": "This may be converted to an async function.", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export.", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag.", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "This overload signature is not compatible with its implementation signature.", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "This parameter is not allowed with 'use strict' directive.", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Esta sintaxis requiere un asistente importado, pero no se puede encontrar el módulo \"{0}\".", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "Esta sintaxis requiere un asistente importado denominado \"{1}\", pero el módulo \"{0}\" no tiene el miembro exportado \"{1}\".", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'.", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.", "Trailing_comma_not_allowed_1009": "No se permite la coma final.", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Transpilar cada archivo como un módulo aparte (parecido a \"ts.transpileModule\").", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Pruebe \"npm install @types/{0}\" si existe o agregue un nuevo archivo de declaración (.d.ts) que incluya \"declare module '{0}';\"", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Pruebe \"npm install @types/{1}\" si existe o agregue un nuevo archivo de declaración (.d.ts) que incluya \"declare module '{0}';\".", "Trying_other_entries_in_rootDirs_6110": "Se probarán otras entradas de \"rootDirs\".", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "Probando la sustitución '{0}', ubicación candidata para el módulo: '{1}'.", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "El tipo de tupla '{0}' con longitud '{1}' no se pude asignar a la tupla con longitud '{2}'.", - "Type_0_cannot_be_converted_to_type_1_2352": "El tipo '{0}' no se puede convertir en el tipo '{1}'.", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "Tuple type '{0}' of length '{1}' has no element at index '{2}'.", + "Tuple_type_arguments_circularly_reference_themselves_4110": "Tuple type arguments circularly reference themselves.", "Type_0_cannot_be_used_as_an_index_type_2538": "El tipo '{0}' no se puede usar como tipo de índice.", "Type_0_cannot_be_used_to_index_type_1_2536": "El tipo '{0}' no se puede usar para indexar el tipo '{1}'.", "Type_0_does_not_satisfy_the_constraint_1_2344": "El tipo '{0}' no cumple la restricción '{1}'.", + "Type_0_has_no_call_signatures_2757": "El tipo \"{0}\" no tiene signaturas de llamada.", + "Type_0_has_no_construct_signatures_2761": "El tipo \"{0}\" no tiene signaturas de construcción.", "Type_0_has_no_matching_index_signature_for_type_1_2537": "El tipo '{0}' no tiene una signatura de índice correspondiente al tipo '{1}'.", "Type_0_has_no_properties_in_common_with_type_1_2559": "El tipo \"{0}\" no tiene propiedades en común con el tipo \"{1}\".", - "Type_0_has_no_property_1_2460": "El tipo '{0}' no tiene ninguna propiedad '{1}'.", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "El tipo '{0}' no tiene ninguna propiedad '{1}' ni ninguna signatura de índice de cadena.", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "Type '{0}' is missing the following properties from type '{1}': {2}", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.", "Type_0_is_not_a_constructor_function_type_2507": "El tipo '{0}' no es un tipo de función de constructor.", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "El tipo '{0}' no es un tipo de valor devuelto válido para una función asincrónica en ES5/ES3, porque no hace referencia a un valor de constructor compatible con promesas.", "Type_0_is_not_an_array_type_2461": "'{0}' no es un tipo de matriz.", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "\"{0}\" no es un tipo de matriz. Use la opción del compilador \"--downlevelIteration\" para permitir la iteración de los iteradores.", "Type_0_is_not_an_array_type_or_a_string_type_2495": "'{0}' no es un tipo de matriz o un tipo de cadena.", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "\"{0}\" no es un tipo de matriz o de cadena. Use la opción del compilador \"--downlevelIteration\" para permitir la iteración de los iteradores.", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "El tipo \"{0}\" no es un tipo de matriz o un tipo de cadena o no tiene un método \"[Symbol.iterator]()\" que devuelve un iterador.", @@ -926,17 +1162,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "El tipo '{0}' se hace referencia a sí mismo de forma recursiva como tipo base.", "Type_alias_0_circularly_references_itself_2456": "El alias de tipo '{0}' se hace referencia a sí mismo de forma circular.", "Type_alias_name_cannot_be_0_2457": "El nombre del alias de tipo no puede ser \"{0}\".", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "Type aliases can only be used in TypeScript files.", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "Una anotación de tipo no puede aparecer en una declaración de constructor.", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "Type annotations can only be used in TypeScript files.", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "El candidato de argumento de tipo '{1}' no es un argumento de tipo válido porque no es un supertipo del candidato '{0}'.", "Type_argument_expected_1140": "Se esperaba un argumento de tipo.", "Type_argument_list_cannot_be_empty_1099": "La lista de argumentos de tipo no puede estar vacía.", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "Type arguments can only be used in TypeScript files.", "Type_arguments_cannot_be_used_here_1342": "No se pueden usar argumentos de tipo aquí.", + "Type_arguments_for_0_circularly_reference_themselves_4109": "Type arguments for '{0}' circularly reference themselves.", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "Type assertion expressions can only be used in TypeScript files.", "Type_declaration_files_to_be_included_in_compilation_6124": "Archivos de declaración de tipos que se incluirán en la compilación.", "Type_expected_1110": "Se esperaba un tipo.", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "La creación de una instancia de tipo es excesivamente profunda y posiblemente infinita.", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "Se hace referencia al tipo directa o indirectamente en la devolución de llamada de entrega de su propio método \"then\".", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "El tipo de operando \"await\" debe ser una promesa válida o no debe contener un miembro \"then\" invocable.", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "Type of computed property's value is '{0}', which is not assignable to type '{1}'.", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "El tipo de elementos iterados de un operando \"yield*\" debe ser una promesa válida o no debe contener un miembro \"then\" invocable.", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "El tipo de operando \"yield\" en un generador asincrónico debe ser una promesa válida o no debe contener un miembro \"then\" invocable.", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.", "Type_parameter_0_has_a_circular_constraint_2313": "El parámetro de tipo '{0}' tiene una restricción circular.", "Type_parameter_0_has_a_circular_default_2716": "El parámetro de tipo \"{0}\" tiene un valor circular predeterminado.", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "El parámetro de tipo '{0}' de la signatura de llamada de la interfaz exportada tiene o usa el nombre privado '{1}'.", @@ -944,17 +1188,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "El parámetro de tipo '{0}' de la clase exportada tiene o usa el nombre privado '{1}'.", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "El parámetro de tipo '{0}' de la función exportada tiene o usa el nombre privado '{1}'.", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "El parámetro de tipo '{0}' de la interfaz exportada tiene o usa el nombre privado '{1}'.", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "El parámetro de tipo \"{0}\" del tipo de objeto asignado exportado usa un nombre privado \"{1}\".", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "El parámetro de tipo '{0}' del alias del tipo exportado tiene o usa un nombre privado '{1}'.", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "El parámetro de tipo '{0}' del método de la interfaz exportada tiene o usa el nombre privado '{1}'.", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "El parámetro de tipo '{0}' del método público de la clase exportada tiene o usa el nombre privado '{1}'.", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "El parámetro de tipo '{0}' del método estático público de la clase exportada tiene o usa el nombre privado '{1}'.", "Type_parameter_declaration_expected_1139": "Se esperaba una declaración de parámetros de tipo.", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "Type parameter declarations can only be used in TypeScript files.", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "Type parameter defaults can only reference previously declared type parameters.", "Type_parameter_list_cannot_be_empty_1098": "La lista de parámetros de tipo no puede estar vacía.", "Type_parameter_name_cannot_be_0_2368": "El nombre del parámetro de tipo no puede ser \"{0}\".", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "Los parámetros de tipo no pueden aparecer en una declaración de constructor.", "Type_predicate_0_is_not_assignable_to_1_1226": "El predicado de tipo '{0}' no se puede asignar a '{1}'.", "Type_reference_directive_0_was_not_resolved_6120": "======== No se resolvió la directiva de referencia de tipo '{0}'. ========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== La directiva de referencia de tipo '{0}' se resolvió correctamente como '{1}', principal: {2}. ========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== La directiva de referencia de tipo \"{0}\" se resolvió correctamente como \"{1}\" con el identificador de paquete \"{2}\", principal: {3}. ========", "Types_have_separate_declarations_of_a_private_property_0_2442": "Los tipos tienen declaraciones independientes de una propiedad '{0}' privada.", "Types_of_parameters_0_and_1_are_incompatible_2328": "Los tipos de parámetros '{0}' y '{1}' no son compatibles.", "Types_of_property_0_are_incompatible_2326": "Los tipos de propiedad '{0}' no son compatibles.", @@ -967,10 +1215,18 @@ "Unexpected_token_1012": "Token inesperado.", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "Token inesperado. Se esperaba un constructor, un método, un descriptor de acceso o una propiedad.", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "Token inesperado. Se esperaba un nombre de parámetro de tipo sin llaves.", + "Unexpected_token_Did_you_mean_or_gt_1382": "Token inesperado. ¿Pretendía usar \"{'>'}\" o \">\"?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "Token inesperado. ¿Pretendía usar \"{'}'}\" o \"}\"?", "Unexpected_token_expected_1179": "Token inesperado. Se esperaba \"{\".", + "Unknown_build_option_0_5072": "Opción \"{0}\" de compilación desconocida.", + "Unknown_build_option_0_Did_you_mean_1_5077": "Opción de compilación \"{0}\" desconocida. ¿Pretendía usar \"{1}\"?", "Unknown_compiler_option_0_5023": "Opción '{0}' del compilador desconocida.", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "Opción del compilador \"{0}\" desconocida. ¿Pretendía usar \"{1}\"?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "Opción 'excludes' desconocida. ¿Quería decir 'exclude'?", "Unknown_type_acquisition_option_0_17010": "Opción '{0}' de adquisición de tipos desconocida.", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "Unknown type acquisition option '{0}'. Did you mean '{1}'?", + "Unknown_watch_option_0_5078": "Opción \"{0}\" de inspección desconocida.", + "Unknown_watch_option_0_Did_you_mean_1_5079": "Unknown watch option '{0}'. Did you mean '{1}'?", "Unreachable_code_detected_7027": "Se ha detectado código inaccesible.", "Unsupported_locale_0_6049": "Configuración regional '{0}' no admitida.", "Unterminated_Unicode_escape_sequence_1199": "Secuencia de escape Unicode sin terminar.", @@ -980,34 +1236,52 @@ "Unterminated_template_literal_1160": "Literal de plantilla sin terminar.", "Untyped_function_calls_may_not_accept_type_arguments_2347": "Las llamadas a función sin tipo no pueden aceptar argumentos de tipo.", "Unused_label_7028": "Etiqueta no usada.", + "Updating_output_of_project_0_6373": "Actualizando la salida del proyecto \"{0}\"...", "Updating_output_timestamps_of_project_0_6359": "Actualizando las marcas de hora de salida del proyecto \"{0}\"...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "Actualizando las marcas de hora de salida no modificadas del proyecto \"{0}\"...", "Use_synthetic_default_member_95016": "Use el miembro sintético \"default\".", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "El uso de una cadena en una instrucción \"for...of\" solo se admite en ECMAScript 5 y versiones posteriores.", + "Using_compiler_options_of_project_reference_redirect_0_6215": "Using compiler options of project reference redirect '{0}'.", "VERSION_6036": "VERSIÓN", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "El valor de tipo \"{0}\" no tiene propiedades en común con el tipo \"{1}\". ¿Realmente quiere llamarlo?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "No se puede llamar a un valor de tipo '{0}'. ¿Pretendía incluir \"new\"?", "Variable_0_implicitly_has_an_1_type_7005": "La variable '{0}' tiene un tipo '{1}' implícitamente.", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage.", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "La variable '{0}' tiene implícitamente el tipo '{1}' en algunos sitios donde no se puede determinar su tipo.", "Variable_0_is_used_before_being_assigned_2454": "La variable '{0}' se usa antes de asignarla.", "Variable_declaration_expected_1134": "Se esperaba una declaración de variable.", "Variable_declaration_list_cannot_be_empty_1123": "La lista de declaraciones de variable no puede estar vacía.", "Version_0_6029": "Versión {0}", "Watch_input_files_6005": "Inspeccionar archivos de entrada.", + "Watch_option_0_requires_a_value_of_type_1_5080": "La opción \"{0}\" de inspección requiere un valor de tipo {1}.", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "Si se debe mantener la salida de la consola no actualizada en el modo de inspección en lugar de borrar la pantalla.", + "Wrap_invalid_character_in_an_expression_container_95101": "Wrap invalid character in an expression container", + "You_cannot_rename_a_module_via_a_global_import_8031": "You cannot rename a module via a global import.", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "No se puede cambiar el nombre de elementos definidos en la biblioteca TypeScript estándar.", "You_cannot_rename_this_element_8000": "No se puede cambiar el nombre a este elemento.", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "\"{0}\" no acepta suficientes argumentos para utilizarse como decorador aquí. ¿Pretendía llamar primero y escribir \"@{0}()\"?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "Las operaciones \"{0}\" y \"{1}\" no se pueden mezclar sin paréntesis.", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "\"{0}\" se especifica dos veces. El atributo denominado \"{0}\" se sobrescribirá.", - "_0_can_only_be_used_in_a_ts_file_8009": "'{0}' solo se puede usar en un archivo .ts.", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "\"{0}\" no se puede usar como valor porque se exportó mediante \"export type\".", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "\"{0}\" no se puede usar como valor porque se importó mediante \"import type\".", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "Los componentes \"{0}\" no aceptan el texto como elemento secundario. El texto de JSX tiene el tipo \"string\", pero el tipo que se esperaba de \"{1}\" es \"{2}\".", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "Las declaraciones \"{0}\" solo se pueden usar en archivos TypeScript.", "_0_expected_1005": "Se esperaba '{0}'.", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage.", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "'{0}' tiene el tipo de valor devuelto \"any\" implícitamente porque no tiene una anotación de tipo de valor devuelto y se hace referencia a este directa o indirectamente en una de sus expresiones return.", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "'{0}' tiene el tipo de valor devuelto \"any\" implícitamente porque no tiene una anotación de tipo y se hace referencia a este directa o indirectamente en su propio inicializador.", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "'{0}' es un elemento primitivo, pero '{1}' es un objeto contenedor. Use '{0}' preferentemente cuando sea posible.", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'.", "_0_is_declared_but_its_value_is_never_read_6133": "Se declara \"{0}\", pero su valor no se lee nunca.", "_0_is_declared_but_never_used_6196": "\"{0}\" se declara pero nunca se utiliza.", + "_0_is_declared_here_2728": "\"{0}\" se declara aquí.", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "\"{0}\" se define como propiedad en la clase \"{1}\", pero se reemplaza aquí en \"{2}\" como descriptor de acceso.", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "\"{0}\" se define como descriptor de acceso en la clase \"{1}\", pero se reemplaza aquí en \"{2}\" como propiedad de instancia.", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "\"{0}\" no es una propiedad Meta válida para la palabra clave \"{1}\". ¿Pretendía usar \"{2}\"?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "Se hace referencia a '{0}' directa o indirectamente en su propia expresión base.", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "Se hace referencia a '{0}' directa o indirectamente en su propia anotación de tipo.", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "\"{0}\" se ha especificado más de una vez, por lo que se sobrescribirá este uso.", "_0_list_cannot_be_empty_1097": "La lista '{0}' no puede estar vacía.", "_0_modifier_already_seen_1030": "El modificador '{0}' ya se ha visto.", "_0_modifier_cannot_appear_on_a_class_element_1031": "El modificador '{0}' no puede aparecer en un elemento de clase.", @@ -1021,17 +1295,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "El modificador '{0}' no se puede usar en un contexto de ambiente.", "_0_modifier_cannot_be_used_with_1_modifier_1243": "El modificador '{0}' no se puede usar con el modificador '{1}'.", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "El modificador '{0}' no se puede usar con una declaración de clase.", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "El modificador \"{0}\" no se puede usar con un identificador privado.", "_0_modifier_must_precede_1_modifier_1029": "El modificador \"{0}\" debe preceder al modificador \"{1}\".", + "_0_needs_an_explicit_type_annotation_2782": "\"{0}\" necesita una anotación de tipo explícito.", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "'{0}' solo hace referencia a un tipo, pero aquí se usa como espacio de nombres.", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "'{0}' solo hace referencia a un tipo, pero aquí se usa como valor.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "\"{0}\" solo hace referencia a un tipo, pero aquí se está usando como valor. ¿Necesita cambiar la biblioteca de destino? Pruebe a cambiar la opción del compilador \"lib\" a es2015 o posterior.", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "'{0}' hace referencia a un elemento UMD global, pero el archivo actual es un módulo. Puede agregar una importación en su lugar.", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "\"{0}\" hace referencia a un valor, pero aquí se usa como tipo.", "_0_tag_already_specified_1223": "La etiqueta '{0}' ya se ha especificado.", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "La etiqueta '{0}' no se puede usar de forma independiente como etiqueta JSDoc de nivel superior.", + "_0_was_also_declared_here_6203": "\"{0}\" también se ha declarado aquí.", + "_0_was_exported_here_1377": "\"{0}\" se ha exportado aquí.", + "_0_was_imported_here_1376": "\"{0}\" se ha importado aquí.", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "'{0}' carece de una anotación de tipo de valor devuelto, pero tiene un tipo de valor devuelto '{1}' implícitamente.", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "\"{0}\" carece de una anotación de tipo de valor devuelto, pero tiene un tipo yield \"{1}\" de forma implícita.", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "El modificador 'abstract' solo puede aparecer en una declaración de propiedad, clase o método.", - "await_expression_is_only_allowed_within_an_async_function_1308": "La expresión \"await\" solo se permite en una función asincrónica.", + "and_here_6204": "y aquí.", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "'await' expressions are only allowed within async functions and at the top levels of modules.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "Las expresiones \"await\" no se pueden usar en un inicializador de parámetros.", + "await_has_no_effect_on_the_type_of_this_expression_80007": "'await' has no effect on the type of this expression.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "La opción \"baseUrl\" está establecida en \"{0}\", se usará este valor para resolver el nombre de módulo no relativo \"{1}\".", + "can_only_be_used_at_the_start_of_a_file_18026": "\"#!\" solo se puede usar al principio de un archivo.", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "\"=\" solo se puede usar en una propiedad de literal de objeto dentro de una asignación de desestructuración.", "case_or_default_expected_1130": "Se esperaba \"case\" o \"default\".", "class_expressions_are_not_currently_supported_9003": "Actualmente, no se admiten las expresiones \"class\".", @@ -1039,11 +1325,12 @@ "const_declarations_must_be_initialized_1155": "Las declaraciones \"const\" deben inicializarse.", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "El inicializador de miembros de enumeración \"const\" se evaluó con un valor no finito.", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "El inicializador de miembros de enumeración \"const\" se evaluó con un valor \"NaN\" no permitido.", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "const enum member initializers can only contain literal values and other computed enum values.", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "Las enumeraciones \"const\" solo se pueden usar en expresiones de acceso de propiedad o índice, o en la parte derecha de una declaración de importación, una asignación de exportación o una consulta de tipo.", + "constructor_is_a_reserved_word_18012": "\"#constructor\" es una palabra reservada.", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "No se puede llamar a \"delete\" en un identificador en modo strict.", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "eliminar esto - El proyecto \"{0}\" está actualizado porque se compiló previamente", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "Las declaraciones \"enum\" solo se pueden usar en un archivo .ts.", - "export_can_only_be_used_in_a_ts_file_8003": "\"export=\" solo se puede usar en un archivo .ts.", + "export_can_only_be_used_in_TypeScript_files_8003": "'export =' can only be used in TypeScript files.", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "El modificador 'export' no se puede aplicar a módulos de ambiente ni aumentos de módulos, porque siempre están visibles.", "extends_clause_already_seen_1172": "La cláusula \"extends\" ya se ha visto.", "extends_clause_must_precede_implements_clause_1173": "La cláusula \"extends\" debe preceder a la cláusula \"implements\".", @@ -1053,23 +1340,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "Los descriptores de acceso 'get' y 'set' deben tener el mismo tipo 'this'.", "get_and_set_accessor_must_have_the_same_type_2380": "Los descriptores de acceso \"get\" y \"set\" deben tener el mismo tipo.", "implements_clause_already_seen_1175": "La cláusula \"implements\" ya se ha visto.", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "\"implements clauses\" solo se puede usar en un archivo .ts.", - "import_can_only_be_used_in_a_ts_file_8002": "\"import ... =\" solo se puede usar en un archivo .ts.", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "'implements' clauses can only be used in TypeScript files.", + "import_can_only_be_used_in_TypeScript_files_8002": "\"import ... =\" solo se puede usar en los archivos TypeScript. ", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "Las declaraciones \"infer\" solo se permiten en la cláusula \"extends\" de un tipo condicional.", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "\"interface declarations\" solo se puede usar en un archivo .ts.", "let_declarations_can_only_be_declared_inside_a_block_1157": "Las declaraciones \"let\" solo se pueden declarar dentro de un bloque.", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "No se permite usar \"let\" como nombre en las declaraciones \"let\" o \"const\".", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "\"module declarations\" solo se puede usar en un archivo .ts.", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "\"new T[]\" no se puede usar para crear una matriz. Use \"new Array()\" en su lugar.", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "La expresión \"new\", a cuyo destino le falta una signatura de construcción, tiene implícitamente un tipo \"any\".", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "Las \"aserciones no nulas\" solo se pueden usar en un archivo .ts.", "options_6024": "Opciones", "or_expected_1144": "Se esperaba \"{\" o \";\".", "package_json_does_not_have_a_0_field_6100": "\"package.json\" no tiene un campo \"{0}\".", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "'package.json' does not have a 'typesVersions' entry that matches version '{0}'.", + "package_json_had_a_falsy_0_field_6220": "'package.json' had a falsy '{0}' field.", "package_json_has_0_field_1_that_references_2_6101": "'package.json' tiene el campo '{1}' de '{0}' que hace referencia a '{2}'.", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "\"parameter modifiers\" solo se puede usar en un archivo .ts.", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range.", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'.", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "'package.json' has a 'typesVersions' field with version-specific path mappings.", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "Se ha especificado la opción 'paths'. Se buscará un patrón que coincida con el nombre de módulo '{0}'.", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "El modificador 'readonly' solo puede aparecer en una declaración de propiedad o una signatura de índice.", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "'readonly' type modifier is only permitted on array and tuple literal types.", "require_call_may_be_converted_to_an_import_80005": "La llamada a \"require\" puede convertirse en una importación.", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "Se ha establecido la opción \"rootDirs\". Se usará para resolver el nombre de módulo relativo \"{0}\".", "super_can_only_be_referenced_in_a_derived_class_2335": "Solo se puede hacer referencia a \"super\" en una clase derivada.", @@ -1077,6 +1365,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "No se puede hacer referencia a \"super\" en un nombre de propiedad calculada.", "super_cannot_be_referenced_in_constructor_arguments_2336": "No se puede hacer referencia a \"super\" en argumentos de constructor.", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "'super' se permite únicamente en miembros de expresiones de literal de objeto cuando la opción 'target' es 'ES2015' o superior.", + "super_may_not_use_type_arguments_2754": "'super' may not use type arguments.", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "Debe llamarse a \"super\" antes de acceder a una propiedad de \"super\" en el constructor de una clase derivada.", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "Debe llamarse a 'super' antes de acceder a 'this' en el constructor de una clase derivada.", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "\"super\" debe estar seguido de una lista de argumentos o un acceso a miembros.", @@ -1087,14 +1376,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "No se puede hacer referencia a \"this\" en argumentos de constructor.", "this_cannot_be_referenced_in_current_location_2332": "No se puede hacer referencia a \"this\" en la ubicación actual.", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "'this' tiene el tipo implícito 'any' porque no tiene una anotación de tipo.", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "\"type aliases\" solo se puede usar en un archivo .ts.", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "\"type arguments\" solo se puede usar en un archivo .ts.", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "\"type assertion expressions\" solo se puede usar en un archivo .ts.", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "\"type parameter declarations\" solo se puede usar en un archivo .ts.", - "types_can_only_be_used_in_a_ts_file_8010": "\"types\" solo se puede usar en un archivo .ts.", "unique_symbol_types_are_not_allowed_here_1335": "Aquí no se permiten tipos \"unique symbol\".", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "Los tipos \"unique symbol\" se permiten solo en variables en una instrucción de variable.", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "Los tipos \"unique symbol\" no se pueden utilizar en una declaración de variable con un nombre de enlace.", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "'use strict' directive cannot be used with non-simple parameter list.", + "use_strict_directive_used_here_1349": "'use strict' directive used here.", "with_statements_are_not_allowed_in_an_async_function_block_1300": "No se permiten instrucciones \"with\" en un bloque de funciones asincrónicas.", "with_statements_are_not_allowed_in_strict_mode_1101": "No se permiten instrucciones \"with\" en modo strict.", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "Las expresiones \"yield\" no se pueden usar en un inicializador de parámetros." diff --git a/lib/fr/diagnosticMessages.generated.json b/lib/fr/diagnosticMessages.generated.json index 7a84aae49821b..a64c6c2a5852e 100644 --- a/lib/fr/diagnosticMessages.generated.json +++ b/lib/fr/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "Impossible d'utiliser un modificateur '{0}' avec une déclaration d'importation.", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "Impossible d'utiliser un modificateur '{0}' avec une déclaration d'interface.", "A_0_parameter_must_be_the_first_parameter_2680": "Un paramètre '{0}' doit être le premier paramètre.", + "A_bigint_literal_cannot_use_exponential_notation_1352": "A bigint literal cannot use exponential notation.", + "A_bigint_literal_must_be_an_integer_1353": "A bigint literal must be an integer.", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "Un paramètre de modèle de liaison ne peut pas être facultatif dans une signature d'implémentation.", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "Une instruction 'break' peut être utilisée uniquement dans une itération englobante ou une instruction switch.", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "Une instruction 'break' peut accéder uniquement à une étiquette d'une instruction englobante.", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "Une classe peut uniquement implémenter un identificateur/nom qualifié avec des arguments de type facultatifs.", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "A class can only implement an object type or intersection of object types with statically known members.", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "Une déclaration de classe sans modificateur 'default' doit porter un nom.", "A_class_may_only_extend_another_class_2311": "Une classe peut uniquement étendre une autre classe.", - "A_class_may_only_implement_another_class_or_interface_2422": "Une classe peut uniquement implémenter une autre classe ou interface.", "A_class_member_cannot_have_the_0_keyword_1248": "Un membre de classe ne peut pas avoir le mot clé '{0}'.", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "Une expression avec virgule n'est pas autorisée dans un nom de propriété calculée.", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "Un nom de propriété calculée ne peut pas référencer un paramètre de type à partir de son type conteneur.", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "Un nom de propriété calculée dans une interface doit faire référence à une expression dont le type est un type littéral ou un type 'unique symbol'.", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "Un nom de propriété calculée doit être de type 'string', 'number', 'symbol' ou 'any'.", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "Un nom de propriété calculée de la forme '{0}' doit être de type 'symbol'.", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals.", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "Un membre d'enum const n'est accessible qu'à l'aide d'un littéral de chaîne.", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "Un initialiseur 'const' dans un contexte ambiant doit être un littéral de chaîne ou un littéral numérique.", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "Un constructeur ne peut pas contenir d'appel de 'super' quand sa classe étend 'null'.", "A_constructor_cannot_have_a_this_parameter_2681": "Un constructeur ne peut pas avoir un paramètre 'this'.", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "Une instruction 'continue' peut uniquement être utilisée dans une instruction d'itération englobante.", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "Une instruction 'continue' peut accéder uniquement à une étiquette d'une instruction d'itération englobante.", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "Impossible d'utiliser un modificateur 'declare' dans un contexte ambiant déjà défini.", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": "Un modificateur 'declare' est obligatoire pour une déclaration de niveau supérieur dans un fichier .d.ts.", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "Un élément décoratif peut uniquement décorer une implémentation de méthode, pas une surcharge.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "Une clause 'default' ne peut pas figurer plusieurs fois dans une instruction 'switch'.", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "Une exportation par défaut ne peut être utilisée que dans un module ECMAScript.", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "Un générateur ne peut pas avoir d'annotation de type 'void'.", "A_get_accessor_cannot_have_parameters_1054": "Un accesseur 'get' ne peut pas avoir de paramètres.", "A_get_accessor_must_return_a_value_2378": "Un accesseur 'get' doit retourner une valeur.", + "A_label_is_not_allowed_here_1344": "'A label is not allowed here.", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Un initialiseur de membre dans une déclaration d'enum ne peut pas référencer des membres déclarés après lui, notamment des membres définis dans d'autres enums.", + "A_method_cannot_be_named_with_a_private_identifier_18022": "A method cannot be named with a private identifier.", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Une classe mixin doit avoir un constructeur avec un paramètre rest unique de type 'any[]'.", "A_module_cannot_have_multiple_default_exports_2528": "Un module ne peut pas avoir plusieurs exportations par défaut.", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Une déclaration d'espace de noms ne peut pas se trouver dans un autre fichier que celui d'une classe ou d'une fonction avec laquelle elle est fusionnée.", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Une déclaration d'espace de noms ne peut pas se trouver avant une classe ou une fonction avec laquelle elle est fusionnée.", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "Une déclaration d'espace de noms est autorisée uniquement dans un espace de noms ou un module.", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "Impossible d'appeler ou de construire une importation de style d'espace de noms, ce qui va entraîner un échec au moment de l'exécution.", "A_non_dry_build_would_build_project_0_6357": "Une build non-dry va générer le projet '{0}'", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Une build non-dry va supprimer les fichiers suivants : {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "A non-dry build would update output of project '{0}'", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "A non-dry build would update timestamps for output of project '{0}'", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "Un initialiseur de paramètre est uniquement autorisé dans une implémentation de fonction ou de constructeur.", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "Impossible de déclarer une propriété de paramètre à l'aide d'un paramètre rest.", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "Une propriété de paramètre est uniquement autorisée dans une implémentation de constructeur.", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "Une promesse doit avoir une méthode 'then'.", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "Une propriété d'une classe dont le type est un type 'unique symbol' doit être à la fois 'static' et 'readonly'.", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "Une propriété d'une interface ou d'un littéral de type dont le type est un type 'unique symbol' doit être 'readonly'.", + "A_required_element_cannot_follow_an_optional_element_1257": "A required element cannot follow an optional element.", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "Un paramètre obligatoire ne peut pas suivre un paramètre optionnel.", "A_rest_element_cannot_contain_a_binding_pattern_2501": "Un élément rest ne peut pas contenir de modèle de liaison.", "A_rest_element_cannot_have_a_property_name_2566": "Un élément rest ne peut pas avoir de nom de propriété.", "A_rest_element_cannot_have_an_initializer_1186": "Un élément rest ne peut pas avoir d'initialiseur.", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "Un élément rest doit être le dernier dans un modèle de déstructuration.", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "A rest element must be last in a tuple type.", + "A_rest_element_type_must_be_an_array_type_2574": "A rest element type must be an array type.", "A_rest_parameter_cannot_be_optional_1047": "Un paramètre rest ne peut pas être facultatif.", "A_rest_parameter_cannot_have_an_initializer_1048": "Un paramètre rest ne peut pas avoir d'initialiseur.", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "Un paramètre rest doit être le dernier dans une liste de paramètres.", @@ -81,9 +89,9 @@ "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "Une protection de type basée sur 'this' n'est pas compatible avec une protection de type basée sur des paramètres.", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "Un type 'this' est disponible uniquement dans un membre non statique d'une classe ou d'une interface.", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "Un fichier 'tsconfig.json' est déjà défini à l'emplacement '{0}'.", - "A_tuple_type_element_list_cannot_be_empty_1122": "Une liste d'éléments de type tuple ne peut pas être vide.", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "Une expression d'assertion de type n'est pas autorisée dans la partie gauche d'une expression d'élévation à une puissance. Mettez l'expression entre parenthèses.", "A_type_literal_property_cannot_have_an_initializer_1247": "Une propriété de littéral de type ne peut pas avoir d'initialiseur.", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "A type-only import can specify a default import or named bindings, but not both.", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "Un prédicat de type ne peut pas référencer un paramètre rest.", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "Un prédicat de type ne peut pas référencer un élément '{0}' dans un modèle de liaison.", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "Un prédicat de type est autorisé uniquement dans une position de type de retour pour les fonctions et les méthodes.", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "Ajouter '{0}' à la déclaration d'importation existante de \"{1}\"", "Add_0_to_unresolved_variable_90008": "Ajouter '{0}.' à la variable non résolue", "Add_all_missing_async_modifiers_95041": "Ajouter tous les modificateurs 'async' manquants", + "Add_all_missing_imports_95064": "Add all missing imports", "Add_all_missing_members_95022": "Ajouter tous les membres manquants", "Add_all_missing_super_calls_95039": "Ajouter tous les appels super manquants", "Add_async_modifier_to_containing_function_90029": "Ajouter le modificateur async dans la fonction conteneur", + "Add_await_95083": "Add 'await'", + "Add_await_to_initializer_for_0_95084": "Add 'await' to initializer for '{0}'", + "Add_await_to_initializers_95089": "Add 'await' to initializers", "Add_braces_to_arrow_function_95059": "Ajouter des accolades à la fonction arrow", + "Add_const_to_all_unresolved_variables_95082": "Add 'const' to all unresolved variables", + "Add_const_to_unresolved_variable_95081": "Add 'const' to unresolved variable", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "Add default import '{0}' to existing import declaration from \"{1}\"", "Add_definite_assignment_assertion_to_property_0_95020": "Ajouter une assertion d'assignation définie à la propriété '{0}'", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "Ajouter des assertions d'affectation définie à toutes les propriétés non initialisées", + "Add_export_to_make_this_file_into_a_module_95097": "Add 'export {}' to make this file into a module", "Add_index_signature_for_property_0_90017": "Ajouter une signature d'index pour la propriété '{0}'", "Add_initializer_to_property_0_95019": "Ajouter un initialiseur à la propriété '{0}'", "Add_initializers_to_all_uninitialized_properties_95027": "Ajouter des initialiseurs à toutes les propriétés non initialisées", + "Add_missing_enum_member_0_95063": "Add missing enum member '{0}'", + "Add_missing_new_operator_to_all_calls_95072": "Add missing 'new' operator to all calls", + "Add_missing_new_operator_to_call_95071": "Add missing 'new' operator to call", "Add_missing_super_call_90001": "Ajouter l'appel manquant à 'super()'", "Add_missing_typeof_95052": "Ajouter un 'typeof' manquant", + "Add_names_to_all_parameters_without_names_95073": "Add names to all parameters without names", "Add_or_remove_braces_in_an_arrow_function_95058": "Ajouter ou supprimer les accolades dans une fonction arrow", + "Add_parameter_name_90034": "Add parameter name", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "Ajouter un qualificateur à toutes les variables non résolues correspondant à un nom de membre", "Add_to_all_uncalled_decorators_95044": "Ajouter '()' à tous les décorateurs non appelés", "Add_ts_ignore_to_all_error_messages_95042": "Ajouter '@ts-ignore' à tous les messages d'erreur", "Add_undefined_type_to_all_uninitialized_properties_95029": "Ajouter un type non défini à toutes les propriétés non initialisées", "Add_undefined_type_to_property_0_95018": "Ajouter un type 'undefined' à la propriété '{0}'", + "Add_unknown_conversion_for_non_overlapping_types_95069": "Add 'unknown' conversion for non-overlapping types", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "Add 'unknown' to all conversions of non-overlapping types", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "L'ajout d'un fichier tsconfig.json permet d'organiser les projets qui contiennent des fichiers TypeScript et JavaScript. En savoir plus sur https://aka.ms/tsconfig.", "Additional_Checks_6176": "Vérifications supplémentaires", "Advanced_Options_6178": "Options avancées", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "Toutes les déclarations de '{0}' doivent avoir des paramètres de type identiques.", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "Toutes les déclarations d'une méthode abstraite doivent être consécutives.", "All_destructured_elements_are_unused_6198": "Tous les éléments déstructurés sont inutilisés.", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "All files must be modules when the '--isolatedModules' flag is provided.", "All_imports_in_import_declaration_are_unused_6192": "Les importations de la déclaration d'importation ne sont pas toutes utilisées.", + "All_type_parameters_are_unused_6205": "All type parameters are unused", "All_variables_are_unused_6199": "Toutes les variables sont inutilisées.", + "Allow_accessing_UMD_globals_from_modules_95076": "Allow accessing UMD globals from modules.", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "Autorisez les importations par défaut à partir des modules sans exportation par défaut. Cela n'affecte pas l'émission du code, juste le contrôle de type.", "Allow_javascript_files_to_be_compiled_6102": "Autorisez la compilation des fichiers JavaScript.", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "Les enums const ambiants ne sont pas autorisés quand l'indicateur '--isolatedModules' est fourni.", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "Already included file name '{0}' differs from file name '{1}' only in casing.", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "Une déclaration de module ambiant ne peut pas spécifier un nom de module relatif.", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "Impossible d'imbriquer des modules ambiants dans d'autres modules ou espaces de noms.", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "Un module AMD ne peut pas avoir plusieurs affectations de nom.", "An_abstract_accessor_cannot_have_an_implementation_1318": "Un accesseur abstrait ne peut pas avoir d'implémentation.", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "Impossible de déclarer un accesseur dans un contexte ambiant.", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "An accessibility modifier cannot be used with a private identifier.", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "An accessor cannot be named with a private identifier.", "An_accessor_cannot_have_type_parameters_1094": "Un accesseur ne peut pas avoir de paramètres de type.", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "Une déclaration de module ambiant est uniquement autorisée au niveau supérieur dans un fichier.", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "Un opérande arithmétique doit être de type 'any', 'number' ou un type enum.", + "An_argument_for_0_was_not_provided_6210": "An argument for '{0}' was not provided.", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "An argument matching this binding pattern was not provided.", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.", + "An_arrow_function_cannot_have_a_this_parameter_2730": "An arrow function cannot have a 'this' parameter.", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "Une fonction ou méthode asynchrone en ES5/ES3 nécessite le constructeur 'Promise'. Vérifiez que vous avez une déclaration pour le constructeur 'Promise', ou incluez 'ES2015' dans votre option '--lib'.", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "Une fonction ou une méthode async doit avoir un type de retour valide pouvant être attendu.", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "Une fonction ou une méthode async doit retourner 'Promise'. Vérifiez que vous avez une déclaration pour 'Promise', ou incluez 'ES2015' dans votre option '--lib'.", "An_async_iterator_must_have_a_next_method_2519": "Un itérateur asynchrone doit comporter une méthode 'next()'.", "An_element_access_expression_should_take_an_argument_1011": "Une expression d'accès à un élément doit accepter un argument.", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "An enum member cannot be named with a private identifier.", "An_enum_member_cannot_have_a_numeric_name_2452": "Un membre enum ne peut pas avoir un nom numérique.", + "An_enum_member_name_must_be_followed_by_a_or_1357": "An enum member name must be followed by a ',', '=', or '}'.", "An_export_assignment_can_only_be_used_in_a_module_1231": "Une affectation d'exportation peut uniquement être utilisée dans un module.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Impossible d'utiliser une assignation d'exportation dans un module comportant d'autres éléments exportés.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Une affectation d'exportation ne peut pas être utilisée dans un espace de noms.", "An_export_assignment_cannot_have_modifiers_1120": "Une assignation d'exportation ne peut pas avoir de modificateurs.", "An_export_declaration_can_only_be_used_in_a_module_1233": "Une déclaration d'exportation peut uniquement être utilisée dans un module.", "An_export_declaration_cannot_have_modifiers_1193": "Une déclaration d'exportation ne peut pas avoir de modificateurs.", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "An expression of type 'void' cannot be tested for truthiness", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "Une valeur d'échappement Unicode étendue doit être comprise entre 0x0 et 0x10FFFF inclus.", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "An identifier or keyword cannot immediately follow a numeric literal.", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "Impossible de déclarer une implémentation dans des contextes ambiants.", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "An import alias cannot reference a declaration that was exported using 'export type'.", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "An import alias cannot reference a declaration that was imported using 'import type'.", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "Une déclaration d'importation peut uniquement être utilisée dans un espace de noms ou un module.", "An_import_declaration_cannot_have_modifiers_1191": "Une déclaration d'importation ne peut pas avoir de modificateurs.", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "Un chemin d'importation ne peut pas finir par une extension '{0}'. Importez '{1}' à la place.", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "Un paramètre de signature d'index doit avoir une annotation de type.", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "Un type de paramètre de signature d'index ne peut pas être un alias de type. Écrivez '[{0}: {1}]: {2}' à la place.", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "Un type de paramètre de signature d'index ne peut pas être un type union. Utilisez un type d'objet mappé à la place.", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "Le type d'un paramètre de signature d'index doit être 'string' ou 'number'.", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "An index signature parameter type must be either 'string' or 'number'.", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "Une interface peut uniquement étendre un identificateur/nom qualifié avec des arguments de type facultatifs.", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "Une interface peut uniquement étendre une classe ou une autre interface.", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "An interface can only extend an object type or intersection of object types with statically known members.", "An_interface_property_cannot_have_an_initializer_1246": "Une propriété d'interface ne peut pas avoir d'initialiseur.", "An_iterator_must_have_a_next_method_2489": "Un itérateur doit comporter une méthode 'next()'.", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "Un littéral d'objet ne peut pas avoir plusieurs accesseurs get/set portant le même nom.", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "Un littéral d'objet ne peut pas avoir plusieurs propriétés portant le même nom en mode strict.", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "Un littéral d'objet ne peut pas avoir une propriété et un accesseur portant le même nom.", "An_object_member_cannot_be_declared_optional_1162": "Impossible de déclarer un membre d'objet comme étant facultatif.", + "An_optional_chain_cannot_contain_private_identifiers_18030": "An optional chain cannot contain private identifiers.", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "An outer value of 'this' is shadowed by this container.", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "Une signature de surcharge ne peut pas être déclarée en tant que générateur.", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "Une expression unaire avec l'opérateur '{0}' n'est pas autorisée dans la partie gauche d'une expression d'élévation à une puissance. Mettez l'expression entre parenthèses.", "Annotate_everything_with_types_from_JSDoc_95043": "Annoter tout avec des types de JSDoc", "Annotate_with_type_from_JSDoc_95009": "Annoter avec le type de JSDoc", "Annotate_with_types_from_JSDoc_95010": "Annoter avec les types de JSDoc", + "Another_export_default_is_here_2753": "Another export default is here.", + "Are_you_missing_a_semicolon_2734": "Are you missing a semicolon?", "Argument_expression_expected_1135": "Expression d'argument attendue.", "Argument_for_0_option_must_be_Colon_1_6046": "L'argument de l'option '{0}' doit être {1}.", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "L'argument de type '{0}' n'est pas attribuable au paramètre de type '{1}'.", "Array_element_destructuring_pattern_expected_1181": "Modèle de déstructuration d'élément de tableau attendu.", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "Assertions require every name in the call target to be declared with an explicit type annotation.", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "Assertions require the call target to be an identifier or qualified name.", "Asterisk_Slash_expected_1010": "'.' attendu.", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "Les augmentations de la portée globale ne peuvent être directement imbriquées que dans les modules externes ou les déclarations de modules ambiants.", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "Les augmentations de la portée globale doivent comporter un modificateur 'declare', sauf si elles apparaissent déjà dans un contexte ambiant.", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "La détection automatique des typages est activée dans le projet '{0}'. Exécution de la passe de résolution supplémentaire pour le module '{1}' à l'aide de l'emplacement du cache '{2}'.", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "Les expressions de classe de base ne peuvent pas référencer les paramètres de type de classe.", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "Le type de retour du constructeur de base '{0}' n'est pas un type de classe ou d'interface.", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members.", "Base_constructors_must_all_have_the_same_return_type_2510": "Les constructeurs de base doivent tous avoir le même type de retour.", "Base_directory_to_resolve_non_absolute_module_names_6083": "Répertoire de base pour la résolution des noms de modules non absolus.", "Basic_Options_6172": "Options de base", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "BigInt literals are not available when targeting lower than ES2020.", "Binary_digit_expected_1177": "Chiffre binaire attendu.", "Binding_element_0_implicitly_has_an_1_type_7031": "L'élément de liaison '{0}' possède implicitement un type '{1}'.", "Block_scoped_variable_0_used_before_its_declaration_2448": "Variable de portée de bloc '{0}' utilisée avant sa déclaration.", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "Générer tous les projets, même ceux qui semblent être à jour", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "Générer un ou plusieurs projets et leurs dépendances (s'ils sont obsolètes)", + "Build_option_0_requires_a_value_of_type_1_5073": "Build option '{0}' requires a value of type {1}.", "Building_project_0_6358": "Génération du projet '{0}'...", "Call_decorator_expression_90028": "Appeler l'expression de l'élément décoratif", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "Call signature return types '{0}' and '{1}' are incompatible.", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "La signature d'appel, qui ne dispose pas d'annotation de type de retour, possède implicitement un type de retour 'any'.", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Call_target_does_not_contain_any_signatures_2346": "La cible de l'appel ne contient aucune signature.", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "Impossible d'accéder à '{0}.{1}', car '{0}' est un type, mais pas un espace de noms. Voulez-vous plutôt récupérer le type de la propriété '{1}' dans '{0}' avec '{0}[\"{1}\"]' ?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "Cannot access ambient const enums when the '--isolatedModules' flag is provided.", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "Impossible d'assigner un type de constructeur '{0}' à un type de constructeur '{1}'.", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "Impossible d'attribuer un type de constructeur abstrait à un type de constructeur non abstrait.", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "Impossible d'effectuer une assignation à '{0}', car il s'agit d'une constante ou d'une propriété en lecture seule.", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "Cannot assign to '{0}' because it is a constant.", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "Cannot assign to '{0}' because it is a read-only property.", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "Impossible d'effectuer une assignation à '{0}', car il ne s'agit pas d'une variable.", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "Impossible d'augmenter le module '{0}', car il se résout en une entité non-module.", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "Impossible d'augmenter le module '{0}' avec des exportations de valeurs, car il se résout en une entité non-module.", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "Impossible de compiler des modules à l'aide de l'option '{0}' tant que l'indicateur '--module' n'a pas la valeur 'amd' ou 'system'.", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "Impossible de compiler des espaces de noms quand l'indicateur '--isolatedModules' est fourni.", "Cannot_create_an_instance_of_an_abstract_class_2511": "Impossible de créer une instance d'une classe abstraite.", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'.", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "Impossible d'exporter '{0}'. Seules les déclarations locales peuvent être exportées à partir d'un module.", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "Impossible d'étendre une classe '{0}'. Le constructeur de classe est marqué comme étant privé.", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "Impossible d'étendre une interface '{0}'. Vouliez-vous dire 'implements' ?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "Cannot find a tsconfig.json file at the current directory: {0}.", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "Le fichier tsconfig.json est introuvable dans le répertoire spécifié : '{0}'.", "Cannot_find_global_type_0_2318": "Le type global '{0}' est introuvable.", "Cannot_find_global_value_0_2468": "La valeur globale '{0}' est introuvable.", "Cannot_find_lib_definition_for_0_2726": "Définition de lib introuvable pour '{0}'.", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "Définition de lib introuvable pour '{0}'. Est-ce qu'il ne s'agit pas plutôt de '{1}' ?", "Cannot_find_module_0_2307": "Le module '{0}' est introuvable.", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension", "Cannot_find_name_0_2304": "Le nom '{0}' est introuvable.", "Cannot_find_name_0_Did_you_mean_1_2552": "Le nom '{0}' est introuvable. Est-ce qu'il ne s'agit pas plutôt de '{1}' ?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "Le nom '{0}' est introuvable. Voulez-vous utiliser le membre d'instance 'this.{0}' ?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "Le nom '{0}' est introuvable. Voulez-vous utiliser le membre statique '{1}.{0}' ?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery` and then add `jquery` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.", "Cannot_find_namespace_0_2503": "L'espace de noms '{0}' est introuvable.", "Cannot_find_parameter_0_1225": "Paramètre '{0}' introuvable.", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "Impossible de trouver le chemin d'accès au sous-répertoire commun pour les fichiers d'entrée.", "Cannot_find_type_definition_file_for_0_2688": "Le fichier de définition de type est introuvable pour '{0}'.", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "Impossible d'importer les fichiers de déclaration de type. Importez '{0}' à la place de '{1}'.", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "Impossible d'initialiser la variable de portée externe '{0}' dans la même portée que celle de la déclaration de portée de bloc '{1}'.", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "Impossible d'appeler une expression dont le type n'a pas de signature d'appel. Le type '{0}' n'a aucune signature d'appel compatible.", "Cannot_invoke_an_object_which_is_possibly_null_2721": "Impossible d'appeler un objet qui a éventuellement une valeur 'null'.", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "Impossible d'appeler un objet qui a éventuellement une valeur 'null' ou 'undefined'.", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "Impossible d'appeler un objet qui a éventuellement une valeur 'undefined'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'.", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "Impossible de préfixer le projet '{0}', car 'outFile' n'est pas défini", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "Impossible de réexporter un type quand l'indicateur '--isolatedModules' est spécifié.", "Cannot_read_file_0_Colon_1_5012": "Impossible de lire le fichier '{0}' : {1}.", "Cannot_redeclare_block_scoped_variable_0_2451": "Impossible de redéclarer la variable de portée de bloc '{0}'.", "Cannot_redeclare_exported_variable_0_2323": "Impossible de redéclarer la variable exportée '{0}'.", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "Impossible de redéclarer l'identificateur '{0}' dans la clause catch.", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "Cannot update output of project '{0}' because there was error reading file '{1}'", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "Impossible d'utiliser JSX, sauf si l'indicateur '--jsx' est fourni.", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "Impossible d'utiliser des importations, des exportations ou des augmentations de module quand '--module' a la valeur 'none'.", "Cannot_use_namespace_0_as_a_type_2709": "Impossible d'utiliser l'espace de noms '{0}' en tant que type.", "Cannot_use_namespace_0_as_a_value_2708": "Impossible d'utiliser l'espace de noms '{0}' en tant que valeur.", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "Impossible d'utiliser 'new' avec une expression dont le type ne possède pas de signature d'appel ou de construction.", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "Impossible d'écrire le fichier '{0}', car il serait remplacé par plusieurs fichiers d'entrée.", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "Impossible d'écrire le fichier '{0}', car cela entraînerait le remplacement du fichier d'entrée.", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "Une variable de clause catch ne peut pas avoir d'annotation de type.", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "Vérification en cours pour déterminer si '{0}' est le préfixe correspondant le plus long pour '{1}' - '{2}'.", "Circular_definition_of_import_alias_0_2303": "Définition circulaire de l'alias d'importation '{0}'.", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "Circularité détectée durant la résolution de la configuration : {0}", + "Circularity_originates_in_type_at_this_location_2751": "Circularity originates in type at this location.", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "La classe '{0}' définit l'accesseur de membre d'instance '{1}', mais la classe étendue '{2}' le définit comme fonction de membre d'instance.", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "La classe '{0}' définit la fonction de membre d'instance '{1}', mais la classe étendue '{2}' la définit comme accesseur de membre d'instance.", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "La classe '{0}' définit la fonction de membre d'instance '{1}', mais la classe étendue '{2}' le définit comme propriété de membre d'instance.", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "La classe '{0}' définit la propriété de membre d'instance '{1}', mais la classe étendue '{2}' le définit comme fonction de membre d'instance.", "Class_0_incorrectly_extends_base_class_1_2415": "La classe '{0}' étend de manière incorrecte la classe de base '{1}'.", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "La classe '{0}' implémente de manière incorrecte la classe '{1}'. Voulez-vous vraiment étendre '{1}' et hériter de ses membres en tant que sous-classe ?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "Le côté statique de la classe '{0}' étend de manière incorrecte le côté statique de la classe de base '{1}'.", "Classes_can_only_extend_a_single_class_1174": "Les classes ne peuvent étendre qu'une seule classe.", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "Les classes contenant des méthodes abstraites doivent être marquées comme étant abstraites.", + "Classes_may_not_have_a_field_named_constructor_18006": "Classes may not have a field named 'constructor'.", "Command_line_Options_6171": "Options de ligne de commande", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "Compilez le projet en fonction du chemin de son fichier config ou d'un dossier contenant 'tsconfig.json'.", "Compiler_option_0_expects_an_argument_6044": "L'option de compilateur '{0}' attend an argument.", "Compiler_option_0_requires_a_value_of_type_1_5024": "L'option de compilateur '{0}' exige une valeur de type {1}.", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "Compiler reserves name '{0}' when emitting private identifier downlevel.", "Composite_projects_may_not_disable_declaration_emit_6304": "Les projets composites ne doivent pas désactiver l'émission de déclaration.", + "Composite_projects_may_not_disable_incremental_compilation_6379": "Composite projects may not disable incremental compilation.", "Computed_property_names_are_not_allowed_in_enums_1164": "Les noms de propriétés calculées ne sont pas autorisés dans les enums.", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "Les valeurs calculées ne sont pas autorisées dans un enum avec des membres ayant une valeur de chaîne.", "Concatenate_and_emit_output_to_single_file_6001": "Concaténer la sortie et l'émettre vers un seul fichier.", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "Définitions en conflit pour '{0}' sur '{1}' et '{2}'. Installez une version spécifique de cette bibliothèque pour résoudre le conflit.", + "Conflicts_are_in_this_file_6201": "Conflicts are in this file.", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "Construct signature return types '{0}' and '{1}' are incompatible.", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "La signature de construction, qui ne dispose pas d'annotation de type de retour, possède implicitement un type de retour 'any'.", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Constructor_implementation_is_missing_2390": "L'implémentation de constructeur est manquante.", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "Le constructeur de la classe '{0}' est privé et uniquement accessible dans la déclaration de classe.", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "Le constructeur de la classe '{0}' est protégé et uniquement accessible dans la déclaration de classe.", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "Les constructeurs pour les classes dérivées doivent contenir un appel de 'super'.", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "Fichier conteneur non spécifié et répertoire racine impossible à déterminer. Recherche ignorée dans le dossier 'node_modules'.", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.", "Convert_0_to_mapped_object_type_95055": "Convertir '{0}' en type d'objet mappé", "Convert_all_constructor_functions_to_classes_95045": "Convertir toutes les fonctions de constructeur en classes", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "Convert all imports not used as a value to type-only imports", + "Convert_all_re_exported_types_to_type_only_exports_1365": "Convert all re-exported types to type-only exports", "Convert_all_require_to_import_95048": "Convertir tous les 'require' en 'import'", + "Convert_all_to_async_functions_95066": "Convert all to async functions", + "Convert_all_to_bigint_numeric_literals_95092": "Convert all to bigint numeric literals", "Convert_all_to_default_imports_95035": "Convertir tout en importations par défaut", + "Convert_const_to_let_95093": "Convert 'const' to 'let'", + "Convert_default_export_to_named_export_95061": "Convert default export to named export", "Convert_function_0_to_class_95002": "Convertir la fonction '{0}' en classe", "Convert_function_to_an_ES2015_class_95001": "Convertir la fonction en classe ES2015", + "Convert_invalid_character_to_its_html_entity_code_95100": "Convert invalid character to its html entity code", + "Convert_named_export_to_default_export_95062": "Convert named export to default export", "Convert_named_imports_to_namespace_import_95057": "Convertir les importations nommées en importation d'espace de noms", "Convert_namespace_import_to_named_imports_95056": "Convertir l'importation d'espace de noms en importations nommées", + "Convert_parameters_to_destructured_object_95075": "Convert parameters to destructured object", "Convert_require_to_import_95047": "Convertir 'require' en 'import'", "Convert_to_ES6_module_95017": "Convertir en module ES6", + "Convert_to_a_bigint_numeric_literal_95091": "Convert to a bigint numeric literal", + "Convert_to_async_function_95065": "Convert to async function", "Convert_to_default_import_95013": "Convertir en importation par défaut", + "Convert_to_template_string_95096": "Convert to template string", + "Convert_to_type_only_export_1364": "Convert to type-only export", + "Convert_to_type_only_import_1373": "Convert to type-only import", "Corrupted_locale_file_0_6051": "Fichier de paramètres régionaux endommagé : {0}.", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "Le fichier de déclaration du module '{0}' est introuvable. '{1}' a implicitement un type 'any'.", "Could_not_write_file_0_Colon_1_5033": "Impossible d'écrire le fichier '{0}' : {1}.", "DIRECTORY_6038": "RÉPERTOIRE", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit.", "Declaration_expected_1146": "Déclaration attendue.", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "Le nom de la déclaration est en conflit avec l'identificateur global intégré '{0}'.", "Declaration_or_statement_expected_1128": "Déclaration ou instruction attendue.", + "Declare_a_private_field_named_0_90053": "Declare a private field named '{0}'.", "Declare_method_0_90023": "Déclarer la méthode '{0}'", "Declare_property_0_90016": "Déclarer la propriété '{0}'", "Declare_static_method_0_90024": "Déclarer la méthode statique '{0}'", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "Les éléments décoratifs ne sont pas valides ici.", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "Impossible d'appliquer des éléments décoratifs à plusieurs accesseurs get/set du même nom.", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "L'exportation par défaut du module a utilisé ou utilise le nom privé '{0}'.", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "Definite assignment assertions can only be used along with a type annotation.", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "Definitions of the following identifiers conflict with those in another file: {0}", "Delete_all_unused_declarations_95024": "Supprimer toutes les déclarations inutilisées", "Delete_the_outputs_of_all_projects_6365": "Supprimer les sorties de tous les projets", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[Déconseillé] Utilisez '--jsxFactory' à la place. Permet de spécifier l'objet appelé pour createElement durant le ciblage de 'react' pour l'émission JSX", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[Déconseillé] Utilisez '--outFile' à la place. Permet de concaténer et d'émettre la sortie vers un seul fichier", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[Déconseillé] Utilisez '--skipLibCheck' à la place. Permet d'ignorer le contrôle de type des fichiers de déclaration de la bibliothèque par défaut.", + "Did_you_forget_to_use_await_2773": "Did you forget to use 'await'?", + "Did_you_mean_0_1369": "Did you mean '{0}'?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?", + "Did_you_mean_to_call_this_expression_6212": "Did you mean to call this expression?", + "Did_you_mean_to_mark_this_function_as_async_1356": "Did you mean to mark this function as 'async'?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "Did you mean to parenthesize this function type?", + "Did_you_mean_to_use_new_with_this_expression_6213": "Did you mean to use 'new' with this expression?", "Digit_expected_1124": "Chiffre attendu", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "Le répertoire '{0}' n'existe pas. Toutes les recherches associées sont ignorées.", "Disable_checking_for_this_file_90018": "Désactiver la vérification de ce fichier", "Disable_size_limitations_on_JavaScript_projects_6162": "Désactivez les limitations de taille sur les projets JavaScript.", + "Disable_solution_searching_for_this_project_6224": "Disable solution searching for this project.", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "Désactivez la vérification stricte des signatures génériques dans les types de fonction.", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "Disable use of source files instead of declaration files from referenced projects.", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "Interdisez les références dont la casse est incohérente dans le même fichier.", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "N'ajoutez pas de références avec trois barres obliques, ni de modules importés à la liste des fichiers compilés.", "Do_not_emit_comments_to_output_6009": "Ne pas émettre de commentaires dans la sortie.", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "Ne signalez pas les erreurs pour les étiquettes inutilisées.", "Do_not_resolve_the_real_path_of_symlinks_6013": "Ne pas résoudre le chemin réel des liens symboliques.", "Do_not_truncate_error_messages_6165": "Ne tronquez pas les messages d'erreur.", - "Duplicate_declaration_0_2718": "Déclaration '{0}' dupliquée.", "Duplicate_function_implementation_2393": "Implémentation de fonction en double.", "Duplicate_identifier_0_2300": "Identificateur '{0}' en double.", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "Identificateur '{0}' en double. Le compilateur réserve le nom '{1}' dans l'étendue de plus haut niveau d'un module.", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "Identificateur dupliqué '_this'. Le compilateur utilise la déclaration de variable '_this' pour capturer la référence 'this'.", "Duplicate_label_0_1114": "Étiquette '{0}' en double.", "Duplicate_number_index_signature_2375": "Signature d'index de nombre dupliquée.", + "Duplicate_property_0_2718": "Duplicate property '{0}'.", "Duplicate_string_index_signature_2374": "Signature d'index de chaîne dupliquée.", "Dynamic_import_cannot_have_type_arguments_1326": "L'importation dynamique ne peut pas avoir d'arguments de type", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "L'importation dynamique est prise en charge uniquement quand l'indicateur '--module' a la valeur 'commonjs' ou 'esNext'.", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "L'importation dynamique doit avoir un seul spécificateur comme argument.", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Le spécificateur de l'importation dynamique doit être de type 'string', mais ici il est de type '{0}'.", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'esnext', 'commonjs', 'amd', 'system', or 'umd'.", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other.", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other.", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'.", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "L'élément possède implicitement un type 'any', car l'expression d'index n'est pas de type 'number'.", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "L'élément a implicitement un type 'any', car le type '{0}' n'a aucune signature d'index.", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "Émettez une marque d'ordre d'octet (BOM) UTF-8 au début des fichiers de sortie.", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "Émettez un seul fichier avec des mappages de sources au lieu d'avoir un fichier distinct.", + "Emit_class_fields_with_Define_instead_of_Set_6222": "Emit class fields with Define instead of Set.", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "Émettez la source aux côtés des mappages de sources dans un fichier unique. Nécessite la définition de '--inlineSourceMap' ou '--sourceMap'.", "Enable_all_strict_type_checking_options_6180": "Activez toutes les options de contrôle de type strict.", + "Enable_incremental_compilation_6378": "Activer la compilation incrémentielle", "Enable_project_compilation_6302": "Activer la compilation du projet", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "Enable strict 'bind', 'call', and 'apply' methods on functions.", "Enable_strict_checking_of_function_types_6186": "Activez la vérification stricte des types de fonction.", "Enable_strict_checking_of_property_initialization_in_classes_6187": "Activez la vérification stricte de l'initialisation des propriétés dans les classes.", "Enable_strict_null_checks_6113": "Activez strict null checks.", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "Enable the 'experimentalDecorators' option in your configuration file", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "Enable the '--jsx' flag in your configuration file", "Enable_tracing_of_the_name_resolution_process_6085": "Activez le traçage du processus de résolution de noms.", "Enable_verbose_logging_6366": "Activer la journalisation détaillée", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "Active l'interopérabilité entre les modules CommonJS et ES via la création d'objets d'espace de noms pour toutes les importations. Implique 'allowSyntheticDefaultImports'.", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "Membre enum attendu.", "Enum_member_must_have_initializer_1061": "Un membre enum doit posséder un initialiseur.", "Enum_name_cannot_be_0_2431": "Le nom d'enum ne peut pas être '{0}'.", + "Enum_type_0_circularly_references_itself_2586": "Enum type '{0}' circularly references itself.", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "Le type enum '{0}' a des membres dont les initialiseurs ne sont pas des littéraux.", "Examples_Colon_0_6026": "Exemples : {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "Profondeur excessive de la pile pour la comparaison des types '{0}' et '{1}'.", @@ -385,7 +490,7 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "Au moins {0} arguments attendus, mais {1} ou plus reçus.", "Expected_corresponding_JSX_closing_tag_for_0_17002": "Balise de fermeture JSX correspondante attendue pour '{0}'.", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "Balise de fermeture correspondante attendue pour le fragment JSX.", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "Le type du champ '{0}' attendu dans 'package.json' est censé être 'string'. Obtention de '{1}'.", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'.", "Experimental_Options_6177": "Options expérimentales", "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "La prise en charge expérimentale des éléments décoratifs est une fonctionnalité (feature) susceptible d'être changée dans une future mise en production. Définissez l'option '--experimentalDecorators' pour supprimer cet avertissement.", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "Spécification explicite du genre de résolution de module : '{0}'.", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "Les exportations et les assignations d'exportation ne sont pas autorisées dans les augmentations de module.", "Expression_expected_1109": "Expression attendue.", "Expression_or_comma_expected_1137": "Expression ou virgule attendue.", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "Expression produces a union type that is too complex to represent.", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "Expression résolue en '_super' et utilisée par le compilateur pour capturer la référence de classe de base.", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "L'expression correspond à la déclaration de variable '{0}' que le compilateur utilise pour prendre en charge les fonctions async.", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "L'expression génère une déclaration de variable '_newTarget' que le compilateur utilise pour capturer la référence de méta-propriété 'new.target'.", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "Extraire vers {0} dans {1}", "Extract_to_0_in_1_scope_95008": "Extraire vers {0} dans la portée {1}", "Extract_to_0_in_enclosing_scope_95007": "Extraire vers {0} dans la portée englobante", + "Extract_to_interface_95090": "Extract to interface", + "Extract_to_type_alias_95078": "Extract to type alias", + "Extract_to_typedef_95079": "Extract to typedef", + "Extract_type_95077": "Extract type", "FILE_6035": "FICHIER", "FILE_OR_DIRECTORY_6040": "FICHIER OU RÉPERTOIRE", "Failed_to_parse_file_0_Colon_1_5014": "Échec de l'analyse du fichier '{0}' : {1}.", "Fallthrough_case_in_switch_7029": "Case avec fallthrough dans une instruction switch.", "File_0_does_not_exist_6096": "Le fichier '{0}' n'existe pas.", "File_0_exist_use_it_as_a_name_resolution_result_6097": "Le fichier '{0}' existe. Utilisez-le comme résultat pour la résolution de noms.", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "File '{0}' has an unsupported extension. The only supported extensions are {1}.", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "Le fichier '{0}' a une extension non prise en charge. Il est ignoré.", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "Le fichier '{0}' possède une extension non prise en charge. Les seules extensions prises en charge sont {1}.", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?", "File_0_is_not_a_module_2306": "Le fichier '{0}' n'est pas un module.", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "Le fichier '{0}' ne figure pas dans la liste de fichiers projet. Les projets doivent lister tous les fichiers ou utiliser un modèle 'include'.", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern.", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "Le fichier '{0}' ne se trouve pas sous 'rootDir' '{1}'. 'rootDir' est supposé contenir tous les fichiers sources.", "File_0_not_found_6053": "Fichier '{0}' introuvable.", "File_change_detected_Starting_incremental_compilation_6032": "Modification de fichier détectée. Démarrage de la compilation incrémentielle...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "La spécification de fichier ne peut pas contenir un répertoire parent ('..') après un caractère générique de répertoire récursif ('**') : '{0}'.", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "Une spécification de fichier ne peut pas se terminer par un caractère générique de répertoire récursif ('**') : '{0}'.", "Fix_all_detected_spelling_errors_95026": "Corriger toutes les fautes d'orthographe détectées", + "Fix_all_expressions_possibly_missing_await_95085": "Fix all expressions possibly missing 'await'", + "Found_0_errors_6217": "{0} erreurs trouvées.", "Found_0_errors_Watching_for_file_changes_6194": "{0} erreurs trouvées. Changements de fichier sous surveillance.", + "Found_1_error_6216": "1 erreur trouvée.", "Found_1_error_Watching_for_file_changes_6193": "1 erreur trouvée. Changements de fichier sous surveillance.", "Found_package_json_at_0_6099": "'package.json' trouvé sur '{0}'.", - "Found_package_json_at_0_Package_ID_is_1_6190": "'package.json' trouvé sur '{0}'. L'ID de package est '{1}'.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "Les déclarations de fonction ne sont pas autorisées dans les blocs en mode strict durant le ciblage de la version 'ES3' ou 'ES5'.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "Les déclarations de fonction ne sont pas autorisées dans les blocs en mode strict durant le ciblage de la version 'ES3' ou 'ES5'. Les définitions de classe sont automatiquement en mode strict.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "Les déclarations de fonction ne sont pas autorisées dans les blocs en mode strict durant le ciblage de la version 'ES3' ou 'ES5'. Les modules sont automatiquement en mode strict.", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "La fonction n'a pas d'instruction return de fin, et le type de retour n'inclut pas 'undefined'.", "Function_overload_must_be_static_2387": "La surcharge de fonction doit être statique.", "Function_overload_must_not_be_static_2388": "La surcharge de fonction ne doit pas être statique.", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "Function type, which lacks return-type annotation, implicitly has an '{0}' return type.", "Generate_get_and_set_accessors_95046": "Générer les accesseurs 'get' et 'set'", + "Generates_a_CPU_profile_6223": "Generates a CPU profile.", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "Génère un mappage de source pour chaque fichier '.d.ts' correspondant.", "Generates_corresponding_d_ts_file_6002": "Génère le fichier '.d.ts' correspondant.", "Generates_corresponding_map_file_6043": "Génère le fichier '.map' correspondant.", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "Le générateur a implicitement le type '{0}', car il ne produit aucune valeur. Fournissez plutôt un type de retour.", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.", "Generators_are_not_allowed_in_an_ambient_context_1221": "Les générateurs ne sont pas autorisés dans un contexte ambiant.", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "Les générateurs sont disponibles uniquement quand ECMAScript 2015 ou version supérieure est ciblé.", "Generic_type_0_requires_1_type_argument_s_2314": "Le type générique '{0}' exige {1} argument(s) de type.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "Le type générique '{0}' nécessite entre {1} et {2} arguments de type.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "L'instanciation du type générique est trop profonde et éventuellement infinie.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Les accesseurs getter et setter ne sont pas en accord sur la visibilité.", "Global_module_exports_may_only_appear_at_top_level_1316": "Les exportations de modules globaux ne peuvent apparaître qu'au niveau supérieur.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "Les exportations de modules globaux ne peuvent apparaître que dans les fichiers de déclaration.", "Global_module_exports_may_only_appear_in_module_files_1314": "Les exportations de modules globaux ne peuvent apparaître que dans les fichiers de module.", "Global_type_0_must_be_a_class_or_interface_type_2316": "Le type global '{0}' doit être un type de classe ou d'interface.", "Global_type_0_must_have_1_type_parameter_s_2317": "Le type global '{0}' doit avoir {1} paramètre(s) de type.", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.", "Hexadecimal_digit_expected_1125": "Chiffre hexadécimal attendu.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "Identificateur attendu. '{0}' est un mot réservé en mode strict.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "Identificateur attendu. '{0}' est un mot réservé en mode strict. Les définitions de classe sont automatiquement en mode strict.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "Identificateur attendu. '{0}' est un mot réservé en mode strict. Les modules sont automatiquement en mode strict.", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "Identifier expected. '{0}' is a reserved word that cannot be used here.", "Identifier_expected_1003": "Identificateur attendu.", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "Identificateur attendu. '__esModule' est réservé en tant que marqueur exporté durant la transformation des modules ECMAScript.", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`", "Ignore_this_error_message_90019": "Ignorer ce message d'erreur", "Implement_all_inherited_abstract_classes_95040": "Implémenter toutes les classes abstraites héritées", "Implement_all_unimplemented_interfaces_95032": "Implémenter toutes les interfaces non implémentées", "Implement_inherited_abstract_class_90007": "Implémenter la classe abstraite héritée", "Implement_interface_0_90006": "Implémenter l'interface '{0}'", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "La clause implements de la classe exportée '{0}' possède ou utilise le nom privé '{1}'.", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.", "Import_0_from_module_1_90013": "Importer '{0}' à partir du module \"{1}\"", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "Vous ne pouvez pas utiliser l'assignation d'importation pour cibler des modules ECMAScript. Utilisez plutôt 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"' ou un autre format de module.", "Import_declaration_0_is_using_private_name_1_4000": "La déclaration d'importation '{0}' utilise le nom privé '{1}'.", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "La déclaration d'importation est en conflit avec la déclaration locale de '{0}'.", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "Les déclarations d'importation dans un espace de noms ne peuvent pas référencer un module.", + "Import_default_0_from_module_1_90032": "Import default '{0}' from module \"{1}\"", "Import_emit_helpers_from_tslib_6139": "Importer l'assistance à l'émission à partir de 'tslib'.", "Import_may_be_converted_to_a_default_import_80003": "L'importation peut être convertie en importation par défaut.", "Import_name_cannot_be_0_2438": "Le nom d'importation ne peut pas être '{0}'.", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "Les importations ne sont pas autorisées dans les augmentations de module. Déplacez-les vers le module externe englobant.", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "Dans les déclarations d'enums ambiants, l'initialiseur de membre doit être une expression constante.", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "Dans un enum avec plusieurs déclarations, seule une déclaration peut omettre un initialiseur pour son premier élément d'enum.", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "Dans les déclarations d'enum 'const', l'initialiseur de membre doit être une expression constante.", "Include_modules_imported_with_json_extension_6197": "Inclure les modules importés avec l'extension '.json'", "Index_signature_in_type_0_only_permits_reading_2542": "La signature d'index du type '{0}' autorise uniquement la lecture.", "Index_signature_is_missing_in_type_0_2329": "Signature d'index manquante dans le type '{0}'.", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "Les déclarations individuelles de la déclaration fusionnée '{0}' doivent toutes être exportées ou locales.", "Infer_all_types_from_usage_95023": "Déduire tous les types de l'utilisation", "Infer_parameter_types_from_usage_95012": "Déduire les types des paramètres à partir de l'utilisation", + "Infer_this_type_of_0_from_usage_95080": "Infer 'this' type of '{0}' from usage", "Infer_type_of_0_from_usage_95011": "Déduire le type de '{0}' à partir de l'utilisation", "Initialize_property_0_in_the_constructor_90020": "Initialiser la propriété '{0}' dans le constructeur", "Initialize_static_property_0_90021": "Initialiser la propriété statique '{0}'", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "JSDoc '...' peut apparaître uniquement dans le dernier paramètre d'une signature.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "La balise JSDoc '@param' se nomme '{0}', mais il n'existe aucun paramètre portant ce nom.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "La balise JSDoc '@param' se nomme '{0}', mais il n'existe aucun paramètre portant ce nom. Elle doit correspondre à 'arguments', si elle est de type tableau.", + "JSDoc_type_0_circularly_references_itself_2587": "JSDoc type '{0}' circularly references itself.", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "La balise JSDoc '@typedef' doit avoir une annotation de type ou être suivie des balises '@property' ou '@member'.", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "Les types JSDoc peuvent uniquement être utilisés dans les commentaires de la documentation.", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "Les types JSDoc peuvent être déplacés vers les types TypeScript.", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "Le type '{0}' de l'élément JSX n'a pas de signatures de construction ou d'appel.", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "Le type '{0}' de l'élément JSX n'est pas une fonction constructeur pour les éléments JSX.", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "Les éléments JSX ne peuvent pas avoir plusieurs attributs du même nom.", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "JSX expressions may not use the comma operator. Did you mean to write an array?", "JSX_expressions_must_have_one_parent_element_2657": "Les expressions JSX doivent avoir un élément parent.", "JSX_fragment_has_no_corresponding_closing_tag_17014": "Le fragment JSX n'a pas de balise de fermeture correspondante.", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "Le fragment JSX n'est pas pris en charge quand vous utilisez un pragma de fabrique JSX inline", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "L'enfant spread JSX doit être un type de tableau.", "Jump_target_cannot_cross_function_boundary_1107": "La cible du saut ne peut pas traverser une limite de fonction.", "KIND_6034": "GENRE", + "Keywords_cannot_contain_escape_characters_1260": "Keywords cannot contain escape characters.", "LOCATION_6037": "EMPLACEMENT", "Language_service_is_disabled_9004": "Le service de langage est désactivé.", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "Le côté gauche de l'opérateur virgule n'est pas utilisé, et n'a aucun effet secondaire.", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "Faire de l'appel à 'super()' la première instruction du constructeur", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "Le type d'objet mappé a implicitement un type de modèle 'any'.", "Member_0_implicitly_has_an_1_type_7008": "Le membre '{0}' possède implicitement un type '{1}'.", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Merge_conflict_marker_encountered_1185": "Marqueur de conflit de fusion rencontré.", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "La déclaration fusionnée '{0}' ne peut pas inclure de déclaration d'exportation par défaut. Ajoutez plutôt une déclaration 'export default {0}' distincte.", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "La méta-propriété '{0}' n'est autorisée que dans le corps d'une déclaration de fonction, d'une expression de fonction ou d'un constructeur.", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "La méthode '{0}' de l'interface exportée comporte ou utilise le nom '{1}' du module privé '{2}'.", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "La méthode '{0}' de l'interface exportée comporte ou utilise le nom privé '{1}'.", "Modifiers_cannot_appear_here_1184": "Les modificateurs ne peuvent pas apparaître ici.", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "Le module '{0}' ne fait pas référence à un type, mais est utilisé en tant que type ici.", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "Module '{0}' can only be default-imported using the '{1}' flag", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "Module '{0}' declares '{1}' locally, but it is exported as '{2}'.", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "Module '{0}' declares '{1}' locally, but it is not exported.", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "Le module '{0}' ne fait pas référence à une valeur, mais est utilisé en tant que valeur ici.", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "Le module {0} a déjà exporté un membre nommé '{1}'. Effectuez une réexportation explicite pour lever l'ambiguïté.", "Module_0_has_no_default_export_1192": "Le module '{0}' n'a pas d'exportation par défaut.", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?", "Module_0_has_no_exported_member_1_2305": "Le module '{0}' n'a aucun membre exporté '{1}'.", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "Le module '{0}' n'a aucun membre exporté '{1}'. Pensiez-vous plutôt à '{2}' ?", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "Le module '{0}' est masqué par une déclaration locale portant le même nom.", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "Le module '{0}' se résout en une entité non-module et ne peut pas être importé à l'aide de cette construction.", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "Le module '{0}' utilise 'export =' et ne peut pas être utilisé avec 'export *'.", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "Le module '{0}' a été résolu en tant que module ambiant déclaré dans '{1}', car ce fichier n'a pas été modifié.", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "Le module '{0}' a été résolu en tant que module ambiant déclaré localement dans le fichier '{1}'.", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "Le module '{0}' a été résolu en '{1}' mais '--jsx' n'est pas défini.", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used.", "Module_Resolution_Options_6174": "Options de résolution du module", "Module_name_0_matched_pattern_1_6092": "Nom de module '{0}', modèle correspondant '{1}'.", "Module_name_0_was_not_resolved_6090": "======== Le nom de module '{0}' n'a pas été résolu. ========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== Le nom de module '{0}' a été correctement résolu en '{1}'. ========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========", "Module_resolution_kind_is_not_specified_using_0_6088": "Le genre de résolution de module n'est pas spécifié. Utilisation de '{0}'.", "Module_resolution_using_rootDirs_has_failed_6111": "Échec de la résolution de module à l'aide de 'rootDirs'.", "Move_to_a_new_file_95049": "Déplacer vers un nouveau fichier", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "La propriété nommée '{0}' des types '{1}' et '{2}' n'est pas identique.", "Namespace_0_has_no_exported_member_1_2694": "L'espace de noms '{0}' n'a aucun membre exporté '{1}'.", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "Aucun constructeur de base n'a le nombre spécifié d'arguments de type.", + "No_constituent_of_type_0_is_callable_2755": "No constituent of type '{0}' is callable.", + "No_constituent_of_type_0_is_constructable_2759": "No constituent of type '{0}' is constructable.", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "No index signature with a parameter of type '{0}' was found on type '{1}'.", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "Aucune entrée dans le fichier config '{0}'. Les chemins 'include' spécifiés étaient '{1}' et les chemins 'exclude' étaient '{2}'.", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments.", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments.", + "No_overload_matches_this_call_2769": "No overload matches this call.", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "La classe non abstraite '{0}' n'implémente pas le membre abstrait '{1}' hérité de la classe '{2}'.", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "L'expression de classe non abstraite '{0}' n'implémente pas le membre abstrait hérité '{0}' de la classe '{1}'.", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "Non-null assertions can only be used in TypeScript files.", + "Non_simple_parameter_declared_here_1348": "Non-simple parameter declared here.", "Not_all_code_paths_return_a_value_7030": "Les chemins du code ne retournent pas tous une valeur.", + "Not_all_constituents_of_type_0_are_callable_2756": "Not all constituents of type '{0}' are callable.", + "Not_all_constituents_of_type_0_are_constructable_2760": "Not all constituents of type '{0}' are constructable.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "Impossible d'assigner le type d'index numérique '{0}' au type d'index de chaîne '{1}'.", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers.", "Numeric_separators_are_not_allowed_here_6188": "Les séparateurs numériques ne sont pas autorisés ici.", "Object_is_of_type_unknown_2571": "L'objet est de type 'unknown'.", "Object_is_possibly_null_2531": "L'objet a peut-être la valeur 'null'.", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "Les littéraux octaux ne sont pas autorisés dans l'initialiseur des membres d'enums. Utilisez la syntaxe '{0}'.", "Octal_literals_are_not_allowed_in_strict_mode_1121": "Les littéraux octaux ne sont pas autorisés en mode strict.", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "Les littéraux octaux ne sont pas disponibles lorsque vous ciblez ECMAScript 5 et ultérieur. Utilisez la syntaxe '{0}'.", + "Only_ECMAScript_imports_may_use_import_type_1370": "Only ECMAScript imports may use 'import type'.", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "Une seule déclaration de variable est autorisée dans une instruction 'for...in'.", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "Seule une déclaration de variable unique est autorisée dans une instruction 'for...of'.", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "Seule une fonction void peut être appelée avec le mot clé 'new'.", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "Émettez uniquement les fichiers de déclaration '.d.ts'.", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "Seuls les identificateurs/noms qualifiés avec des arguments de type facultatifs sont pris en charge dans une clause 'extends' de classe.", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "Seules les méthodes publiques et protégées de la classe de base sont accessibles par le biais du mot clé 'super'.", + "Operator_0_cannot_be_applied_to_type_1_2736": "Operator '{0}' cannot be applied to type '{1}'.", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "Impossible d'appliquer l'opérateur '{0}' aux types '{1}' et '{2}'.", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "L'option '{0}' ne peut être spécifiée que dans le fichier 'tsconfig.json'.", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "L'option '{0}' peut être utilisée uniquement quand l'option '--inlineSourceMap' ou l'option '--sourceMap' est spécifiée.", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "Option '{0}' cannot be specified when option 'target' is 'ES3'.", "Option_0_cannot_be_specified_with_option_1_5053": "Impossible de spécifier l'option '{0}' avec l'option '{1}'.", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "Impossible de spécifier l'option '{0}' sans spécifier l'option '{1}'.", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "Impossible de spécifier l'option '{0}' sans spécifier l'option '{1}' ou l'option '{2}'.", "Option_0_should_have_array_of_strings_as_a_value_6103": "L'option '{0}' doit avoir un tableau de chaînes en tant que valeur.", "Option_build_must_be_the_first_command_line_argument_6369": "L'option '--build' doit être le premier argument de ligne de commande.", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified.", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "L'option 'isolatedModules' peut être utilisée seulement quand l'option '--module' est spécifiée, ou quand l'option 'target' a la valeur 'ES2015' ou une version supérieure.", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "Impossible d'utiliser l'option 'paths' sans spécifier l'option '--baseUrl'.", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "Impossible d'associer l'option 'project' à des fichiers sources sur une ligne de commande.", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'.", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "Impossible de spécifier l'option '--resolveJsonModule' sans la stratégie de résolution de module 'node'.", "Options_0_and_1_cannot_be_combined_6370": "Impossible de combiner les options '{0}' et '{1}'.", "Options_Colon_6027": "Options :", "Output_directory_for_generated_declaration_files_6166": "Répertoire de sortie pour les fichiers de déclaration générés.", "Output_file_0_from_project_1_does_not_exist_6309": "Le fichier de sortie '{0}' du projet '{1}' n'existe pas", "Output_file_0_has_not_been_built_from_source_file_1_6305": "Le fichier de sortie '{0}' n'a pas été créé à partir du fichier source '{1}'.", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "La signature de surcharge n'est pas compatible avec l'implémentation de fonction.", + "Overload_0_of_1_2_gave_the_following_error_2772": "Overload {0} of {1}, '{2}', gave the following error.", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "Les signatures de surcharge doivent toutes être abstraites ou non abstraites.", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "Les signatures de surcharge doivent toutes être ambiantes ou non ambiantes.", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "Les signatures de surcharge doivent toutes être exportées ou non exportées.", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "Les signatures de surcharge doivent toutes être publiques, privées ou protégées.", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "Le paramètre '{0}' ne peut pas être référencé dans son initialiseur.", "Parameter_0_implicitly_has_an_1_type_7006": "Le paramètre '{0}' possède implicitement un type '{1}'.", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "Le paramètre '{0}' n'est pas à la même position que le paramètre '{1}'.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "Parameter '{0}' of accessor has or is using private name '{1}'.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "Le paramètre '{0}' de la signature d'appel de l'interface exportée possède ou utilise le nom '{1}' du module privé '{2}'.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "Le paramètre '{0}' de la signature d'appel de l'interface exportée possède ou utilise le nom privé '{1}'.", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "Le paramètre '{0}' du constructeur de la classe exportée possède ou utilise le nom '{1}' du module externe {2}, mais il ne peut pas être nommé.", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "Le paramètre '{0}' de la méthode statique publique de la classe exportée possède ou utilise le nom privé '{1}'.", "Parameter_cannot_have_question_mark_and_initializer_1015": "Un paramètre ne peut pas contenir de point d'interrogation et d'initialiseur.", "Parameter_declaration_expected_1138": "Déclaration de paramètre attendue.", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "Parameter has a name but no type. Did you mean '{0}: {1}'?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "Parameter modifiers can only be used in TypeScript files.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "Le type de paramètre du setter public '{0}' de la classe exportée porte ou utilise le nom '{1}' du module privé '{2}'.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "Le type de paramètre du setter public '{0}' de la classe exportée porte ou utilise le nom privé '{1}'.", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "Le type de paramètre du setter public '{0}' de la classe exportée porte ou utilise le nom '{1}' du module privé '{2}'.", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "Analyser en mode strict et émettre \"use strict\" pour chaque fichier source.", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "Le modèle '{0}' ne peut avoir qu'un seul caractère '*' au maximum.", "Prefix_0_with_an_underscore_90025": "Faire précéder '{0}' d'un trait de soulignement", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "Prefix all incorrect property declarations with 'declare'", "Prefix_all_unused_declarations_with_where_possible_95025": "Préfixer toutes les déclarations inutilisées avec '_' si possible", + "Prefix_with_declare_95094": "Prefix with 'declare'", "Print_names_of_files_part_of_the_compilation_6155": "Imprimez les noms des fichiers faisant partie de la compilation.", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "Print names of files that are part of the compilation and then stop processing.", "Print_names_of_generated_files_part_of_the_compilation_6154": "Imprimez les noms des fichiers générés faisant partie de la compilation.", "Print_the_compiler_s_version_6019": "Affichez la version du compilateur.", + "Print_the_final_configuration_instead_of_building_1350": "Print the final configuration instead of building.", "Print_this_message_6017": "Imprimez ce message.", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "Private identifiers are not allowed in variable declarations.", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "Private identifiers are not allowed outside class bodies.", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "Private identifiers are only available when targeting ECMAScript 2015 and higher.", + "Private_identifiers_cannot_be_used_as_parameters_18009": "Private identifiers cannot be used as parameters", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "Private or protected member '{0}' cannot be accessed on a type parameter.", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "Impossible de générer le projet '{0}' car sa dépendance '{1}' comporte des erreurs", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "Project '{0}' can't be built because its dependency '{1}' was not built", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "Le projet '{0}' est obsolète car sa dépendance '{1}' est obsolète", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "Le projet '{0}' est obsolète car la sortie la plus ancienne ('{1}') est antérieure à l'entrée la plus récente '{2}'", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "Le projet '{0}' est obsolète car le fichier de sortie '{1}' n'existe pas", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "Project '{0}' is out of date because output of its dependency '{1}' has changed", "Project_0_is_up_to_date_6361": "Le projet '{0}' est à jour", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "Le projet '{0}' est à jour car l'entrée la plus récente ('{1}') est antérieure à la sortie la plus ancienne ('{2}')", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "Le projet '{0}' est à jour avec les fichiers .d.ts de ses dépendances", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "Projets à référencer", "Property_0_does_not_exist_on_const_enum_1_2479": "La propriété '{0}' n'existe pas sur l'enum 'const' '{1}'.", "Property_0_does_not_exist_on_type_1_2339": "La propriété '{0}' n'existe pas sur le type '{1}'.", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "La propriété '{0}' n'existe pas sur le type '{1}'. Avez-vous oublié d'utiliser 'await' ?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "La propriété '{0}' n'existe pas sur le type '{1}'. Est-ce qu'il ne s'agit pas plutôt de '{2}' ?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "La propriété '{0}' a des déclarations en conflit et est inaccessible dans le type '{1}'.", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "La propriété '{0}' n'a aucun initialiseur et n'est pas définitivement assignée dans le constructeur.", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "La propriété '{0}' a implicitement le type 'any', car son accesseur get ne dispose pas d'une annotation de type de retour.", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "La propriété '{0}' a implicitement le type 'any', car son accesseur set ne dispose pas d'une annotation de type de paramètre.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage.", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "Impossible d'assigner la propriété '{0}' du type '{1}' à la même propriété du type de base '{2}'.", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "La propriété '{0}' du type '{1}' ne peut pas être assignée au type '{2}'.", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'.", + "Property_0_is_a_static_member_of_type_1_2576": "Property '{0}' is a static member of type '{1}'", "Property_0_is_declared_but_its_value_is_never_read_6138": "La propriété '{0}' est déclarée mais sa valeur n'est jamais lue.", "Property_0_is_incompatible_with_index_signature_2530": "La propriété '{0}' est incompatible avec la signature d'index.", + "Property_0_is_incompatible_with_rest_element_type_2573": "Property '{0}' is incompatible with rest element type.", "Property_0_is_missing_in_type_1_2324": "La propriété '{0}' est manquante dans le type '{1}'.", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "Property '{0}' is missing in type '{1}' but required in type '{2}'.", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "Property '{0}' is not accessible outside class '{1}' because it has a private identifier.", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "La propriété '{0}' est facultative dans le type '{1}', mais obligatoire dans le type '{2}'.", "Property_0_is_private_and_only_accessible_within_class_1_2341": "La propriété '{0}' est privée et uniquement accessible dans la classe '{1}'.", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "La propriété '{0}' est privée dans le type '{1}', mais pas dans le type '{2}'.", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "La propriété '{0}' est protégée, mais le type '{1}' n'est pas une classe dérivée de '{2}'.", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "La propriété '{0}' est protégée dans le type '{1}', mais publique dans le type '{2}'.", "Property_0_is_used_before_being_assigned_2565": "La propriété '{0}' est utilisée avant d'être assignée.", + "Property_0_is_used_before_its_initialization_2729": "Property '{0}' is used before its initialization.", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "Impossible d'assigner la propriété '{0}' de l'attribut spread JSX à la propriété cible.", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "La propriété '{0}' de l'expression de classe exportée ne peut pas être privée ou protégée.", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "La propriété '{0}' de l'interface exportée possède ou utilise le nom '{1}' du module privé '{2}'.", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "La propriété '{0}' de l'interface exportée possède ou utilise le nom privé '{1}'.", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "Impossible d'assigner la propriété '{0}' de type '{1}' au type d'index numérique '{2}'.", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "Impossible d'assigner la propriété '{0}' de type '{1}' au type d'index de chaîne '{2}'.", + "Property_0_was_also_declared_here_2733": "Property '{0}' was also declared here.", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.", "Property_assignment_expected_1136": "Assignation de propriété attendue.", "Property_destructuring_pattern_expected_1180": "Modèle de déstructuration de propriété attendu.", "Property_or_signature_expected_1131": "Propriété ou signature attendue.", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "La propriété statique publique '{0}' de la classe exportée possède ou utilise le nom '{1}' du module externe {2}, mais elle ne peut pas être nommée.", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "La propriété statique publique '{0}' de la classe exportée possède ou utilise le nom '{1}' du module privé '{2}'.", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "La propriété statique publique '{0}' de la classe exportée possède ou utilise le type privé '{1}'.", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'.", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "Lever une erreur sur les expressions et les déclarations ayant un type 'any' implicite.", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Déclenche une erreur sur les expressions 'this' avec un type 'any' implicite.", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.", "Redirect_output_structure_to_the_directory_6006": "Rediriger la structure de sortie vers le répertoire.", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "Le projet référencé '{0}' doit avoir le paramètre \"composite\" avec la valeur true.", + "Remove_all_unnecessary_uses_of_await_95087": "Remove all unnecessary uses of 'await'", "Remove_all_unreachable_code_95051": "Supprimer tout le code inaccessible", "Remove_all_unused_labels_95054": "Supprimer toutes les étiquettes inutilisées", "Remove_braces_from_arrow_function_95060": "Supprimer les accolades de la fonction arrow", - "Remove_declaration_for_Colon_0_90004": "Supprimer la déclaration pour : '{0}'", "Remove_destructuring_90009": "Supprimer la déstructuration", "Remove_import_from_0_90005": "Supprimer l'importation de '{0}'", + "Remove_template_tag_90011": "Remove template tag", + "Remove_type_parameters_90012": "Remove type parameters", + "Remove_unnecessary_await_95086": "Remove unnecessary 'await'", "Remove_unreachable_code_95050": "Supprimer le code inaccessible", + "Remove_unused_declaration_for_Colon_0_90004": "Remove unused declaration for: '{0}'", "Remove_unused_label_95053": "Supprimer l'étiquette inutilisée", "Remove_variable_statement_90010": "Supprimer l'instruction de variable", + "Replace_all_unused_infer_with_unknown_90031": "Replace all unused 'infer' with 'unknown'", "Replace_import_with_0_95015": "Remplacez l'importation par '{0}'.", + "Replace_infer_0_with_unknown_90030": "Replace 'infer {0}' with 'unknown'", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Signalez une erreur quand les chemins du code de la fonction ne retournent pas tous une valeur.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Signalez les erreurs pour les case avec fallthrough dans une instruction switch.", "Report_errors_in_js_files_8019": "Signalez les erreurs dans les fichiers .js.", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "Résolution à l'aide des chemins de recherche primaires...", "Resolving_with_primary_search_path_0_6121": "Résolution à l'aide du chemin de recherche primaire '{0}'.", "Rest_parameter_0_implicitly_has_an_any_type_7019": "Le paramètre rest '{0}' possède implicitement un type 'any[]'.", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage.", + "Rest_signatures_are_incompatible_2572": "Rest signatures are incompatible.", "Rest_types_may_only_be_created_from_object_types_2700": "Vous ne pouvez créer des types Rest qu'à partir de types d'objet.", + "Return_type_annotation_circularly_references_itself_2577": "Return type annotation circularly references itself.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "Le type de retour de la signature d'appel de l'interface exportée possède ou utilise le nom '{0}' du module privé '{1}'.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "Le type de retour de la signature d'appel de l'interface exportée possède ou utilise le nom privé '{0}'.", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "Le type de retour de la signature de constructeur de l'interface exportée possède ou utilise le nom '{0}' du module privé '{1}'.", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "Impossible de déterminer le répertoire racine, chemins de recherche primaires ignorés.", "STRATEGY_6039": "STRATÉGIE", "Scoped_package_detected_looking_in_0_6182": "Package de portée détecté. Recherche dans '{0}'", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "Set the 'module' option in your configuration file to '{0}'", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "Set the 'target' option in your configuration file to '{0}'", "Setters_cannot_return_a_value_2408": "Les méthodes setter ne peuvent pas retourner de valeur.", "Show_all_compiler_options_6169": "Affichez toutes les options du compilateur.", "Show_diagnostic_information_6149": "Affichez les informations de diagnostic.", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "La signature '{0}' doit être un prédicat de type.", "Skip_type_checking_of_declaration_files_6012": "Ignorer le contrôle de type des fichiers de déclaration.", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "Ignorer la génération du projet '{0}' car sa dépendance '{1}' comporte des erreurs", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "Ignorer le nettoyage car tous les projets ne peuvent pas être localisés", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "Skipping build of project '{0}' because its dependency '{1}' was not built", "Source_Map_Options_6175": "Options de mappage de source", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "La signature de surcharge spécialisée n'est assignable à aucune signature non spécialisée.", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "Le spécificateur de l'importation dynamique ne peut pas être un élément spread.", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "Spécifiez la version cible d'ECMAScript : 'ES3' (par défaut), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' ou 'ESNEXT'.", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'.", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "Spécifiez la génération de code JSX : 'preserve', 'react-native' ou 'react'.", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "Specify emit/checking behavior for imports that are only used for types", + "Specify_file_to_store_incremental_compilation_information_6380": "Specify file to store incremental compilation information", "Specify_library_files_to_be_included_in_the_compilation_6079": "Spécifiez les fichiers bibliothèques à inclure dans la compilation.", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "Spécifiez la génération de code du module : 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015' ou 'ESNext'.", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'.", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "Spécifiez la stratégie de résolution de module : 'node' (Node.js) ou 'classic' (version de TypeScript antérieure à 1.6).", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'.", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'.", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'.", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "Spécifiez la fonction de fabrique JSX à utiliser pour le ciblage d'une émission JSX 'react', par exemple 'React.createElement' ou 'h'.", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "Spécifiez la séquence de fin de ligne à utiliser durant l'émission des fichiers : 'CRLF' (Dos) ou 'LF' (Unix).", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "Spécifiez l'emplacement dans lequel le débogueur doit localiser les fichiers TypeScript au lieu des emplacements sources.", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "Spécifiez l'emplacement dans lequel le débogueur doit localiser les fichiers de mappage au lieu des emplacements générés.", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "Spécifiez le répertoire racine des fichiers d'entrée. Contrôlez la structure des répertoires de sortie avec --outDir.", + "Split_all_invalid_type_only_imports_1367": "Split all invalid type-only imports", + "Split_into_two_separate_import_declarations_1366": "Split into two separate import declarations", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "L'opérateur spread dans les expressions 'new' est disponible uniquement quand ECMAScript 5 ou version supérieure est ciblé.", "Spread_types_may_only_be_created_from_object_types_2698": "Vous ne pouvez créer des types Spread qu'à partir de types d'objet.", "Starting_compilation_in_watch_mode_6031": "Démarrage de la compilation en mode espion...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "Les prochaines déclarations de propriétés doivent avoir le même type. La propriété '{0}' doit avoir le type '{1}', mais elle a ici le type '{2}'.", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "Les déclarations de variable ultérieures doivent avoir le même type. La variable '{0}' doit être de type '{1}', mais elle a ici le type '{2}'.", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "Le type de la substitution '{0}' du modèle '{1}' est incorrect. Attente de 'string'. Obtention de '{2}'.", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "La substitution '{0}' dans le modèle '{1}' ne peut avoir qu'un seul caractère '*' au maximum.", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "Substitution '{0}' in pattern '{1}' can have at most one '*' character.", "Substitutions_for_pattern_0_should_be_an_array_5063": "Les substitutions du modèle '{0}' doivent correspondre à un tableau.", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "Les substitutions du modèle '{0}' ne doivent pas correspondre à un tableau vide.", "Successfully_created_a_tsconfig_json_file_6071": "Un fichier tsconfig.json a été créé.", @@ -840,78 +1033,121 @@ "Suppress_excess_property_checks_for_object_literals_6072": "Supprimez les vérifications des propriétés en trop pour les littéraux d'objet.", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "Supprimer les erreurs noImplicitAny pour les objets d'indexation auxquels il manque des signatures d'index.", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "La référence 'Symbol' ne fait pas référence à l'objet constructeur Symbol global.", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively.", "Syntax_Colon_0_6023": "Syntaxe : {0}", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "Tagged template expressions are not permitted in an optional chain.", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "The '{0}' modifier can only be used in TypeScript files.", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "Impossible d'appliquer l'opérateur '{0}' au type 'symbol'.", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "L'opérateur '{0}' n'est pas autorisé pour les types booléens. Utilisez '{1}' à la place.", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "The '{0}' property of an async iterator must be a method.", + "The_0_property_of_an_iterator_must_be_a_method_2767": "The '{0}' property of an iterator must be a method.", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "Le type 'Object' peut être assigné à très peu d'autres types. Souhaitez-vous utiliser le type 'any' à la place ?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "Impossible de référencer l'objet 'arguments' dans une fonction arrow dans ES3 et ES5. Utilisez plutôt une expression de fonction standard.", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "Les objets 'arguments' ne peuvent pas être référencés dans une fonction ou méthode async en ES3 et ES5. Utilisez une fonction ou méthode standard.", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "Le corps d'une instruction 'if' ne peut pas être l'instruction vide.", "The_character_set_of_the_input_files_6163": "Jeu de caractères des fichiers d'entrée.", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "The containing arrow function captures the global value of 'this'.", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "Le corps de la fonction ou du module conteneur est trop grand pour l'analyse du flux de contrôle.", "The_current_host_does_not_support_the_0_option_5001": "L'hôte actuel ne prend pas en charge l'option '{0}'.", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "The declaration of '{0}' that you probably intended to use is defined here", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "The expected type comes from property '{0}' which is declared here on type '{1}'", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "The expected type comes from the return type of this signature.", + "The_expected_type_comes_from_this_index_signature_6501": "The expected type comes from this index signature.", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "L'expression d'une assignation d'exportation doit être un identificateur ou un nom qualifié dans un contexte ambiant.", "The_files_list_in_config_file_0_is_empty_18002": "La liste 'files' du fichier config '{0}' est vide.", + "The_first_export_default_is_here_2752": "The first export default is here.", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "Le premier paramètre de la méthode 'then' d'une promesse doit être un rappel.", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "Le type global 'JSX.{0}' ne peut pas avoir plusieurs propriétés.", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "La métapropriété 'import.meta' est uniquement autorisée avec 'ESNext' pour les options de compilateur 'target' et 'module'.", + "The_implementation_signature_is_declared_here_2750": "The implementation signature is declared here.", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "The 'import.meta' meta-property is only allowed when the '--module' option is 'esnext' or 'system'.", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary.", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "Le type déduit de '{0}' référence un type '{1}' inaccessible. Une annotation de type est nécessaire.", + "The_last_overload_gave_the_following_error_2770": "The last overload gave the following error.", + "The_last_overload_is_declared_here_2771": "The last overload is declared here.", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "La partie gauche d'une instruction 'for...in' ne peut pas être un modèle de déstructuration.", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "La partie gauche d'une instruction 'for...in' ne peut pas utiliser d'annotation de type.", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "The left-hand side of a 'for...in' statement may not be an optional property access.", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "La partie gauche d'une instruction 'for...in' doit être un accès à une variable ou une propriété.", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "La partie gauche d'une instruction 'for...in' doit être de type 'string' ou 'any'.", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "La partie gauche d'une instruction 'for...of' ne peut pas utiliser d'annotation de type.", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "The left-hand side of a 'for...of' statement may not be an optional property access.", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "La partie gauche d'une instruction 'for...of' doit être un accès à une variable ou une propriété.", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "La partie gauche d'une opération arithmétique doit être de type 'any', 'number' ou un type enum.", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "The left-hand side of an assignment expression may not be an optional property access.", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "La partie gauche d'une expression d'assignation doit être un accès à une variable ou une propriété.", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "La partie gauche d'une expression 'in' doit être de type 'any', 'string', 'number' ou 'symbol'.", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "La partie gauche d'une expression 'instanceof' doit être de type 'any', un type d'objet ou un paramètre de type.", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "Paramètres régionaux utilisés pour afficher les messages à l'utilisateur (exemple : 'fr-fr')", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "Profondeur de dépendance maximale pour la recherche sous node_modules et le chargement de fichiers JavaScript.", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "The operand of a 'delete' operator cannot be a private identifier.", "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "L'opérande d'un opérateur delete ne peut pas être une propriété en lecture seule.", "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "L'opérande d'un opérateur delete doit être une référence de propriété.", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "The operand of an increment or decrement operator may not be an optional property access.", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "L'opérande d'un opérateur d'incrémentation ou de décrémentation doit être un accès à une variable ou une propriété.", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "The parser expected to find a '}' to match the '{' token here.", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "Le type de retour d'un constructeur d'éléments JSX doit retourner un type d'objet.", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "Le type de retour d'une fonction d'élément décoratif de paramètre doit être 'void' ou 'any'.", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "Le type de retour d'une fonction d'élément décoratif de propriété doit être 'void' ou 'any'.", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "Le type de retour d'une fonction asynchrone doit être une promesse valide ou ne doit contenir aucun membre 'then' pouvant être appelé.", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "Le type de retour d'une fonction ou d'une méthode async doit être le type Promise global.", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "La partie droite d'une instruction 'for...in' doit être de type 'any', un type d'objet ou un paramètre de type, mais elle a le type '{0}' ici.", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "La partie droite d'une opération arithmétique doit être de type 'any', 'number' ou un type enum.", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "La partie droite d'une expression 'in' doit être de type 'any', un type d'objet ou un paramètre de type.", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "La partie droite d'une expression 'instanceof' doit être de type 'any' ou d'un type pouvant être assigné au type d'interface 'Function'.", + "The_shadowing_declaration_of_0_is_defined_here_18017": "The shadowing declaration of '{0}' is defined here", "The_specified_path_does_not_exist_Colon_0_5058": "Le chemin spécifié n'existe pas : '{0}'.", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "La cible d'une assignation doit être un accès à une variable ou une propriété.", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "The target of an object rest assignment may not be an optional property access.", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "La cible de l'assignation du reste d'un objet doit être un accès à une variable ou une propriété.", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "Le contexte 'this' de type '{0}' n'est pas assignable au contexte 'this' de type '{1}' de la méthode.", "The_this_types_of_each_signature_are_incompatible_2685": "Les types 'this' de chaque signature sont incompatibles.", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'.", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "L'argument de type pour le paramètre de type '{0}' ne peut pas être déduit à partir de l'utilisation. Spécifiez plutôt les arguments de type de manière explicite.", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "Le type retourné par la méthode 'next()' d'un itérateur asynchrone doit être une promesse pour un type ayant une propriété 'value'.", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "Le type retourné par la méthode 'next()' d'un itérateur doit avoir une propriété 'value'.", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "The type of a function declaration must match the function's signature.", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property.", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "The type returned by the '{0}()' method of an iterator must have a 'value' property.", + "The_types_of_0_are_incompatible_between_these_types_2200": "The types of '{0}' are incompatible between these types.", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "The types returned by '{0}' are incompatible between these types.", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "La déclaration de variable d'une instruction 'for...in' ne peut pas avoir d'initialiseur.", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "La déclaration de variable d'une instruction 'for...of' ne peut pas avoir d'initialiseur.", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "L'instruction 'with' n'est pas prise en charge. Tous les symboles d'un bloc 'with' ont le type 'any'.", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided.", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "This condition will always return true since the function is always defined. Did you mean to call it instead?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "Cette fonction constructeur peut être convertie en déclaration de classe.", + "This_expression_is_not_callable_2349": "This expression is not callable.", + "This_expression_is_not_constructable_2351": "This expression is not constructable.", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.", + "This_may_be_converted_to_an_async_function_80006": "This may be converted to an async function.", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export.", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag.", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "This overload signature is not compatible with its implementation signature.", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "This parameter is not allowed with 'use strict' directive.", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Cette syntaxe nécessite une application d'assistance importée, mais le module '{0}' est introuvable.", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "Cette syntaxe nécessite une application d'assistance importée nommée '{1}', mais le module '{0}' ne compte aucun membre exporté '{1}'.", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'.", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.", "Trailing_comma_not_allowed_1009": "Virgule de fin non autorisée.", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Transpilez chaque fichier sous forme de module distinct (semblable à 'ts.transpileModule').", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Essayez 'npm install @types/{0}' s'il existe, ou ajoutez un nouveau fichier de déclaration (.d.ts) contenant 'declare module '{0}';'", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`", "Trying_other_entries_in_rootDirs_6110": "Essai avec d'autres entrées dans 'rootDirs'.", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "Essai avec la substitution '{0}', emplacement de module candidat : '{1}'.", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "Le type tuple '{0}' de longueur '{1}' ne peut pas être assigné à un tuple de longueur '{2}'.", - "Type_0_cannot_be_converted_to_type_1_2352": "Impossible de convertir le type '{0}' en type '{1}'.", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "Tuple type '{0}' of length '{1}' has no element at index '{2}'.", + "Tuple_type_arguments_circularly_reference_themselves_4110": "Tuple type arguments circularly reference themselves.", "Type_0_cannot_be_used_as_an_index_type_2538": "Impossible d'utiliser le type '{0}' comme type d'index.", "Type_0_cannot_be_used_to_index_type_1_2536": "Le type '{0}' ne peut pas être utilisé pour indexer le type '{1}'.", "Type_0_does_not_satisfy_the_constraint_1_2344": "Le type '{0}' ne satisfait pas la contrainte '{1}'.", + "Type_0_has_no_call_signatures_2757": "Type '{0}' has no call signatures.", + "Type_0_has_no_construct_signatures_2761": "Type '{0}' has no construct signatures.", "Type_0_has_no_matching_index_signature_for_type_1_2537": "Le type '{0}' n'a aucune signature d'index correspondant au type '{1}'.", "Type_0_has_no_properties_in_common_with_type_1_2559": "Le type '{0}' n'a aucune propriété en commun avec le type '{1}'.", - "Type_0_has_no_property_1_2460": "Le type '{0}' n'a pas de propriété '{1}'.", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "Le type '{0}' n'a pas de propriété '{1}' ni de signature d'index de chaîne.", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "Type '{0}' is missing the following properties from type '{1}': {2}", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.", "Type_0_is_not_a_constructor_function_type_2507": "Le type '{0}' n'est pas un type de fonction constructeur.", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "Le type '{0}' n'est pas un type de retour de fonction async valide en ES5/ES3, car il ne référence pas une valeur de constructeur compatible avec une promesse.", "Type_0_is_not_an_array_type_2461": "Le type '{0}' n'est pas un type de tableau.", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "Le type '{0}' n’est pas un type de tableau. Utilisez l'option du compilateur '--downlevelIteration' pour autoriser l'itération des itérateurs.", "Type_0_is_not_an_array_type_or_a_string_type_2495": "Le type '{0}' n'est pas un type de tableau ou un type de chaîne.", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "Le type '{0}' n’est pas un type de tableau ou un type string. Utilisez l'option du compilateur '--downlevelIteration' pour autoriser l'itération des itérateurs.", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "Le type '{0}' n'est pas un type tableau ou un type chaîne, ou n'a pas de méthode '[Symbol.iterator]()' qui retourne un itérateur.", @@ -926,17 +1162,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "Le type '{0}' fait référence à lui-même de manière récursive en tant que type de base.", "Type_alias_0_circularly_references_itself_2456": "L'alias de type '{0}' fait référence à lui-même de manière circulaire.", "Type_alias_name_cannot_be_0_2457": "Le nom de l'alias de type ne peut pas être '{0}'.", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "Type aliases can only be used in TypeScript files.", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "Une annotation de type ne peut pas apparaître sur une déclaration de constructeur.", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "Type annotations can only be used in TypeScript files.", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "Le candidat de l'argument de type '{1}' n'est pas un argument de type valide, car il ne s'agit pas d'un supertype du candidat '{0}'.", "Type_argument_expected_1140": "Argument de type attendu.", "Type_argument_list_cannot_be_empty_1099": "La liste des arguments de type ne peut pas être vide.", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "Type arguments can only be used in TypeScript files.", "Type_arguments_cannot_be_used_here_1342": "Impossible d'utiliser des arguments de type ici.", + "Type_arguments_for_0_circularly_reference_themselves_4109": "Type arguments for '{0}' circularly reference themselves.", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "Type assertion expressions can only be used in TypeScript files.", "Type_declaration_files_to_be_included_in_compilation_6124": "Fichiers de déclaration de type à inclure dans la compilation.", "Type_expected_1110": "Type attendu.", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "Type instantiation is excessively deep and possibly infinite.", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "Le type est directement ou indirectement référencé dans le rappel d'exécution de sa propre méthode 'then'.", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "Le type d'un opérande 'await' doit être une promesse valide ou ne doit contenir aucun membre 'then' pouvant être appelé.", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "Type of computed property's value is '{0}', which is not assignable to type '{1}'.", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "Le type des éléments itérés d'un opérande 'yield*' doit être une promesse valide ou ne doit contenir aucun membre 'then' pouvant être appelé.", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "Le type d'un opérande 'yield' dans un générateur asynchrone doit être une promesse valide ou ne doit contenir aucun membre 'then' pouvant être appelé.", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.", "Type_parameter_0_has_a_circular_constraint_2313": "Le paramètre de type '{0}' possède une contrainte circulaire.", "Type_parameter_0_has_a_circular_default_2716": "Le paramètre de type '{0}' a une valeur par défaut circulaire.", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "Le paramètre de type '{0}' de la signature d'appel de l'interface exportée possède ou utilise le nom privé '{1}'.", @@ -944,17 +1188,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "Le paramètre de type '{0}' de la classe exportée possède ou utilise le nom privé '{1}'.", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "Le paramètre de type '{0}' de la fonction exportée possède ou utilise le nom privé '{1}'.", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "Le paramètre de type '{0}' de l'interface exportée possède ou utilise le nom privé '{1}'.", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "Type parameter '{0}' of exported mapped object type is using private name '{1}'.", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "Le paramètre de type '{0}' de l'alias du type exporté contient ou utilise le nom privé '{1}'.", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "Le paramètre de type '{0}' de la méthode de l'interface exportée possède ou utilise le nom privé '{1}'.", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "Le paramètre de type '{0}' de la méthode publique de la classe exportée possède ou utilise le nom privé '{1}'.", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "Le paramètre de type '{0}' de la méthode statique publique de la classe exportée possède ou utilise le nom privé '{1}'.", "Type_parameter_declaration_expected_1139": "Déclaration du paramètre de type attendue.", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "Type parameter declarations can only be used in TypeScript files.", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "Type parameter defaults can only reference previously declared type parameters.", "Type_parameter_list_cannot_be_empty_1098": "La liste des paramètres de type ne peut pas être vide.", "Type_parameter_name_cannot_be_0_2368": "Le nom du paramètre de type ne peut pas être '{0}'.", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "Les paramètres de type ne peuvent pas apparaître sur une déclaration de constructeur.", "Type_predicate_0_is_not_assignable_to_1_1226": "Impossible d'assigner le prédicat de type '{0}' à '{1}'.", "Type_reference_directive_0_was_not_resolved_6120": "======== La directive de référence de type '{0}' n'a pas été résolue. ========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== La directive de référence de type '{0}' a été correctement résolue en '{1}', primaire : {2}. ========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========", "Types_have_separate_declarations_of_a_private_property_0_2442": "Les types ont des déclarations distinctes d'une propriété privée '{0}'.", "Types_of_parameters_0_and_1_are_incompatible_2328": "Les types des paramètres '{0}' et '{1}' sont incompatibles.", "Types_of_property_0_are_incompatible_2326": "Les types de la propriété '{0}' sont incompatibles.", @@ -967,10 +1215,18 @@ "Unexpected_token_1012": "Jeton inattendu.", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "Jeton inattendu. Un constructeur, une méthode, un accesseur ou une propriété est attendu.", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "Jeton inattendu. Un nom de paramètre de type est attendu sans accolades.", + "Unexpected_token_Did_you_mean_or_gt_1382": "Unexpected token. Did you mean `{'>'}` or `>`?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "Unexpected token. Did you mean `{'}'}` or `}`?", "Unexpected_token_expected_1179": "Jeton inattendu. '{' est attendu.", + "Unknown_build_option_0_5072": "Unknown build option '{0}'.", + "Unknown_build_option_0_Did_you_mean_1_5077": "Unknown build option '{0}'. Did you mean '{1}'?", "Unknown_compiler_option_0_5023": "Option de compilateur '{0}' inconnue.", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "Unknown compiler option '{0}'. Did you mean '{1}'?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "Option 'excludes' inconnue. Voulez-vous utiliser 'exclude' ?", "Unknown_type_acquisition_option_0_17010": "Option d'acquisition de type inconnue '{0}'.", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "Unknown type acquisition option '{0}'. Did you mean '{1}'?", + "Unknown_watch_option_0_5078": "Unknown watch option '{0}'.", + "Unknown_watch_option_0_Did_you_mean_1_5079": "Unknown watch option '{0}'. Did you mean '{1}'?", "Unreachable_code_detected_7027": "Code inatteignable détecté.", "Unsupported_locale_0_6049": "Paramètres régionaux non pris en charge : '{0}'.", "Unterminated_Unicode_escape_sequence_1199": "Séquence d'échappement Unicode inachevée.", @@ -980,34 +1236,52 @@ "Unterminated_template_literal_1160": "Littéral de modèle inachevé.", "Untyped_function_calls_may_not_accept_type_arguments_2347": "Les appels de fonctions non typées ne peuvent pas accepter d'arguments de type.", "Unused_label_7028": "Étiquette inutilisée.", + "Updating_output_of_project_0_6373": "Updating output of project '{0}'...", "Updating_output_timestamps_of_project_0_6359": "Mise à jour des horodatages de sortie du projet '{0}'...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "Updating unchanged output timestamps of project '{0}'...", "Use_synthetic_default_member_95016": "Utilisez un membre 'default' synthétique.", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "L'utilisation d'une chaîne dans une instruction 'for...of' est prise en charge uniquement dans ECMAScript 5 et version supérieure.", + "Using_compiler_options_of_project_reference_redirect_0_6215": "Using compiler options of project reference redirect '{0}'.", "VERSION_6036": "VERSION", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "La valeur de type '{0}' n'a aucune propriété en commun avec le type '{1}'. Voulez-vous vraiment l'appeler ?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "La valeur de type '{0}' ne peut pas être appelée. Voulez-vous inclure 'new' ?", "Variable_0_implicitly_has_an_1_type_7005": "La variable '{0}' possède implicitement un type '{1}'.", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage.", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "La variable '{0}' a implicitement le type '{1}' dans certains emplacements où son type ne peut pas être déterminé.", "Variable_0_is_used_before_being_assigned_2454": "La variable '{0}' est utilisée avant d'être assignée.", "Variable_declaration_expected_1134": "Déclaration de variable attendue.", "Variable_declaration_list_cannot_be_empty_1123": "La liste des déclarations de variable ne peut pas être vide.", "Version_0_6029": "Version {0}", "Watch_input_files_6005": "Fichiers d'entrée d'espion.", + "Watch_option_0_requires_a_value_of_type_1_5080": "Watch option '{0}' requires a value of type {1}.", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "Garder la sortie de console obsolète en mode espion au lieu d'effacer l'écran.", + "Wrap_invalid_character_in_an_expression_container_95101": "Wrap invalid character in an expression container", + "You_cannot_rename_a_module_via_a_global_import_8031": "You cannot rename a module via a global import.", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "Vous ne pouvez pas renommer des éléments définis dans la bibliothèque TypeScript standard.", "You_cannot_rename_this_element_8000": "Vous ne pouvez pas renommer cet élément.", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "'{0}' accepte trop peu d'arguments pour pouvoir être utilisé ici en tant qu'élément décoratif. Voulez-vous vraiment l'appeler d'abord et écrire '@{0}()' ?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "'{0}' and '{1}' operations cannot be mixed without parentheses.", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "'{0}' spécifié deux fois. L'attribut nommé '{0}' va être remplacé.", - "_0_can_only_be_used_in_a_ts_file_8009": "'{0}' peut uniquement être utilisé dans un fichier .ts.", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "'{0}' cannot be used as a value because it was exported using 'export type'.", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "'{0}' cannot be used as a value because it was imported using 'import type'.", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'.", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "'{0}' declarations can only be used in TypeScript files.", "_0_expected_1005": "'{0}' attendu.", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage.", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "'{0}' possède implicitement le type de retour 'any', car il n'a pas d'annotation de type de retour, et est référencé directement ou indirectement dans l'une de ses expressions de retour.", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "'{0}' a implicitement le type 'any', car il n'a pas d'annotation de type et est référencé directement ou indirectement dans son propre initialiseur.", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "'{0}' est une primitive, mais '{1}' est un objet wrapper. Si possible, utilisez '{0}' de préférence.", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'.", "_0_is_declared_but_its_value_is_never_read_6133": "'{0}' est déclaré mais sa valeur n'est jamais lue.", "_0_is_declared_but_never_used_6196": "'{0}' est déclaré mais n'est jamais utilisé.", + "_0_is_declared_here_2728": "'{0}' is declared here.", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor.", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property.", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}' n'est pas une métapropriété valide pour le mot clé '{1}'. Est-ce qu'il ne s'agit pas plutôt de '{2}' ?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' est référencé directement ou indirectement dans sa propre expression de base.", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' est référencé directement ou indirectement dans sa propre annotation de type.", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}' is specified more than once, so this usage will be overwritten.", "_0_list_cannot_be_empty_1097": "La liste '{0}' ne peut pas être vide.", "_0_modifier_already_seen_1030": "Modificateur '{0}' déjà rencontré.", "_0_modifier_cannot_appear_on_a_class_element_1031": "Le modificateur '{0}' ne peut pas apparaître dans un élément de classe.", @@ -1021,17 +1295,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "Impossible d'utiliser le modificateur '{0}' dans un contexte ambiant.", "_0_modifier_cannot_be_used_with_1_modifier_1243": "Impossible d'utiliser les modificateurs '{0}' et '{1}' ensemble.", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "Impossible d'utiliser le modificateur '{0}' avec une déclaration de classe.", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "'{0}' modifier cannot be used with a private identifier", "_0_modifier_must_precede_1_modifier_1029": "Le modificateur '{0}' doit précéder le modificateur '{1}'.", + "_0_needs_an_explicit_type_annotation_2782": "'{0}' needs an explicit type annotation.", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "'{0}' référence uniquement un type mais s'utilise en tant qu'espace de noms ici.", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "'{0}' fait uniquement référence à un type mais s'utilise en tant que valeur ici.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "'{0}' fait référence à une variable globale UMD, mais le fichier actuel est un module. Ajoutez une importation à la place.", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "'{0}' refers to a value, but is being used as a type here.", "_0_tag_already_specified_1223": "La balise '{0}' est déjà spécifiée.", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "Impossible d'utiliser la balise '{0}' de manière indépendante en tant que balise JSDoc de niveau supérieur.", + "_0_was_also_declared_here_6203": "'{0}' was also declared here.", + "_0_was_exported_here_1377": "'{0}' was exported here.", + "_0_was_imported_here_1376": "'{0}' was imported here.", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "'{0}', qui ne dispose pas d'annotation de type de retour, possède implicitement un type de retour '{1}'.", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type.", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "Le modificateur 'abstract' peut apparaître uniquement dans une déclaration de classe, de méthode ou de propriété.", - "await_expression_is_only_allowed_within_an_async_function_1308": "L'expression 'await' est autorisée uniquement dans une fonction async.", + "and_here_6204": "and here.", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "'await' expressions are only allowed within async functions and at the top levels of modules.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "Impossible d'utiliser des expressions 'await' dans un initialiseur de paramètre.", + "await_has_no_effect_on_the_type_of_this_expression_80007": "'await' has no effect on the type of this expression.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "L'option 'baseUrl' a la valeur '{0}'. Utilisation de cette valeur pour la résolution du nom de module non relatif '{1}'.", + "can_only_be_used_at_the_start_of_a_file_18026": "'#!' can only be used at the start of a file.", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "'=' ne peut être utilisé que dans une propriété de littéral d'objet au sein d'une affectation par déstructuration.", "case_or_default_expected_1130": "'case' ou 'default' attendu.", "class_expressions_are_not_currently_supported_9003": "Les expressions 'class' ne sont actuellement pas prises en charge.", @@ -1039,11 +1325,12 @@ "const_declarations_must_be_initialized_1155": "Les déclarations 'const' doivent être initialisées.", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "L'initialiseur de membre enum 'const' donne une valeur non finie.", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "L'initialiseur de membre enum 'const' donne une valeur non autorisée 'NaN'.", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "const enum member initializers can only contain literal values and other computed enum values.", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "Les enums 'const' ne peuvent être utilisés que dans les expressions d'accès à une propriété ou un index, ou dans la partie droite d'une déclaration d'importation, d'une assignation d'exportation ou d'une requête de type.", + "constructor_is_a_reserved_word_18012": "'#constructor' is a reserved word.", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "'delete' ne peut pas être appelé dans un identificateur en mode strict.", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "supprimer ceci - Le projet '{0}' est à jour car il a déjà été généré", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "'Les déclarations enum' peuvent uniquement être utilisées dans un fichier .ts.", - "export_can_only_be_used_in_a_ts_file_8003": "'export=' peut uniquement être utilisé dans un fichier .ts.", + "export_can_only_be_used_in_TypeScript_files_8003": "'export =' can only be used in TypeScript files.", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "Impossible d'appliquer le modificateur 'export' aux modules ambients et aux augmentations de module, car ils sont toujours visibles.", "extends_clause_already_seen_1172": "Clause 'extends' déjà rencontrée.", "extends_clause_must_precede_implements_clause_1173": "La clause 'extends' doit précéder la clause 'implements'.", @@ -1053,23 +1340,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "Les accesseurs 'get' et 'set' doivent avoir le même type 'this'.", "get_and_set_accessor_must_have_the_same_type_2380": "Les accesseurs 'get' et 'set' doivent avoir le même type.", "implements_clause_already_seen_1175": "Clause 'implements' déjà rencontrée.", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "Les clauses 'implements' peuvent uniquement être utilisées dans un fichier .ts.", - "import_can_only_be_used_in_a_ts_file_8002": "'import ... =' peut uniquement être utilisé dans un fichier .ts.", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "'implements' clauses can only be used in TypeScript files.", + "import_can_only_be_used_in_TypeScript_files_8002": "'import ... =' can only be used in TypeScript files.", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "Les déclarations 'infer' sont uniquement autorisées dans la clause 'extends' d’un type conditionnel.", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "Les 'déclarations d'interface' peuvent uniquement être utilisées dans un fichier .ts.", "let_declarations_can_only_be_declared_inside_a_block_1157": "Les déclarations 'let' ne peuvent être déclarées que dans un bloc.", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "'let' ne peut pas être utilisé comme nom dans les déclarations 'let' ou 'const'.", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "Les 'déclarations de module' peuvent uniquement être utilisées dans un fichier .ts.", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "Impossible d'utiliser 'new T[]' pour créer un tableau. Utilisez 'new Array()' à la place.", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "L'expression 'new', dont la cible ne dispose pas d'une signature de construction, possède implicitement un type 'any'.", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "Les 'assertions non null' peuvent uniquement être utilisées dans un fichier .ts.", "options_6024": "options", "or_expected_1144": "'{' ou ';' attendu.", "package_json_does_not_have_a_0_field_6100": "'package.json' n'a aucun champ '{0}'.", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "'package.json' does not have a 'typesVersions' entry that matches version '{0}'.", + "package_json_had_a_falsy_0_field_6220": "'package.json' had a falsy '{0}' field.", "package_json_has_0_field_1_that_references_2_6101": "'package.json' a un champ '{0}' '{1}' qui fait référence à '{2}'.", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "Les 'modificateurs de paramètre' peuvent uniquement être utilisés dans un fichier .ts.", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range.", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'.", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "'package.json' has a 'typesVersions' field with version-specific path mappings.", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "L'option 'paths' est spécifiée. Recherche d'un modèle correspondant au nom de module '{0}'.", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "Le modificateur 'readonly' peut apparaître uniquement dans une déclaration de propriété ou une signature d'index.", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "'readonly' type modifier is only permitted on array and tuple literal types.", "require_call_may_be_converted_to_an_import_80005": "L'appel de 'require' peut être converti en import.", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "L'option 'rootDirs' est définie. Utilisation de celle-ci pour la résolution du nom de module relatif '{0}'.", "super_can_only_be_referenced_in_a_derived_class_2335": "'super' ne peut être référencé que dans une classe dérivée.", @@ -1077,6 +1365,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "Impossible de référencer 'super' dans un nom de propriété calculée.", "super_cannot_be_referenced_in_constructor_arguments_2336": "Impossible de référencer 'super' dans des arguments de constructeur.", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "'super' est uniquement autorisé dans les membres des expressions littérales d'objet quand l'option 'target' a la valeur 'ES2015' ou une valeur supérieure.", + "super_may_not_use_type_arguments_2754": "'super' may not use type arguments.", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "'super' doit être appelé avant d'accéder à une propriété de 'super' dans le constructeur d'une classe dérivée.", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "'super' doit être appelé avant d'accéder à 'this' dans le constructeur d'une classe dérivée.", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "'super' doit être suivi d'une liste d'arguments ou d'un accès au membre.", @@ -1087,14 +1376,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "Impossible de référencer 'this' dans des arguments de constructeur.", "this_cannot_be_referenced_in_current_location_2332": "Impossible de référencer 'this' dans l'emplacement actuel.", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "'this' possède implicitement le type 'any', car il n'a pas d'annotation de type.", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "Les 'alias de type' peuvent uniquement être utilisés dans un fichier .ts.", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "Les 'arguments de type' peuvent uniquement être utilisés dans un fichier .ts.", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "Les 'expressions d'assertion de type' peuvent uniquement être utilisées dans un fichier .ts.", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "Les 'déclarations de paramètre de type' peuvent uniquement être utilisées dans un fichier .ts.", - "types_can_only_be_used_in_a_ts_file_8010": "Les 'types' peuvent uniquement être utilisés dans un fichier .ts.", "unique_symbol_types_are_not_allowed_here_1335": "Les types 'unique symbol' ne sont pas autorisés ici.", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "Les types 'unique symbol' sont uniquement autorisés sur les variables d'une déclaration de variable.", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "Les types 'unique symbol' ne peuvent pas être utilisés dans une déclaration de variable avec un nom de liaison.", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "'use strict' directive cannot be used with non-simple parameter list.", + "use_strict_directive_used_here_1349": "'use strict' directive used here.", "with_statements_are_not_allowed_in_an_async_function_block_1300": "Les instructions 'with' ne sont pas autorisées dans un bloc de fonctions async.", "with_statements_are_not_allowed_in_strict_mode_1101": "Les instructions 'with' ne sont pas autorisées en mode strict.", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "Impossible d'utiliser des expressions 'yield' dans un initialiseur de paramètre." diff --git a/lib/it/diagnosticMessages.generated.json b/lib/it/diagnosticMessages.generated.json index 51981810ba20f..47705a571adf1 100644 --- a/lib/it/diagnosticMessages.generated.json +++ b/lib/it/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "Non è possibile usare un modificatore '{0}' con una dichiarazione di importazione.", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "Non è possibile usare un modificatore '{0}' con una dichiarazione di interfaccia.", "A_0_parameter_must_be_the_first_parameter_2680": "Il primo parametro deve essere '{0}'.", + "A_bigint_literal_cannot_use_exponential_notation_1352": "A bigint literal cannot use exponential notation.", + "A_bigint_literal_must_be_an_integer_1353": "A bigint literal must be an integer.", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "Un parametro del criterio di binding non può essere facoltativo in una firma di implementazione.", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "Un'istruzione 'break' può essere usata solo all'interno di un'iterazione di inclusione o di un'istruzione switch.", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "Un'istruzione 'break' può solo passare a un'etichetta di un'istruzione di inclusione.", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "Una classe può implementare solo un identificatore/nome qualificato con argomenti tipo facoltativi.", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "A class can only implement an object type or intersection of object types with statically known members.", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "È necessario assegnare un nome a una dichiarazione di classe senza modificatore 'default'.", "A_class_may_only_extend_another_class_2311": "Una classe può estendere solo un'altra classe.", - "A_class_may_only_implement_another_class_or_interface_2422": "Una classe può implementare solo un'altra classe o interfaccia.", "A_class_member_cannot_have_the_0_keyword_1248": "Un membro di classe non può contenere la parola chiave '{0}'.", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "Non sono consentite espressioni con virgole in un nome di proprietà calcolato.", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "Un nome di proprietà calcolato non può fare riferimento a un parametro di tipo dal tipo che lo contiene.", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "Un nome di proprietà calcolato in un'interfaccia deve fare riferimento a un'espressione il cui tipo è un tipo di valore letterale o un tipo 'unique symbol'.", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "Un nome di proprietà calcolato deve essere di tipo 'string', 'number', 'symbol' o 'any'.", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "Un nome di proprietà calcolato in formato '{0}' deve essere di tipo 'symbol'.", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals.", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "È possibile accedere a un membro di enumerazione const solo tramite un valore letterale stringa.", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "Un inizializzatore 'const' in un contesto di ambiente deve essere un valore letterale numerico o stringa.", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "Un costruttore non può contenere una chiamata 'super' quando la relativa classe estende 'null'.", "A_constructor_cannot_have_a_this_parameter_2681": "Un costruttore non può contenere un parametro 'this'.", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "Un'istruzione 'continue' può essere usata solo all'interno di un'istruzione di iterazione di inclusione.", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "Un'istruzione 'continue' può solo passare a un'etichetta di un'istruzione di iterazione di inclusione.", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "Non è possibile usare un modificatore 'declare' in un contesto già di ambiente.", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": "Un modificatore 'declare' è obbligatorio per una dichiarazione di primo livello in un file con estensione d.ts.", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "Un elemento Decorator può solo decorare un'implementazione del metodo e non un overload.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "Una clausola 'default' non può essere specificata più volte in un'istruzione 'switch'.", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "È possibile usare un'esportazione predefinita solo in un modulo di tipo ECMAScript.", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "Un generatore non può contenere un'annotazione di tipo 'void'.", "A_get_accessor_cannot_have_parameters_1054": "Una funzione di accesso 'get' non può contenere parametri.", "A_get_accessor_must_return_a_value_2378": "Una funzione di accesso 'get' deve restituire un valore.", + "A_label_is_not_allowed_here_1344": "'A label is not allowed here.", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Un inizializzatore di membro in una dichiarazione di enumerazione non può fare riferimento a membri dichiarati successivamente, inclusi quelli definiti in altre enumerazioni.", + "A_method_cannot_be_named_with_a_private_identifier_18022": "A method cannot be named with a private identifier.", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Una classe mixin deve includere un costruttore con un unico parametro REST di tipo 'any[]'.", "A_module_cannot_have_multiple_default_exports_2528": "Un modulo non può includere più esportazioni predefinite.", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Una dichiarazione di spazio dei nomi non può essere presente in un file diverso rispetto a una classe o funzione con cui è stato eseguito il merge.", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Una dichiarazione di spazio dei nomi non può essere specificata prima di una classe o funzione con cui è stato eseguito il merge.", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "Una dichiarazione di spazio dei nomi è consentita solo in uno spazio dei nomi o in un modulo.", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "Non è possibile chiamare o costruire un'importazione in stile spazio dei nomi. Questo comporterà un errore in fase di runtime.", "A_non_dry_build_would_build_project_0_6357": "Se si esegue una compilazione senza flag -dry, verrà compilato il progetto '{0}'", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Se si esegue una compilazione senza flag -dry, i file seguenti verranno eliminati: {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "A non-dry build would update output of project '{0}'", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "A non-dry build would update timestamps for output of project '{0}'", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "Un inizializzatore di parametro è consentito solo in un'implementazione di funzione o costruttore.", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "Non è possibile dichiarare una proprietà di parametro usando un parametro REST.", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "Una proprietà di parametro è consentita solo in un'implementazione di costruttore.", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "Una promessa deve contenere un metodo 'then'.", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "Una proprietà di una classe il cui tipo è un tipo 'unique symbol' deve essere sia 'static' che 'readonly'.", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "Una proprietà di un'interfaccia o di un valore letterale di tipo il cui tipo è un tipo 'unique symbol' deve essere 'readonly'.", + "A_required_element_cannot_follow_an_optional_element_1257": "A required element cannot follow an optional element.", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "Un parametro obbligatorio non può seguire un parametro facoltativo.", "A_rest_element_cannot_contain_a_binding_pattern_2501": "Un elemento rest non può contenere un criterio di binding.", "A_rest_element_cannot_have_a_property_name_2566": "Un elemento rest non può contenere un nome proprietà.", "A_rest_element_cannot_have_an_initializer_1186": "Un elemento rest non può includere un inizializzatore.", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "Un elemento rest deve essere l'ultimo di un criterio di destrutturazione.", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "A rest element must be last in a tuple type.", + "A_rest_element_type_must_be_an_array_type_2574": "A rest element type must be an array type.", "A_rest_parameter_cannot_be_optional_1047": "Un parametro rest non può essere facoltativo.", "A_rest_parameter_cannot_have_an_initializer_1048": "Un parametro rest non può contenere un inizializzatore.", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "Un parametro rest deve essere l'ultimo di un elenco di parametri.", @@ -81,9 +89,9 @@ "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "Un guard di tipo basato su 'this' non è compatibile con uno basato su parametri.", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "Un tipo 'this' è disponibile solo in un membro non statico di una classe o di interfaccia.", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "Un file 'tsconfig.json' è già definito in: '{0}'.", - "A_tuple_type_element_list_cannot_be_empty_1122": "L'elenco degli elementi di tipo tupla non può essere vuoto.", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "Nella parte sinistra di un'espressione di elevamento a potenza non è consentita un'espressione di asserzione tipi. Provare a racchiudere l'espressione tra parentesi.", "A_type_literal_property_cannot_have_an_initializer_1247": "Una proprietà di valore letterale di tipo non può contenere un inizializzatore.", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "A type-only import can specify a default import or named bindings, but not both.", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "Un predicato di tipo non può fare riferimento a un parametro rest.", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "Un predicato di tipo non può fare riferimento all'elemento '{0}' in un criterio di binding.", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "Un predicato di tipo è consentito solo nella posizione del tipo restituito per le funzioni e i metodi.", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "Aggiungere '{0}' alla dichiarazione di importazione esistente da \"{1}\"", "Add_0_to_unresolved_variable_90008": "Aggiungere '{0}.' alla variabile non risolta", "Add_all_missing_async_modifiers_95041": "Aggiungere tutti i modificatori 'async' mancanti", + "Add_all_missing_imports_95064": "Add all missing imports", "Add_all_missing_members_95022": "Aggiungere tutti i membri mancanti", "Add_all_missing_super_calls_95039": "Aggiungere tutte le chiamate a super mancanti", "Add_async_modifier_to_containing_function_90029": "Aggiungere il modificatore async alla funzione contenitore", + "Add_await_95083": "Add 'await'", + "Add_await_to_initializer_for_0_95084": "Add 'await' to initializer for '{0}'", + "Add_await_to_initializers_95089": "Add 'await' to initializers", "Add_braces_to_arrow_function_95059": "Aggiungere le parentesi graffe alla funzione arrow", + "Add_const_to_all_unresolved_variables_95082": "Add 'const' to all unresolved variables", + "Add_const_to_unresolved_variable_95081": "Add 'const' to unresolved variable", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "Add default import '{0}' to existing import declaration from \"{1}\"", "Add_definite_assignment_assertion_to_property_0_95020": "Aggiungere l'asserzione di assegnazione definita alla proprietà '{0}'", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "Aggiungere le asserzioni di assegnazione definite a tutte le proprietà non inizializzate", + "Add_export_to_make_this_file_into_a_module_95097": "Add 'export {}' to make this file into a module", "Add_index_signature_for_property_0_90017": "Aggiungere la firma dell'indice per la proprietà '{0}'", "Add_initializer_to_property_0_95019": "Aggiungere l'inizializzatore alla proprietà '{0}'", "Add_initializers_to_all_uninitialized_properties_95027": "Aggiungere gli inizializzatori a tutte le proprietà non inizializzate", + "Add_missing_enum_member_0_95063": "Add missing enum member '{0}'", + "Add_missing_new_operator_to_all_calls_95072": "Add missing 'new' operator to all calls", + "Add_missing_new_operator_to_call_95071": "Add missing 'new' operator to call", "Add_missing_super_call_90001": "Aggiungere la chiamata mancante a 'super()'", "Add_missing_typeof_95052": "Aggiungere l'elemento 'typeof' mancante", + "Add_names_to_all_parameters_without_names_95073": "Add names to all parameters without names", "Add_or_remove_braces_in_an_arrow_function_95058": "Aggiungere o rimuovere le parentesi graffe in una funzione arrow", + "Add_parameter_name_90034": "Add parameter name", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "Aggiungere il qualificatore a tutte le variabili non risolte corrispondenti a un nome di membro", "Add_to_all_uncalled_decorators_95044": "Aggiungere '()' a tutti gli elementi Decorator non chiamati", "Add_ts_ignore_to_all_error_messages_95042": "Aggiungere '@ts-ignore' a tutti i messaggi di errore", "Add_undefined_type_to_all_uninitialized_properties_95029": "Aggiungere il tipo non definito a tutte le proprietà non inizializzate", "Add_undefined_type_to_property_0_95018": "Aggiungere il tipo 'undefined' alla proprietà '{0}'", + "Add_unknown_conversion_for_non_overlapping_types_95069": "Add 'unknown' conversion for non-overlapping types", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "Add 'unknown' to all conversions of non-overlapping types", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "Aggiungere un file tsconfig.json per organizzare più facilmente progetti che contengono sia file TypeScript che JavaScript. Per altre informazioni, vedere https://aka.ms/tsconfig.", "Additional_Checks_6176": "Controlli aggiuntivi", "Advanced_Options_6178": "Opzioni avanzate", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "Tutte le dichiarazioni di '{0}' devono contenere parametri di tipo identici.", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "Tutte le dichiarazioni di un metodo astratto devono essere consecutive.", "All_destructured_elements_are_unused_6198": "Tutti gli elementi destrutturati sono inutilizzati.", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "All files must be modules when the '--isolatedModules' flag is provided.", "All_imports_in_import_declaration_are_unused_6192": "Tutte le importazioni nella dichiarazione di importazione sono inutilizzate.", + "All_type_parameters_are_unused_6205": "All type parameters are unused", "All_variables_are_unused_6199": "Tutte le variabili sono inutilizzate.", + "Allow_accessing_UMD_globals_from_modules_95076": "Allow accessing UMD globals from modules.", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "Consente di eseguire importazioni predefinite da moduli senza esportazione predefinita. Non influisce sulla creazione del codice ma solo sul controllo dei tipi.", "Allow_javascript_files_to_be_compiled_6102": "Consente la compilazione di file JavaScript.", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "Le enumerazioni const di ambiente non sono consentite quando viene specificato il flag '--isolatedModules'.", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "Already included file name '{0}' differs from file name '{1}' only in casing.", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "Non è possibile specificare il nome di modulo relativo nella dichiarazione di modulo di ambiente.", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "I moduli di ambiente non possono essere annidati in altri moduli o spazi dei nomi.", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "Un modulo AMD non può includere più assegnazioni di nome.", "An_abstract_accessor_cannot_have_an_implementation_1318": "Una funzione di accesso astratta non può contenere un'implementazione.", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "Non è possibile dichiarare una funzione di accesso in un contesto di ambiente.", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "An accessibility modifier cannot be used with a private identifier.", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "An accessor cannot be named with a private identifier.", "An_accessor_cannot_have_type_parameters_1094": "Una funzione di accesso non può contenere parametri di tipo.", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "Una dichiarazione di modulo di ambiente è consentita solo al primo livello in un file.", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "Un operando aritmetico deve essere di tipo 'any', 'number' o un tipo di enumerazione.", + "An_argument_for_0_was_not_provided_6210": "An argument for '{0}' was not provided.", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "An argument matching this binding pattern was not provided.", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.", + "An_arrow_function_cannot_have_a_this_parameter_2730": "An arrow function cannot have a 'this' parameter.", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "Con una funzione o un metodo asincrono in ES5/ES3 è necessario il costruttore 'Promise'. Assicurarsi che sia presente una dichiarazione per il costruttore 'Promise' oppure includere 'ES2015' nell'opzione `--lib`.", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "Una funzione o un metodo asincrono deve includere un tipo restituito awaitable valido.", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "Un metodo o una funzione asincrona deve restituire un elemento 'Promise'. Assicurarsi che sia presente una dichiarazione per 'Promise' oppure includere 'ES2015' nell'opzione `--lib`.", "An_async_iterator_must_have_a_next_method_2519": "Un iteratore asincrono deve contenere un metodo 'next()'.", "An_element_access_expression_should_take_an_argument_1011": "Un'espressione di accesso a elementi deve accettare un argomento.", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "An enum member cannot be named with a private identifier.", "An_enum_member_cannot_have_a_numeric_name_2452": "Il nome di un membro di enumerazione non può essere numerico.", + "An_enum_member_name_must_be_followed_by_a_or_1357": "An enum member name must be followed by a ',', '=', or '}'.", "An_export_assignment_can_only_be_used_in_a_module_1231": "È possibile usare un'assegnazione di esportazione solo in un modulo.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Non è possibile usare un'assegnazione di esportazione in un modulo con altri elementi esportati.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Non è possibile usare un'assegnazione di esportazione in uno spazio dei nomi.", "An_export_assignment_cannot_have_modifiers_1120": "Un'assegnazione di esportazione non può contenere modificatori.", "An_export_declaration_can_only_be_used_in_a_module_1233": "È possibile usare una dichiarazione di esportazione solo in un modulo.", "An_export_declaration_cannot_have_modifiers_1193": "Una dichiarazione di esportazione non può contenere modificatori.", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "An expression of type 'void' cannot be tested for truthiness", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "Un valore di escape Unicode avanzato deve essere compreso tra 0x0 e 0x10FFFF inclusi.", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "An identifier or keyword cannot immediately follow a numeric literal.", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "Non è possibile dichiarare un'implementazione in contesti di ambiente.", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "An import alias cannot reference a declaration that was exported using 'export type'.", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "An import alias cannot reference a declaration that was imported using 'import type'.", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "È possibile usare una dichiarazione di importazione solo in uno spazio dei nomi o in un modulo.", "An_import_declaration_cannot_have_modifiers_1191": "Una dichiarazione di importazione non può contenere modificatori.", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "Un percorso di importazione non può terminare con l'estensione '{0}'. In alternativa, provare a importare '{1}'.", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "Un parametro della firma dell'indice deve contenere un'annotazione di tipo.", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "Un tipo di parametro della firma dell'indice non può essere un alias di tipo. Provare a scrivere '[{0}: {1}]: {2}'.", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "Un tipo di parametro della firma dell'indice non può essere un tipo di unione. Provare a usare un tipo di oggetto con mapping.", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "Il tipo di un parametro della firma dell'indice deve essere 'string' o 'number'.", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "An index signature parameter type must be either 'string' or 'number'.", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "Un'interfaccia può estendere solo un identificatore/nome qualificato con argomenti tipo facoltativi.", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "Un'interfaccia può estendere solo una classe o un'altra interfaccia.", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "An interface can only extend an object type or intersection of object types with statically known members.", "An_interface_property_cannot_have_an_initializer_1246": "Una proprietà di interfaccia non può contenere un inizializzatore.", "An_iterator_must_have_a_next_method_2489": "Un iteratore deve contenere un metodo 'next()'.", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "Un valore letterale di oggetto non può contenere più funzioni di accesso get/set con lo stesso nome.", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "Un valore letterale di oggetto non può contenere più proprietà con lo stesso nome in modalità strict.", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "Un valore letterale di oggetto non può contenere proprietà e funzioni di accesso con lo stesso nome.", "An_object_member_cannot_be_declared_optional_1162": "Un membro di oggetto non può essere dichiarato come facoltativo.", + "An_optional_chain_cannot_contain_private_identifiers_18030": "An optional chain cannot contain private identifiers.", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "An outer value of 'this' is shadowed by this container.", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "Non è possibile dichiarare come generatore una firma di overload.", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "Nella parte sinistra di un'espressione di elevamento a potenza non è consentita un'espressione unaria con l'operatore '{0}'. Provare a racchiudere l'espressione tra parentesi.", "Annotate_everything_with_types_from_JSDoc_95043": "Annotare tutto con tipi di JSDoc", "Annotate_with_type_from_JSDoc_95009": "Annota con tipo di JSDoc", "Annotate_with_types_from_JSDoc_95010": "Annota con tipi di JSDoc", + "Another_export_default_is_here_2753": "Another export default is here.", + "Are_you_missing_a_semicolon_2734": "Are you missing a semicolon?", "Argument_expression_expected_1135": "È prevista l'espressione di argomento.", "Argument_for_0_option_must_be_Colon_1_6046": "L'argomento per l'opzione '{0}' deve essere {1}.", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "L'argomento di tipo '{0}' non è assegnabile al parametro di tipo '{1}'.", "Array_element_destructuring_pattern_expected_1181": "È previsto il criterio di destrutturazione dell'elemento della matrice.", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "Assertions require every name in the call target to be declared with an explicit type annotation.", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "Assertions require the call target to be an identifier or qualified name.", "Asterisk_Slash_expected_1010": "È previsto '*/'.", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "Gli aumenti per l'ambito globale possono solo essere direttamente annidati in dichiarazioni di modulo di ambiente o moduli esterni.", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "Gli aumenti per l'ambito globale devono contenere il modificatore 'declare', a meno che non siano già presenti in un contesto di ambiente.", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "Il rilevamento automatico per le defizioni di tipi è abilitato nel progetto '{0}'. Verrà eseguito il passaggio di risoluzione aggiuntivo per il modulo '{1}' usando il percorso della cache '{2}'.", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "Le espressioni di classi di base non possono fare riferimento a parametri di tipo classe.", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "Il tipo restituito '{0}' del costruttore di base non è un tipo di classe o di interfaccia.", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members.", "Base_constructors_must_all_have_the_same_return_type_2510": "Il tipo restituito deve essere identico per tutti i costruttori di base.", "Base_directory_to_resolve_non_absolute_module_names_6083": "Directory di base per risolvere i nomi di modulo non assoluti.", "Basic_Options_6172": "Opzioni di base", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "BigInt literals are not available when targeting lower than ES2020.", "Binary_digit_expected_1177": "È prevista una cifra binaria.", "Binding_element_0_implicitly_has_an_1_type_7031": "L'elemento di binding '{0}' contiene implicitamente un tipo '{1}'.", "Block_scoped_variable_0_used_before_its_declaration_2448": "La variabile con ambito blocco '{0}' è stata usata prima di essere stata dichiarata.", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "Compilare tutti i progetti, anche quelli che sembrano aggiornati", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "Compilare uno o più progetti e le relative dipendenze, se non aggiornate", + "Build_option_0_requires_a_value_of_type_1_5073": "Build option '{0}' requires a value of type {1}.", "Building_project_0_6358": "Compilazione del progetto '{0}'...", "Call_decorator_expression_90028": "Chiamare l'espressione Decorator", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "Call signature return types '{0}' and '{1}' are incompatible.", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "La firma di chiamata, in cui manca l'annotazione di tipo restituito, contiene implicitamente un tipo restituito 'any'.", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Call_target_does_not_contain_any_signatures_2346": "La destinazione della chiamata non contiene alcuna firma.", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "Non è possibile accedere a '{0}.{1}' perché '{0}' è un tipo ma non uno spazio dei nomi. Si intendeva recuperare il tipo della proprietà '{1}' in '{0}' con '{0}[\"{1}\"]'?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "Cannot access ambient const enums when the '--isolatedModules' flag is provided.", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "Non è possibile assegnare un tipo di costruttore '{0}' a un tipo di costruttore '{1}'.", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "Non è possibile assegnare un tipo di costruttore astratto a un tipo di costruttore non astratto.", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "Non è possibile assegnare a '{0}' perché è una costante o una proprietà di sola lettura.", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "Cannot assign to '{0}' because it is a constant.", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "Cannot assign to '{0}' because it is a read-only property.", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "Non è possibile assegnare a '{0}' perché non è una variabile.", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "Non è possibile aumentare il modulo '{0}' perché viene risolto in un'entità non modulo.", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "Non è possibile aumentare il modulo '{0}' con le esportazioni dei valori perché viene risolto in un'entità non modulo.", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "Non è possibile compilare moduli con l'opzione '{0}' a meno che il flag '--module' non sia impostato su 'amd' o 'system'.", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "Non è possibile compilare spazi dei nomi se non viene specificato il flag '--isolatedModules'.", "Cannot_create_an_instance_of_an_abstract_class_2511": "Non è possibile creare un'istanza di una classe astratta.", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'.", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "Non è possibile esportare '{0}'. Da un modulo è possibile esportare solo dichiarazioni locali.", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "Non è possibile estendere una classe '{0}'. Il costruttore di classe è contrassegnato come privato.", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "Non è possibile estendere un'interfaccia '{0}'. Si intendeva usare 'implements'?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "Cannot find a tsconfig.json file at the current directory: {0}.", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "Non è stato trovato alcun file tsconfig.json nella directory specificata '{0}'.", "Cannot_find_global_type_0_2318": "Il tipo globale '{0}' non è stato trovato.", "Cannot_find_global_value_0_2468": "Il valore globale '{0}' non è stato trovato.", "Cannot_find_lib_definition_for_0_2726": "La definizione della libreria per '{0}' non è stata trovata.", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "La definizione della libreria per '{0}' non è stata trovata. Si intendeva '{1}'?", "Cannot_find_module_0_2307": "Il modulo '{0}' non è stato trovato.", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension", "Cannot_find_name_0_2304": "Il nome '{0}' non è stato trovato.", "Cannot_find_name_0_Did_you_mean_1_2552": "Il nome '{0}' non è stato trovato. Si intendeva '{1}'?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "Il nome '{0}' non è stato trovato. Si intendeva il membro di istanza 'this.{0}'?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "Il nome '{0}' non è stato trovato. Si intendeva il membro statico '{1}.{0}'?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery` and then add `jquery` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.", "Cannot_find_namespace_0_2503": "Lo spazio dei nomi '{0}' non è stato trovato.", "Cannot_find_parameter_0_1225": "Il parametro '{0}' non è stato trovato.", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "Il percorso della sottodirectory comune per i file di input non è stato trovato.", "Cannot_find_type_definition_file_for_0_2688": "Il file di definizione del tipo per '{0}' non è stato trovato.", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "Non è possibile importare file di dichiarazione di tipo. Provare a importare '{0}' invece di '{1}'.", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "Non è possibile inizializzare la variabile con ambito esterna '{0}' nello stesso ambito della dichiarazione con ambito del blocco '{1}'.", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "Non è possibile richiamare un'espressione al cui tipo manca una firma di chiamata. Per il tipo '{0}' non esistono firme di chiamata compatibili.", "Cannot_invoke_an_object_which_is_possibly_null_2721": "Non è possibile richiamare un oggetto che è probabilmente 'null'.", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "Non è possibile richiamare un oggetto che è probabilmente 'null' o 'undefined'.", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "Non è possibile richiamare un oggetto che è probabilmente 'undefined'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'.", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "Non è possibile anteporre il progetto '{0}' perché 'outFile' non è impostato", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "Non è possibile riesportare un tipo quando è stato specificato il flag '--isolatedModules'.", "Cannot_read_file_0_Colon_1_5012": "Non è possibile leggere il file '{0}': {1}.", "Cannot_redeclare_block_scoped_variable_0_2451": "Non è possibile dichiarare di nuovo la variabile con ambito blocco '{0}'.", "Cannot_redeclare_exported_variable_0_2323": "Non è possibile dichiarare di nuovo la variabile esportata '{0}'.", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "Non è possibile dichiarare di nuovo l'identificatore '{0}' nella clausola catch.", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "Cannot update output of project '{0}' because there was error reading file '{1}'", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "Non è possibile usare JSX a meno che non sia specificato il flag '--jsx'.", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "Non è possibile usare importazioni, esportazioni o aumenti del modulo quando il valore di '--module' è 'none'.", "Cannot_use_namespace_0_as_a_type_2709": "Non è possibile usare lo spazio dei nomi '{0}' come tipo.", "Cannot_use_namespace_0_as_a_value_2708": "Non è possibile usare lo spazio dei nomi '{0}' come valore.", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "Non è possibile usare 'new' con un'espressione al cui tipo manca una firma del costrutto o di chiamata.", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "Non è possibile scrivere il file '{0}' perché verrebbe sovrascritto da più file di input.", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "Non è possibile scrivere il file '{0}' perché sovrascriverebbe il file di input.", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "La variabile della clausola catch non può contenere un'annotazione di tipo.", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "Verrà verificato se '{0}' è il prefisso di corrispondenza più lungo per '{1}' - '{2}'.", "Circular_definition_of_import_alias_0_2303": "Definizione circolare dell'alias di importazione '{0}'.", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "È stata rilevata una circolarità durante la risoluzione della configurazione: {0}", + "Circularity_originates_in_type_at_this_location_2751": "Circularity originates in type at this location.", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "La classe '{0}' definisce '{1}' come funzione di accesso di membro di istanza, mentre la classe estesa '{2}' la definisce come funzione di membro di istanza.", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "La classe '{0}' definisce '{1}' come funzione di membro di istanza, mentre la classe estesa '{2}' la definisce come funzione di accesso di membro di istanza.", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "La classe '{0}' definisce '{1}' come funzione di membro di istanza, mentre la classe estesa '{2}' la definisce come proprietà di membro di istanza.", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "La classe '{0}' definisce '{1}' come proprietà di membro di istanza, mentre la classe estesa '{2}' la definisce come funzione di membro di istanza.", "Class_0_incorrectly_extends_base_class_1_2415": "La classe '{0}' estende in modo errato la classe di base '{1}'.", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "La classe '{0}' implementa in modo errato la classe '{1}'. Si intendeva estendere '{1}' ed ereditarne i membri come sottoclasse?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "Il lato statico '{0}' della classe estende in modo errato il lato statico '{1}' della classe di base.", "Classes_can_only_extend_a_single_class_1174": "Le classi possono estendere solo un'unica classe.", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "Le classi che contengono metodi astratti devono essere contrassegnate come astratte.", + "Classes_may_not_have_a_field_named_constructor_18006": "Classes may not have a field named 'constructor'.", "Command_line_Options_6171": "Opzioni della riga di comando", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "Compila il progetto in base al percorso del file di configurazione o della cartella contenente un file 'tsconfig.json'.", "Compiler_option_0_expects_an_argument_6044": "Con l'opzione '{0}' del compilatore è previsto un argomento.", "Compiler_option_0_requires_a_value_of_type_1_5024": "Con l'opzione '{0}' del compilatore è richiesto un valore di tipo {1}.", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "Compiler reserves name '{0}' when emitting private identifier downlevel.", "Composite_projects_may_not_disable_declaration_emit_6304": "I progetti compositi non possono disabilitare la creazione di dichiarazioni.", + "Composite_projects_may_not_disable_incremental_compilation_6379": "Composite projects may not disable incremental compilation.", "Computed_property_names_are_not_allowed_in_enums_1164": "I nomi di proprietà calcolati non sono consentiti nelle enumerazioni.", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "In un'enumerazione con membri con valore stringa non sono consentiti valori calcolati.", "Concatenate_and_emit_output_to_single_file_6001": "Concatena e crea l'output in un singolo file.", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "In '{1}' e '{2}' sono state trovate definizioni in conflitto per '{0}'. Per risolvere il conflitto, provare a installare una versione specifica di questa libreria.", + "Conflicts_are_in_this_file_6201": "Conflicts are in this file.", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "Construct signature return types '{0}' and '{1}' are incompatible.", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "La firma del costrutto, in cui manca l'annotazione di tipo restituito, contiene implicitamente un tipo restituito 'any'.", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Constructor_implementation_is_missing_2390": "Manca l'implementazione di costruttore.", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "Il costruttore della classe '{0}' è privato e accessibile solo all'interno della dichiarazione di classe.", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "Il costruttore della classe '{0}' è protetto e accessibile solo all'interno della dichiarazione di classe.", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "I costruttori di classi derivate devono contenere una chiamata 'super'.", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "Il file contenitore non è specificato e non è possibile determinare la directory radice. La ricerca nella cartella 'node_modules' verrà ignorata.", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.", "Convert_0_to_mapped_object_type_95055": "Convertire '{0}' nel tipo di oggetto con mapping", "Convert_all_constructor_functions_to_classes_95045": "Convertire tutte le funzioni di costruttore in classi", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "Convert all imports not used as a value to type-only imports", + "Convert_all_re_exported_types_to_type_only_exports_1365": "Convert all re-exported types to type-only exports", "Convert_all_require_to_import_95048": "Convertire tutte le occorrenze di 'require' in 'import'", + "Convert_all_to_async_functions_95066": "Convert all to async functions", + "Convert_all_to_bigint_numeric_literals_95092": "Convert all to bigint numeric literals", "Convert_all_to_default_imports_95035": "Convertire tutte le impostazioni predefinite", + "Convert_const_to_let_95093": "Convert 'const' to 'let'", + "Convert_default_export_to_named_export_95061": "Convert default export to named export", "Convert_function_0_to_class_95002": "Converti la funzione '{0}' in classe", "Convert_function_to_an_ES2015_class_95001": "Converti la funzione in una classe ES2015", + "Convert_invalid_character_to_its_html_entity_code_95100": "Convert invalid character to its html entity code", + "Convert_named_export_to_default_export_95062": "Convert named export to default export", "Convert_named_imports_to_namespace_import_95057": "Convertire le importazioni denominate in importazione spazi dei nomi", "Convert_namespace_import_to_named_imports_95056": "Convertire l'importazione spazi dei nomi in importazioni denominate", + "Convert_parameters_to_destructured_object_95075": "Convert parameters to destructured object", "Convert_require_to_import_95047": "Convertire 'require' in 'import'", "Convert_to_ES6_module_95017": "Converti in modulo ES6", + "Convert_to_a_bigint_numeric_literal_95091": "Convert to a bigint numeric literal", + "Convert_to_async_function_95065": "Convert to async function", "Convert_to_default_import_95013": "Converti nell'importazione predefinita", + "Convert_to_template_string_95096": "Convert to template string", + "Convert_to_type_only_export_1364": "Convert to type-only export", + "Convert_to_type_only_import_1373": "Convert to type-only import", "Corrupted_locale_file_0_6051": "Il file delle impostazioni locali {0} è danneggiato.", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "Non è stato trovato alcun file di dichiarazione per il modulo '{0}'. A '{1}' è assegnato implicitamente un tipo 'any'.", "Could_not_write_file_0_Colon_1_5033": "Non è stato possibile scrivere il file '{0}': {1}.", "DIRECTORY_6038": "DIRECTORY", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit.", "Declaration_expected_1146": "È prevista la dichiarazione.", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "Il nome della dichiarazione è in conflitto con l'identificatore globale predefinito '{0}'.", "Declaration_or_statement_expected_1128": "È prevista la dichiarazione o l'istruzione.", + "Declare_a_private_field_named_0_90053": "Declare a private field named '{0}'.", "Declare_method_0_90023": "Dichiarare il metodo '{0}'", "Declare_property_0_90016": "Dichiarare la proprietà '{0}'", "Declare_static_method_0_90024": "Dichiarare il metodo statico '{0}'", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "In questo punto le espressioni Decorator non sono valide.", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "Non è possibile applicare le espressioni Decorator a più funzioni di accesso get/set con lo stesso nome.", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "L'esportazione predefinita del modulo contiene o usa il nome privato '{0}'.", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "Definite assignment assertions can only be used along with a type annotation.", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "Definitions of the following identifiers conflict with those in another file: {0}", "Delete_all_unused_declarations_95024": "Eliminare tutte le dichiarazioni non usate", "Delete_the_outputs_of_all_projects_6365": "Eliminare gli output di tutti i progetti", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[Deprecata] In alternativa, usare '--jsxFactory'. Specifica l'oggetto richiamato per createElement quando la destinazione è la creazione JSX 'react'", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[Deprecata] In alternativa, usare '--outFile'. Concatena e crea l'output in un singolo file", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[Deprecata] In alternativa, usare '--skipLibCheck'. Ignora il controllo del tipo dei file di dichiarazione delle librerie predefinite.", + "Did_you_forget_to_use_await_2773": "Did you forget to use 'await'?", + "Did_you_mean_0_1369": "Did you mean '{0}'?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?", + "Did_you_mean_to_call_this_expression_6212": "Did you mean to call this expression?", + "Did_you_mean_to_mark_this_function_as_async_1356": "Did you mean to mark this function as 'async'?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "Did you mean to parenthesize this function type?", + "Did_you_mean_to_use_new_with_this_expression_6213": "Did you mean to use 'new' with this expression?", "Digit_expected_1124": "È prevista la cifra.", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "La directory '{0}' non esiste. Tutte le ricerche che la interessano verranno ignorate.", "Disable_checking_for_this_file_90018": "Disabilitare la verifica per questo file", "Disable_size_limitations_on_JavaScript_projects_6162": "Disabilita le dimensioni relative alle dimensioni per i progetti JavaScript.", + "Disable_solution_searching_for_this_project_6224": "Disable solution searching for this project.", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "Disabilitare il controllo tassativo delle firme generiche nei tipi funzione.", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "Disable use of source files instead of declaration files from referenced projects.", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "Non consente riferimenti allo stesso file in cui le maiuscole/minuscole vengono usate in modo incoerente.", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "Non aggiunge riferimenti con tripla barra (////) o moduli importati all'elenco di file compilati.", "Do_not_emit_comments_to_output_6009": "Non crea commenti nell'output.", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "Non segnala gli errori in caso di etichette non usate.", "Do_not_resolve_the_real_path_of_symlinks_6013": "Non risolvere il percorso reale di collegamenti simbolici.", "Do_not_truncate_error_messages_6165": "Non tronca i messaggi di errore.", - "Duplicate_declaration_0_2718": "La dichiarazione '{0}' è duplicata.", "Duplicate_function_implementation_2393": "Implementazione di funzione duplicata.", "Duplicate_identifier_0_2300": "Identificatore '{0}' duplicato.", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "Identificatore '{0}' duplicato. Il compilatore riserva il nome '{1}' nell'ambito di primo livello di un modulo.", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "Identificatore '_this' duplicato. Il compilatore usa la dichiarazione di variabile '_this' per acquisire il riferimento 'this'.", "Duplicate_label_0_1114": "Etichetta '{0}' duplicata.", "Duplicate_number_index_signature_2375": "La firma dell'indice di tipo number è duplicata.", + "Duplicate_property_0_2718": "Duplicate property '{0}'.", "Duplicate_string_index_signature_2374": "La firma dell'indice di tipo string è duplicata.", "Dynamic_import_cannot_have_type_arguments_1326": "Nell'importazione dinamica non possono essere presenti argomenti tipo", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "L'importazione dinamica è supportata solo quando il valore del flag '--module' è 'commonjs' o 'esNext'.", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "Come argomento dell'importazione dinamica si può indicare un solo identificatore.", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "L'identificatore dell'importazione dinamica deve essere di tipo 'string', ma il tipo specificato qui è '{0}'.", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'esnext', 'commonjs', 'amd', 'system', or 'umd'.", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other.", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other.", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'.", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "L'elemento contiene implicitamente un tipo 'any' perché l'espressione di indice non è di tipo 'number'.", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "L'elemento contiene implicitamente un tipo 'any' perché al tipo '{0}' non è assegnata alcuna firma dell'indice.", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "Crea un BOM (Byte Order Mark) UTF-8 all'inizio dei file di output.", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "Crea un unico file con i mapping di origine invece di file separati.", + "Emit_class_fields_with_Define_instead_of_Set_6222": "Emit class fields with Define instead of Set.", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "Crea l'origine unitamente ai mapping di origine all'interno di un unico file. Richiede l'impostazione di '--inlineSourceMap' o '--sourceMap'.", "Enable_all_strict_type_checking_options_6180": "Abilita tutte le opzioni per i controlli del tipo strict.", + "Enable_incremental_compilation_6378": "Abilita la compilazione incrementale", "Enable_project_compilation_6302": "Abilitare la compilazione dei progetti", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "Enable strict 'bind', 'call', and 'apply' methods on functions.", "Enable_strict_checking_of_function_types_6186": "Abilita il controllo tassativo dei tipi funzione.", "Enable_strict_checking_of_property_initialization_in_classes_6187": "Abilita il controllo tassativo dell'inizializzazione delle proprietà nelle classi.", "Enable_strict_null_checks_6113": "Abilita i controlli strict Null.", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "Enable the 'experimentalDecorators' option in your configuration file", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "Enable the '--jsx' flag in your configuration file", "Enable_tracing_of_the_name_resolution_process_6085": "Abilita la traccia del processo di risoluzione dei nomi.", "Enable_verbose_logging_6366": "Abilitare la registrazione dettagliata", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "Abilita l'interoperabilità di creazione tra moduli ES e CommonJS tramite la creazione di oggetti spazio dei nomi per tutte le importazioni. Implica 'allowSyntheticDefaultImports'.", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "È previsto il membro di enumerazione.", "Enum_member_must_have_initializer_1061": "Il membro di enumerazione deve contenere l'inizializzatore.", "Enum_name_cannot_be_0_2431": "Il nome dell'enumerazione non può essere '{0}'.", + "Enum_type_0_circularly_references_itself_2586": "Enum type '{0}' circularly references itself.", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "Il tipo di enumerazione '{0}' contiene membri i cui inizializzatori non sono valori letterali.", "Examples_Colon_0_6026": "Esempi: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "La profondità dello stack per il confronto dei tipi '{0}' e '{1}' è eccessiva.", @@ -385,7 +490,7 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "Sono previsti almeno {0} argomenti, ma ne sono stati ottenuti {1} o più.", "Expected_corresponding_JSX_closing_tag_for_0_17002": "È previsto il tag di chiusura JSX corrispondente per '{0}'.", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "È previsto il tag di chiusura corrispondente per il frammento JSX.", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "Il tipo previsto del campo '{0}' in 'package.json' è 'string', ma è stato ottenuto '{1}'.", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'.", "Experimental_Options_6177": "Opzioni sperimentali", "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "Il supporto sperimentale per gli elementi Decorator è una funzionalità soggetta a modifica nelle prossime versioni. Per rimuovere questo avviso, impostare l'opzione 'experimentalDecorators'.", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "Il tipo di risoluzione del modulo '{0}' è stato specificato in modo esplicito.", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "Le esportazioni e le assegnazioni di esportazioni non sono consentite negli aumenti del modulo.", "Expression_expected_1109": "È prevista l'espressione.", "Expression_or_comma_expected_1137": "È prevista l'espressione o la virgola.", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "Expression produces a union type that is too complex to represent.", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "L'espressione viene risolta in '_super', che è usato dal compilatore per acquisire il riferimento della classe di base.", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "L'espressione viene risolta nella dichiarazione di variabile '{0}', che è usata dal compilatore per supportare le funzioni asincrone.", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "L'espressione viene risolta nella dichiarazione di variabile '_newTarget', che è usata dal compilatore per acquisire il riferimento alla metaproprietà 'new.target'.", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "Estrarre in {0} in {1}", "Extract_to_0_in_1_scope_95008": "Estrarre in {0} nell'ambito {1}", "Extract_to_0_in_enclosing_scope_95007": "Estrarre in {0} nell'ambito che lo contiene", + "Extract_to_interface_95090": "Extract to interface", + "Extract_to_type_alias_95078": "Extract to type alias", + "Extract_to_typedef_95079": "Extract to typedef", + "Extract_type_95077": "Extract type", "FILE_6035": "FILE", "FILE_OR_DIRECTORY_6040": "FILE O DIRECTORY", "Failed_to_parse_file_0_Colon_1_5014": "Non è stato possibile analizzare il file '{0}': {1}.", "Fallthrough_case_in_switch_7029": "Caso di fallthrough in switch.", "File_0_does_not_exist_6096": "Il file '{0}' non esiste.", "File_0_exist_use_it_as_a_name_resolution_result_6097": "Il file '{0}' esiste. Usarlo come risultato per la risoluzione dei nomi.", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "File '{0}' has an unsupported extension. The only supported extensions are {1}.", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "L'estensione del file '{0}' non è supportata. Il file verrà ignorato.", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "L'estensione del file '{0}' non è supportata. Le uniche estensioni supportate sono {1}.", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?", "File_0_is_not_a_module_2306": "Il file '{0}' non è un modulo.", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "Il file '{0}' non è presente nell'elenco dei file di progetto. I progetti devono elencare tutti i file o usare un criterio 'include'.", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern.", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "Il file '{0}' non si trova in 'rootDir' '{1}'. 'rootDir' deve contenere tutti i file di origine.", "File_0_not_found_6053": "Il file '{0}' non è stato trovato.", "File_change_detected_Starting_incremental_compilation_6032": "È stata rilevata una modifica ai file. Verrà avviata la compilazione incrementale...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "La specifica del file non può contenere una directory padre ('..') inserita dopo un carattere jolly ('**') di directory ricorsiva: '{0}'.", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "La specifica del file non può terminare con caratteri jolly ('**') di directory ricorsiva: '{0}'.", "Fix_all_detected_spelling_errors_95026": "Correggere tutti gli errori di ortografia rilevati", + "Fix_all_expressions_possibly_missing_await_95085": "Fix all expressions possibly missing 'await'", + "Found_0_errors_6217": "Sono stati trovati {0} errori.", "Found_0_errors_Watching_for_file_changes_6194": "Sono stati trovati {0} errori. Verranno individuate le modifiche ai file.", + "Found_1_error_6216": "È stato trovato 1 errore.", "Found_1_error_Watching_for_file_changes_6193": "È stato trovato 1 errore. Verranno individuate le modifiche ai file.", "Found_package_json_at_0_6099": "Il file 'package.json' è stato trovato in '{0}'.", - "Found_package_json_at_0_Package_ID_is_1_6190": "Il file 'package.json' è stato trovato in '{0}'. L'ID pacchetto è '{1}'.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "Le dichiarazioni di funzione non sono consentite all'interno di blocchi in modalità strict quando la destinazione è 'ES3' o 'ES5'.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "Le dichiarazioni di funzione non sono consentite all'interno di blocchi in modalità strict quando la destinazione è 'ES3' o 'ES5'. Le definizioni di classe sono impostate automaticamente nella modalità strict.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "Le dichiarazioni di funzione non sono consentite all'interno di blocchi in modalità strict quando la destinazione è 'ES3' o 'ES5'. I moduli sono impostati automaticamente nella modalità strict.", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Nella funzione manca l'istruzione return finale e il tipo restituito non include 'undefined'.", "Function_overload_must_be_static_2387": "L'overload della funzione deve essere statico.", "Function_overload_must_not_be_static_2388": "L'overload della funzione non deve essere statico.", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "Function type, which lacks return-type annotation, implicitly has an '{0}' return type.", "Generate_get_and_set_accessors_95046": "Generare le funzioni di accesso 'get' e 'set'", + "Generates_a_CPU_profile_6223": "Generates a CPU profile.", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "Genera un mapping di origine per ogni file '.d.ts' corrispondente.", "Generates_corresponding_d_ts_file_6002": "Genera il file '.d.ts' corrispondente.", "Generates_corresponding_map_file_6043": "Genera il file '.map' corrispondente.", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "Il tipo del generatore è implicitamente '{0}' perché non contiene alcun valore. Provare a specificare un tipo restituito.", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.", "Generators_are_not_allowed_in_an_ambient_context_1221": "I generatori non sono consentiti in un contesto di ambiente.", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "I generatori sono disponibili solo se destinati a ECMAScript 2015 o versioni successive.", "Generic_type_0_requires_1_type_argument_s_2314": "Il tipo generico '{0}' richiede {1} argomento/i di tipo.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "Il tipo generico '{0}' richiede tra {1} e {2} argomenti tipo.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "La creazione di un'istanza di tipo generico presenta troppi livelli ed è probabilmente infinita.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Le funzioni di accesso getter e setter non concordano nella visibilità.", "Global_module_exports_may_only_appear_at_top_level_1316": "Le esportazioni di moduli globali possono essere usate solo al primo livello.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "Le esportazioni di moduli globali possono essere usate solo in file di dichiarazione.", "Global_module_exports_may_only_appear_in_module_files_1314": "Le esportazioni di moduli globali possono essere usate solo in file di modulo.", "Global_type_0_must_be_a_class_or_interface_type_2316": "Il tipo globale '{0}' deve un tipo di classe o di interfaccia.", "Global_type_0_must_have_1_type_parameter_s_2317": "Il tipo globale '{0}' deve contenere {1} parametro/i di tipo.", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.", "Hexadecimal_digit_expected_1125": "È prevista la cifra esadecimale.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "È previsto un identificatore. '{0}' è una parola riservata in modalità strict.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "È previsto un identificatore. '{0}' è una parola riservata in modalità strict. Le definizioni di classe sono automaticamente impostate sulla modalità strict.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "È previsto un identificatore. '{0}' è una parola riservata in modalità strict. I moduli vengono impostati automaticamente in modalità strict.", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "Identifier expected. '{0}' is a reserved word that cannot be used here.", "Identifier_expected_1003": "È previsto l'identificatore.", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "È previsto un identificatore. '__esModule' è riservato come marcatore esportato durante la trasformazione di moduli ECMAScript.", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`", "Ignore_this_error_message_90019": "Ignorare questo messaggio di errore", "Implement_all_inherited_abstract_classes_95040": "Implementare tutte le classi astratte ereditate", "Implement_all_unimplemented_interfaces_95032": "Implementare tutte le interfacce non implementate", "Implement_inherited_abstract_class_90007": "Implementare la classe astratta ereditata", "Implement_interface_0_90006": "Implementare l'interfaccia '{0}'", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "La clausola implements della classe esportata '{0}' contiene o usa il nome privato '{1}'.", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.", "Import_0_from_module_1_90013": "Importare '{0}' dal modulo \"{1}\"", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "Non è possibile usare l'assegnazione di importazione se destinata a moduli ECMAScript. Provare a usare 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"' o un altro formato di modulo.", "Import_declaration_0_is_using_private_name_1_4000": "La dichiarazione di importazione '{0}' usa il nome privato '{1}'.", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "La dichiarazione di importazione è in conflitto con la dichiarazione locale di '{0}'.", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "Le dichiarazioni di importazione in uno spazio dei nomi non possono far riferimento a un modulo.", + "Import_default_0_from_module_1_90032": "Import default '{0}' from module \"{1}\"", "Import_emit_helpers_from_tslib_6139": "Importa gli helper di creazione da 'tslib'.", "Import_may_be_converted_to_a_default_import_80003": "L'importazione può essere convertita in un'importazione predefinita.", "Import_name_cannot_be_0_2438": "Il nome dell'importazione non può essere '{0}'.", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "Le importazioni non sono consentite negli aumenti di modulo. Provare a spostarle nel modulo esterno di inclusione.", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "Nelle dichiarazioni di enumerazione dell'ambiente l'inizializzatore di membro deve essere un'espressione costante.", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "In un'enumerazione con più dichiarazioni solo una di queste può omettere un inizializzatore per il primo elemento dell'enumerazione.", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "Nelle dichiarazioni di enumerazione 'const' l'inizializzatore di membro deve essere un'espressione costante.", "Include_modules_imported_with_json_extension_6197": "Includere i moduli importati con estensione '.json'", "Index_signature_in_type_0_only_permits_reading_2542": "La firma dell'indice nel tipo '{0}' consente solo la lettura.", "Index_signature_is_missing_in_type_0_2329": "Nel tipo '{0}' manca la firma dell'indice.", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "Le singole dichiarazioni della dichiarazione sottoposta a merge '{0}' devono essere tutte esportate o tutte locali.", "Infer_all_types_from_usage_95023": "Derivare tutti i tipi dall'utilizzo", "Infer_parameter_types_from_usage_95012": "Derivare i tipi di parametro dall'utilizzo", + "Infer_this_type_of_0_from_usage_95080": "Infer 'this' type of '{0}' from usage", "Infer_type_of_0_from_usage_95011": "Derivare il tipo di '{0}' dall'utilizzo", "Initialize_property_0_in_the_constructor_90020": "Inizializzare la proprietà '{0}' nel costruttore", "Initialize_static_property_0_90021": "Inizializzare la proprietà statica '{0}'", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "JSDoc '...' può essere presente solo nell'ultimo parametro di una firma.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "Il nome del tag '@param' di JSDoc è '{0}', ma non esiste alcun parametro con questo nome.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "Il nome del tag '@param' di JSDoc è '{0}', ma non esiste alcun parametro con questo nome. Se contenesse un tipo matrice, corrisponderebbe ad 'arguments'.", + "JSDoc_type_0_circularly_references_itself_2587": "JSDoc type '{0}' circularly references itself.", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "Il tag '@typedef' di JSDoc deve contenere un'annotazione di tipo o essere seguito dal tag '@property' o '@member'.", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "I tipi JSDoc possono essere usati solo nei commenti della documentazione.", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "I tipi JSDoc possono essere convertiti in tipi TypeScript.", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "Il tipo '{0}' dell'elemento JSX non contiene firme di costrutto o chiamata.", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "Il tipo '{0}' dell'elemento JSX non è una funzione del costruttore per elementi JSX.", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "Gli elementi JSX non possono contenere più attributi con lo stesso nome.", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "JSX expressions may not use the comma operator. Did you mean to write an array?", "JSX_expressions_must_have_one_parent_element_2657": "Le espressioni JSX devono contenere un solo elemento padre.", "JSX_fragment_has_no_corresponding_closing_tag_17014": "Per il frammento JSX non esiste alcun tag di chiusura corrispondente.", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "Il frammento JSX non è supportato quando si usa una direttiva pragma factory JSX inline", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "L'elemento figlio dell'attributo spread JSX deve essere un tipo di matrice.", "Jump_target_cannot_cross_function_boundary_1107": "La destinazione di collegamento non può oltrepassare il limite della funzione.", "KIND_6034": "TIPOLOGIA", + "Keywords_cannot_contain_escape_characters_1260": "Keywords cannot contain escape characters.", "LOCATION_6037": "PERCORSO", "Language_service_is_disabled_9004": "Il servizio di linguaggio è disabilitato.", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "Il lato sinistro dell'operatore virgola non è usato e non ha effetti collaterali.", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "Impostare la chiamata a 'super()' come prima istruzione nel costruttore", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "Il tipo di oggetto con mapping contiene implicitamente un tipo di modello 'any'.", "Member_0_implicitly_has_an_1_type_7008": "Il membro '{0}' contiene implicitamente un tipo '{1}'.", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Merge_conflict_marker_encountered_1185": "È stato rilevato un indicatore di conflitti di merge.", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "La dichiarazione '{0}' sottoposta a merge non può includere una dichiarazione di esportazione predefinita. Provare ad aggiungere una dichiarazione 'export default {0}' distinta.", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "La metaproprietà '{0}' è consentita solo nel corpo di una dichiarazione di funzione, di un'espressione di funzione o di un costruttore.", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "Il metodo '{0}' dell'interfaccia esportata ha o usa il nome '{1}' del modulo privato '{2}'.", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "Il metodo '{0}' dell'interfaccia esportata ha o usa il nome privato '{1}'.", "Modifiers_cannot_appear_here_1184": "In questo punto non è possibile usare modificatori.", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "Il modulo '{0}' non fa riferimento a un tipo, ma qui viene usato come tipo.", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "Module '{0}' can only be default-imported using the '{1}' flag", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "Module '{0}' declares '{1}' locally, but it is exported as '{2}'.", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "Module '{0}' declares '{1}' locally, but it is not exported.", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "Il modulo '{0}' non fa riferimento a un valore, ma qui viene usato come valore.", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "Il modulo {0} ha già esportato un membro denominato '{1}'. Per risolvere l'ambiguità, provare a esportarlo di nuovo in modo esplicito.", "Module_0_has_no_default_export_1192": "Per il modulo '{0}' non esistono esportazioni predefinite.", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?", "Module_0_has_no_exported_member_1_2305": "Il modulo '{0}' non contiene un membro esportato '{1}'.", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "Per il modulo '{0}' non esiste alcun membro esportato '{1}'. Si intendeva '{2}'?", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "Il modulo '{0}' è nascosto da una dichiarazione locale con lo stesso nome.", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "Il modulo '{0}' viene risolto in un'entità non modulo e non può essere importato con questo costrutto.", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "Il modulo '{0}' usa 'export =' e non può essere usato con 'export *'.", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "Il modulo '{0}' è stato risolto come modulo di ambiente dichiarato in '{1}' dal momento che questo file non è stato modificato.", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "Il modulo '{0}' è stato risolto come modulo di ambiente dichiarato in locale nel file '{1}'.", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "Il modulo '{0}' è stato risolto in '{1}', ma '--jsx' non è impostato.", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used.", "Module_Resolution_Options_6174": "Opzioni di risoluzione moduli", "Module_name_0_matched_pattern_1_6092": "Nome del modulo: '{0}'. Criterio corrispondente: '{1}'.", "Module_name_0_was_not_resolved_6090": "======== Il nome del modulo '{0}' non è stato risolto. ========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== Il nome del modulo '{0}' è stato risolto in '{1}'. ========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========", "Module_resolution_kind_is_not_specified_using_0_6088": "Il tipo di risoluzione del modulo non è specificato. Verrà usato '{0}'.", "Module_resolution_using_rootDirs_has_failed_6111": "La risoluzione del modulo con 'rootDirs' non è riuscita.", "Move_to_a_new_file_95049": "Passare a un nuovo file", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "Le proprietà denominate '{0}' dei tipi '{1}' e '{2}' non sono identiche.", "Namespace_0_has_no_exported_member_1_2694": "Lo spazio dei nomi '{0}' non contiene un membro esportato '{1}'.", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "Nessun costruttore di base contiene il numero specificato di argomenti tipo.", + "No_constituent_of_type_0_is_callable_2755": "No constituent of type '{0}' is callable.", + "No_constituent_of_type_0_is_constructable_2759": "No constituent of type '{0}' is constructable.", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "No index signature with a parameter of type '{0}' was found on type '{1}'.", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "Non sono stati trovati input nel file config '{0}'. Percorsi 'include' specificati: '{1}'. Percorsi 'exclude' specificati: '{2}'.", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments.", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments.", + "No_overload_matches_this_call_2769": "No overload matches this call.", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "La classe non astratta '{0}' non implementa il membro astratto ereditato '{1}' della classe '{2}'.", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "L'espressione di classe non astratta non implementa il membro astratto ereditato '{0}' dalla classe '{1}'.", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "Non-null assertions can only be used in TypeScript files.", + "Non_simple_parameter_declared_here_1348": "Non-simple parameter declared here.", "Not_all_code_paths_return_a_value_7030": "Non tutti i percorsi del codice restituiscono un valore.", + "Not_all_constituents_of_type_0_are_callable_2756": "Not all constituents of type '{0}' are callable.", + "Not_all_constituents_of_type_0_are_constructable_2760": "Not all constituents of type '{0}' are constructable.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "Il tipo di indice numerico '{0}' non è assegnabile al tipo di indice stringa '{1}'.", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers.", "Numeric_separators_are_not_allowed_here_6188": "I separatori numerici non sono consentiti in questa posizione.", "Object_is_of_type_unknown_2571": "L'oggetto è di tipo 'unknown'.", "Object_is_possibly_null_2531": "L'oggetto è probabilmente 'null'.", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "I valori letterali ottali non sono consentiti nell'inizializzatore di membri di enumerazioni. Usare la sintassi '{0}'.", "Octal_literals_are_not_allowed_in_strict_mode_1121": "I valori letterali ottali non sono consentiti in modalità strict.", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "I valori letterali ottali non sono disponibili quando la destinazione è ECMAScript 5 e versioni successive. Usare la sintassi '{0}'.", + "Only_ECMAScript_imports_may_use_import_type_1370": "Only ECMAScript imports may use 'import type'.", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "In un'istruzione 'for...in' è consentita solo una singola dichiarazione di variabile.", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "In un'istruzione 'for...of' è consentita solo una singola dichiarazione di variabile.", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "Con la parola chiave 'new' può essere chiamata solo una funzione void.", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "Crea solo i file di dichiarazione '.d.ts'.", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "Nella clausola 'extends' di una classe sono attualmente supportati solo identificatori/nomi qualificati con argomenti tipo facoltativi.", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "Con la parola chiave 'super' è possibile accedere solo ai metodi pubblico e protetto della classe di base.", + "Operator_0_cannot_be_applied_to_type_1_2736": "Operator '{0}' cannot be applied to type '{1}'.", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "Non è possibile applicare l'operatore '{0}' ai tipi '{1}' e '{2}'.", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "L'opzione '{0}' può essere specificata solo nel file 'tsconfig.json'.", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "L'opzione '{0}' può essere usata solo quando si specifica l'opzione '--inlineSourceMap' o '--sourceMap'.", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "Option '{0}' cannot be specified when option 'target' is 'ES3'.", "Option_0_cannot_be_specified_with_option_1_5053": "Non è possibile specificare l'opzione '{0}' insieme all'opzione '{1}'.", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "Non è possibile specificare l'opzione '{0}' senza l'opzione '{1}'.", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "Non è possibile specificare l'opzione '{0}' senza l'opzione'{1}' o '{2}'.", "Option_0_should_have_array_of_strings_as_a_value_6103": "Il valore dell'opzione '{0}' deve essere una matrice di stringhe.", "Option_build_must_be_the_first_command_line_argument_6369": "L'opzione '--build' deve essere il primo argomento della riga di comando.", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified.", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "L'opzione 'isolatedModules' può essere usata solo quando si specifica l'opzione '--module' oppure il valore dell'opzione 'target' è 'ES2015' o maggiore.", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "Non è possibile usare l'opzione 'paths' senza specificare l'opzione '--baseUrl'.", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "Non è possibile combinare l'opzione 'project' con file di origine in una riga di comando.", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'.", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "Non è possibile specificare l'opzione '--resolveJsonModule' senza la strategia di risoluzione del modulo 'node'.", "Options_0_and_1_cannot_be_combined_6370": "Non è possibile combinare le opzioni '{0}' e '{1}'.", "Options_Colon_6027": "Opzioni:", "Output_directory_for_generated_declaration_files_6166": "Directory di output per i file di dichiarazione generati.", "Output_file_0_from_project_1_does_not_exist_6309": "Il file di output '{0}' del progetto '{1}' non esiste", "Output_file_0_has_not_been_built_from_source_file_1_6305": "Il file di output '{0}' non è stato compilato dal file di origine '{1}'.", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "La firma di overload non è compatibile con l'implementazione di funzione.", + "Overload_0_of_1_2_gave_the_following_error_2772": "Overload {0} of {1}, '{2}', gave the following error.", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "Le firme di overload devono essere tutte astratte o tutte non astratte.", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "Le firme di overload devono essere tutte di ambiente o non di ambiente.", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "Le firme di overload devono essere tutte esportate o tutte non esportate.", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "Le firme di overload devono essere tutte pubbliche, private o protette.", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "Non è possibile fare riferimento al parametro '{0}' nel relativo inizializzatore.", "Parameter_0_implicitly_has_an_1_type_7006": "Il parametro '{0}' contiene implicitamente un tipo '{1}'.", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "Il parametro '{0}' non si trova nella stessa posizione del parametro '{1}'.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "Parameter '{0}' of accessor has or is using private name '{1}'.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "Il parametro '{0}' della firma di chiamata dell'interfaccia esportata contiene o usa il nome '{1}' del modulo privato '{2}'.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "Il parametro '{0}' della firma di chiamata dell'interfaccia esportata contiene o usa il nome privato '{1}'.", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "Il parametro '{0}' del costruttore della classe esportata contiene o usa il nome '{1}' del modulo esterno {2} ma non può essere rinominato.", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "Il parametro '{0}' del metodo statico pubblico della classe esportata contiene o usa il nome privato '{1}'.", "Parameter_cannot_have_question_mark_and_initializer_1015": "Il parametro non può contenere il punto interrogativo e l'inizializzatore.", "Parameter_declaration_expected_1138": "È prevista la dichiarazione di parametro.", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "Parameter has a name but no type. Did you mean '{0}: {1}'?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "Parameter modifiers can only be used in TypeScript files.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "Il tipo di parametro del setter pubblico '{0}' della classe esportata contiene o usa il nome '{1}' del modulo privato '{2}'.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "Il tipo di parametro del setter pubblico '{0}' della classe esportata contiene o usa il nome privato '{1}'.", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "Il tipo di parametro del setter statico pubblico '{0}' della classe esportata contiene o usa il nome '{1}' del modulo privato '{2}'.", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "Esegue l'analisi in modalità strict e crea la direttiva \"use strict\" per ogni file di origine.", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "Il criterio '{0}' deve contenere al massimo un carattere '*'.", "Prefix_0_with_an_underscore_90025": "Anteporre un carattere di sottolineatura a '{0}'", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "Prefix all incorrect property declarations with 'declare'", "Prefix_all_unused_declarations_with_where_possible_95025": "Aggiungere a tutte le dichiarazioni non usate il prefisso '_', laddove possibile", + "Prefix_with_declare_95094": "Prefix with 'declare'", "Print_names_of_files_part_of_the_compilation_6155": "Stampa i nomi dei file che fanno parte della compilazione.", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "Print names of files that are part of the compilation and then stop processing.", "Print_names_of_generated_files_part_of_the_compilation_6154": "Stampa i nomi dei file generati che fanno parte della compilazione.", "Print_the_compiler_s_version_6019": "Stampa la versione del compilatore.", + "Print_the_final_configuration_instead_of_building_1350": "Print the final configuration instead of building.", "Print_this_message_6017": "Stampa questo messaggio.", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "Private identifiers are not allowed in variable declarations.", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "Private identifiers are not allowed outside class bodies.", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "Private identifiers are only available when targeting ECMAScript 2015 and higher.", + "Private_identifiers_cannot_be_used_as_parameters_18009": "Private identifiers cannot be used as parameters", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "Private or protected member '{0}' cannot be accessed on a type parameter.", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "Non è possibile compilare il progetto '{0}' perché la dipendenza '{1}' contiene errori", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "Project '{0}' can't be built because its dependency '{1}' was not built", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "Il progetto '{0}' non è aggiornato perché la dipendenza '{1}' non è aggiornata", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "Il progetto '{0}' non è aggiornato perché l'output meno recente '{1}' è meno recente dell'input più recente '{2}'", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "Il progetto '{0}' non è aggiornato perché il file di output '{1}' non esiste", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "Project '{0}' is out of date because output of its dependency '{1}' has changed", "Project_0_is_up_to_date_6361": "Il progetto '{0}' è aggiornato", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "Il progetto '{0}' è aggiornato perché l'input più recente '{1}' è meno recente dell'output meno recente '{2}'", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "Il progetto '{0}' è aggiornato con i file con estensione d.ts delle relative dipendenze", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "Progetti cui fare riferimento", "Property_0_does_not_exist_on_const_enum_1_2479": "La proprietà '{0}' non esiste nell'enumerazione 'const' '{1}'.", "Property_0_does_not_exist_on_type_1_2339": "La proprietà '{0}' non esiste nel tipo '{1}'.", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "La proprietà '{0}' non esiste nel tipo '{1}'. Si è dimenticato di usare 'await'?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "La proprietà '{0}' non esiste nel tipo '{1}'. Si intendeva '{2}'?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "La proprietà '{0}' include dichiarazioni in conflitto ed è inaccessibile nel tipo '{1}'.", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "La proprietà '{0}' non include alcun inizializzatore e non viene assolutamente assegnata nel costruttore.", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "La proprietà '{0}' contiene implicitamente il tipo 'any', perché nella relativa funzione di accesso get manca un'annotazione di tipo restituito.", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "La proprietà '{0}' contiene implicitamente il tipo 'any', perché nella relativa funzione di accesso set manca un'annotazione di tipo di parametro.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage.", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "La proprietà '{0}' nel tipo '{1}' non è assegnabile alla stessa proprietà nel tipo di base '{2}'.", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "La proprietà '{0}' nel tipo '{1}' non è assegnabile al tipo '{2}'.", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'.", + "Property_0_is_a_static_member_of_type_1_2576": "Property '{0}' is a static member of type '{1}'", "Property_0_is_declared_but_its_value_is_never_read_6138": "La proprietà '{0}' è dichiarata, ma il suo valore non viene mai letto.", "Property_0_is_incompatible_with_index_signature_2530": "La proprietà '{0}' non è compatibile con la firma dell'indice.", + "Property_0_is_incompatible_with_rest_element_type_2573": "Property '{0}' is incompatible with rest element type.", "Property_0_is_missing_in_type_1_2324": "Nel tipo '{1}' manca la proprietà '{0}'.", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "Property '{0}' is missing in type '{1}' but required in type '{2}'.", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "Property '{0}' is not accessible outside class '{1}' because it has a private identifier.", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "La proprietà '{0}' è facoltativa nel tipo '{1}', ma obbligatoria nel tipo '{2}'.", "Property_0_is_private_and_only_accessible_within_class_1_2341": "La proprietà '{0}' è privata e accessibile solo all'interno della classe '{1}'.", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "La proprietà '{0}' è privata nel tipo '{1}', ma non nel tipo '{2}'.", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "La proprietà '{0}' è protetta, ma il tipo '{1}' non è una classe derivata da '{2}'.", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "La proprietà '{0}' è protetta nel tipo '{1}', ma è pubblica non nel tipo '{2}'.", "Property_0_is_used_before_being_assigned_2565": "La proprietà '{0}' viene usata prima dell'assegnazione.", + "Property_0_is_used_before_its_initialization_2729": "Property '{0}' is used before its initialization.", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "La proprietà '{0}' dell'attributo spread JSX non è assegnabile alla proprietà di destinazione.", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "La proprietà '{0}' dell'espressione di classe esportata potrebbe essere non privata o protetta.", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "La proprietà '{0}' dell'interfaccia esportata contiene o usa il nome '{1}' del modulo privato '{2}'.", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "La proprietà '{0}' dell'interfaccia esportata contiene o usa il nome privato '{1}'.", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "La proprietà '{0}' del tipo '{1}' non è assegnabile a un tipo di indice numerico '{2}'.", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "La proprietà '{0}' del tipo '{1}' non è assegnabile a un tipo di indice stringa '{2}'.", + "Property_0_was_also_declared_here_2733": "Property '{0}' was also declared here.", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.", "Property_assignment_expected_1136": "È prevista l'assegnazione di proprietà.", "Property_destructuring_pattern_expected_1180": "È previsto il criterio di destrutturazione della proprietà.", "Property_or_signature_expected_1131": "È prevista la proprietà o la firma.", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "La proprietà statica pubblica '{0}' della classe esportata contiene o usa il nome '{1}' del modulo esterno {2} ma non può essere rinominata.", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "La proprietà statica pubblica '{0}' della classe esportata contiene o usa il nome '{1}' del modulo privato '{2}'.", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "La proprietà statica pubblica '{0}' della classe esportata contiene o usa il nome privato '{1}'.", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'.", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "Genera un errore in caso di espressioni o dichiarazioni con tipo 'any' implicito.", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Genera un errore in caso di espressioni 'this con un tipo 'any' implicito.", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.", "Redirect_output_structure_to_the_directory_6006": "Reindirizza la struttura di output alla directory.", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "Il progetto di riferimento '{0}' deve includere l'impostazione \"composite\": true.", + "Remove_all_unnecessary_uses_of_await_95087": "Remove all unnecessary uses of 'await'", "Remove_all_unreachable_code_95051": "Rimuovere tutto il codice non eseguibile", "Remove_all_unused_labels_95054": "Rimuovere tutte le etichette inutilizzate", "Remove_braces_from_arrow_function_95060": "Rimuovere le parentesi graffe dalla funzione arrow", - "Remove_declaration_for_Colon_0_90004": "Rimuovere la dichiarazione per '{0}'", "Remove_destructuring_90009": "Rimuovere la destrutturazione", "Remove_import_from_0_90005": "Rimuovere l'importazione da '{0}'", + "Remove_template_tag_90011": "Remove template tag", + "Remove_type_parameters_90012": "Remove type parameters", + "Remove_unnecessary_await_95086": "Remove unnecessary 'await'", "Remove_unreachable_code_95050": "Rimuovere il codice non eseguibile", + "Remove_unused_declaration_for_Colon_0_90004": "Remove unused declaration for: '{0}'", "Remove_unused_label_95053": "Rimuovere l'etichetta inutilizzata", "Remove_variable_statement_90010": "Rimuovere l'istruzione di variabile", + "Replace_all_unused_infer_with_unknown_90031": "Replace all unused 'infer' with 'unknown'", "Replace_import_with_0_95015": "Sostituire l'importazione con '{0}'.", + "Replace_infer_0_with_unknown_90030": "Replace 'infer {0}' with 'unknown'", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Segnala l'errore quando non tutti i percorsi del codice nella funzione restituiscono un valore.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Segnala errori per i casi di fallthrough nell'istruzione switch.", "Report_errors_in_js_files_8019": "Segnala gli errori presenti nei file con estensione js.", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "Risoluzione con percorsi di ricerca primaria...", "Resolving_with_primary_search_path_0_6121": "La risoluzione verrà eseguita con il percorso di ricerca primaria '{0}'.", "Rest_parameter_0_implicitly_has_an_any_type_7019": "Il parametro rest '{0}' contiene implicitamente un tipo 'any[]'.", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage.", + "Rest_signatures_are_incompatible_2572": "Rest signatures are incompatible.", "Rest_types_may_only_be_created_from_object_types_2700": "È possibile creare tipi rest solo da tipi di oggetto.", + "Return_type_annotation_circularly_references_itself_2577": "Return type annotation circularly references itself.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "Il tipo restituito della firma di chiamata dell'interfaccia esportata contiene o usa il nome '{0}' del modulo privato '{1}'.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "Il tipo restituito della firma di chiamata dell'interfaccia esportata contiene o usa il nome privato '{0}'.", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "Il tipo restituito della firma del costruttore dell'interfaccia esportata contiene o usa il nome '{0}' del modulo privato '{1}'.", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "Non è possibile determinare la directory radice. I percorsi di ricerca primaria verranno ignorati.", "STRATEGY_6039": "STRATEGIA", "Scoped_package_detected_looking_in_0_6182": "Il pacchetto con ambito è stato rilevato. Verrà eseguita una ricerca in '{0}'", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "Set the 'module' option in your configuration file to '{0}'", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "Set the 'target' option in your configuration file to '{0}'", "Setters_cannot_return_a_value_2408": "I setter non possono restituire un valore.", "Show_all_compiler_options_6169": "Mostra tutte le opzioni del compilatore.", "Show_diagnostic_information_6149": "Mostra le informazioni di diagnostica.", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "La firma '{0}' deve essere un predicato di tipo.", "Skip_type_checking_of_declaration_files_6012": "Ignora il controllo del tipo dei file di dichiarazione.", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "La compilazione del progetto '{0}' verrà ignorata perché la dipendenza '{1}' contiene errori", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "La pulizia verrà ignorata perché non è stato possibile individuare tutti i progetti", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "Skipping build of project '{0}' because its dependency '{1}' was not built", "Source_Map_Options_6175": "Opzioni per mapping di origine", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "La firma di overload specializzata non è assegnabile a una firma non specializzata.", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "L'identificatore dell'importazione dinamica non può essere l'elemento spread.", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "Specificare la versione di destinazione di ECMAScript: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018' o 'ESNEXT'.", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'.", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "Specifica la generazione del codice JSX: 'preserve', 'react-native' o 'react'.", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "Specify emit/checking behavior for imports that are only used for types", + "Specify_file_to_store_incremental_compilation_information_6380": "Specify file to store incremental compilation information", "Specify_library_files_to_be_included_in_the_compilation_6079": "Specificare i file di libreria da includere nella compilazione.", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "Consente di specificare il tipo di generazione del codice del modulo, ovvero 'none', commonjs', 'amd', 'system', 'umd', 'es2015' o 'ESNext'.", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'.", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "Specifica la strategia di risoluzione del modulo: 'node' (Node.js) o 'classic' (TypeScript prima della versione 1.6).", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'.", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'.", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'.", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "Consente di specificare la funzione della factory JSX da usare quando la destinazione è la creazione JSX 'react', ad esempio 'React.createElement' o 'h'.", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "Specifica la sequenza di fine riga da usare per la creazione dei file, ovvero 'CRLF' (in DOS) o 'LF' (in UNIX).", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "Specifica il percorso in cui il debugger deve trovare i file TypeScript invece dei percorsi di origine.", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "Specifica il percorso in cui il debugger deve trovare i file map invece dei percorsi generati.", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "Specifica la directory radice dei file di input. Usare per controllare la struttura della directory di output con --outDir.", + "Split_all_invalid_type_only_imports_1367": "Split all invalid type-only imports", + "Split_into_two_separate_import_declarations_1366": "Split into two separate import declarations", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "L'operatore Spread in espressioni 'new' è disponibile solo se destinato a ECMAScript 5 e versioni successive.", "Spread_types_may_only_be_created_from_object_types_2698": "È possibile creare tipi spread solo da tipi di oggetto.", "Starting_compilation_in_watch_mode_6031": "Avvio della compilazione in modalità espressione di controllo...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "Le dichiarazioni di proprietà successive devono essere dello stesso tipo. La proprietà '{0}' deve essere di tipo '{1}', ma qui è di tipo '{2}'.", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "Le dichiarazioni di variabili successive devono essere dello stesso tipo. La variabile '{0}' deve essere di tipo '{1}', mentre è di tipo '{2}'.", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "Il tipo della sostituzione '{0}' per il criterio '{1}' non è corretto. È previsto 'string', ma è stato ottenuto '{2}'.", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "La sostituzione '{0}' nel criterio '{1}' può contenere al massimo un carattere '*'.", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "Substitution '{0}' in pattern '{1}' can have at most one '*' character.", "Substitutions_for_pattern_0_should_be_an_array_5063": "Le sostituzioni per il criterio '{0}' devono essere una matrice.", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "Le sostituzioni per il criterio '{0}' non devono essere una matrice vuota.", "Successfully_created_a_tsconfig_json_file_6071": "La creazione di un file tsconfig.json è riuscita.", @@ -840,78 +1033,121 @@ "Suppress_excess_property_checks_for_object_literals_6072": "Elimina i controlli delle proprietà in eccesso per i valori letterali di oggetto.", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "Non visualizza gli errori noImplicitAny per gli oggetti di indicizzazione in cui mancano le firme dell'indice.", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "Il riferimento 'Symbol' non fa riferimento all'oggetto costruttore Symbol globale.", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively.", "Syntax_Colon_0_6023": "Sintassi: {0}", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "Tagged template expressions are not permitted in an optional chain.", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "The '{0}' modifier can only be used in TypeScript files.", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "Non è possibile applicare l'operatore '{0}' al tipo 'symbol'.", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "L'operatore '{0}' non è consentito per i tipi booleani. Provare a usare '{1}'.", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "The '{0}' property of an async iterator must be a method.", + "The_0_property_of_an_iterator_must_be_a_method_2767": "The '{0}' property of an iterator must be a method.", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "Il tipo 'Object' può essere assegnato a un numero molto limitato di altri tipi. Si intendeva usare il tipo 'any'?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "Non è possibile fare riferimento all'oggetto 'arguments' in una funzione arrow in ES3 e ES5. Provare a usare un'espressione di funzione standard.", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "Non è possibile fare riferimento all'oggetto 'arguments' in un metodo o una funzione asincrona in ES3 e ES5. Provare a usare un metodo o una funzione standard.", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "Il corpo di un'istruzione 'if' non può essere l'istruzione vuota.", "The_character_set_of_the_input_files_6163": "Set di caratteri dei file di input.", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "The containing arrow function captures the global value of 'this'.", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "Il corpo del modulo o la funzione che contiene è troppo grande per l'analisi del flusso di controllo.", "The_current_host_does_not_support_the_0_option_5001": "L'host corrente non supporta l'opzione '{0}'.", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "The declaration of '{0}' that you probably intended to use is defined here", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "The expected type comes from property '{0}' which is declared here on type '{1}'", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "The expected type comes from the return type of this signature.", + "The_expected_type_comes_from_this_index_signature_6501": "The expected type comes from this index signature.", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "L'espressione di un'assegnazione di esportazione deve essere un identificatore o un nome completo in un contesto di ambiente.", "The_files_list_in_config_file_0_is_empty_18002": "L'elenco 'files' nel file config '{0}' è vuoto.", + "The_first_export_default_is_here_2752": "The first export default is here.", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "Il primo parametro del metodo 'then' di una promessa deve essere un callback.", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "Il tipo globale 'JSX.{0}' non può contenere più di una proprietà.", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "La metaproprietà 'import.meta' è consentita solo se si usa 'ESNext' per le opzioni 'target' e 'module' del compilatore.", + "The_implementation_signature_is_declared_here_2750": "The implementation signature is declared here.", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "The 'import.meta' meta-property is only allowed when the '--module' option is 'esnext' or 'system'.", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary.", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "Il tipo dedotto di '{0}' fa riferimento a un tipo '{1}' non accessibile. È necessaria un'annotazione di tipo.", + "The_last_overload_gave_the_following_error_2770": "The last overload gave the following error.", + "The_last_overload_is_declared_here_2771": "The last overload is declared here.", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "La parte sinistra di un'espressione 'for...in' non può essere un criterio di destrutturazione.", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "Nella parte sinistra di un'espressione 'for...in' non è possibile usare un'annotazione di tipo.", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "The left-hand side of a 'for...in' statement may not be an optional property access.", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "La parte sinistra di un'istruzione 'for...in' deve essere una variabile o un accesso a proprietà.", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "La parte sinistra di un'espressione 'for...in' deve essere di tipo 'string' o 'any'.", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "Nella parte sinistra di un'espressione 'for...of' non è possibile usare un'annotazione di tipo.", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "The left-hand side of a 'for...of' statement may not be an optional property access.", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "La parte sinistra di un'istruzione 'for...of' deve essere una variabile o un accesso a proprietà.", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "La parte sinistra di un'operazione aritmetica deve essere di tipo 'any', 'number' o un tipo di enumerazione.", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "The left-hand side of an assignment expression may not be an optional property access.", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "La parte sinistra di un'espressione di assegnazione deve essere una variabile o un accesso a proprietà.", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "La parte sinistra di un'espressione 'in' deve essere di tipo 'any', 'string', 'number' o 'symbol'.", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "La parte sinistra di un'espressione 'instanceof' deve essere di tipo 'any' oppure essere un tipo di oggetto o un parametro di tipo.", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "Impostazioni locali usate per la visualizzazione di messaggi all'utente, ad esempio 'it-it'", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "Profondità massima delle dipendenze per la ricerca in node_modules e il caricamento dei file JavaScript.", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "The operand of a 'delete' operator cannot be a private identifier.", "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "L'operando di un operatore delete non può essere una proprietà di sola lettura.", "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "L'operando di un operatore delete deve essere un riferimento a proprietà.", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "The operand of an increment or decrement operator may not be an optional property access.", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "L'operando di un operatore di incremento o decremento deve essere una variabile o un accesso a proprietà.", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "The parser expected to find a '}' to match the '{' token here.", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "Il tipo restituito di un costruttore di elementi JSX deve restituire un tipo di oggetto.", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "Il tipo restituito di una funzione di espressione Decorator del parametro deve essere 'void' o 'any'.", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "Il tipo restituito di una funzione di espressione Decorator della proprietà deve essere 'void' o 'any'.", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "Il tipo restituito di una funzione asincrona deve essere una promessa valida oppure non deve contenere un membro 'then' chiamabile.", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "Il tipo restituito di un metodo o una funzione asincrona deve essere il tipo globale Promise.", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "La parte destra di un'istruzione 'for...in' deve essere di tipo 'any' oppure essere un tipo di oggetto o un parametro di tipo, ma in questo caso il tipo è '{0}'.", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "La parte destra di un'operazione aritmetica deve essere di tipo 'any', 'number' o un tipo di enumerazione.", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "La parte destra di un'espressione 'in' deve essere di tipo 'any' oppure deve essere un tipo di oggetto o un parametro di tipo.", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "La parte destra di un'espressione 'instanceof' deve essere di tipo 'any' o di un tipo assegnabile al tipo di interfaccia 'Function'.", + "The_shadowing_declaration_of_0_is_defined_here_18017": "The shadowing declaration of '{0}' is defined here", "The_specified_path_does_not_exist_Colon_0_5058": "Il percorso specificato non esiste: '{0}'.", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "La destinazione di un'assegnazione deve essere una variabile o un accesso a proprietà.", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "The target of an object rest assignment may not be an optional property access.", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "La destinazione di un'assegnazione REST di oggetto deve essere una variabile o un accesso a proprietà.", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "Il contesto 'this' del tipo '{0}' non è assegnabile a quello 'this' di tipo '{1}' del metodo.", "The_this_types_of_each_signature_are_incompatible_2685": "I tipi 'this' delle singole firme non sono compatibili.", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'.", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "Non è possibile dedurre l'argomento tipo per il parametro di tipo '{0}' dall'utilizzo. Provare a specificare gli argomenti tipo in modo esplicito.", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "Il tipo restituito dal metodo 'next()' di un iteratore asincrono deve essere una promessa per un tipo con una proprietà 'value'.", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "Il tipo restituito dal metodo 'next()' di un iteratore deve contenere una proprietà 'value'.", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "The type of a function declaration must match the function's signature.", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property.", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "The type returned by the '{0}()' method of an iterator must have a 'value' property.", + "The_types_of_0_are_incompatible_between_these_types_2200": "The types of '{0}' are incompatible between these types.", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "The types returned by '{0}' are incompatible between these types.", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "La dichiarazione di variabile di un'istruzione 'for...in' non può contenere un inizializzatore.", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "La dichiarazione di variabile di un'istruzione 'for...of' non può contenere un inizializzatore.", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "L'istruzione 'with' non è supportata. Il tipo di tutti i simboli in un blocco 'with' è 'any'.", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided.", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "This condition will always return true since the function is always defined. Did you mean to call it instead?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "Questa funzione del costruttore può essere convertita in una dichiarazione di classe.", + "This_expression_is_not_callable_2349": "This expression is not callable.", + "This_expression_is_not_constructable_2351": "This expression is not constructable.", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.", + "This_may_be_converted_to_an_async_function_80006": "This may be converted to an async function.", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export.", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag.", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "This overload signature is not compatible with its implementation signature.", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "This parameter is not allowed with 'use strict' directive.", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Con questa sintassi è richiesto un helper importato, ma il modulo '{0}' non è stato trovato.", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "Con questa sintassi è richiesto un helper importato denominato '{1}', ma il modulo '{0}' non contiene alcun membro esportato '{1}'.", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'.", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.", "Trailing_comma_not_allowed_1009": "La virgola finale non è consentita.", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Esegue il transpile di ogni file in un modulo separato (simile a 'ts.transpileModule').", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Provare con `npm install @types/{0}` se esiste oppure aggiungere un nuovo file di dichiarazione con estensione d.ts contenente `declare module '{0}';`", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`", "Trying_other_entries_in_rootDirs_6110": "Verrà effettuato un tentativo con altre voci in 'rootDirs'.", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "Verrà effettuato un tentativo con la sostituzione '{0}'. Percorso candidato del modulo: '{1}'.", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "Non è possibile assegnare il tipo di tupla '{0}' la cui lunghezza è '{1}' alla tupla la cui lunghezza è '{2}'.", - "Type_0_cannot_be_converted_to_type_1_2352": "Non è possibile convertire il tipo '{0}' nel tipo '{1}'.", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "Tuple type '{0}' of length '{1}' has no element at index '{2}'.", + "Tuple_type_arguments_circularly_reference_themselves_4110": "Tuple type arguments circularly reference themselves.", "Type_0_cannot_be_used_as_an_index_type_2538": "Non è possibile usare il tipo '{0}' come tipo di indice.", "Type_0_cannot_be_used_to_index_type_1_2536": "Non è possibile usare il tipo '{0}' per indicizzare il tipo '{1}'.", "Type_0_does_not_satisfy_the_constraint_1_2344": "Il tipo '{0}' non soddisfa il vincolo '{1}'.", + "Type_0_has_no_call_signatures_2757": "Type '{0}' has no call signatures.", + "Type_0_has_no_construct_signatures_2761": "Type '{0}' has no construct signatures.", "Type_0_has_no_matching_index_signature_for_type_1_2537": "Nel tipo '{0}' non esiste alcuna firma dell'indice corrispondente per il tipo '{1}'.", "Type_0_has_no_properties_in_common_with_type_1_2559": "Il tipo '{0}' non ha proprietà in comune con il tipo '{1}'.", - "Type_0_has_no_property_1_2460": "Il tipo '{0}' non contiene la proprietà '{1}'.", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "Il tipo '{0}' non contiene la proprietà '{1}' né la firma dell'indice di tipo stringa.", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "Type '{0}' is missing the following properties from type '{1}': {2}", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.", "Type_0_is_not_a_constructor_function_type_2507": "Il tipo '{0}' non è un tipo di funzione del costruttore.", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "Il tipo '{0}' non è un tipo restituito di funzione asincrona valido in ES5/ES3 perché non fa riferimento a un valore di costruttore compatibile con Promise.", "Type_0_is_not_an_array_type_2461": "Il tipo '{0}' non è un tipo matrice.", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "Il tipo '{0}' non è un tipo matrice. Usare l'opzione del compilatore '--downlevelIteration' per consentire l'iterazione degli iteratori.", "Type_0_is_not_an_array_type_or_a_string_type_2495": "Il tipo '{0}' non è un tipo matrice o stringa.", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "Il tipo '{0}' non è un tipo matrice o stringa. Usare l'opzione del compilatore '--downlevelIteration' per consentire l'iterazione degli iteratori.", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "Il tipo '{0}' non è un tipo matrice o stringa oppure non contiene un metodo '[Symbol.iterator]()' che restituisce un iteratore.", @@ -926,17 +1162,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "Il tipo '{0}' fa riferimento a se stesso in modo ricorsivo come tipo di base.", "Type_alias_0_circularly_references_itself_2456": "L'alias di tipo '{0}' contiene un riferimento circolare a se stesso.", "Type_alias_name_cannot_be_0_2457": "Il nome dell'alias di tipo non può essere '{0}'.", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "Type aliases can only be used in TypeScript files.", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "L'annotazione di tipo non può essere inclusa in una dichiarazione di costruttore.", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "Type annotations can only be used in TypeScript files.", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "Il candidato '{1}' non è un argomento tipo valido perché non è un supertipo del candidato '{0}'.", "Type_argument_expected_1140": "È previsto l'argomento tipo.", "Type_argument_list_cannot_be_empty_1099": "L'elenco degli argomenti tipo non può essere vuoto.", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "Type arguments can only be used in TypeScript files.", "Type_arguments_cannot_be_used_here_1342": "Non è possibile usare argomenti tipo in questa posizione.", + "Type_arguments_for_0_circularly_reference_themselves_4109": "Type arguments for '{0}' circularly reference themselves.", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "Type assertion expressions can only be used in TypeScript files.", "Type_declaration_files_to_be_included_in_compilation_6124": "File della dichiarazione di tipo da includere nella compilazione.", "Type_expected_1110": "È previsto il tipo.", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "Type instantiation is excessively deep and possibly infinite.", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "Il tipo viene usato come riferimento diretto o indiretto nel callback di fulfillment del relativo metodo 'then'.", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "Il tipo dell'operando 'await' deve essere una promessa valida oppure non deve contenere un membro 'then' chiamabile.", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "Type of computed property's value is '{0}', which is not assignable to type '{1}'.", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "Il tipo di elementi iterati di un operando 'yield*' deve essere una promessa valida oppure non deve contenere un membro 'then' chiamabile.", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "Il tipo dell'operando 'yield' in un generatore asincrono deve essere una promessa valida oppure non deve contenere un membro 'then' chiamabile.", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.", "Type_parameter_0_has_a_circular_constraint_2313": "Il parametro di tipo '{0}' contiene un vincolo circolare.", "Type_parameter_0_has_a_circular_default_2716": "Il parametro di tipo '{0}' contiene un'impostazione predefinita circolare.", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "Il parametro di tipo '{0}' della firma di chiamata dell'interfaccia esportata contiene o usa il nome privato '{1}'.", @@ -944,17 +1188,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "Il parametro di tipo '{0}' della classe esportata contiene o usa il nome privato '{1}'.", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "Il parametro di tipo '{0}' della funzione esportata contiene o usa il nome privato '{1}'.", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "Il parametro di tipo '{0}' dell'interfaccia esportata contiene o usa il nome privato '{1}'.", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "Type parameter '{0}' of exported mapped object type is using private name '{1}'.", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "Il parametro di tipo '{0}' dell'alias di tipo esportato contiene o usa il nome privato '{1}'.", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "Il parametro di tipo '{0}' del metodo dell'interfaccia esportata contiene o usa il nome privato '{1}'.", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "Il parametro di tipo '{0}' del metodo pubblico della classe esportata contiene o usa il nome privato '{1}'.", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "Il parametro di tipo '{0}' del metodo statico pubblico della classe esportata contiene o usa il nome privato '{1}'.", "Type_parameter_declaration_expected_1139": "È prevista la dichiarazione di parametro di tipo.", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "Type parameter declarations can only be used in TypeScript files.", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "Type parameter defaults can only reference previously declared type parameters.", "Type_parameter_list_cannot_be_empty_1098": "L'elenco dei parametri di tipo non può essere vuoto.", "Type_parameter_name_cannot_be_0_2368": "Il nome del parametro di tipo non può essere '{0}'.", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "I parametri di tipo non possono essere inclusi in una dichiarazione di costruttore.", "Type_predicate_0_is_not_assignable_to_1_1226": "Il predicato di tipo '{0}' non è assegnabile a '{1}'.", "Type_reference_directive_0_was_not_resolved_6120": "======== La direttiva '{0}' del riferimento al tipo non è stata risolta. ========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== La direttiva '{0}' del riferimento al tipo è stata risolta in '{1}'. Primaria: {2}. ========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========", "Types_have_separate_declarations_of_a_private_property_0_2442": "I tipi contengono dichiarazioni separate di una proprietà privata '{0}'.", "Types_of_parameters_0_and_1_are_incompatible_2328": "I tipi dei parametri '{0}' e '{1}' sono incompatibili.", "Types_of_property_0_are_incompatible_2326": "I tipi della proprietà '{0}' sono incompatibili.", @@ -967,10 +1215,18 @@ "Unexpected_token_1012": "Token imprevisto.", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "Token imprevisto. È previsto un costruttore, un metodo, una funzione di accesso o una proprietà.", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "Token imprevisto. Sono previsti nomi di parametro senza parentesi graffe.", + "Unexpected_token_Did_you_mean_or_gt_1382": "Unexpected token. Did you mean `{'>'}` or `>`?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "Unexpected token. Did you mean `{'}'}` or `}`?", "Unexpected_token_expected_1179": "Token imprevisto. È previsto '{'.", + "Unknown_build_option_0_5072": "Unknown build option '{0}'.", + "Unknown_build_option_0_Did_you_mean_1_5077": "Unknown build option '{0}'. Did you mean '{1}'?", "Unknown_compiler_option_0_5023": "Opzione del compilatore sconosciuta: '{0}'.", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "Unknown compiler option '{0}'. Did you mean '{1}'?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "L'opzione 'excludes' è sconosciuta. Si intendeva 'exclude'?", "Unknown_type_acquisition_option_0_17010": "L'opzione '{0}' relativa all'acquisizione del tipo è sconosciuta.", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "Unknown type acquisition option '{0}'. Did you mean '{1}'?", + "Unknown_watch_option_0_5078": "Unknown watch option '{0}'.", + "Unknown_watch_option_0_Did_you_mean_1_5079": "Unknown watch option '{0}'. Did you mean '{1}'?", "Unreachable_code_detected_7027": "È stato rilevato codice non raggiungibile.", "Unsupported_locale_0_6049": "Impostazioni locali non supportate: '{0}'.", "Unterminated_Unicode_escape_sequence_1199": "Sequenza di escape Unicode senza terminazione.", @@ -980,34 +1236,52 @@ "Unterminated_template_literal_1160": "Valore letterale di modello senza terminazione.", "Untyped_function_calls_may_not_accept_type_arguments_2347": "Le chiamate di funzione non tipizzate potrebbero non accettare argomenti tipo.", "Unused_label_7028": "Etichetta non usata.", + "Updating_output_of_project_0_6373": "Updating output of project '{0}'...", "Updating_output_timestamps_of_project_0_6359": "Aggiornamento dei timestamp di output del progetto '{0}'...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "Updating unchanged output timestamps of project '{0}'...", "Use_synthetic_default_member_95016": "Usare il membro 'default' sintetico.", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "L'uso di una stringa in un'istruzione 'for...of' è supportato solo in ECMAScript 5 e versioni successive.", + "Using_compiler_options_of_project_reference_redirect_0_6215": "Using compiler options of project reference redirect '{0}'.", "VERSION_6036": "VERSIONE", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "Il valore di tipo '{0}' non ha proprietà in comune con il tipo '{1}'. Si intendeva chiamarlo?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "Il valore di tipo '{0}' non è chiamabile. Si intendeva includere 'new'?", "Variable_0_implicitly_has_an_1_type_7005": "La variabile '{0}' contiene implicitamente un tipo '{1}'.", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage.", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "La variabile '{0}' contiene implicitamente il tipo '{1}' in alcune posizioni in cui non è possibile determinarne il tipo.", "Variable_0_is_used_before_being_assigned_2454": "La variabile '{0}' viene usata prima dell'assegnazione.", "Variable_declaration_expected_1134": "È prevista la dichiarazione di variabile.", "Variable_declaration_list_cannot_be_empty_1123": "L'elenco delle dichiarazioni di variabile non può essere vuoto.", "Version_0_6029": "Versione {0}", "Watch_input_files_6005": "Controlla i file di input.", + "Watch_option_0_requires_a_value_of_type_1_5080": "Watch option '{0}' requires a value of type {1}.", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "Indica se mantenere l'output della console obsoleto in modalità espressione di controllo invece di pulire lo schermo.", + "Wrap_invalid_character_in_an_expression_container_95101": "Wrap invalid character in an expression container", + "You_cannot_rename_a_module_via_a_global_import_8031": "You cannot rename a module via a global import.", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "Non è possibile rinominare elementi definiti nella libreria TypeScript standard.", "You_cannot_rename_this_element_8000": "Non è possibile rinominare questo elemento.", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "'{0}' accetta un numero troppo ridotto di argomenti da usare come espressione Decorator in questo punto. Si intendeva chiamarlo prima e scrivere '@{0}()'?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "'{0}' and '{1}' operations cannot be mixed without parentheses.", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "Gli attributi '{0}' sono stati specificati due volte. L'attributo denominato '{0}' verrà sovrascritto.", - "_0_can_only_be_used_in_a_ts_file_8009": "'{0}' può essere usato solo in un file con estensione ts.", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "'{0}' cannot be used as a value because it was exported using 'export type'.", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "'{0}' cannot be used as a value because it was imported using 'import type'.", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'.", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "'{0}' declarations can only be used in TypeScript files.", "_0_expected_1005": "È previsto '{0}'.", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage.", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "'{0}' contiene implicitamente il tipo restituito 'any', perché non contiene un'annotazione di tipo restituito e viene usato come riferimento diretto o indiretto in una delle relative espressioni restituite.", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "'{0}' contiene implicitamente il tipo 'any', perché non contiene un'annotazione di tipo e viene usato come riferimento diretto o indiretto nel relativo inizializzatore.", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "'{0}' è una primitiva, ma '{1}' è un oggetto wrapper. Quando possibile, preferire '{0}'.", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'.", "_0_is_declared_but_its_value_is_never_read_6133": "L'elemento '{0}' è dichiarato, ma il suo valore non viene mai letto.", "_0_is_declared_but_never_used_6196": "La variabile '{0}' è dichiarata, ma non viene mai usata.", + "_0_is_declared_here_2728": "'{0}' is declared here.", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor.", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property.", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}' non è una metaproprietà valida per la parola chiave '{1}'. Si intendeva '{2}'?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' viene usato come riferimento diretto o indiretto nella relativa espressione di base.", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' viene usato come riferimento diretto o indiretto nella relativa annotazione di tipo.", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}' is specified more than once, so this usage will be overwritten.", "_0_list_cannot_be_empty_1097": "L'elenco '{0}' non può essere vuoto.", "_0_modifier_already_seen_1030": "Il modificatore '{0}' è già presente.", "_0_modifier_cannot_appear_on_a_class_element_1031": "Il modificatore '{0}' non può essere incluso in un elemento classe.", @@ -1021,17 +1295,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "Non è possibile usare il modificatore '{0}' in un contesto di ambiente.", "_0_modifier_cannot_be_used_with_1_modifier_1243": "Non è possibile usare il modificatore '{0}' con il modificatore '{1}'.", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "Non è possibile usare il modificatore '{0}' con una dichiarazione di classe.", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "'{0}' modifier cannot be used with a private identifier", "_0_modifier_must_precede_1_modifier_1029": "Il modificatore '{0}' deve precedere il modificatore '{1}'.", + "_0_needs_an_explicit_type_annotation_2782": "'{0}' needs an explicit type annotation.", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "'{0}' fa riferimento solo a un tipo, ma qui viene usato come spazio dei nomi.", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "'{0}' fa riferimento solo a un tipo, ma qui viene usato come valore.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "'{0}' fa riferimento a un istruzione globale UMD, ma il file corrente è un modulo. Provare ad aggiungere un'importazione.", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "'{0}' refers to a value, but is being used as a type here.", "_0_tag_already_specified_1223": "Il tag '{0}' è già specificato.", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "Non è possibile usare in modo indipendente il tag '{0}' come tag JSDoc di primo livello.", + "_0_was_also_declared_here_6203": "'{0}' was also declared here.", + "_0_was_exported_here_1377": "'{0}' was exported here.", + "_0_was_imported_here_1376": "'{0}' was imported here.", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "'{0}', in cui manca l'annotazione di tipo restituito, contiene implicitamente un tipo restituito '{1}'.", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type.", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "Il modificatore 'abstract' può essere incluso solo in una dichiarazione di classe, metodo o proprietà.", - "await_expression_is_only_allowed_within_an_async_function_1308": "L'espressione 'await' è consentita solo in una funzione asincrona.", + "and_here_6204": "and here.", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "'await' expressions are only allowed within async functions and at the top levels of modules.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "Non è possibile usare le espressioni 'await' in un inizializzatore di parametri.", + "await_has_no_effect_on_the_type_of_this_expression_80007": "'await' has no effect on the type of this expression.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "L'opzione 'baseUrl' è impostata su '{0}'. Verrà usato questo valore per risolvere il nome del modulo non relativo '{1}'.", + "can_only_be_used_at_the_start_of_a_file_18026": "'#!' can only be used at the start of a file.", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "È possibile usare '=' solo in una proprietà di valore letterale di oggetto all'interno di un'assegnazione di destrutturazione.", "case_or_default_expected_1130": "È previsto 'case' o 'default'.", "class_expressions_are_not_currently_supported_9003": "Le espressioni 'class' non sono attualmente supportate.", @@ -1039,11 +1325,12 @@ "const_declarations_must_be_initialized_1155": "Le dichiarazioni 'const' devono essere inizializzate.", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "L'inizializzatore del membro di enumerazione 'const' è stato valutato come valore non finito.", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "L'inizializzatore del membro di enumerazione 'const' è stato valutato come valore non consentito 'NaN'.", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "const enum member initializers can only contain literal values and other computed enum values.", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "Le enumerazioni 'const' possono essere usate solo in espressioni di accesso a proprietà o indice oppure nella parte destra di un'assegnazione di esportazione, di una dichiarazione di importazione o di una query su tipo.", + "constructor_is_a_reserved_word_18012": "'#constructor' is a reserved word.", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "Non è possibile chiamare 'delete' su un identificatore in modalità strict.", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "eliminare - Il progetto '{0}' è aggiornato perché è stato compilato in precedenza", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "Le dichiarazioni 'enum' possono essere usate solo in un file con estensione ts.", - "export_can_only_be_used_in_a_ts_file_8003": "'export=' può essere usato solo in un file con estensione ts.", + "export_can_only_be_used_in_TypeScript_files_8003": "'export =' can only be used in TypeScript files.", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "Non è possibile applicare il modificatore 'export' a moduli di ambiente e aumenti di modulo perché sono sempre visibili.", "extends_clause_already_seen_1172": "La clausola 'extends' è già presente.", "extends_clause_must_precede_implements_clause_1173": "La clausola 'extends' deve precedere la clausola 'implements'.", @@ -1053,23 +1340,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "Le funzioni di accesso 'get e 'set' devono essere dello stesso tipo 'this'.", "get_and_set_accessor_must_have_the_same_type_2380": "Le funzioni di accesso 'get e 'set' devono essere dello stesso tipo.", "implements_clause_already_seen_1175": "La clausola 'implements' è già presente.", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "'implements clauses' può essere usato solo in un file con estensione ts.", - "import_can_only_be_used_in_a_ts_file_8002": "'import ... =' può essere usato solo in un file con estensione ts.", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "'implements' clauses can only be used in TypeScript files.", + "import_can_only_be_used_in_TypeScript_files_8002": "'import ... =' can only be used in TypeScript files.", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "Le dichiarazioni 'infer' sono consentite solo nella clausola 'extends' di un tipo condizionale.", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "'interface declarations' può essere usato solo in un file con estensione ts.", "let_declarations_can_only_be_declared_inside_a_block_1157": "Le dichiarazioni 'let' possono essere dichiarate solo all'interno di un blocco.", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "Non è consentito usare 'let' come nome in dichiarazioni 'let' o 'const'.", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "'module declarations' può essere usato solo in un file con estensione ts.", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "Non è possibile usare 'new T[]' per creare una matrice. Usare 'new Array()'.", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "L'espressione 'new', nella cui destinazione manca una firma del costrutto, contiene implicitamente un tipo 'any'.", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "'non-null assertions' può essere usato solo in un file con estensione ts.", "options_6024": "opzioni", "or_expected_1144": "È previsto '{' o ';'.", "package_json_does_not_have_a_0_field_6100": "Il file 'package.json' non contiene un campo '{0}'.", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "'package.json' does not have a 'typesVersions' entry that matches version '{0}'.", + "package_json_had_a_falsy_0_field_6220": "'package.json' had a falsy '{0}' field.", "package_json_has_0_field_1_that_references_2_6101": "Il file 'package.json' contiene il campo '{1}' di '{0}' che fa riferimento a '{2}'.", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "'parameter modifiers' può essere usato solo in un file con estensione ts.", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range.", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'.", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "'package.json' has a 'typesVersions' field with version-specific path mappings.", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "È specificata l'opzione 'paths'. Verrà cercato un criterio per la corrispondenza con il nome del modulo '{0}'.", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "Il modificatore 'readonly' può essere incluso solo in una dichiarazione di proprietà o una firma dell'indice.", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "'readonly' type modifier is only permitted on array and tuple literal types.", "require_call_may_be_converted_to_an_import_80005": "La chiamata a 'require' può essere convertita in un'importazione.", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "L'opzione 'rootDirs' è impostata e verrà usata per risolvere il nome del modulo relativo '{0}'.", "super_can_only_be_referenced_in_a_derived_class_2335": "È possibile fare riferimento a 'super' solo in una classe derivata.", @@ -1077,6 +1365,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "Non è possibile fare riferimento a 'super' in un nome di proprietà calcolato.", "super_cannot_be_referenced_in_constructor_arguments_2336": "Non è possibile fare riferimento a 'super' in argomenti del costruttore.", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "'super' è consentito solo in membri di espressioni letterali di oggetto quando il valore dell'opzione 'target' è 'ES2015' o superiore.", + "super_may_not_use_type_arguments_2754": "'super' may not use type arguments.", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "È necessario chiamare 'super' prima di accedere a una proprietà di 'super' nel costruttore di una classe derivata.", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "È necessario chiamare 'super' prima di accedere a 'this' nel costruttore di una classe derivata.", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "'super' deve essere seguito da un elenco di argomento o da un accesso membro.", @@ -1087,14 +1376,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "Non è possibile fare riferimento a 'this' in argomenti del costruttore.", "this_cannot_be_referenced_in_current_location_2332": "Non è possibile fare riferimento a 'this' nella posizione corrente.", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "'this' contiene implicitamente il tipo 'any' perché non include un'annotazione di tipo.", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "'type aliases' può essere usato solo in un file con estensione ts.", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "'type arguments' può essere usato solo in un file con estensione ts.", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "'type assertion expressions' può essere usato solo in un file con estensione ts.", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "'type parameter declarations' può essere usato solo in un file con estensione ts.", - "types_can_only_be_used_in_a_ts_file_8010": "'types' può essere usato solo in un file con estensione ts.", "unique_symbol_types_are_not_allowed_here_1335": "I tipi 'unique symbol' non sono consentiti in questo punto.", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "I tipi 'unique symbol' sono consentiti solo nelle variabili in un'istruzione di variabile.", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "Non è possibile usare i tipi 'unique symbol' in una dichiarazione di variabile con nome di binding.", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "'use strict' directive cannot be used with non-simple parameter list.", + "use_strict_directive_used_here_1349": "'use strict' directive used here.", "with_statements_are_not_allowed_in_an_async_function_block_1300": "Le istruzioni 'with' non sono consentite in un blocco di funzione asincrona.", "with_statements_are_not_allowed_in_strict_mode_1101": "Le istruzioni 'with' non sono consentite in modalità strict.", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "Non è possibile usare le espressioni 'yield' in un inizializzatore di parametri." diff --git a/lib/ja/diagnosticMessages.generated.json b/lib/ja/diagnosticMessages.generated.json index a05d953fe1484..b13ce2b8b889f 100644 --- a/lib/ja/diagnosticMessages.generated.json +++ b/lib/ja/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "'{0}' 修飾子とインポート宣言は同時に使用できません。", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "'{0}' 修飾子とインターフェイス宣言は同時に使用できません。", "A_0_parameter_must_be_the_first_parameter_2680": "'{0}' パラメーターは最初のパラメーターである必要があります。", + "A_bigint_literal_cannot_use_exponential_notation_1352": "bigint リテラルでは指数表記を使用できません。", + "A_bigint_literal_must_be_an_integer_1353": "bigint リテラルは整数である必要があります。", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "実装シグネチャでバインド パターン パラメーターを省略可能にすることはできません。", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "'break' ステートメントは外側のイテレーションまたは switch ステートメント内でのみ使用できます。", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "'break' ステートメントは、外側のステートメントのラベルにのみ移動できます。", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "クラスで実装できるのは、オプションの型引数を指定した識別子/完全修飾名のみです。", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "クラスで実装できるのは、オブジェクト型または静的な既知のメンバーを持つオブジェクト型の積集合のみです。", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "'default' の修飾子がないクラス宣言には名前が必要です。", "A_class_may_only_extend_another_class_2311": "クラスで拡張できるのは別のクラスだけです。", - "A_class_may_only_implement_another_class_or_interface_2422": "クラスで実装できるのは別のクラスまたはインターフェイスだけです。", "A_class_member_cannot_have_the_0_keyword_1248": "クラス メンバーに '{0}' キーワードを指定することはできません。", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "コンマ式は計算されたプロパティ名では使用できません。", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "計算されたプロパティ名は、型パラメーターをそれを含む型から参照することはできません。", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "インターフェイス内の計算されたプロパティ名は、型がリテラル型または 'unique symbol' 型の式を参照する必要があります。", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "計算されたプロパティ名は 'string' 型、'number' 型、'symbol' 型、または 'any' 型のいずれかでなければなりません。", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "形式 '{0}' の計算されたプロパティ名は 'symbol' 型でなければなりません。", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "'const' アサーションは、列挙型メンバーへの参照、文字列、数値、ブール値、配列、オブジェクト リテラルにのみ適用できます。", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "const 列挙型メンバーは、文字列リテラルを使用してのみアクセスできます。", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "環境コンテキスト内の 'const' 初期化子は文字列リテラルか数値リテラルにする必要があります。", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "環境コンテキストの 'const' 初期化子は、文字列または数値リテラル、もしくはリテラル列挙型の参照である必要があります。", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "コンストラクターのクラスが 'null' を拡張する場合、そのコンストラクターに 'super' の呼び出しを含めることはできません。", "A_constructor_cannot_have_a_this_parameter_2681": "コンストラクターに 'this' パラメーターを指定することはできません。", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "'continue' ステートメントは外側のイテレーション内でのみ使用できます。", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "'continue' ステートメントは、外側のイテレーション ステートメントのラベルにのみ移動できます。", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "'declare' 修飾子は、環境コンテキストでは使用できません。", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": ".d.ts ファイルの最上位宣言には、'declare' 修飾子が必要です。", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "デコレーターが装飾できるのは、オーバーロードではなく、メソッドの実装のみです。", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "'default' 句を 'switch' ステートメントで複数回使用することはできません。", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "既定のエクスポートは、ECMAScript スタイルのモジュールでのみ使用できます。", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "ジェネレーターに 'void' 型の注釈を指定することはできません。", "A_get_accessor_cannot_have_parameters_1054": "'get' アクセサーにパラメーターを指定することはできません。", "A_get_accessor_must_return_a_value_2378": "'get' アクセサーは値を返す必要があります。", + "A_label_is_not_allowed_here_1344": "'A ラベルはここでは使用できません。", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "列挙型宣言のメンバー初期化子は、他の列挙型で定義されたメンバーを含め、その後で宣言されたメンバーを参照できません。", + "A_method_cannot_be_named_with_a_private_identifier_18022": "メソッドに private 識別子を付けることはできません。", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "mixin クラスには、型 'any[]' の単一の rest パラメーターを持つコンストラクターが必要です。", "A_module_cannot_have_multiple_default_exports_2528": "モジュールに複数の既定のエクスポートを含めることはできません。", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "名前空間宣言は、それとマージするクラスや関数と異なるファイルに配置できません。", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "名前空間宣言は、それとマージするクラスや関数より前に配置できません。", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "名前空間宣言は、名前空間かモジュールでのみ使用できます。", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "名前空間スタイルのインポートを呼び出したり、構築したりすることはできません。実行時にエラーが発生する原因となります。", "A_non_dry_build_would_build_project_0_6357": "非 -dry ビルドを実行した場合、プロジェクト '{0}' がビルドされます", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "非 -dry ビルドを実行した場合、次のファイルが削除されます: {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "non-dry build では、プロジェクト '{0}' の出力が更新されます", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "non-dry build では、プロジェクト '{0}' の出力のタイムスタンプが更新されます", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "パラメーター初期化子は、関数またはコンストラクターの実装でのみ指定できます。", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "パラメーター プロパティは、rest パラメーターを使用して宣言することはできません。", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "パラメーター プロパティは、コンストラクターの実装でのみ指定できます。", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "Promise には 'then' メソッドが必要です。", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "型が 'unique symbol' 型のクラスのプロパティは、'static' と 'readonly' の両方である必要があります。", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "型が 'unique symbol' 型のインターフェイスまたは型リテラルのプロパティは、'readonly' である必要があります。", + "A_required_element_cannot_follow_an_optional_element_1257": "必須要素を省略可能な要素の後に指定することはできません。", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "必須パラメーターを省略可能なパラメーターの後に指定することはできません。", "A_rest_element_cannot_contain_a_binding_pattern_2501": "rest 要素にバインド パターンを含めることはできません。", "A_rest_element_cannot_have_a_property_name_2566": "rest 要素にプロパティ名を指定することはできません。", "A_rest_element_cannot_have_an_initializer_1186": "rest 要素に初期化子を指定することはできません。", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "rest 要素は非構造化パターンの最後に指定する必要があります。", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "rest 要素はタプル型の最後に指定する必要があります。", + "A_rest_element_type_must_be_an_array_type_2574": "rest 要素型は配列型である必要があります。", "A_rest_parameter_cannot_be_optional_1047": "rest パラメーターを省略可能にすることはできません。", "A_rest_parameter_cannot_have_an_initializer_1048": "rest パラメーターに初期化子を指定することはできません。", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "rest パラメーターはパラメーター リストの最後に指定する必要があります。", @@ -77,13 +85,13 @@ "A_set_accessor_must_have_exactly_one_parameter_1049": "'set' アクセサーにはパラメーターを 1 つだけ指定しなければなりません。", "A_set_accessor_parameter_cannot_have_an_initializer_1052": "'set' アクセサーのパラメーターに初期化子を含めることはできません。", "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381": "実装のシグネチャには文字列リテラル型は使用できません。", - "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "'super' の呼び出しは、初期化されたプロパティまたはパラメーターのプロパティがクラスに含まれている場合、コンストラクターの最初のステートメントでなければなりません。", + "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "'super' の呼び出しは、初期化されたプロパティ、パラメーターのプロパティ、private 識別子がクラスに含まれている場合は、コンストラクターの最初のステートメントである必要があります。", "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "'this' ベース型のガードはパラメーター ベース型のガードとは互換性がありません。", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "'this' 型はクラスまたはインターフェイスの静的でないメンバーでのみ使用できます。", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "'tsconfig.json' ファイルは既に '{0}' で定義されています。", - "A_tuple_type_element_list_cannot_be_empty_1122": "タプル型の要素リストを空にすることはできません。", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "累乗式の左辺で型アサーション式を使用することはできません。式を括弧で囲むことを検討してください。", "A_type_literal_property_cannot_have_an_initializer_1247": "型リテラル プロパティに初期化子を使用することはできません。", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "型のみのインポートでは既定のインポートまたは名前付きバインドを指定できますが、両方を指定することはできません。", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "型の述語は rest パラメーターを参照できません。", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "型の述語は、バインド パターン内の要素 '{0}' を参照できません。", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "型の述語は、関数およびメソッドの戻り値の型の位置でのみ使用できます。", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "\"{1}\" から既存のインポート宣言に '{0}' を追加する", "Add_0_to_unresolved_variable_90008": "'{0}' を未解決の変数に追加します", "Add_all_missing_async_modifiers_95041": "不足しているすべての 'async' 修飾子を追加します", + "Add_all_missing_imports_95064": "不足しているすべてのインポートを追加する", "Add_all_missing_members_95022": "不足しているすべてのメンバーを追加します", "Add_all_missing_super_calls_95039": "不足しているすべての super の呼び出しを追加します", "Add_async_modifier_to_containing_function_90029": "含まれている関数に async 修飾子を追加します", + "Add_await_95083": "'await' を追加する", + "Add_await_to_initializer_for_0_95084": "'{0}' の初期化子に 'await' を追加する", + "Add_await_to_initializers_95089": "初期化子に 'await' を追加する", "Add_braces_to_arrow_function_95059": "アロー関数に中かっこを追加します", + "Add_const_to_all_unresolved_variables_95082": "すべての未解決の変数に 'const' を追加する", + "Add_const_to_unresolved_variable_95081": "未解決の変数に 'const' を追加する", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "既定のインポート '{0}' を \"{1}\" からの既存のインポート宣言に追加する", "Add_definite_assignment_assertion_to_property_0_95020": "プロパティ '{0}' に限定代入アサーションを追加します", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "初期化されていないすべてのプロパティに限定代入アサーションを追加します", + "Add_export_to_make_this_file_into_a_module_95097": "'export {}' を追加して、このファイルをモジュールに含める", "Add_index_signature_for_property_0_90017": "プロパティ '{0}' のインデックス シグネチャを追加する", "Add_initializer_to_property_0_95019": "プロパティ '{0}' に初期化子を追加します", "Add_initializers_to_all_uninitialized_properties_95027": "初期化されていないすべてのプロパティに初期化子を追加します", + "Add_missing_enum_member_0_95063": "不足している列挙型メンバー '{0}' を追加する", + "Add_missing_new_operator_to_all_calls_95072": "不足している 'new' 演算子をすべての呼び出しに追加する", + "Add_missing_new_operator_to_call_95071": "不足している 'new' 演算子を呼び出しに追加する", "Add_missing_super_call_90001": "欠落している 'super()' 呼び出しを追加する", "Add_missing_typeof_95052": "不足している 'typeof' を追加します", + "Add_names_to_all_parameters_without_names_95073": "名前のないすべてのパラメーターに名前を追加する", "Add_or_remove_braces_in_an_arrow_function_95058": "アロー関数内の中かっこを追加または削除します", + "Add_parameter_name_90034": "パラメーター名を追加する", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "メンバー名と一致するすべての未解決の変数に修飾子を追加します", "Add_to_all_uncalled_decorators_95044": "呼び出されていないすべてのデコレーターに '()' を追加します", "Add_ts_ignore_to_all_error_messages_95042": "すべてのエラー メッセージに '@ts-ignore' を追加します", "Add_undefined_type_to_all_uninitialized_properties_95029": "初期化されていないすべてのプロパティに未定義の型を追加します", "Add_undefined_type_to_property_0_95018": "プロパティ '{0}' に '未定義' の型を追加します", + "Add_unknown_conversion_for_non_overlapping_types_95069": "重複していない型に対して 'unknown' 変換を追加する", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "重複していない型のすべての変換に 'unknown' を追加する", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "tsconfig.json ファイルを追加すると、TypeScript ファイルと JavaScript ファイルの両方を含むプロジェクトを整理できます。詳細については、https://aka.ms/tsconfig をご覧ください。", "Additional_Checks_6176": "追加のチェック", "Advanced_Options_6178": "詳細オプション", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "'{0}' のすべての宣言には、同一の型パラメーターがある必要があります。", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "抽象メソッドの宣言はすべて連続している必要があります。", "All_destructured_elements_are_unused_6198": "非構造化要素はいずれも使用されていません。", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "'--isolatedModules' フラグが指定されている場合、すべてのファイルはモジュールである必要があります。", "All_imports_in_import_declaration_are_unused_6192": "インポート宣言内のインポートはすべて未使用です。", + "All_type_parameters_are_unused_6205": "すべての型パラメーターが使用されていません", "All_variables_are_unused_6199": "すべての変数は未使用です。", + "Allow_accessing_UMD_globals_from_modules_95076": "モジュールから UMD グローバルへのアクセスを許可します。", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "既定のエクスポートがないモジュールからの既定のインポートを許可します。これは、型チェックのみのため、コード生成には影響を与えません。", "Allow_javascript_files_to_be_compiled_6102": "javascript ファイルのコンパイルを許可します。", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "'--isolatedModules' フラグが指定されている場合、アンビエント const 列挙型は使用できません。", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "既に含まれているファイル名 '{0}' は、ファイル名 '{1}' と大文字と小文字の指定だけが異なります。", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "アンビエント モジュール宣言では、相対モジュール名を指定できません。", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "アンビエント モジュールを、他のモジュールまたは名前空間内の入れ子にすることはできません。", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "AMD モジュールに複数の名前を代入することはできません。", "An_abstract_accessor_cannot_have_an_implementation_1318": "抽象アクセサーに実装を含めることはできません。", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "環境コンテキストではアクセサーは宣言できません。", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "アクセシビリティ修飾子を private 識別子と共に使用することはできません。", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "private 識別子を使用してアクセサーに名前を付けることはできません。", "An_accessor_cannot_have_type_parameters_1094": "アクセサーに型パラメーターを指定することはできません。", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "アンビエント モジュール宣言は、ファイルの最上位にのみ使用できます。", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "算術オペランドは 'any' 型、'number' 型、列挙型のいずれかでなければなりません。", + "An_argument_for_0_was_not_provided_6210": "'{0}' の引数が指定されていません。", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "このバインド パターンに一致する引数が指定されていません。", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "算術オペランドは 'any' 型、'number' 型、’bigint' 型、列挙型のいずれかである必要があります。", + "An_arrow_function_cannot_have_a_this_parameter_2730": "アロー関数に 'this' パラメーターを指定することはできません。", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "ES5/ES3 の非同期の関数またはメソッドには、'Promise' コンストラクターが必要です。'Promise' コンストラクターの宣言があることを確認するか、`--lib` オプションに 'ES2015' を組み込んでください。", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "非同期関数または非同期メソッドには、有効で待機可能な戻り値の型を指定する必要があります。", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "非同期関数またはメソッドは 'Promise' を返す必要があります。'Promise' の宣言があること、または `--lib` オプションに 'ES2015' を含めていることを確認してください。", "An_async_iterator_must_have_a_next_method_2519": "非同期反復子には 'next()' メソッドが必要です。", "An_element_access_expression_should_take_an_argument_1011": "要素アクセス式では、引数を取る必要があります。", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "private 識別子を使用して列挙型メンバーに名前を付けることはできません。", "An_enum_member_cannot_have_a_numeric_name_2452": "列挙型メンバーに数値名を含めることはできません。", + "An_enum_member_name_must_be_followed_by_a_or_1357": "列挙型メンバー名の後ろには、','、'='、'}' のいずれかを指定する必要があります。", "An_export_assignment_can_only_be_used_in_a_module_1231": "エクスポートの代入はモジュールでのみ使用可能です。", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "エクスポートの代入は、エクスポートされた他の要素を含むモジュールでは使用できません。", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "エクスポートの代入は、名前空間では使用できません。", "An_export_assignment_cannot_have_modifiers_1120": "エクスポートの代入に修飾子を指定することはできません。", "An_export_declaration_can_only_be_used_in_a_module_1233": "エクスポート宣言はモジュールでのみ使用可能です。", "An_export_declaration_cannot_have_modifiers_1193": "エクスポート宣言に修飾子を指定することはできません。", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "'void' 型の式は、真実性をテストできません", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "拡張された Unicode エスケープ値は 0x0 と 0x10FFFF の間 (両端を含む) でなければなりません。", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "識別子またはキーワードを数値リテラルのすぐ後に指定することはできません。", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "実装は環境コンテキストでは宣言できません。", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "インポート エイリアスは、'export type' を使用してエクスポートされた宣言を参照できません。", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "インポート エイリアスは、'import type' を使用してインポートされた宣言を参照できません。", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "インポート宣言は名前空間またはモジュールでのみ使用可能です。", "An_import_declaration_cannot_have_modifiers_1191": "インポート宣言に修飾子を指定することはできません。", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "インポート パスの末尾を拡張子 '{0}' にすることはできません。代わりに '{1}' のインポートをご検討ください。", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "インデックス シグネチャのパラメーターには型の注釈が必要です。", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "インデックス シグネチャのパラメーターの型を型のエイリアスにすることはできません。代わりに、'[{0}: {1}]: {2}' と記述することをご検討ください。", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "インデックス シグネチャのパラメーターの型を共用体型にすることはできません。代わりに、マップされたオブジェクト型の使用をご検討ください。", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "インデックス シグネチャのパラメーターの型は 'string' または 'number' でなければなりません。", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "インデックス シグネチャのパラメーターの型は 'string' または 'number' のいずれかである必要があります。", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "インターフェイスが拡張するのは、オプションの型引数が指定された識別子/完全修飾名のみです。", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "インターフェイスで拡張できるのは、クラスまたは他のインターフェイスのみです。", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "インターフェイスが拡張できるのは、オブジェクト型または静的な既知のメンバーを持つオブジェクト型の積集合のみです。", "An_interface_property_cannot_have_an_initializer_1246": "インターフェイス プロパティに初期化子を使用することはできません。", "An_iterator_must_have_a_next_method_2489": "反復子には 'next()' メソッドが必要です。", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "オブジェクト リテラルに同じ名前の複数の get/set アクセサーを指定することはできません。", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "厳格モードでは、オブジェクト リテラルに同じ名前の複数のプロパティを指定することはできません。", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "オブジェクト リテラルには、同じ名前のプロパティおよびアクセサーを指定することはできません。", "An_object_member_cannot_be_declared_optional_1162": "オブジェクト メンバーを省略可能として宣言することはできません。", + "An_optional_chain_cannot_contain_private_identifiers_18030": "省略可能なチェーンには、pirvate 識別子を含めることはできません。", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "'this' の外部値がこのコンテナーによってシャドウされています。", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "オーバーロード シグネチャをジェネレーターとして宣言することはできません。", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "累乗式の左辺で '{0}' 演算子を含む単項式を使用することはできません。式を括弧で囲むことを検討してください。", "Annotate_everything_with_types_from_JSDoc_95043": "すべてに JSDoc の型で注釈を付けます", "Annotate_with_type_from_JSDoc_95009": "JSDoc の型で注釈を付けます", "Annotate_with_types_from_JSDoc_95010": "JSDoc の型で注釈を付けます", + "Another_export_default_is_here_2753": "別のエクスポートの既定値がここにあります。", + "Are_you_missing_a_semicolon_2734": "セミコロンを忘れていませんか?", "Argument_expression_expected_1135": "引数式が必要です。", "Argument_for_0_option_must_be_Colon_1_6046": "'{0}' オプションの引数は {1} である必要があります。", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "型 '{0}' の引数を型 '{1}' のパラメーターに割り当てることはできません。", "Array_element_destructuring_pattern_expected_1181": "配列要素の非構造化パターンが必要です。", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "アサーションでは、呼び出し先のすべての名前が明示的な型の注釈で宣言されている必要があります。", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "アサーションでは、呼び出し元が識別子または修飾名である必要があります。", "Asterisk_Slash_expected_1010": "'*/' が必要です。", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "グローバル スコープの拡張を直接入れ子にできるのは、外部モジュールまたは環境モジュールの宣言内のみです。", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "グローバル スコープの拡張は、環境コンテキストに既にある場合を除いて、'declare' 修飾子を使用する必要があります。", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "プロジェクト '{0}' で型指定の自動検出が有効になっています。キャッシュの場所 '{2}' を使用して、モジュール '{1}' に対して追加の解決パスを実行しています。", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "基底クラスの式ではクラスの型パラメーターを参照することはできません。", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "既定コンストラクターの戻り値の型 '{0}' は、クラス型またはインターフェイス型ではありません。", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "基底コンストラクターの戻り値の型 '{0}' が、オブジェクト型または静的な既知のメンバーを持つオブジェクト型の積集合ではありません。", "Base_constructors_must_all_have_the_same_return_type_2510": "既定コンストラクターの戻り値の型は、すべて同じである必要があります。", "Base_directory_to_resolve_non_absolute_module_names_6083": "相対モジュール名を解決するためのベース ディレクトリ。", "Basic_Options_6172": "基本オプション", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "ターゲットが ES2020 未満の場合、bigint リテラルは使用できません。", "Binary_digit_expected_1177": "2 進の数字が必要です。", "Binding_element_0_implicitly_has_an_1_type_7031": "バインド要素 '{0}' には暗黙的に '{1}' 型が含まれます。", "Block_scoped_variable_0_used_before_its_declaration_2448": "ブロック スコープの変数 '{0}' が、宣言の前に使用されています。", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "最新の状態であると思われるものを含むすべてのプロジェクトをビルドします", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "最新でない場合は、1 つ以上のプロジェクトとその依存関係をビルドします", + "Build_option_0_requires_a_value_of_type_1_5073": "ビルド オプション '{0}' には型 {1} の値が必要です。", "Building_project_0_6358": "プロジェクト \"{0}\" をビルドしています...", "Call_decorator_expression_90028": "デコレーター式を呼び出す", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "呼び出しシグネチャの戻り値の型 '{0}' と '{1}' には互換性がありません。", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "戻り値の型の注釈がない呼び出しシグネチャの戻り値の型は、暗黙的に 'any' になります。", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "引数なしの呼び出しシグネチャに、互換性のない戻り値の型 '{0}' と '{1}' が含まれています。", "Call_target_does_not_contain_any_signatures_2346": "呼び出しターゲットにシグネチャが含まれていません。", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "'{0}.{1}' にアクセスできません。'{0}' は型で、名前空間ではありません。'{0}[\"{1}\"]' で '{0}' のプロパティ '{1}' の型を取得するつもりでしたか?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "'--isolatedModules' フラグが指定されている場合、アンビエント const 列挙型にはアクセスできません。", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "'{0}' コンストラクター型を '{1}' コンストラクター型に割り当てることができません。", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "抽象コンストラクター型を非抽象コンストラクター型に割り当てることはできません。", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "定数または読み取り専用プロパティであるため、'{0}' に割り当てられません。", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "定数であるため、'{0}' に代入することはできません。", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "読み取り専用プロパティであるため、'{0}' に代入することはできません。", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "変数ではないため、'{0}' に割り当てられません。", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "モジュール '{0}' は、モジュール以外のエンティティに解決するので拡張できません。", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "モジュール '{0}' は、モジュール以外のエンティティに解決するため、値のエクスポートで拡張できません。", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "'--module' フラグが 'amd' か 'system' でない限り、オプション '{0}' を使用してモジュールをコンパイルできません。", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "'--isolatedModules' フラグが指定されていると、名前空間をコンパイルできません。", "Cannot_create_an_instance_of_an_abstract_class_2511": "抽象クラスのインスタンスは作成できません。", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "反復子の 'next' メソッドには型 '{1}' が必要なため、値に反復をデリゲートすることはできませんが、含まれるジェネレーターは常に '{0}' を送信します。", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "'{0}' をエクスポートできません。モジュールからエクスポートできるのはローカル宣言のみです。", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "クラス '{0}' を拡張できません。Class コンストラクターがプライベートに設定されています。", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "インターフェイス '{0}' を拡張できません。'implements' ですか?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "現在のディレクトリに tsconfig.json ファイルが見つかりません: {0}。", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "指定されたディレクトリに tsconfig.json ファイルが見つかりません: '{0}'。", "Cannot_find_global_type_0_2318": "グローバル型 '{0}' が見つかりません。", "Cannot_find_global_value_0_2468": "グローバル値 '{0}' が見つかりません。", "Cannot_find_lib_definition_for_0_2726": "'{0}' のライブラリ定義が見つかりません。", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "'{0}' のライブラリ定義が見つかりません。'{1}' ですか?", "Cannot_find_module_0_2307": "モジュール '{0}' が見つかりません。", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "モジュール '{0}' が見つかりません。'--resolveJsonModule ' を使用して'.json' 拡張子を持つモジュールをインポートすることを検討してください", "Cannot_find_name_0_2304": "名前 '{0}' が見つかりません。", "Cannot_find_name_0_Did_you_mean_1_2552": "'{0}' という名前は見つかりません。'{1}' ですか?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "名前 '{0}' が見つかりません。インスタンス メンバー 'this.{0}' ですか?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "名前 '{0}' が見つかりません。静的メンバー '{1}.{0}' ですか?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "名前 '{0}' が見つかりません。ターゲット ライブラリを変更しますか? `lib` コンパイラ オプションを es2015 以降に変更してみてください。", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "名前 '{0}' が見つかりません。ターゲット ライブラリを変更しますか? `lib` コンパイラ オプションが 'dom' を含むように変更してみてください。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "名前 '{0}' が見つかりません。テスト ランナーの型定義をインストールしますか? `npm i @types/jest` または `npm i @types/mocha` を試してみてください。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "名前 '{0}' が見つかりません。テスト ランナーの型定義をインストールしますか? `npm i @types/jest` または `npm i @types/mocha` を試してから、tsconfig の型フィールドに `jest` または `mocha` を追加してください。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "名前 '{0}' が見つかりません。jQuery の型定義をインストールしますか? `npm i @types/jquery` を試してみてください。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "名前 '{0}' が見つかりません。jQuery の型定義をインストールしますか? `npm i @types/jquery` を試してから、tsconfig の型フィールドに `jquery` を追加してみてください。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "名前 '{0}' が見つかりません。ノードの型定義をインストールしますか? `npm i @types/node` を試してみてください。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "名前 '{0}' が見つかりません。ノードの型定義をインストールしますか? `npm i @types/node` を試してから、tsconfig の型フィールドに `node` を追加してみてください。", "Cannot_find_namespace_0_2503": "名前空間 '{0}' が見つかりません。", "Cannot_find_parameter_0_1225": "パラメーター '{0}' が見つかりません。", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "入力ファイルの共通サブディレクトリ パスが見つかりません。", "Cannot_find_type_definition_file_for_0_2688": "'{0}' の型定義ファイルが見つかりません。", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "型宣言ファイルをインポートできません。'{1}' の代わりに '{0}' をインポートすることを検討してください。", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "ブロック スコープ宣言 '{1}' と同じスコープ内の外部スコープ変数 '{0}' を初期化できません。", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "型に呼び出しシグネチャがない式を呼び出すことはできません。型 '{0}' には互換性のある呼び出しシグネチャがありません。", "Cannot_invoke_an_object_which_is_possibly_null_2721": "'null' の可能性があるオブジェクトを呼び出すことはできません。", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "'null' または 'undefined' の可能性があるオブジェクトを呼び出すことはできません。", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "'undefined' の可能性があるオブジェクトを呼び出すことはできません。", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "反復子の 'next' メソッドは型 '{1}' を予期するため、値を反復処理できませんが、配列の非構造化は常に '{0}' を送信します。", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "反復子の 'next' メソッドは型 '{1}' を予期するため、値を反復処理できませんが、配列展開は常に '{0}' を送信します。", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "反復子の 'next' メソッドは型 '{1}' を予期するため、値を反復処理できませんが、for-of は常に '{0}' を送信します。", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "'outFile' が設定されていないため、プロジェクト '{0}' を先頭に追加することはできません", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "0'--isolatedModules' フラグが指定されている場合、型を再エクスポートできません。", "Cannot_read_file_0_Colon_1_5012": "ファイル '{0}' を読み取れません: {1}。", "Cannot_redeclare_block_scoped_variable_0_2451": "ブロック スコープの変数 '{0}' を再宣言することはできません。", "Cannot_redeclare_exported_variable_0_2323": "エクスポートされた変数 '{0}' を再び宣言できません。", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "catch 句で識別子 '{0}' を再宣言することはできません。", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "ファイル '{1}' の読み取りでエラーが発生したため、プロジェクト '{0}' の出力を更新できません", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "'--jsx' フラグが指定されていないと、JSX を使用できません。", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "'--module' が 'none' である場合、インポート、エクスポート、モジュール拡張は使用できません。", "Cannot_use_namespace_0_as_a_type_2709": "名前空間 '{0}' を型として使用することはできません。", "Cannot_use_namespace_0_as_a_value_2708": "名前空間 '{0}' を値として使用することはできません。", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "呼び出しシグネチャまたはコンストラクト シグネチャがない型が含まれる式では 'new' は使用できません。", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "ファイル '{0}' は、参照先のプロジェクト '{1}' によって生成された '.tsbuildinfo' ファイルを上書きするため、書き込めません", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "複数の入力ファイルで上書きされることになるため、ファイル '{0}' を書き込めません。", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "入力ファイルを上書きすることになるため、ファイル '{0}' を書き込めません。", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "catch 句の変数に型の注釈を指定することはできません。", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "'{0}' が '{1}' - '{2}' の最長一致のプレフィックスであるかを確認しています。", "Circular_definition_of_import_alias_0_2303": "インポート エイリアス '{0}' の循環定義です。", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "構成: {0} の解決中に循環が検出されました", + "Circularity_originates_in_type_at_this_location_2751": "この位置の型で循環が発生しています。", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "クラス '{0}' で定義されたインスタンス メンバー アクセサー '{1}' が、拡張されたクラス '{2}' ではインスタンス メンバー関数として定義されています。", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "クラス '{0}' で定義されたインスタンス メンバー関数 '{1}' が、拡張されたクラス '{2}' ではインスタンス メンバー アクセサーとして定義されています。", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "クラス '{0}' で定義されたインスタンス メンバー関数 '{1}' が、拡張されたクラス '{2}' ではインスタンス メンバー プロパティとして定義されています。", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "クラス '{0}' で定義されたインスタンス メンバー プロパティ '{1}' が、拡張されたクラス '{2}' ではインスタンス メンバー関数として定義されています。", "Class_0_incorrectly_extends_base_class_1_2415": "クラス '{0}' は基底クラス '{1}' を正しく拡張していません。", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "クラス '{0}' はクラス '{1}' を正しく実装していません。'{1}' を拡張し、そのメンバーをサブクラスとして継承しますか?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "クラス側の静的な '{0}' が基底クラス側の静的な '{1}' を正しく拡張していません。", "Classes_can_only_extend_a_single_class_1174": "クラスで拡張できるクラスは 1 つのみです。", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "抽象メソッドを含むクラスは abstract に指定する必要があります。", + "Classes_may_not_have_a_field_named_constructor_18006": "クラスに 'constructor' という名前のフィールドを含めることはできません。", "Command_line_Options_6171": "コマンド ライン オプション", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "構成ファイルか、'tsconfig.json' を含むフォルダーにパスが指定されたプロジェクトをコンパイルします。", "Compiler_option_0_expects_an_argument_6044": "コンパイラ オプション '{0}' には引数が必要です。", "Compiler_option_0_requires_a_value_of_type_1_5024": "コンパイラ オプション '{0}' には {1} の型の値が必要です。", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "private 識別子を下位レベルで出力するときに、コンパイラは名前 '{0}' を予約します。", "Composite_projects_may_not_disable_declaration_emit_6304": "複合プロジェクトで宣言の生成を無効にすることはできません。", + "Composite_projects_may_not_disable_incremental_compilation_6379": "複合プロジェクトではインクリメンタル コンパイルを無効にできません。", "Computed_property_names_are_not_allowed_in_enums_1164": "計算されたプロパティ名は列挙型では使用できません。", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "文字列値のメンバーを持つ列挙型では、計算値は許可されません。", "Concatenate_and_emit_output_to_single_file_6001": "出力を連結して 1 つのファイルを生成します。", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "'{0}' の定義が '{1}' および '{2}' で競合しています。競合を解決するには、このライブラリの特定バージョンのインストールをご検討ください。", + "Conflicts_are_in_this_file_6201": "このファイル内に競合があります。", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "コンストラクト シグネチャの戻り値の型 '{0}' と '{1}' には互換性がありません。", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "戻り値の型の注釈がないコンストラクト シグネチャの戻り値の型は、暗黙的に 'any' になります。", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "引数のないコンストラクト シグネチャには、互換性のない戻り値の型 '{0}' と '{1}' が含まれています。", "Constructor_implementation_is_missing_2390": "コンストラクターの実装がありません。", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "クラス '{0}' のコンストラクターはプライベートであり、クラス宣言内でのみアクセス可能です。", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "クラス '{0}' のコンストラクターは保護されており、クラス宣言内でのみアクセス可能です。", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "派生クラスのコンストラクターには 'super' の呼び出しを含める必要があります。", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "包含するファイルが指定されていないため、ルート ディレクトリを決定できません。'node_modules' フォルダーのルックアップをスキップします。", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "型 '{0}' から型 '{1}' への変換は、互いに十分に重複できないため間違っている可能性があります。意図的にそうする場合は、まず式を 'unknown' に変換してください。", "Convert_0_to_mapped_object_type_95055": "'{0}' をマップされたオブジェクト型に変換する", "Convert_all_constructor_functions_to_classes_95045": "すべてのコンストラクター関数をクラスに変換します", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "値として使用されていないすべてのインポートを型のみのインポートに変換する", + "Convert_all_re_exported_types_to_type_only_exports_1365": "すべての再エクスポートされた型を、型のみのエクスポートに変換する", "Convert_all_require_to_import_95048": "'require' をすべて 'import' に変換", + "Convert_all_to_async_functions_95066": "すべてを非同期関数に変換する", + "Convert_all_to_bigint_numeric_literals_95092": "すべてを bigint 数値リテラルに変換する", "Convert_all_to_default_imports_95035": "すべてを既定のインポートに変換します", + "Convert_const_to_let_95093": "'const' を 'let' に変換する", + "Convert_default_export_to_named_export_95061": "既定のエクスポートを名前付きエクスポートに変換する", "Convert_function_0_to_class_95002": "関数 '{0}' をクラスに変換します", "Convert_function_to_an_ES2015_class_95001": "関数を ES2015 クラスに変換します", + "Convert_invalid_character_to_its_html_entity_code_95100": "無効な文字をその html エンティティ コードに変換する", + "Convert_named_export_to_default_export_95062": "名前付きエクスポートを既定のエクスポートに変換する", "Convert_named_imports_to_namespace_import_95057": "名前付きインポートを名前空間インポートに変換します", "Convert_namespace_import_to_named_imports_95056": "名前空間インポートを名前付きインポートに変換します", + "Convert_parameters_to_destructured_object_95075": "パラメーターを非構造化オブジェクトに変換する", "Convert_require_to_import_95047": "'require' を 'import' に変換", "Convert_to_ES6_module_95017": "ES6 モジュールに変換します", + "Convert_to_a_bigint_numeric_literal_95091": "bigint 数値リテラルに変換する", + "Convert_to_async_function_95065": "非同期関数に変換する", "Convert_to_default_import_95013": "既定のインポートに変換する", + "Convert_to_template_string_95096": "テンプレート文字列に変換する", + "Convert_to_type_only_export_1364": "型のみのエクスポートに変換する", + "Convert_to_type_only_import_1373": "型のみのインポートに変換する", "Corrupted_locale_file_0_6051": "ロケール ファイル {0} は破損しています。", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "モジュール '{0}' の宣言ファイルが見つかりませんでした。'{1}' は暗黙的に 'any' 型になります。", "Could_not_write_file_0_Colon_1_5033": "ファイル '{0}' を書き込めませんでした: '{1}'。", "DIRECTORY_6038": "ディレクトリ", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "このファイルの宣言の生成では、プライベート名 '{0}' を使用する必要があります。明示的な型の注釈では、宣言の生成のブロックを解除できます。", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "このファイルの宣言の生成では、モジュール '{1}' からのプライベート名 '{0}' を使用する必要があります。明示的な型の注釈では、宣言の生成のブロックを解除できます。", "Declaration_expected_1146": "宣言が必要です。", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "宣言名が組み込みのグローバル識別子 '{0}' と競合しています。", "Declaration_or_statement_expected_1128": "宣言またはステートメントが必要です。", + "Declare_a_private_field_named_0_90053": "'{0}' という名前のプライベート フィールドを宣言します。", "Declare_method_0_90023": "メソッド '{0}' を宣言する", "Declare_property_0_90016": "プロパティ '{0}' を宣言する", "Declare_static_method_0_90024": "静的メソッド '{0}' を宣言する", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "デコレーターはここでは無効です。", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "デコレーターを同じ名前の複数の get/set アクセサーに適用することはできません。", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "モジュールの既定エクスポートがプライベート名 '{0}' を持っているか、使用しています。", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "明確な代入アサーションを使用できるのは、型の注釈と共に使用する場合のみです。", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "次の識別子の定義が、別のファイル内の定義と競合しています: {0}", "Delete_all_unused_declarations_95024": "未使用の宣言をすべて削除します", "Delete_the_outputs_of_all_projects_6365": "すべてのプロジェクトの出力を削除します", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[非推奨] 代わりに '--jsxFactory' を使います。'react' JSX 発行を対象とするときに、createElement に対して呼び出されたオブジェクトを指定します", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[非推奨] 代わりに '--outFile' を使います。出力を連結して 1 つのファイルを生成します", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[非推奨] 代わりに '--skipLibCheck' を使います。既定のライブラリ宣言ファイルの型チェックをスキップします。", + "Did_you_forget_to_use_await_2773": "'await' を使用することを忘れていませんか?", + "Did_you_mean_0_1369": "'{0}' を意図していましたか?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "'{0}' が型 'new (...args: any[]) => {1}' に制約されることを意図していましたか?", + "Did_you_mean_to_call_this_expression_6212": "この式を呼び出すことを意図していましたか?", + "Did_you_mean_to_mark_this_function_as_async_1356": "この関数を 'async' とマークすることを意図していましたか?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "この関数型をかっこで囲むことを意図していましたか?", + "Did_you_mean_to_use_new_with_this_expression_6213": "この式で 'new' を使用することを意図していましたか?", "Digit_expected_1124": "数値が必要です", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "ディレクトリ '{0}' は存在していません。ディレクトリ内のすべての参照をスキップしています。", "Disable_checking_for_this_file_90018": "このファイルのチェックを無効にする", "Disable_size_limitations_on_JavaScript_projects_6162": "JavaScript プロジェクトのサイズ制限を無効にします。", + "Disable_solution_searching_for_this_project_6224": "このプロジェクトのソリューション検索を無効にします。", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "関数型の汎用シグネチャに対する厳密なチェックを無効にします。", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "参照先のプロジェクトの宣言ファイルの代わりにソース ファイルを使用することを無効にします。", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "同じファイルへの大文字小文字の異なる参照を許可しない。", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "トリプルスラッシュの参照やインポートしたモジュールをコンパイルされたファイルのリストに追加しないでください。", "Do_not_emit_comments_to_output_6009": "コメントを出力しないでください。", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "未使用のラベルに関するエラーを報告しない。", "Do_not_resolve_the_real_path_of_symlinks_6013": "symlink の実際のパスを解決しません。", "Do_not_truncate_error_messages_6165": "エラー メッセージを切り捨てないでください。", - "Duplicate_declaration_0_2718": "宣言 '{0}' が重複しています。", "Duplicate_function_implementation_2393": "関数の実装が重複しています。", "Duplicate_identifier_0_2300": "識別子 '{0}' が重複しています。", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "識別子 '{0}' が重複しています。コンパイラは、モジュールの最上位のスコープに名前 '{1}' を予約します。", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "識別子 '_this' が重複しています。コンパイラは変数宣言 '_this' を使用して '_this' の参照をキャプチャします。", "Duplicate_label_0_1114": "ラベル '{0}' が重複しています。", "Duplicate_number_index_signature_2375": "number インデックス シグネチャが重複しています。", + "Duplicate_property_0_2718": "プロパティ '{0}' が重複しています。", "Duplicate_string_index_signature_2374": "string インデックス シグネチャが重複しています。", "Dynamic_import_cannot_have_type_arguments_1326": "動的インポートには型引数を指定することはできません", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "動的インポートがサポートされるのは、'--module' フラグが 'commonjs' または 'esNext' の場合のみです。", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "動的インポートには、引数として 1 つの指定子を指定する必要があります。", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "動的インポートの指定子の型は 'string' である必要がありますが、ここでは型 '{0}' が指定されています。", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "動的インポートは、'--module' フラグが 'es2020'、'esnext'、'commonjs'、'amd'、'system'、'umd' に設定されている場合にのみサポートされます。", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "共用体型 '{0}' の各メンバーにはコンストラクト シグネチャがありますが、これらのシグネチャはいずれも相互に互換性がありません。", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "共用体型 '{0}' の各メンバーにはシグネチャがありますが、これらのシグネチャはいずれも相互に互換性がありません。", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "型 '{0}' の式を使用して型 '{1}' にインデックスを付けることはできないため、要素は暗黙的に 'any' 型になります。", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "インデックス式が型 'number' ではないため、要素に 'any' 型が暗黙的に指定されます。", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "型 '{0}' にはインデックス シグネチャがないため、要素は暗黙的に 'any' 型になります。", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "型 '{0}' にはインデックス シグネチャがないため、要素は暗黙的に 'any' 型になります。'{1}' を呼び出すことを意図していましたか?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "出力ファイルの最初に UTF-8 バイト順マーク(BOM) を生成します。", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "個々のファイルを持つ代わりに、複数のソース マップを含む単一ファイルを生成します。", + "Emit_class_fields_with_Define_instead_of_Set_6222": "Set ではなく Define を使用して、クラスのフィールドを生成します。", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "単一ファイル内でソースマップと共にソースを生成します。'--inlineSourceMap' または '--sourceMap' を設定する必要があります。", "Enable_all_strict_type_checking_options_6180": "厳密な型チェックのオプションをすべて有効にします。", + "Enable_incremental_compilation_6378": "インクリメンタル コンパイルを有効にする", "Enable_project_compilation_6302": "プロジェクトのコンパイルを有効にします", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "厳格な 'bind'、'call'、'apply' メソッドを関数で有効にします。", "Enable_strict_checking_of_function_types_6186": "関数の型の厳密なチェックを有効にします。", "Enable_strict_checking_of_property_initialization_in_classes_6187": "クラス内のプロパティの初期化の厳密なチェックを有効にします。", "Enable_strict_null_checks_6113": "厳格な null チェックを有効にします。", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "構成ファイルで 'experimentalDecorators' オプションを有効にする", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "構成ファイルで '--jsx' フラグを有効にする", "Enable_tracing_of_the_name_resolution_process_6085": "名前解決の処理のトレースを有効にします。", "Enable_verbose_logging_6366": "詳細ログを有効にします", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "すべてのインポートの名前空間オブジェクトを作成して、CommonJS と ES モジュール間の生成の相互運用性を有効にします。'allowSyntheticDefaultImports' を暗黙のうちに表します。", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "列挙型メンバーが必要です。", "Enum_member_must_have_initializer_1061": "列挙型メンバーには初期化子が必要です。", "Enum_name_cannot_be_0_2431": "列挙型の名前を '{0}' にすることはできません。", + "Enum_type_0_circularly_references_itself_2586": "列挙型 '{0}' は、それ自体を循環参照します。", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "列挙型 '{0}' に、リテラルではない初期化子を持つメンバーがあります。", "Examples_Colon_0_6026": "例: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "型 '{0}' と '{1}' を比較するスタックが深すぎます。", @@ -385,9 +490,9 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "最低でも {0} 個の引数が必要ですが、{1} 個以上指定されました。", "Expected_corresponding_JSX_closing_tag_for_0_17002": "'{0}' の対応する JSX 終了タグが必要です。", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "JSX フラグメントの対応する終了タグが必要です。", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "'package.json' の '{0}' フィールドの型は 'string' であるべきですが、'{1}' を取得しました。", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "'package.json' の '{0}' フィールドの型は '{1}' であるべきですが、'{2}' を取得しました。", "Experimental_Options_6177": "試験的なオプション", - "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "デコレーターの実験的なサポートは将来のリリースで変更になる可能性がある機能です。'experimentalDecorators' オプションを設定してこの警告を削除します。", + "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "デコレーターの実験的なサポートは将来のリリースで変更になる可能性がある機能です。'tsconfig' または 'jsconfig' に 'experimentalDecorators' オプションを設定してこの警告を削除します。", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "明示的に指定されたモジュール解決の種類 '{0}'。", "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "ECMAScript モジュールを対象にする場合は、エクスポート代入を使用できません。代わりに 'export default' または別のモジュール書式の使用をご検討ください。", "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "代入のエクスポートは、'--module' フラグが 'system' の場合にはサポートされません。", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "エクスポートとエクスポートの代入はモジュールの拡張では許可されていません。", "Expression_expected_1109": "式が必要です。", "Expression_or_comma_expected_1137": "式またはコンマが必要です。", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "式は、複雑すぎて表現できない共用体型を生成します。", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "式は、コンパイラが基底クラスの参照をキャプチャするために使用する '_super' に解決されます。", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "式は、コンパイラが非同期関数をサポートするために使用する変数宣言 '{0}' に解決されます。", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "式は、コンパイラが 'new.target' メタプロパティの参照をキャプチャするために使用する変数宣言 '_newTarget' に解決されます。", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "{1} 内の {0} に抽出する", "Extract_to_0_in_1_scope_95008": "{1} スコープ内の {0} に抽出する", "Extract_to_0_in_enclosing_scope_95007": "外側のスコープ内の {0} に抽出する", + "Extract_to_interface_95090": "インターフェイスに抽出する", + "Extract_to_type_alias_95078": "型のエイリアスに抽出する", + "Extract_to_typedef_95079": "typedef に抽出する", + "Extract_type_95077": "Extract 型", "FILE_6035": "ファイル", "FILE_OR_DIRECTORY_6040": "ファイルまたはディレクトリ", "Failed_to_parse_file_0_Colon_1_5014": "ファイル '{0}' を解析できませんでした。{1}。", "Fallthrough_case_in_switch_7029": "switch に case のフォールスルーがあります。", "File_0_does_not_exist_6096": "ファイル '{0}' が存在しません。", "File_0_exist_use_it_as_a_name_resolution_result_6097": "ファイル '{0}' が存在します。名前解決の結果として使用します。", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "ファイル '{0}' はサポートされていない拡張子を含んでいます。サポートされている拡張子は {1} のみです。", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "ファイル '{0}' にはサポートされていない拡張機能があるため、スキップしています。", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "ファイル '{0}' はサポートされていない拡張子を含んでいます。サポートされている拡張子は {1} のみです。", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "ファイル '{0}' は JavaScript ファイルです。'allowJs' オプションを有効にするつもりでしたか?", "File_0_is_not_a_module_2306": "ファイル '{0}' はモジュールではありません。", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "ファイル '{0}' がプロジェクト ファイル リストに含まれていません。プロジェクトではすべてのファイルをリストするか、'include' パターンを使用する必要があります。", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "ファイル '{0}' がプロジェクト '{1}' のファイル リストに含まれていません。プロジェクトではすべてのファイルをリストするか、'include' パターンを使用する必要があります。", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "ファイル '{0}' が 'rootDir' '{1}' の下にありません。'rootDir' にすべてにソース ファイルが含まれている必要があります。", "File_0_not_found_6053": "ファイル '{0}' が見つかりません。", "File_change_detected_Starting_incremental_compilation_6032": "ファイルの変更が検出されました。インクリメンタル コンパイルを開始しています...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "ファイルの指定で再帰ディレクトリのワイルドカード ('**') の後に親ディレクトリ ('..') を指定することはできません: '{0}'。", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "ファイルの指定の末尾を再帰的なディレクトリのワイルドカード ('**') にすることはできません: '{0}'。", "Fix_all_detected_spelling_errors_95026": "検出されたすべてのスペル ミスを修正します", + "Fix_all_expressions_possibly_missing_await_95085": "'await' が不足している可能性があるすべての式を修正する", + "Found_0_errors_6217": "{0} 件のエラーが見つかりました。", "Found_0_errors_Watching_for_file_changes_6194": "{0} 件のエラーが見つかりました。ファイルの変更をモニタリングしています。", + "Found_1_error_6216": "1 件のエラーが見つかりました。", "Found_1_error_Watching_for_file_changes_6193": "1 件のエラーが見つかりました。ファイルの変更をモニタリングしています。", "Found_package_json_at_0_6099": "'{0}' で 'package.json' が見つかりました。", - "Found_package_json_at_0_Package_ID_is_1_6190": "'{0}' で 'package.json' が見つかりました。パッケージ ID は、'{1}' です。", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "'ES3' または 'ES5' を対象としている場合、関数宣言は厳格モードのブロック内では許可されていません。", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "'ES3' または 'ES5' を対象としている場合、関数宣言は厳格モードのブロック内では許可されていません。クラス定義は自動的に厳格モードになります。", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "'ES3' または 'ES5' を対象としている場合、関数宣言は厳格モードのブロック内では許可されていません。モジュールは自動的に厳格モードになります。", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "関数に終了の return ステートメントがないため、戻り値の型には 'undefined' が含まれません。", "Function_overload_must_be_static_2387": "関数のオーバーロードは静的でなければなりません。", "Function_overload_must_not_be_static_2388": "関数のオーバーロードは静的にはできせん。", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "戻り値の型の注釈がない関数型の戻り値の型は、暗黙的に '{0}' になります。", "Generate_get_and_set_accessors_95046": "'get' および 'set' アクセサーの生成", + "Generates_a_CPU_profile_6223": "CPU プロファイルを生成します。", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "対応する各 '.d.ts' ファイルにソースマップを生成します。", "Generates_corresponding_d_ts_file_6002": "対応する '.d.ts' ファイルを生成します。", "Generates_corresponding_map_file_6043": "対応する '.map' ファイルを生成します。", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "ジェネレーターは値を生成しないため、暗黙的に型 '{0}' になります。戻り値の型を指定することを検討してください。", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "ジェネレーターは値を生成しないため、暗黙的に yield 型 '{0}' になります。戻り値の型の注釈を指定することを検討してください。", "Generators_are_not_allowed_in_an_ambient_context_1221": "ジェネレーターは環境コンテキストでは使用できません。", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "ジェネレーターは、ECMAScript 2015 以上を対象にする場合のみ使用できます。", "Generic_type_0_requires_1_type_argument_s_2314": "ジェネリック型 '{0}' には {1} 個の型引数が必要です。", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "ジェネリック型 '{0}' には、{1} 個から {2} 個までの型引数が必要です。", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "ジェネリック型のインスタンス化は非常に深く、無限である可能性があります。", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "ゲッターおよびセッターでの表示が許可されていません。", "Global_module_exports_may_only_appear_at_top_level_1316": "グローバル モジュールのエクスポートは最上位レベルにのみ出現可能です。", "Global_module_exports_may_only_appear_in_declaration_files_1315": "グローバル モジュールのエクスポートは宣言ファイルにのみ出現可能です。", "Global_module_exports_may_only_appear_in_module_files_1314": "グローバル モジュールのエクスポートはモジュール ファイルにのみ出現可能です。", "Global_type_0_must_be_a_class_or_interface_type_2316": "グローバル型 '{0}' はクラス型またはインターフェイス型でなければなりません。", "Global_type_0_must_have_1_type_parameter_s_2317": "グローバル型 '{0}' には {1} 個の型パラメーターが必要です。", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "'--incremental' と '--watch' での再コンパイルは、ファイル内の変更がそのファイルに直接依存しているファイルにのみ影響することを想定しています。", "Hexadecimal_digit_expected_1125": "16 進の数字が必要です。", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "識別子が必要です。'{0}' は厳格モードの予約語です。", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "識別子が必要です。'{0}' は厳格モードの予約語です。クラス定義は自動的に厳格モードになります。", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "識別子が必要です。'{0}' は、厳格モードの予約語です。モジュールは自動的に厳格モードになります。", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "識別子が予期されていました。'{0}' は、ここでは使用できない予約語です。", "Identifier_expected_1003": "識別子が必要です。", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "識別子が必要です。'__esModule' は、ECMAScript モジュールを変換するときのエクスポート済みマーカーとして予約されています。", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "'{0}' パッケージが実際にこのモジュールを公開する場合は、pull request を送信して 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}' を修正することを検討してください。", "Ignore_this_error_message_90019": "このエラー メッセージを無視する", "Implement_all_inherited_abstract_classes_95040": "継承されたすべての抽象クラスを実装します", "Implement_all_unimplemented_interfaces_95032": "実装されていないすべてのインターフェイスを実装します", "Implement_inherited_abstract_class_90007": "継承抽象クラスを実装する", "Implement_interface_0_90006": "インターフェイス '{0}' を実装する", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "エクスポートされたクラス '{0}' の Implements 句がプライベート名 '{1}' を持っているか、使用しています。", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "'symbol ' から 'string' への暗黙の変換は、実行時に失敗します。この式を 'String(...)' でラップすることを検討してください。", "Import_0_from_module_1_90013": "モジュール \"{1}\" から '{0}' をインポートする", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "ECMAScript モジュールを対象にする場合は、インポート代入を使用できません。代わりに 'import * as ns from \"mod\"'、'import {a} from \"mod\"'、'import d from \"mod\"' などのモジュール書式の使用をご検討ください。", "Import_declaration_0_is_using_private_name_1_4000": "インポート宣言 '{0}' がプライベート名 '{1}' を使用しています。", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "インポート宣言が、'{0}' のローカル宣言と競合しています。", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "名前空間内のインポート宣言は、モジュールを参照できません。", + "Import_default_0_from_module_1_90032": "モジュール \"{1}\" から既定の '{0}' をインポートする", "Import_emit_helpers_from_tslib_6139": "生成ヘルパーを 'tslib' からインポートします。", "Import_may_be_converted_to_a_default_import_80003": "インポートは既定のインポートに変換される可能性があります。", "Import_name_cannot_be_0_2438": "インポート名を '{0}' にすることはできません。", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "インポートはモジュールの拡張では許可されていません。外側の外部モジュールに移動することを検討してください。", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "アンビエント列挙型の宣言では、メンバー初期化子は定数式である必要があります。", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "複数の宣言がある列挙型で、最初の列挙要素の初期化子を省略できる宣言は 1 つのみです。", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "'const' 列挙型の宣言で、メンバー初期化子は定数式でなければなりません。", "Include_modules_imported_with_json_extension_6197": "'.json' 拡張子付きのインポートされたモジュールを含める", "Index_signature_in_type_0_only_permits_reading_2542": "型 '{0}' のインデックス シグネチャは、読み取りのみを許可します。", "Index_signature_is_missing_in_type_0_2329": "型 '{0}' のインデックス シグネチャがありません。", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "マージされた宣言 '{0}' の個々の宣言はすべてエクスポートされるか、すべてローカルであるかのどちらかである必要があります。", "Infer_all_types_from_usage_95023": "使用法からすべての型を推論します", "Infer_parameter_types_from_usage_95012": "使用状況からパラメーターの型を推論する", + "Infer_this_type_of_0_from_usage_95080": "使い方から '{0}' の 'this' 型を推論する", "Infer_type_of_0_from_usage_95011": "使用状況から '{0}' の型を推論する", "Initialize_property_0_in_the_constructor_90020": "コンストラクターのプロパティ '{0}' を初期化する", "Initialize_static_property_0_90021": "静的プロパティ '{0}' を初期化する", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "JSDoc '...' は、シグネチャの最後のパラメーターにのみ使用できます。", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "JSDoc '@param' タグの名前は '{0}' ですが、その名前のパラメーターはありません。", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "JSDoc '@param' タグに名前 '{0}' が指定されていますが、その名前のパラメーターはありません。配列型があった場合は、'arguments' と一致したはずです。", + "JSDoc_type_0_circularly_references_itself_2587": "JSDoc 型 '{0}' は、それ自体を循環参照します。", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "JSDoc '@typedef' タグには、型の注釈を指定するか、後に '@property' タグや '@member' タグを付ける必要があります。", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "JSDoc の種類は、ドキュメント コメント内でのみ使用できます。", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "JSDoc の種類は TypeScript の種類に移行される可能性があります。", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "JSX 要素型 '{0}' にはコンストラクトも呼び出しシグネチャも含まれていません。", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "JSX 要素型 '{0}' は JSX 要素のコンストラクター関数ではありません。", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "JSX 要素に同じ名前の複数の属性を指定することはできません。", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "JSX 式では、コンマ演算子を使用できません。配列を作成するつもりでしたか?", "JSX_expressions_must_have_one_parent_element_2657": "JSX 式には 1 つの親要素が必要です。", "JSX_fragment_has_no_corresponding_closing_tag_17014": "JSX フラグメントには対応する終了タグがありません。", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "JSX フラグメントはインライン JSX ファクトリ pragma の使用時にサポートされていません", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "JSX スプレッドの子は、配列型でなければなりません。", "Jump_target_cannot_cross_function_boundary_1107": "ジャンプ先は関数の境界を越えることはできません。", "KIND_6034": "種類", + "Keywords_cannot_contain_escape_characters_1260": "キーワードにエスケープ文字を含めることはできません。", "LOCATION_6037": "場所", "Language_service_is_disabled_9004": "言語サービスが無効になっています。", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "コンマ演算子の左側が使用されていないため、副作用はありません。", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "'super()' 呼び出しをコンストラクター内の最初のステートメントにする", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "マップされたオブジェクト型のテンプレートの型は暗黙的に 'any' になります。", "Member_0_implicitly_has_an_1_type_7008": "メンバー '{0}' の型は暗黙的に '{1}' になります。", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "メンバー '{0}' の型は暗黙的に '{1}' になっていますが、使い方からより良い方を推論できます。", "Merge_conflict_marker_encountered_1185": "マージ競合マーカーが検出されました。", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "マージされた宣言 '{0}' に既定のエクスポート宣言を含めることはできません。代わりに、'export default {0}' 宣言を別個に追加することを検討してください。", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "メタプロパティ '{0}' は、関数の宣言の本文、関数の式、またはコンストラクターでのみ許可されています。", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "エクスポートされたインターフェイスのメソッド '{0}' が、プライベート モジュール '{2}' の名前 '{1}' を持っているか、使用しています。", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "エクスポートされたインターフェイスのメソッド '{0}' がプライベート名 '{1}' を持っているか、使用しています。", "Modifiers_cannot_appear_here_1184": "ここで修飾子を使用することはできません。", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "モジュール '{0}' は型を参照していませんが、ここでは型として使用されています。", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "モジュール '{0}' は、'{1}' フラグを使用して既定でのみインポートできます", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "モジュール '{0}' は '{1}' をローカルで宣言していますが、これは '{2}' としてエクスポートされています。", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "モジュール '{0}' は '{1}' をローカルで宣言していますが、これはエクスポートされていません。", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "モジュール '{0}' は型を参照していませんが、ここでは型として使用されています。'typeof import('{0}')' を意図していましたか?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "モジュール '{0}' は値を参照していませんが、ここでは値として使用されています。", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "モジュール {0} は既に '{1}' という名前のメンバーをエクスポートしています。あいまいさを解決するため、明示的にもう一度エクスポートすることを検討してください。", "Module_0_has_no_default_export_1192": "モジュール '{0}' に既定エクスポートがありません。", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "モジュール '{0}' には既定のエクスポートがありません。'import { {1} } from {0}' を使用するつもりでしたか?", "Module_0_has_no_exported_member_1_2305": "モジュール '{0}' にエクスポートされたメンバー '{1}' がありません。", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "モジュール '{0}' にエクスポートされたメンバー '{1}' が含まれていません。候補: '{2}'", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "モジュール '{0}' にはエクスポートされたメンバー '{1}' がありません。'import {1} from {0}' を使用するつもりでしたか?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "モジュール '{0}' は同じ名前のローカル宣言によって非表示になっています。", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "モジュール '{0}' はモジュール以外のエンティティに解決されるため、このコンストラクトを使用してインポートできません。", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "モジュール '{0}' には 'export =' が使用されているため、'export *' は併用できません。", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "このファイルが変更されなかったため、モジュール '{0}' は '{1}' で宣言されたアンビエント モジュールとして解決されました。", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "モジュール '{0}' は、ファイル '{1}' のローカルで宣言されたアンビエント モジュールとして解決されました。", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "モジュール '{0}' は '{1}' に解決されましたが、'--jsx' が設定されていません。", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "モジュール '{0}' は '{1}' に解決されましたが、'--resolveJsonModule' が使用されていません。", "Module_Resolution_Options_6174": "モジュール解決のオプション", "Module_name_0_matched_pattern_1_6092": "モジュール名 '{0}'、照合されたパターン '{1}'。", "Module_name_0_was_not_resolved_6090": "======== モジュール名 '{0}' が解決されませんでした。========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== モジュール名 '{0}' が正常に '{1}' に解決されました。========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== モジュール名 '{0}' が正常に '{1}' に解決されました (パッケージ ID '{2}')。========", "Module_resolution_kind_is_not_specified_using_0_6088": "モジュール解決の種類が '{0}' を使用して指定されていません。", "Module_resolution_using_rootDirs_has_failed_6111": "'rootDirs' を使用したモジュール解決が失敗しました。", "Move_to_a_new_file_95049": "新しいファイルへ移動します", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "'{1}' 型および '{2}' 型の名前付きプロパティ '{0}' が一致しません。", "Namespace_0_has_no_exported_member_1_2694": "名前空間 '{0}' にエクスポートされたメンバー '{1}' がありません。", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "指定した数の型引数を持つ基底コンストラクターは存在しません。", + "No_constituent_of_type_0_is_callable_2755": "型 '{0}' の構成要素は呼び出し可能ではありません。", + "No_constituent_of_type_0_is_constructable_2759": "型 '{0}' の構成要素はコンストラクト可能ではありません。", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "型 '{0}' のパラメーターを持つインデックス シグネチャが型 '{1}' に見つかりませんでした。", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "構成ファイル '{0}' で入力が見つかりませんでした。指定された 'include' パスは '{1}' で、'exclude' パスは '{2}' でした。", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "{0} 引数を予期するオーバーロードはありませんが、{1} または {2} 引数のいずれかを予期するオーバーロードは存在します。", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "{0} 型の引数を予期するオーバーロードはありませんが、{1} または {2} 型の引数のいずれかを予期するオーバーロードは存在します。", + "No_overload_matches_this_call_2769": "この呼び出しに一致するオーバーロードはありません。", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "短縮形のプロパティ '{0}' のスコープには値がありません。値を宣言するか、または初期化子を指定してください。", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "非抽象クラス '{0}' はクラス '{2}' からの継承抽象メンバー '{1}' を実装しません。", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "非抽象クラスの式はクラス '{1}' からの継承抽象メンバー '{0}' を実装しません。", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "non-null アサーションは、TypeScript ファイルでのみ使用できます。", + "Non_simple_parameter_declared_here_1348": "ここでは複雑なパラメーターが宣言されています。", "Not_all_code_paths_return_a_value_7030": "一部のコード パスは値を返しません。", + "Not_all_constituents_of_type_0_are_callable_2756": "型 '{0}' のすべての構成要素が呼び出し可能なわけではありません。", + "Not_all_constituents_of_type_0_are_constructable_2760": "型 '{0}' のすべての構成要素がコンストラクト可能なわけではありません。", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "数値インデックス型 '{0}' を文字列インデックス型 '{1}' に割り当てることはできません。", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "絶対値が 2^53 以上の数値リテラルは大きすぎるため、整数として正確に表現できません。", "Numeric_separators_are_not_allowed_here_6188": "数値の区切り記号は、ここでは使用できません。", "Object_is_of_type_unknown_2571": "オブジェクト型は 'unknown' です。", "Object_is_possibly_null_2531": "オブジェクトは 'null' である可能性があります。", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "8 進数のリテラルは、列挙型メンバーの初期化子では許可されていません。構文 '{0}' を使用してください。", "Octal_literals_are_not_allowed_in_strict_mode_1121": "厳格モードでは Octal リテラルは使用できません。", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "ECMAScript 5 以降を対象にする場合、8 進数のリテラルは使用できません。構文 '{0}' を使用してください。", + "Only_ECMAScript_imports_may_use_import_type_1370": "'import type' を使用できるのは、ECMAScript のインポートのみです。", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "'for...in' ステートメントで使用できる変数宣言は 1 つのみです。", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "'for...of' ステートメントで使用できる変数宣言は 1 つのみです。", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "'new' キーワードを指定して呼び出せるのは void 関数のみです。", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "'.d.ts' 宣言ファイルのみを生成します。", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "クラス 'extends' 句で現在サポートされているのは、オプションの型引数が指定された ID/完全修飾名のみです。", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "'super' キーワードを使用してアクセスできるのは、基底クラスのパブリック メソッドと保護されたメソッドのみです。", + "Operator_0_cannot_be_applied_to_type_1_2736": "演算子 '{0}' は型 '{1}' に適用できません。", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "演算子 '{0}' を型 '{1}' および '{2}' に適用することはできません。", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "オプション '{0}' は 'tsconfig.json' ファイルにのみ指定できます。", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "オプション '{0} を使用できるのは、オプション '--inlineSourceMap' またはオプション '--sourceMap' のいずれかを指定した場合のみです。", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "オプション 'target' が 'ES3' の場合、オプション '{0}' を指定することはできません。", "Option_0_cannot_be_specified_with_option_1_5053": "オプション '{0}' をオプション '{1}' とともに指定することはできません。", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "オプション '{1}' を指定せずに、オプション '{0}' を指定することはできません。", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "オプション '{1}' またはオプション '{2}' を指定せずに、オプション '{0}' を指定することはできません。", "Option_0_should_have_array_of_strings_as_a_value_6103": "オプション '{0}' には、値として文字列の配列を指定する必要があります。", "Option_build_must_be_the_first_command_line_argument_6369": "オプション '--build' は最初のコマンド ライン引数である必要があります。", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "オプション '--incremental' は、tsconfig を使用して指定して単一ファイルに出力するか、オプション `--tsBuildInfoFile` が指定された場合にのみ指定することができます。", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "オプション 'isolatedModules' は、オプション '--module' が指定されているか、オプション 'target' が 'ES2015' 以上であるかのいずれかの場合でのみ使用できます。", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "オプション 'paths' は、'--baseUrl' オプションを指定せずに使用できません。", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "オプション 'project' をコマンド ライン上でソース ファイルと一緒に指定することはできません。", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "オプション '--resolveJsonModule' は、モジュール コードの生成が 'commonjs'、'amd'、'es2015'、'esNext' である場合にのみ指定できます。", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "'node' モジュールの解決方法を使用せずにオプション '--resolveJsonModule' を指定することはできません。", "Options_0_and_1_cannot_be_combined_6370": "オプション '{0}' と '{1}' を組み合わせることはできません。", "Options_Colon_6027": "オプション:", "Output_directory_for_generated_declaration_files_6166": "生成された宣言ファイルの出力ディレクトリ。", "Output_file_0_from_project_1_does_not_exist_6309": "プロジェクト '{1}' からの出力ファイル '{0}' がありません", "Output_file_0_has_not_been_built_from_source_file_1_6305": "出力ファイル '{0}' はソース ファイル '{1}' からビルドされていません。", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "オーバーロード シグネチャは関数の実装に対応していません。", + "Overload_0_of_1_2_gave_the_following_error_2772": "{1} のうち {0}、'{2}' のオーバーロードにより、次のエラーが発生しました。", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "オーバーロードのシグネチャはすべてが抽象または非抽象である必要があります。", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "オーバーロードのシグネチャは、すべてアンビエントであるか、すべてアンビエントでないかのどちらかである必要があります。", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "オーバーロードのシグネチャはすべてがエクスポート済みであるか、またはエクスポート済みでない必要があります。", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "オーバーロードのシグネチャはすべて、public、private、または protected でなければなりません。", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "パラメーター '{0}' はその初期化子内では参照できません。", "Parameter_0_implicitly_has_an_1_type_7006": "パラメーター '{0}' の型は暗黙的に '{1}' になります。", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "パラメーター '{0}' の型は暗黙的に '{1}' になっていますが、使い方からより良い型を推論できます。", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "パラメーター '{0}' がパラメーター '{1}' と同じ位置にありません。", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "アクセサーのパラメーター '{0}' が外部モジュール '{2}' からの名前 '{1}' を持っているか使用していますが、名前を指定することはできません。", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "アクセサーのパラメーター '{0}' が、プライベート モジュール '{2}' からの名前 '{1}' を持っているか、使用しています。", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "アクセサーのパラメーター '{0}' がプライベート名 '{1}' を持っているか、使用しています。", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "エクスポートされたインターフェイスの呼び出しシグネチャのパラメーター '{0}' が、プライベート モジュール '{2}' の名前 '{1}' を持っているか、使用しています。", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "エクスポートされたインターフェイスの呼び出しシグネチャのパラメーター '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "エクスポートされたクラスのコンストラクターのパラメーター '{0}' が外部モジュール {2} の名前 '{1}' を持っているか使用していますが、名前を指定することはできません。", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "エクスポートされたクラスのパブリック静的メソッドのパラメーター '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", "Parameter_cannot_have_question_mark_and_initializer_1015": "パラメーターに疑問符および初期化子を指定することはできません。", "Parameter_declaration_expected_1138": "パラメーター宣言が必要です。", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "パラメーターに名前はありますが、型がありません。'{0}: {1}' を意図していましたか?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "パラメーター修飾子は TypeScript ファイルでのみ使用できます。", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "エクスポートされたクラスのパブリック セッター '{0}' のパラメーター型が、プライベート モジュール '{2}' の名前 '{1}' を持っているか、使用しています。", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "エクスポートされたクラスのパブリック セッター '{0}' のパラメーター型が、プライベート名 '{1}' を持っているか、使用しています。", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "エクスポートされたクラスのパブリック静的セッター '{0}' のパラメーター型が、プライベート モジュール '{2}' の名前 '{1}' を持っているか、使用しています。", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "厳格モードで解析してソース ファイルごとに \"use strict\" を生成します。", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "パターン '{0}' に使用できる '*' 文字は最大で 1 つです。", "Prefix_0_with_an_underscore_90025": "アンダースコアを含むプレフィックス '{0}'", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "すべての正しくないプロパティ宣言の前に 'declare' を付ける", "Prefix_all_unused_declarations_with_where_possible_95025": "可能な場合は、使用されていないすべての宣言にプレフィックスとして '_' を付けます", + "Prefix_with_declare_95094": "'declare' を前に付ける", "Print_names_of_files_part_of_the_compilation_6155": "コンパイルの一環としてファイルの名前を書き出します。", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "コンパイルの一部であるファイルの名前の表示を実行してから、処理を停止します。", "Print_names_of_generated_files_part_of_the_compilation_6154": "コンパイルの一環として生成されたファイル名を書き出します。", "Print_the_compiler_s_version_6019": "コンパイラのバージョンを表示します。", + "Print_the_final_configuration_instead_of_building_1350": "ビルドを実行するのではなく、最終的な構成を表示します。", "Print_this_message_6017": "このメッセージを表示します。", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "変数宣言では、private 識別子は許可されていません。", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "private 識別子は、クラス本体の外では許可されていません。", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "private 識別子は ECMAScript 2015 以上をターゲットにする場合にのみ使用できます。", + "Private_identifiers_cannot_be_used_as_parameters_18009": "private 識別子はパラメーターとして使用できません", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "private または protected メンバー '{0}' には、型パラメーターではアクセスできません。", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "プロジェクト '{0}' はその依存関係 '{1}' にエラーがあるためビルドできません", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "依存関係 '{1}' がビルドされていないため、プロジェクト '{0}' はビルドできません", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "プロジェクト '{0}' はその依存関係 '{1}' が古いため最新の状態ではありません", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "プロジェクト '{0}' は最も古い出力 '{1}' が最新の入力 '{2}' より古いため最新の状態ではありません", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "プロジェクト '{0}' は出力ファイル '{1}' が存在しないため最新の状態ではありません", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "プロジェクト '{0}' の出力が現在のバージョン '{2}' と異なるバージョン '{1}' で生成されているため、このプロジェクトは最新の状態ではありません", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "依存関係 '{1}' の出力が変更されているため、プロジェクト '{0}' は最新の状態ではありません", "Project_0_is_up_to_date_6361": "プロジェクト '{0}' は最新の状態です", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "プロジェクト '{0}' は最新の入力 '{1}' が最も古い出力 '{2}' より古いため最新の状態です", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "プロジェクト '{0}' はその依存関係からの .d.ts ファイルで最新の状態です", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "参照するプロジェクト", "Property_0_does_not_exist_on_const_enum_1_2479": "プロパティ '{0}' が 'const' 列挙型 '{1}' に存在しません。", "Property_0_does_not_exist_on_type_1_2339": "プロパティ '{0}' は型 '{1}' に存在しません。", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "型 '{1}' にプロパティ '{0}' は存在しません。'await' を使用していない可能性があります。", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "プロパティ '{0}' は型 '{1}' に存在していません。'{2}' ですか?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "プロパティ '{0}' には競合する宣言があり、型 '{1}' ではアクセスできません。", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "プロパティ '{0}' に初期化子がなく、コンストラクターで明確に割り当てられていません。", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "プロパティ '{0}' には型 'any' が暗黙的に設定されています。get アクセサーには戻り値の型の注釈がないためです。", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "プロパティ '{0}' には型 'any' が暗黙的に設定されています。set アクセサーにはパラメーター型の注釈がないためです。", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "プロパティ '{0}' の型は暗黙的に 'any' になっていますが、その get アクセサーのより良い型を使い方から推論できます。", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "プロパティ '{0}' の型は暗黙的に 'any' になっていますが、その set アクセサーのより良い型を使い方から推論できます。", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "型 '{1}' のプロパティ '{0}' を基本データ型 '{2}' の同じプロパティに割り当てることはできません。", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "型 '{1}' のプロパティ '{0}' を型 '{2}' に割り当てることはできません。", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "型 '{1}' のプロパティ '{0}' は、型 '{2}' 内からアクセスできない別のメンバーを参照しています。", + "Property_0_is_a_static_member_of_type_1_2576": "プロパティ '{0}' は型 '{1}' の静的メンバーです", "Property_0_is_declared_but_its_value_is_never_read_6138": "プロパティ '{0}' が宣言されていますが、その値が読み取られることはありません。", "Property_0_is_incompatible_with_index_signature_2530": "プロパティ '{0}' はインデックス シグネチャと互換性がありません。", + "Property_0_is_incompatible_with_rest_element_type_2573": "プロパティ '{0}' は rest 要素の型と互換性がありません。", "Property_0_is_missing_in_type_1_2324": "型 '{1}' にプロパティ '{0}' がありません。", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "プロパティ '{0}' は型 '{1}' にありませんが、型 '{2}' では必須です。", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "プロパティ '{0}' には private 識別子が指定されているため、クラス '{1}' の外部ではアクセスできません。", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "プロパティ '{0}' は型 '{1}' では省略可能ですが、型 '{2}' では必須です。", "Property_0_is_private_and_only_accessible_within_class_1_2341": "プロパティ '{0}' はプライベートで、クラス '{1}' 内でのみアクセスできます。", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "プロパティ '{0}' は型 '{1}' ではプライベートですが、型 '{2}' ではプライベートではありません。", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "プロパティ '{0}' は保護されていますが、型 '{1}' は '{2}' から派生したクラスではありません。", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "プロパティ '{0}' は型 '{1}' では保護されていますが、型 '{2}' ではパブリックです。", "Property_0_is_used_before_being_assigned_2565": "プロパティ '{0}' は割り当てられる前に使用されています。", + "Property_0_is_used_before_its_initialization_2729": "プロパティ '{0}' が初期化前に使用されています。", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "JSX のスプレッド属性のプロパティ '{0}' をターゲット プロパティに割り当てることはできません。", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "エクスポートされたクラスの式のプロパティ '{0}' が private または protected でない可能性があります。", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "エクスポートされたインターフェイスのプロパティ '{0}' が、プライベート モジュール '{2}' の名前 '{1}' を持っているか、使用しています。", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "エクスポートされたインターフェイスのプロパティ '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "型 '{1}' のプロパティ '{0}' を数値インデックス型 '{2}' に割り当てることはできません。", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "型 '{1}' のプロパティ '{0}' を文字列インデックス型 '{2}' に割り当てることはできません。", + "Property_0_was_also_declared_here_2733": "ここではプロパティ '{0}' も宣言されています。", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "プロパティ '{0}' は、'{1}' の基底プロパティを上書きします。これが意図的である場合は初期化子を追加してください。そうでなければ、'declare' 修飾子を追加するか、冗長な宣言を削除してください。", "Property_assignment_expected_1136": "プロパティの代入が必要です。", "Property_destructuring_pattern_expected_1180": "プロパティの非構造化パターンが必要です。", "Property_or_signature_expected_1131": "プロパティまたはシグネチャが必要です。", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "エクスポートされたクラスのパブリック静的プロパティ '{0}' が外部モジュール {2} の名前 '{1}' を持っているか使用していますが、名前を指定することはできません。", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "エクスポートされたクラスのパブリック静的プロパティ '{0}' が、プライベート モジュール '{2}' の名前 '{1}' を持っているか、使用しています。", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "エクスポートされたクラスのパブリック静的プロパティ '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "先頭に '@param {object} {1}' がない場合、修飾名 '{0}' は許可されません。", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "暗黙的な 'any' 型を含む式と宣言に関するエラーを発生させます。", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "暗黙的な 'any' 型を持つ 'this' 式でエラーが発生します。", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "'--IsolatedModules' フラグが指定されている場合に型を再エクスポートするには、 'export type' を使用する必要があります。", "Redirect_output_structure_to_the_directory_6006": "ディレクトリへ出力構造をリダイレクトします。", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "参照されているプロジェクト '{0}' には、設定 \"composite\": true が必要です。", + "Remove_all_unnecessary_uses_of_await_95087": "不要な 'await' の使用をすべて削除する", "Remove_all_unreachable_code_95051": "到達できないコードをすべて削除します", "Remove_all_unused_labels_95054": "すべての未使用のラベルを削除します", "Remove_braces_from_arrow_function_95060": "アロー関数から中かっこを削除します", - "Remove_declaration_for_Colon_0_90004": "次に対する宣言を削除する: '{0}'", "Remove_destructuring_90009": "非構造化を削除します", "Remove_import_from_0_90005": "'{0}' からのインポートを削除", + "Remove_template_tag_90011": "テンプレート タグを削除する", + "Remove_type_parameters_90012": "型パラメーターを削除する", + "Remove_unnecessary_await_95086": "不要な 'await' を削除する", "Remove_unreachable_code_95050": "到達できないコードを削除します", + "Remove_unused_declaration_for_Colon_0_90004": "'{0}' に対する使用されていない宣言を削除する", "Remove_unused_label_95053": "未使用のラベルを削除します", "Remove_variable_statement_90010": "変数のステートメントを削除します", + "Replace_all_unused_infer_with_unknown_90031": "未使用の 'infer' をすべて 'unknown' に置き換える", "Replace_import_with_0_95015": "インポートを '{0}' に置換します。", + "Replace_infer_0_with_unknown_90030": "'infer {0}' を 'unknown' に置き換える", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "関数の一部のコード パスが値を返さない場合にエラーを報告します。", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "switch ステートメントに case のフォールスルーがある場合にエラーを報告します。", "Report_errors_in_js_files_8019": ".js ファイルのエラーを報告します。", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "プライマリ検索パスを使用して解決しています...", "Resolving_with_primary_search_path_0_6121": "プライマリ検索パス '{0}' で解決しています。", "Rest_parameter_0_implicitly_has_an_any_type_7019": "Rest パラメーター '{0}' の型は暗黙的に 'any[]' になります。", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "rest パラメーター '{0}' の型は暗黙的に 'any[]' 型になっていますが、使い方からより良い型を推論できます。", + "Rest_signatures_are_incompatible_2572": "rest シグネチャには互換性がありません。", "Rest_types_may_only_be_created_from_object_types_2700": "rest 型はオブジェクトの種類からのみ作成できます。", + "Return_type_annotation_circularly_references_itself_2577": "戻り値の型の注釈は、それ自身を循環参照します。", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "エクスポートされたインターフェイスの呼び出しシグネチャの戻り値の型が、プライベート モジュール '{1}' の名前 '{0}' を持っているか、使用しています。", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "エクスポートされたインターフェイスの呼び出しシグネチャの戻り値の型が、プライベート名 '{0}' を持っているか、使用しています。", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "エクスポートされたインターフェイスのコンストラクター シグネチャの戻り値の型が、プライベート モジュール '{1}' の名前 '{0}' を持っているか、使用しています。", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "ルート ディレクトリを決定できません。プライマリ検索パスをスキップします。", "STRATEGY_6039": "戦略", "Scoped_package_detected_looking_in_0_6182": "'{0}' 内を検索して、スコープ パッケージが検出されました", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "構成ファイルの 'module' オプションを '{0}' に設定する", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "構成ファイルの 'target' オプションを '{0}' に設定する", "Setters_cannot_return_a_value_2408": "セッターは値を返せません。", "Show_all_compiler_options_6169": "コンパイラ オプションをすべて表示します。", "Show_diagnostic_information_6149": "診断情報を表示します。", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "シグネチャ '{0}' は型の述語である必要があります。", "Skip_type_checking_of_declaration_files_6012": "宣言ファイルの型チェックをスキップします。", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "プロジェクト '{0}' のビルドは、その依存関係 '{1}' にエラーがあるため、スキップしています", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "一部のプロジェクトが見つからなかったためクリーンをスキップしています", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "依存関係 '{1}' がビルドされていないため、プロジェクト '{0}' のビルドをスキップしています", "Source_Map_Options_6175": "ソース マップ オプション", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "特殊化されたオーバーロード シグネチャは、特殊化されていないシグネチャに割り当てることはできません。", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "動的インポートの指定子にはスプレッド要素を指定できません。", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "ECMAScript のターゲット バージョンを指定します: 'ES3' (既定)、'ES5'、'ES2015'、'ES2016'、'ES2017'、'ES2018'、'ESNEXT'。", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "ECMAScript のターゲット バージョンを指定します。'ES3' (既定値)、'ES5'、'ES2015'、'ES2016'、'ES2017'、'ES2018'、'ES2019'、'ES2020'、'ESNEXT'", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "JSX コード生成を指定します: 'preserve'、'react-native'、'react'。", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "型にのみ使用されるインポートの生成または確認動作を指定する", + "Specify_file_to_store_incremental_compilation_information_6380": "増分コンパイル情報を格納するファイルを指定する", "Specify_library_files_to_be_included_in_the_compilation_6079": "コンパイルに含めるライブラリ ファイルを指定します。", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "モジュール コード生成を指定します: 'none'、'commonjs'、'amd'、'system'、'umd'、'es2015'、'ESNext'。", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "モジュール コードの生成を指定します。'none'、'commonjs'、'amd'、'system'、'umd'、'es2015'、'es2020、'ESNext'。", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "モジュールの解決方法を指定します: 'node' (Node.js) または 'classic' (TypeScript pre-1.6)。", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "ファイル システムのイベントを使用して作成できなかった場合に、ポーリング監視を作成する方法を指定します。'FixedInterval' (既定)、'PriorityInterval'、'DynamicPriority'。", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "再帰的な監視をサポートしていないプラットフォーム上のディレクトリを監視する方法を指定します。'UseFsEvents' (既定)、'FixedPollingInterval'、'DynamicPriorityPolling'。", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "ファイルの監視方法を指定します。'FixedPollingInterval' (既定)、'PriorityPollingInterval'、'DynamicPriorityPolling'、'UseFsEvents'、'UseFsEventsOnParentDirectory'。", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "'react' JSX 発行 ('React.createElement' や 'h') などを対象とするときに使用する JSX ファクトリ関数を指定します。", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "ファイルの生成時に使用する行シーケンスの末尾を指定します: 'CRLF' (dos) または 'LF' (unix)。", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "デバッガーがソースの場所の代わりに TypeScript ファイルを検索する必要のある場所を指定します。", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "デバッガーが、生成された場所の代わりにマップ ファイルを検索する必要のある場所を指定します。", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "入力ファイルのルート ディレクトリを指定します。--outDir とともに、出力ディレクトリ構造の制御に使用します。", + "Split_all_invalid_type_only_imports_1367": "無効な型のみのインポートをすべて分割する", + "Split_into_two_separate_import_declarations_1366": "2 つの別個のインポート宣言に分割する", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "'new' 式のスプレッド演算子は ECMAScript 5 以上をターゲットにする場合にのみ使用できます。", "Spread_types_may_only_be_created_from_object_types_2698": "spread 型はオブジェクトの種類からのみ作成できます。", "Starting_compilation_in_watch_mode_6031": "ウォッチ モードでのコンパイルを開始しています...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "後続のプロパティ宣言は同じ型でなければなりません。プロパティ '{0}' の型は '{1}' である必要がありますが、ここでは型が '{2}' になっています。", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "後続の変数宣言は同じ型でなければなりません。変数 '{0}' の型は '{1}' である必要がありますが、'{2}' になっています。", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "パターン '{1}' の代入 '{0}' の型が正しくありません。必要な型は 'string' ですが、'{2}' を取得しました。", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "パターン '{1}' の代入 '{0}' に使用できる '*' 文字は最大 1 つです。", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "パターン '{1}' の置換 '{0}' に使用できる '*' 文字は 1 文字だけです。", "Substitutions_for_pattern_0_should_be_an_array_5063": "パターン '{0}' への代入は配列でなければなりません。", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "パターン '{0}' への代入を空の配列にすることはできません。", "Successfully_created_a_tsconfig_json_file_6071": "tsconfig.json ファイルが正常に作成されました。", @@ -840,78 +1033,121 @@ "Suppress_excess_property_checks_for_object_literals_6072": "オブジェクト リテラルの過剰なプロパティ確認を抑制します。", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "インデックス シグニチャのないオブジェクトにインデックスを作成するため、noImplicitAny エラーを抑制します。", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "'Symbol' 参照は、グローバル シンボル コンストラクター オブジェクトを参照しません。", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "再帰的な監視をネイティブでサポートしていないプラットフォーム上で、同期的にコールバックを呼び出してディレクトリ監視の状態を更新します。", "Syntax_Colon_0_6023": "構文: {0}", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "タグ付きテンプレート式は、省略可能なチェーンでは許可されていません。", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "'{0}' 修飾子は TypeScript ファイルでのみ使用できます。", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "'{0}' 演算子を 'symbol' 型に適用することはできません。", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "'{0}' 演算子はブール型には使用できません。代わりに '{1}' を使用してください。", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "非同期反復子の '{0}' プロパティはメソッドである必要があります。", + "The_0_property_of_an_iterator_must_be_a_method_2767": "反復子の '{0}' プロパティはメソッドである必要があります。", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "'Object' 型を割り当てることができるその他の型はごく少数です。代わりの候補には 'any' 型があります。", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "'arguments' オブジェクトは、ES3 および ES5 のアロー関数で参照することはできません。標準の関数式の使用を考慮してください。", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "'arguments' オブジェクトは、ES3 および ES5 の非同期関数またはメソッドで参照することはできません。標準の関数またはメソッドを使用することを検討してください。", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "'if' ステートメントの本文を空のステートメントにすることはできません。", "The_character_set_of_the_input_files_6163": "入力ファイルの文字セット。", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "含まれているアロー関数は、'this' のグローバル値をキャプチャします。", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "含まれている関数またはモジュールの本体は、制御フロー解析には大きすぎます。", "The_current_host_does_not_support_the_0_option_5001": "現在のホストは '{0}' オプションをサポートしていません。", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "使用するつもりだったと思われる '{0}' の宣言はここで定義されています", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "予期された型は、型 '{1}' に対してここで宣言されたプロパティ '{0}' から取得されています", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "予期された型は、このシグネチャの戻り値の型に基づいています。", + "The_expected_type_comes_from_this_index_signature_6501": "予期された型は、このインデックス シグネチャに基づいています。", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "エクスポートの代入の式は、環境コンテキストの識別子または修飾名にする必要があります。", "The_files_list_in_config_file_0_is_empty_18002": "構成ファイル '{0}' の 'files' リストが空です。", + "The_first_export_default_is_here_2752": "最初のエクスポートの既定値はここにあります。", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "Promise では、'then' メソッドの最初のパラメーターはコールバックでなければなりません。", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "グローバル型 'JSX.{0}' には複数のプロパティが含まれていない可能性があります。", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "'Import.meta' メタ プロパティでは、'target' および 'module' コンパイラ オプションに対して 'ESNext' のみが許可されています。", + "The_implementation_signature_is_declared_here_2750": "実装シグネチャはここで宣言されています。", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "'import.meta' メタプロパティは、'--module' オプションが 'esnext' または 'system' の場合にのみ許可されます。", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "'{0}' の推論された型には、'{1}' への参照なしで名前を付けることはできません。これは、移植性がない可能性があります。型の注釈が必要です。", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "'{0}' の推定型はアクセス不可能な '{1}' 型を参照します。型の注釈が必要です。", + "The_last_overload_gave_the_following_error_2770": "前回のオーバーロードにより、次のエラーが発生しました。", + "The_last_overload_is_declared_here_2771": "前回のオーバーロードはここで宣言されています。", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "'for...in' ステートメントの左側を非構造化パターンにすることはできません。", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "'for...in' ステートメントの左側で型の注釈を使用することはできません。", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "'for...in' ステートメントの左辺には、省略可能なプロパティ アクセスを指定できません。", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "'for...in' ステートメントの左側は、変数またはプロパティ アクセスである必要があります。", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "'for...in' ステートメントの左側の型は 'string' または 'any' でなければなりません。", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "'for...of' ステートメントの左側で型の注釈を使用することはできません。", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "'for...of' ステートメントの左辺には、省略可能なプロパティ アクセスを指定できません。", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "'for...of' ステートメントの左側は、変数またはプロパティ アクセスである必要があります。", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "算術演算の左辺には、'any' 型、'number' 型、または列挙型を指定してください。", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "算術演算の左辺には、'any' 型、'number' 型、'bigint' 型または列挙型を指定する必要があります。", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "代入式の左辺には、省略可能なプロパティ アクセスを指定できません。", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "代入式の左側は、変数またはプロパティ アクセスである必要があります。", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "'in' 式の左辺の型は 'any'、'string'、'number'、または 'symbol' でなければなりません。", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "'instanceof' 式の左辺には、'any' 型、オブジェクト型、または型パラメーターを指定してください。", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "ユーザーにメッセージを表示するときに使用するロケール (例: 'en-us')", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "node_modules の下を検索して JavaScript ファイルを読み込む依存関係の最大深度です。", - "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "delete 演算子のオペランドを読み取り専用のプロパティにすることはできません。", - "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "delete 演算子のオペランドはプロパティ参照でなければなりません。", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "'delete' 演算子のオペランドには、private 識別子を指定できません。", + "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "'delete' 演算子のオペランドには、読み取り専用のプロパティを指定できません。", + "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "'delete' 演算子のオペランドはプロパティ参照である必要があります。", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "インクリメント演算子またはデクリメント演算子のオペランドには、省略可能なプロパティ アクセスを指定することはできません。", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "インクリメントまたはデクリメント演算子のオペランドは、変数またはプロパティ アクセスである必要があります。", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "パーサーは、'{' トークンに一致する '}' を予期していました。", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "同じスペルの別の private 識別子によってシャドウされているため、このクラス内の型 '{1}' ではプロパティ '{0}' にアクセスできません。", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "JSX 要素コンストラクターの戻り値の型は、オブジェクト型を返す必要があります。", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "パラメーター デコレーター関数の戻り値の型は、'void' か 'any' である必要があります。", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "プロパティ デコレーター関数の戻り値の型は、'void' か 'any' である必要があります。", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "非同期関数の戻り値の型は、有効な Promise であるか、呼び出し可能な 'then' メンバーを含んでいないかのどちらかであることが必要です。", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "非同期関数または非同期メソッドの戻り値の型は、グローバル Promise 型である必要があります。", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "'for...in' ステートメントの右側には、'any' 型、オブジェクト型、型パラメーターを指定する必要がありますが、ここでは型 '{0}' が指定されています。", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "算術演算の右辺には、'any' 型、'number' 型、または列挙型を指定してください。", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "算術演算の右辺には、'any' 型、'number' 型、'bigint' 型または列挙型を指定する必要があります。", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "'in' 式の右辺は、'any' 型、オブジェクト型、型パラメーターでなければなりません。", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "instanceof' 式の右辺には、'any' 型、または 'Function' インターフェイス型に割り当てることができる型を指定してください。", + "The_shadowing_declaration_of_0_is_defined_here_18017": "'{0}' のシャドウ宣言はここで定義されています", "The_specified_path_does_not_exist_Colon_0_5058": "指定されたパスがありません: '{0}'。", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "代入式のターゲットは、変数またはプロパティ アクセスである必要があります。", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "オブジェクト rest の代入先を、省略可能なプロパティ アクセスにすることはできません。", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "オブジェクトの残り部分の代入の対象は、変数またはプロパティ アクセスである必要があります。", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "型 '{0}' の 'this' コンテキストを型 '{1}' のメソッドの 'this' に割り当てることはできません。", "The_this_types_of_each_signature_are_incompatible_2685": "各シグネチャの 'this' 型に互換性がありません。", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "型 '{0}' は 'readonly' であるため、変更可能な型 '{1}' に代入することはできません。", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "型パラメーター '{0}' の型引数を使用法から推論することはできません。型引数を明示的に指定してください。", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "非同期反復子の 'next()' メソッドから返される型は、'value' プロパティを持つ型の Promise でなければなりません。", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "反復子の 'next()' メソッドによって返される型には 'value' プロパティが必要です。", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "関数宣言の型は、関数のシグネチャと一致する必要があります。", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "非同期反復子の '{0}()' メソッドによって返される型は、'value' プロパティを持つ型に対する promise である必要があります。", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "反復子の '{0}()' メソッドによって返される型には 'value' プロパティが必要です。", + "The_types_of_0_are_incompatible_between_these_types_2200": "'{0}' の型は、これらの型同士で互換性がありません。", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "'{0}' によって返された型は、これらの型同士で互換性がありません。", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "'for...in' ステートメントの変数宣言に初期化子を指定することはできません。", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "'for...of' ステートメントの変数宣言に初期化子を指定することはできません。", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "'with' ステートメントはサポートされていません。'with' ブロック内のすべてのシンボルの型は 'any' になります。", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "この JSX タグの '{0}' prop は型 '{1}' の単一の子を予期しますが、複数の子が指定されました。", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "この JSX タグの '{0}' prop は複数の子を必要とする型 '{1}' を予期しますが、単一の子が指定されました。", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "型 '{1}' と '{2}' には重複がないため、この条件は常に '{0}' を返します。", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "関数は常に定義されているため、この条件は常に true を返します。これを呼び出すことを意図していましたか?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "このコンストラクター関数はクラス宣言に変換される可能性があります。", + "This_expression_is_not_callable_2349": "この式は呼び出し可能ではありません。", + "This_expression_is_not_constructable_2351": "この式はコンストラクト可能ではありません。", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "このインポートは値として使用されることはありません。'importsNotUsedAsValues' が 'error' に設定されているため、'import type' を使用する必要があります。", + "This_may_be_converted_to_an_async_function_80006": "これは非同期関数に変換できます。", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "このモジュールは、'{0}' フラグをオンにして既定のエクスポートを参照することにより、ECMAScript のインポートまたはエクスポートのみを使用して参照できます。", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "このモジュールは 'export =' を使用して宣言されていて、'{0}' フラグを使用する場合は既定のインポートでのみ使用できます。", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "このオーバーロード シグネチャには、実装シグネチャとの互換性はありません。", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "このパラメーターは、'use strict' ディレクティブと共に使用することはできません。", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "この構文にはインポートされたヘルパーが必要ですが、モジュール '{0}' が見つかりません。", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "この構文には '{1}' という名前のインポートされたヘルパーが必要ですが、モジュール '{0}' にエクスポートされたメンバー '{1}' がありません。", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "この構文には、'{1}' という名前のインポートされたヘルパーが必要ですが、'{0}' には存在しません。'{0}' のバージョンのアップグレードを検討してください。", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "トップレベルの 'await' 式は、'module' オプションが 'esnext' または 'system' に設定されていて、'target' オプションが 'es2017' 以上に設定されている場合にのみ使用できます。", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": ".d.ts ファイルのトップレベルの宣言は、'declare' または 'export' 修飾子で始める必要があります。", "Trailing_comma_not_allowed_1009": "末尾にコンマは使用できません。", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "個々のモジュールとして各ファイルをトランスパイルします ('ts.transpileModule' に類似)。", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "`npm install @types/{0}` を試すか (存在する場合)、`declare module '{0}';` を含む新しい宣言 (.d.ts) ファイルを追加してください", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "存在する場合は `npm install @types/{1}` を試してください。または、`declare module '{0}';` を含む新しい宣言 (.d.ts) ファイルを追加します。", "Trying_other_entries_in_rootDirs_6110": "'rootDirs' の他のエントリを試しています。", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "代入 '{0}' を試しています。候補のモジュールの場所: '{1}'。", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "長さが '{1}' のタプル型 '{0}' を長さが '{2}' のタプルに割り当てることはできません。", - "Type_0_cannot_be_converted_to_type_1_2352": "型 '{0}' を型 '{1}' に変換できません。", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "長さ '{1}' のタプル型 '{0}' にインデックス '{2}' の要素がありません。", + "Tuple_type_arguments_circularly_reference_themselves_4110": "タプル型の引数は、それ自体を循環参照します。", "Type_0_cannot_be_used_as_an_index_type_2538": "型 '{0}' はインデックスの型として使用できません。", "Type_0_cannot_be_used_to_index_type_1_2536": "型 '{0}' はインデックスの種類 '{1}' に使用できません。", "Type_0_does_not_satisfy_the_constraint_1_2344": "型 '{0}' は制約 '{1}' を満たしていません。", + "Type_0_has_no_call_signatures_2757": "型 '{0}' には呼び出しシグネチャがありません。", + "Type_0_has_no_construct_signatures_2761": "型 '{0}' にはコンストラクト シグネチャがありません。", "Type_0_has_no_matching_index_signature_for_type_1_2537": "型 '{0}' には型 '{1}' と一致するインデックス シグネチャがありません。", "Type_0_has_no_properties_in_common_with_type_1_2559": "型 '{0}' には型 '{1}' と共通のプロパティがありません。", - "Type_0_has_no_property_1_2460": "型 '{0}' にプロパティ '{1}' がありません。", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "型 '{0}' にプロパティ '{1}' および string インデックス シグネチャがありません。", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "型 '{0}' には 型 '{1}': {2} からの次のプロパティがありません", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "型 '{0}' には 型 '{1}': {2}、{3} などからの次のプロパティがありません", "Type_0_is_not_a_constructor_function_type_2507": "型 '{0}' はコンストラクター関数型ではありません。", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "型 '{0}' は Promise と互換性のあるコンストラクター値を参照しないため、ES5/ES3 において有効な非同期関数の戻り値の型ではありません。", "Type_0_is_not_an_array_type_2461": "型 '{0}' は配列型ではありません。", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "型 '{0}' は配列型ではありません。反復子の反復を許可するには、コンパイラ オプション '--downlevelIteration' を使用します。", "Type_0_is_not_an_array_type_or_a_string_type_2495": "型 '{0}' は配列型でも文字列型でもありません。", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "型 '{0}' は配列型でも文字列型でもありません。反復子の反復を許可するには、コンパイラ オプション '--downlevelIteration' を使用します。", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "型 '{0}' は、配列型でも文字列型でもないか、反復子を返す '[Symbol.iterator]()' メソッドを持っていません。", @@ -926,17 +1162,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "型 '{0}' が、基本型としてそれ自体を再帰的に参照しています。", "Type_alias_0_circularly_references_itself_2456": "型のエイリアス '{0}' が自身を循環参照しています。", "Type_alias_name_cannot_be_0_2457": "型のエイリアス名を '{0}' にすることはできません。", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "型のエイリアスは、TypeScript ファイルでのみ使用できます。", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "型の注釈はコンストラクター宣言では使用できません。", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "型の注釈は、TypeScript ファイルでのみ使用できます。", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "型引数の候補 '{1}' は、候補 '{0}' のスーパータイプではないため、有効な型引数ではありません。", "Type_argument_expected_1140": "型引数が必要です。", "Type_argument_list_cannot_be_empty_1099": "型引数リストを空にすることはできません。", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "型引数は TypeScript ファイルでのみ使用できます。", "Type_arguments_cannot_be_used_here_1342": "ここで型引数は使用できません。", + "Type_arguments_for_0_circularly_reference_themselves_4109": "'{0}' の型引数はそれ自体を循環参照します。", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "型アサーション式は TypeScript ファイルでのみ使用できます。", "Type_declaration_files_to_be_included_in_compilation_6124": "コンパイルに含む型宣言ファイル。", "Type_expected_1110": "型が必要です。", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "型のインスタンス化は非常に深く、無限である可能性があります。", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "型は、それ自身の 'then' メソッドのフルフィルメント コールバック内で直接または間接的に参照されます。", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "'await' オペランドの型は、有効な Promise であるか、呼び出し可能な 'then' メンバーを含んでいないかのどちらかであることが必要です。", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "計算されたプロパティの値の型は '{0}' です。これは、型 '{1}' に代入することはできません。", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "'yield*' オペランドの反復要素の型は、有効な Promise であるか、呼び出し可能な 'then' メンバーを含んでいないかのどちらかであることが必要です。", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "非同期ジェネレーター内の 'yield' オペランドの型は、有効な Promise であるか、呼び出し可能な 'then' メンバーを含んでいないかのどちらかであることが必要です。", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "型はこのインポートから生成されます。名前空間スタイルのインポートは、呼び出すこともコンストラクトすることもできず、実行時にエラーが発生します。代わりに、既定のインポートまたはインポートの要求を使用することを検討してください。", "Type_parameter_0_has_a_circular_constraint_2313": "型パラメーター '{0}' に循環制約があります。", "Type_parameter_0_has_a_circular_default_2716": "型パラメーター '{0}' に循環既定値があります。", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "エクスポートされたインターフェイスの呼び出しシグネチャの型パラメーター '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", @@ -944,17 +1188,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "エクスポートされたクラスの型パラメーター '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "エクスポートされた関数の型パラメーター '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "エクスポートされたインターフェイスの型パラメーター '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "エクスポートされたマップ済みのオブジェクト型の型パラメーター '{0}' が、プライベート名 '{1}' を使用しています。", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "エクスポートした型のエイリアスの型パラメーター '{0}' にプライベート名 '{1}' が指定されているか、これを使用しています。", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "エクスポートされたインターフェイスのメソッドの型パラメーター '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "エクスポートされたクラスのパブリック メソッドの型パラメーター '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "エクスポートされたクラスのパブリック静的メソッドの型パラメーター '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", "Type_parameter_declaration_expected_1139": "型パラメーターの宣言が必要です。", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "型パラメーターの宣言は TypeScript ファイルでのみ使用できます。", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "型パラメーターの既定値は、以前に宣言された型パラメーターのみを参照できます。", "Type_parameter_list_cannot_be_empty_1098": "型パラメーター リストを空にすることはできません。", "Type_parameter_name_cannot_be_0_2368": "型パラメーター名を '{0}' にすることはできません。", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "型パラメーターはコンストラクター宣言では使用できません。", "Type_predicate_0_is_not_assignable_to_1_1226": "型の述語 '{0}' を '{1}' に割り当てることはできません。", "Type_reference_directive_0_was_not_resolved_6120": "======== 型参照ディレクティブ '{0}' が解決されませんでした。========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== 型参照ディレクティブ '{0}' が正常に '{1}' に解決されました。プライマリ: {2}。========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== 型参照ディレクティブ '{0}' が正常に '{1}' に解決されました (パッケージ ID '{2}'、プライマリ: {3})。========", "Types_have_separate_declarations_of_a_private_property_0_2442": "複数の型に、プライベート プロパティ '{0}' の異なる宣言が含まれています。", "Types_of_parameters_0_and_1_are_incompatible_2328": "パラメーター '{0}' および '{1}' は型に互換性がありません。", "Types_of_property_0_are_incompatible_2326": "プロパティ '{0}' の型に互換性がありません。", @@ -967,10 +1215,18 @@ "Unexpected_token_1012": "予期しないトークンです。", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "予期しないトークンです。コンストラクター、メソッド、アクセサー、またはプロパティが必要です。", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "予期しないトークンです。型パラメーター名には、中かっこを含めることはできません。", + "Unexpected_token_Did_you_mean_or_gt_1382": "予期しないトークンです。`{'>'}` または `>` を意図していましたか?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "予期しないトークンです。`{'}'}` または `}` を意図していましたか?", "Unexpected_token_expected_1179": "予期しないトークンです。'{' が必要です。", + "Unknown_build_option_0_5072": "'{0}' は不明なビルド オプションです。", + "Unknown_build_option_0_Did_you_mean_1_5077": "'{0}' は不明なビルド オプションです。'{1}' を意図していましたか?", "Unknown_compiler_option_0_5023": "コンパイラ オプション '{0}' が不明です。", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "'{0}' は不明なコンパイラ オプションです。'{1}' を意図していましたか?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "不明なオプション 'excludes' です。'exclude' ですか?", "Unknown_type_acquisition_option_0_17010": "不明な型の取得オプション '{0}'。", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "'{0}' は不明な型の取得オプションです。'{1}' を意図していましたか?", + "Unknown_watch_option_0_5078": "'{0}' は不明な監視オプションです。", + "Unknown_watch_option_0_Did_you_mean_1_5079": "'{0}' は不明な監視オプションです。'{1}' を意図していましたか?", "Unreachable_code_detected_7027": "到達できないコードが検出されました。", "Unsupported_locale_0_6049": "ロケール '{0}' はサポートされていません。", "Unterminated_Unicode_escape_sequence_1199": "未終了の Unicode エスケープ シーケンスです。", @@ -980,34 +1236,52 @@ "Unterminated_template_literal_1160": "未終了のテンプレート リテラルです。", "Untyped_function_calls_may_not_accept_type_arguments_2347": "型指定のない関数の呼び出しで型引数を使用することはできません。", "Unused_label_7028": "未使用のラベル。", + "Updating_output_of_project_0_6373": "プロジェクト '{0}' の出力を更新しています...", "Updating_output_timestamps_of_project_0_6359": "プロジェクト '{0}' の出力タイムスタンプを更新しています...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "プロジェクト '{0}' の変更されていない出力タイムスタンプを更新しています...", "Use_synthetic_default_member_95016": "合成 'default' メンバーを使用します。", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "'for...of' ステートメントでの文字列の使用は ECMAScript 5 以上でのみサポートされています。", + "Using_compiler_options_of_project_reference_redirect_0_6215": "プロジェクト参照リダイレクト '{0}' のコンパイラ オプションを使用します。", "VERSION_6036": "バージョン", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "型 '{0}' の値には、型 '{1}' と共通のプロパティがありません。呼び出しますか?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "型 '{0}' の値は呼び出せません。'new' を含めますか?", "Variable_0_implicitly_has_an_1_type_7005": "変数 '{0}' の型は暗黙的に '{1}' になります。", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "変数 '{0}' の型は暗黙的に '{1}' になっていますが、使い方からより良い型を推論できます。", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "場所によっては、変数 '{0}' の型に '{1}' が暗黙的に指定されていますが、使い方からより良い型を推論できます。", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "変数 '{0}' は、型を決定できない一部の場所では、暗黙のうちに '{1}' 型になります。", "Variable_0_is_used_before_being_assigned_2454": "変数 '{0}' は割り当てられる前に使用されています。", "Variable_declaration_expected_1134": "変数の宣言が必要です。", "Variable_declaration_list_cannot_be_empty_1123": "変数宣言リストを空にすることはできません。", "Version_0_6029": "バージョン {0}", "Watch_input_files_6005": "入力ファイルを監視します。", + "Watch_option_0_requires_a_value_of_type_1_5080": "監視オプション '{0}' には型 {1} の値が必要です。", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "画面をクリアする代わりに、古くなったコンソール出力をウォッチ モードで保持するかどうか。", + "Wrap_invalid_character_in_an_expression_container_95101": "式のコンテナー内の無効な文字をラップする", + "You_cannot_rename_a_module_via_a_global_import_8031": "グローバル インポートを使用してモジュールの名前を変更することはできません。", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "標準の TypeScript ライブラリで定義された要素の名前を変更することはできません。", "You_cannot_rename_this_element_8000": "この要素の名前を変更することはできません。", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "'{0}' は受け入れる引数が少なすぎるので、ここでデコレーターとして使用することができません。最初にこれを呼び出してから、'@{0}()' を書き込むつもりでしたか?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "'{0}' および '{1}' 演算をかっこなしで混在させることはできません。", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "'{0}' は 2 回指定されています。'{0}' という名前の属性は上書きされます。", - "_0_can_only_be_used_in_a_ts_file_8009": "'{0}' を使用できるのは .ts ファイル内のみです。", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "'export type' を使用してエクスポートされたため、'{0}' は値として使用できません。", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "'import type' を使用してインポートされたため、'{0}' は値として使用できません。", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "'{0}' コンポーネントには、テキストを子要素として指定できません。JSX のテキストには 'string' 型が含まれていますが、'{1}' の予期された型は '{2}' です。", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "'{0}' 宣言は TypeScript ファイルでのみ使用できます。", "_0_expected_1005": "'{0}' が必要です。", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "'{0}' の戻り値の型は暗黙的に '{1}' になっていますが、使い方からより良い型を推論できます。", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "'{0}' は、戻り値の型の注釈がなく、いずれかの return 式で直接的にまたは間接的に参照されているため、戻り値の型は暗黙的に 'any' になります。", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "'{0}' には型の注釈がなく、直接または間接的に初期化子で参照されているため、暗黙的に 'any' 型が含まれています。", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "'{0}' はプリミティブですが、'{1}' はラッパー オブジェクトです。できれば '{0}' をご使用ください。", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "'{0}' は型 '{1}' の制約に代入できますが、'{1}' は制約 '{2}' の別のサブタイプでインスタンス化できることがあります。", "_0_is_declared_but_its_value_is_never_read_6133": "'{0}' が宣言されていますが、その値が読み取られることはありません。", "_0_is_declared_but_never_used_6196": "'{0}' は宣言されましたが使用されませんでした。", + "_0_is_declared_here_2728": "'{0}' はここで宣言されています。", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "'{0}' はクラス '{1}' でプロパティとして定義されていますが、ここでは '{2}' でアクセサーとしてオーバーライドされています。", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "'{0}' はクラス '{1}' でアクセサーとして定義されていますが、ここではインスタンス プロパティとして '{2}' でオーバーライドされています。", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}' はキーワード '{1}' に関するメタプロパティとして無効です。候補: '{2}'。", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' はそれ自身のベース式内で直接または間接的に参照されます。", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' はそれ自身の型の注釈内で直接または間接的に参照されます。", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}' が複数回指定されているため、ここでの使用は上書きされます。", "_0_list_cannot_be_empty_1097": "'{0}' のリストを空にすることはできません。", "_0_modifier_already_seen_1030": "'{0}' 修飾子は既に存在します。", "_0_modifier_cannot_appear_on_a_class_element_1031": "'{0}' 修飾子はクラス要素では使用できません。", @@ -1021,17 +1295,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "'{0}' 修飾子は環境コンテキストでは使用できません。", "_0_modifier_cannot_be_used_with_1_modifier_1243": "'{0}' 修飾子と '{1}' 修飾子は同時に使用できません。", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "'{0}' 修飾子とクラス宣言は同時に使用できません。", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "'{0}' 修飾子を private 識別子とともに使用することはできません", "_0_modifier_must_precede_1_modifier_1029": "'{0}' 修飾子は '{1}' 修飾子の前に指定する必要があります。", + "_0_needs_an_explicit_type_annotation_2782": "'{0}' には、明示的な型の注釈が必要です。", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "'{0}' は型のみを参照しますが、ここで名前空間として使用されています。", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "'{0}' は型のみを参照しますが、ここで値として使用されています。", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "'{0}' は型のみを参照しますが、ここでは値として使用されています。ターゲット ライブラリを変更しますか? `lib` コンパイラ オプションを es2015 以降に変更してみてください。", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "'{0}' は UMD グローバルを参照していますが、現在のファイルはモジュールです。代わりにインポートを追加することを考慮してください。", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "'{0}' は値を参照しますが、ここでは型として使用されています。", "_0_tag_already_specified_1223": "'{0}' タグは既に指定されています。", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "'{0}' タグはトップ レベルの JSDoc タグとして個別に使用することはできません。", + "_0_was_also_declared_here_6203": "ここでは '{0}' も宣言されました。", + "_0_was_exported_here_1377": "ここでは '{0} ' がエクスポートされました。", + "_0_was_imported_here_1376": "ここでは '{0}' がインポートされました。", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "'{0}' には戻り値の型の注釈がないため、戻り値の型は暗黙的に '{1}' になります。", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "'{0}' には戻り値の型の注釈がないため、yield 型は暗黙的に '{1}' になります。", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "'abstract' 修飾子は、クラス宣言、メソッド宣言、またはプロパティ宣言のみに使用できます。", - "await_expression_is_only_allowed_within_an_async_function_1308": "'await' 式は、非同期関数内でのみ使用できます。", + "and_here_6204": "およびここで。", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "ファイルがモジュールの場合、'await' 式はそのファイルのトップ レベルでのみ使用できますが、このファイルにはインポートもエクスポートも含まれていません。空の 'export {}' を追加して、このファイルをモジュールにすることを検討してください。", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "'await' 式は、非同期関数内と、モジュールのトップ レベルでのみ許可されます。", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "'await' 式は、パラメーター初期化子では使用できません。", + "await_has_no_effect_on_the_type_of_this_expression_80007": "'await' は、この式の型に対しては効果がありません。", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "'baseUrl' オプションは '{0}' に設定され、この値を使用して非相対モジュール名 '{1}' を解決します。", + "can_only_be_used_at_the_start_of_a_file_18026": "'#!' は、ファイルの先頭でのみ使用できます。", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "'=' は、非構造化代入内のオブジェクト リテラル プロパティでのみ使用できます。", "case_or_default_expected_1130": "'case' または 'default' が必要です。", "class_expressions_are_not_currently_supported_9003": "'class' 式は現在サポートされていません。", @@ -1039,11 +1325,12 @@ "const_declarations_must_be_initialized_1155": "'const' 宣言は初期化する必要があります。", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "'const' 列挙型メンバーの初期化子が、無限値に評価されました。", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "'const' 列挙型メンバーの初期化子が、許可されない値 'NaN' に評価されました。", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "定数列挙型メンバーの初期化子には、リテラル値および他の計算された列挙型の値のみを含めることができます。", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "'const' 列挙型は、プロパティまたはインデックスのアクセス式、インポート宣言またはエクスポートの代入の右辺、型のクエリにのみ使用できます。", + "constructor_is_a_reserved_word_18012": "'#constructor' は予約語です。", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "厳格モードでは 'delete' を識別子で呼び出すことはできません。", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "これを削除します - プロジェクト '{0}' は、以前にビルドされているため、最新の状態です", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "'列挙型宣言' を使用できるのは .ts ファイル内のみです。", - "export_can_only_be_used_in_a_ts_file_8003": "'export=' を使用できるのは .ts ファイル内のみです。", + "export_can_only_be_used_in_TypeScript_files_8003": "'export =' は、TypeScript ファイルでのみ使用できます。", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "環境モジュールとモジュール拡張は常に表示されるので、これらに 'export' 修飾子を適用することはできません。", "extends_clause_already_seen_1172": "'extends' 句は既に存在します。", "extends_clause_must_precede_implements_clause_1173": "extends' 句は 'implements' 句の前に指定しなければなりません。", @@ -1053,23 +1340,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "'get' アクセサーおよび 'set' アクセサーには、同じ 'this' 型が必要です。", "get_and_set_accessor_must_have_the_same_type_2380": "'get' アクセサーと 'set' アクセサーは同じ型でなければなりません。", "implements_clause_already_seen_1175": "'implements' 句は既に存在します。", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "'implements 句' を使用できるのは .ts ファイル内のみです。", - "import_can_only_be_used_in_a_ts_file_8002": "'import ... =' を使用できるのは .ts ファイル内のみです。", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "'implements' 句は、TypeScript ファイルでのみ使用できます。", + "import_can_only_be_used_in_TypeScript_files_8002": "'import ... =' は、TypeScript ファイルでのみ使用できます。", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "'infer' 宣言は、条件付き型の 'extends' 句でのみ許可されます。", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "'インターフェイス宣言' を使用できるのは .ts ファイル内のみです。", "let_declarations_can_only_be_declared_inside_a_block_1157": "'let' 宣言は、ブロック内でのみ宣言できます。", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "'let' は、'let' 宣言または 'const' 宣言で名前として使用することはできません。", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "'モジュール宣言' を使用できるのは .ts ファイル内のみです。", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "'new T[]' は配列の作成に使用できません。代わりに 'new Array()' を使用してください。", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "ターゲットにコンストラクト シグネチャがない 'new' 式の型は、暗黙的に 'any' になります。", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "'null 以外のアサーション' を使用できるのは .ts ファイル内のみです。", "options_6024": "オプション", "or_expected_1144": "'{' または ';' が必要です。", "package_json_does_not_have_a_0_field_6100": "'package.json' に '{0}' フィールドがありません。", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "'package.json' には、バージョン '{0}' と一致する 'typesVersions' エントリがありません。", + "package_json_had_a_falsy_0_field_6220": "'package.json' には、false に評価される '{0}' フィールドが含まれています。", "package_json_has_0_field_1_that_references_2_6101": "'package.json' に '{2}' を参照する '{0}' フィールド '{1}' があります。", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "'パラメーター修飾子' を使用できるのは .ts ファイル内のみです。", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "'package.json' には、有効な semver の範囲ではない 'typesVersions' エントリ '{0}' が含まれています。", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "'package.json' には、コンパイラ バージョン '{1}' に一致する 'typesVersions' エントリ '{0}' が含まれていて、モジュール名 '{2}' に一致するパターンを探しています。", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "'package.json' には、バージョン固有のパス マッピングを含む 'typesVersions' フィールドが含まれています。", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "'paths' オプションが指定され、モジュール名 '{0}' と一致するパターンを検索します。", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "'readonly' 修飾子はプロパティ宣言またはインデックス シグネチャのみに使用できます。", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "'readonly' 型の修飾子は、配列およびタプル リテラル型でのみ使用できます。", "require_call_may_be_converted_to_an_import_80005": "'require' の呼び出しはインポートに変換される可能性があります。", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "'rootDirs' オプションが設定され、このオプションを使用して相対モジュール名 '{0}' を解決します。", "super_can_only_be_referenced_in_a_derived_class_2335": "'super' は、派生クラスでのみ参照できます。", @@ -1077,6 +1365,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "'super' は、計算されたプロパティ名では参照できません。", "super_cannot_be_referenced_in_constructor_arguments_2336": "'super' はコンストラクター引数では参照できません。", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "オプション 'target' が 'ES2015' 以降の場合、'super' はオブジェクトのリテラル式のメンバーでのみ使用できます。", + "super_may_not_use_type_arguments_2754": "'super' では型引数を使用できません。", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "派生クラスのコンストラクター内の 'super' のプロパティにアクセスする前に、'super' を呼び出す必要があります。", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "派生クラスのコンストラクター内の 'this' にアクセスする前に、'super' を呼び出す必要があります。", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "'super' の後には、引数リストまたはメンバー アクセスが必要です。", @@ -1087,14 +1376,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "'this' はコンストラクター引数では参照できません。", "this_cannot_be_referenced_in_current_location_2332": "'this' は現在の場所では参照できません。", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "'this' は型として注釈を持たないため、暗黙的に型 'any' になります。", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "'型のエイリアス' を使用できるのは .ts ファイル内のみです。", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "'型引数' を使用できるのは .ts ファイル内のみです。", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "'型アサーション式' を使用できるのは、.ts ファイル内のみです。", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "'型パラメーター宣言' を使用できるのは .ts ファイル内のみです。", - "types_can_only_be_used_in_a_ts_file_8010": "'型' を使用できるのは .ts ファイル内のみです。", "unique_symbol_types_are_not_allowed_here_1335": "'unique symbol' 型はここでは許可されていません。", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "'unique symbol' 型は変数ステートメントの変数でのみ許可されています。", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "'unique symbol' 型は、バインディング名を持つ変数の宣言では使用できません。", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "'use strict' ディレクティブは、複雑なパラメーター リストでは使用できません。", + "use_strict_directive_used_here_1349": "'use strict' ディレクティブがここで使用されています。", "with_statements_are_not_allowed_in_an_async_function_block_1300": "'with' 式は、非同期関数ブロックでは使用できません。", "with_statements_are_not_allowed_in_strict_mode_1101": "厳格モードでは 'with' ステートメントは使用できません。", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "'yield' 式は、パラメーター初期化子では使用できません。" diff --git a/lib/ko/diagnosticMessages.generated.json b/lib/ko/diagnosticMessages.generated.json index fb77b68ac6785..39ebe4b8f2ad9 100644 --- a/lib/ko/diagnosticMessages.generated.json +++ b/lib/ko/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "'{0}' 한정자는 가져오기 선언에서 사용할 수 없습니다.", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "'{0}' 한정자는 인터페이스 선언에서 사용할 수 없습니다.", "A_0_parameter_must_be_the_first_parameter_2680": "'{0}' 매개 변수는 첫 번째 매개 변수여야 합니다.", + "A_bigint_literal_cannot_use_exponential_notation_1352": "bigint 리터럴에는 지수 표기법을 사용할 수 없습니다.", + "A_bigint_literal_must_be_an_integer_1353": "bigint 리터럴은 정수여야 합니다.", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "바인딩 패턴 매개 변수는 구현 서명에서 선택 사항이 될 수 없습니다.", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "'break' 문은 이 문을 둘러싼 반복문 또는 switch 문 내에서만 사용할 수 있습니다.", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "'break' 문은 이 문을 둘러싼 문의 레이블로만 이동할 수 있습니다.", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "클래스는 선택적 형식 인수가 포함된 식별자/정규화된 이름만 구현할 수 있습니다.", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "클래스는 개체 형식 또는 정적으로 알려진 멤버가 포함된 개체 형식의 교집합만 구현할 수 있습니다.", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "'default' 한정자를 사용하지 않는 클래스 선언에는 이름이 있어야 합니다.", "A_class_may_only_extend_another_class_2311": "클래스는 다른 클래스만 확장할 수 있습니다.", - "A_class_may_only_implement_another_class_or_interface_2422": "클래스는 다른 클래스나 인터페이스만 구현할 수 있습니다.", "A_class_member_cannot_have_the_0_keyword_1248": "클래스 멤버에는 '{0}' 키워드를 사용할 수 없습니다.", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "쉼표 식은 컴퓨팅된 속성 이름에 사용할 수 없습니다.", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "계산된 속성 이름에서는 포함하는 형식의 형식 매개 변수를 참조할 수 없습니다.", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "인터페이스의 계산된 속성 이름은 형식이 리터럴 형식이거나 'unique symbol' 형식인 식을 참조해야 합니다.", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "계산된 속성 이름은 'string', 'number', 'symbol' 또는 'any' 형식이어야 합니다.", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "'{0}' 양식의 계산된 속성 이름은 'symbol' 형식이어야 합니다.", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "'const' 어설션은 열거형 멤버나 문자열, 숫자, 부울, 배열 또는 개체 리터럴에 대한 참조에만 적용할 수 있습니다.", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "const 열거형 멤버는 문자열 리터럴을 통해서만 액세스할 수 있습니다.", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "앰비언트 컨텍스트의 'const' 이니셜라이저는 문자열 또는 숫자 리터럴이어야 합니다.", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "앰비언트 컨텍스트의 'const' 이니셜라이저는 문자열, 숫자 리터럴 또는 리터럴 열거형 참조여야 합니다.", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "생성자는 해당 클래스가 'null'을 확장하는 경우 'super' 호출을 포함할 수 없습니다.", "A_constructor_cannot_have_a_this_parameter_2681": "생성자에는 'this' 매개 변수를 사용할 수 없습니다.", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "'continue' 문은 이 문을 둘러싼 반복문 내에서만 사용할 수 있습니다.", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "'continue' 문은 이 문을 둘러싼 반복문의 레이블로만 이동할 수 있습니다.", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "'declare' 한정자는 이미 존재하는 앰비언트 컨텍스트에서 사용할 수 없습니다.", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": "'declare' 한정자는 .d.ts 파일의 최상위 선언에 필요합니다.", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "데코레이터는 오버로드가 아니라 메서드 구현만 데코레이팅할 수 있습니다.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "'default' 절은 'switch' 문에 두 번 이상 나올 수 없습니다.", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "기본 내보내기는 ECMAScript 스타일 모듈에서만 사용할 수 있습니다.", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "생성기에는 'void' 형식 주석을 사용할 수 없습니다.", "A_get_accessor_cannot_have_parameters_1054": "'get' 접근자에는 매개 변수를 사용할 수 없습니다.", "A_get_accessor_must_return_a_value_2378": "'get' 접근자는 값을 반환해야 합니다.", + "A_label_is_not_allowed_here_1344": "'여기서는 레이블을 사용할 수 없습니다.", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "열거형 선언의 멤버 이니셜라이저는 그 뒤에 선언된 멤버와 다른 열거형에 정의된 멤버를 참조할 수 없습니다.", + "A_method_cannot_be_named_with_a_private_identifier_18022": "프라이빗 식별자를 사용하여 메서드 이름을 지정할 수 없습니다.", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "mixin 클래스에는 'any[]' 형식의 rest 매개 변수 하나를 사용하는 생성자가 있어야 합니다.", "A_module_cannot_have_multiple_default_exports_2528": "모듈에는 기본 내보내기가 여러 개 있을 수 없습니다.", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "네임스페이스 선언은 해당 선언이 병합된 클래스나 함수와 다른 파일에 있을 수 없습니다,", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "네임스페이스 선언은 해당 선언이 병합된 클래스나 함수 앞에 있을 수 없습니다.", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "네임스페이스 선언은 네임스페이스 또는 모듈에서만 사용할 수 있습니다.", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "네임스페이스 스타일 가져오기를 호출하거나 생성할 수 없으며 런타임 시 오류가 발생합니다.", "A_non_dry_build_would_build_project_0_6357": "-dry가 아닌 빌드는 프로젝트 '{0}'을(를) 빌드합니다.", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "-dry가 아닌 빌드는 다음 파일을 삭제합니다. {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "DRY가 아닌 빌드는 '{0}' 프로젝트의 출력을 업데이트합니다.", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "DRY가 아닌 빌드는 '{0}' 프로젝트의 출력 타임스탬프를 업데이트합니다.", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "매개 변수 이니셜라이저는 함수 또는 생성자 구현에서만 허용됩니다.", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "rest 매개 변수를 사용하여 매개 변수 속성을 선언할 수 없습니다.", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "매개 변수 속성은 생성자 구현에서만 허용됩니다.", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "프라미스에는 'then' 메서드가 있어야 합니다.", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "형식이 'unique symbol' 형식인 클래스의 속성은 'static'과 'readonly' 둘 다여야 합니다.", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "형식이 'unique symbol' 형식인 인터페이스 또는 형식 리터럴의 속성은 'readonly'여야 합니다.", + "A_required_element_cannot_follow_an_optional_element_1257": "필수 요소는 선택적 요소 뒤에 올 수 없습니다.", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "필수 매개 변수는 선택적 매개 변수 뒤에 올 수 없습니다.", "A_rest_element_cannot_contain_a_binding_pattern_2501": "rest 요소에는 바인딩 패턴이 포함될 수 없습니다.", "A_rest_element_cannot_have_a_property_name_2566": "rest 요소에는 속성 이름을 사용할 수 없습니다.", "A_rest_element_cannot_have_an_initializer_1186": "rest 요소에는 이니셜라이저를 사용할 수 없습니다.", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "rest 요소는 배열 구조 파괴 패턴의 마지막 요소여야 합니다.", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "rest 요소는 튜플 형식의 마지막 요소여야 합니다.", + "A_rest_element_type_must_be_an_array_type_2574": "rest 요소 형식은 배열 형식이어야 합니다.", "A_rest_parameter_cannot_be_optional_1047": "rest 매개 변수는 선택 사항이 될 수 없습니다.", "A_rest_parameter_cannot_have_an_initializer_1048": "rest 매개 변수에는 이니셜라이저를 사용할 수 없습니다.", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "rest 매개 변수는 매개 변수 목록 마지막에 있어야 합니다.", @@ -77,13 +85,13 @@ "A_set_accessor_must_have_exactly_one_parameter_1049": "'set' 접근자에는 매개 변수를 하나만 사용해야 합니다.", "A_set_accessor_parameter_cannot_have_an_initializer_1052": "'set' 접근자 매개 변수에는 이니셜라이저를 사용할 수 없습니다.", "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381": "구현이 있는 서명에는 문자열 리터럴 형식을 사용할 수 없습니다.", - "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "클래스에 초기화된 속성이 있거나 매개 변수 속성이 있으면 'super' 호출이 생성자에서 첫 번째 문이어야 합니다.", + "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "클래스에 초기화된 속성, 매개 변수 속성 또는 프라이빗 식별자가 있으면 'super' 호출이 생성자에서 첫 번째 문이어야 합니다.", "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "'this' 기반 형식 가드는 매개 변수 기반 형식 가드와 호환되지 않습니다.", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "'this' 형식은 클래스 또는 인터페이스의 비정적 멤버에서만 사용할 수 있습니다.", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "'tsconfig.json' 파일이 이미 '{0}'에 정의되어 있습니다.", - "A_tuple_type_element_list_cannot_be_empty_1122": "튜플 형식 요소 목록은 비워 둘 수 없습니다.", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "지수 식의 왼쪽에는 type assertion expression을 사용할 수 없습니다. 식을 괄호로 묶는 것이 좋습니다.", "A_type_literal_property_cannot_have_an_initializer_1247": "형식 리터럴 속성에는 이니셜라이저를 사용할 수 없습니다.", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "형식 전용 가져오기는 기본 가져오기 또는 명명된 바인딩을 지정할 수 있지만, 둘 다 지정할 수는 없습니다.", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "형식 조건자는 rest 매개 변수를 참조할 수 없습니다.", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "형식 조건자는 바인딩 패턴에서 '{0}' 요소를 참조할 수 없습니다.", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "형식 조건자는 함수 및 메서드의 반환 형식 위치에서만 사용할 수 있습니다.", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "\"{1}\"에서 기존 가져오기 선언에 '{0}' 추가", "Add_0_to_unresolved_variable_90008": "확인되지 않은 변수에 '{0}.' 추가", "Add_all_missing_async_modifiers_95041": "누락된 모든 'async' 한정자 추가", + "Add_all_missing_imports_95064": "누락된 모든 가져오기 추가", "Add_all_missing_members_95022": "누락된 모든 멤버 추가", "Add_all_missing_super_calls_95039": "누락된 모든 super 호출 추가", "Add_async_modifier_to_containing_function_90029": "포함된 함수에 async 한정자 추가", + "Add_await_95083": "'await' 추가", + "Add_await_to_initializer_for_0_95084": "'{0}'의 이니셜라이저에 'await' 추가", + "Add_await_to_initializers_95089": "이니셜라이저에 'await' 추가", "Add_braces_to_arrow_function_95059": "화살표 함수에 중괄호 추가", + "Add_const_to_all_unresolved_variables_95082": "확인되지 않은 모든 변수에 'const' 추가", + "Add_const_to_unresolved_variable_95081": "확인되지 않은 변수에 'const' 추가", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "\"{1}\"에서 기존 가져오기 선언으로 기본 '{0}' 가져오기 추가", "Add_definite_assignment_assertion_to_property_0_95020": "'{0}' 속성에 한정된 할당 어설션 추가", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "초기화되지 않은 모든 속성에 한정된 할당 어설션 추가", + "Add_export_to_make_this_file_into_a_module_95097": "'export {}'를 추가하여 이 파일을 모듈로 만들기", "Add_index_signature_for_property_0_90017": "'{0}' 속성에 대해 인덱스 시그니처 추가", "Add_initializer_to_property_0_95019": "'{0}' 속성에 이니셜라이저 추가", "Add_initializers_to_all_uninitialized_properties_95027": "초기화되지 않은 모든 속성에 이니셜라이저 추가", + "Add_missing_enum_member_0_95063": "누락된 열거형 멤버 '{0}' 추가", + "Add_missing_new_operator_to_all_calls_95072": "모든 호출에 누락된 'new' 연산자 추가", + "Add_missing_new_operator_to_call_95071": "호출에 누락된 'new' 연산자 추가", "Add_missing_super_call_90001": "누락된 'super()' 호출 추가", "Add_missing_typeof_95052": "누락된 'typeof' 추가", + "Add_names_to_all_parameters_without_names_95073": "이름이 없는 모든 매개 변수에 이름 추가", "Add_or_remove_braces_in_an_arrow_function_95058": "화살표 함수에 중괄호 추가 또는 제거", + "Add_parameter_name_90034": "매개 변수 이름 추가", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "멤버 이름과 일치하는 모든 확인되지 않은 변수에 한정자 추가", "Add_to_all_uncalled_decorators_95044": "호출되지 않는 모든 데코레이터에 '()' 추가", "Add_ts_ignore_to_all_error_messages_95042": "모든 오류 메시지에 '@ts-ignore' 추가", "Add_undefined_type_to_all_uninitialized_properties_95029": "초기화되지 않은 모든 속성에 정의되지 않은 형식 추가", "Add_undefined_type_to_property_0_95018": "'{0}' 속성에 '정의되지 않은' 형식 추가", + "Add_unknown_conversion_for_non_overlapping_types_95069": "겹치지 않는 형식에 대해 'unknown' 변환 추가", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "겹치지 않는 형식의 모든 변환에 'unknown' 추가", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "tsconfig.json 파일을 추가하면 TypeScript 파일과 JavaScript 파일이 둘 다 포함된 프로젝트를 정리하는 데 도움이 됩니다. 자세한 내용은 https://aka.ms/tsconfig를 참조하세요.", "Additional_Checks_6176": "추가 검사", "Advanced_Options_6178": "고급 옵션", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "'{0}'의 모든 선언에는 동일한 형식 매개 변수가 있어야 합니다.", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "추상 메서드의 모든 선언은 연속적이어야 합니다.", "All_destructured_elements_are_unused_6198": "구조 파괴된 요소가 모두 사용되지 않습니다.", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "'--isolatedModules' 플래그가 제공된 경우 모든 파일이 모듈이어야 합니다.", "All_imports_in_import_declaration_are_unused_6192": "가져오기 선언의 모든 가져오기가 사용되지 않습니다.", + "All_type_parameters_are_unused_6205": "모든 형식 매개 변수가 사용되지 않습니다.", "All_variables_are_unused_6199": "모든 변수가 사용되지 않습니다.", + "Allow_accessing_UMD_globals_from_modules_95076": "모듈에서 UMD 전역에 대한 액세스를 허용합니다.", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "기본 내보내기가 없는 모듈에서 기본 가져오기를 허용합니다. 여기서는 코드 내보내기에는 영향을 주지 않고 형식 검사만 합니다.", "Allow_javascript_files_to_be_compiled_6102": "Javascript 파일을 컴파일하도록 허용합니다.", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "'--isolatedModules' 플래그가 제공된 경우 앰비언트 const 열거형이 허용되지 않습니다.", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "이미 포함된 '{0}' 파일 이름은 '{1}' 파일 이름과 대/소문자만 다릅니다.", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "앰비언트 모듈 선언은 상대적 모듈 이름을 지정할 수 없습니다.", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "앰비언트 모듈은 다른 모듈 또는 네임스페이스에 중첩될 수 없습니다.", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "AMD 모듈에는 여러 이름이 할당될 수 없습니다.", "An_abstract_accessor_cannot_have_an_implementation_1318": "추상 접근자는 구현이 있을 수 없습니다.", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "접근자는 앰비언트 컨텍스트에서 선언될 수 없습니다.", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "접근성 한정자는 프라이빗 식별자와 함께 사용할 수 없습니다.", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "프라이빗 식별자를 사용하여 접근자 이름을 지정할 수 없습니다.", "An_accessor_cannot_have_type_parameters_1094": "접근자에는 형식 매개 변수를 사용할 수 없습니다.", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "앰비언트 모듈 선언은 파일의 최상위에서만 사용할 수 있습니다.", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "산술 피연산자는 'any', 'number' 또는 열거형 형식이어야 합니다.", + "An_argument_for_0_was_not_provided_6210": "'{0}'의 인수가 제공되지 않았습니다.", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "이 바인딩 패턴과 일치하는 인수가 제공되지 않았습니다.", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "산술 피연산자는 'any', 'number', 'bigint' 또는 열거형 형식이어야 합니다.", + "An_arrow_function_cannot_have_a_this_parameter_2730": "화살표 함수에는 'this' 매개 변수를 사용할 수 없습니다.", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "ES5/ES3의 비동기 함수 또는 메서드에 'Promise' 생성자가 필요합니다. 'Promise' 생성자에 대한 선언이 있거나 `--lib` 옵션에 'ES2015'가 포함되었는지 확인하세요.", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "비동기 함수 또는 메서드에는 유효한 대기 가능 반환 형식이 있어야 합니다.", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "비동기 함수 또는 메서드는 'Promise'를 반환해야 합니다. 'Promise'에 대한 선언이 있거나 `--lib` 옵션에 'ES2015'가 포함되었는지 확인하세요.", "An_async_iterator_must_have_a_next_method_2519": "비동기 반복기에는 'next()' 메서드가 있어야 합니다.", "An_element_access_expression_should_take_an_argument_1011": "요소 액세스 식은 인수를 사용해야 합니다.", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "프라이빗 식별자를 사용하여 열거형 멤버 이름을 지정할 수 없습니다.", "An_enum_member_cannot_have_a_numeric_name_2452": "열거형 멤버는 숫자 이름을 가질 수 없습니다.", + "An_enum_member_name_must_be_followed_by_a_or_1357": "열거형 멤버 이름 뒤에는 ',', '=' 또는 '}'가 와야 합니다.", "An_export_assignment_can_only_be_used_in_a_module_1231": "내보내기 할당은 모듈에서만 사용할 수 있습니다.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "내보내기 할당은 다른 내보낸 요소가 있는 모듈에서 사용될 수 없습니다.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "내보내기 할당은 네임스페이스에서 사용될 수 없습니다.", "An_export_assignment_cannot_have_modifiers_1120": "내보내기 할당에는 한정자를 사용할 수 없습니다.", "An_export_declaration_can_only_be_used_in_a_module_1233": "내보내기 선언은 모듈에서만 사용할 수 있습니다.", "An_export_declaration_cannot_have_modifiers_1193": "내보내기 선언에는 한정자를 사용할 수 없습니다.", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "'void' 형식 식의 truthiness를 테스트할 수 없습니다.", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "확장된 유니코드 이스케이프 값은 0x0과 0x10FFFF(포함) 사이여야 합니다.", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "식별자 또는 키워드는 숫자 리터럴 바로 뒤에 올 수 없습니다.", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "앰비언트 컨텍스트에서는 구현을 선언할 수 없습니다.", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "가져오기 별칭은 '내보내기 형식'을 사용하여 내보낸 선언을 참조할 수 없습니다.", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "가져오기 별칭은 '가져오기 형식'을 사용하여 가져온 선언을 참조할 수 없습니다.", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "내보내기 선언은 네임스페이스 또는 모듈에서만 사용할 수 있습니다.", "An_import_declaration_cannot_have_modifiers_1191": "가져오기 선언에는 한정자를 사용할 수 없습니다.", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "가져오기 경로는 '{0}' 확장으로 끝날 수 없습니다. 대신 '{1}' 가져오기를 고려하세요.", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "인덱스 시그니처 매개 변수에는 형식 주석을 사용할 수 없습니다.", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "인덱스 시그니처 매개 변수 형식은 형식 별칭일 수 없습니다. 대신 '[{0}: {1}]: {2}'을(를) 작성하세요.", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "인덱스 시그니처 매개 변수 형식은 공용 구조체 형식일 수 없습니다. 대신 매핑된 개체 형식을 사용하세요.", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "인덱스 시그니처 매개 변수 형식은 'string' 또는 'number'여야 합니다.", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "인덱스 시그니처 매개 변수 형식은 'string' 또는 'number'여야 합니다.", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "인터페이스는 선택적 형식 인수가 포함된 식별자/정규화된 이름만 확장할 수 있습니다.", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "인터페이스는 클래스 또는 다른 인터페이스만 확장할 수 있습니다.", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "인터페이스는 개체 형식 또는 정적으로 알려진 멤버가 포함된 개체 형식의 교집합만 확장할 수 있습니다.", "An_interface_property_cannot_have_an_initializer_1246": "인터페이스 속성에는 이니셜라이저를 사용할 수 없습니다.", "An_iterator_must_have_a_next_method_2489": "반복기에는 'next()' 메서드가 있어야 합니다.", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "개체 리터럴에 이름이 같은 여러 개의 get/set 접근자를 사용할 수 없습니다.", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "strict 모드에서는 개체 리터럴에 이름이 같은 여러 개의 속성을 사용할 수 없습니다.", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "개체 리터럴에 이름이 같은 속성과 접근자를 사용할 수 없습니다.", "An_object_member_cannot_be_declared_optional_1162": "개체 멤버는 선택적으로 선언될 수 없습니다.", + "An_optional_chain_cannot_contain_private_identifiers_18030": "선택적 체인에는 프라이빗 식별자를 사용할 수 없습니다.", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "'this'의 외부 값은 이 컨테이너에서 섀도 처리됩니다.", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "오버로드 시그니처는 생성기로 선언할 수 없습니다.", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "지수 식의 왼쪽에는 '{0}' 연산자가 있는 단항 식을 사용할 수 없습니다. 식을 괄호로 묶는 것이 좋습니다.", "Annotate_everything_with_types_from_JSDoc_95043": "JSDoc의 형식을 사용하여 모든 항목에 주석 달기", "Annotate_with_type_from_JSDoc_95009": "JSDoc의 형식을 사용하여 주석 추가", "Annotate_with_types_from_JSDoc_95010": "JSDoc의 형식을 사용하여 주석 추가", + "Another_export_default_is_here_2753": "다른 내보내기 기본값은 여기에 있습니다.", + "Are_you_missing_a_semicolon_2734": "세미콜론이 없습니까?", "Argument_expression_expected_1135": "인수 식이 필요합니다.", "Argument_for_0_option_must_be_Colon_1_6046": "'{0}' 옵션의 인수는 {1}이어야(여야) 합니다.", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "'{0}' 형식의 인수는 '{1}' 형식의 매개 변수에 할당될 수 없습니다.", "Array_element_destructuring_pattern_expected_1181": "배열 요소 구조 파괴 패턴이 필요합니다.", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "어설션에서 호출 대상의 모든 이름은 명시적 형식 주석을 사용하여 선언해야 합니다.", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "어설션에서 호출 대상은 식별자 또는 정규화된 이름이어야 합니다.", "Asterisk_Slash_expected_1010": "'*/'가 필요합니다.", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "전역 범위에 대한 확대는 외부 모듈 또는 앰비언트 모듈 선언에만 직접 중첩될 수 있습니다.", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "전역 범위에 대한 확대는 이미 존재하는 앰비언트 컨텍스트에 표시되지 않는 한 'declare' 한정자를 포함해야 합니다.", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "프로젝트 '{0}'에서 입력에 대한 자동 검색을 사용하도록 설정되었습니다. '{2}' 캐시 위치를 사용하여 모듈 '{1}'에 대해 추가 해결 패스를 실행합니다.", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "기본 클래스 식에서 클래스 형식 매개 변수를 참조할 수 없습니다.", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "기본 생성자 반환 형식 '{0}'은(는) 클래스 또는 인터페이스 형식이 아닙니다.", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "기본 생성자 반환 형식 '{0}'은(는) 개체 형식 또는 정적으로 알려진 멤버가 포함된 개체 형식의 교집합이 아닙니다.", "Base_constructors_must_all_have_the_same_return_type_2510": "기본 생성자는 모두 반환 형식이 같아야 합니다.", "Base_directory_to_resolve_non_absolute_module_names_6083": "비추상 모듈 이름을 확인할 기본 디렉터리입니다.", "Basic_Options_6172": "기본 옵션", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "ES2020 미만을 대상으로 할 경우 bigint 리터럴을 사용할 수 없습니다.", "Binary_digit_expected_1177": "이진수가 있어야 합니다.", "Binding_element_0_implicitly_has_an_1_type_7031": "바인딩 요소 '{0}'에 암시적으로 '{1}' 형식이 있습니다.", "Block_scoped_variable_0_used_before_its_declaration_2448": "선언 전에 사용된 블록 범위 변수 '{0}'입니다.", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "최신 상태로 표시될 프로젝트를 포함하여 모든 프로젝트 빌드", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "최신 상태가 아닌 경우, 하나 이상의 프로젝트 및 해당 종속성 빌드", + "Build_option_0_requires_a_value_of_type_1_5073": "빌드 옵션 '{0}'에 {1} 형식의 값이 필요합니다.", "Building_project_0_6358": "'{0}' 프로젝트를 빌드하는 중...", "Call_decorator_expression_90028": "데코레이터 식 호출", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "호출 시그니처 반환 형식 '{0}' 및 '{1}'이(가) 호환되지 않습니다.", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "반환 형식 주석이 없는 호출 시그니처에는 암시적으로 'any' 반환 형식이 포함됩니다.", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "인수가 없는 호출 시그니처의 반환 형식 '{0}' 및 '{1}'이(가) 호환되지 않습니다.", "Call_target_does_not_contain_any_signatures_2346": "호출 대상에 시그니처가 포함되어 있지 않습니다.", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "'{0}'이(가) 네임스페이스가 아니라 형식이므로 '{0}.{1}'에 액세스할 수 없습니다. '{0}'에서 '{0}[\"{1}\"]'과(와) 함께 '{1}' 속성의 형식을 검색하려고 했나요?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "'--isolatedModules' 플래그가 제공된 경우 앰비언트 const 열거형에 액세스할 수 없습니다.", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "'{0}' 생성자 형식을 '{1}' 생성자 형식에 할당할 수 없습니다.", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "추상 생성자 형식을 비추상 생성자 형식에 할당할 수 없습니다.", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "상수 또는 읽기 전용 속성이므로 '{0}'에 할당할 수 없습니다.", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "상수이므로 '{0}'에 할당할 수 없습니다.", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "읽기 전용 속성이므로 '{0}'에 할당할 수 없습니다.", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "변수가 아니므로 '{0}'에 할당할 수 없습니다.", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "'{0}' 모듈은 모듈이 아닌 엔터티로 확인되므로 확대할 수 없습니다.", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "모듈이 아닌 엔터티로 확인되기 때문에 값 내보내기로 모듈 '{0}'을(를) 확대할 수 없습니다.", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "'--module' 플래그가 'amd' 또는 'system'이 아닌 경우 '{0}' 옵션을 사용하여 모듈을 컴파일할 수 없습니다.", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "'--isolatedModules' 플래그가 제공된 경우 네임스페이스를 컴파일할 수 없습니다.", "Cannot_create_an_instance_of_an_abstract_class_2511": "추상 클래스의 인스턴스를 만들 수 없습니다.", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "반복기의 'next' 메서드에 '{1}' 형식이 필요하지만 포함 생성기는 항상 '{0}'을(를) 전송하므로 값에 반복을 위임할 수 없습니다.", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "'{0}'을(를) 내보낼 수 없습니다. 지역 선언만 모듈에서 내보낼 수 있습니다.", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "'{0}' 클래스를 확장할 수 없습니다. 클래스 생성자가 private로 표시되어 있습니다.", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "인터페이스 '{0}'을(를) 확장할 수 없습니다. 'implements'를 확장하시겠습니까?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "현재 디렉터리에서 tsconfig.json 파일을 찾을 수 없습니다. {0}.", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "지정된 디렉터리에서 tsconfig.json 파일을 찾을 수 없습니다. '{0}'.", "Cannot_find_global_type_0_2318": "전역 형식 '{0}'을(를) 찾을 수 없습니다.", "Cannot_find_global_value_0_2468": "전역 값 '{0}'을(를) 찾을 수 없습니다.", "Cannot_find_lib_definition_for_0_2726": "'{0}'에 대한 lib 정의를 찾을 수 없습니다.", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "'{0}'에 대한 lib 정의를 찾을 수 없습니다. '{1}'이(가) 아닌지 확인하세요.", "Cannot_find_module_0_2307": "'{0}' 모듈을 찾을 수 없습니다.", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "'{0}' 모듈을 찾을 수 없습니다. '--resolveJsonModule'을 사용하여 '. json' 확장명이 포함된 모듈을 가져오는 것이 좋습니다.", "Cannot_find_name_0_2304": "'{0}' 이름을 찾을 수 없습니다.", "Cannot_find_name_0_Did_you_mean_1_2552": "'{0}' 이름을 찾을 수 없습니다. '{1}'을(를) 사용하시겠습니까?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "'{0}' 이름을 찾을 수 없습니다. 인스턴스 멤버 'this.{0}'을(를) 사용하시겠습니까?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "'{0}' 이름을 찾을 수 없습니다. 정적 멤버 '{1}.{0}'을(를) 사용하시겠습니까?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "'{0}' 이름을 찾을 수 없습니다. 대상 라이브러리를 변경하려는 경우 'lib' 컴파일러 옵션을 es2015 이상으로 변경해 봅니다.", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "'{0}' 이름을 찾을 수 없습니다. 대상 라이브러리를 변경하려는 경우 'dom'을 포함하도록 'lib' 컴파일러 옵션을 변경해 봅니다.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "'{0}' 이름을 찾을 수 없습니다. 테스트 실행기의 형식 정의를 설치하려는 경우 'npm i @types/jest' 또는 'npm i @types/mocha'를 시도해 봅니다.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "'{0}' 이름을 찾을 수 없습니다. 테스트 실행기의 형식 정의를 설치하려는 경우 'npm i @types/jest' 또는 'npm i @types/mocha'를 시도한 다음, tsconfig의 형식 필드에 'jest' 또는 'mocha'를 추가합니다.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "'{0}' 이름을 찾을 수 없습니다. jQuery의 형식 정의를 설치하려는 경우 'npm i @types/jquery'를 시도합니다.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "'{0}' 이름을 찾을 수 없습니다. jQuery의 형식 정의를 설치하려는 경우 'npm i @types/jquery'를 시도한 다음, tsconfig의 형식 필드에 'jquery'를 추가합니다.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "'{0}' 이름을 찾을 수 없습니다. 노드의 형식 정의를 설치하려는 경우 'npm i @types/node'를 시도합니다.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "'{0}' 이름을 찾을 수 없습니다. 노드의 형식 정의를 설치하려는 경우 'npm i @types/node'를 시도한 다음, tsconfig의 형식 필드에 'node'를 추가합니다.", "Cannot_find_namespace_0_2503": "'{0}' 네임스페이스를 찾을 수 없습니다.", "Cannot_find_parameter_0_1225": "'{0}' 매개 변수를 찾을 수 없습니다.", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "입력 파일의 공용 하위 디렉터리 경로를 찾을 수 없습니다.", "Cannot_find_type_definition_file_for_0_2688": "'{0}'에 대한 형식 정의 파일을 찾을 수 없습니다.", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "형식 선언 파일을 가져올 수 없습니다. '{1}' 대신 '{0}'을(를) 가져오세요.", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "블록 범위 선언 '{1}'과(와) 동일한 범위 내에서 외부 범위 변수 '{0}'을(를) 초기화할 수 없습니다.", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "형식에 호출 시그니처가 없는 식을 호출할 수 없습니다. '{0}' 형식에 호환되는 호출 시그니처가 없습니다.", "Cannot_invoke_an_object_which_is_possibly_null_2721": "'null'일 수 있는 개체를 호출할 수 없습니다.", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "'null'이거나 '정의되지 않음'일 수 있는 개체를 호출할 수 없습니다.", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "'정의되지 않음'일 수 있는 개체를 호출할 수 없습니다.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "반복기의 'next' 메서드에 '{1}' 형식이 필요하지만 배열 구조 파괴는 항상 '{0}'을(를) 전송하므로 값을 반복할 수 없습니다.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "반복기의 'next' 메서드에 '{1}' 형식이 필요하지만 배열 spread는 항상 '{0}'을(를) 전송하므로 값을 반복할 수 없습니다.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "반복기의 'next' 메서드에 '{1}' 형식이 필요하지만 for-of는 항상 '{0}'을(를) 전송하므로 값을 반복할 수 없습니다.", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "'{0}' 프로젝트는 'outFile'이 설정되어 있지 않기 때문에 앞에 추가할 수 없습니다.", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "'--isolatedModules' 플래그가 제공된 경우 형식을 다시 내보낼 수 없습니다.", "Cannot_read_file_0_Colon_1_5012": "파일 '{0}'을(를) 읽을 수 없습니다. {1}.", "Cannot_redeclare_block_scoped_variable_0_2451": "블록 범위 변수 '{0}'을(를) 다시 선언할 수 없습니다.", "Cannot_redeclare_exported_variable_0_2323": "내보낸 변수 '{0}'을(를) 다시 선언할 수 없습니다.", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "catch 절에서 식별자 '{0}'을(를) 다시 선언할 수 없습니다.", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "'{1}' 파일을 읽는 동안 오류가 발생하여 '{0}' 프로젝트의 출력을 업데이트할 수 없습니다.", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "'--jsx' 플래그를 제공하지 않으면 JSX를 사용할 수 없습니다.", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "'--module'이 'none'인 경우 가져오기, 내보내기 또는 모듈 확대를 사용할 수 없습니다.", "Cannot_use_namespace_0_as_a_type_2709": "'{0}' 네임스페이스를 형식으로 사용할 수 없습니다.", "Cannot_use_namespace_0_as_a_value_2708": "'{0}' 네임스페이스를 값으로 사용할 수 없습니다.", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "형식에 호출 또는 구문 시그니처가 없는 식에는 'new'를 사용할 수 없습니다.", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "참조된 프로젝트 '{1}'에서 생성된 '.tsbuildinfo' 파일을 덮어쓰므로 '{0}' 파일을 쓸 수 없습니다.", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "'{0}' 파일은 여러 입력 파일로 덮어쓰이므로 쓸 수 없습니다.", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "'{0}' 파일은 입력 파일을 덮어쓰므로 쓸 수 없습니다.", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "Catch 절 변수에 형식 주석을 사용할 수 없습니다.", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "'{0}'이(가) '{1}' - '{2}'에 대해 일치하는 가장 긴 접두사인지 확인하는 중입니다.", "Circular_definition_of_import_alias_0_2303": "가져오기 별칭 '{0}'의 순환 정의입니다.", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "구성을 확인하는 동안 순환이 검색되었습니다. {0}", + "Circularity_originates_in_type_at_this_location_2751": "순환이 이 위치의 형식에서 시작됩니다.", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "'{0}' 클래스는 인스턴스 멤버 접근자 '{1}'을(를) 정의하지만 확장 클래스 '{2}'은(는) 이 접근자를 인스턴스 멤버 함수로 정의합니다.", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "'{0}' 클래스가 인스턴스 멤버 함수 '{1}'을(를) 정의하지만 확장 클래스 '{2}'은(는) 이 함수를 인스턴스 멤버 접근자로 정의합니다.", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "'{0}' 클래스가 인스턴스 멤버 함수 '{1}'을(를) 정의하지만 확장 클래스 '{2}'은(는) 이 함수를 인스턴스 멤버 속성으로 정의합니다.", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "'{0}' 클래스가 인스턴스 멤버 속성 '{1}'을(를) 정의하지만 확장 클래스 '{2}'은(는) 이 속성을 인스턴스 멤버 함수로 정의합니다.", "Class_0_incorrectly_extends_base_class_1_2415": "'{0}' 클래스가 기본 클래스 '{1}'을(를) 잘못 확장합니다.", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "'{0}' 클래스가 '{1}' 클래스를 잘못 구현합니다. '{1}'을(를) 확장하고 이 클래스의 멤버를 하위 클래스로 상속하시겠습니까?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "클래스 정적 측면 '{0}'이(가) 기본 클래스 정적 측면 '{1}'을(를) 잘못 확장합니다.", "Classes_can_only_extend_a_single_class_1174": "클래스는 단일 클래스만 확장할 수 있습니다.", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "추상 메서드를 포함하는 클래스는 abstract로 표시되어 있어야 합니다.", + "Classes_may_not_have_a_field_named_constructor_18006": "클래스에는 'constructor' 필드를 사용할 수 없습니다.", "Command_line_Options_6171": "명령줄 옵션", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "구성 파일에 대한 경로 또는 'tsconfig.json'이 포함된 폴더에 대한 경로를 고려하여 프로젝트를 컴파일합니다.", "Compiler_option_0_expects_an_argument_6044": "컴파일러 옵션 '{0}'에는 인수가 필요합니다.", "Compiler_option_0_requires_a_value_of_type_1_5024": "컴파일러 옵션 '{0}'에 {1} 형식의 값이 필요합니다.", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "컴파일러는 프라이빗 식별자 하위 수준을 내보낼 때 '{0}' 이름을 예약합니다.", "Composite_projects_may_not_disable_declaration_emit_6304": "복합 프로젝트는 선언 내보내기를 비활성화할 수 없습니다.", + "Composite_projects_may_not_disable_incremental_compilation_6379": "복합 프로젝트는 증분 컴파일을 비활성화할 수 없습니다.", "Computed_property_names_are_not_allowed_in_enums_1164": "컴퓨팅된 속성 이름은 열거형에 사용할 수 없습니다.", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "계산된 값은 문자열 값 멤버가 포함된 열거형에서 허용되지 않습니다.", "Concatenate_and_emit_output_to_single_file_6001": "출력을 연결하고 단일 파일로 내보냅니다.", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "'{1}' 및 '{2}'에서 '{0}'에 대한 정의가 충돌하고 있습니다. 이 라이브러리의 특정 버전을 설치하여 충돌을 해결하세요.", + "Conflicts_are_in_this_file_6201": "이 파일에 충돌이 있습니다.", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "구문 시그니처 반환 형식 '{0}' 및 '{1}'이(가) 호환되지 않습니다.", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "반환 형식 주석이 없는 구문 시그니처에는 암시적으로 'any' 반환 형식이 포함됩니다.", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "인수가 없는 구문 시그니처의 반환 형식 '{0}' 및 '{1}'이(가) 호환되지 않습니다.", "Constructor_implementation_is_missing_2390": "생성자 구현이 없습니다.", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "'{0}' 클래스의 생성자는 private이며 클래스 선언 내에서만 액세스할 수 있습니다.", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "'{0}' 클래스의 생성자는 protected이며 클래스 선언 내에서만 액세스할 수 있습니다.", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "파생 클래스의 생성자는 'super' 호출을 포함해야 합니다.", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "포함 파일이 지정되지 않았고 루트 디렉터리를 확인할 수 없어 'node_modules' 폴더 조회를 건너뜁니다.", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "'{0}' 형식을 '{1}' 형식으로 변환한 작업은 실수일 수 있습니다. 두 형식이 서로 충분히 겹치지 않기 때문입니다. 의도적으로 변환한 경우에는 먼저 'unknown'으로 식을 변환합니다.", "Convert_0_to_mapped_object_type_95055": "'{0}'을(를) 매핑된 개체 형식으로 변환", "Convert_all_constructor_functions_to_classes_95045": "모든 생성자 함수를 클래스로 변환", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "값으로 사용되지 않는 모든 가져오기를 형식 전용 가져오기로 변환", + "Convert_all_re_exported_types_to_type_only_exports_1365": "다시 내보낸 모든 형식을 형식 전용 내보내기로 변환", "Convert_all_require_to_import_95048": "모든 'require'를 'import'로 변환", + "Convert_all_to_async_functions_95066": "모두 비동기 함수로 변환", + "Convert_all_to_bigint_numeric_literals_95092": "모두 bigint 숫자 리터럴로 변환", "Convert_all_to_default_imports_95035": "모든 항목을 기본 가져오기로 변환", + "Convert_const_to_let_95093": "'const'를 'let'으로 변환", + "Convert_default_export_to_named_export_95061": "기본 내보내기를 명명된 내보내기로 변환", "Convert_function_0_to_class_95002": "'{0}' 함수를 클래스로 변환", "Convert_function_to_an_ES2015_class_95001": "함수를 ES2015 클래스로 변환", + "Convert_invalid_character_to_its_html_entity_code_95100": "잘못된 문자를 html 엔터티 코드로 변환", + "Convert_named_export_to_default_export_95062": "명명된 내보내기를 기본 내보내기로 변환", "Convert_named_imports_to_namespace_import_95057": "명명된 가져오기를 네임스페이스 가져오기로 변환", "Convert_namespace_import_to_named_imports_95056": "네임스페이스 가져오기를 명명된 가져오기로 변환", + "Convert_parameters_to_destructured_object_95075": "매개 변수를 구조 파괴 개체로 변환", "Convert_require_to_import_95047": "'require'를 'import'로 변환", "Convert_to_ES6_module_95017": "ES6 모듈로 변환", + "Convert_to_a_bigint_numeric_literal_95091": "bigint 숫자 리터럴로 변환", + "Convert_to_async_function_95065": "비동기 함수로 변환", "Convert_to_default_import_95013": "기본 가져오기로 변환", + "Convert_to_template_string_95096": "템플릿 문자열로 변환", + "Convert_to_type_only_export_1364": "형식 전용 내보내기로 변환", + "Convert_to_type_only_import_1373": "형식 전용 가져오기로 변환", "Corrupted_locale_file_0_6051": "로캘 파일 {0}이(가) 손상되었습니다.", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "모듈 '{0}'에 대한 선언 파일을 찾을 수 없습니다. '{1}'에는 암시적으로 'any' 형식이 포함됩니다.", "Could_not_write_file_0_Colon_1_5033": "'{0}' 파일을 쓸 수 없습니다. '{1}'.", "DIRECTORY_6038": "디렉터리", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "이 파일의 선언 내보내기에는 프라이빗 이름 '{0}'을(를) 사용해야 합니다. 명시적 형식 주석은 선언 내보내기를 차단 해제할 수 있습니다.", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "이 파일의 선언 내보내기에는 '{1}' 모듈의 프라이빗 이름 '{0}'을(를) 사용해야 합니다. 명시적 형식 주석은 선언 내보내기를 차단 해제할 수 있습니다.", "Declaration_expected_1146": "선언이 필요합니다.", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "선언 이름이 기본 제공 전역 ID '{0}'과(와) 충돌합니다.", "Declaration_or_statement_expected_1128": "선언 또는 문이 필요합니다.", + "Declare_a_private_field_named_0_90053": "'{0}'(이)라는 프라이빗 필드를 선언합니다.", "Declare_method_0_90023": "'{0}' 메서드 선언", "Declare_property_0_90016": "'{0}' 속성 선언", "Declare_static_method_0_90024": "'{0}' 정적 메서드 선언", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "데코레이터는 여기에 사용할 수 없습니다.", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "동일한 이름의 여러 get/set 접근자에 데코레이터를 적용할 수 없습니다.", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "모듈의 기본 내보내기에서 프라이빗 이름 '{0}'을(를) 가지고 있거나 사용 중입니다.", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "한정된 할당 어설션은 형식 주석과 함께여야만 사용할 수 있습니다.", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "{0} 식별자의 정의가 다른 파일의 정의와 충돌합니다.", "Delete_all_unused_declarations_95024": "사용하지 않는 선언 모두 삭제", "Delete_the_outputs_of_all_projects_6365": "모든 프로젝트의 출력 삭제", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[사용되지 않음] 대신 '--jsxFactory'를 사용합니다. 'react' JSX 내보내기를 대상으로 할 경우 createElement에 대해 호출되는 개체를 지정합니다.", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[사용되지 않음] 대신 '--outFile'을 사용합니다. 출력을 연결하고 단일 파일로 내보냅니다.", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[사용되지 않음] 대신 '--skipLibCheck'를 사용합니다. 기본 라이브러리 선언 파일의 형식 검사를 건너뜁니다.", + "Did_you_forget_to_use_await_2773": "'await' 사용을 잊으셨습니까?", + "Did_you_mean_0_1369": "'{0}'을(를) 사용하시겠습니까?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "'{0}'을(를) 'new (...args: any[]) => {1}' 형식으로 제한하시겠습니까?", + "Did_you_mean_to_call_this_expression_6212": "이 식을 호출하시겠습니까?", + "Did_you_mean_to_mark_this_function_as_async_1356": "이 함수를 'async'로 표시하시겠습니까?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "이 함수 형식을 괄호로 묶으시겠습니까?", + "Did_you_mean_to_use_new_with_this_expression_6213": "이 식에서 'new'를 사용하시겠습니까?", "Digit_expected_1124": "숫자가 필요합니다.", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "'{0}' 디렉터리가 없으므로 이 디렉터리에서 모든 조회를 건너뜁니다.", "Disable_checking_for_this_file_90018": "이 파일 확인을 사용하지 않도록 설정", "Disable_size_limitations_on_JavaScript_projects_6162": "JavaScript 프로젝트에 대한 크기 제한을 사용하지 않도록 설정합니다.", + "Disable_solution_searching_for_this_project_6224": "이 프로젝트를 검색하는 솔루션을 사용하지 않도록 설정합니다.", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "함수 형식의 제네릭 시그니처에 대한 엄격한 검사를 사용하지 않도록 설정합니다.", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "참조된 프로젝트의 선언 파일 대신 소스 파일을 사용하지 않도록 설정합니다.", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "동일한 파일에 대해 대/소문자를 일관되지 않게 사용한 참조를 허용하지 않습니다.", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "컴파일된 파일 목록에 삼중 슬래시 참조 또는 가져온 모듈을 추가하지 않습니다.", "Do_not_emit_comments_to_output_6009": "주석을 출력에 내보내지 마세요.", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "사용되지 않는 레이블에 대한 오류를 보고하지 않습니다.", "Do_not_resolve_the_real_path_of_symlinks_6013": "symlink의 실제 경로를 확인하지 마세요.", "Do_not_truncate_error_messages_6165": "오류 메시지를 자르지 않습니다.", - "Duplicate_declaration_0_2718": "'{0}' 선언이 중복되었습니다.", "Duplicate_function_implementation_2393": "중복된 함수 구현입니다.", "Duplicate_identifier_0_2300": "'{0}' 식별자가 중복되었습니다.", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "'{0}' 식별자가 중복되었습니다. 컴파일러는 모듈의 최상위 범위에 이름 '{1}'을(를) 예약합니다.", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "중복 식별자 '_this'입니다. 컴파일러는 변수 선언 '_this'를 사용해서 'this' 참조를 캡처합니다.", "Duplicate_label_0_1114": "중복된 레이블 '{0}'입니다.", "Duplicate_number_index_signature_2375": "중복 숫자 인덱스 시그니처입니다.", + "Duplicate_property_0_2718": "중복 속성 '{0}'입니다.", "Duplicate_string_index_signature_2374": "중복 문자열 인덱스 시그니처입니다.", "Dynamic_import_cannot_have_type_arguments_1326": "동적 가져오기에는 형식 인수를 사용할 수 없습니다.", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "동적 가져오기는 '--module' 플래그가 'commonjs' 또는 'esNext'인 경우에만 지원됩니다.", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "동적 가져오기에는 지정자 하나를 인수로 사용해야 합니다.", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "동적 가져오기의 지정자는 'string' 형식이어야 하지만 여기에서 형식은 '{0}'입니다.", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "동적 가져오기는 '--module' 플래그가 'es2020', 'commonjs', 'amd', 'system' 또는 'umd'로 설정된 경우에만 지원됩니다.", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "공용 구조체 형식 '{0}'의 각 멤버에 구문 시그니처가 있지만, 해당 시그니처는 서로 호환되지 않습니다.", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "공용 구조체 형식 '{0}'의 각 멤버에 시그니처가 있지만, 해당 시그니처는 서로 호환되지 않습니다.", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "'{0}' 형식의 식을 '{1}' 인덱스 형식에 사용할 수 없으므로 요소에 암시적으로 'any' 형식이 있습니다.", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "인덱스 식이 'number' 형식이 아니므로 요소에 암시적으로 'any' 형식이 있습니다.", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "'{0}' 형식에 인덱스 시그니처가 없으므로 요소에 암시적으로 'any' 형식이 있습니다.", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "'{0}' 형식에 인덱스 시그니처가 없으므로 요소에 암시적으로 'any' 형식이 있습니다. '{1}'을(를) 호출하시겠습니까?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "출력 파일의 시작에서 UTF-8 BOM(바이트 순서 표시)을 내보냅니다.", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "별도의 파일을 사용하는 대신 소스 맵과 함께 단일 파일을 내보냅니다.", + "Emit_class_fields_with_Define_instead_of_Set_6222": "Set 대신 Define을 사용하여 클래스 필드를 내보냅니다.", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "단일 파일 내에서 소스 맵과 함께 소스를 내보냅니다. '--inlineSourceMap' 또는 '--sourceMap'을 설정해야 합니다.", "Enable_all_strict_type_checking_options_6180": "엄격한 형식 검사 옵션을 모두 사용하도록 설정합니다.", + "Enable_incremental_compilation_6378": "증분 컴파일을 사용합니다.", "Enable_project_compilation_6302": "프로젝트 컴파일을 사용하도록 설정", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "함수에서 strict 'bind', 'call' 및 'apply' 메서드를 사용하도록 설정합니다.", "Enable_strict_checking_of_function_types_6186": "함수 형식에 대한 엄격한 검사를 사용하도록 설정합니다.", "Enable_strict_checking_of_property_initialization_in_classes_6187": "클래스의 속성 초기화에 대해 엄격한 검사를 사용하도록 설정합니다.", "Enable_strict_null_checks_6113": "엄격한 null 검사를 사용하도록 설정하세요.", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "구성 파일에서 'experimentalDecorators' 옵션을 사용하도록 설정합니다.", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "구성 파일에서 '--jsx' 플래그를 사용하도록 설정합니다.", "Enable_tracing_of_the_name_resolution_process_6085": "이름 확인 프로세스 추적을 사용하도록 설정하세요.", "Enable_verbose_logging_6366": "자세한 정보 로깅 사용", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "모든 가져오기에 대한 네임스페이스 개체를 만들어 CommonJS 및 ES 모듈 간의 내보내기 상호 운용성을 사용하도록 설정합니다. 'allowSyntheticDefaultImports'를 의미합니다.", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "열거형 멤버가 필요합니다.", "Enum_member_must_have_initializer_1061": "열거형 멤버에는 이니셜라이저가 있어야 합니다.", "Enum_name_cannot_be_0_2431": "열거형 이름은 '{0}'일 수 없습니다.", + "Enum_type_0_circularly_references_itself_2586": "열거형 형식 '{0}'이(가) 자신을 순환 참조합니다.", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "열거형 형식 '{0}'에 리터럴이 아닌 이니셜라이저를 사용하는 멤버가 있습니다.", "Examples_Colon_0_6026": "예: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "'{0}' 및 '{1}' 형식을 비교하는 스택 깊이가 과도합니다.", @@ -385,9 +490,9 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "최소 {0}개의 인수가 필요한데 {1}개 이상을 가져왔습니다.", "Expected_corresponding_JSX_closing_tag_for_0_17002": "'{0}'에 해당하는 JSX 닫는 태그가 필요합니다.", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "JSX 조각에 닫는 태그가 필요합니다.", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "'package.json'의 '{0}' 필드에 'string' 형식이 필요한데 '{1}'을(를) 얻었습니다.", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "'package.json'의 '{0}' 필드에 '{1}' 형식이 필요한데 '{2}'을(를) 얻었습니다.", "Experimental_Options_6177": "실험적 옵션", - "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "데코레이터에 대한 실험적 지원 기능은 이후 릴리스에서 변경될 수 있습니다. 이 경고를 제거하려면 'experimentalDecorators' 옵션을 설정하세요.", + "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "데코레이터에 대한 실험적 지원 기능은 이후 릴리스에서 변경될 수 있습니다. 이 경고를 제거하려면 'tsconfig' 또는 'jsconfig'에서 'experimentalDecorators' 옵션을 설정합니다.", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "명시적으로 지정된 모듈 확인 종류 '{0}'입니다.", "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "ECMAScript 모듈을 대상으로 하는 경우 내보내기 할당을 사용할 수 없습니다. 대신 'export default'나 다른 모듈 형식의 사용을 고려하세요.", "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "'--module' 플래그가 'system'이면 내보내기 할당은 지원되지 않습니다.", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "내보내기 및 내보내기 할당는 모듈 확대에서 허용되지 않습니다.", "Expression_expected_1109": "식이 필요합니다.", "Expression_or_comma_expected_1137": "식 또는 쉼표가 필요합니다.", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "식에서는 너무 복잡해서 표시할 수 없는 공용 구조체 형식을 생성합니다.", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "컴파일러가 기본 클래스 참조를 캡처하기 위해 사용하는 '_super'로 식이 확인됩니다.", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "컴파일러가 비동기 함수를 지원하기 위해 사용하는 변수 선언 '{0}'(으)로 식이 확인됩니다.", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "컴파일러가 'new.target' 메타 속성 참조를 캡처하기 위해 사용하는 변수 선언 '_newTarget'으로 식이 확인됩니다.", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "{1}의 {0}(으)로 추출", "Extract_to_0_in_1_scope_95008": "{1} 범위의 {0}(으)로 추출", "Extract_to_0_in_enclosing_scope_95007": "바깥쪽 범위의 {0}(으)로 추출", + "Extract_to_interface_95090": "인터페이스로 추출", + "Extract_to_type_alias_95078": "형식 별칭으로 추출", + "Extract_to_typedef_95079": "Typedef로 추출", + "Extract_type_95077": "형식 추출", "FILE_6035": "파일", "FILE_OR_DIRECTORY_6040": "파일 또는 디렉터리", "Failed_to_parse_file_0_Colon_1_5014": "'{0}' 파일 구문 분석 실패: {1}.", "Fallthrough_case_in_switch_7029": "switch에 Fallthrough case가 있습니다.", "File_0_does_not_exist_6096": "'{0}' 파일이 없습니다.", "File_0_exist_use_it_as_a_name_resolution_result_6097": "'{0}' 파일이 있습니다. 이 파일을 이름 확인 결과로 사용하세요.", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "'{0}' 파일의 확장명이 지원되지 않습니다. 지원되는 확장명은 {1}뿐입니다.", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "'{0}' 파일은 확장명이 지원되지 않으므로 건너뜁니다.", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "'{0}' 파일의 확장명이 지원되지 않습니다. 지원되는 확장명은 {1}뿐입니다.", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "'{0}' 파일은 JavaScript 파일입니다. 'allowJs' 옵션을 사용하도록 설정하시겠습니까?", "File_0_is_not_a_module_2306": "'{0}' 파일은 모듈이 아닙니다.", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "'{0}' 파일이 프로젝트 파일 목록에 없습니다. 프로젝트는 모든 파일을 나열하거나 'include' 패턴을 사용해야 합니다.", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "'{0}' 파일이 '{1}' 프로젝트의 파일 목록에 나열되지 않습니다. 프로젝트는 모든 파일을 나열하거나 'include' 패턴을 사용해야 합니다.", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "'{0}' 파일이 'rootDir' '{1}' 아래에 있지 않습니다. 'rootDir'에는 모든 소스 파일이 포함되어 있어야 합니다.", "File_0_not_found_6053": "파일 '{0}'을(를) 찾을 수 없습니다.", "File_change_detected_Starting_incremental_compilation_6032": "파일 변경이 검색되었습니다. 증분 컴파일을 시작하는 중...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "파일 사양은 재귀 디렉터리 와일드카드('**') 뒤에 나타나는 부모 디렉터리('..')를 포함할 수 없습니다. '{0}'.", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "파일 사양은 재귀 디렉터리 와일드카드('**')로 끝날 수 없습니다. '{0}'.", "Fix_all_detected_spelling_errors_95026": "검색된 맞춤법 오류 모두 수정", + "Fix_all_expressions_possibly_missing_await_95085": "'await'가 누락되었을 수 있는 모든 식 수정", + "Found_0_errors_6217": "{0}개 오류가 발견되었습니다.", "Found_0_errors_Watching_for_file_changes_6194": "{0}개 오류가 발견되었습니다. 파일이 변경되었는지 확인하는 중입니다.", + "Found_1_error_6216": "1개 오류가 발견되었습니다.", "Found_1_error_Watching_for_file_changes_6193": "1개 오류가 발견되었습니다. 파일이 변경되었는지 확인하는 중입니다.", "Found_package_json_at_0_6099": "'{0}'에서 'package.json'을 찾았습니다.", - "Found_package_json_at_0_Package_ID_is_1_6190": "'{0}'에서 'package.json'을 찾았습니다. 패키지 ID는 '{1}'입니다.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "'ES3' 또는 'ES5'를 대상으로 할 경우 strict 모드의 블록 내에서 함수 선언을 사용할 수 없습니다.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "'ES3' 또는 'ES5'를 대상으로 할 경우 strict 모드의 블록 내에서 함수 선언을 사용할 수 없습니다. 클래스 정의는 자동으로 strict 모드가 됩니다.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "'ES3' 또는 'ES5'를 대상으로 할 경우 strict 모드의 블록 내에서 함수 선언을 사용할 수 없습니다. 모듈은 자동으로 strict 모드가 됩니다.", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "함수에 끝 return 문이 없으며 반환 형식에 'undefined'가 포함되지 않습니다.", "Function_overload_must_be_static_2387": "함수 오버로드는 정적이어야 합니다.", "Function_overload_must_not_be_static_2388": "함수 오버로드는 정적이 아니어야 합니다.", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "반환 형식 주석이 없는 함수 형식에는 암시적으로 '{0}' 반환 형식이 포함됩니다.", "Generate_get_and_set_accessors_95046": "'get' 및 'set' 접근자 생성", + "Generates_a_CPU_profile_6223": "CPU 프로필을 생성합니다.", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "해당하는 각 '.d.ts' 파일에 sourcemap을 생성합니다.", "Generates_corresponding_d_ts_file_6002": "해당 '.d.ts' 파일을 생성합니다.", "Generates_corresponding_map_file_6043": "해당 '.map' 파일을 생성합니다.", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "생성기는 값을 생성하지 않으므로 암시적으로 '{0}' 형식입니다. 반환 형식을 제공하세요.", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "생성기는 값을 생성하지 않으므로 암시적으로 yield 형식 '{0}'입니다. 반환 형식 주석을 제공하는 것이 좋습니다.", "Generators_are_not_allowed_in_an_ambient_context_1221": "생성기는 앰비언트 컨텍스트에서 사용할 수 없습니다.", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "생성기는 ECMAScript 2015 이상을 대상으로 하는 경우에만 사용할 수 있습니다.", "Generic_type_0_requires_1_type_argument_s_2314": "'{0}' 제네릭 형식에 {1} 형식 인수가 필요합니다.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "제네릭 형식 '{0}'에 {1} 및 {2} 사이의 형식 인수가 필요합니다.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "제네릭 형식 인스턴스화는 깊이가 매우 깊으며 무한할 수도 있습니다.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Getter 및 Setter 접근자의 표시 유형이 다릅니다.", "Global_module_exports_may_only_appear_at_top_level_1316": "전역 모듈 내보내기는 최상위 수준에만 나올 수 있습니다.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "전역 모듈 내보내기는 선언 파일에만 나올 수 있습니다.", "Global_module_exports_may_only_appear_in_module_files_1314": "전역 모듈 내보내기는 모듈 파일에만 나올 수 있습니다.", "Global_type_0_must_be_a_class_or_interface_type_2316": "전역 형식 '{0}'은 클래스 또는 인터페이스 형식이어야 합니다.", "Global_type_0_must_have_1_type_parameter_s_2317": "전역 형식 '{0}'에는 {1} 형식 매개 변수를 사용해야 합니다.", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "'--incremental' 및 '--watch'의 다시 컴파일에서 파일 내 변경 내용은 파일에 따라 직접 파일에만 영향을 준다고 가정하도록 합니다.", "Hexadecimal_digit_expected_1125": "16진수가 필요합니다.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "식별자가 필요합니다. '{0}'은(는) strict 모드의 예약어입니다.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "식별자가 필요합니다. '{0}'은(는) strict 모드의 예약어입니다. 클래스 정의는 자동으로 strict 모드가 됩니다.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "식별자가 필요합니다. '{0}'은(는) strict 모드의 예약어입니다. 모듈은 자동으로 strict 모드가 됩니다.", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "식별자가 필요합니다. '{0}'은(는) 여기에서 사용할 수 없는 예약어입니다.", "Identifier_expected_1003": "식별자가 필요합니다.", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "식별자가 필요합니다. '__esModule'은 ECMAScript 모듈을 변환할 때 내보낸 표식으로 예약되어 있습니다.", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "'{0}' 패키지가 이 모듈을 실제로 공개하는 경우 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}' 수정을 위한 끌어오기 요청을 보내는 것이 좋습니다.", "Ignore_this_error_message_90019": "이 오류 메시지 무시", "Implement_all_inherited_abstract_classes_95040": "상속된 추상 클래스 모두 구현", "Implement_all_unimplemented_interfaces_95032": "구현되지 않은 인터페이스 모두 구현", "Implement_inherited_abstract_class_90007": "상속된 추상 클래스 구현", "Implement_interface_0_90006": "'{0}' 인터페이스 구현", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "내보낸 클래스 '{0}'의 Implements 절이 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "런타임에는 'symbol'을 'string'으로 암시적으로 변환할 수 없습니다. 이 식을 'String(...)'으로 래핑하는 것이 좋습니다.", "Import_0_from_module_1_90013": "\"{1}\" 모듈에서 '{0}' 가져오기", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "ECMAScript 모듈을 대상으로 하는 경우 할당 가져오기를 사용할 수 없습니다. 대신 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"' 또는 다른 모듈 형식 사용을 고려하세요.", "Import_declaration_0_is_using_private_name_1_4000": "가져오기 선언 '{0}'이(가) 프라이빗 이름 '{1}'을(를) 사용하고 있습니다.", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "가져오기 선언이 '{0}'의 로컬 선언과 충돌합니다.", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "네임스페이스의 가져오기 선언은 모듈을 참조할 수 없습니다.", + "Import_default_0_from_module_1_90032": "\"{1}\" 모듈에서 기본값 '{0}' 가져오기", "Import_emit_helpers_from_tslib_6139": "'tslib'에서 내보내기 도우미를 가져오세요.", "Import_may_be_converted_to_a_default_import_80003": "가져오기가 기본 가져오기로 변환될 수 있습니다.", "Import_name_cannot_be_0_2438": "가져오기 이름은 '{0}'일 수 없습니다.", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "가져오기는 모듈 확대에서 허용되지 않습니다. 내보내기를 바깥쪽 외부 모듈로 이동하세요.", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "앰비언트 열거형 선언에서 멤버 이니셜라이저는 상수 식이어야 합니다.", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "다중 선언이 포함된 열거형에서는 하나의 선언만 첫 번째 열거형 요소에 대한 이니셜라이저를 생략할 수 있습니다.", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "'const' 열거형 선언에서 멤버 이니셜라이저는 상수 식이어야 합니다.", "Include_modules_imported_with_json_extension_6197": "'.json' 확장을 사용하여 가져온 모듈을 포함합니다.", "Index_signature_in_type_0_only_permits_reading_2542": "'{0}' 형식의 인덱스 시그니처는 읽기만 허용됩니다.", "Index_signature_is_missing_in_type_0_2329": "'{0}' 형식에 인덱스 시그니처가 없습니다.", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "병합된 선언 '{0}'의 개별 선언은 모두 내보내 졌거나 모두 로컬이어야 합니다.", "Infer_all_types_from_usage_95023": "사용량에서 모든 형식 유추", "Infer_parameter_types_from_usage_95012": "사용량에서 매개 변수 형식 유추", + "Infer_this_type_of_0_from_usage_95080": "사용량에서 '{0}'의 'this' 형식 유추", "Infer_type_of_0_from_usage_95011": "사용량에서 '{0}'의 형식 유추", "Initialize_property_0_in_the_constructor_90020": "생성자에서 속성 '{0}' 초기화", "Initialize_static_property_0_90021": "정적 속성 '{0}' 초기화", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "JSDoc '...'은 시그니처의 마지막 매개 변수에만 나타날 수 있습니다.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "JSDoc '@param' 태그의 이름이 '{0}'인데 해당 이름의 매개 변수가 없습니다.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "JSDoc '@param' 태그에 '{0}' 이름이 있지만, 해당 이름의 매개 변수가 없습니다. 배열 형식이 있는 경우 '인수'를 일치시킵니다.", + "JSDoc_type_0_circularly_references_itself_2587": "JSDoc 형식 '{0}'이(가) 자신을 순환 참조합니다.", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "JSDoc '@typedef' 태그는 형식 주석을 포함하거나, '@property' 또는 '@member' 태그 앞에 와야 합니다.", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "JSDoc 유형은 문서 주석 내에서만 사용될 수 있습니다.", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "JSDoc 형식이 TypeScript 형식으로 이동될 수 있습니다.", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "JSX 요소 형식 '{0}'에 구문 또는 호출 시그니처가 없습니다.", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "JSX 요소 형식 '{0}'은(는) JSX 요소에 대한 생성자 함수가 아닙니다.", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "JSX 요소에 이름이 같은 특성을 여러 개 사용할 수 없습니다.", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "JSX 식은 쉼표 연산자를 사용할 수 없습니다. 배열을 작성하시겠습니까?", "JSX_expressions_must_have_one_parent_element_2657": "JSX 식에는 부모 요소가 하나 있어야 합니다.", "JSX_fragment_has_no_corresponding_closing_tag_17014": "JSX 조각에 닫는 태그가 없습니다.", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "인라인 JSX 팩터리 pragma를 사용할 때에는 JSX 조각이 지원되지 않습니다.", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "JSX 분배 자식은 배열 형식이어야 합니다.", "Jump_target_cannot_cross_function_boundary_1107": "점프 대상은 함수 경계를 벗어날 수 없습니다.", "KIND_6034": "KIND", + "Keywords_cannot_contain_escape_characters_1260": "키워드에는 이스케이프 문자를 사용할 수 없습니다.", "LOCATION_6037": "위치", "Language_service_is_disabled_9004": "언어 서비스를 사용할 수 없습니다.", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "쉼표 연산자의 왼쪽은 사용되지 않으며 이로 인해 의도하지 않은 결과가 발생하지 않습니다.", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "생성자의 첫 번째 문을 'super()'로 호출", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "매핑된 개체 형식에는 'any' 템플릿 형식이 암시적으로 포함됩니다.", "Member_0_implicitly_has_an_1_type_7008": "'{0}' 멤버에는 암시적으로 '{1}' 형식이 포함됩니다.", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "'{0}' 멤버는 암시적으로 '{1}' 형식이지만, 사용량에서 더 나은 형식을 유추할 수 있습니다.", "Merge_conflict_marker_encountered_1185": "병합 충돌 표식을 발견했습니다.", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "병합된 선언 '{0}'에는 기본 내보내기 선언을 포함할 수 없습니다. 대신 별도의 'export default {0}' 선언을 추가하세요.", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "메타 속성 '{0}'은(는) 함수 선언, 함수 식 또는 생성기의 본문에서만 사용할 수 있습니다.", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "내보낸 인터페이스의 '{0}' 메서드가 프라이빗 모듈 '{2}'의 '{1}' 이름을 가지고 있거나 사용 중입니다.", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "내보낸 인터페이스의 '{0}' 메서드가 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Modifiers_cannot_appear_here_1184": "한정자를 여기에 표시할 수 없습니다.", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "모듈 '{0}'은(는) 형식을 참조하지 않지만, 여기에서 형식으로 사용됩니다.", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "'{0}' 모듈은 '{1}' 플래그를 사용하는 가져온 기본값이어야만 합니다.", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "'{0}' 모듈은 '{1}'을(를) 로컬로 선언하지만, 모듈을 '{2}'(으)로 내보냅니다.", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "'{0}' 모듈은 '{1}'을(를) 로컬로 선언하지만, 모듈을 내보내지 않습니다.", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "모듈 '{0}'은(는) 형식을 참조하지 않지만, 여기에서 형식으로 사용됩니다. 'typeof 가져오기('{0}')'를 사용하시겠습니까?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "모듈 '{0}'은(는) 값을 참조하지 않지만, 여기에서 값으로 사용됩니다.", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "{0} 모듈에서 '{1}'(이)라는 멤버를 이미 내보냈습니다. 모호성을 해결하려면 명시적으로 다시 내보내는 것이 좋습니다.", "Module_0_has_no_default_export_1192": "모듈 '{0}'에는 기본 내보내기가 없습니다.", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "'{0}' 모듈에 기본 내보내기가 없습니다. 대신 '{0}에서 { {1} } 가져오기'를 사용하시겠습니까?", "Module_0_has_no_exported_member_1_2305": "'{0}' 모듈에 내보낸 멤버 '{1}'이(가) 없습니다.", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "모듈 '{0}'에 내보낸 멤버 '{1}'이(가) 없습니다. '{2}'이(가) 아닌지 확인하세요.", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "'{0}' 모듈에 내보낸 멤버 '{1}'이(가) 없습니다. 대신 '{0}에서 {1} 가져오기'를 사용하시겠습니까?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "'{0}' 모듈은 이름이 같은 로컬 선언으로 숨겨집니다.", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "모듈 '{0}'은(는) 모듈이 아닌 엔터티로 확인되므로 이 구문을 사용하여 가져올 수 없습니다.", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "모듈 '{0}'은(는) 'export ='을 사용하며 'export *'와 함께 사용할 수 없습니다.", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "이 파일은 수정되지 않았으므로 '{0}' 모듈은 '{1}'에서 선언된 앰비언트 모듈로 확인되었습니다.", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "'{0}' 모듈은 '{1}'에서 지역으로 선언된 앰비언트 모듈로 확인되었습니다.", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "모듈 '{0}'이(가) '{1}'(으)로 확인되었지만 '--jsx'가 설정되지 않았습니다.", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "'{0}' 모듈이 '{1}'(으)로 확인되었지만 '--resolveJsonModule'이 사용되지 않았습니다.", "Module_Resolution_Options_6174": "모듈 확인 옵션", "Module_name_0_matched_pattern_1_6092": "모듈 이름: '{0}', 일치하는 패턴: '{1}'", "Module_name_0_was_not_resolved_6090": "======== 모듈 이름 '{0}'이(가) 확인되지 않았습니다. ========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== 모듈 이름 '{0}'이(가) '{1}'(으)로 확인되었습니다. ========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== 모듈 이름 '{0}'이(가) 패키지 ID가 '{2}'인 '{1}'(으)로 확인되었습니다. ========", "Module_resolution_kind_is_not_specified_using_0_6088": "모듈 확인 종류가 지정되지 않았습니다. '{0}'을(를) 사용합니다.", "Module_resolution_using_rootDirs_has_failed_6111": "'rootDirs'를 사용한 모듈 확인에 실패했습니다.", "Move_to_a_new_file_95049": "새 파일로 이동", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "명명된 속성 '{0}'의 형식 '{1}' 및 '{2}'이(가) 동일하지 않습니다.", "Namespace_0_has_no_exported_member_1_2694": "'{0}' 네임스페이스에 내보낸 멤버 '{1}'이(가) 없습니다.", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "기본 생성자에 지정된 수의 형식 인수가 없습니다.", + "No_constituent_of_type_0_is_callable_2755": "'{0}' 형식의 구성원을 호출할 수 없습니다.", + "No_constituent_of_type_0_is_constructable_2759": "'{0}' 형식의 구성원을 생성할 수 없습니다.", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "'{1}' 형식에서 '{0}' 형식의 매개 변수가 포함된 인덱스 시그니처를 찾을 수 없습니다.", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "'{0}' 구성 파일에서 입력을 찾을 수 없습니다. 지정된 '포함' 경로는 '{1}'이고 '제외' 경로는 '{2}'이었습니다.", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "오버로드에 {0} 인수가 필요하지 않지만, {1} 또는 {2} 인수가 필요한 오버로드가 있습니다.", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "오버로드에 {0} 형식 인수가 필요하지 않지만, {1} 또는 {2} 형식 인수가 필요한 오버로드가 있습니다.", + "No_overload_matches_this_call_2769": "이 호출과 일치하는 오버로드가 없습니다.", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "줄임 속성 '{0}'의 범위에 값이 없습니다. 값을 선언하거나 이니셜라이저를 제공합니다.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "비추상 클래스 '{0}'은(는) '{2}' 클래스에서 상속된 추상 멤버 '{1}'을(를) 구현하지 않습니다.", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "비추상 클래스 식은 '{1}' 클래스에서 상속된 추상 멤버 '{0}'을(를) 구현하지 않습니다.", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "null이 아닌 어설션은 TypeScript 파일에서만 사용할 수 있습니다.", + "Non_simple_parameter_declared_here_1348": "여기서 단순하지 않은 매개 변수가 선언되었습니다.", "Not_all_code_paths_return_a_value_7030": "일부 코드 경로가 값을 반환하지 않습니다.", + "Not_all_constituents_of_type_0_are_callable_2756": "'{0}' 형식의 일부 구성원을 호출할 수 없습니다.", + "Not_all_constituents_of_type_0_are_constructable_2760": "'{0}' 형식의 일부 구성원을 생성할 수 없습니다.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "숫자 인덱스 형식 '{0}'을(를) 문자열 인덱스 형식 '{1}'에 할당할 수 없습니다.", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "절대값이 2^53보다 크거나 같은 숫자 리터럴은 너무 커서 정수로 정확하게 표시할 수 없습니다.", "Numeric_separators_are_not_allowed_here_6188": "숫자 구분 기호는 여기에서 허용되지 않습니다.", "Object_is_of_type_unknown_2571": "개체가 '알 수 없는' 형식입니다.", "Object_is_possibly_null_2531": "개체가 'null'인 것 같습니다.", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "8진수 리터럴은 열거형 멤버 이니셜라이저에서 사용할 수 없습니다. '{0}' 구문을 사용하세요.", "Octal_literals_are_not_allowed_in_strict_mode_1121": "strict 모드에서는 8진수 리터럴이 허용되지 않습니다.", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "ECMAScript 5 이상을 대상으로 하는 경우 8진수 리터럴을 사용할 수 없습니다. '{0}' 구문을 사용하세요.", + "Only_ECMAScript_imports_may_use_import_type_1370": "ECMAScript 가져오기만 'import type'을 사용할 수 있습니다.", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "'for...in' 문에는 단일 변수 선언만 허용됩니다.", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "'for...of' 문에는 단일 변수 선언만 허용됩니다.", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "void 함수만 'new' 키워드로 호출할 수 있습니다.", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "'.d.ts' 선언 파일만 내보냅니다.", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "선택적 형식 인수가 포함된 식별자/정규화된 이름만 현재 클래스 'extends' 절에서 지원됩니다.", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "기본 클래스의 공용 및 보호된 메서드만 'super' 키워드를 통해 액세스할 수 있습니다.", + "Operator_0_cannot_be_applied_to_type_1_2736": "'{0}' 연산자는 '{1}' 형식에 적용할 수 없습니다.", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "'{0}' 연산자를 '{1}' 및 '{2}' 형식에 적용할 수 없습니다.", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "'{0}' 옵션은 'tsconfig.json' 파일에만 지정할 수 있습니다.", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "'{0}' 옵션은 '--inlineSourceMap' 옵션 또는 '--sourceMap' 옵션이 제공되는 경우에만 사용할 수 있습니다.", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "'target' 옵션이 'ES3'인 경우 '{0}' 옵션을 지정할 수 없습니다.", "Option_0_cannot_be_specified_with_option_1_5053": "'{0}' 옵션은 '{1}' 옵션과 함께 지정할 수 없습니다.", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "'{1}' 옵션을 지정하지 않고 '{0}' 옵션을 지정할 수 없습니다.", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "'{1}' 또는 '{2}' 옵션을 지정하지 않고 '{0}' 옵션을 지정할 수 없습니다.", "Option_0_should_have_array_of_strings_as_a_value_6103": "'{0}' 옵션은 문자열 배열 값을 사용해야 합니다.", "Option_build_must_be_the_first_command_line_argument_6369": "'--build' 옵션은 첫 번째 명령줄 인수여야 합니다.", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "'--incremental' 옵션은 tsconfig를 사용하거나 단일 파일로 내보내서 지정하거나 '--tsBuildInfoFile' 옵션을 지정할 때만 지정할 수 있습니다.", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "'isolatedModules' 옵션은 '--module' 옵션을 지정하거나 'target' 옵션이 'ES2015' 이상인 경우에만 사용할 수 있습니다.", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "'paths' 옵션은 '--baseUrl' 옵션을 지정하지 않고 사용할 수 없습니다.", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "명령줄에서 'project' 옵션을 원본 파일과 혼합하여 사용할 수 없습니다.", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "'--resolveJsonModule' 옵션은 모듈 코드 생성이 'commonjs', 'amd', 'es2015' 또는 'esNext'일 경우에만 지정할 수 있습니다.", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "'node' 모듈 확인 전략 없이 '--resolveJsonModule' 옵션을 지정할 수 없습니다.", "Options_0_and_1_cannot_be_combined_6370": "'{0}' 및 '{1}' 옵션은 조합할 수 없습니다.", "Options_Colon_6027": "옵션:", "Output_directory_for_generated_declaration_files_6166": "생성된 선언 파일의 출력 디렉터리입니다.", "Output_file_0_from_project_1_does_not_exist_6309": "프로젝트 '{1}'의 출력 파일 '{0}'이(가) 존재하지 않습니다.", "Output_file_0_has_not_been_built_from_source_file_1_6305": "출력 파일 '{0}'이(가) 소스 파일 '{1}'에서 빌드되지 않았습니다.", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "오버로드 시그니처가 함수 구현과 호환되지 않습니다.", + "Overload_0_of_1_2_gave_the_following_error_2772": "{1}, '{2}'의 오버로드 {0}에서 다음 오류가 발생했습니다.", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "오버로드 시그니처는 모두 추상이거나 비추상이어야 합니다.", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "오버로드 시그니처는 모두 앰비언트이거나 앰비언트가 아니어야 합니다.", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "오버로드 시그니처는 모두 내보내거나 모두 내보내지 않아야 합니다.", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "오버로드 시그니처는 모두 퍼블릭, 프라이빗 또는 보호된 상태여야 합니다.", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "매개 변수 '{0}'은(는) 해당 이니셜라이저에서 참조할 수 없습니다.", "Parameter_0_implicitly_has_an_1_type_7006": "'{0}' 매개 변수에는 암시적으로 '{1}' 형식이 포함됩니다.", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "'{0}' 매개 변수는 암시적으로 '{1}' 형식이지만, 사용량에서 더 나은 형식을 유추할 수 있습니다.", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "'{0}' 매개 변수는 '{1}' 매개 변수와 같은 위치에 있지 않습니다.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "접근자의 '{0}' 매개 변수가 외부 모듈 {2}의 '{1}' 이름을 가지고 있거나 사용 중이지만 명명할 수 없습니다.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "접근자의 '{0}' 매개 변수가 프라이빗 모듈 '{2}'의 '{1}' 이름을 가지고 있거나 사용 중입니다.", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "접근자의 '{0}' 매개 변수가 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "내보낸 인터페이스에 있는 호출 시그니처의 '{0}' 매개 변수가 프라이빗 모듈 '{2}'의 '{1}' 이름을 가지고 있거나 사용 중입니다.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "내보낸 인터페이스에 있는 호출 시그니처의 '{0}' 매개 변수가 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "내보낸 클래스에 있는 생성자의 '{0}' 매개 변수가 외부 모듈 {2}의 '{1}' 이름을 가지고 있거나 사용 중이지만 명명할 수 없습니다.", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "내보낸 클래스에 있는 공용 정적 메서드의 '{0}' 매개 변수가 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Parameter_cannot_have_question_mark_and_initializer_1015": "매개 변수에 물음표와 이니셜라이저를 사용할 수 없습니다.", "Parameter_declaration_expected_1138": "매개 변수 선언이 필요합니다.", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "매개 변수에 이름이 있지만 형식이 없습니다. '{0}: {1}'을(를) 사용하시겠습니까?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "매개 변수 한정자는 TypeScript 파일에서만 사용할 수 있습니다.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "내보낸 클래스에 있는 공용 setter '{0}'의 매개 변수 형식이 프라이빗 모듈 '{2}'의 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "내보낸 클래스에 있는 공용 setter '{0}'의 매개 변수 형식이 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "내보낸 클래스에 있는 공용 정적 setter '{0}'의 매개 변수 형식이 프라이빗 모듈 '{2}'의 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "strict 모드에서 구문 분석하고 각 소스 파일에 대해 \"use strict\"를 내보냅니다.", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "'{0}' 패턴에는 '*' 문자를 최대 하나만 사용할 수 있습니다.", "Prefix_0_with_an_underscore_90025": "'{0}' 앞에 밑줄 추가", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "모든 잘못된 속성 선언에 'declare'를 접두사로 추가", "Prefix_all_unused_declarations_with_where_possible_95025": "가능한 경우 사용하지 않는 모든 선언에 '_'을 접두사로 추가", + "Prefix_with_declare_95094": "'declare'를 접두사로 추가", "Print_names_of_files_part_of_the_compilation_6155": "컴파일의 일부인 파일의 이름을 인쇄합니다.", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "컴파일에 포함된 파일의 이름을 인쇄한 다음, 처리를 중지합니다.", "Print_names_of_generated_files_part_of_the_compilation_6154": "컴파일의 일부인 생성된 파일의 이름을 인쇄합니다.", "Print_the_compiler_s_version_6019": "컴파일러 버전을 인쇄합니다.", + "Print_the_final_configuration_instead_of_building_1350": "빌드 대신 최종 구성을 인쇄합니다.", "Print_this_message_6017": "이 메시지를 출력합니다.", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "변수 선언에서 프라이빗 식별자를 사용할 수 없습니다.", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "클래스 본문 외부에서 프라이빗 식별자를 사용할 수 없습니다.", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "프라이빗 식별자는 ECMAScript 2015 이상을 대상으로 지정할 때만 사용할 수 있습니다.", + "Private_identifiers_cannot_be_used_as_parameters_18009": "프라이빗 식별자는 매개 변수로 사용할 수 없습니다.", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "형식 매개 변수에서 프라이빗 또는 보호된 멤버 '{0}'에 액세스할 수 없습니다.", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "'{0}' 프로젝트는 '{1}' 종속성에 오류가 있기 때문에 빌드할 수 없습니다.", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "'{1}' 종속성이 빌드되지 않았기 때문에 '{0}' 프로젝트를 빌드할 수 없습니다.", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "'{1}' 종속성이 최신 상태가 아니기 때문에 '{0}' 프로젝트가 최신 상태가 아닙니다.", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "가장 오래된 출력 '{1}'이(가) 최신 입력 '{2}'보다 오래되었기 때문에 '{0}' 프로젝트가 최신 상태가 아닙니다.", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "'{1}' 출력 파일이 존재하지 않기 때문에 '{0}' 프로젝트가 최신 상태가 아닙니다.", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "'{0}' 프로젝트의 출력이 현재 버전 '{2}'과(와) 다른 '{1}' 버전으로 생성되었기 때문에 이 프로젝트가 최신 상태가 아닙니다.", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "'{1}' 종속성의 출력이 변경되었기 때문에 '{0}' 프로젝트가 최신 상태가 아닙니다.", "Project_0_is_up_to_date_6361": "'{0}' 프로젝트가 최신 상태입니다.", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "최신 입력 '{1}'이(가) 가장 오래된 출력 '{2}'보다 오래되었기 때문에 '{0}' 프로젝트가 최신 상태입니다.", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "'{0}' 프로젝트는 종속성에 .d.ts 파일이 있는 최신 상태입니다.", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "참조할 프로젝트", "Property_0_does_not_exist_on_const_enum_1_2479": "'const' 열거형 '{1}'에 '{0}' 속성이 없습니다.", "Property_0_does_not_exist_on_type_1_2339": "'{1}' 형식에 '{0}' 속성이 없습니다.", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "속성 '{0}'이(가) '{1}' 형식에 없습니다. 'await' 사용을 잊으셨나요?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "'{0}' 속성이 '{1}' 형식에 없습니다. '{2}'을(를) 사용하시겠습니까?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "'{0}' 속성은 충돌하는 선언이 있고 '{1}' 형식에서 액세스할 수 없습니다.", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "속성 '{0}'은(는) 이니셜라이저가 없고 생성자에 할당되어 있지 않습니다.", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "'{0}' 속성에는 해당 get 접근자에 반환 형식 주석이 없으므로 암시적으로 'any' 형식이 포함됩니다.", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "'{0}' 속성에는 해당 set 접근자에 매개 변수 형식 주석이 없으므로 암시적으로 'any' 형식이 포함됩니다.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "'{0}' 속성은 암시적으로 'any' 형식이지만, 사용량에서 get 접근자의 더 나은 형식을 유추할 수 있습니다.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "'{0}' 속성은 암시적으로 'any' 형식이지만, 사용량에서 set 접근자의 더 나은 형식을 유추할 수 있습니다.", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "'{1}' 형식의 '{0}' 속성을 기본 형식 '{2}'의 동일한 속성에 할당할 수 없습니다.", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "'{1}' 형식의 '{0}' 속성을 '{2}' 형식에 할당할 수 없습니다.", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "'{1}' 형식의 '{0}' 속성이 '{2}' 형식 내에서 액세스할 수 없는 다른 멤버를 참조합니다.", + "Property_0_is_a_static_member_of_type_1_2576": "'{0}' 속성이 '{1}' 형식의 정적 멤버가 아님", "Property_0_is_declared_but_its_value_is_never_read_6138": "속성 '{0}'이(가) 선언은 되었지만 해당 값이 읽히지는 않았습니다.", "Property_0_is_incompatible_with_index_signature_2530": "'{0}' 속성이 인덱스 시그니처와 호환되지 않습니다.", + "Property_0_is_incompatible_with_rest_element_type_2573": "'{0}' 속성이 rest 요소 형식과 호환되지 않습니다.", "Property_0_is_missing_in_type_1_2324": "'{0}' 속성이 '{1}' 형식에 없습니다.", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "'{0}' 속성이 '{1}' 형식에 없지만 '{2}' 형식에서 필수입니다.", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "'{0}' 속성은 프라이빗 식별자를 포함하기 때문에 '{1}' 클래스 외부에서 액세스할 수 없습니다.", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "'{0}' 속성은 '{1}' 형식에서 선택적이지만 '{2}' 형식에서는 필수입니다.", "Property_0_is_private_and_only_accessible_within_class_1_2341": "'{0}' 속성은 private이며 '{1}' 클래스 내에서만 액세스할 수 있습니다.", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "'{0}' 속성은 '{1}' 형식에서 private이지만 '{2}' 형식에서는 그렇지 않습니다.", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "'{0}' 속성은 보호된 속성이지만 '{1}' 형식은 '{2}'에서 파생된 클래스가 아닙니다.", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "'{0}' 속성은 '{1}' 형식에서는 보호된 속성이지만 '{2}' 형식에서는 공용입니다.", "Property_0_is_used_before_being_assigned_2565": "'{0}' 속성이 할당되기 전에 사용되었습니다.", + "Property_0_is_used_before_its_initialization_2729": "초기화하기 전에 '{0}' 속성이 사용됩니다.", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "JSX 분배 특성의 '{0}' 속성을 대상 속성에 할당할 수 없습니다.", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "내보낸 클래스 식의 속성 '{0}'이(가) 프라이빗이 아니거나 보호되지 않을 수 있습니다.", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "내보낸 인터페이스의 '{0}' 속성이 프라이빗 모듈 '{2}'의 '{1}' 이름을 가지고 있거나 사용 중입니다.", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "내보낸 인터페이스의 '{0}' 속성이 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "'{1}' 형식의 '{0}' 속성을 숫자 인덱스 형식 '{2}'에 할당할 수 없습니다.", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "'{1}' 형식의 '{0}' 속성을 문자열 인덱스 형식 '{2}'에 할당할 수 없습니다.", + "Property_0_was_also_declared_here_2733": "여기서도 '{0}' 속성이 선언되었습니다.", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "'{0}' 속성은 '{1}'의 기본 속성을 덮어씁니다. 의도적인 경우 이니셜라이저를 추가합니다. 그렇지 않으면 'declare' 한정자를 추가하거나 중복 선언을 제거합니다.", "Property_assignment_expected_1136": "속성 할당이 필요합니다.", "Property_destructuring_pattern_expected_1180": "속성 구조 파괴 패턴이 필요합니다.", "Property_or_signature_expected_1131": "속성 또는 서명이 필요합니다.", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "내보낸 클래스에 있는 공용 정적 속성 '{0}'이(가) 외부 모듈 {2}의 '{1}' 이름을 가지고 있거나 사용 중이지만 명명할 수 없습니다.", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "내보낸 클래스의 공용 정적 속성 '{0}'이(가) 프라이빗 모듈 '{2}'의 '{1}' 이름을 가지고 있거나 사용 중입니다.", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "내보낸 클래스의 공용 정적 속성 '{0}'이(가) 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "정규화된 이름 '{0}'은(는) 선행 '@param {object} {1}'과(와) 함께 사용해야 합니다.", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "암시된 'any' 형식이 있는 식 및 선언에서 오류를 발생합니다.", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "암시된 'any' 형식이 있는 'this' 식에서 오류를 발생합니다.", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "'--isolatedModules' 플래그가 제공될 때 형식을 다시 내보내려면 'export type'을 사용해야 합니다.", "Redirect_output_structure_to_the_directory_6006": "출력 구조를 디렉터리로 리디렉션합니다.", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "참조되는 프로젝트 '{0}'에는 \"composite\": true 설정이 있어야 합니다.", + "Remove_all_unnecessary_uses_of_await_95087": "불필요한 'await' 사용 모두 제거", "Remove_all_unreachable_code_95051": "접근할 수 없는 코드 모두 제거", "Remove_all_unused_labels_95054": "사용되지 않는 레이블 모두 제거", "Remove_braces_from_arrow_function_95060": "화살표 함수에서 중괄호 제거", - "Remove_declaration_for_Colon_0_90004": "'{0}'에 대한 선언 제거", "Remove_destructuring_90009": "구조 파괴 제거", "Remove_import_from_0_90005": "'{0}'에서 가져오기 제거", + "Remove_template_tag_90011": "템플릿 태그 제거", + "Remove_type_parameters_90012": "형식 매개 변수 제거", + "Remove_unnecessary_await_95086": "불필요한 'await' 제거", "Remove_unreachable_code_95050": "접근할 수 없는 코드 제거", + "Remove_unused_declaration_for_Colon_0_90004": "'{0}'의 사용되지 않는 선언 제거", "Remove_unused_label_95053": "사용되지 않는 레이블 제거", "Remove_variable_statement_90010": "변수 문 제거", + "Replace_all_unused_infer_with_unknown_90031": "사용되지 않은 모든 'infer'를 'unknown'으로 바꾸기", "Replace_import_with_0_95015": "가져오기를 '{0}'(으)로 바꿉니다.", + "Replace_infer_0_with_unknown_90030": "'infer {0}'을(를) 'unknown'으로 바꾸기", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "함수의 일부 코드 경로가 값을 반환하지 않는 경우 오류를 보고합니다.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "switch 문의 fallthrough case에 대한 오류를 보고합니다.", "Report_errors_in_js_files_8019": ".js 파일의 오류를 보고합니다.", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "기본 검색 경로를 사용하여 확인하는 중...", "Resolving_with_primary_search_path_0_6121": "기본 검색 경로 '{0}'을(를) 사용하여 확인하는 중입니다.", "Rest_parameter_0_implicitly_has_an_any_type_7019": "Rest 매개 변수 '{0}'에는 암시적으로 'any[]' 형식이 포함됩니다.", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "Rest 매개 변수 '{0}'은(는) 암시적으로 'any[]' 형식이지만, 사용량에서 더 나은 형식을 유추할 수 있습니다.", + "Rest_signatures_are_incompatible_2572": "Rest 시그니처가 호환되지 않습니다.", "Rest_types_may_only_be_created_from_object_types_2700": "rest 유형은 개체 형식에서만 만들 수 있습니다.", + "Return_type_annotation_circularly_references_itself_2577": "반환 형식 주석이 자신을 순환 참조합니다.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "내보낸 인터페이스에 있는 호출 시그니처의 반환 형식이 프라이빗 모듈 '{1}'의 '{0}' 이름을 가지고 있거나 사용 중입니다.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "내보낸 인터페이스에 있는 호출 시그니처의 반환 형식이 프라이빗 이름 '{0}'을(를) 가지고 있거나 사용 중입니다.", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "내보낸 인터페이스에 있는 생성자 시그니처의 반환 형식이 프라이빗 모듈 '{1}'의 '{0}' 이름을 가지고 있거나 사용 중입니다.", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "루트 디렉터리를 확인할 수 없어 기본 검색 경로를 건너뜁니다.", "STRATEGY_6039": "전략", "Scoped_package_detected_looking_in_0_6182": "범위가 지정된 패키지가 검색되었습니다. '{0}'에서 찾습니다.", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "구성 파일의 'module' 옵션을 '{0}'(으)로 설정", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "구성 파일의 'target' 옵션을 '{0}'(으)로 설정", "Setters_cannot_return_a_value_2408": "Setter가 값을 반환할 수 없습니다.", "Show_all_compiler_options_6169": "모든 컴파일러 옵션을 표시합니다.", "Show_diagnostic_information_6149": "진단 정보를 표시합니다.", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "'{0}' 시그니처는 형식 조건자여야 합니다.", "Skip_type_checking_of_declaration_files_6012": "선언 파일 형식 검사를 건너뜁니다.", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "'{0}' 프로젝트의 빌드는 '{1}' 종속성에 오류가 있기 때문에 건너뜁니다.", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "일부 프로젝트를 찾을 수 없으므로 정리를 건너뛰는 중입니다.", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "'{1}' 종속성이 빌드되지 않았기 때문에 '{0}' 프로젝트의 빌드를 건너뛰는 중", "Source_Map_Options_6175": "소스 맵 옵션", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "특수화된 오버로드 시그니처는 특수화되지 않은 서명에 할당할 수 없습니다.", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "동적 가져오기의 지정자는 스프레드 요소일 수 없습니다.", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "ECMAScript 대상 버전을 'ES3'(기본값), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018' 또는 'ESNEXT'로 지정합니다.", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "ECMAScript 대상 버전 지정: 'ES3'(기본값), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020' 또는 'ESNEXT'.", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "JSX 코드 생성 'preserve', 'react-native' 또는 'react'를 지정합니다.", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "형식에만 사용되는 가져오기의 내보내기/확인 동작 지정", + "Specify_file_to_store_incremental_compilation_information_6380": "증분 컴파일 정보를 저장할 파일 지정", "Specify_library_files_to_be_included_in_the_compilation_6079": "컴파일에 포함할 라이브러리 파일을 지정합니다.", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "모듈 코드 생성을 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015' 또는 'ESNext'로 지정합니다.", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "모듈 코드 생성 지정: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020' 또는 'ESNext'.", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "모듈 확인 전략 지정: 'node'(Node.js) 또는 'classic'(TypeScript 1.6 이전).", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "파일 시스템 이벤트를 사용하여 만들지 못할 경우 폴링 조사식을 만들기 위한 전략 지정: 'FixedInterval'(기본값), 'PriorityInterval', 'DynamicPriority'.", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "기본적으로 재귀 감시를 지원하지 않는 플랫폼에서 디렉터리를 감시하기 위한 전략 지정: 'UseFsEvents'(기본값), 'FixedPollingInterval', 'DynamicPriorityPolling'.", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "파일을 감시하기 위한 전략 지정: 'FixedPollingInterval'(기본값), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'.", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "'react' JSX 내보내기를 대상으로 하는 경우 사용할 JSX 팩터리 함수를 지정합니다(예: 'React.createElement' 또는 'h').", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "파일을 내보낼 때 사용할 줄 시퀀스의 끝 지정: 'CRLF'(dos) 또는 'LF'(unix).", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "소스 위치 대신 디버거가 TypeScript 파일을 찾아야 하는 위치를 지정하세요.", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "생성된 위치 대신 디버거가 맵 파일을 찾아야 하는 위치를 지정하세요.", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "입력 파일의 루트 디렉터리를 지정하세요. --outDir이 포함된 출력 디렉터리 구조를 제어하는 데 사용됩니다.", + "Split_all_invalid_type_only_imports_1367": "잘못된 형식 전용 가져오기 모두 분할", + "Split_into_two_separate_import_declarations_1366": "두 개의 개별 가져오기 선언으로 분할", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "'new' 식에서 Spread 연산자는 ECMAScript 5 이상을 대상으로 하는 경우에만 사용할 수 있습니다.", "Spread_types_may_only_be_created_from_object_types_2698": "spread 유형은 개체 형식에서만 만들 수 있습니다.", "Starting_compilation_in_watch_mode_6031": "감시 모드에서 컴파일을 시작하는 중...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "후속 속성 선언에 같은 형식이 있어야 합니다. '{0}' 속성이 '{1}' 형식이어야 하는데 여기에는 '{2}' 형식이 있습니다.", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "후속 변수 선언에 같은 형식이 있어야 합니다. '{0}' 변수가 '{1}' 형식이어야 하는데 여기에는 '{2}' 형식이 있습니다.", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "'{1}' 패턴에 대한 '{0}' 대체의 형식이 잘못되었습니다. 'string'이 필요한데 '{2}'을(를) 얻었습니다.", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "'{1}' 패턴의 '{0}' 대체에는 '*' 문자를 최대 하나만 사용할 수 있습니다.", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "'{1}' 패턴의 '{0}' 대체에는 '*' 문자를 최대 하나만 사용할 수 있습니다.", "Substitutions_for_pattern_0_should_be_an_array_5063": "'{0}' 패턴에 대한 대체는 배열이 되어야 합니다.", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "패턴 '{0}'에 대한 대체에는 배열이 비어 있지 않아야 합니다.", "Successfully_created_a_tsconfig_json_file_6071": "tsconfig.json 파일을 만들었습니다.", @@ -840,78 +1033,121 @@ "Suppress_excess_property_checks_for_object_literals_6072": "개체 리터럴에 대한 초과 속성 검사를 생략합니다.", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "인덱스 시그니처가 없는 개체 인덱싱에 대한 noImplicitAny 오류를 표시하지 않습니다.", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "'기호' 참조에서 전역 기호 생성자 개체를 참조하지 않습니다.", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "비동기적으로 콜백을 호출하며 기본적으로 재귀 조사를 지원하지 않는 플랫폼에서 디렉터리 감시자의 상태를 업데이트합니다.", "Syntax_Colon_0_6023": "구문: {0}", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "태그가 지정된 템플릿 식은 선택적 체인에서 사용할 수 없습니다.", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "'{0}' 한정자는 TypeScript 파일에서만 사용할 수 있습니다.", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "'{0}' 연산자는 'symbol' 유형에 적용될 수 없습니다.", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "'{0}' 연산자는 부울 형식에 사용할 수 없습니다. 대신 '{1}'을(를) 사용하세요.", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "비동기 반복기의 '{0}' 속성은 메서드여야 합니다.", + "The_0_property_of_an_iterator_must_be_a_method_2767": "반복기의 '{0}' 속성은 메서드여야 합니다.", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "'Object' 형식은 할당할 수 있는 다른 형식이 거의 없습니다. 대신 'any' 형식을 사용할까요?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "'arguments' 개체는 ES3 및 ES5의 화살표 함수에서 참조할 수 없습니다. 표준 함수 식을 사용해 보세요.", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "'arguments' 개체는 ES3 및 ES5의 비동기 함수 또는 메서드에서 참조할 수 없습니다. 표준 함수 또는 메서드를 사용해 보세요.", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "'if' 문의 본문이 빈 문이면 안 됩니다.", "The_character_set_of_the_input_files_6163": "입력 파일의 문자 집합입니다.", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "포함하는 화살표 함수는 'this'의 전역 값을 캡처합니다.", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "제어 흐름 분석에 대해 포함된 함수 또는 모듈 본문이 너무 큽니다.", "The_current_host_does_not_support_the_0_option_5001": "현재 호스트가 '{0}' 옵션을 지원하지 않습니다.", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "사용하려는 '{0}'의 선언이 여기서 정의됩니다.", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "필요한 형식은 여기에서 '{1}' 형식에 선언된 '{0}' 속성에서 가져옵니다.", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "필요한 형식은 이 시그니처의 반환 형식에서 가져옵니다.", + "The_expected_type_comes_from_this_index_signature_6501": "필요한 형식은 이 인덱스 시그니처에서 가져옵니다.", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "내보내기 할당의 식은 앰비언트 컨텍스트의 식별자 또는 정규화된 이름이어야 합니다.", "The_files_list_in_config_file_0_is_empty_18002": "'{0}' 구성 파일의 '파일' 목록이 비어 있습니다.", + "The_first_export_default_is_here_2752": "첫 번째 내보내기 기본값은 여기에 있습니다.", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "프라미스에서 'then' 메서드의 첫 번째 매개 변수는 콜백이어야 합니다.", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "전역 형식 'JSX.{0}'에 속성이 둘 이상 있을 수 없습니다.", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "'import.meta' 메타 속성은 'target' 및 'module' 컴파일러 옵션에 'ESNext'를 사용해야만 허용됩니다.", + "The_implementation_signature_is_declared_here_2750": "여기에서는 구현 시그니처가 선언됩니다.", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "'import.meta' 메타 속성은 '--module' 옵션이 'esnext' 또는 'system'인 경우에만 사용할 수 있습니다.", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "'{0}'의 유추된 형식 이름을 지정하려면 '{1}'에 대한 참조가 있어야 합니다. 이식하지 못할 수 있습니다. 형식 주석이 필요합니다.", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "'{0}'의 유추 형식이 액세스할 수 없는 '{1}' 형식을 참조합니다. 형식 주석이 필요합니다.", + "The_last_overload_gave_the_following_error_2770": "마지막 오버로드에서 다음 오류가 발생했습니다.", + "The_last_overload_is_declared_here_2771": "여기서 마지막 오버로드가 선언됩니다.", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "'for...in' 문의 왼쪽에는 구조 파괴 패턴을 사용할 수 없습니다.", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "'for...in' 문의 왼쪽에는 형식 주석을 사용할 수 없습니다.", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "'for...in' 문의 왼쪽은 선택적 속성 액세스일 수 없습니다.", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "'for...in' 문의 왼쪽은 변수 또는 속성 액세스여야 합니다.", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "'for...in' 문의 왼쪽은 'string' 또는 'any' 형식이어야 합니다.", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "'for...of' 문의 왼쪽에는 형식 주석을 사용할 수 없습니다.", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "'for...of' 문의 왼쪽은 선택적 속성 액세스일 수 없습니다.", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "'for...of' 문의 왼쪽은 변수 또는 속성 액세스여야 합니다.", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "산술 연산 왼쪽은 'any', 'number' 또는 열거형 형식이어야 합니다.", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "산술 연산의 왼쪽은 'any', 'number', 'bigint' 또는 열거형 형식이어야 합니다.", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "할당 식의 왼쪽은 선택적 속성 액세스일 수 없습니다.", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "할당 식의 왼쪽은 변수 또는 속성 액세스여야 합니다.", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "'in' 식의 왼쪽은 'any', 'string', 'number' 또는 'symbol' 유형이어야 합니다.", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "'instanceof' 식 왼쪽은 'any' 형식, 개체 형식 또는 형식 매개 변수여야 합니다.", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "사용자에게 메시지를 표시할 때 사용되는 로캘입니다(예: 'en-us').", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "node_modules에서 검색하고 JavaScript 파일을 로드할 최대 종속성 깊이입니다.", - "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "delete 연산자의 피연산자는 읽기 전용 속성일 수 없습니다.", - "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "delete 연산자의 피연산자는 속성 참조여야 합니다.", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "'delete' 연산자의 피연산자는 프라이빗 식별자일 수 없습니다.", + "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "'delete' 연산자의 피연산자는 읽기 전용 속성일 수 없습니다.", + "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "'delete' 연산자의 피연산자는 속성 참조여야 합니다.", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "증분 또는 감소 연산자의 피연산자는 선택적 속성 액세스일 수 없습니다.", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "증가 또는 감소 연산자의 피연산자는 변수 또는 속성 액세스여야 합니다.", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "여기서 파서는 '{' 토큰과 일치하는 '}'를 찾아야 합니다.", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "철자가 동일한 다른 프라이빗 식별자에서 섀도 처리되기 때문에 이 클래스 내의 '{1}' 형식에서 '{0}' 속성에 액세스할 수 없습니다.", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "JSX 요소 생성자의 반환 형식은 개체 형식을 반환해야 합니다.", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "매개 변수 데코레이터 함수의 반환 형식은 'void' 또는 'any'여야 합니다.", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "속성 데코레이터 함수의 반환 형식은 'void' 또는 'any'여야 합니다.", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "비동기 함수의 반환 형식은 유효한 프라미스여야 하거나 호출 가능 'then' 멤버를 포함하지 않아야 합니다.", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "비동기 함수 또는 메서드의 반환 형식은 전역 Promise 형식이어야 합니다.", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "'for...in' 문 오른쪽은 'any' 형식, 개체 형식 또는 형식 매개 변수여야 하는데, 여기에 '{0}' 형식이 있습니다.", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "산술 연산 오른쪽은 'any', 'number' 또는 열거형 형식이어야 합니다.", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "산술 연산 오른쪽은 'any', 'number', 'bigint' 또는 열거형 형식이어야 합니다.", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "'in' 식의 오른쪽은 'any' 형식, 개체 형식 또는 형식 매개 변수여야 합니다.", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "'instanceof' 식 오른쪽은 'any' 형식이거나 'Function' 인터페이스 형식에 할당할 수 있는 형식이어야 합니다.", + "The_shadowing_declaration_of_0_is_defined_here_18017": "여기서는 '{0}'의 섀도 선언이 정의됩니다.", "The_specified_path_does_not_exist_Colon_0_5058": "지정된 경로가 없습니다. '{0}'.", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "할당의 대상은 변수 또는 속성 액세스여야 합니다.", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "개체 rest 할당의 대상은 선택적 속성 액세스일 수 없습니다.", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "개체 rest 할당의 대상은 변수 또는 속성 액세스여야 합니다.", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "'{0}' 형식의 'this' 컨텍스트를 메서드의 '{1}' 형식 'this'에 할당할 수 없습니다.", "The_this_types_of_each_signature_are_incompatible_2685": "각 시그니처의 'this' 형식이 호환되지 않습니다.", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "'{0}' 형식은 'readonly'이며 변경 가능한 형식 '{1}'에 할당할 수 없습니다.", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "사용량에서 형식 매개 변수 '{0}'의 형식 인수를 유추할 수 없습니다. 형식 인수를 명시적으로 지정하세요.", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "비동기 반복기의 'next()' 메서드에서 반환하는 형식은 'value' 속성이 있는 형식에 대한 프라미스여야 합니다.", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "반복기의 'next()' 메서드에 의해 반환되는 형식에는 'value' 속성이 있어야 합니다.", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "함수 선언의 형식은 함수의 시그니처와 일치해야 합니다.", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "비동기 반복기의 '{0}()' 메서드에서 반환하는 형식은 'value' 속성이 있는 형식에 대한 프라미스여야 합니다.", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "반복기의 '{0}()' 메서드에 의해 반환되는 형식에는 'value' 속성이 있어야 합니다.", + "The_types_of_0_are_incompatible_between_these_types_2200": "'{0}'의 형식은 해당 형식 간에 호환되지 않습니다.", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "'{0}'에서 반환되는 형식은 해당 형식 간에 호환되지 않습니다.", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "'for...in' 문의 변수 선언에 이니셜라이저가 포함될 수 없습니다.", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "'for...of' 문의 변수 선언에 이니셜라이저가 포함될 수 없습니다.", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "'with' 문은 지원되지 않습니다. 'with' 블록의 모든 기호가 'any' 형식이 됩니다.", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "이 JSX 태그의 '{0}' 속성에는 '{1}' 형식의 자식 하나가 필요하지만, 여러 자식이 제공되었습니다.", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "이 JSX 태그의 '{0}' 속성에는 여러 자식이 있어야 하는 '{1}' 형식이 필요하지만, 단일 자식만 제공되었습니다.", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "'{1}' 및 '{2}' 형식에 겹침이 없기 때문에 이 조건은 항상 '{0}'을(를) 반환합니다.", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "함수가 항상 정의되므로 이 조건은 항상 true를 반환합니다. 대신 호출하시겠습니까?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "이 생성자 함수는 클래스 선언으로 변환될 수 있습니다.", + "This_expression_is_not_callable_2349": "이 식은 호출할 수 없습니다.", + "This_expression_is_not_constructable_2351": "이 식은 생성할 수 없습니다.", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "이 가져오기는 값으로 사용되지 않아야 하며 'importsNotUsedAsValues'가 'error'로 설정되어 있기 때문에 'import type'을 사용해야 합니다.", + "This_may_be_converted_to_an_async_function_80006": "비동기 함수로 변환될 수 있습니다.", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "이 모듈은 '{0}' 플래그를 켜고 기본 내보내기를 참조하여 ECMAScript 가져오기/내보내기를 통해서만 참조할 수 있습니다.", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "이 모듈은 'export ='를 사용하여 선언되었으며 '{0}' 플래그를 사용하는 경우에만 기본 가져오기와 함께 사용할 수 있습니다.", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "이 오버로드 시그니처는 해당 구현 시그니처와 호환되지 않습니다.", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "이 매개 변수는 'use strict' 지시문에서 사용할 수 없습니다.", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "이 구문에는 가져온 도우미가 필요하지만 '{0}' 모듈을 찾을 수 없습니다.", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "이 구문에는 가져온 도우미 '{1}'이(가) 필요하지만 '{0}' 모듈에 내보낸 멤버 '{1}'이(가) 없습니다.", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "이 구문에는 '{0}'에 없는 '{1}'(이)라는 가져온 도우미가 필요합니다. '{0}'의 버전을 업그레이드하는 것이 좋습니다.", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "최상위 수준 'await' 식은 'module' 옵션이 'esnext' 또는 'system'으로 설정되고 'target' 옵션이 'es2017' 이상으로 설정된 경우에만 사용할 수 있습니다.", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": ".d.ts 파일의 최상위 수준 선언은 'declare' 또는 'export' 한정자로 시작해야 합니다.", "Trailing_comma_not_allowed_1009": "후행 쉼표는 허용되지 않습니다.", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "각 파일을 별도 모듈로 변환 컴파일합니다('ts.transpileModule'과 유사).", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "`npm install @types/{0}`이(가) 있으면 이를 사용하거나 `declare module '{0}';`이 포함된 선언(.d.ts) 파일을 추가하세요.", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "해당 항목이 있는 경우 'npm install @types/{1}'을(를) 시도하거나, 'declare module '{0}';'을(를) 포함하는 새 선언(.d.ts) 파일 추가", "Trying_other_entries_in_rootDirs_6110": "'rootDirs'의 다른 항목을 시도하는 중입니다.", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "'{0}' 대체를 시도하는 중입니다. 후보 모듈 위치: '{1}'.", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "길이가 '{1}'인 튜플 형식 '{0}'을(를) 길이가 '{2}'인 튜플에 할당할 수 없습니다.", - "Type_0_cannot_be_converted_to_type_1_2352": "'{0}' 형식을 '{1}' 형식으로 변환할 수 없습니다.", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "길이가 '{1}'인 튜플 형식 '{0}'의 인덱스 '{2}'에 요소가 없습니다.", + "Tuple_type_arguments_circularly_reference_themselves_4110": "튜플 형식 인수가 자신을 순환 참조합니다.", "Type_0_cannot_be_used_as_an_index_type_2538": "'{0}' 형식을 인덱스 형식으로 사용할 수 없습니다.", "Type_0_cannot_be_used_to_index_type_1_2536": "'{0}' 형식을 인덱스 형식 '{1}'에 사용할 수 없습니다.", "Type_0_does_not_satisfy_the_constraint_1_2344": "'{0}' 형식이 '{1}' 제약 조건을 만족하지 않습니다.", + "Type_0_has_no_call_signatures_2757": "'{0}' 형식에 호출 시그니처가 없습니다.", + "Type_0_has_no_construct_signatures_2761": "'{0}' 형식에 구문 시그니처가 없습니다.", "Type_0_has_no_matching_index_signature_for_type_1_2537": "'{0}' 형식에 '{1}' 형식에 대한 일치하는 인덱스 시그니처가 없습니다.", "Type_0_has_no_properties_in_common_with_type_1_2559": "'{0}' 유형에 '{1}' 유형과 공통적인 속성이 없습니다.", - "Type_0_has_no_property_1_2460": "'{0}' 형식에 '{1}' 속성이 없습니다.", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "'{0}' 형식에 '{1}' 속성과 문자열 인덱스 시그니처가 없습니다.", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "'{0}' 형식에 '{1}' 형식의 {2} 속성이 없습니다.", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "'{0}' 형식에 '{1}' 형식의 {2}, {3} 속성 등이 없습니다.", "Type_0_is_not_a_constructor_function_type_2507": "'{0}' 형식은 생성자 함수 형식이 아닙니다.", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "'{0}' 형식은 Promise 호환 생성자 값을 참조하지 않으므로 ES5/ES3에서 유효한 비동기 함수 반환 형식이 아닙니다.", "Type_0_is_not_an_array_type_2461": "'{0}' 형식은 배열 형식이 아닙니다.", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "'{0}' 형식이 배열 형식이 아닙니다. 컴파일러 옵션 '-downlevelIteration'을 사용하여 반복기의 반복을 허용하세요.", "Type_0_is_not_an_array_type_or_a_string_type_2495": "'{0}' 형식은 배열 형식 또는 문자열 형식이 아닙니다.", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "'{0}' 형식이 배열 형식 또는 문자열 형식이 아닙니다. 컴파일러 옵션 '-downlevelIteration'을 사용하여 반복기의 반복을 허용하세요.", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "'{0}' 형식은 배열 형식 또는 문자열 형식이 아니거나, 반복기를 반환하는 '[Symbol.iterator]()' 메서드가 없습니다.", @@ -926,17 +1162,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "Type '{0}' 형식은 자기 자신을 기본 형식으로 재귀적으로 참조합니다.", "Type_alias_0_circularly_references_itself_2456": "'{0}' 형식 별칭은 순환적으로 자신을 참조합니다.", "Type_alias_name_cannot_be_0_2457": "형식 별칭 이름은 '{0}'일 수 없습니다.", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "형식 별칭은 TypeScript 파일에서만 사용할 수 있습니다.", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "형식 주석은 생성자 선언에 표시될 수 없습니다.", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "형식 주석은 TypeScript 파일에서만 사용할 수 있습니다.", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "형식 인수 후보 '{1}'은(는) '{0}' 후보의 상위 형식이 아니므로 유효한 형식 인수가 아닙니다.", "Type_argument_expected_1140": "형식 인수가 필요합니다.", "Type_argument_list_cannot_be_empty_1099": "형식 인수 목록은 비워 둘 수 없습니다.", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "형식 인수는 TypeScript 파일에서만 사용할 수 있습니다.", "Type_arguments_cannot_be_used_here_1342": "형식 인수를 여기에 사용할 수 없습니다.", + "Type_arguments_for_0_circularly_reference_themselves_4109": "'{0}'의 형식 인수가 자신을 순환 참조합니다.", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "형식 어설션 식은 TypeScript 파일에서만 사용할 수 있습니다.", "Type_declaration_files_to_be_included_in_compilation_6124": "컴파일에 포함할 선언 파일을 입력하세요.", "Type_expected_1110": "형식이 필요합니다.", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "형식 인스턴스화는 깊이가 매우 깊으며 무한할 수도 있습니다.", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "형식은 자체 'then' 메서드의 처리 콜백에서 직간접적으로 참조됩니다.", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "'await' 형식의 피연산자는 유효한 프라미스여야 하거나 호출 가능 'then' 멤버를 포함하지 않아야 합니다.", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "계산된 속성 값의 형식은 '{1}' 형식에 할당할 수 없는 '{0}'입니다.", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "'yield*'의 반복되는 요소 형식의 피연산자는 유효한 프라미스여야 하거나 호출 가능 'then' 멤버를 포함하지 않아야 합니다.", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "비동기 생성기에 있는 'yield' 형식의 피연산자는 유효한 프라미스여야 하거나 호출 가능 'then' 멤버를 포함하지 않아야 합니다.", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "형식이 이 가져오기에서 시작됩니다. 네임스페이스 스타일 가져오기는 호출하거나 생성할 수 없으며, 런타임에 오류를 초래합니다. 여기서는 대신 기본 가져오기 또는 가져오기 필요를 사용하는 것이 좋습니다.", "Type_parameter_0_has_a_circular_constraint_2313": "형식 매개 변수 '{0}'에 순환 제약 조건이 있습니다.", "Type_parameter_0_has_a_circular_default_2716": "형식 매개 변수 '{0}'에 순환 기본값이 있습니다.", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "내보낸 인터페이스에 있는 호출 시그니처의 형식 매개 변수 '{0}'이(가) 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", @@ -944,17 +1188,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "내보낸 클래스의 형식 매개 변수 '{0}'이(가) 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "내보낸 함수의 형식 매개 변수 '{0}'이(가) 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "내보낸 인터페이스의 형식 매개 변수 '{0}'이(가) 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "내보낸 매핑된 개체 형식의 형식 매개 변수 '{0}'이(가) 프라이빗 이름 '{1}'을(를) 사용 중입니다.", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "내보낸 형식 별칭의 형식 매개 변수 '{0}'이(가) 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "내보낸 인터페이스에 있는 메서드의 형식 매개 변수 '{0}'이(가) 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "내보낸 클래스에 있는 공용 메서드의 형식 매개 변수 '{0}'이(가) 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "내보낸 클래스에 있는 공용 정적 메서드의 형식 매개 변수 '{0}'이(가) 프라이빗 이름 '{1}'을(를) 가지고 있거나 사용 중입니다.", "Type_parameter_declaration_expected_1139": "형식 매개 변수 선언이 필요합니다.", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "형식 매개 변수 선언은 TypeScript 파일에서만 사용할 수 있습니다.", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "형식 매개 변수 기본값은 이전에 선언된 형식 매개 변수만 참조할 수 있습니다.", "Type_parameter_list_cannot_be_empty_1098": "형식 매개 변수 목록은 비워 둘 수 없습니다.", "Type_parameter_name_cannot_be_0_2368": "형식 매개 변수 이름은 '{0}'일 수 없습니다.", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "형식 매개 변수는 생성자 선언에 표시될 수 없습니다.", "Type_predicate_0_is_not_assignable_to_1_1226": "형식 조건자 '{0}'을(를) '{1}'에 할당할 수 없습니다.", "Type_reference_directive_0_was_not_resolved_6120": "======== 형식 참조 지시문 '{0}'이(가) 확인되지 않았습니다. ========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== 형식 참조 지시문 '{0}'이(가) '{1}'(으)로 확인되었습니다. 주: {2}. ========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== 형식 참조 지시문 '{0}'이(가) 패키지 ID가 '{2}'인 '{1}'(으)로 확인되었습니다. 주: {3}. ========", "Types_have_separate_declarations_of_a_private_property_0_2442": "형식에 별도의 프라이빗 속성 '{0}' 선언이 있습니다.", "Types_of_parameters_0_and_1_are_incompatible_2328": "'{0}' 및 '{1}' 매개 변수의 형식이 호환되지 않습니다.", "Types_of_property_0_are_incompatible_2326": "'{0}' 속성의 형식이 호환되지 않습니다.", @@ -967,10 +1215,18 @@ "Unexpected_token_1012": "예기치 않은 토큰입니다.", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "예기치 않은 토큰입니다. 생성자, 메서드, 접근자 또는 속성이 필요합니다.", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "예기치 않은 토큰입니다. 중괄호가 없는 형식 매개 변수 이름이 필요합니다.", + "Unexpected_token_Did_you_mean_or_gt_1382": "예기치 않은 토큰입니다. '{'>'}' 또는 '>'를 사용하시겠습니까?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "예기치 않은 토큰입니다. '{'}'}' 또는 '}'를 사용하시겠습니까?", "Unexpected_token_expected_1179": "예기치 않은 토큰입니다. '{'가 있어야 합니다.", + "Unknown_build_option_0_5072": "알 수 없는 빌드 옵션 '{0}'입니다.", + "Unknown_build_option_0_Did_you_mean_1_5077": "알 수 없는 빌드 옵션 '{0}'입니다. '{1}'을(를) 사용하시겠습니까?", "Unknown_compiler_option_0_5023": "알 수 없는 컴파일러 옵션 '{0}'입니다.", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "알 수 없는 컴파일러 옵션 '{0}'입니다. '{1}'을(를) 사용하시겠습니까?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "알 수 없는 옵션 'excludes'입니다. 'exclude'를 사용하시겠습니까?", "Unknown_type_acquisition_option_0_17010": "알 수 없는 형식 인식 옵션 '{0}'입니다.", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "알 수 없는 형식 인식 옵션 '{0}'입니다. '{1}'을(를) 사용하시겠습니까?", + "Unknown_watch_option_0_5078": "알 수 없는 조사식 옵션 '{0}'입니다.", + "Unknown_watch_option_0_Did_you_mean_1_5079": "알 수 없는 조사식 옵션 '{0}'입니다. '{1}'을(를) 사용하시겠습니까?", "Unreachable_code_detected_7027": "접근할 수 없는 코드가 있습니다.", "Unsupported_locale_0_6049": "지원되지 않는 로캘 '{0}'입니다.", "Unterminated_Unicode_escape_sequence_1199": "종결되지 않은 유니코드 이스케이프 시퀀스입니다.", @@ -980,34 +1236,52 @@ "Unterminated_template_literal_1160": "종결되지 않은 템플릿 리터럴입니다.", "Untyped_function_calls_may_not_accept_type_arguments_2347": "형식화되지 않은 함수 호출에는 형식 인수를 사용할 수 없습니다.", "Unused_label_7028": "사용되지 않는 레이블입니다.", + "Updating_output_of_project_0_6373": "'{0}' 프로젝트의 출력을 업데이트하는 중...", "Updating_output_timestamps_of_project_0_6359": "'{0}' 프로젝트의 출력 타임스탬프를 업데이트하는 중...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "'{0}' 프로젝트의 변경되지 않은 출력 타임스탬프를 업데이트하는 중...", "Use_synthetic_default_member_95016": "가상 '기본' 멤버를 사용합니다.", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "ECMAScript 5 이상에서만 'for...of' 문에서 문자열을 사용할 수 있습니다.", + "Using_compiler_options_of_project_reference_redirect_0_6215": "프로젝트 참조 리디렉션 '{0}'의 컴파일러 옵션을 사용 중입니다.", "VERSION_6036": "버전", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "'{0}' 형식의 값에 '{1}' 형식과 공통된 속성이 없습니다. 속성을 호출하려고 했습니까?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "'{0}' 형식의 값은 호출할 수 없습니다. 'new'를 포함하려고 했습니까?", "Variable_0_implicitly_has_an_1_type_7005": "'{0}' 변수에는 암시적으로 '{1}' 형식이 포함됩니다.", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "'{0}' 변수는 암시적으로 '{1}' 형식이지만, 사용량에서 더 나은 형식을 유추할 수 있습니다.", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "'{0}' 변수는 몇몇 위치에서 암시적으로 '{1}' 형식이지만, 사용량에서 더 나은 형식을 유추할 수 있습니다.", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "'{0}' 변수는 형식을 확인할 수 없는 경우 일부 위치에서 암시적으로 '{1}' 형식입니다.", "Variable_0_is_used_before_being_assigned_2454": "'{0}' 변수가 할당되기 전에 사용되었습니다.", "Variable_declaration_expected_1134": "변수 선언이 필요합니다.", "Variable_declaration_list_cannot_be_empty_1123": "변수 선언 목록은 비워 둘 수 없습니다.", "Version_0_6029": "버전 {0}", "Watch_input_files_6005": "조사식 입력 파일입니다.", + "Watch_option_0_requires_a_value_of_type_1_5080": "조사식 옵션 '{0}'에 {1} 형식의 값이 필요합니다.", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "화면을 지우지 않고, 감시 모드의 오래된 콘솔 출력을 유지할지 여부입니다.", + "Wrap_invalid_character_in_an_expression_container_95101": "식 컨테이너에서 잘못된 문자 래핑", + "You_cannot_rename_a_module_via_a_global_import_8031": "전역 가져오기를 통해 모듈 이름을 바꿀 수 없습니다.", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "표준 TypeScript 라이브러리에 정의된 요소의 이름을 바꿀 수 없습니다.", "You_cannot_rename_this_element_8000": "이 요소의 이름을 바꿀 수 없습니다.", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "'{0}'이(가) 여기에서 decorator로 사용할 인수를 너무 적게 허용합니다. 먼저 이를 호출하고 '@{0}()'을(를) 작성하시겠습니까?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "'{0}' 및 '{1}' 작업은 괄호 없이 혼합해서 사용할 수 없습니다.", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "'{0}'이(가) 두 번 지정되었습니다. 이름이 '{0}'인 특성을 덮어씁니다.", - "_0_can_only_be_used_in_a_ts_file_8009": "'{0}'은(는) .ts 파일에서만 사용할 수 있습니다.", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "'{0}'은(는) 'export type'을 사용하여 내보냈으므로 값으로 사용할 수 없습니다.", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "'{0}'은(는) 'import type'을 사용하여 가져왔으므로 값으로 사용할 수 없습니다.", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "'{0}' 구성 요소는 텍스트를 자식 요소로 수락하지 않습니다. JSX의 텍스트는 'string' 형식이지만, '{1}'의 필요한 형식은 '{2}'입니다.", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "'{0}' 선언은 TypeScript 파일에서만 사용할 수 있습니다.", "_0_expected_1005": "'{0}'이(가) 필요합니다.", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "'{0}'은(는) 암시적으로 '{1}' 반환 형식이지만, 사용량에서 더 나은 형식을 유추할 수 있습니다.", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "반환 형식 주석이 없고 반환 식 중 하나에서 직간접적으로 참조되므로 '{0}'에는 암시적으로 'any' 반환 형식이 포함됩니다.", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "'{0}'은(는) 형식 주석이 없고 자체 이니셜라이저에서 직간접적으로 참조되므로 암시적으로 'any' 형식입니다.", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "{0}'은(는) 기본 개체이지만 '{1}'은(는) 래퍼 개체입니다. 가능한 경우 '{0}'을(를) 사용하세요.", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "'{0}'은(는) '{1}' 형식의 제약 조건에 할당할 수 있지만, '{1}'은(는) '{2}' 제약 조건의 다른 하위 형식으로 인스턴스화할 수 있습니다.", "_0_is_declared_but_its_value_is_never_read_6133": "'{0}'이(가) 선언은 되었지만 해당 값이 읽히지는 않았습니다.", "_0_is_declared_but_never_used_6196": "'{0}'이(가) 선언되었지만 사용되지 않았습니다.", + "_0_is_declared_here_2728": "여기서는 '{0}'이(가) 선언됩니다.", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "'{0}'은(는) '{1}' 클래스의 속성으로 정의되지만, '{2}'에서 접근자로 재정의됩니다.", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "'{0}'은(는) '{1}' 클래스의 접근자로 정의되지만, '{2}'에서 인스턴스 속성으로 재정의됩니다.", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}'은(는) '{1}' 키워드에 대한 올바른 메타 속성이 아닙니다. '{2}'을(를) 사용하시겠습니까?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}'은(는) 자체 기본 식에서 직간접적으로 참조됩니다.", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}'은(는) 자체 형식 주석에서 직간접적으로 참조됩니다.", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}'이(가) 두 번 이상 지정되어 이 사용량을 덮어씁니다.", "_0_list_cannot_be_empty_1097": "'{0}' 목록은 비워 둘 수 없습니다.", "_0_modifier_already_seen_1030": "'{0}' 한정자가 이미 있습니다.", "_0_modifier_cannot_appear_on_a_class_element_1031": "'{0}' 한정자는 클래스 요소에 나타날 수 없습니다.", @@ -1021,17 +1295,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "'{0}' 한정자는 앰비언트 컨텍스트에서 사용할 수 없습니다.", "_0_modifier_cannot_be_used_with_1_modifier_1243": "'{0}' 한정자는 '{1}' 한정자와 함께 사용할 수 없습니다.", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "'{0}' 한정자는 클래스 선언에서 사용할 수 없습니다.", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "'{0}' 한정자는 프라이빗 식별자와 함께 사용할 수 없습니다.", "_0_modifier_must_precede_1_modifier_1029": "'{0}' 한정자는 '{1}' 한정자 앞에 와야 합니다.", + "_0_needs_an_explicit_type_annotation_2782": "'{0}'에는 명시적 형식 주석이 필요합니다.", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "'{0}'은(는) 형식만 참조하지만, 여기서는 네임스페이스로 사용되고 있습니다.", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "'{0}'은(는) 형식만 참조하지만, 여기서는 값으로 사용되고 있습니다.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "'{0}'은(는) 형식만 참조하지만, 여기서는 값으로 사용되고 있습니다. 대상 라이브러리를 변경하려는 경우 'lib' 컴파일러 옵션을 es2015 이상으로 변경해 봅니다.", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "'{0}'은(는) UMD 전역을 참조하지만 현재 파일은 모듈입니다. 대신 가져오기를 추가해 보세요.", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "'{0}'은(는) 값을 참조하지만, 여기서는 형식으로 사용되고 있습니다.", "_0_tag_already_specified_1223": "'{0}' 태그가 이미 지정되었습니다.", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "'{0}' 태그를 개별적으로 최상위 JSDoc 태그로 사용할 수 없습니다.", + "_0_was_also_declared_here_6203": "여기서도 '{0}'이(가) 선언되었습니다.", + "_0_was_exported_here_1377": "여기서는 '{0}'을(를) 내보냈습니다.", + "_0_was_imported_here_1376": "여기서는 '{0}'을(를) 가져왔습니다.", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "반환 형식 주석이 없는 '{0}'에는 암시적으로 '{1}' 반환 형식이 포함됩니다.", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "반환 형식 주석이 없는 '{0}'에는 암시적으로 '{1}' yield 형식이 포함됩니다.", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "'abstract' 한정자는 클래스, 메서드 또는 속성 선언에만 나타날 수 있습니다.", - "await_expression_is_only_allowed_within_an_async_function_1308": "'await' 식은 비동기 함수 내에서만 사용할 수 있습니다.", + "and_here_6204": "및 여기.", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "'await' 식은 파일이 모듈일 경우 해당 파일의 최상위 수준에서만 사용할 수 있지만, 이 파일에는 가져오기 또는 내보내기가 없습니다. 빈 'export {}'를 추가하여 이 파일을 모듈로 만드는 것이 좋습니다.", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "'await' 식은 비동기 함수 내부 및 모듈의 최상위 수준에서만 사용할 수 있습니다.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "'await' 식은 매개 변수 이니셜라이저에서 사용할 수 없습니다.", + "await_has_no_effect_on_the_type_of_this_expression_80007": "'await'는 이 식의 형식에 영향을 주지 않습니다.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "'baseUrl' 옵션이 '{0}'(으)로 설정되어 있습니다. 상대적이지 않은 모듈 이름 '{1}'을(를) 확인하려면 이 값을 사용합니다.", + "can_only_be_used_at_the_start_of_a_file_18026": "'#!'는 파일의 시작 부분에서만 사용할 수 있습니다.", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "'='는 구조 파괴 할당 내의 개체 리터럴 속성에서만 사용할 수 있습니다.", "case_or_default_expected_1130": "'case' 또는 'default'가 필요합니다.", "class_expressions_are_not_currently_supported_9003": "'class' 식은 현재 지원되지 않습니다.", @@ -1039,11 +1325,12 @@ "const_declarations_must_be_initialized_1155": "'const' 선언은 초기화해야 합니다.", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "'const' 열거형 멤버 이니셜라이저가 무한 값에 대해 평가되었습니다.", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "'const' 열거형 멤버 이니셜라이저가 허용되지 않은 'NaN' 값에 대해 평가되었습니다.", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "const 열거형 멤버 이니셜라이저에는 리터럴 값과 다른 계산된 열거형 값만 사용할 수 있습니다.", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "'const' 열거형은 속성이나 인덱스 액세스 식, 또는 내보내기 할당이나 가져오기 선언의 오른쪽, 또는 형식 쿼리에서만 사용할 수 있습니다.", + "constructor_is_a_reserved_word_18012": "'#constructor'는 예약어입니다.", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "strict 모드에서는 식별자에 대해 'delete'를 호출할 수 없습니다.", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "이 항목 삭제 - '{0}' 프로젝트는 이전에 빌드되었기 때문에 최신 상태입니다.", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "'enum 선언'은 .ts 파일에서만 사용할 수 있습니다.", - "export_can_only_be_used_in_a_ts_file_8003": "'export='는 .ts 파일에서만 사용할 수 있습니다.", + "export_can_only_be_used_in_TypeScript_files_8003": "'export ='는 TypeScript 파일에서만 사용할 수 있습니다.", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "앰비언트 모듈 및 모듈 확대는 항상 표시되므로 'export' 한정자를 적용할 수 없습니다.", "extends_clause_already_seen_1172": "'extends' 절이 이미 있습니다.", "extends_clause_must_precede_implements_clause_1173": "'extends' 절은 'implements' 절 앞에 와야 합니다.", @@ -1053,23 +1340,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "'get' 및 'set' 접근자는 동일한 'this' 형식이어야 합니다.", "get_and_set_accessor_must_have_the_same_type_2380": "'get' 및 'set' 접근자의 형식이 같아야 합니다.", "implements_clause_already_seen_1175": "'implements' 절이 이미 있습니다.", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "'implements clauses'는 .ts 파일에서만 사용할 수 있습니다.", - "import_can_only_be_used_in_a_ts_file_8002": "'import ... ='는 .ts 파일에서만 사용할 수 있습니다.", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "'implements' 절은 TypeScript 파일에서만 사용할 수 있습니다.", + "import_can_only_be_used_in_TypeScript_files_8002": "'import ... ='는 TypeScript 파일에서만 사용할 수 있습니다.", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "'infer' 선언은 조건 형식의 'extends' 절에서만 사용할 수 있습니다.", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "'interface declarations'는 .ts 파일에서만 사용할 수 있습니다.", "let_declarations_can_only_be_declared_inside_a_block_1157": "'let' 선언은 블록 내부에서만 선언될 수 있습니다.", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "'let'은 'let' 또는 'const' 선언에서 이름으로 사용할 수 없습니다.", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "'module declarations'는 .ts 파일에서만 사용할 수 있습니다.", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "배열을 만드는 데 'new T[]'를 사용할 수 없습니다. 대신 'new Array()'를 사용하세요.", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "대상에 구문 시그니처가 없는 'new' 식에는 암시적으로 'any' 형식이 포함됩니다.", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "'non-null assertions'는 .ts 파일에서만 사용할 수 있습니다.", "options_6024": "옵션", "or_expected_1144": "'{' 또는 ';'이(가) 필요합니다.", "package_json_does_not_have_a_0_field_6100": "'package.json'에는 '{0}' 필드가 없습니다.", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "'package.json'에 '{0}' 버전과 일치하는 'typesVersions' 항목이 없습니다.", + "package_json_had_a_falsy_0_field_6220": "'package.json'에 false로 평가되는 '{0}' 필드가 있습니다.", "package_json_has_0_field_1_that_references_2_6101": "'package.json'에 '{2}'을(를) 참조하는 '{0}' 필드 '{1}'이(가) 있습니다.", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "'매개 변수 한정자'는 .ts 파일에서만 사용할 수 있습니다.", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "'package.json'에 유효한 semver 범위가 아닌 'typesVersions' 항목 '{0}'이(가) 있습니다.", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "모듈 이름 '{2}'과(와) 일치하는 패턴을 검색하는 컴파일러 버전 '{1}'과(와) 일치하는 'typesVersions' 항목 '{0}'이(가) 'package.json'에 있습니다.", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "'package.json'에 버전별 경로 매핑이 포함된 'typesVersions' 필드가 있습니다.", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "'paths' 옵션이 지정되었습니다. 모듈 이름 '{0}'과(와) 일치하는 패턴을 찾는 중입니다.", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "'readonly' 한정자는 속성 선언 또는 인덱스 시그니처에만 나타날 수 있습니다.", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "'readonly' 형식 한정자는 배열 및 튜플 리터럴 형식에서만 사용할 수 있습니다.", "require_call_may_be_converted_to_an_import_80005": "'require' 호출이 가져오기로 변환될 수 있습니다.", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "'rootDirs' 옵션이 설정되어 있습니다. 상대 모듈 이름 '{0}'을(를) 확인하려면 이 옵션을 사용합니다.", "super_can_only_be_referenced_in_a_derived_class_2335": "파생 클래스에서만 'super'를 참조할 수 있습니다.", @@ -1077,6 +1365,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "'super'는 계산된 속성 이름에서 참조할 수 없습니다.", "super_cannot_be_referenced_in_constructor_arguments_2336": "super'는 생성자 인수에서 참조할 수 없습니다.", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "옵션 'target'이 'ES2015' 이상인 경우 개체 리터럴 식의 멤버에서만 'super'를 사용할 수 있습니다.", + "super_may_not_use_type_arguments_2754": "'super'는 형식 인수를 사용할 수 없습니다.", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "파생 클래스의 생성자에서 'super'의 속성에 액세스하기 전에 'super'를 호출해야 합니다.", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "파생 클래스의 생성자에서 'this'에 액세스하기 전에 'super'를 호출해야 합니다.", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "'super' 다음에는 인수 목록 또는 멤버 액세스가 와야 합니다.", @@ -1087,14 +1376,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "생성자 인수에서 'this'를 참조할 수 없습니다.", "this_cannot_be_referenced_in_current_location_2332": "현재 위치에서 'this'를 참조할 수 없습니다.", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "'this'에는 형식 주석이 없으므로 암시적으로 'any' 형식이 포함됩니다.", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "'type aliases'는 .ts 파일에서만 사용할 수 있습니다.", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "'type arguments'는 .ts 파일에서만 사용할 수 있습니다.", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "'type assertion expressions'는 .ts 파일에서만 사용할 수 있습니다.", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "'type parameter declarations'는 .ts 파일에서만 사용할 수 있습니다.", - "types_can_only_be_used_in_a_ts_file_8010": "'types'는 .ts 파일에서만 사용할 수 있습니다.", "unique_symbol_types_are_not_allowed_here_1335": "여기에서 'unique symbol' 형식은 허용되지 않습니다.", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "'unique symbol' 형식은 변수 문의 변수에만 허용됩니다.", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "'unique symbol' 형식은 바인딩 이름과 함께 변수 선언에 사용할 수 없습니다.", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "'use strict' 지시문은 단순하지 않은 매개 변수 목록에서 사용할 수 없습니다.", + "use_strict_directive_used_here_1349": "여기서는 'use strict' 지시문이 사용됩니다.", "with_statements_are_not_allowed_in_an_async_function_block_1300": "'with' 문은 비동기 함수 블록에서 사용할 수 없습니다.", "with_statements_are_not_allowed_in_strict_mode_1101": "'with' 문은 strict 모드에서 사용할 수 없습니다.", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "'yield' 식은 매개 변수 이니셜라이저에서 사용할 수 없습니다." diff --git a/lib/lib.d.ts b/lib/lib.d.ts index 38a1cc0179bef..9152c4dfcef7e 100644 --- a/lib/lib.d.ts +++ b/lib/lib.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.dom.d.ts b/lib/lib.dom.d.ts index 1665e95c9c987..81ab89760dceb 100644 --- a/lib/lib.dom.d.ts +++ b/lib/lib.dom.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.dom.iterable.d.ts b/lib/lib.dom.iterable.d.ts index e5db9c136745b..f8a7b15b3f765 100644 --- a/lib/lib.dom.iterable.d.ts +++ b/lib/lib.dom.iterable.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2015.collection.d.ts b/lib/lib.es2015.collection.d.ts index dc93004c04b45..dc154ca17e78b 100644 --- a/lib/lib.es2015.collection.d.ts +++ b/lib/lib.es2015.collection.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2015.core.d.ts b/lib/lib.es2015.core.d.ts index e0c83ad4647a6..728fc76de3398 100644 --- a/lib/lib.es2015.core.d.ts +++ b/lib/lib.es2015.core.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2015.d.ts b/lib/lib.es2015.d.ts index 80aaba05b249b..339832b546e6b 100644 --- a/lib/lib.es2015.d.ts +++ b/lib/lib.es2015.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2015.generator.d.ts b/lib/lib.es2015.generator.d.ts index 25b733b07f938..78f9fd5bd430a 100644 --- a/lib/lib.es2015.generator.d.ts +++ b/lib/lib.es2015.generator.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2015.iterable.d.ts b/lib/lib.es2015.iterable.d.ts index 051d3f26eb8eb..85d0a4caf6daf 100644 --- a/lib/lib.es2015.iterable.d.ts +++ b/lib/lib.es2015.iterable.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2015.promise.d.ts b/lib/lib.es2015.promise.d.ts index 1c73467ea41f0..3eead14f7d85b 100644 --- a/lib/lib.es2015.promise.d.ts +++ b/lib/lib.es2015.promise.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2015.proxy.d.ts b/lib/lib.es2015.proxy.d.ts index 440897038ef73..19e9d5aa6befc 100644 --- a/lib/lib.es2015.proxy.d.ts +++ b/lib/lib.es2015.proxy.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2015.reflect.d.ts b/lib/lib.es2015.reflect.d.ts index 1139f1c2c89f1..b6057e6a6f00d 100644 --- a/lib/lib.es2015.reflect.d.ts +++ b/lib/lib.es2015.reflect.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2015.symbol.d.ts b/lib/lib.es2015.symbol.d.ts index bf09484d5fb56..253d2806ce7b0 100644 --- a/lib/lib.es2015.symbol.d.ts +++ b/lib/lib.es2015.symbol.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2015.symbol.wellknown.d.ts b/lib/lib.es2015.symbol.wellknown.d.ts index 400f70a7f4d7c..2c881993c767a 100644 --- a/lib/lib.es2015.symbol.wellknown.d.ts +++ b/lib/lib.es2015.symbol.wellknown.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2016.array.include.d.ts b/lib/lib.es2016.array.include.d.ts index 734fa450daf53..6bc6ef30e7e42 100644 --- a/lib/lib.es2016.array.include.d.ts +++ b/lib/lib.es2016.array.include.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2016.d.ts b/lib/lib.es2016.d.ts index b2d59b8d4d665..ade8175f52cd1 100644 --- a/lib/lib.es2016.d.ts +++ b/lib/lib.es2016.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2016.full.d.ts b/lib/lib.es2016.full.d.ts index 6ecfe0a67b404..ad61d232522c1 100644 --- a/lib/lib.es2016.full.d.ts +++ b/lib/lib.es2016.full.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2017.d.ts b/lib/lib.es2017.d.ts index 850e81d0f358f..d89f58071b0cb 100644 --- a/lib/lib.es2017.d.ts +++ b/lib/lib.es2017.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2017.full.d.ts b/lib/lib.es2017.full.d.ts index 46d2ee836fa0f..f57c645c5c76f 100644 --- a/lib/lib.es2017.full.d.ts +++ b/lib/lib.es2017.full.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2017.intl.d.ts b/lib/lib.es2017.intl.d.ts index 25b1fa5fa761d..f20c149f2824d 100644 --- a/lib/lib.es2017.intl.d.ts +++ b/lib/lib.es2017.intl.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2017.object.d.ts b/lib/lib.es2017.object.d.ts index aaea4246c8335..4900d9261e2f0 100644 --- a/lib/lib.es2017.object.d.ts +++ b/lib/lib.es2017.object.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2017.sharedmemory.d.ts b/lib/lib.es2017.sharedmemory.d.ts index e3fb0c73b653f..f9adca0324ad0 100644 --- a/lib/lib.es2017.sharedmemory.d.ts +++ b/lib/lib.es2017.sharedmemory.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2017.string.d.ts b/lib/lib.es2017.string.d.ts index dad64f0d8642b..4b219e6c5c570 100644 --- a/lib/lib.es2017.string.d.ts +++ b/lib/lib.es2017.string.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2017.typedarrays.d.ts b/lib/lib.es2017.typedarrays.d.ts index 4f6f6e72d307e..ac6984100f5c3 100644 --- a/lib/lib.es2017.typedarrays.d.ts +++ b/lib/lib.es2017.typedarrays.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2018.asyncgenerator.d.ts b/lib/lib.es2018.asyncgenerator.d.ts index 61eb9c39af2f4..546a8c2e99613 100644 --- a/lib/lib.es2018.asyncgenerator.d.ts +++ b/lib/lib.es2018.asyncgenerator.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2018.asynciterable.d.ts b/lib/lib.es2018.asynciterable.d.ts index 8eebde36364b2..2c3a970854e5d 100644 --- a/lib/lib.es2018.asynciterable.d.ts +++ b/lib/lib.es2018.asynciterable.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2018.d.ts b/lib/lib.es2018.d.ts index 24ce0dc05016b..73cb9812847f5 100644 --- a/lib/lib.es2018.d.ts +++ b/lib/lib.es2018.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2018.full.d.ts b/lib/lib.es2018.full.d.ts index 277d5411fa6a4..b517dc59003f5 100644 --- a/lib/lib.es2018.full.d.ts +++ b/lib/lib.es2018.full.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2018.intl.d.ts b/lib/lib.es2018.intl.d.ts index 6ab0dca02e75d..13d2fea4cb540 100644 --- a/lib/lib.es2018.intl.d.ts +++ b/lib/lib.es2018.intl.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2018.promise.d.ts b/lib/lib.es2018.promise.d.ts index d73b4d4568844..1a95d7c87c053 100644 --- a/lib/lib.es2018.promise.d.ts +++ b/lib/lib.es2018.promise.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2018.regexp.d.ts b/lib/lib.es2018.regexp.d.ts index 4ba698ff975dc..9cb3710b5d354 100644 --- a/lib/lib.es2018.regexp.d.ts +++ b/lib/lib.es2018.regexp.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2019.array.d.ts b/lib/lib.es2019.array.d.ts index b67c7c14c49a9..99fecc09fd6cc 100644 --- a/lib/lib.es2019.array.d.ts +++ b/lib/lib.es2019.array.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2019.d.ts b/lib/lib.es2019.d.ts index 14a547afbb4fb..5eab0e2c235c7 100644 --- a/lib/lib.es2019.d.ts +++ b/lib/lib.es2019.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2019.full.d.ts b/lib/lib.es2019.full.d.ts index ee095676f9270..1ebdb1fe0be8c 100644 --- a/lib/lib.es2019.full.d.ts +++ b/lib/lib.es2019.full.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2019.object.d.ts b/lib/lib.es2019.object.d.ts index 9b26b670941df..6a7b5667e1465 100644 --- a/lib/lib.es2019.object.d.ts +++ b/lib/lib.es2019.object.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2019.string.d.ts b/lib/lib.es2019.string.d.ts index a5a9dc6920479..5322f232038b8 100644 --- a/lib/lib.es2019.string.d.ts +++ b/lib/lib.es2019.string.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2019.symbol.d.ts b/lib/lib.es2019.symbol.d.ts index 98293eaf5721a..58b38d5f9db20 100644 --- a/lib/lib.es2019.symbol.d.ts +++ b/lib/lib.es2019.symbol.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ @@ -20,7 +20,7 @@ and limitations under the License. interface Symbol { /** - * expose the [[Description]] internal slot of a symbol directly + * Expose the [[Description]] internal slot of a symbol directly. */ - readonly description: string; + readonly description: string | undefined; } diff --git a/lib/lib.es2020.bigint.d.ts b/lib/lib.es2020.bigint.d.ts index ba9bae6e85939..1a6b1c20dda33 100644 --- a/lib/lib.es2020.bigint.d.ts +++ b/lib/lib.es2020.bigint.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2020.d.ts b/lib/lib.es2020.d.ts index 90b19053b1a8f..c72f14812eb14 100644 --- a/lib/lib.es2020.d.ts +++ b/lib/lib.es2020.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2020.full.d.ts b/lib/lib.es2020.full.d.ts index 7ffe939cd91b5..165b566d24f6f 100644 --- a/lib/lib.es2020.full.d.ts +++ b/lib/lib.es2020.full.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2020.promise.d.ts b/lib/lib.es2020.promise.d.ts index 4b5cc3451ef0f..a3b2c0aa88aae 100644 --- a/lib/lib.es2020.promise.d.ts +++ b/lib/lib.es2020.promise.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2020.string.d.ts b/lib/lib.es2020.string.d.ts index 146786641bd94..19c730752fbb3 100644 --- a/lib/lib.es2020.string.d.ts +++ b/lib/lib.es2020.string.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es2020.symbol.wellknown.d.ts b/lib/lib.es2020.symbol.wellknown.d.ts index 599d62d24a89c..4bac52fecd3d6 100644 --- a/lib/lib.es2020.symbol.wellknown.d.ts +++ b/lib/lib.es2020.symbol.wellknown.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.es5.d.ts b/lib/lib.es5.d.ts index 04b566bc254b2..5816582e1f7f4 100644 --- a/lib/lib.es5.d.ts +++ b/lib/lib.es5.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ @@ -986,7 +986,7 @@ declare var Error: ErrorConstructor; interface EvalError extends Error { } -interface EvalErrorConstructor { +interface EvalErrorConstructor extends ErrorConstructor { new(message?: string): EvalError; (message?: string): EvalError; readonly prototype: EvalError; @@ -997,7 +997,7 @@ declare var EvalError: EvalErrorConstructor; interface RangeError extends Error { } -interface RangeErrorConstructor { +interface RangeErrorConstructor extends ErrorConstructor { new(message?: string): RangeError; (message?: string): RangeError; readonly prototype: RangeError; @@ -1008,7 +1008,7 @@ declare var RangeError: RangeErrorConstructor; interface ReferenceError extends Error { } -interface ReferenceErrorConstructor { +interface ReferenceErrorConstructor extends ErrorConstructor { new(message?: string): ReferenceError; (message?: string): ReferenceError; readonly prototype: ReferenceError; @@ -1019,7 +1019,7 @@ declare var ReferenceError: ReferenceErrorConstructor; interface SyntaxError extends Error { } -interface SyntaxErrorConstructor { +interface SyntaxErrorConstructor extends ErrorConstructor { new(message?: string): SyntaxError; (message?: string): SyntaxError; readonly prototype: SyntaxError; @@ -1030,7 +1030,7 @@ declare var SyntaxError: SyntaxErrorConstructor; interface TypeError extends Error { } -interface TypeErrorConstructor { +interface TypeErrorConstructor extends ErrorConstructor { new(message?: string): TypeError; (message?: string): TypeError; readonly prototype: TypeError; @@ -1041,7 +1041,7 @@ declare var TypeError: TypeErrorConstructor; interface URIError extends Error { } -interface URIErrorConstructor { +interface URIErrorConstructor extends ErrorConstructor { new(message?: string): URIError; (message?: string): URIError; readonly prototype: URIError; diff --git a/lib/lib.es6.d.ts b/lib/lib.es6.d.ts index 6149c4a291c50..fabf4386173ae 100644 --- a/lib/lib.es6.d.ts +++ b/lib/lib.es6.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.esnext.d.ts b/lib/lib.esnext.d.ts index 06dbe33a78837..9b4e8e983de43 100644 --- a/lib/lib.esnext.d.ts +++ b/lib/lib.esnext.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.esnext.full.d.ts b/lib/lib.esnext.full.d.ts index e3c4fa5e03db5..be12ba8e47718 100644 --- a/lib/lib.esnext.full.d.ts +++ b/lib/lib.esnext.full.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.esnext.intl.d.ts b/lib/lib.esnext.intl.d.ts index 404ffc35bf468..c0cf2ba8010d9 100644 --- a/lib/lib.esnext.intl.d.ts +++ b/lib/lib.esnext.intl.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.scripthost.d.ts b/lib/lib.scripthost.d.ts index 5aab121c85f2d..8ac760bab4735 100644 --- a/lib/lib.scripthost.d.ts +++ b/lib/lib.scripthost.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.webworker.d.ts b/lib/lib.webworker.d.ts index b43d0ba53e5c7..f156d916e8810 100644 --- a/lib/lib.webworker.d.ts +++ b/lib/lib.webworker.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/lib.webworker.importscripts.d.ts b/lib/lib.webworker.importscripts.d.ts index c373ba82a2f55..73bd281664b04 100644 --- a/lib/lib.webworker.importscripts.d.ts +++ b/lib/lib.webworker.importscripts.d.ts @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/pl/diagnosticMessages.generated.json b/lib/pl/diagnosticMessages.generated.json index e625476e04152..2aa9ca7b87271 100644 --- a/lib/pl/diagnosticMessages.generated.json +++ b/lib/pl/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "Modyfikatora „{0}” nie można używać z deklaracją importu.", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "Modyfikatora „{0}” nie można używać z deklaracją interfejsu.", "A_0_parameter_must_be_the_first_parameter_2680": "Parametr „{0}” musi być pierwszym parametrem.", + "A_bigint_literal_cannot_use_exponential_notation_1352": "Literał typu bigint nie może używać notacji wykładniczej.", + "A_bigint_literal_must_be_an_integer_1353": "Literał typu bigint musi być liczbą całkowitą.", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "Parametr wzorca wiązania nie może być opcjonalny w sygnaturze implementacji.", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "Instrukcji „break” można użyć tylko w ramach otaczającej instrukcji iteracji lub switch.", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "Instrukcja „break” może wykonać skok tylko do etykiety otaczającej instrukcji.", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "Klasa może zawierać implementację tylko identyfikatora/nazwy kwalifikowanej z opcjonalnymi argumentami typu.", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "Klasa może implementować tylko typ obiektu lub część wspólną typów obiektów ze statycznie znanymi elementami członkowskimi.", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "Deklaracja klasy bez modyfikatora „default” musi mieć nazwę.", "A_class_may_only_extend_another_class_2311": "Klasa może rozszerzać tylko inną klasę.", - "A_class_may_only_implement_another_class_or_interface_2422": "Klasa może zawierać implementację tylko innej klasy lub innego interfejsu.", "A_class_member_cannot_have_the_0_keyword_1248": "Składowa klasy nie może zawierać słowa kluczowego „{0}”.", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "Wyrażenie przecinkowe nie jest dozwolone w obliczonej nazwie właściwości.", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "Obliczona nazwa właściwości nie może odwoływać się do parametru typu z zawierającego go typu.", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "Nazwa właściwości obliczanej w interfejsie musi odwoływać się do wyrażenia, którego typem jest literał lub „unique symbol”.", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "Obliczona nazwa właściwości musi być typu „string”, „number”, „symbol” lub „any”.", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "Obliczona nazwa właściwości w postaci „{0}” musi być typu „symbol”.", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "Asercje „const” mogą być stosowane tylko do odwołań do elementów członkowskich wyliczenia lub literałów typu string, number, boolean, array lub object.", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "Dostęp do składowej wyliczenia ze specyfikatorem const można uzyskać tylko za pomocą literału ciągu.", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "Inicjator „const” w otaczającym kontekście musi być ciągiem lub literałem numerycznym.", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "Inicjator „const” w otaczającym kontekście musi być ciągiem, literałem liczbowym albo odwołaniem do literału wyliczenia.", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "Konstruktor nie może zawierać wywołania „super”, gdy jego klasa rozszerza wartość „null”.", "A_constructor_cannot_have_a_this_parameter_2681": "Konstruktor nie może zawierać parametru „this”.", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "Instrukcji „continue” można użyć tylko w otaczającej instrukcji iteracji.", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "Instrukcja „continue” może wykonać skok tylko do etykiety otaczającej instrukcji iteracji.", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "Nie można użyć modyfikatora „declare” w otaczającym kontekście.", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": "Wymagany jest modyfikator „declare” dla deklaracji najwyższego poziomu w pliku d.ts.", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "Dekorator może dekorować jedynie implementację metody, a nie przeciążenie.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "Klauzula „default” nie może występować więcej niż raz w instrukcji „switch”.", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "Eksport domyślny może być używany tylko w module w stylu języka ECMAScript.", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "Generator nie może mieć adnotacji typu „void”.", "A_get_accessor_cannot_have_parameters_1054": "Metoda dostępu „get” nie może mieć parametrów.", "A_get_accessor_must_return_a_value_2378": "Metoda dostępu „get” musi zwracać wartość.", + "A_label_is_not_allowed_here_1344": "„Etykieta nie jest dozwolona w tym miejscu.", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Inicjator składowej w deklaracji wyliczenia nie może przywoływać składowych zadeklarowanych po nim, w tym składowych zdefiniowanych w innych wyliczeniach.", + "A_method_cannot_be_named_with_a_private_identifier_18022": "Metody nie można nazwać za pomocą identyfikatora prywatnego.", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Klasa mixin musi mieć konstruktor z pojedynczym parametrem rest o typie „any[]”.", "A_module_cannot_have_multiple_default_exports_2528": "Moduł nie może mieć wielu eksportów domyślnych.", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Deklaracja przestrzeni nazw nie może znajdować się w innym pliku niż klasa lub funkcja, z którą ją scalono.", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Deklaracja przestrzeni nazw nie może występować przed klasą lub funkcją, z którą ją scalono.", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "Deklaracja przestrzeni nazw jest dozwolona tylko w przestrzeni nazw lub module.", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "Nie można wywołać lub skonstruować importu stylu przestrzeni nazw. Spowoduje to błąd w czasie wykonania.", "A_non_dry_build_would_build_project_0_6357": "Kompilacja inna niż -dry spowodowałaby skompilowanie projektu „{0}”", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Kompilacja inna niż -dry spowodowałaby usunięcie następujących plików: {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "Kompilacja bez opcji dry spowoduje zaktualizowanie danych wyjściowych projektu „{0}”", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "Kompilacja bez opcji dry spowoduje zaktualizowanie sygnatur czasowych dla danych wyjściowych projektu „{0}”", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "Inicjator parametru jest dozwolony tylko w implementacji funkcji lub konstruktora.", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "Właściwości parametru nie można zadeklarować za pomocą parametru rest.", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "Właściwość parametru jest dozwolona tylko w implementacji konstruktora.", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "Obietnica musi mieć metodę „then”.", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "Właściwość klasy, której typem jest „unique symbol”, musi być określona zarówno jako „static”, jak i „readonly”.", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "Właściwość klasy, której typem jest literał lub „unique symbol”, musi być określona zarówno jako „static”, jak i „readonly”.", + "A_required_element_cannot_follow_an_optional_element_1257": "Wymagany element nie może występować po elemencie opcjonalnym.", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "Wymagany parametr nie może występować po opcjonalnym parametrze.", "A_rest_element_cannot_contain_a_binding_pattern_2501": "Element rest nie może zawierać wzorca wiązania.", "A_rest_element_cannot_have_a_property_name_2566": "Element rest nie może mieć nazwy właściwości.", "A_rest_element_cannot_have_an_initializer_1186": "Element rest nie może mieć inicjatora.", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "Element rest musi być ostatni we wzorcu usuwającym strukturę.", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "Element rest musi być ostatni we typie krotki.", + "A_rest_element_type_must_be_an_array_type_2574": "Typ elementu rest musi być typem tablicowym.", "A_rest_parameter_cannot_be_optional_1047": "Parametr rest nie może być opcjonalny.", "A_rest_parameter_cannot_have_an_initializer_1048": "Parametr rest nie może mieć inicjatora.", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "Parametr rest musi występować na końcu listy parametrów.", @@ -77,13 +85,13 @@ "A_set_accessor_must_have_exactly_one_parameter_1049": "Metoda dostępu „set” musi mieć dokładnie jeden parametr.", "A_set_accessor_parameter_cannot_have_an_initializer_1052": "Parametr metody dostępu „set” nie może mieć inicjatora.", "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381": "Sygnatura z implementacją nie może używać typu literału ciągu.", - "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "Wywołanie „super” musi być pierwszą instrukcją konstruktora, jeśli klasa zawiera zainicjowane właściwości lub ma właściwości parametrów.", + "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "Wywołanie elementu „super” musi być pierwszą instrukcją w konstruktorze, jeśli klasa zawiera zainicjowane właściwości, właściwości parametrów lub identyfikatory prywatne.", "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "Ochrona typu oparta na elemencie „this” nie jest zgodna z ochroną typu opartą na parametrze.", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "Typ „this” jest dostępny tylko w niestatycznej składowej klasy lub interfejsu.", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "Plik „tsconfig.json” jest już zdefiniowany w: „{0}”.", - "A_tuple_type_element_list_cannot_be_empty_1122": "Lista elementów typu krotki nie może być pusta.", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "Wyrażenie asercji typu jest niedozwolone po lewej stronie wyrażenia potęgowania. Zastanów się nad zamknięciem wyrażenia w nawiasach.", "A_type_literal_property_cannot_have_an_initializer_1247": "Właściwość literału typu nie może mieć inicjatora.", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "Import dotyczący tylko typu może określać import domyślny lub powiązania nazwane, ale nie jedno i drugie jednocześnie.", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "Predykat typów nie może zawierać odwołania do parametru rest.", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "Predykat typów nie może zawierać odwołania do elementu „{0}” we wzorcu wiązania.", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "Predykat typów jest dozwolony tylko w położeniu zwracanego typu dla funkcji i metod.", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "Dodaj element „{0}” do istniejącej deklaracji importu z elementu „{1}”", "Add_0_to_unresolved_variable_90008": "Dodaj „{0}.” do nierozpoznanej zmiennej", "Add_all_missing_async_modifiers_95041": "Dodaj wszystkie brakujące modyfikatory „async”", + "Add_all_missing_imports_95064": "Dodaj wszystkie brakujące importy", "Add_all_missing_members_95022": "Dodaj wszystkie brakujące elementy członkowskie", "Add_all_missing_super_calls_95039": "Dodaj wszystkie brakujące wywołania typu super", "Add_async_modifier_to_containing_function_90029": "Dodaj modyfikator asynchroniczny do funkcji zawierającej", + "Add_await_95083": "Dodaj operator „await”", + "Add_await_to_initializer_for_0_95084": "Dodaj operator „await” do inicjatora dla elementu „{0}”", + "Add_await_to_initializers_95089": "Dodaj operator „await” do inicjatorów", "Add_braces_to_arrow_function_95059": "Dodaj nawiasy klamrowe do funkcji strzałki", + "Add_const_to_all_unresolved_variables_95082": "Dodaj element „const” do wszystkich nierozpoznanych zmiennych", + "Add_const_to_unresolved_variable_95081": "Dodaj element „const” do nierozpoznanej zmiennej", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "Dodaj domyślny import „{0}” do istniejącej deklaracji importu z „{1}”", "Add_definite_assignment_assertion_to_property_0_95020": "Dodaj asercję określonego przypisania do właściwości „{0}”", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "Dodaj asercję określonego przypisania do wszystkich niezainicjowanych właściwości", + "Add_export_to_make_this_file_into_a_module_95097": "Dodaj element „export {}”, aby przekształcić ten plik w moduł", "Add_index_signature_for_property_0_90017": "Dodaj sygnaturę indeksu dla właściwości „{0}”", "Add_initializer_to_property_0_95019": "Dodaj inicjator do właściwości „{0}”", "Add_initializers_to_all_uninitialized_properties_95027": "Dodaj inicjatory do wszystkich niezainicjowanych właściwości", + "Add_missing_enum_member_0_95063": "Dodaj brakujący element członkowski wyliczenia „{0}”", + "Add_missing_new_operator_to_all_calls_95072": "Dodaj brakujący operator „new” do wszystkich wywołań", + "Add_missing_new_operator_to_call_95071": "Dodaj brakujący operator „new” do wywołania", "Add_missing_super_call_90001": "Dodaj brakujące wywołanie „super()”", "Add_missing_typeof_95052": "Dodaj brakujący element „typeof”", + "Add_names_to_all_parameters_without_names_95073": "Dodaj nazwy do wszystkich parametrów bez nazw", "Add_or_remove_braces_in_an_arrow_function_95058": "Dodaj lub usuń nawiasy klamrowe w funkcji strzałki", + "Add_parameter_name_90034": "Dodaj nazwę parametru", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "Dodaj kwalifikator do wszystkich nierozpoznanych zmiennych pasujących do nazwy składowej", "Add_to_all_uncalled_decorators_95044": "Dodaj element „()” do wszystkich niewywoływanych dekoratorów", "Add_ts_ignore_to_all_error_messages_95042": "Dodaj element „@ts-ignore” do wszystkich komunikatów o błędach", "Add_undefined_type_to_all_uninitialized_properties_95029": "Dodaj typ nieokreślony do wszystkich niezainicjowanych właściwości", "Add_undefined_type_to_property_0_95018": "Dodaj typ „undefined” do właściwości „{0}”", + "Add_unknown_conversion_for_non_overlapping_types_95069": "Dodaj konwersję „unknown” dla nienakładających się typów", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "Dodaj element „unknown” do wszystkich konwersji nienakładających się typów", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "Dodanie pliku tsconfig.json pomoże w organizowaniu projektów, które zawierają pliki TypeScript i JavaScript. Dowiedz się więcej: https://aka.ms/tsconfig.", "Additional_Checks_6176": "Dodatkowe kontrole", "Advanced_Options_6178": "Opcje zaawansowane", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "Wszystkie deklaracje „{0}” muszą mieć identyczne parametry typu.", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "Wszystkie deklaracje metody abstrakcyjnej muszą występować obok siebie.", "All_destructured_elements_are_unused_6198": "Wszystkie elementy, których strukturę usunięto, są nieużywane.", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "Wszystkie pliki muszą być modułami, gdy flaga „--isolatedModules” jest podana.", "All_imports_in_import_declaration_are_unused_6192": "Wszystkie importy w deklaracji importu są nieużywane.", + "All_type_parameters_are_unused_6205": "Wszystkie parametry typu są nieużywane", "All_variables_are_unused_6199": "Wszystkie zmienne są nieużywane.", + "Allow_accessing_UMD_globals_from_modules_95076": "Zezwalaj na dostęp do zmiennych globalnych UMD z modułów.", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "Zezwalaj na domyślne importy z modułów bez domyślnego eksportu. To nie wpływa na emitowanie kodu, a tylko na sprawdzanie typów.", "Allow_javascript_files_to_be_compiled_6102": "Zezwalaj na kompilowanie plików JavaScript.", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "Otaczające wyliczenia ze specyfikacją const nie są dozwolone w przypadku podania flagi „--isolatedModules”.", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "Już dołączona nazwa pliku „{0}” różni się od nazwy pliku „{1}” tylko wielkością liter", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "Deklaracja otaczającego modułu nie może określać względnej nazwy modułu.", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "Moduły otoczenia nie mogą być zagnieżdżone w innych modułach ani przestrzeniach nazw.", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "Moduł AMD nie może mieć wielu przypisań nazw.", "An_abstract_accessor_cannot_have_an_implementation_1318": "Abstrakcyjna metoda dostępu nie może mieć implementacji.", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "Metoda dostępu nie może być zadeklarowana w otaczającym kontekście.", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "Modyfikator dostępności nie może być używany z identyfikatorem prywatnym.", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "Metoda dostępu nie może mieć nazwy z identyfikatorem prywatnym.", "An_accessor_cannot_have_type_parameters_1094": "Metoda dostępu nie może mieć parametrów typu.", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "Deklaracja otaczającego modułu jest dozwolona tylko na najwyższym poziomie pliku.", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "Arytmetyczny operand musi być typu „any”, „number” lub typu wyliczeniowego.", + "An_argument_for_0_was_not_provided_6210": "Nie podano argumentu dla elementu „{0}”.", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "Argument pasujący do tego wzorca powiązania nie został podany.", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "Arytmetyczny operand musi być typu „any”, „number”, „bigint” lub typu wyliczeniowego.", + "An_arrow_function_cannot_have_a_this_parameter_2730": "Funkcja strzałki nie może mieć parametru „this”.", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "Asynchroniczna funkcja lub metoda w wersji ES5/ES3 wymaga konstruktora „Promise”. Upewnij się, że masz deklarację dla konstruktora „Promise”, lub uwzględnij wartość „ES2015” w opcji „--lib”.", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "Funkcja lub metoda asynchroniczna musi mieć prawidłowy oczekujący zwracany typ.", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "Metoda lub funkcja asynchroniczna musi zwrócić element „Promise”. Upewnij się, że masz deklarację elementu „Promise” lub uwzględnij wartość „ES2015” w opcji „--lib”.", "An_async_iterator_must_have_a_next_method_2519": "Iterator asynchroniczny musi mieć metodę „next()”.", "An_element_access_expression_should_take_an_argument_1011": "Wyrażenie dostępu do elementu powinno przyjmować argument.", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "Elementu członkowskiego wyliczenia nie można nazwać za pomocą identyfikatora prywatnego.", "An_enum_member_cannot_have_a_numeric_name_2452": "Składowa wyliczenia nie może mieć nazwy liczbowej.", + "An_enum_member_name_must_be_followed_by_a_or_1357": "Po nazwie elementu członkowskiego wyliczenia musi następować znak „,”, „=” lub „}”.", "An_export_assignment_can_only_be_used_in_a_module_1231": "Przypisanie eksportu może być używane tylko w module.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Nie można użyć przypisania eksportu w module z innymi eksportowanymi elementami.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Nie można użyć przypisania eksportu w przestrzeni nazw.", "An_export_assignment_cannot_have_modifiers_1120": "Przypisanie eksportu nie może mieć modyfikatorów.", "An_export_declaration_can_only_be_used_in_a_module_1233": "Deklaracja eksportu może być używana tylko w module.", "An_export_declaration_cannot_have_modifiers_1193": "Deklaracja eksportu nie może mieć modyfikatorów.", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "Wyrażenie typu „void” nie może być testowane pod kątem prawdziwości", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "Rozszerzona wartość znaku ucieczki Unicode musi należeć do zakresu od 0x0 do 0x10FFFF (włącznie).", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "Identyfikatora lub słowa kluczowego nie można użyć bezpośrednio po literale liczbowym.", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "Implementacja nie może być zadeklarowana w otaczających kontekstach.", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "Alias importu nie może odwoływać się do deklaracji, która została wyeksportowana przy użyciu elementu „export type”.", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "Alias importu nie może odwoływać się do deklaracji, która została zaimportowana przy użyciu elementu „import type”.", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "Deklaracja importu może być używana tylko w przestrzeni nazw lub module.", "An_import_declaration_cannot_have_modifiers_1191": "Deklaracja importu nie może mieć modyfikatorów.", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "Ścieżka importu nie może kończyć się rozszerzeniem „{0}”. Rozważ zaimportowanie „{1}”.", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "Parametr sygnatury indeksu musi mieć adnotację typu.", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "Typ parametru sygnatury indeksu nie może być aliasem typu. Rozważ zastosowanie następującego zapisu: „[{0}: {1}]: {2}”.", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "Typ parametru sygnatury indeksu nie może być typem unii. Rozważ użycie zamiast niego mapowanego typu obiektu.", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "Parametr sygnatury indeksu musi być typu „string” lub „number”.", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "Parametr sygnatury indeksu musi być typu „string” lub „number”.", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "Interfejs może rozszerzać tylko identyfikator/nazwę kwalifikowaną z opcjonalnymi argumentami typu.", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "Interfejs może rozszerzać tylko klasę lub inny interfejs.", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "Interfejs może rozszerzać tylko typ obiektu lub część wspólną typów obiektów ze statycznie znanymi elementami członkowskimi.", "An_interface_property_cannot_have_an_initializer_1246": "Właściwość interfejsu nie może mieć inicjatora.", "An_iterator_must_have_a_next_method_2489": "Iterator musi zawierać metodę „next()”.", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "Literał obiektu nie może mieć wielu metod dostępu pobierania/ustawiania o takiej samej nazwie.", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "Literał obiektu nie może mieć wielu właściwości o takiej samej nazwie w trybie z ograniczeniami.", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "Literał obiektu nie może mieć właściwości i metody dostępu o takiej samej nazwie.", "An_object_member_cannot_be_declared_optional_1162": "Składowa obiektu nie może być zadeklarowana jako opcjonalna.", + "An_optional_chain_cannot_contain_private_identifiers_18030": "Opcjonalny łańcuch nie może zawierać identyfikatorów prywatnych.", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "Zewnętrzna wartość parametru „this” jest zasłaniana przez ten kontener.", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "Sygnatura przeciążenia nie może być zadeklarowana jako generator.", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "Wyrażenie jednoargumentowe z operatorem „{0}” jest niedozwolone po lewej stronie wyrażenia potęgowania. Zastanów się nad zamknięciem wyrażenia w nawiasach.", "Annotate_everything_with_types_from_JSDoc_95043": "Adnotuj wszystko przy użyciu typów JSDoc", "Annotate_with_type_from_JSDoc_95009": "Dodaj adnotację z typem z danych JSDoc", "Annotate_with_types_from_JSDoc_95010": "Dodaj adnotację z typami z danych JSDoc", + "Another_export_default_is_here_2753": "W tym miejscu jest kolejny element export default.", + "Are_you_missing_a_semicolon_2734": "Czy brakuje średnika?", "Argument_expression_expected_1135": "Oczekiwano wyrażenia argumentu.", "Argument_for_0_option_must_be_Colon_1_6046": "Argumentem opcji „{0}” musi być: {1}.", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "Nie można przypisać argumentu typu „{0}” do parametru typu „{1}”.", "Array_element_destructuring_pattern_expected_1181": "Oczekiwano wzorca usuwającego strukturę elementu tablicy.", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "Asercje wymagają, aby każda nazwa w celu wywołania była zadeklarowana z jawną adnotacją typu.", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "Asercje wymagają, aby cel wywołania był identyfikatorem lub nazwą kwalifikowaną.", "Asterisk_Slash_expected_1010": "Oczekiwano znaków „*/”.", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "Rozszerzenia zakresu globalnego mogą być zagnieżdżane bezpośrednio jedynie w modułach zewnętrznych lub deklaracjach modułów otoczenia.", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "Rozszerzenia zakresu globalnego muszą mieć modyfikator „declare”, chyba że znajdują się w już otaczającym kontekście.", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "Automatyczne odnajdowanie operacji wpisywania zostało włączone w projekcie „{0}”. Trwa uruchamianie dodatkowego przejścia rozwiązania dla modułu „{1}” przy użyciu lokalizacji pamięci podręcznej „{2}”.", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "Wyrażenia klasy bazowej nie mogą odwoływać się do parametrów typu klasy.", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "Zwracany typ konstruktora bazowego „{0}” nie jest typem klasy ani interfejsu.", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "Zwracany typ konstruktora bazowego „{0}” nie jest typem obiektu ani częścią wspólną typów obiektów ze statycznie znanymi elementami członkowskimi.", "Base_constructors_must_all_have_the_same_return_type_2510": "Wszystkie konstruktory podstawowe muszą mieć ten sam zwracany typ.", "Base_directory_to_resolve_non_absolute_module_names_6083": "Katalog podstawowy do rozpoznawania innych niż bezwzględne nazw modułów.", "Basic_Options_6172": "Opcje podstawowe", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "Literały typu BigInt są niedostępne, gdy wersja docelowa jest wcześniejsza niż ES2020.", "Binary_digit_expected_1177": "Oczekiwano bitu.", "Binding_element_0_implicitly_has_an_1_type_7031": "Dla elementu powiązania „{0}” niejawnie określono typ „{1}”.", "Block_scoped_variable_0_used_before_its_declaration_2448": "Zmienna „{0}” o zakresie bloku została użyta przed jej deklaracją.", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "Kompiluj wszystkie projekty, łącznie z tymi, które wydają się być aktualne", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "Kompiluj co najmniej jeden projekt i jego zależności, jeśli są nieaktualne", + "Build_option_0_requires_a_value_of_type_1_5073": "Opcja kompilacji „{0}” wymaga wartości typu {1}.", "Building_project_0_6358": "Trwa kompilowanie projektu „{0}”...", "Call_decorator_expression_90028": "Wywołaj wyrażenie dekoratora", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "Zwracane typy sygnatur wywołania „{0}” i „{1}” są niezgodne.", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "Dla sygnatury wywołania bez adnotacji zwracanego typu niejawnie określono zwracany typ „any”.", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "Sygnatury wywołania bez argumentów mają niezgodne zwracane typy „{0}” i „{1}”.", "Call_target_does_not_contain_any_signatures_2346": "Cel wywołania nie zawiera żadnych podpisów.", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "Nie można uzyskać dostępu do elementu „{0}.{1}”, ponieważ element „{0}” jest typem, ale nie przestrzenią nazw. Czy chcesz pobrać typ właściwości „{1}” w lokalizacji „{0}” za pomocą elementu „{0}[„{1}”]”?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "Nie można uzyskać dostępu do otaczających wyliczeń const, gdy flaga „--isolatedModules” jest podana.", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "Nie można przypisać typu konstruktora „{0}” do typu konstruktora „{1}”.", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "Nie można przypisać abstrakcyjnego typu konstruktora do nieabstrakcyjnego typu konstruktora.", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "Nie można przydzielić do elementu „{0}”, ponieważ jest to stała lub właściwość tylko do odczytu.", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "Nie można przypisać do elementu „{0}”, ponieważ jest to stała.", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "Nie można przypisać do elementu „{0}”, ponieważ jest to właściwość tylko do odczytu.", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "Nie można przydzielić do elementu „{0}”, ponieważ nie jest to zmienna.", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "Nie można rozszerzyć modułu „{0}”, ponieważ rozpoznawany jest obiekt inny niż moduł.", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "Nie można rozszerzyć modułu „{0}” za pośrednictwem operacji eksportu wartości, ponieważ jest on rozpoznawany jako jednostka inna niż moduł.", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "Nie można skompilować modułów za pomocą opcji „{0}”, chyba że flaga „--module” ma wartość „amd” lub „system”.", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "Nie można skompilować przestrzeni nazw, jeśli podano flagę „--isolatedModules”.", "Cannot_create_an_instance_of_an_abstract_class_2511": "Nie można utworzyć wystąpienia klasy abstrakcyjnej.", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "Nie można delegować iteracji do wartości, ponieważ metoda „next” jej iteratora oczekuje typu „{1}”, ale zawierający generator będzie zawsze wysyłał „{0}”.", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "Nie można wyeksportować elementu „{0}”. Z modułu można eksportować jedynie lokalne deklaracje.", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "Nie można rozszerzyć klasy „{0}”. Konstruktor klasy jest oznaczony jako prywatny.", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "Nie można rozszerzyć interfejsu „{0}”. Czy chodziło Ci o „implements”?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "Nie można odnaleźć pliku tsconfig.json w bieżącym katalogu: {0}.", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "Nie można znaleźć pliku tsconfig.json w określonym katalogu: „{0}”.", "Cannot_find_global_type_0_2318": "Nie można odnaleźć typu globalnego „{0}”.", "Cannot_find_global_value_0_2468": "Nie można odnaleźć wartości globalnej „{0}”.", "Cannot_find_lib_definition_for_0_2726": "Nie można znaleźć definicji biblioteki dla elementu „{0}”.", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "Nie można znaleźć definicji biblioteki dla elementu „{0}”. Czy chodziło Ci o element „{1}”?", "Cannot_find_module_0_2307": "Nie można odnaleźć modułu „{0}”.", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "Nie można odnaleźć modułu „{0}”. Rozważ użycie opcji „--resolveJsonModule” do importowania modułu z rozszerzeniem „.json”", "Cannot_find_name_0_2304": "Nie można odnaleźć nazwy „{0}”.", "Cannot_find_name_0_Did_you_mean_1_2552": "Nie można znaleźć nazwy „{0}”. Czy chodziło Ci o „{1}”?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "Nie można znaleźć nazwy „{0}”. Czy chodziło o składową wystąpienia „this.{0}”?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "Nie można znaleźć nazwy „{0}”. Czy chodziło o statyczną składową „{1}.{0}”?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "Nie można odnaleźć nazwy „{0}”. Czy chcesz zmienić bibliotekę docelową? Spróbuj zmienić opcję kompilatora „lib” na es2015 lub nowszą.", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "Nie można odnaleźć nazwy „{0}”. Czy chcesz zmienić bibliotekę docelową? Spróbuj zmienić opcję kompilatora „lib”, aby uwzględnić element „dom”.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "Nie można odnaleźć nazwy „{0}”. Czy chcesz zainstalować definicje typów dla modułu uruchamiającego testy? Spróbuj użyć polecenia „npm i @types/jest” lub „npm i @types/mocha”.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "Nie można odnaleźć nazwy „{0}”. Czy chcesz zainstalować definicje typów dla modułu uruchamiającego testy? Spróbuj użyć polecenia „npm i @types/jest” lub „npm i @types/mocha”, a następnie dodaj element „jest” lub „mocha” do pola types w pliku tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "Nie można odnaleźć nazwy „{0}”. Czy chcesz zainstalować definicje typów dla biblioteki jQuery? Spróbuj użyć polecenia „npm i @types/jquery”.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "Nie można odnaleźć nazwy „{0}”. Czy chcesz zainstalować definicje typów dla biblioteki jQuery? Spróbuj użyć polecenia „npm i @types/jquery”, a następnie dodaj element „jquery” do pola types w pliku tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "Nie można odnaleźć nazwy „{0}”. Czy chcesz zainstalować definicje typów dla node? Spróbuj użyć polecenia „npm i @types/node”.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "Nie można odnaleźć nazwy „{0}”. Czy chcesz zainstalować definicje typów dla node? Spróbuj użyć polecenia „npm i @types/node”, a następnie dodaj element „node” do pola types w pliku tsconfig.", "Cannot_find_namespace_0_2503": "Nie można odnaleźć przestrzeni nazw „{0}”.", "Cannot_find_parameter_0_1225": "Nie można odnaleźć parametru „{0}”.", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "Nie można odnaleźć wspólnej ścieżki podkatalogu dla plików wejściowych.", "Cannot_find_type_definition_file_for_0_2688": "Nie można znaleźć pliku definicji typu dla elementu „{0}”.", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "Nie można zaimportować plików deklaracji typu. Rozważ zaimportowanie „{0}” zamiast „{1}”.", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "Nie można zainicjować zmiennej „{0}” z zakresu zewnętrznego w tym samym zakresie co deklaracja „{1}” należąca do zakresu bloku.", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "Nie można wywołać wyrażenia, w którego typie nie ma sygnatury wywołania. Typ „{0}” nie ma zgodnych sygnatur wywołań.", "Cannot_invoke_an_object_which_is_possibly_null_2721": "Nie można wywołać obiektu, który ma prawdopodobnie wartość „null”.", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "Nie można wywołać obiektu, który ma prawdopodobnie wartość „null” lub „undefined”.", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "Nie można wywołać obiektu, który ma prawdopodobnie wartość „undefined”.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "Nie można iterować wartości, ponieważ metoda „next” jej iteratora oczekuje typu „{1}”, ale destrukturyzacja tablicy będzie zawsze wysyłała „{0}”.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "Nie można iterować wartości, ponieważ metoda „next” jej iteratora oczekuje typu „{1}”, ale rozkładanie tablicy będzie zawsze wysyłało „{0}”.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "Nie można iterować wartości, ponieważ metoda „next” jej iteratora oczekuje typu „{1}”, ale pętla for-of będzie zawsze wysyłała „{0}”.", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "Nie można poprzedzić projektu „{0}”, ponieważ nie ma on ustawionej właściwości „outFile”", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "Nie można ponownie wyeksportować typu, jeśli podano flagę „--isolatedModules”", "Cannot_read_file_0_Colon_1_5012": "Nie można odczytać pliku „{0}”: {1}.", "Cannot_redeclare_block_scoped_variable_0_2451": "Nie można ponownie zadeklarować zmiennej „{0}” o zakresie bloku.", "Cannot_redeclare_exported_variable_0_2323": "Nie można zadeklarować ponownie wyeksportowanej zmiennej „{0}”.", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "Nie można ponownie zadeklarować identyfikatora „{0}” w klauzuli catch.", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "Nie można zaktualizować danych wyjściowych projektu „{0}”, ponieważ wystąpił błąd podczas odczytu pliku „{1}”", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "Nie można użyć kodu JSX, jeśli nie podano flagi „--jsx”.", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "Nie można używać importów, eksportów lub rozszerzeń modułów, jeśli flaga „--module” ma wartość „none”.", "Cannot_use_namespace_0_as_a_type_2709": "Nie można używać przestrzeni nazw „{0}” jako typu.", "Cannot_use_namespace_0_as_a_value_2708": "Nie można używać przestrzeni nazw „{0}” jako wartości.", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "Nie można użyć elementu „new” z wyrażeniem, którego typ nie ma sygnatury wywołania lub konstrukcji.", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "Nie można zapisać pliku „{0}”, ponieważ spowoduje to zastąpienie pliku „.tsbuildinfo” generowanego przez przywoływany projekt „{1}”", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "Nie można zapisać pliku „{0}”, ponieważ zostałby nadpisany przez wiele plików wejściowych.", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "Nie można zapisać pliku „{0}”, ponieważ nadpisałby plik wejściowy.", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "Zmienna klauzuli catch nie może mieć adnotacji typu.", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "Sprawdzanie, czy „{0}” to najdłuższy zgodny prefiks dla „{1}” — „{2}”.", "Circular_definition_of_import_alias_0_2303": "Definicja cykliczna aliasu importu „{0}”.", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "Wykryto cykliczność podczas rozpoznawania konfiguracji: {0}", + "Circularity_originates_in_type_at_this_location_2751": "Cykliczność pochodzi z typu w tym miejscu.", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "Klasa „{0}” definiuje metodę dostępu do składowej wystąpienia „{1}”, ale rozszerzona klasa „{2}” definiuje ją jako funkcję składową wystąpienia.", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "Klasa „{0}” definiuje funkcję składową wystąpienia „{1}”, ale rozszerzona klasa „{2}” definiuje ją jako metodę dostępu do składowej wystąpienia.", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "Klasa „{0}” definiuje funkcję składową wystąpienia „{1}”, ale rozszerzona klasa „{2}” definiuje ją jako właściwość składowej wystąpienia.", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "Klasa „{0}” definiuje właściwość składowej wystąpienia „{1}”, ale rozszerzona klasa „{2}” definiuje ją jako funkcję składową wystąpienia.", "Class_0_incorrectly_extends_base_class_1_2415": "Klasa „{0}” niepoprawnie rozszerza klasę bazową „{1}”.", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "Klasa „{0}” niepoprawnie implementuje klasę „{1}”. Czy chodziło o rozszerzenie „{1}” i odziedziczenie jego elementów członkowskich jako podklasy?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "Strona statyczna klasy „{0}” niepoprawnie rozszerza stronę statyczną klasy bazowej „{1}”.", "Classes_can_only_extend_a_single_class_1174": "Klasy mogą rozszerzać tylko pojedynczą klasę.", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "Klasy zawierające metody abstrakcyjne muszą być oznaczone jako abstrakcyjne.", + "Classes_may_not_have_a_field_named_constructor_18006": "Klasy nie mogą mieć pola o nazwie „constructor”.", "Command_line_Options_6171": "Opcje wiersza polecenia", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "Skompiluj projekt z uwzględnieniem ścieżki jego pliku konfiguracji lub folderu z plikiem „tsconfig.json”.", "Compiler_option_0_expects_an_argument_6044": "Opcja kompilatora „{0}” oczekuje argumentu.", "Compiler_option_0_requires_a_value_of_type_1_5024": "Opcja kompilatora „{0}” wymaga wartości typu {1}.", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "Kompilator rezerwuje nazwę „{0}” podczas emitowania niższego poziomu identyfikatora prywatnego.", "Composite_projects_may_not_disable_declaration_emit_6304": "Projekty kompozytowe nie mogą wyłączyć emitowania deklaracji.", + "Composite_projects_may_not_disable_incremental_compilation_6379": "Projekty złożone nie mogą wyłączać kompilacji przyrostowej.", "Computed_property_names_are_not_allowed_in_enums_1164": "Obliczone nazwy właściwości nie są dozwolone w wyliczeniach.", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "Obliczone wartości nie są dozwolone w wyliczeniu ze składowymi o wartości ciągu.", "Concatenate_and_emit_output_to_single_file_6001": "Połącz i wyemituj dane wyjściowe do pojedynczego pliku.", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "Znaleziono definicje będące w konflikcie dla „{0}” w „{1}” i „{2}”. Rozważ zainstalowanie konkretnej wersji tej biblioteki, aby rozwiązać problem.", + "Conflicts_are_in_this_file_6201": "Konflikty znajdują się w tym pliku.", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "Zwracane typy „{0}” i „{1}” sygnatur konstrukcji są niezgodne.", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "Dla sygnatury konstrukcji bez adnotacji zwracanego typu niejawnie określono zwracany typ „any”.", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "Sygnatury konstrukcji bez argumentów mają niezgodne zwracane typy „{0}” i „{1}”.", "Constructor_implementation_is_missing_2390": "Brak implementacji konstruktora.", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "Konstruktor klasy „{0}” jest prywatny i dostępny tylko w ramach deklaracji klasy.", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "Konstruktor klasy „{0}” jest chroniony i dostępny tylko w ramach deklaracji klasy.", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "Konstruktory klas pochodnych muszą zawierać wywołanie „super”.", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "Nie podano pliku zawierającego i nie można określić katalogu głównego. Pomijanie wyszukiwania w folderze „node_modules”.", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "Konwersja typu „{0}” na typ „{1}” może być błędem, ponieważ żaden z tych typów nie pokrywa się w wystarczającym stopniu z drugim. Jeśli było to zamierzone, najpierw przekonwertuj wyrażenie na typ „unknown”.", "Convert_0_to_mapped_object_type_95055": "Konwertuj element „{0}” na zamapowany typ obiektu", "Convert_all_constructor_functions_to_classes_95045": "Przekonwertuj wszystkie funkcje konstruktora na klasy", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "Konwertuj wszystkie importy nieużywane jako wartość na importy dotyczące tylko typu", + "Convert_all_re_exported_types_to_type_only_exports_1365": "Konwertuj wszystkie ponownie wyeksportowane typy na eksporty dotyczące tylko typu", "Convert_all_require_to_import_95048": "Konwertuj wszystkie wywołania „require” na wywołania „import”", + "Convert_all_to_async_functions_95066": "Konwertuj wszystko na funkcje asynchroniczne", + "Convert_all_to_bigint_numeric_literals_95092": "Konwertuj wszystko na literały liczbowe typu bigint", "Convert_all_to_default_imports_95035": "Przekonwertuj wszystko na domyślne importowanie", + "Convert_const_to_let_95093": "Konwertuj zmienne „const” na „let”", + "Convert_default_export_to_named_export_95061": "Konwertuj eksport domyślny na nazwany eksport", "Convert_function_0_to_class_95002": "Konwertuj funkcję „{0}” na klasę", "Convert_function_to_an_ES2015_class_95001": "Konwertuj funkcję na klasę ES2015", + "Convert_invalid_character_to_its_html_entity_code_95100": "Konwertuj nieprawidłowy znak na jego kod jednostki html", + "Convert_named_export_to_default_export_95062": "Konwertuj nazwany eksport na eksport domyślny", "Convert_named_imports_to_namespace_import_95057": "Konwertuj importy nazwane na import przestrzeni nazw", "Convert_namespace_import_to_named_imports_95056": "Konwertuj import przestrzeni nazw na importy nazwane", + "Convert_parameters_to_destructured_object_95075": "Konwertuj parametry na obiekt destrukturyzowany", "Convert_require_to_import_95047": "Konwertuj wywołanie „require” na wywołanie „import”", "Convert_to_ES6_module_95017": "Konwertuj na moduł ES6", + "Convert_to_a_bigint_numeric_literal_95091": "Konwertuj na literał liczbowy typu bigint", + "Convert_to_async_function_95065": "Konwertuj na funkcję asynchroniczną", "Convert_to_default_import_95013": "Konwertuj na import domyślny", + "Convert_to_template_string_95096": "Konwertuj na ciąg szablonu", + "Convert_to_type_only_export_1364": "Konwertuj na eksport dotyczący tylko typu", + "Convert_to_type_only_import_1373": "Konwertuj na import dotyczący tylko typu", "Corrupted_locale_file_0_6051": "Uszkodzony plik ustawień regionalnych {0}.", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "Nie można znaleźć pliku deklaracji dla modułu „{0}”. Element „{1}” ma niejawnie typ „any”.", "Could_not_write_file_0_Colon_1_5033": "Nie można zapisać pliku „{0}”: {1}.", "DIRECTORY_6038": "KATALOG", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "Emitowanie deklaracji dla tego pliku wymaga użycia nazwy prywatnej „{0}”. Jawna adnotacja typu może odblokować emitowanie deklaracji.", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "Emitowanie deklaracji dla tego pliku wymaga użycia nazwy prywatnej „{0}” z modułu „{1}”. Jawna adnotacja typu może odblokować emitowanie deklaracji.", "Declaration_expected_1146": "Oczekiwano deklaracji.", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "Nazwa deklaracji powoduje konflikt z wbudowanym identyfikatorem globalnym „{0}”.", "Declaration_or_statement_expected_1128": "Oczekiwano deklaracji lub instrukcji.", + "Declare_a_private_field_named_0_90053": "Zadeklaruj pole prywatne o nazwie „{0}”.", "Declare_method_0_90023": "Zadeklaruj metodę „{0}”", "Declare_property_0_90016": "Zadeklaruj właściwość „{0}”", "Declare_static_method_0_90024": "Zadeklaruj metodę statyczną „{0}”", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "Elementy Decorator nie są tutaj prawidłowe.", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "Nie można stosować elementów Decorator do wielu metod dostępu pobierania/ustawiania o takiej samej nazwie.", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "Domyślny eksport modułu ma nazwę prywatną „{0}” lub używa tej nazwy.", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "Asercje określonego przypisania mogą być używane tylko wraz z adnotacją typu.", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "Definicje następujących identyfikatorów powodują konflikt z tymi w innym pliku: {0}", "Delete_all_unused_declarations_95024": "Usuń wszystkie nieużywane deklaracje", "Delete_the_outputs_of_all_projects_6365": "Usuń dane wyjściowe wszystkich projektów", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[Przestarzałe] Użyj w zastępstwie opcji „--jsxFactory”. Określ obiekt wywoływany dla elementu createElement przy określaniu jako celu emisji JSX „react”", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[Przestarzałe] Użyj w zastępstwie opcji „--outFile”. Połącz dane wyjściowe i wyemituj jako jeden plik", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[Przestarzałe] Użyj w zastępstwie opcji „--skipLibCheck”. Pomiń sprawdzanie typów domyślnych plików deklaracji biblioteki.", + "Did_you_forget_to_use_await_2773": "Czy zapomniano użyć operatora „await”?", + "Did_you_mean_0_1369": "Czy chodziło Ci o „{0}”?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "Czy chodziło Ci o ograniczenie elementu „{0}” do typu „new (...args: any[]) => {1}”?", + "Did_you_mean_to_call_this_expression_6212": "Czy chodziło Ci o wywołanie tego wyrażenia?", + "Did_you_mean_to_mark_this_function_as_async_1356": "Czy chodziło Ci o oznaczenie tej funkcji jako „async”?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "Czy chodziło Ci o umieszczenie w nawiasach okrągłych tego typu funkcji?", + "Did_you_mean_to_use_new_with_this_expression_6213": "Czy chodziło Ci o użycie operatora „new” z tym wyrażeniem?", "Digit_expected_1124": "Oczekiwano cyfry.", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "Katalog „{0}” nie istnieje. Operacje wyszukiwania w nim zostaną pominięte.", "Disable_checking_for_this_file_90018": "Wyłącz sprawdzanie dla tego pliku", "Disable_size_limitations_on_JavaScript_projects_6162": "Wyłącz ograniczenia rozmiarów dla projektów JavaScript.", + "Disable_solution_searching_for_this_project_6224": "Wyłącz wyszukiwanie rozwiązania dla tego projektu.", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "Wyłącz dokładne sprawdzanie sygnatur ogólnych w typach funkcji.", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "Wyłącz używanie plików źródłowych zamiast plików deklaracji z przywoływanych projektów.", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "Nie zezwalaj na przywoływanie tego samego pliku za pomocą nazw różniących się wielkością liter.", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "Nie dodawaj odwołań z trzema ukośnikami ani zaimportowanych modułów do listy skompilowanych plików.", "Do_not_emit_comments_to_output_6009": "Nie emituj komentarzy do danych wyjściowych.", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "Nie zgłaszaj błędów dla nieużywanych etykiet.", "Do_not_resolve_the_real_path_of_symlinks_6013": "Nie rozpoznawaj rzeczywistej ścieżki linków symbolicznych.", "Do_not_truncate_error_messages_6165": "Nie obcinaj komunikatów o błędach.", - "Duplicate_declaration_0_2718": "Zduplikowana deklaracja „{0}”.", "Duplicate_function_implementation_2393": "Zduplikowana implementacja funkcji.", "Duplicate_identifier_0_2300": "Zduplikowany identyfikator „{0}”.", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "Zduplikowany identyfikator „{0}”. Kompilator rezerwuje nazwę „{1}” w zakresie najwyższego poziomu modułu.", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "Zduplikowany identyfikator „_this”. Kompilator używa deklaracji zmiennej „_this” do przechwycenia odwołania do elementu „this”.", "Duplicate_label_0_1114": "Zduplikowana etykieta „{0}”.", "Duplicate_number_index_signature_2375": "Zduplikowana sygnatura indeksu liczbowego.", + "Duplicate_property_0_2718": "Zduplikowana właściwość „{0}”.", "Duplicate_string_index_signature_2374": "Zduplikowana sygnatura indeksu ciągu.", "Dynamic_import_cannot_have_type_arguments_1326": "Dynamiczne importowanie nie może mieć argumentów typu", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "Import dynamiczny jest obsługiwany tylko wtedy, gdy flaga „--module” to „commonjs” lub „esNext”.", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "Dynamiczne importowanie musi mieć jeden specyfikator jako argument.", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Specyfikator dynamicznego importowania musi być typu „string”, ale określono typ „{0}”.", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "Dynamiczne importy są obsługiwane tylko wtedy, gdy flaga „--module” jest ustawiona na wartość „es2020”, „esnext”, „commonjs”, „amd”, „system” lub „umd”.", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "Każdy element członkowski typu unii „{0}” ma sygnatury konstrukcji, ale żadne z tych sygnatur nie są ze sobą zgodne.", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "Każdy element członkowski typu unii „{0}” ma sygnatury, ale żadne z tych sygnatur nie są ze sobą zgodne.", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "Element ma niejawnie typ „any”, ponieważ wyrażenie typu „{0}” nie może być używane do indeksowania typu „{1}”.", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "Element niejawnie przyjmuje typ „any”, ponieważ wyrażenie indeksu ma typ inny niż „number”.", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "Element ma niejawnie typ „any”, ponieważ typ „{0}” nie ma sygnatury indeksu.", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "Element ma niejawnie typ „any”, ponieważ typ „{0}” nie ma sygnatury indeksu. Czy chodziło o wywołanie „{1}”?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "Emituj znacznik kolejności bajtów UTF-8 na początku plików wyjściowych.", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "Emituj pojedynczy plik z mapami źródeł zamiast oddzielnego pliku.", + "Emit_class_fields_with_Define_instead_of_Set_6222": "Emituj pola klasy przy użyciu metody Define zamiast Set.", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "Emituj źródło razem z mapami źródeł w pojedynczym pliku; wymaga ustawienia opcji „--inlineSourceMap” lub „--sourceMap”.", "Enable_all_strict_type_checking_options_6180": "Włącz wszystkie opcje ścisłego sprawdzania typów.", + "Enable_incremental_compilation_6378": "Włącz kompilację przyrostową", "Enable_project_compilation_6302": "Włącz kompilację projektu", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "Włącz ścisłe metody „bind”, „call” i „apply” dla funkcji.", "Enable_strict_checking_of_function_types_6186": "Włącz dokładne sprawdzanie typów funkcji.", "Enable_strict_checking_of_property_initialization_in_classes_6187": "Włącz dokładne sprawdzanie inicjowania właściwości w klasach.", "Enable_strict_null_checks_6113": "Włącz dokładne sprawdzanie wartości null.", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "Włącz opcję „experimentalDecorators” w pliku konfiguracji", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "Włącz flagę „--jsx” w pliku konfiguracji", "Enable_tracing_of_the_name_resolution_process_6085": "Włącz śledzenie procesu rozpoznawania nazw.", "Enable_verbose_logging_6366": "Włącz pełne rejestrowanie", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "Umożliwia współdziałanie emitowania między modułami CommonJS i ES przez tworzenie obiektów przestrzeni nazw dla wszystkich importów. Implikuje użycie ustawienia „allowSyntheticDefaultImports”.", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "Oczekiwano składowych wyliczenia.", "Enum_member_must_have_initializer_1061": "Składowa wyliczenia musi mieć inicjator.", "Enum_name_cannot_be_0_2431": "Wyliczenie nie może mieć nazwy „{0}”.", + "Enum_type_0_circularly_references_itself_2586": "Typ wyliczeniowy „{0}” cyklicznie odwołuje się do samego siebie.", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "Typ wyliczenia „{0}” ma składowe z inicjatorami niebędącymi literałami.", "Examples_Colon_0_6026": "Przykłady: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "Nadmierna głębokość stosu podczas porównywania typów „{0}” i „{1}”.", @@ -385,9 +490,9 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "Oczekiwano co najmniej {0} argumentów, ale otrzymano {1} lub więcej.", "Expected_corresponding_JSX_closing_tag_for_0_17002": "Oczekiwano odpowiadającego tagu zamykającego kodu JSX dla elementu „{0}”.", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "Oczekiwano odpowiedniego tagu zamykającego dla fragmentu kodu JSX.", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "Oczekiwany typ pola „{0}” w pliku „package.json” to „string”, a uzyskano typ „{1}”.", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "Oczekiwany typ pola „{0}” w pliku „package.json” to „{1}”, a uzyskano typ „{2}”.", "Experimental_Options_6177": "Opcje eksperymentalne", - "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "Obsługa eksperymentalna dekoratorów to funkcja, która może ulec zmianie w nowszych wersjach. Ustaw opcję „experimentalDecorators”, aby usunąć to ostrzeżenie.", + "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "Obsługa eksperymentalna dekoratorów to funkcja, która może ulec zmianie w nowszych wersjach. Ustaw opcję „experimentalDecorators” w pliku „tsconfig” lub „jsconfig”, aby usunąć to ostrzeżenie.", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "Jawnie określony rodzaj rozpoznawania modułów: „{0}”.", "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "Nie można użyć przypisania eksportu, gdy są używane moduły języka ECMAScript. Zamiast tego rozważ użycie elementu „export default” lub innego formatu modułu.", "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "Przypisanie eksportu nie jest obsługiwane, gdy flaga „--module” ma postać „system”.", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "Eksporty i przypisania eksportów nie są dozwolone w rozszerzeniach modułów.", "Expression_expected_1109": "Oczekiwano wyrażenia.", "Expression_or_comma_expected_1137": "Oczekiwano wyrażenia lub przecinka.", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "Wyrażenie tworzy typ unii, który jest zbyt złożony, aby go reprezentować.", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "Wynikiem rozpoznania wyrażenia jest element „_super” używany przez kompilator do przechwycenia odwołania do klasy bazowej.", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "Wynikiem rozpoznania wyrażenia jest deklaracja zmiennej „{0}” używana przez kompilator do obsługi funkcji asynchronicznych.", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "Wynikiem rozpoznania wyrażenia jest deklaracja zmiennej „_newTarget” używana przez kompilator do przechwytywania odwołania do metawłaściwości „new.target”.", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "Wyodrębnij do {0} w {1}", "Extract_to_0_in_1_scope_95008": "Wyodrębnij do {0} w zakresie {1}", "Extract_to_0_in_enclosing_scope_95007": "Wyodrębnij do {0} w zakresie otaczającym", + "Extract_to_interface_95090": "Wyodrębnianie do interfejsu", + "Extract_to_type_alias_95078": "Wyodrębnianie do aliasu typu", + "Extract_to_typedef_95079": "Wyodrębnianie do elementu typedef", + "Extract_type_95077": "Typ wyodrębniania", "FILE_6035": "PLIK", "FILE_OR_DIRECTORY_6040": "PLIK LUB KATALOG", "Failed_to_parse_file_0_Colon_1_5014": "Nie można przeanalizować pliku „{0}”: {1}.", "Fallthrough_case_in_switch_7029": "Przepuszczająca klauzula case w instrukcji switch.", "File_0_does_not_exist_6096": "Plik „{0}” nie istnieje.", "File_0_exist_use_it_as_a_name_resolution_result_6097": "Plik „{0}” istnieje — użyj go jako wyniku rozpoznawania nazw.", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "Plik „{0}” ma nieobsługiwane rozszerzenie. Obsługiwane są tylko rozszerzenia {1}.", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "Plik „{0}” ma nieobsługiwane rozszerzenie, dlatego zostanie pominięty.", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "Plik „{0}” ma nieobsługiwane rozszerzenie. Obsługiwane są tylko rozszerzenia {1}.", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "Plik „{0}” jest plikiem JavaScript. Czy chodziło Ci o włączenie opcji „allowJs”?", "File_0_is_not_a_module_2306": "Plik „{0}” nie jest modułem.", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "Plik „{0}” nie znajduje się na liście plików projektu. Projekty muszą zawierać listę wszystkich plików lub używać wzorca „include”.", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "Plik „{0}” nie znajduje się na liście plików projektu „{1}”. Projekty muszą zawierać listę wszystkich plików lub używać wzorca „include”.", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "Plik „{0}” nie znajduje się w katalogu „rootDir” „{1}”. Katalog „rootDir” powinien zawierać wszystkie pliki źródłowe.", "File_0_not_found_6053": "Nie można odnaleźć pliku '{0}'.", "File_change_detected_Starting_incremental_compilation_6032": "Wykryto zmianę pliku. Trwa rozpoczynanie kompilacji przyrostowej...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "Specyfikacja pliku nie może zawierać katalogu nadrzędnego („..”) wyświetlanego po symbolu wieloznacznym katalogu rekursywnego („**”): „{0}”.", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "Specyfikacja pliku nie może kończyć się cyklicznym symbolem wieloznacznym katalogu („**”): „{0}”.", "Fix_all_detected_spelling_errors_95026": "Napraw wszystkie wykryte błędy pisowni", + "Fix_all_expressions_possibly_missing_await_95085": "Napraw wszystkie wyrażenia, w których prawdopodobnie brakuje operatora „await”", + "Found_0_errors_6217": "Znaleziono błędy: {0}.", "Found_0_errors_Watching_for_file_changes_6194": "Znalezione błędy: {0}. Obserwowanie zmian plików.", + "Found_1_error_6216": "Znaleziono 1 błąd.", "Found_1_error_Watching_for_file_changes_6193": "Znaleziono 1 błąd. Obserwowanie zmian plików.", "Found_package_json_at_0_6099": "Znaleziono plik „package.json” w lokalizacji „{0}”.", - "Found_package_json_at_0_Package_ID_is_1_6190": "Znaleziono plik „package.json” w lokalizacji „{0}”. Identyfikator pakietu to „{1}”.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "Deklaracje funkcji nie są dozwolone wewnątrz bloków w trybie z ograniczeniami, jeśli elementem docelowym jest „ES3” lub „ES5”.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "Deklaracje funkcji nie są dozwolone wewnątrz bloków w trybie z ograniczeniami, jeśli elementem docelowym jest „ES3” lub „ES5”. Definicje klas automatycznie używają trybu z ograniczeniami.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "Deklaracje funkcji nie są dozwolone wewnątrz bloków w trybie z ograniczeniami, jeśli elementem docelowym jest „ES3” lub „ES5”. Moduły automatycznie używają trybu z ograniczeniami.", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Funkcja nie zawiera końcowej instrukcji return, a zwracany typ nie obejmuje wartości „undefined”.", "Function_overload_must_be_static_2387": "Przeciążenie funkcji musi być statyczne.", "Function_overload_must_not_be_static_2388": "Przeciążenie funkcji nie może być statyczne.", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "Dla typu funkcji bez adnotacji zwracanego typu jest niejawnie określony zwracany typ „{0}”.", "Generate_get_and_set_accessors_95046": "Generuj metody dostępu „get” i „set”.", + "Generates_a_CPU_profile_6223": "Generuje profil procesora CPU.", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "Generuje mapę źródła dla poszczególnych plików „.d.ts”.", "Generates_corresponding_d_ts_file_6002": "Generuje odpowiadający plik „d.ts”.", "Generates_corresponding_map_file_6043": "Generuje odpowiadający plik „map”.", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "Dla generatora niejawnie określono typ „{0}”, ponieważ nie przekazuje on żadnych wartości. Rozważ podanie zwracanego typu.", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "Dla generatora niejawnie określono zwracany typ „{0}”, ponieważ nie zwraca on żadnych wartości. Rozważ podanie adnotacji zwracanego typu.", "Generators_are_not_allowed_in_an_ambient_context_1221": "Generatory nie są dozwolone w otaczającym kontekście.", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "Generatory są dostępne tylko wtedy, gdy jest używany język ECMAScript 2015 lub nowszy.", "Generic_type_0_requires_1_type_argument_s_2314": "Typ ogólny „{0}” wymaga następującej liczby argumentów typu: {1}.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "Typ ogólny „{0}” wymaga od {1} do {2} argumentów typu.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "Tworzenie wystąpienia typu ogólnego jest nadmiernie szczegółowe i prawdopodobnie nieskończone.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Widoczności metod dostępu pobierającej i ustawiającej są niezgodne.", "Global_module_exports_may_only_appear_at_top_level_1316": "Globalne eksporty modułu mogą występować tylko na najwyższym poziomie.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "Globalne eksporty modułu mogą występować tylko w plikach deklaracji.", "Global_module_exports_may_only_appear_in_module_files_1314": "Globalne eksporty modułu mogą występować tylko w plikach modułów.", "Global_type_0_must_be_a_class_or_interface_type_2316": "Typ globalny „{0}” musi być typem klasy lub interfejsu.", "Global_type_0_must_have_1_type_parameter_s_2317": "Typ globalny „{0}” musi mieć następującą liczbę parametrów typu: {1}.", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "W przypadku ponownego kompilowania w parametrach „--incremental” i „--watch” przyjmuje się, że zmiany w pliku będą miały wpływ tylko na pliki bezpośrednio od niego zależne.", "Hexadecimal_digit_expected_1125": "Oczekiwano cyfry szesnastkowej.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "Oczekiwano identyfikatora. „{0}” jest wyrazem zastrzeżonym w trybie z ograniczeniami.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "Oczekiwano identyfikatora. „{0}” jest wyrazem zastrzeżonym w trybie z ograniczeniami. Definicje klas są określane automatycznie w trybie z ograniczeniami.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "Oczekiwano identyfikatora. Element „{0}” jest wyrazem zastrzeżonym w trybie z ograniczeniami. Moduły są określane automatycznie w trybie z ograniczeniami.", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "Oczekiwano identyfikatora. „{0}” jest słowem zastrzeżonym, którego nie można użyć w tym miejscu.", "Identifier_expected_1003": "Oczekiwano identyfikatora.", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "Oczekiwano identyfikatora. Ciąg „__esModule” jest zastrzeżony jako eksportowany znacznik podczas transformowania modułów ECMAScript.", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "Jeśli pakiet „{0}” faktycznie udostępnia ten moduł, rozważ wysłanie żądania ściągnięcia w celu zmiany elementu „https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}”", "Ignore_this_error_message_90019": "Ignoruj ten komunikat o błędzie", "Implement_all_inherited_abstract_classes_95040": "Zaimplementuj wszystkie dziedziczone klasy abstrakcyjne", "Implement_all_unimplemented_interfaces_95032": "Zaimplementuj wszystkie niezaimplementowane interfejsy", "Implement_inherited_abstract_class_90007": "Wdróż odziedziczoną klasę abstrakcyjną", "Implement_interface_0_90006": "Implementuj interfejs „{0}”", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "Klauzula implements wyeksportowanej klasy „{0}” ma nazwę prywatną „{1}” lub używa tej nazwy.", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "Niejawna konwersja typu „symbol” na „string” zakończy się niepowodzeniem w czasie wykonywania. Rozważ opakowywanie tego wyrażenia w elemencie „String(...)”.", "Import_0_from_module_1_90013": "Importuj element „{0}” z modułu „{1}”", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "Nie można użyć przypisania importu, gdy są używane moduły języka ECMAScript. Zamiast tego rozważ użycie elementu „import * as ns from \"mod\"”, „import {a} from \"mod\"” lub „import d from \"mod\"” albo innego formatu modułu.", "Import_declaration_0_is_using_private_name_1_4000": "Deklaracja importu „{0}” używa nazwy prywatnej „{1}”.", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "Deklaracja importu powoduje konflikt z deklaracją lokalną „{0}”.", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "Deklaracje importu w przestrzeni nazw nie mogą odwoływać się do modułu.", + "Import_default_0_from_module_1_90032": "Importuj domyślny element „{0}” z modułu „{1}”", "Import_emit_helpers_from_tslib_6139": "Importuj pomocników emitowania z elementu „tslib”.", "Import_may_be_converted_to_a_default_import_80003": "Import może zostać przekonwertowany na import domyślny.", "Import_name_cannot_be_0_2438": "Import nie może mieć nazwy „{0}”.", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "Importy nie są dozwolone w rozszerzeniach modułów. Rozważ przeniesienie ich do obejmującego modułu zewnętrznego.", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "W deklaracjach wyliczenia otoczenia inicjator składowej musi być wyrażeniem stałym.", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "W przypadku wyliczenia z wieloma deklaracjami tylko jedna deklaracja może pominąć inicjator dla pierwszego elementu wyliczenia.", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "W deklaracjach wyliczeń ze specyfikatorem „const” inicjator składowej musi być wyrażeniem stałym.", "Include_modules_imported_with_json_extension_6197": "Uwzględnij moduły zaimportowane z rozszerzeniem „json”", "Index_signature_in_type_0_only_permits_reading_2542": "Sygnatura indeksu w typie „{0}” zezwala tylko na odczytywanie.", "Index_signature_is_missing_in_type_0_2329": "Brak sygnatury indeksu w typie „{0}”.", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "Wszystkie poszczególne deklaracje w scalonej deklaracji „{0}” muszą być wyeksportowane lub lokalne.", "Infer_all_types_from_usage_95023": "Wywnioskuj wszystkie typy na podstawie użycia", "Infer_parameter_types_from_usage_95012": "Wnioskuj typy parametrów na podstawie użycia", + "Infer_this_type_of_0_from_usage_95080": "Wnioskuj typ „this” elementu „{0}” na podstawie użycia", "Infer_type_of_0_from_usage_95011": "Wnioskuj typ elementu „{0}” na podstawie użycia", "Initialize_property_0_in_the_constructor_90020": "Zainicjuj właściwość „{0}” w konstruktorze", "Initialize_static_property_0_90021": "Zainicjuj właściwość statyczną „{0}”", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "Element „...” JSDoc może występować tylko w ostatnim parametrze sygnatury.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "Tag JSDoc „@param” tag ma nazwę „{0}”, ale nie ma parametru o tej nazwie.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "Tag JSDoc „@param” ma nazwę „{0}”, ale nie istnieje parametr o tej nazwie. Byłby on zgodny z elementem „arguments”, gdyby miał typ tablicy.", + "JSDoc_type_0_circularly_references_itself_2587": "Typ JSDoc „{0}” cyklicznie odwołuje się do samego siebie.", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "Tag „@typedef” JSDoc powinien mieć adnotację typu lub powinien po nim następować tag „@property” lub „@member”.", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "Typy JSDoc mogą być używane wyłącznie w komentarzach dokumentacji.", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "Typy JSDoc mogą być przenoszone do typów TypeScript.", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "Typ elementu JSX „{0}” nie ma sygnatury konstrukcji ani wywołania.", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "Typ elementu JSX „{0}” nie jest funkcją konstruktora dla elementów JSX.", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "Elementy JSX nie mogą mieć wielu atrybutów o tej samej nazwie.", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "Wyrażenia JSX nie mogą używać operatora przecinka. Czy chodziło Ci o zapisanie tablicy?", "JSX_expressions_must_have_one_parent_element_2657": "Wyrażenia JSX muszą mieć jeden element nadrzędny.", "JSX_fragment_has_no_corresponding_closing_tag_17014": "Fragment kodu JSX nie ma odpowiedniego tagu zamykającego.", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "Fragment JSX nie jest obsługiwany podczas używania śródwierszowej dyrektywy pragma fabryki JSX", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "Element podrzędny rozkładu JSX musi być typem tablicy.", "Jump_target_cannot_cross_function_boundary_1107": "Cel skoku nie może przekraczać granicy funkcji.", "KIND_6034": "RODZAJ", + "Keywords_cannot_contain_escape_characters_1260": "Słowa kluczowe nie mogą zawierać znaków ucieczki.", "LOCATION_6037": "LOKALIZACJA", "Language_service_is_disabled_9004": "Usługa języka jest wyłączona.", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "Lewa strona operatora „przecinek” jest nieużywana i nie ma żadnych efektów ubocznych.", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "Ustaw wywołanie „super()” jako pierwszą instrukcję w konstruktorze", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "Zmapowany typ obiektu niejawnie ma typ szablonu „any”.", "Member_0_implicitly_has_an_1_type_7008": "Dla składowej „{0}” niejawnie określono typ „{1}”.", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "Element członkowski „{0}” niejawnie ma typ „{1}”, ale lepszy typ można wywnioskować na podstawie użycia.", "Merge_conflict_marker_encountered_1185": "Napotkano znacznik konfliktu scalania.", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "Scalona deklaracja „{0}” nie może zawierać domyślnej deklaracji eksportu. Rozważ dodanie oddzielnej deklaracji „export default {0}” zamiast niej.", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "Metawłaściwość „{0}” jest dozwolona tylko w treści deklaracji funkcji, wyrażeniu funkcji lub konstruktorze.", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "Metoda „{0}” wyeksportowanego interfejsu ma nazwę „{1}” z modułu prywatnego „{2}” lub używa tej nazwy.", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "Metoda „{0}” wyeksportowanego interfejsu ma nazwę prywatną „{1}” lub używa tej nazwy.", "Modifiers_cannot_appear_here_1184": "Modyfikatory nie mogą występować w tym miejscu.", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "Moduł „{0}” nie odwołuje się do typu, ale jest tutaj używany jako typ.", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "Moduł „{0}” może być importowany domyślnie tylko przy użyciu flagi „{1}”", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "Moduł „{0}” deklaruje element „{1}” lokalnie, ale jest on eksportowany jako „{2}”.", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "Moduł „{0}” deklaruje element „{1}” lokalnie, ale nie jest on eksportowany.", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "Moduł „{0}” nie odwołuje się do typu, ale jest tutaj używany jako typ. Czy chodziło Ci o „typeof import(„{0}”)”?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "Moduł „{0}” nie odwołuje się do wartości, ale jest tutaj używany jako wartość.", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "Moduł {0} już wyeksportował składową o nazwie „{1}”. Zastanów się nad jawnym ponownym eksportem, aby rozstrzygnąć niejednoznaczność.", "Module_0_has_no_default_export_1192": "Moduł „{0}” nie ma eksportu domyślnego.", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "Moduł „{0}” nie ma eksportu domyślnego. Czy zamiast tego miał zostać użyty element „import { {1} } from {0}”?", "Module_0_has_no_exported_member_1_2305": "Moduł „{0}” nie ma wyeksportowanej składowej „{1}”.", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "Moduł „{0}” nie ma wyeksportowanego elementu członkowskiego „{1}”. Czy chodziło o „{2}”?", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "Moduł „{0}” nie ma wyeksportowanego elementu członkowskiego „{1}”. Czy zamiast tego miał zostać użyty element „import {1} from {0}”?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "Moduł „{0}” został ukryty przez deklarację lokalną o takiej samej nazwie.", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "Wynikiem rozpoznania modułu „{0}” jest jednostka niebędąca modułem i nie można zaimportować tego modułu przy użyciu tej konstrukcji.", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "Moduł „{0}” używa elementu „export =” i nie może być używany z elementem „export *”.", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "Moduł „{0}” został rozpoznany jako otaczający moduł zadeklarowany w elemencie „{1}”, ponieważ nie zmodyfikowano tego pliku.", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "Moduł „{0}” został rozpoznany jako otaczający moduł zadeklarowany lokalnie w pliku „{1}”.", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "Moduł „{0}” został rozpoznany jako „{1}”, ale nie jest ustawiona opcja „--jsx”.", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "Moduł „{0}” został rozpoznany jako „{1}”, ale opcja „--resolveJsonModule” nie jest używana.", "Module_Resolution_Options_6174": "Opcje rozpoznawania modułu", "Module_name_0_matched_pattern_1_6092": "Nazwa modułu: „{0}”, dopasowany wzorzec: „{1}”.", "Module_name_0_was_not_resolved_6090": "======== Nazwa modułu „{0}” nie została rozpoznana. ========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== Nazwa modułu „{0}” została pomyślnie rozpoznana jako „{1}”. ========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== Nazwa modułu „{0}” została pomyślnie rozpoznana jako „{1}” z identyfikatorem pakietu „{2}”. ========", "Module_resolution_kind_is_not_specified_using_0_6088": "Rodzaj rozpoznawania modułów nie został podany. Zostanie użyty rodzaj „{0}”.", "Module_resolution_using_rootDirs_has_failed_6111": "Nie można rozpoznać modułów przy użyciu opcji „rootDirs”.", "Move_to_a_new_file_95049": "Przenieś do nowego pliku", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "Nazwane właściwości „{0}” typów „{1}” i „{2}” nie są identyczne.", "Namespace_0_has_no_exported_member_1_2694": "Przestrzeń nazw „{0}” nie ma wyeksportowanej składowej „{1}”.", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "Żaden z konstruktorów podstawowych nie ma określonej liczby argumentów typu.", + "No_constituent_of_type_0_is_callable_2755": "Żadna składowa typu „{0}” nie jest wywoływalna.", + "No_constituent_of_type_0_is_constructable_2759": "Żadnej składowej typu „{0}” nie można skonstruować.", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "Nie znaleziono żadnej sygnatury indeksu z parametrem typu „{0}” w typie „{1}”.", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "Nie można znaleźć danych wejściowych w pliku konfiguracji „{0}”. Określone ścieżki „include” to „{1}”, a „exclude” to „{2}”.", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "Żadne przeciążenie nie oczekuje {0} argumentów, ale istnieją przeciążenia, które oczekują {1} lub {2} argumentów.", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "Żadne przeciążenie nie oczekuje {0} argumentów typu, ale istnieją przeciążenia, które oczekują {1} lub {2} argumentów typu.", + "No_overload_matches_this_call_2769": "Żadne przeciążenie nie jest zgodne z tym wywołaniem.", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "Nie istnieje żadna wartość w zakresie dla właściwości skrótowej „{0}”. Zadeklaruj ją lub udostępnij inicjatora.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "Klasa nieabstrakcyjna „{0}” nie implementuje odziedziczonej abstrakcyjnej składowej „{1}” z klasy „{2}”.", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "Wyrażenie klasy nieabstrakcyjnej nie implementuje odziedziczonej abstrakcyjnej składowej „{0}” z klasy „{1}”.", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "Asercji o wartości innej niż null można używać tylko w plikach TypeScript.", + "Non_simple_parameter_declared_here_1348": "W tym miejscu zadeklarowano parametr inny niż prosty.", "Not_all_code_paths_return_a_value_7030": "Nie wszystkie ścieżki w kodzie zwracają wartość.", + "Not_all_constituents_of_type_0_are_callable_2756": "Nie wszystkie składowe typu „{0}” są wywoływalne.", + "Not_all_constituents_of_type_0_are_constructable_2760": "Nie wszystkie składowe typu „{0}” można skonstruować.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "Nie można przypisać typu indeksu numerycznego „{0}” do typu indeksu ciągu „{1}”.", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "Literały liczbowe z wartościami bezwzględnymi równymi 2^53 lub większymi są zbyt duże, aby mogły być dokładnie reprezentowane jako liczby całkowite.", "Numeric_separators_are_not_allowed_here_6188": "Separatory liczbowe nie są dozwolone w tym miejscu.", "Object_is_of_type_unknown_2571": "Obiekt jest typu „nieznany”.", "Object_is_possibly_null_2531": "Obiekt ma prawdopodobnie wartość „null”.", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "Literały ósemkowe są niedozwolone w inicjatorze składowych wyliczeń. Użyj składni „{0}”.", "Octal_literals_are_not_allowed_in_strict_mode_1121": "Literały ósemkowe są niedozwolone w trybie z ograniczeniami.", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "Literały ósemkowe są niedostępne, jeśli językiem docelowym jest ECMAScript 5 lub nowszy. Użyj składni „{0}”.", + "Only_ECMAScript_imports_may_use_import_type_1370": "Tylko importy modułów języka ECMAScript mogą używać aliasu „typ importu”.", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "W instrukcji „for...in” jest dozwolona tylko pojedyncza deklaracja zmiennej.", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "W instrukcji „for...of” jest dozwolona tylko pojedyncza deklaracja zmiennej.", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "Tylko funkcja typu void może być wywoływana za pomocą słowa kluczowego „new”.", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "Emituj tylko pliki deklaracji „d.ts”.", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "Klauzula „extends” klasy obsługuje obecnie tylko identyfikatory/nazwy kwalifikowane z opcjonalnymi argumentami typu.", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "Tylko publiczne i chronione metody klasy bazowej są dostępne przy użyciu słowa kluczowego „super”.", + "Operator_0_cannot_be_applied_to_type_1_2736": "Nie można zastosować operatora „{0}” do typu „{1}”.", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "Nie można zastosować operatora „{0}” do typów „{1}” i „{2}”.", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "Opcję „{0}” można określić jedynie w pliku „tsconfig.json”.", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "Opcja „{0}” może być używana tylko w przypadku podania opcji „--inlineSourceMap” lub „--sourceMap”.", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "Nie można określić opcji „{0}”, jeśli opcja „target” ma wartość „ES3”.", "Option_0_cannot_be_specified_with_option_1_5053": "Opcji „{0}” nie można określić razem z opcją „{1}”.", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "Opcji „{0}” nie można określić bez opcji „{1}”.", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "Opcji „{0}” nie można określić bez opcji „{1}” lub opcji „{2}”.", "Option_0_should_have_array_of_strings_as_a_value_6103": "Wartość opcji „{0}” powinna być tablicą łańcuchów.", "Option_build_must_be_the_first_command_line_argument_6369": "Opcja „--build” musi być pierwszym argumentem wiersza polecenia.", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "Opcję „--incremental” można określić tylko za pomocą pliku tsconfig, emitując do pojedynczego pliku lub gdy określono opcję „--tsBuildInfoFile”.", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "Opcji „isolatedModules” można użyć tylko wtedy, gdy podano opcję „--module” lub opcja „target” określa cel „ES2015” lub wyższy.", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "Opcji „paths” nie można użyć bez podawania opcji „--baseUrl”.", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "Nie można mieszać opcji „project” z plikami źródłowymi w wierszu polecenia.", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "Opcję „--resolveJsonModule” można określić tylko wtedy, gdy generacja kodu modułu to „commonjs”, „amd”, „es2015” lub „esNext”.", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "Nie można określić opcji „--resolveJsonModule” bez strategii rozpoznawania modułów „node”.", "Options_0_and_1_cannot_be_combined_6370": "Nie można połączyć opcji „{0}” i „{1}”.", "Options_Colon_6027": "Opcje:", "Output_directory_for_generated_declaration_files_6166": "Katalog wyjściowy dla wygenerowanych plików deklaracji.", "Output_file_0_from_project_1_does_not_exist_6309": "Plik wyjściowy „{0}” z projektu „{1}” nie istnieje", "Output_file_0_has_not_been_built_from_source_file_1_6305": "Plik wyjściowy „{0}” nie został utworzony na podstawie pliku źródłowego „{1}”.", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "Sygnatura przeciążenia nie jest zgodna z implementacją funkcji.", + "Overload_0_of_1_2_gave_the_following_error_2772": "Przeciążenie {0} {1}, „{2}”, dało następujący błąd.", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "Wszystkie sygnatury przeciążeń muszą być abstrakcyjne lub nieabstrakcyjne.", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "Wszystkie sygnatury przeciążeń muszą być otaczającymi sygnaturami lub żadna nie może być otaczającą sygnaturą.", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "Wszystkie sygnatury przeciążeń muszą być wyeksportowane lub żadna nie może być wyeksportowana.", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "Wszystkie sygnatury przeciążeń muszą być publiczne, prywatne lub chronione.", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "Parametr „{0}” nie może być przywoływany w swoim inicjatorze.", "Parameter_0_implicitly_has_an_1_type_7006": "Dla parametru „{0}” niejawnie określono typ „{1}”.", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "Parametr „{0}” niejawnie ma typ „{1}”, ale lepszy typ można wywnioskować na podstawie użycia.", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "Parametr „{0}” nie znajduje się w tym samym położeniu co parametr „{1}”.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "Parametr „{0}” metody dostępu ma nazwę „{1}” z modułu zewnętrznego „{2}” lub używa tej nazwy, ale nie można go nazwać.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "Parametr „{0}” metody dostępu ma nazwę „{1}” z modułu prywatnego „{2}” lub używa tej nazwy.", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "Parametr „{0}” metody dostępu ma nazwę prywatną „{1}” lub używa tej nazwy.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "Parametr „{0}” sygnatury wywołania z wyeksportowanego interfejsu ma nazwę „{1}” z modułu prywatnego „{2}” lub używa tej nazwy.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "Parametr „{0}” sygnatury wywołania z wyeksportowanego interfejsu ma nazwę prywatną „{1}” lub używa tej nazwy.", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "Parametr „{0}” konstruktora z wyeksportowanej klasy ma nazwę „{1}” z modułu zewnętrznego {2} lub używa tej nazwy, ale nie można go nazwać.", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "Parametr „{0}” publicznej metody statycznej z wyeksportowanej klasy ma nazwę prywatną „{1}” lub używa tej nazwy.", "Parameter_cannot_have_question_mark_and_initializer_1015": "Parametr nie może mieć znaku zapytania i inicjatora.", "Parameter_declaration_expected_1138": "Oczekiwano deklaracji parametru.", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "Parametr ma nazwę, ale nie ma typu. Czy chodziło Ci o „{0}: {1}”?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "Modyfikatorów parametrów można używać tylko w plikach TypeScript.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "Typ parametru publicznej metody ustawiającej „{0}” z wyeksportowanej klasy ma nazwę „{1}” z modułu prywatnego „{2}” lub używa tej nazwy.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "Typ parametru publicznej metody ustawiającej „{0}” z wyeksportowanej klasy ma nazwę prywatną „{1}” lub używa tej nazwy.", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "Typ parametru publicznej statycznej metody ustawiającej „{0}” z wyeksportowanej klasy ma nazwę „{1}” z modułu prywatnego „{2}” lub używa tej nazwy.", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "Analizuj w trybie z ograniczeniami i emituj ciąg „use strict” dla każdego pliku źródłowego.", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "Wzorzec „{0}” może zawierać maksymalnie jeden znak „*”.", "Prefix_0_with_an_underscore_90025": "Poprzedzaj elementy „{0}” znakiem podkreślenia", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "Dodaj prefiks „declare” do wszystkich niepoprawnych deklaracji właściwości", "Prefix_all_unused_declarations_with_where_possible_95025": "Jeśli to możliwe, poprzedź wszystkie nieużywane deklaracje znakiem „_”", + "Prefix_with_declare_95094": "Dodaj prefiks „declare”", "Print_names_of_files_part_of_the_compilation_6155": "Drukuj nazwy plików będących częścią kompilacji.", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "Drukuj nazwy plików będących częścią kompilacji, a następnie zatrzymaj przetwarzanie.", "Print_names_of_generated_files_part_of_the_compilation_6154": "Drukuj nazwy wygenerowanych plików będących częścią kompilacji.", "Print_the_compiler_s_version_6019": "Wypisz wersję kompilatora.", + "Print_the_final_configuration_instead_of_building_1350": "Wydrukuj końcową konfigurację zamiast kompilowania.", "Print_this_message_6017": "Wypisz ten komunikat.", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "Identyfikatory prywatne są niedozwolone w deklaracjach zmiennych.", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "Identyfikatory prywatne są niedozwolone poza treściami klasy.", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "Identyfikatory prywatne są dostępne tylko wtedy, gdy jest używany język ECMAScript 2015 lub nowszy.", + "Private_identifiers_cannot_be_used_as_parameters_18009": "Identyfikatory prywatne nie mogą być używane jako parametry", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "Nie można uzyskać dostępu do prywatnego lub chronionego elementu składowego „{0}” w parametrze typu.", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "Nie można skompilować projektu „{0}”, ponieważ jego zależność „{1}” zawiera błędy", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "Nie można skompilować projektu „{0}”, ponieważ jego zależność „{1}” nie została skompilowania", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "Projekt „{0}” jest nieaktualny, ponieważ jego zależność „{1}” jest nieaktualna", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "Projekt „{0}” jest nieaktualny, ponieważ najstarsze dane wyjściowe „{1}” są starsze niż najnowsze dane wejściowe „{2}”", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "Projekt „{0}” jest nieaktualny, ponieważ plik wyjściowy „{1}” nie istnieje", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "Projekt „{0}” jest nieaktualny, ponieważ jego dane wyjściowe zostały wygenerowane w wersji „{1}”, która różni się od bieżącej wersji „{2}”", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "Projekt „{0}” jest nieaktualny, ponieważ dane wyjściowe jego zależności „{1}” uległy zmianie", "Project_0_is_up_to_date_6361": "Projekt „{0}” jest aktualny", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "Projekt „{0}” jest aktualny, ponieważ najnowsze dane wejściowe „{1}” są starsze niż najstarsze dane wyjściowe „{2}”", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "Projekt „{0}” jest aktualny z plikami .d.ts z jego zależności", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "Projekty do przywołania", "Property_0_does_not_exist_on_const_enum_1_2479": "Właściwość „{0}” nie istnieje w wyliczeniu ze specyfikatorem „const” „{1}”.", "Property_0_does_not_exist_on_type_1_2339": "Właściwość „{0}” nie istnieje w typie „{1}”.", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "Właściwość „{0}” nie istnieje w typie „{1}”. Czy zapomniano użyć elementu „await”?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "Właściwość „{0}” nie istnieje w typie „{1}”. Czy chodziło Ci o „{2}”?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "Właściwość „{0}” ma deklaracje będące w konflikcie i jest niedostępna w typie „{1}”.", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "Właściwość „{0}” nie ma inicjatora i nie jest na pewno przypisana w konstruktorze.", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "Dla właściwości „{0}” niejawnie określono typ „any”, ponieważ jego metoda dostępu „get” nie ma adnotacji zwracanego typu.", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "Dla właściwości „{0}” niejawnie określono typ „any”, ponieważ jego metoda dostępu „set” nie ma adnotacji typu parametru.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "Właściwość „{0}” niejawnie ma typ „any”, ale lepszy typ dla jej metody dostępu get można wywnioskować na podstawie użycia.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "Właściwość „{0}” niejawnie ma typ „any”, ale lepszy typ dla jej metody dostępu set można wywnioskować na podstawie użycia.", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "Właściwości „{0}” w typie „{1}” nie można przypisać do tej samej właściwości w typie podstawowym „{2}”.", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "Właściwości „{0}” w typie „{1}” nie można przypisać do typu „{2}”.", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "Właściwość „{0}” w typie „{1}” odwołuje się do innego elementu członkowskiego, do którego nie można uzyskać dostępu z typu „{2}”.", + "Property_0_is_a_static_member_of_type_1_2576": "Właściwość „{0}” jest statycznym elementem członkowskim typu „{1}”", "Property_0_is_declared_but_its_value_is_never_read_6138": "Właściwość „{0}” jest zadeklarowana, ale jej wartość nie jest nigdy odczytywana.", "Property_0_is_incompatible_with_index_signature_2530": "Właściwość „{0}” jest niezgodna z sygnaturą indeksu.", + "Property_0_is_incompatible_with_rest_element_type_2573": "Właściwość „{0}” jest niezgodna z typem elementu rest.", "Property_0_is_missing_in_type_1_2324": "W typie „{1}” brakuje właściwości „{0}”.", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "Właściwości „{0}” brakuje w typie „{1}”, ale jest wymagana w typie „{2}”.", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "Właściwość „{0}” nie jest dostępna poza klasą „{1}”, ponieważ ma identyfikator prywatny.", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "Właściwość „{0}” jest opcjonalna w typie „{1}”, ale jest wymagana w typie „{2}”.", "Property_0_is_private_and_only_accessible_within_class_1_2341": "Właściwość „{0}” jest prywatna i dostępna tylko w klasie „{1}”.", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "Właściwość „{0}” jest prywatna w typie „{1}”, ale nie w typie „{2}”.", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "Właściwość „{0}” jest chroniona, ale typ „{1}” nie jest klasą pochodną elementu „{2}”.", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "Właściwość „{0}” jest chroniona w typie „{1}”, ale jest publiczna w typie „{2}”.", "Property_0_is_used_before_being_assigned_2565": "Właściwość „{0}” jest używana przed przypisaniem.", + "Property_0_is_used_before_its_initialization_2729": "Właściwość „{0}” jest używana przez jej zainicjowaniem.", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "Właściwości „{0}” atrybutu rozkładu JSX nie można przypisać do właściwości docelowej.", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "Właściwość „{0}” wyeksportowanego wyrażenia klasy nie może być prywatna ani chroniona.", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "Właściwość „{0}” wyeksportowanego interfejsu ma nazwę „{1}” z modułu prywatnego „{2}” lub używa tej nazwy.", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "Właściwość „{0}” wyeksportowanego interfejsu ma nazwę prywatną „{1}” lub używa tej nazwy.", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "Nie można przypisać właściwości „{0}” typu „{1}” do typu indeksu numerycznego „{2}”.", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "Nie można przypisać właściwości „{0}” typu „{1}” do typu indeksu ciągu „{2}”.", + "Property_0_was_also_declared_here_2733": "Właściwość „{0}” została również zadeklarowana w tym miejscu.", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "Właściwość „{0}” zastąpi właściwość bazową w elemencie „{1}”. Jeśli jest to zamierzone, dodaj inicjator. W przeciwnym razie dodaj modyfikator „declare” lub usuń nadmiarową deklarację.", "Property_assignment_expected_1136": "Oczekiwano przypisania właściwości.", "Property_destructuring_pattern_expected_1180": "Oczekiwano wzorca usuwającego strukturę właściwości.", "Property_or_signature_expected_1131": "Oczekiwano właściwości lub sygnatury.", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "Publiczna właściwość statyczna „{0}” wyeksportowanej klasy ma nazwę „{1}” z modułu zewnętrznego {2} lub używa tej nazwy, ale nie można jej nazwać.", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "Publiczna właściwość statyczna „{0}” wyeksportowanej klasy ma nazwę „{1}” z modułu prywatnego „{2}” lub używa tej nazwy.", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "Publiczna właściwość statyczna „{0}” wyeksportowanej klasy ma nazwę prywatną „{1}” lub używa tej nazwy.", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "Nazwa kwalifikowana „{0}” nie jest dozwolona bez wiodącego elementu „@param {object} {1}”.", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "Zgłaszaj błąd w przypadku wyrażeń i deklaracji z implikowanym typem „any”.", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Zgłaszaj błąd w przypadku wyrażeń „this” z niejawnym typem „any”.", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "Ponowne eksportowanie typu, gdy podano flagę „--isolatedModules”, wymaga użycia aliasu „export type”.", "Redirect_output_structure_to_the_directory_6006": "Przekieruj strukturę wyjściową do katalogu.", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "Przywoływany projekt „{0}” musi mieć ustawienie „composite” o wartości true.", + "Remove_all_unnecessary_uses_of_await_95087": "Usuń wszystkie niepotrzebne użycia operatora „await”", "Remove_all_unreachable_code_95051": "Usuń cały nieosiągalny kod", "Remove_all_unused_labels_95054": "Usuń wszystkie nieużywane etykiety", "Remove_braces_from_arrow_function_95060": "Usuń nawiasy klamrowe z funkcji strzałki", - "Remove_declaration_for_Colon_0_90004": "Usuń deklarację dla: „{0}”", "Remove_destructuring_90009": "Usuń usuwanie struktury", "Remove_import_from_0_90005": "Usuń import z „{0}”", + "Remove_template_tag_90011": "Usuń znacznik szablonu", + "Remove_type_parameters_90012": "Usuń parametry typu", + "Remove_unnecessary_await_95086": "Usuń niepotrzebny operator „await”", "Remove_unreachable_code_95050": "Usuń nieosiągalny kod", + "Remove_unused_declaration_for_Colon_0_90004": "Usuń nieużywaną deklarację dla: „{0}”", "Remove_unused_label_95053": "Usuń nieużywaną etykietę", "Remove_variable_statement_90010": "Usuń instrukcję zmiennej", + "Replace_all_unused_infer_with_unknown_90031": "Zamień wszystkie nieużywane elementy „infer” na „unknown”", "Replace_import_with_0_95015": "Zamień import na element „{0}”.", + "Replace_infer_0_with_unknown_90030": "Zamień element „infer {0}” na „unknown”", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Zgłoś błąd, gdy nie wszystkie ścieżki w kodzie zwracają wartość.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Zgłoś błędy dla przepuszczających klauzul case w instrukcji switch.", "Report_errors_in_js_files_8019": "Zgłaszaj błędy w plikach js.", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "Trwa rozpoznawanie przy użyciu ścieżek wyszukiwania podstawowego...", "Resolving_with_primary_search_path_0_6121": "Rozpoznawanie przy użyciu ścieżki wyszukiwania podstawowego „{0}”.", "Rest_parameter_0_implicitly_has_an_any_type_7019": "Dla parametru rest „{0}” niejawnie określono typ „any[]”.", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "Parametr rest „{0}” niejawnie ma typ „any[]”, ale lepszy typ można wywnioskować na podstawie użycia.", + "Rest_signatures_are_incompatible_2572": "Sygnatury rest są niezgodne.", "Rest_types_may_only_be_created_from_object_types_2700": "Typy rest można tworzyć tylko na podstawie typów obiektu.", + "Return_type_annotation_circularly_references_itself_2577": "Adnotacja zwracanego typu cyklicznie odwołuje się do samej siebie.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "Zwracany typ sygnatury wywołania z wyeksportowanego interfejsu ma nazwę „{0}” z modułu prywatnego „{1}” lub używa tej nazwy.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "Zwracany typ sygnatury wywołania z wyeksportowanego interfejsu ma nazwę prywatną „{0}” lub używa tej nazwy.", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "Zwracany typ sygnatury konstruktora z wyeksportowanego interfejsu ma nazwę „{0}” z modułu prywatnego „{1}” lub używa tej nazwy.", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "Nie można określić katalogu głównego. Pomijanie ścieżek wyszukiwania podstawowego.", "STRATEGY_6039": "STRATEGIA", "Scoped_package_detected_looking_in_0_6182": "Wykryto pakiet w zakresie, wyszukiwanie w „{0}”", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "Ustaw opcję „module” w pliku konfiguracji na wartość „{0}”", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "Ustaw opcję „target” w pliku konfiguracji na wartość „{0}”", "Setters_cannot_return_a_value_2408": "Metody ustawiające nie mogą zwracać wartości.", "Show_all_compiler_options_6169": "Pokaż wszystkie opcje kompilatora.", "Show_diagnostic_information_6149": "Pokaż informacje diagnostyczne.", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "Sygnatura „{0}” musi być predykatem typów.", "Skip_type_checking_of_declaration_files_6012": "Pomiń sprawdzanie typu plików deklaracji.", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "Pomijanie kompilacji projektu „{0}”, ponieważ jego zależność „{1}” zawiera błędy", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "Pomijanie czyszczenia, ponieważ nie można zlokalizować wszystkich projektów", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "Pomijanie kompilacji projektu „{0}”, ponieważ jego zależność „{1}” nie została skompilowana", "Source_Map_Options_6175": "Opcje mapy źródła", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "Nie można przypisać specjalizowanej sygnatury przeciążenia do żadnej sygnatury niespecjalizowanej.", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "Specyfikator dynamicznego importowania nie może być elementem spread.", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "Podaj wersję docelową języka ECMAScript: „ES3” (domyślna), „ES5”, „ES2015”, „ES2016”, „ES2017”, „ES2018” lub „ESNEXT”.", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "Określ wersję docelową języka ECMAScript: „ES3” (wartość domyślna), „ES5”, „ES2015”, „ES2016”, „ES2017”, „ES2018”, „ES2019”, „ES2020” lub „ESNEXT”.", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "Wybierz sposób generowania kodu JSX: „preserve”, „react-native” lub „react”.", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "Określ zachowanie emisji/sprawdzania dla importów, które są używane tylko dla typów", + "Specify_file_to_store_incremental_compilation_information_6380": "Określ plik do przechowywania informacji o kompilacji przyrostowej", "Specify_library_files_to_be_included_in_the_compilation_6079": "Określ pliki biblioteki do uwzględnienia w kompilacji.", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "Określ sposób generowania kodu modułu: „none”, „commonjs”, „amd”, „system”, „umd”, „es2015” lub „ESNext”.", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "Określ sposób generowania kodu modułu: „none”, „commonjs”, „amd”, „system”, „umd”, „es2015”, „es2020” lub „ESNext”.", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "Określ strategię rozpoznawania modułów: „node” (Node.js) lub „classic” (TypeScript w wersji wcześniejszej niż 1.6).", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "Określ strategię obserwowania z sondowaniem, gdy nie powiedzie się utworzenie przy użyciu zdarzeń systemu plików: „FixedInterval” (domyślna), „PriorityInterval”, „DynamicPriority”.", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "Określ strategię obserwowania katalogu na platformach, które nie obsługują natywnego obserwowania rekursywnego: „UseFsEvents” (domyślna), „FixedPollingInterval”, „DynamicPriorityPolling”.", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "Określ strategię obserwowania pliku: „FixedPollingInterval” (domyślna), „PriorityPollingInterval”, „DynamicPriorityPolling”, „UseFsEvents”, „UseFsEventsOnParentDirectory”.", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "Określ funkcję fabryki JSX do użycia, gdy elementem docelowym jest emisja elementu JSX „react”, np. „React.createElement” lub „h”.", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "Określ sekwencję końca wiersza, która ma być używana podczas emitowania plików: „CRLF” (dos) lub „LF” (unix).", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "Określ lokalizację, w której debuger ma szukać plików TypeScript zamiast szukania w lokalizacjach źródłowych.", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "Określ lokalizację, w której debuger ma szukać plików map zamiast szukania w wygenerowanych lokalizacjach.", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "Określ katalog główny plików wejściowych. Strukturą katalogów wyjściowych można sterować przy użyciu opcji --outDir.", + "Split_all_invalid_type_only_imports_1367": "Podziel wszystkie nieprawidłowe importy dotyczące tylko typu", + "Split_into_two_separate_import_declarations_1366": "Podziel na dwie osobne deklaracje importu", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "Operator rozpiętości w wyrażeniach „new” jest dostępny tylko wtedy, gdy jest używany język ECMAScript 5 lub nowszy.", "Spread_types_may_only_be_created_from_object_types_2698": "Typy spread można tworzyć tylko z typów obiektu.", "Starting_compilation_in_watch_mode_6031": "Trwa uruchamianie kompilacji w trybie śledzenia...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "Kolejne deklaracje właściwości muszą być tego samego typu. Właściwość „{0}” musi być typu „{1}”, ale w tym miejscu jest typu „{2}”.", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "Kolejne deklaracje zmiennej muszą być tego samego typu. Zmienna „{0}” musi być typu „{1}”, ale w tym miejscu jest typu „{2}”.", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "Podstawienie „{0}” dla wzorca „{1}” ma nieprawidłowy typ. Oczekiwano typu „string”, a uzyskano typ „{2}”.", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "Podstawienie „{0}” we wzorcu „{1}” może zawierać maksymalnie jeden znak „*”.", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "Podstawienie „{0}” we wzorcu „{1}” może zawierać maksymalnie jeden znak „*”", "Substitutions_for_pattern_0_should_be_an_array_5063": "Podstawieniami wzorca „{0}” powinna być tablica.", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "Podstawienia dla wzorca „{0}” nie powinny być pustą tablicą.", "Successfully_created_a_tsconfig_json_file_6071": "Pomyślnie utworzono plik tsconfig.json.", @@ -840,78 +1033,121 @@ "Suppress_excess_property_checks_for_object_literals_6072": "Pomiń nadmiarowe sprawdzenia właściwości dla literałów obiektu.", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "Pomiń błędy noImplicitAny dotyczące obiektów indeksowania bez sygnatur indeksów.", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "Odwołanie do elementu „Symbol” nie zawiera odwołania do globalnego obiektu konstruktora symboli.", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "Synchronicznie wywołaj wywołania zwrotne i zaktualizuj stan obserwatorów katalogów na platformach, które nie obsługują natywnego obserwowania rekursywnego.", "Syntax_Colon_0_6023": "Składnia: {0}", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "Oznakowane wyrażenia szablonu nie są dozwolone w opcjonalnym łańcuchu.", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "Modyfikatora „{0}” można używać tylko w plikach TypeScript.", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "Nie można zastosować operatora „{0}” do typu „symbol”.", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "Operator „{0}” nie jest dozwolony w przypadku typów logicznych. Zamiast tego rozważ użycie operatora „{1}”.", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "Właściwość „{0}” iteratora asynchronicznego musi być metodą.", + "The_0_property_of_an_iterator_must_be_a_method_2767": "Właściwość „{0}” iteratora musi być metodą.", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "Typ „Object” można przypisać do niewielu innych typów. Czy zamiast tego typu miał zostać użyty typ „any”?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "Obiekt „arguments” nie może być przywoływany w funkcji strzałkowej w językach ES3 i ES5. Rozważ użycie standardowego wyrażenia funkcji.", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "Obiekt „arguments” nie może być przywoływany w asynchronicznej funkcji lub metodzie w języku ES3 i ES5. Rozważ użycie standardowej funkcji lub metody.", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "Treść instrukcji „if” nie może być pustą instrukcją.", "The_character_set_of_the_input_files_6163": "Zestaw znaków plików wejściowych.", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "Zawierająca funkcja strzałki przechwytuje wartość globalną parametru „this”.", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "Treść zawierającej funkcji lub modułu jest za duża do analizy przepływu sterowania.", "The_current_host_does_not_support_the_0_option_5001": "Bieżący host nie obsługuje opcji „{0}”.", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "W tym miejscu zdefiniowano deklarację elementu „{0}”, której prawdopodobnie zamierzano użyć", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "Oczekiwany typ pochodzi z właściwości „{0}”, która jest zadeklarowana tutaj w typie „{1}”", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "Oczekiwany typ pochodzi ze zwracanego typu tej sygnatury.", + "The_expected_type_comes_from_this_index_signature_6501": "Oczekiwany typ pochodzi z tej sygnatury indeksu.", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "Wyrażenie przypisania eksportu musi być identyfikatorem lub kwalifikowaną nazwą w otaczającym kontekście.", "The_files_list_in_config_file_0_is_empty_18002": "Lista „files” w pliku konfiguracji „{0}” jest pusta.", + "The_first_export_default_is_here_2752": "Pierwszy element export default jest tutaj.", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "Pierwszym parametrem metody „then” obietnicy musi być wywołanie zwrotne.", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "Dla typu globalnego „JSX.{0}” nie można określić więcej niż jednej właściwości.", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "Metawłaściwość „import.meta” jest dozwolona tylko w przypadku podania wartości „ESNext” dla opcji kompilatora „target” i „module”.", + "The_implementation_signature_is_declared_here_2750": "Sygnatura implementacji jest zadeklarowana tutaj.", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "Metawłaściwość „import.meta” jest dozwolona tylko wtedy, gdy opcja „--module” ma wartość „esnext” lub „system”.", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "Wywnioskowany typ „{0}” nie może być nazwany bez odwołania do elementu „{1}”. Prawdopodobnie nie jest to przenośne. Konieczna jest adnotacja typu.", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "Wnioskowany typ „{0}” przywołuje niedostępny typ „{1}”. Adnotacja typu jest konieczna.", + "The_last_overload_gave_the_following_error_2770": "Ostatnie przeciążenie dało następujący błąd.", + "The_last_overload_is_declared_here_2771": "Ostatnie przeciążenie jest zadeklarowane tutaj.", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "Lewa strona instrukcji „for...in” nie może być wzorcem usuwającym strukturę.", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "Lewa strona instrukcji „for...in” nie może używać adnotacji typu.", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "Lewa strona instrukcji „for...in” nie może być opcjonalnym dostępem do właściwości.", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "Lewa strona instrukcji „for...in” musi być zmienną lub dostępem do właściwości.", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "Lewa strona instrukcji „for...in” musi być typu „string” lub „any”.", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "Lewa strona instrukcji „for...of” nie może używać adnotacji typu.", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "Lewa strona instrukcji „for...of” nie może być opcjonalnym dostępem do właściwości.", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "Lewa strona instrukcji „for...of” musi być zmienną lub dostępem do właściwości.", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "Lewa strona operacji arytmetycznej musi być typu „any”, „number” lub typu wyliczeniowego.", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "Lewa strona operacji arytmetycznej musi być typu „any”, „number”, „bigint” lub typu wyliczeniowego.", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "Lewa strona wyrażenia przypisania nie może być opcjonalnym dostępem do właściwości.", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "Lewa strona wyrażenia przypisania musi być zmienną lub dostępem do właściwości.", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "Lewa strona wyrażenia „in” musi być typu „any”, „string”, „number” lub „symbol”.", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "Lewa strona wyrażenia „instanceof” musi być typu „any”, typu obiektu lub parametrem typu.", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "Ustawienia regionalne używane przy wyświetlaniu komunikatów użytkownikowi (np. „pl-pl”)", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "Maksymalna głębokość zależności na potrzeby wyszukiwania w elemencie node_modules i ładownia plików JavaScript.", - "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "Argument operacji dla operatora delete nie może być właściwością tylko do odczytu.", - "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "Argument operacji dla operatora delete musi być odwołaniem do właściwości.", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "Operand operatora „delete” nie może być identyfikatorem prywatnym.", + "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "Operand operatora „delete” nie może być właściwością tylko do odczytu.", + "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "Operand operatora „delete” musi być odwołaniem do właściwości.", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "Operand operatora inkrementacji lub dekrementacji nie może być opcjonalnym dostępem do właściwości.", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "Operand operatora inkrementacji lub dekrementacji musi być zmienną lub dostępem do właściwości.", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "Analizator oczekiwał odnalezienia elementu „}” w celu dopasowania do tokenu „{” w tym miejscu.", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "Nie można uzyskać dostępu do właściwości „{0}” w typie „{1}” w tej klasie, ponieważ jest ona zasłaniana przez inny identyfikator prywatny o takiej samej pisowni.", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "Zwracany typ konstruktora elementu JSX musi zwracać typ obiektu.", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "Zwracany typ funkcji dekoratora parametrów musi mieć postać „void” lub „any”.", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "Zwracany typ funkcji dekoratora właściwości musi mieć postać „void” lub „any”.", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "Zwracany typ funkcji asynchronicznej musi być prawidłową obietnicą lub nie może zawierać wywoływalnej składowej „then”.", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "Zwracany typ metody lub funkcji asynchronicznej musi być globalnym typem Promise.", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "Prawa strona instrukcji „for...in” musi zawierać typ „any”, typ obiektu lub parametr typu, a tutaj ma typ „{0}”.", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "Prawa strona operacji arytmetycznej musi być typu „any”, „number” lub typu wyliczeniowego.", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "Prawa strona operacji arytmetycznej musi być typu „any”, „number”, „bigint” lub typu wyliczeniowego.", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "Prawa strona wyrażenia „in” musi być typu „any”, typu obiektu lub parametrem typu.", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "Prawa strona wyrażenia „instanceof” musi być typu „any” lub typu, który można przypisać do typu interfejsu „Function”.", + "The_shadowing_declaration_of_0_is_defined_here_18017": "Deklaracja przesłaniania „{0}” jest zdefiniowana tutaj", "The_specified_path_does_not_exist_Colon_0_5058": "Wybrana ścieżka nie istnieje: „{0}”.", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "Cel przypisania musi być zmienną lub dostępem do właściwości.", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "Obiekt docelowy przypisania rest obiektu nie może być opcjonalnym dostępem do właściwości.", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "Cel przypisania rest obiektu musi stanowić dostęp do zmiennej lub właściwości.", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "Kontekstu „this” typu „{0}” nie można przypisać do elementu „this” metody typu „{1}”.", "The_this_types_of_each_signature_are_incompatible_2685": "Typy „this” sygnatur nie są zgodne.", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "Typ „{0}” jest „readonly” i nie można go przypisać do typu modyfikowalnego „{1}”.", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "Nie można wywnioskować argumentu typu dla parametru typu „{0}” na podstawie użycia. Rozważ jawne określenie argumentów typu.", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "Typ zwracany przez metodę „next()” iteratora asynchronicznego musi być obietnicą dla typu z właściwością „value”.", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "Typ zwracany przez metodę „next()” iteratora musi mieć właściwość „value”.", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "Typ deklaracji funkcji musi być zgodny z sygnaturą funkcji.", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "Typ zwracany przez metodę „{0}()” iteratora asynchronicznego musi być obietnicą dla typu z właściwością „value”.", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "Typ zwracany przez metodę „{0}()” iteratora musi mieć właściwość „value”.", + "The_types_of_0_are_incompatible_between_these_types_2200": "Typy elementu „{0}” są niezgodne między tymi typami.", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "Typy zwrócone przez element „{0}” są niezgodne między tymi typami.", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "Deklaracja zmiennej instrukcji „for...in” nie może mieć inicjatora.", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "Deklaracja zmiennej instrukcji „for...of” nie może mieć inicjatora.", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "Instrukcja „with” nie jest obsługiwana. Wszystkie symbole w bloku „with” będą mieć typ „any”.", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "Element prop „{0}” tego tagu JSX oczekuje pojedynczego elementu podrzędnego typu „{1}”, ale podano wiele elementów podrzędnych.", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "Element prop „{0}” tego tagu JSX oczekuje typu „{1}”, który wymaga wielu elementów podrzędnych, ale podano tylko jeden element podrzędny.", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "Ten warunek będzie zawsze zwracał element „{0}”, ponieważ typy „{1}” i „{2}” nie nakładają się.", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "Ten warunek będzie zawsze zwracał wartość true, ponieważ funkcja jest zawsze zdefiniowana. Czy chcesz wywołać ją wywołać zamiast tego?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "Ta funkcja konstruktora może zostać przekonwertowana na deklarację klasy.", + "This_expression_is_not_callable_2349": "To wyrażenie nie jest wywoływalne.", + "This_expression_is_not_constructable_2351": "Tego wyrażenia nie można skonstruować.", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "Ten import nigdy nie jest używany jako wartość i musi używać aliasu „import type”, ponieważ opcja „importsNotUsedAsValues” jest ustawiona na wartość „error”.", + "This_may_be_converted_to_an_async_function_80006": "To można przekonwertować na funkcję asynchroniczną.", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "Do tego modułu można odwoływać się tylko za pomocą importów/eksportów języka ECMAScript, włączając flagę „{0}” i odwołując się do jego eksportu domyślnego.", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "Ten moduł jest zadeklarowany przy użyciu składni „export =” i może być używany tylko z importem domyślnym, gdy jest używana flaga „{0}”.", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "Ta sygnatura przeciążenia nie jest zgodna z jej sygnaturą implementacji.", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "Ten parametr nie jest dozwolony w dyrektywie „use strict”.", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Ta składnia wymaga zaimportowanego pomocnika, ale nie można znaleźć modułu „{0}”.", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "Ta składnia wymaga zaimportowanego pomocnika o nazwie „{1}”, ale moduł „{0}” nie ma wyeksportowanej składowej „{1}”.", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "Ta składnia wymaga zaimportowanego pomocnika o nazwie „{1}”, który nie istnieje w elemencie „{0}”. Rozważ uaktualnienie wersji „{0}”.", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "Wyrażenia „await” na najwyższym poziomie są dozwolone tylko wtedy, gdy opcja „module” jest ustawiona na wartość „esnext” lub „system”, a opcja „target” jest ustawiona na wartość „es2017” lub wyższą.", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Deklaracje najwyższego poziomu w plikach .d.ts muszą rozpoczynać się od modyfikatora „declare” lub „export”.", "Trailing_comma_not_allowed_1009": "Końcowy przecinek jest niedozwolony.", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Transpiluj każdy plik jako oddzielny moduł (podobne do „ts.transpileModule”).", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Spróbuj użyć polecenia „npm install @types/{0}”, jeśli istnieje, lub dodać nowy plik deklaracji (.d.ts) zawierający ciąg „declare module '{0}';”", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Spróbuj użyć polecenia „npm install @types/{1}”, jeśli istnieje, lub dodać nowy plik deklaracji (.d.ts) zawierający ciąg „declare module '{0}';”", "Trying_other_entries_in_rootDirs_6110": "Wykonywanie prób przy użyciu innych pozycji opcji „rootDirs”.", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "Wykonywanie próby przeprowadzenia podstawienia „{0}”, lokalizacja modułu kandydata: „{1}”.", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "Nie można przypisać typu krotki „{0}” o długości „{1}” do krotki o długości „{2}”.", - "Type_0_cannot_be_converted_to_type_1_2352": "Typu „{0}” nie można przekonwertować na typ „{1}”.", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "Typ krotki „{0}” o długości „{1}” nie ma żadnego elementu w indeksie „{2}”.", + "Tuple_type_arguments_circularly_reference_themselves_4110": "Argumenty typu krotki cyklicznie odwołują się do samych siebie.", "Type_0_cannot_be_used_as_an_index_type_2538": "Typu „{0}” nie można używać jako typu indeksu.", "Type_0_cannot_be_used_to_index_type_1_2536": "Typu „{0}” nie można użyć do indeksowania typu „{1}”.", "Type_0_does_not_satisfy_the_constraint_1_2344": "Typ „{0}” nie spełnia warunków ograniczenia „{1}”.", + "Type_0_has_no_call_signatures_2757": "Typ „{0}” nie ma sygnatur wywołania.", + "Type_0_has_no_construct_signatures_2761": "Typ „{0}” nie ma sygnatur konstrukcji.", "Type_0_has_no_matching_index_signature_for_type_1_2537": "Typ „{0}” nie ma pasującej sygnatury indeksu dla typu „{1}”.", "Type_0_has_no_properties_in_common_with_type_1_2559": "Typy „{0}” i „{1}” nie mają żadnych wspólnych właściwości.", - "Type_0_has_no_property_1_2460": "Typ „{0}” nie ma właściwości „{1}”.", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "Typ „{0}” nie ma właściwości „{1}” i sygnatury indeksu ciągu.", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "W typie „{0}” brakuje następujących właściwości z typu „{1}”: {2}", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "W typie „{0}” brakuje następujących właściwości typu „{1}”: {2} i {3} więcej.", "Type_0_is_not_a_constructor_function_type_2507": "Typ „{0}” nie jest typem funkcji konstruktora.", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "Typ „{0}” nie jest prawidłowym zwracanym typem funkcji asynchronicznej w wersji ES5/ES3, ponieważ nie odwołuje się do wartości konstruktora zgodnej z elementem Promise.", "Type_0_is_not_an_array_type_2461": "Typ „{0}” nie jest typem tablicowym.", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "Typ „{0}” nie jest typem tablicy. Użyj opcji kompilatora „--downlevelIteration”, aby zezwolić na iterowanie iteratorów.", "Type_0_is_not_an_array_type_or_a_string_type_2495": "Typ „{0}” nie jest typem tablicowym ani typem ciągu.", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "Typ „{0}” nie jest typem tablicy ani typem ciągu. Użyj opcji kompilatora „--downlevelIteration”, aby zezwolić na iterowanie iteratorów.", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "Typ „{0}” nie jest typem tablicy ani ciągu lub nie ma metody „[Symbol.iterator]()” zwracającej iterator.", @@ -926,17 +1162,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "Typ „{0}” rekursywnie przywołuje sam siebie jako typ podstawowy.", "Type_alias_0_circularly_references_itself_2456": "Alias typu „{0}” cyklicznie przywołuje sam siebie.", "Type_alias_name_cannot_be_0_2457": "Alias typu nie może mieć nazwy „{0}”.", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "Aliasów typów można używać tylko w plikach TypeScript.", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "Adnotacja typu nie może występować w deklaracji konstruktora.", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "Adnotacji typu można używać tylko w plikach TypeScript.", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "Kandydujący argument typu „{1}” nie jest prawidłowym argumentem typu, ponieważ nie jest nadtypem kandydata „{0}”.", "Type_argument_expected_1140": "Oczekiwano argumentu typu.", "Type_argument_list_cannot_be_empty_1099": "Lista argumentów typu nie może być pusta.", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "Argumenty typu mogą być używane tylko w plikach TypeScript.", "Type_arguments_cannot_be_used_here_1342": "Nie można tutaj używać argumentów typu.", + "Type_arguments_for_0_circularly_reference_themselves_4109": "Argumenty typu dla elementu „{0}” cyklicznie odwołują się do samych siebie.", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "Wyrażeń asercji typu można używać tylko w plikach TypeScript.", "Type_declaration_files_to_be_included_in_compilation_6124": "Pliki deklaracji typu do uwzględnienia w kompilacji.", "Type_expected_1110": "Oczekiwano typu.", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "Tworzenie wystąpienia typu jest nadmiernie szczegółowe i prawdopodobnie nieskończone.", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "Typ jest przywoływany bezpośrednio lub pośrednio w wywołaniu zwrotnym realizacji jego własnej metody „then”.", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "Typ operandu „await” musi być prawidłową obietnicą lub nie może zawierać wywoływalnej składowej „then”.", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "Typ wartości właściwości obliczanej to „{0}”, którego nie można przypisać do typu „{1}”.", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "Typ iterowanych elementów operandu „yield*” musi być prawidłową obietnicą lub nie może zawierać wywoływalnej składowej „then”.", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "Typ operandu „yield” w generatorze asynchronicznym musi być prawidłową obietnicą lub nie może zawierać wywoływalnej składowej „then”.", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "Typ pochodzi z tego importu. Nie można wywołać ani skonstruować importu w stylu przestrzeni nazw, co spowoduje wystąpienie błędu w czasie wykonywania. Zamiast tego rozważ użycie importu domyślnego lub funkcji require importu.", "Type_parameter_0_has_a_circular_constraint_2313": "Parametr typu „{0}” zawiera ograniczenie cykliczne.", "Type_parameter_0_has_a_circular_default_2716": "Parametr typu „{0}” ma cykliczną wartość domyślną.", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "Parametr typu „{0}” sygnatury wywołania z wyeksportowanego interfejsu ma nazwę prywatną „{1}” lub używa tej nazwy.", @@ -944,17 +1188,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "Parametr typu „{0}” wyeksportowanej klasy ma nazwę prywatną „{1}” lub używa tej nazwy.", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "Parametr typu „{0}” wyeksportowanej funkcji ma nazwę prywatną „{1}” lub używa tej nazwy.", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "Parametr typu „{0}” wyeksportowanego interfejsu ma nazwę prywatną „{1}” lub używa tej nazwy.", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "Parametr typu „{0}” wyeksportowanego mapowanego typu obiektu używa nazwy prywatnej „{1}”.", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "Parametr typu „{0}” wyeksportowanego aliasu typu ma nazwę prywatną „{1}” lub jej używa.", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "Parametr typu „{0}” metody z wyeksportowanego interfejsu ma nazwę prywatną „{1}” lub używa tej nazwy.", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "Parametr typu „{0}” metody publicznej z wyeksportowanej klasy ma nazwę prywatną „{1}” lub używa tej nazwy.", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "Parametr typu „{0}” publicznej metody statycznej z wyeksportowanej klasy ma nazwę prywatną „{1}” lub używa tej nazwy.", "Type_parameter_declaration_expected_1139": "Oczekiwano deklaracji parametru typu.", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "Deklaracje parametrów typu mogą być używane tylko w plikach TypeScript.", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "Wartości domyślne parametrów typu mogą się odwoływać tylko do wcześniej zadeklarowanych parametrów typu.", "Type_parameter_list_cannot_be_empty_1098": "Lista parametrów typu nie może być pusta.", "Type_parameter_name_cannot_be_0_2368": "Parametr typu nie może mieć nazwy „{0}”.", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "Parametry typu nie mogą występować w deklaracji konstruktora.", "Type_predicate_0_is_not_assignable_to_1_1226": "Predykatu typów „{0}” nie można przypisać do elementu „{1}”.", "Type_reference_directive_0_was_not_resolved_6120": "======== Dyrektywa odwołania do typu „{0}” nie została rozpoznana. ========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== Dyrektywa odwołania do typu „{0}” została pomyślnie rozpoznana jako „{1}”, podstawowe: {2}. ========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== Dyrektywa odwołania do typu „{0}” została pomyślnie rozpoznana jako „{1}” z identyfikatorem pakietu „{2}”, podstawowe: {3}. ========", "Types_have_separate_declarations_of_a_private_property_0_2442": "Typy mają osobne deklaracje właściwości prywatnej „{0}”.", "Types_of_parameters_0_and_1_are_incompatible_2328": "Typy parametrów „{0}” i „{1}” są niezgodne.", "Types_of_property_0_are_incompatible_2326": "Typy właściwości „{0}” są niezgodne.", @@ -967,10 +1215,18 @@ "Unexpected_token_1012": "Nieoczekiwany token.", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "Nieoczekiwany token. Oczekiwano konstruktora, metody, metody dostępu lub właściwości.", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "Nieoczekiwany token. Oczekiwano nazwy parametru typu bez nawiasów klamrowych.", + "Unexpected_token_Did_you_mean_or_gt_1382": "Nieoczekiwany token. Czy chodziło o „{'>'}” lub „>”?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "Nieoczekiwany token. Czy chodziło o „{'}'}” lub „}”?", "Unexpected_token_expected_1179": "Nieoczekiwany token. Oczekiwano znaku „{”.", + "Unknown_build_option_0_5072": "Nieznana opcja kompilacji „{0}”.", + "Unknown_build_option_0_Did_you_mean_1_5077": "Nieznana opcja kompilacji „{0}”. Czy chodziło o „{1}”?", "Unknown_compiler_option_0_5023": "Nieznana opcja kompilatora „{0}”.", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "Nieznana opcja kompilatora „{0}”. Czy chodziło o „{1}”?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "Nieznana opcja „excludes”. Czy chodziło o „exclude”?", "Unknown_type_acquisition_option_0_17010": "Opcja pozyskania nieznanego typu „{0}”.", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "Nieznana opcja pozyskania typu „{0}”. Czy chodziło o „{1}”?", + "Unknown_watch_option_0_5078": "Nieznana opcja obserwowania „{0}”.", + "Unknown_watch_option_0_Did_you_mean_1_5079": "Nieznana opcja obserwowania: „{0}”. Czy chodziło Ci o „{1}”?", "Unreachable_code_detected_7027": "Wykryto nieosiągalny kod.", "Unsupported_locale_0_6049": "Nieobsługiwane ustawienia regionalne „{0}”.", "Unterminated_Unicode_escape_sequence_1199": "Niezakończona sekwencja ucieczki kodu Unicode.", @@ -980,34 +1236,52 @@ "Unterminated_template_literal_1160": "Niezakończony literał szablonu.", "Untyped_function_calls_may_not_accept_type_arguments_2347": "Wywołania funkcji bez typu nie mogą przyjmować argumentów typu.", "Unused_label_7028": "Nieużywana etykieta.", + "Updating_output_of_project_0_6373": "Trwa aktualizowanie danych wyjściowych projektu „{0}”...", "Updating_output_timestamps_of_project_0_6359": "Trwa aktualizowanie sygnatury czasowej danych wyjściowych projektu „{0}”...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "Trwa aktualizowanie niezmienionych sygnatur czasowych danych wyjściowych projektu „{0}”...", "Use_synthetic_default_member_95016": "Użyj syntetycznej składowej „default”.", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "Używanie ciągu w instrukcji „for...of” jest obsługiwane tylko w języku ECMAScript 5 lub nowszym.", + "Using_compiler_options_of_project_reference_redirect_0_6215": "Używanie opcji kompilatora przekierowania odwołania do projektu „{0}”.", "VERSION_6036": "WERSJA", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "Wartość typu „{0}” nie ma żadnych wspólnych właściwości z typem „{1}”. Czy jej wywołanie było zamierzone?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "Nie można wywołać wartości typu „{0}”. Czy miał zostać użyty operator „new”?", "Variable_0_implicitly_has_an_1_type_7005": "Dla zmiennej „{0}” niejawnie określono typ „{1}”.", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "Zmienna „{0}” niejawnie ma typ „{1}”, ale lepszy typ można wywnioskować na podstawie użycia.", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "Zmienna „{0}” niejawnie ma typ „{1}” w niektórych lokalizacjach, ale lepszy typ można wywnioskować na podstawie użycia.", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "Zmienna „{0}” ma niejawnie typ „{1}” w niektórych lokalizacjach, w których nie można określić jej typu.", "Variable_0_is_used_before_being_assigned_2454": "Zmienna „{0}” jest używana przed przypisaniem.", "Variable_declaration_expected_1134": "Oczekiwano deklaracji zmiennej.", "Variable_declaration_list_cannot_be_empty_1123": "Lista deklaracji zmiennych nie może być pusta.", "Version_0_6029": "Wersja {0}", "Watch_input_files_6005": "Obserwuj pliki wejściowe.", + "Watch_option_0_requires_a_value_of_type_1_5080": "Opcja obserwowania „{0}” wymaga wartości typu {1}.", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "Określa, czy zachować nieaktualne dane wyjściowe konsoli w trybie śledzenia zamiast wyczyścić ekran.", + "Wrap_invalid_character_in_an_expression_container_95101": "Opakuj nieprawidłowy znak w kontenerze wyrażenia", + "You_cannot_rename_a_module_via_a_global_import_8031": "Nie można zmienić nazwy modułu za pomocą importu globalnego.", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "Nie można zmienić nazw elementów zdefiniowanych w standardowej bibliotece TypeScript.", "You_cannot_rename_this_element_8000": "Nie można zmienić nazwy tego elementu.", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "Element „{0}” akceptuje za mało argumentów, aby można go było użyć w tym miejscu jako dekorator. Czy chcesz najpierw go wywołać i zapisać tag „@{0}()”?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "Operacji „{0}” i „{1}” nie można mieszać bez nawiasów.", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "Element „{0}” został określony dwa razy. Atrybut o nazwie „{0}” zostanie przesłonięty.", - "_0_can_only_be_used_in_a_ts_file_8009": "Elementu „{0}” można użyć tylko w pliku .ts.", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "Element „{0}” nie może być używany jako wartość, ponieważ został wyeksportowany przy użyciu aliasu „export type”.", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "Element „{0}” nie może być używany jako wartość, ponieważ został zaimportowany przy użyciu aliasu „import type”.", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "Składniki „{0}” nie akceptują tekstu jako elementów podrzędnych. Tekst w JSX ma typ „string”, ale oczekiwany typ elementu „{1}” to „{2}”.", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "Deklaracje „{0}” mogą być używane tylko w plikach TypeScript.", "_0_expected_1005": "Oczekiwano elementu „{0}”.", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "Element „{0}” niejawnie ma zwracany typ „{1}”, ale lepszy typ można wywnioskować na podstawie użycia.", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "Dla elementu „{0}” niejawnie określono zwracany typ „any”, ponieważ nie zawiera on adnotacji zwracanego typu i jest przywoływany bezpośrednio lub pośrednio w jednym z jego zwracanych wyrażeń.", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "Dla elementu „{0}” niejawnie określono typ „any”, ponieważ nie zawiera on adnotacji typu i jest przywoływany bezpośrednio lub pośrednio w jego własnym inicjatorze.", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "Element „{0}” jest elementem podstawowym, ale element „{1}” jest obiektem otoki. Preferuje się użycie elementu „{0}”, jeśli jest to możliwe.", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "Element „{0}” można przypisać do ograniczenia typu „{1}”, ale wystąpienie typu „{1}” można utworzyć z innym podtypem ograniczenia „{2}”.", "_0_is_declared_but_its_value_is_never_read_6133": "Element „{0}” jest zadeklarowany, ale jego wartość nie jest nigdy odczytywana.", "_0_is_declared_but_never_used_6196": "Element „{0}” jest zadeklarowany, ale nie jest nigdy używany.", + "_0_is_declared_here_2728": "Element „{0}” jest zadeklarowany tutaj.", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "Element „{0}” jest zdefiniowany jako właściwość w klasie „{1}”, ale jest przesłaniany tutaj w elemencie „{2}” jako metoda dostępu.", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "Element „{0}” jest zdefiniowany jako metoda dostępu w klasie „{1}”, ale jest przesłaniany tutaj w elemencie „{2}” jako właściwość wystąpienia.", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "„{0}” nie jest prawidłową metawłaściwością słowa kluczowego „{1}”. Czy miał to być element „{2}”?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "Element „{0}” jest przywoływany bezpośrednio lub pośrednio w jego własnym wyrażeniu podstawowym.", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "Element „{0}” jest przywoływany bezpośrednio lub pośrednio w jego własnej adnotacji typu.", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "Element „{0}” został określony więcej niż raz, dlatego to użycie zostanie przesłonięte.", "_0_list_cannot_be_empty_1097": "Lista „{0}” nie może być pusta.", "_0_modifier_already_seen_1030": "Napotkano już modyfikator „{0}”.", "_0_modifier_cannot_appear_on_a_class_element_1031": "Modyfikator „{0}” nie może występować w elemencie klasy.", @@ -1021,17 +1295,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "Modyfikatora „{0}” nie można użyć w otaczającym kontekście.", "_0_modifier_cannot_be_used_with_1_modifier_1243": "Modyfikatora „{0}” nie można używać z modyfikatorem „{1}”.", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "Modyfikatora „{0}” nie można używać z deklaracją klasy.", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "Modyfikatora „{0}” nie można używać z identyfikatorem prywatnym.", "_0_modifier_must_precede_1_modifier_1029": "Modyfikator „{0}” musi występować przed modyfikatorem „{1}”.", + "_0_needs_an_explicit_type_annotation_2782": "Element „{0}” wymaga jawnej adnotacji typu.", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "Element „{0}” odwołuje się tylko do typu, ale jest używany tutaj jako przestrzeń nazw.", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "Element „{0}” odwołuje się jedynie do typu, ale jest używany w tym miejscu jako wartość.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "Element „{0}” odwołuje się tylko do typu, ale jest używany tutaj jako wartość. Czy chcesz zmienić bibliotekę docelową? Spróbuj zmienić opcję kompilatora „lib” na es2015 lub nowszą.", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "„{0}” odnosi się do globalnego formatu UMD, ale bieżący plik jest modułem. Rozważ zamiast tego dodanie importu.", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "Element „{0}” odwołuje się do wartości, ale jest używany tutaj jako typ.", "_0_tag_already_specified_1223": "Tag „{0}” jest już określony.", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "Tag „{0}” nie może być użyty niezależnie jako tag JSDoc najwyższego poziomu.", + "_0_was_also_declared_here_6203": "Element \"{0}\" został również zadeklarowany w tym miejscu.", + "_0_was_exported_here_1377": "Element „{0}” został wyeksportowany tutaj.", + "_0_was_imported_here_1376": "Element „{0}” został zaimportowany tutaj.", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "Dla elementu „{0}” bez adnotacji zwracanego typu niejawnie określono zwracany typ „{1}”.", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "Dla elementu „{0}” bez adnotacji zwracanego typu niejawnie określono zwracany typ „{1}”.", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "Modyfikator „abstract” może być stosowany jedynie w przypadku deklaracji klasy, metody lub właściwości.", - "await_expression_is_only_allowed_within_an_async_function_1308": "Wyrażenie „await” jest dozwolone tylko w funkcji asynchronicznej.", + "and_here_6204": "i tutaj.", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "Wyrażenia „await” na najwyższym poziomie pliku są dozwolone tylko wtedy, gdy plik jest modułem, ale ten plik nie ma żadnych importów ani eksportów. Rozważ dodanie pustego elementu „export {}”, aby ten plik był modułem.", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "Wyrażenia „await” są dozwolone tylko w funkcjach asynchronicznych i na najwyższym poziomie modułów.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "Wyrażeń „await” nie można używać w inicjatorze parametru.", + "await_has_no_effect_on_the_type_of_this_expression_80007": "Operator „await” nie ma wpływu na typ tego wyrażenia.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "Opcja „baseUrl” ma ustawioną wartość „{0}”. Ta wartość zostanie użyta do rozpoznania innej niż względna nazwy modułu „{1}”.", + "can_only_be_used_at_the_start_of_a_file_18026": "Elementu „#!” można użyć tylko na początku pliku.", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "Znaku „=” można użyć tylko we właściwości literału obiektu wewnątrz przypisania usuwającego strukturę.", "case_or_default_expected_1130": "Oczekiwano elementu „case” lub „default”.", "class_expressions_are_not_currently_supported_9003": "Wyrażenia „class” nie są obecnie obsługiwane.", @@ -1039,11 +1325,12 @@ "const_declarations_must_be_initialized_1155": "Konieczne jest zainicjowanie deklaracji „const”.", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "Wynikiem obliczenia inicjatora składowej wyliczenia ze specyfikatorem „const” jest wartość nieskończona.", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "Wynikiem obliczenia inicjatora składowej wyliczenia ze specyfikatorem „const” jest niedozwolona wartość „NaN”.", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "Inicjatory elementów członkowskich wyliczenia const mogą zawierać tylko wartości literałów i inne obliczone wartości wyliczenia.", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "Wyliczenia ze specyfikatorem „const” mogą być używane tylko w wyrażeniach dostępu do indeksu lub właściwości albo po prawej stronie deklaracji importu, przypisania eksportu lub typu zapytania.", + "constructor_is_a_reserved_word_18012": "„#constructor” jest słowem zastrzeżonym.", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "Nie można wywołać elementu „delete” dla identyfikatora w trybie z ograniczeniami.", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "usuń to — projekt „{0}” jest aktualny, ponieważ został wcześniej skompilowany", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "Deklaracji enum można używać tylko w pliku ts.", - "export_can_only_be_used_in_a_ts_file_8003": "Ciągu „export=” można użyć tylko w pliku ts.", + "export_can_only_be_used_in_TypeScript_files_8003": "Składnia „export =” może być używana tylko w plikach TypeScript.", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "Modyfikator „export” nie może być stosowany do modułów otoczenia ani rozszerzeń modułów, ponieważ są one zawsze widoczne.", "extends_clause_already_seen_1172": "Napotkano już klauzulę „extends”.", "extends_clause_must_precede_implements_clause_1173": "Klauzula „extends” musi poprzedzać klauzulę „implements”.", @@ -1053,23 +1340,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "Metody dostępu „get” i „set” muszą mieć ten sam typ „this”.", "get_and_set_accessor_must_have_the_same_type_2380": "Metody dostępu „get” i „set” muszą być tego samego typu.", "implements_clause_already_seen_1175": "Napotkano już klauzulę „implements”.", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "Klauzul implements można używać tylko w pliku ts.", - "import_can_only_be_used_in_a_ts_file_8002": "Ciągu „export ... =” można użyć tylko w pliku ts.", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "Klauzule „implements” mogą być używane tylko w plikach TypeScript.", + "import_can_only_be_used_in_TypeScript_files_8002": "Ciąg „import ... =” może być używany tylko w plikach TypeScript.", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "Deklaracje „infer” są dozwolone tylko w klauzuli „extends” typu warunkowego.", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "Deklaracji interfejsów można używać tylko w pliku ts.", "let_declarations_can_only_be_declared_inside_a_block_1157": "Deklaracje „let” mogą być deklarowane tylko w bloku.", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "Element „let” nie może być używany jako nazwa w deklaracjach „let” ani „const”.", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "Deklaracji modułów można używać tylko w pliku ts.", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "Nie można użyć instrukcji „new T[]” do utworzenia tablicy. Zamiast tego użyj instrukcji „new Array()”.", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "Wyrażenie „new”, którego element docelowy nie ma sygnatury konstrukcji, jest niejawnie typu „any”.", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "Asercje o wartości innej niż null mogą być używane tylko w pliku ts.", "options_6024": "opcje", "or_expected_1144": "Oczekiwano znaku „{” lub „;”.", "package_json_does_not_have_a_0_field_6100": "Plik „package.json” nie zawiera pola „{0}”.", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "Plik „package.json” nie zawiera wpisu „typesVersions” odpowiadającego wersji „{0}”.", + "package_json_had_a_falsy_0_field_6220": "Plik „package.json” miał błędne pole „{0}”.", "package_json_has_0_field_1_that_references_2_6101": "Plik „package.json” zawiera pole „{0}” „{1}” odwołujące się do elementu „{2}”.", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "Modyfikatorów parametrów można używać tylko w pliku ts.", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "Plik „package.json” ma wpis „{0}” pola „typesVersions”, który nie jest prawidłowym zakresem semver.", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "Plik „package.json” ma wpis „{0}” pola „typesVersions”, który dopasowuje wersję kompilatora „{1}”, szukając wzorca odpowiadającego nazwie modułu „{2}”.", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "Plik „package.json” zawiera pole „typesVersions” z mapowaniami ścieżek specyficznymi dla wersji.", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "Opcja „paths” została określona. Wyszukiwanie wzorca zgodnego z nazwą modułu „{0}”.", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "Modyfikator „readonly” może występować jedynie w deklaracji właściwości lub sygnaturze indeksu.", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "Modyfikator typu „readonly” jest dozwolony tylko w typach literału tablicy i krotki.", "require_call_may_be_converted_to_an_import_80005": "Wywołanie „require” może zostać przekonwertowane na wywołanie import.", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "Opcja „rootDirs” została ustawiona. Zostanie ona użyta do rozpoznania względnej nazwy modułu „{0}”.", "super_can_only_be_referenced_in_a_derived_class_2335": "Element „super” może być przywoływany tylko w klasie pochodnej.", @@ -1077,6 +1365,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "Nie można przywołać elementu „super” w obliczonej nazwie właściwości.", "super_cannot_be_referenced_in_constructor_arguments_2336": "Nie można przywoływać elementu „super” w argumentach konstruktora.", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "Element „super” jest dozwolony w składowych wyrażeń literałów obiektów tylko wtedy, gdy opcja „target” ma wartość „ES2015” lub wyższą.", + "super_may_not_use_type_arguments_2754": "Element „super” nie może używać argumentów typu.", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "Element „super” należy wywołać przed uzyskaniem dostępu do właściwości elementu „super” w konstruktorze klasy pochodnej.", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "Element „super” musi być wywoływany przed uzyskaniem dostępu do elementu „this” w konstruktorze klasy pochodnej.", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "Po elemencie „super” musi występować lista argumentów lub metoda dostępu do składowej.", @@ -1087,14 +1376,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "Nie można przywołać elementu „this” w argumentach konstruktora.", "this_cannot_be_referenced_in_current_location_2332": "Nie można przywołać elementu „this” w bieżącej lokalizacji.", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "Element „this” niejawnie przyjmuje typ „any”, ponieważ nie ma adnotacji typu.", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "Aliasów typów można używać tylko w pliku ts.", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "Argumentów typu można używać tylko w pliku ts.", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "Wyrażeń asercji typów można używać tylko w pliku ts.", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "Deklaracji parametru typu można używać tylko w pliku ts.", - "types_can_only_be_used_in_a_ts_file_8010": "Typów można używać tylko w pliku ts.", "unique_symbol_types_are_not_allowed_here_1335": "Typy „unique symbol” nie są dozwolone w tym miejscu.", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "Typy „unique symbol” są dozwolone tylko w zmiennych w instrukcji zmiennej.", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "Typów „unique symbol” nie można używać w deklaracji zmiennej z nazwą powiązania.", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "Dyrektywy „use strict” nie można używać z listą parametrów, które nie są parametrami prostymi.", + "use_strict_directive_used_here_1349": "Dyrektywa „use strict” użyta w tym miejscu.", "with_statements_are_not_allowed_in_an_async_function_block_1300": "Instrukcje „with” są niedozwolone w bloku funkcji asynchronicznej.", "with_statements_are_not_allowed_in_strict_mode_1101": "Instrukcje „with” są niedozwolone w trybie z ograniczeniami.", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "Wyrażeń „yield” nie można używać w inicjatorze parametru." diff --git a/lib/protocol.d.ts b/lib/protocol.d.ts index 110d629f99c4c..f954fdea53f40 100644 --- a/lib/protocol.d.ts +++ b/lib/protocol.d.ts @@ -146,6 +146,16 @@ declare namespace ts.server.protocol { * Contains extra information that plugin can include to be passed on */ metadata?: unknown; + /** + * Exposes information about the performance of this request-response pair. + */ + performanceData?: PerformanceData; + } + interface PerformanceData { + /** + * Time spent updating the program graph, in milliseconds. + */ + updateGraphDurationMs?: number; } /** * Arguments for FileRequest messages. @@ -961,6 +971,16 @@ declare namespace ts.server.protocol { * compiler settings. */ type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions; + interface FileWithProjectReferenceRedirectInfo { + /** + * Name of file + */ + fileName: string; + /** + * True if the file is primarily included in a referenced project + */ + isSourceOfProjectReferenceRedirect: boolean; + } /** * Represents a set of changes that happen in project */ @@ -968,15 +988,20 @@ declare namespace ts.server.protocol { /** * List of added files */ - added: string[]; + added: string[] | FileWithProjectReferenceRedirectInfo[]; /** * List of removed files */ - removed: string[]; + removed: string[] | FileWithProjectReferenceRedirectInfo[]; /** * List of updated files */ - updated: string[]; + updated: string[] | FileWithProjectReferenceRedirectInfo[]; + /** + * List of files that have had their project reference redirect status updated + * Only provided when the synchronizeProjectList request has includeProjectReferenceRedirectInfo set to true + */ + updatedRedirects?: FileWithProjectReferenceRedirectInfo[]; } /** * Information found in a configure request. @@ -1436,7 +1461,7 @@ declare namespace ts.server.protocol { command: CommandTypes.Formatonkey; arguments: FormatOnKeyRequestArgs; } - type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<"; + type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#"; /** * Arguments for completions messages. */ @@ -1553,6 +1578,11 @@ declare namespace ts.server.protocol { * Then either that enum/class or a namespace containing it will be the recommended symbol. */ isRecommended?: true; + /** + * If true, this completion was generated from traversing the name table of an unchecked JS file, + * and therefore may not be accurate. + */ + isFromUncheckedFile?: true; } /** * Additional completion entry details, available on demand @@ -2387,6 +2417,8 @@ declare namespace ts.server.protocol { */ readonly includeAutomaticOptionalChainCompletions?: boolean; readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; + /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ + readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly lazyConfiguredProjectsFromExternalProject?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; diff --git a/lib/pt-br/diagnosticMessages.generated.json b/lib/pt-br/diagnosticMessages.generated.json index a1623b58108bb..6fd3969772747 100644 --- a/lib/pt-br/diagnosticMessages.generated.json +++ b/lib/pt-br/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "Um modificador '{0}' não pode ser usado com uma declaração de importação.", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "Um modificador '{0}' não pode ser usado com uma declaração de interface.", "A_0_parameter_must_be_the_first_parameter_2680": "Um parâmetro '{0}' deve ser o primeiro parâmetro.", + "A_bigint_literal_cannot_use_exponential_notation_1352": "A bigint literal cannot use exponential notation.", + "A_bigint_literal_must_be_an_integer_1353": "A bigint literal must be an integer.", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "Um parâmetro de padrão de associação não pode ser opcional em uma assinatura de implementação.", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "Uma instrução 'break' só pode ser usada em uma iteração de circunscrição ou instrução switch.", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "Uma instrução 'break' só pode saltar para um rótulo de uma instrução de circunscrição.", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "Uma classe pode implementar apenas um identificador/nome qualificado com argumentos de tipo opcionais.", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "A class can only implement an object type or intersection of object types with statically known members.", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "Uma declaração de classe sem o modificador 'default' deve ter um nome.", "A_class_may_only_extend_another_class_2311": "Uma classe somente pode estender-se para outra classe.", - "A_class_may_only_implement_another_class_or_interface_2422": "Uma classe somente pode implementar outra classe ou interface.", "A_class_member_cannot_have_the_0_keyword_1248": "Um membro de classe não pode ter a palavra-chave '{0}'.", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "Uma expressão de vírgula não é permitida em um nome de propriedade calculado.", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "Um nome de propriedade calculado não pode fazer referência a um parâmetro de tipo no seu tipo recipiente.", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "Um nome de propriedade computado em uma interface deve se referir a uma expressão cujo tipo é um tipo literal ou um 'unique symbol'.", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "Um nome de propriedade calculado deve ser do tipo 'string', 'number', 'symbol' ou 'any'.", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "Um nome de propriedade calculado do formulário '{0}' deve ser do tipo 'symbol'.", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals.", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "Um membro const enum só pode ser acessado usando um literal de cadeia de caracteres.", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "Um inicializador 'const' em um contexto de ambiente deve ser uma cadeia ou um literal numérico.", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "Um construtor não pode conter uma chamada 'super' quando sua classe estende 'null'.", "A_constructor_cannot_have_a_this_parameter_2681": "Um construtor não pode ter um parâmetro 'this'.", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "Uma instrução 'continue' só pode ser usada em uma instrução de iteração de circunscrição.", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "Uma instrução 'continue' só pode saltar para um rótulo de uma instrução de iteração de circunscrição.", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "Um modificador 'declare' não pode ser usado em um contexto de ambiente.", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": "Um modificador 'declare' é necessário para uma declaração de nível superior em um arquivo .d.ts.", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "Um decorador pode decorar somente uma implementação de método, não uma sobrecarga.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "Uma cláusula 'default' não pode aparecer mais de uma vez em uma instrução 'switch'.", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "Uma exportação padrão só pode ser usada em um módulo do estilo ECMAScript.", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "O gerador não pode ter uma anotação de tipo 'void'.", "A_get_accessor_cannot_have_parameters_1054": "Um acessador 'get' não pode ter parâmetros.", "A_get_accessor_must_return_a_value_2378": "Um acessador 'get' deve retornar um valor.", + "A_label_is_not_allowed_here_1344": "'A label is not allowed here.", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "O inicializador de um membro em uma declaração de enumeração não pode referenciar membros declarados depois dele, inclusive membros definidos em outras enumerações.", + "A_method_cannot_be_named_with_a_private_identifier_18022": "A method cannot be named with a private identifier.", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Uma classe mixin deve ter um construtor um único parâmetro rest do tipo 'any[]'.", "A_module_cannot_have_multiple_default_exports_2528": "Um módulo não pode ter várias exportações padrão.", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Uma declaração de namespace não pode estar em um arquivo diferente de uma classe ou função com a qual ela é mesclada.", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Uma declaração de namespace não pode estar localizada antes de uma classe ou função com a qual ela é mesclada.", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "Uma declaração de namespace só é permitida e um namespace ou módulo.", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "Uma importação de estilo do namespace não pode ser chamada nem construída e causará uma falha no tempo de execução.", "A_non_dry_build_would_build_project_0_6357": "Um build não -dry criaria o projeto '{0}'", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Um build não -dry excluiria os seguintes arquivos: {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "A non-dry build would update output of project '{0}'", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "A non-dry build would update timestamps for output of project '{0}'", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "Um inicializador de parâmetro só é permitido em uma implementação de função ou de construtor.", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "Uma propriedade de parâmetro não pode ser declarada usando um parâmetro rest.", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "Uma propriedade de parâmetro somente é permitida em uma implementação de construtor.", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "Uma promessa deve ter um método 'then'.", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "Uma propriedade de uma classe cujo tipo é um tipo de 'unique symbol' deve ser 'static' e 'readonly'.", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "Uma propriedade de uma interface ou tipo literal cujo tipo é um tipo de 'unique symbol' deve ser 'readonly'.", + "A_required_element_cannot_follow_an_optional_element_1257": "A required element cannot follow an optional element.", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "Um parâmetro obrigatório não pode seguir um parâmetro opcional.", "A_rest_element_cannot_contain_a_binding_pattern_2501": "Um elemento rest não pode conter um padrão de associação.", "A_rest_element_cannot_have_a_property_name_2566": "Um elemento rest não pode ter um nome de propriedade.", "A_rest_element_cannot_have_an_initializer_1186": "Um elemento rest não pode ter um inicializador.", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "Um elemento rest deve ser o último em um padrão de desestruturação.", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "A rest element must be last in a tuple type.", + "A_rest_element_type_must_be_an_array_type_2574": "A rest element type must be an array type.", "A_rest_parameter_cannot_be_optional_1047": "Um parâmetro rest não pode ser opcional.", "A_rest_parameter_cannot_have_an_initializer_1048": "Um parâmetro rest não pode ter um inicializador.", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "Um parâmetro rest deve ser o último em uma lista de parâmetros.", @@ -81,9 +89,9 @@ "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "Uma proteção de tipo baseado em 'this não é compatível com uma proteção de tipo baseado em parâmetro.", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "Um tipo 'this' está disponível somente em um membro não estático de uma classe ou interface.", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "Um arquivo 'tsconfig.json' já está definido em: '{0}'.", - "A_tuple_type_element_list_cannot_be_empty_1122": "Uma lista de elementos do tipo tupla não pode estar vazia.", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "Uma expressão de asserção de tipo não é permitida no lado esquerdo de uma expressão de exponenciação. Considere delimitar a expressão em parênteses.", "A_type_literal_property_cannot_have_an_initializer_1247": "Uma propriedade literal de tipo não pode ter um inicializador.", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "A type-only import can specify a default import or named bindings, but not both.", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "O predicado de tipo não pode fazer referência a um parâmetro rest.", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "O predicado de tipo não pode fazer referência ao elemento '{0}' em um padrão de associação.", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "O predicado de tipo só é permitido na posição de tipo de retorno para funções e métodos.", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "Adicionar '{0}' à declaração de importação existente de \"{1}\"", "Add_0_to_unresolved_variable_90008": "Adicionar '{0}.' à variável não resolvida", "Add_all_missing_async_modifiers_95041": "Adicionar todos os modificadores 'async' ausentes", + "Add_all_missing_imports_95064": "Add all missing imports", "Add_all_missing_members_95022": "Adicionar todos os membros ausentes", "Add_all_missing_super_calls_95039": "Adicionar todas as chamadas super ausentes", "Add_async_modifier_to_containing_function_90029": "Adicione o modificador assíncrono que contém a função", + "Add_await_95083": "Add 'await'", + "Add_await_to_initializer_for_0_95084": "Add 'await' to initializer for '{0}'", + "Add_await_to_initializers_95089": "Add 'await' to initializers", "Add_braces_to_arrow_function_95059": "Adicionar chaves para a função de seta", + "Add_const_to_all_unresolved_variables_95082": "Add 'const' to all unresolved variables", + "Add_const_to_unresolved_variable_95081": "Add 'const' to unresolved variable", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "Add default import '{0}' to existing import declaration from \"{1}\"", "Add_definite_assignment_assertion_to_property_0_95020": "Adicionar a asserção de atribuição definitiva à propriedade '{0}'", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "Adicionar declarações de atribuição definidas a todas as propriedades não inicializadas", + "Add_export_to_make_this_file_into_a_module_95097": "Add 'export {}' to make this file into a module", "Add_index_signature_for_property_0_90017": "Adicionar assinatura de índice para a propriedade '{0}'", "Add_initializer_to_property_0_95019": "Adicionar inicializador à propriedade '{0}'", "Add_initializers_to_all_uninitialized_properties_95027": "Adicionar inicializadores a todas as propriedades não inicializadas", + "Add_missing_enum_member_0_95063": "Add missing enum member '{0}'", + "Add_missing_new_operator_to_all_calls_95072": "Add missing 'new' operator to all calls", + "Add_missing_new_operator_to_call_95071": "Add missing 'new' operator to call", "Add_missing_super_call_90001": "Adicionar chamada 'super()' ausente", "Add_missing_typeof_95052": "Adicionar 'typeof' ausente", + "Add_names_to_all_parameters_without_names_95073": "Add names to all parameters without names", "Add_or_remove_braces_in_an_arrow_function_95058": "Adicionar ou remover chaves em uma função de seta", + "Add_parameter_name_90034": "Add parameter name", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "Adicionar um qualificador a todas as variáveis não resolvidas correspondentes a um nome de membro", "Add_to_all_uncalled_decorators_95044": "Adicionar '()' a todos os decoradores não chamados", "Add_ts_ignore_to_all_error_messages_95042": "Adicionar '@ts-ignore' a todas as mensagens de erro", "Add_undefined_type_to_all_uninitialized_properties_95029": "Adicionar tipo indefinido a todas as propriedades não inicializadas", "Add_undefined_type_to_property_0_95018": "Adicionar tipo 'indefinido' à propriedade '{0}'", + "Add_unknown_conversion_for_non_overlapping_types_95069": "Add 'unknown' conversion for non-overlapping types", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "Add 'unknown' to all conversions of non-overlapping types", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "Adicionar um arquivo tsconfig.json ajudará a organizar projetos que contêm arquivos TypeScript e JavaScript. Saiba mais em https://aka.ms/tsconfig.", "Additional_Checks_6176": "Verificações Adicionais", "Advanced_Options_6178": "Opções Avançadas", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "Todas as declarações de '{0}' devem ter parâmetros de tipo idênticos.", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "Todas as declarações de um método abstrato devem ser consecutivas.", "All_destructured_elements_are_unused_6198": "Todos os elementos desestruturados são inutilizados.", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "All files must be modules when the '--isolatedModules' flag is provided.", "All_imports_in_import_declaration_are_unused_6192": "Nenhuma das importações na declaração de importação está sendo utilizada.", + "All_type_parameters_are_unused_6205": "All type parameters are unused", "All_variables_are_unused_6199": "Nenhuma das variáveis está sendo utilizada.", + "Allow_accessing_UMD_globals_from_modules_95076": "Allow accessing UMD globals from modules.", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "Permita importações padrão de módulos sem exportação padrão. Isso não afeta a emissão do código, apenas a verificação de digitação.", "Allow_javascript_files_to_be_compiled_6102": "Permita que arquivos javascript sejam compilados.", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "As enumerações de constante de ambiente não são permitidas quando o sinalizador '--isolatedModules' é fornecido.", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "Already included file name '{0}' differs from file name '{1}' only in casing.", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "A declaração de módulo de ambiente não pode especificar o nome do módulo relativo.", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "Módulos de ambiente não podem ser aninhados em outros módulos ou namespaces.", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "Um módulo AMD não pode ter várias atribuições de nome.", "An_abstract_accessor_cannot_have_an_implementation_1318": "Um acessador abstrato não pode ter uma implementação.", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "Um acessador não pode ser declarado em um contexto de ambiente.", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "An accessibility modifier cannot be used with a private identifier.", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "An accessor cannot be named with a private identifier.", "An_accessor_cannot_have_type_parameters_1094": "Um acessador não pode ter parâmetros de tipo.", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "Uma declaração de módulo de ambiente só é permitida no nível superior em um arquivo.", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "Um operando aritmético deve ser do tipo 'any', 'number' ou um tipo de enumeração.", + "An_argument_for_0_was_not_provided_6210": "An argument for '{0}' was not provided.", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "An argument matching this binding pattern was not provided.", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.", + "An_arrow_function_cannot_have_a_this_parameter_2730": "An arrow function cannot have a 'this' parameter.", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "Uma função ou método assíncrono em ES5/ES3 requer o construtor 'Promise'. Verifique se você tem a declaração para o construtor 'Promise' ou inclua 'ES2015' em sua opção `--lib`.", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "Um método ou função assíncrona deve ter um tipo de retorno válido que é possível aguardar.", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "Um método ou função assíncrona deve retornar uma 'Promessa'. Certifique-se de ter uma declaração para 'Promessa' ou inclua 'ES2015' na sua opção `--lib`.", "An_async_iterator_must_have_a_next_method_2519": "O iterador assíncrono deve ter um método 'next()'.", "An_element_access_expression_should_take_an_argument_1011": "Uma expressão de acesso do elemento deveria receber um argumento.", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "An enum member cannot be named with a private identifier.", "An_enum_member_cannot_have_a_numeric_name_2452": "Um membro de enumeração não pode ter um nome numérico.", + "An_enum_member_name_must_be_followed_by_a_or_1357": "An enum member name must be followed by a ',', '=', or '}'.", "An_export_assignment_can_only_be_used_in_a_module_1231": "Uma atribuição de exportação só pode ser usada em um módulo.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Uma atribuição de exportação não pode ser usada em um módulo com outros elementos exportados.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Uma atribuição de exportação não pode ser usada em um namespace.", "An_export_assignment_cannot_have_modifiers_1120": "Uma atribuição de exportação não pode ter modificadores.", "An_export_declaration_can_only_be_used_in_a_module_1233": "Uma declaração de exportação só pode ser usada em um módulo.", "An_export_declaration_cannot_have_modifiers_1193": "Uma declaração de exportação não pode ter modificadores.", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "An expression of type 'void' cannot be tested for truthiness", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "Um valor de escape Unicode estendido deve estar entre 0x0 e 0x10FFFF, inclusive.", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "An identifier or keyword cannot immediately follow a numeric literal.", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "Uma implementação não pode ser declarada em contextos de ambiente.", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "An import alias cannot reference a declaration that was exported using 'export type'.", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "An import alias cannot reference a declaration that was imported using 'import type'.", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "Uma declaração de importação só pode ser usada em um namespace ou módulo.", "An_import_declaration_cannot_have_modifiers_1191": "Uma declaração de importação não pode ter modificadores.", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "Um caminho de importação não pode terminar com uma extensão '{0}'. Considere importar '{1}'.", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "Um parâmetro de assinatura de índice deve ter uma anotação de tipo.", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "Um tipo de parâmetro de assinatura de índice não pode ser um alias de tipo. Considere gravar ' [{0}: {1}]: {2}' em vez disso.", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "Um tipo de parâmetro de assinatura de índice não pode ser um tipo de união. Considere usar um tipo de objeto mapeado em vez disso.", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "Um tipo de parâmetro de assinatura de índice deve ser 'string' ou 'number'.", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "An index signature parameter type must be either 'string' or 'number'.", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "Uma interface só pode estender um identificador/nome qualificado com argumentos de tipo opcionais.", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "Uma interface só pode estender uma classe ou outra interface.", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "An interface can only extend an object type or intersection of object types with statically known members.", "An_interface_property_cannot_have_an_initializer_1246": "Uma propriedade de interface não pode ter um inicializador.", "An_iterator_must_have_a_next_method_2489": "Um iterador deve ter um método 'next()'.", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "Um literal de objeto não pode ter vários acessadores get/set com o mesmo nome.", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "Um literal de objeto não pode ter várias propriedades com o mesmo nome no modo estrito.", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "Um literal de objeto não pode ter propriedade e acessador com o mesmo nome.", "An_object_member_cannot_be_declared_optional_1162": "Um membro de objeto não pode ser declarado como opcional.", + "An_optional_chain_cannot_contain_private_identifiers_18030": "An optional chain cannot contain private identifiers.", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "An outer value of 'this' is shadowed by this container.", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "A assinatura de sobrecarga não pode ser declarada como geradora.", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "Uma expressão unária com o operador '{0}' não é permitida no lado esquerdo de uma expressão de exponenciação. Considere delimitar a expressão em parênteses.", "Annotate_everything_with_types_from_JSDoc_95043": "Anotar tudo com tipos do JSDoc", "Annotate_with_type_from_JSDoc_95009": "Anotar com o tipo do JSDoc", "Annotate_with_types_from_JSDoc_95010": "Anotar com os tipos do JSDoc", + "Another_export_default_is_here_2753": "Another export default is here.", + "Are_you_missing_a_semicolon_2734": "Are you missing a semicolon?", "Argument_expression_expected_1135": "Expressão de argumento esperada.", "Argument_for_0_option_must_be_Colon_1_6046": "O argumento para a opção '{0}' deve ser: {1}.", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "O argumento do tipo '{0}' não é atribuível ao parâmetro do tipo '{1}'.", "Array_element_destructuring_pattern_expected_1181": "Padrão de desestruturação de elemento da matriz esperado.", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "Assertions require every name in the call target to be declared with an explicit type annotation.", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "Assertions require the call target to be an identifier or qualified name.", "Asterisk_Slash_expected_1010": "'*/' esperado.", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "Acréscimos de escopo global somente podem ser diretamente aninhados em módulos externos ou declarações de módulo de ambiente.", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "Acréscimos de escopo global devem ter o modificador 'declare' a menos que apareçam em contexto já ambiente.", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "A descoberta automática para digitações está habilitada no projeto '{0}'. Executando o passe de resolução extra para o módulo '{1}' usando o local do cache '{2}'.", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "As expressões de classe base não podem referenciar parâmetros de tipo de classe.", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "O tipo de retorno do construtor base '{0}' não é um tipo de interface ou classe.", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members.", "Base_constructors_must_all_have_the_same_return_type_2510": "Todos os construtores base devem ter o mesmo tipo de retorno.", "Base_directory_to_resolve_non_absolute_module_names_6083": "Diretório base para resolver nomes de módulo não absolutos.", "Basic_Options_6172": "Opções Básicas", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "BigInt literals are not available when targeting lower than ES2020.", "Binary_digit_expected_1177": "Dígito binário esperado.", "Binding_element_0_implicitly_has_an_1_type_7031": "O elemento de associação '{0}' tem implicitamente um tipo '{1}'.", "Block_scoped_variable_0_used_before_its_declaration_2448": "Variável de escopo de bloco '{0}' usada antes da sua declaração.", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "Compilar todos os projetos, incluindo aqueles que parecem estar atualizados", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "Compilar um ou mais projetos e suas dependências, se estiverem desatualizados", + "Build_option_0_requires_a_value_of_type_1_5073": "Build option '{0}' requires a value of type {1}.", "Building_project_0_6358": "Compilando o projeto '{0}'...", "Call_decorator_expression_90028": "Chamar expressão do decorador", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "Call signature return types '{0}' and '{1}' are incompatible.", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "Assinatura de chamada, que não tem a anotação de tipo de retorno, implicitamente tem um tipo de retorno 'any'.", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Call_target_does_not_contain_any_signatures_2346": "O destino da chamada não contém nenhuma assinatura.", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "Não foi possível acessar '{0}.{1}' porque '{0}' é um tipo, mas não um namespace. Você quis dizer recuperar o tipo da propriedade '{1}' em '{0}' com '{0}[\"{1}\"]'?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "Cannot access ambient const enums when the '--isolatedModules' flag is provided.", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "Não é possível atribuir um tipo de construtor '{0}' para um tipo de construtor '{1}'.", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "Não é possível atribuir um tipo de construtor abstrato a um tipo de construtor não abstrato.", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "Não é possível atribuir a '{0}' porque é uma constante ou uma propriedade de somente leitura.", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "Cannot assign to '{0}' because it is a constant.", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "Cannot assign to '{0}' because it is a read-only property.", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "Não é possível atribuir a '{0}' porque não é uma variável.", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "Não é possível aumentar o módulo '{0}' porque ele resolve para uma entidade não módulo.", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "Não é possível aumentar o módulo '{0}' com as exportações do valor, porque ele resolve para uma entidade sem módulo.", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "Não é possível compilar módulos usando a opção '{0}', a menos que o sinalizador '--module' seja 'amd' ou 'system'.", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "Não é possível compilar namespaces quando o sinalizador '--isolatedModules' é fornecido.", "Cannot_create_an_instance_of_an_abstract_class_2511": "Não é possível criar uma instância de uma classe abstrata.", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'.", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "Não é possível exportar '{0}'. Somente declarações locais podem ser exportadas de um módulo.", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "Não é possível estender uma classe '{0}'. O construtor de classe está marcado como privado.", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "Não é possível estender uma interface '{0}'. Você quis dizer 'implements'?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "Cannot find a tsconfig.json file at the current directory: {0}.", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "Não é possível encontrar um arquivo tsconfig.json no diretório especificado: '{0}'.", "Cannot_find_global_type_0_2318": "Não é possível encontrar o tipo global '{0}'.", "Cannot_find_global_value_0_2468": "Não é possível encontrar o valor global '{0}'.", "Cannot_find_lib_definition_for_0_2726": "Não é possível encontrar a definição de lib para '{0}'.", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "Não é possível encontrar a definição de lib para '{0}'. Você quis dizer '{1}'?", "Cannot_find_module_0_2307": "Não é possível encontrar o módulo '{0}'.", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension", "Cannot_find_name_0_2304": "Não é possível encontrar o nome '{0}'.", "Cannot_find_name_0_Did_you_mean_1_2552": "Não é possível localizar o nome '{0}'. Você quis dizer '{1}'?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "Não foi possível localizar o nome '{0}'. Você quis dizer o membro de instância 'this.{0}'?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "Não foi possível encontrar o nome '{0}'. Você quis dizer o membro estático '{1}.{0}'?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery` and then add `jquery` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.", "Cannot_find_namespace_0_2503": "Não é possível encontrar o namespace '{0}'.", "Cannot_find_parameter_0_1225": "Não é possível encontrar o parâmetro '{0}'.", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "Não é possível encontrar o caminho do subdiretório comum para os arquivos de entrada.", "Cannot_find_type_definition_file_for_0_2688": "Não é possível encontrar o arquivo de definição de tipo para '{0}'.", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "Não é possível importar arquivos de declaração de tipo. Considere a possibilidade de importar '{0}' em vez de '{1}'.", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "Não é possível inicializar a variável com escopo externo '{0}' no mesmo escopo que a declaração de escopo de bloco '{1}'.", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "Não é possível invocar uma expressão cujo tipo não tem uma assinatura de chamada. O tipo '{0}' não tem assinaturas de chamada compatíveis.", "Cannot_invoke_an_object_which_is_possibly_null_2721": "Não é possível invocar um objeto que é possivelmente 'nulo'.", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "Não é possível invocar um objeto que é possivelmente 'nulo' ou 'indefinido'.", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "Não é possível invocar um objeto que é possivelmente 'indefinido'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'.", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "Não é possível preceder o projeto '{0}' porque ele não tem o conjunto 'outFile'", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "Não será possível reexportar um tipo quando o sinalizador '--isolatedModules' for fornecido.", "Cannot_read_file_0_Colon_1_5012": "Não é possível ler o arquivo '{0}': {1}.", "Cannot_redeclare_block_scoped_variable_0_2451": "Não é possível declarar novamente a variável de escopo de bloco '{0}'.", "Cannot_redeclare_exported_variable_0_2323": "Não é possível redeclarar a variável exportada '{0}'.", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "Não é possível declarar novamente o identificador '{0}' na cláusula catch.", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "Cannot update output of project '{0}' because there was error reading file '{1}'", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "Não é possível usar JSX, a menos que o sinalizador '--jsx' seja fornecido.", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "Não será possível usar importações, exportações ou acréscimos de módulo quando '--module' for 'none'.", "Cannot_use_namespace_0_as_a_type_2709": "Não é possível usar o namespace '{0}' como um tipo.", "Cannot_use_namespace_0_as_a_value_2708": "Não é possível usar o namespace '{0}' como um valor.", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "Não é possível usar 'new' com uma expressão cujo tipo não tem uma chamada ou assinatura de constructo.", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "Não é possível gravar o arquivo '{0}' porque ele seria substituído por diversos arquivos de entrada.", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "Não é possível gravar o arquivo '{0}' porque ele substituiria o arquivo de entrada.", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "A variável de cláusula catch não pode ter uma anotação de tipo.", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "Verificando se '{0}' é o maior prefixo correspondente para '{1}' - '{2}'.", "Circular_definition_of_import_alias_0_2303": "Definição circular do alias de importação '{0}'.", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "Circularidade detectada ao resolver a configuração: {0}", + "Circularity_originates_in_type_at_this_location_2751": "Circularity originates in type at this location.", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "A classe '{0}' define o acessador de membro de instância '{1}', mas a classe estendida '{2}' o define como uma função de membro de instância.", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "A classe '{0}' define a função de membro de instância '{1}', mas a classe estendida '{2}' a define como um acessador de membro de instância.", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "A classe '{0}' define a função de membro de instância '{1}', mas a classe estendida '{2}' a define como uma propriedade de membro de instância.", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "A classe '{0}' define a propriedade de membro de instância '{1}', mas a classe estendida '{2}' a define como uma função de membro de instância.", "Class_0_incorrectly_extends_base_class_1_2415": "A classe '{0}' estende incorretamente a classe base '{1}'.", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "A classe '{0}' implementa incorretamente a classe '{1}'. Você pretendia estender '{1}' e herdar seus membros como uma subclasse?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "O lado estático da classe '{0}' incorretamente estende o lado estático da classe base '{1}'.", "Classes_can_only_extend_a_single_class_1174": "Classes só podem estender uma única classe.", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "As classes que contêm métodos abstratos devem ser marcadas como abstratas.", + "Classes_may_not_have_a_field_named_constructor_18006": "Classes may not have a field named 'constructor'.", "Command_line_Options_6171": "Opções da Linha de Comando", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "Compile o projeto dando o caminho para seu arquivo de configuração ou para uma pasta com um 'tsconfig.json'.", "Compiler_option_0_expects_an_argument_6044": "A opção do compilador '{0}' espera um argumento.", "Compiler_option_0_requires_a_value_of_type_1_5024": "A opção do compilador '{0}' requer um valor do tipo {1}.", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "Compiler reserves name '{0}' when emitting private identifier downlevel.", "Composite_projects_may_not_disable_declaration_emit_6304": "Projetos compostos não podem desabilitar a emissão de declaração.", + "Composite_projects_may_not_disable_incremental_compilation_6379": "Composite projects may not disable incremental compilation.", "Computed_property_names_are_not_allowed_in_enums_1164": "Nomes de propriedade calculados não são permitidos em enums.", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "Os valores computados não são permitidos em uma enumeração com membros de valor de cadeia de caracteres.", "Concatenate_and_emit_output_to_single_file_6001": "Concatenar e emitir saída para um arquivo único.", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "Foram encontradas definições em conflito para '{0}' em '{1}' e em '{2}'. Considere instalar uma versão específica desta biblioteca para solucionar o conflito.", + "Conflicts_are_in_this_file_6201": "Conflicts are in this file.", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "Construct signature return types '{0}' and '{1}' are incompatible.", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "Assinatura de constructo, que não tem a anotação de tipo de retorno, implicitamente tem um tipo de retorno 'any'.", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Constructor_implementation_is_missing_2390": "Implementação do construtor ausente.", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "O construtor de classe '{0}' é privado e somente acessível na declaração de classe.", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "O construtor de classe '{0}' é protegido e somente acessível na declaração de classe.", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "Construtores para classes derivadas devem conter uma chamada 'super'.", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "O arquivo contido não foi especificado e o diretório raiz não pode ser determinado, ignorando a pesquisa na pasta 'node_modules'.", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.", "Convert_0_to_mapped_object_type_95055": "Converter '{0}' para o tipo de objeto mapeado", "Convert_all_constructor_functions_to_classes_95045": "Converter todas as funções de construtor em classes", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "Convert all imports not used as a value to type-only imports", + "Convert_all_re_exported_types_to_type_only_exports_1365": "Convert all re-exported types to type-only exports", "Convert_all_require_to_import_95048": "Converter todos os 'require' em 'import'", + "Convert_all_to_async_functions_95066": "Convert all to async functions", + "Convert_all_to_bigint_numeric_literals_95092": "Convert all to bigint numeric literals", "Convert_all_to_default_imports_95035": "Converter tudo para importações padrão", + "Convert_const_to_let_95093": "Convert 'const' to 'let'", + "Convert_default_export_to_named_export_95061": "Convert default export to named export", "Convert_function_0_to_class_95002": "Converter função '{0}' em classe", "Convert_function_to_an_ES2015_class_95001": "Converter função em uma classe ES2015", + "Convert_invalid_character_to_its_html_entity_code_95100": "Convert invalid character to its html entity code", + "Convert_named_export_to_default_export_95062": "Convert named export to default export", "Convert_named_imports_to_namespace_import_95057": "Converter importações nomeadas em importação de namespace", "Convert_namespace_import_to_named_imports_95056": "Converter importação de namespace em importações nomeadas", + "Convert_parameters_to_destructured_object_95075": "Convert parameters to destructured object", "Convert_require_to_import_95047": "Converter 'require' em 'import'", "Convert_to_ES6_module_95017": "Converter em módulo ES6", + "Convert_to_a_bigint_numeric_literal_95091": "Convert to a bigint numeric literal", + "Convert_to_async_function_95065": "Convert to async function", "Convert_to_default_import_95013": "Converter para importação padrão", + "Convert_to_template_string_95096": "Convert to template string", + "Convert_to_type_only_export_1364": "Convert to type-only export", + "Convert_to_type_only_import_1373": "Convert to type-only import", "Corrupted_locale_file_0_6051": "Arquivo de localidade {0} corrompido.", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "Não foi possível localizar o arquivo de declaração para o módulo '{0}'. '{1}' tem implicitamente um tipo 'any'.", "Could_not_write_file_0_Colon_1_5033": "Não foi possível gravar o arquivo '{0}': {1}.", "DIRECTORY_6038": "DIRETÓRIO", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit.", "Declaration_expected_1146": "Declaração esperada.", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "O nome de declaração entra em conflito com o identificador global integrado '{0}'.", "Declaration_or_statement_expected_1128": "Declaração ou instrução esperada.", + "Declare_a_private_field_named_0_90053": "Declare a private field named '{0}'.", "Declare_method_0_90023": "Declarar método '{0}'", "Declare_property_0_90016": "Declarar propriedade '{0}'", "Declare_static_method_0_90024": "Declarar método estático '{0}'", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "Os decoradores não são válidos aqui.", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "Os decoradores não podem ser aplicados a vários acessadores get/set de mesmo nome.", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "A exportação padrão do módulo tem ou está usando o nome particular '{0}'.", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "Definite assignment assertions can only be used along with a type annotation.", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "Definitions of the following identifiers conflict with those in another file: {0}", "Delete_all_unused_declarations_95024": "Excluir todas as declarações não usadas", "Delete_the_outputs_of_all_projects_6365": "Excluir as saídas de todos os projetos", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[Preterido] Use '--jsxFactory' no lugar. Especifique o objeto invocado para createElement ao direcionar uma emissão de JSX 'react'", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[Preterido] Use '--outFile' no lugar. Concatene e emita uma saída para um arquivo único", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[Preterido] Use '--skipLibCheck' no lugar. Ignore a verificação de tipo dos arquivos de declaração de biblioteca padrão.", + "Did_you_forget_to_use_await_2773": "Did you forget to use 'await'?", + "Did_you_mean_0_1369": "Did you mean '{0}'?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?", + "Did_you_mean_to_call_this_expression_6212": "Did you mean to call this expression?", + "Did_you_mean_to_mark_this_function_as_async_1356": "Did you mean to mark this function as 'async'?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "Did you mean to parenthesize this function type?", + "Did_you_mean_to_use_new_with_this_expression_6213": "Did you mean to use 'new' with this expression?", "Digit_expected_1124": "Dígito esperado.", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "O diretório '{0}' não existe; ignorando todas as pesquisas nele.", "Disable_checking_for_this_file_90018": "Desabilitar a verificação para esse arquivo", "Disable_size_limitations_on_JavaScript_projects_6162": "Desabilitar as limitações de tamanho nos projetos JavaScript.", + "Disable_solution_searching_for_this_project_6224": "Disable solution searching for this project.", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "Desabilitar verificação estrita de assinaturas genéricas em tipos de função.", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "Disable use of source files instead of declaration files from referenced projects.", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "Não permitir referências com maiúsculas de minúsculas inconsistentes no mesmo arquivo.", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "Não adicionar as referências de barra tripla nem os módulos importados à lista de arquivos compilados.", "Do_not_emit_comments_to_output_6009": "Não emita comentários para a saída.", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "Não relate erros sobre rótulos não utilizados.", "Do_not_resolve_the_real_path_of_symlinks_6013": "Não resolver o real caminho de symlinks.", "Do_not_truncate_error_messages_6165": "Não truncar as mensagens de erro.", - "Duplicate_declaration_0_2718": "Declaração duplicada '{0}'.", "Duplicate_function_implementation_2393": "Implementação de função duplicada.", "Duplicate_identifier_0_2300": "Identificador '{0}' duplicado.", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "Identificador duplicado '{0}'. O compilador reserva o nome '{1}' no escopo de nível superior de um módulo.", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "Identificador '_this' duplicado. O compilador usa a declaração de variável '_this' para capturar a referência 'this'.", "Duplicate_label_0_1114": "Rótulo '{0}' duplicado.", "Duplicate_number_index_signature_2375": "Assinatura de índice de número duplicado.", + "Duplicate_property_0_2718": "Duplicate property '{0}'.", "Duplicate_string_index_signature_2374": "Assinatura de índice de cadeia de caracteres duplicada.", "Dynamic_import_cannot_have_type_arguments_1326": "A importação dinâmica não pode ter argumentos de tipo", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "Só há suporte para importação dinâmica quando o sinalizador '--module' é 'commonjs' ou 'esNext'.", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "A importação dinâmica deve ter um especificador como um argumento.", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "O especificador da importação dinâmica deve ser do tipo 'string', mas aqui tem o tipo '{0}'.", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'esnext', 'commonjs', 'amd', 'system', or 'umd'.", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other.", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other.", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'.", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "O elemento implicitamente tem um tipo 'any' porque a expressão de índice não é do tipo 'number'.", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "O elemento tem, implicitamente, 'qualquer' tipo, pois o tipo '{0}' não tem assinatura de índice.", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "Emitir uma Marca de Ordem de Byte (BOM) UTF-8 no início dos arquivos de saída.", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "Emitir um arquivo único com os mapas de origem em vez de arquivos separados.", + "Emit_class_fields_with_Define_instead_of_Set_6222": "Emit class fields with Define instead of Set.", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "Emitir a origem ao lado dos sourcemaps em um arquivo único; a definição requer '--inlineSourceMap' ou '--sourceMap'.", "Enable_all_strict_type_checking_options_6180": "Habilitar todas as opções estritas de verificação de tipo.", + "Enable_incremental_compilation_6378": "Habilitar compilação incremental", "Enable_project_compilation_6302": "Habilitar a compilação do projeto", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "Enable strict 'bind', 'call', and 'apply' methods on functions.", "Enable_strict_checking_of_function_types_6186": "Habilitar verificação estrita de tipos de função.", "Enable_strict_checking_of_property_initialization_in_classes_6187": "Habilite a verificação estrita de inicialização de propriedade nas classes.", "Enable_strict_null_checks_6113": "Habilite verificações nulas estritas.", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "Enable the 'experimentalDecorators' option in your configuration file", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "Enable the '--jsx' flag in your configuration file", "Enable_tracing_of_the_name_resolution_process_6085": "Habilite o rastreio do processo de resolução de nome.", "Enable_verbose_logging_6366": "Habilitar registro em log detalhado", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "Permite emissão de interoperabilidade entre CommonJS e Módulos ES através da criação de objetos de namespace para todas as importações. Implica em 'allowSyntheticDefaultImports'.", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "Membro de enumeração esperado.", "Enum_member_must_have_initializer_1061": "O membro de enumeração deve ter um inicializador.", "Enum_name_cannot_be_0_2431": "O nome de enumeração não pode ser '{0}'.", + "Enum_type_0_circularly_references_itself_2586": "Enum type '{0}' circularly references itself.", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "O tipo de Enumeração '{0}' tem membros com inicializadores que não são literais.", "Examples_Colon_0_6026": "Exemplos: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "Profundidade da pilha excessiva ao comparar tipos '{0}' e '{1}'.", @@ -385,7 +490,7 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "Pelo menos {0} argumentos eram esperados, mas {1} ou mais foram obtidos.", "Expected_corresponding_JSX_closing_tag_for_0_17002": "Marca de fechamento de JSX correspondente esperada para '{0}'.", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "Marca de fechamento correspondente esperada para fragmento JSX.", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "O tipo esperado do campo '{0}' em 'package.json' como 'string', obteve '{1}'.", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'.", "Experimental_Options_6177": "Opções Experimentais", "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "O suporte experimental de decorador é um recurso que está sujeito a alterações em uma liberação futura. Configure a opção 'experimentalDecorators' para remover este aviso.", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "Tipo de resolução de módulo especificado explicitamente: '{0}'.", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "Exportações e designações de exportações não são permitidas em acréscimos de módulo.", "Expression_expected_1109": "Expressão esperada.", "Expression_or_comma_expected_1137": "Expressão ou vírgula esperada.", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "Expression produces a union type that is too complex to represent.", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "A expressão é resolvida como '_super', que o compilador utiliza para capturar a referência da classe base.", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "A expressão é resolvida como uma declaração de variável '{0}' que o compilador usa para dar suporte a funções assíncronas.", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "A expressão é resolvida para a declaração de variável '_newTarget' que o compilador usa para capturar a referência de metapropriedade 'new.target'.", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "Extrair para {0} em {1}", "Extract_to_0_in_1_scope_95008": "Extrair para {0} no escopo {1}", "Extract_to_0_in_enclosing_scope_95007": "Extrair para {0} no escopo de delimitação", + "Extract_to_interface_95090": "Extract to interface", + "Extract_to_type_alias_95078": "Extract to type alias", + "Extract_to_typedef_95079": "Extract to typedef", + "Extract_type_95077": "Extract type", "FILE_6035": "ARQUIVO", "FILE_OR_DIRECTORY_6040": "ARQUIVO OU DIRETÓRIO", "Failed_to_parse_file_0_Colon_1_5014": "Falha ao analisar arquivo '{0}': {1}.", "Fallthrough_case_in_switch_7029": "Caso de fallthrough no comutador.", "File_0_does_not_exist_6096": "O arquivo '{0}' não existe.", "File_0_exist_use_it_as_a_name_resolution_result_6097": "O arquivo '{0}' existe; use-o como um resultado de resolução de nome.", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "File '{0}' has an unsupported extension. The only supported extensions are {1}.", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "O arquivo '{0}' tem uma extensão sem suporte, portanto ele será ignorado.", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "O arquivo '{0}' tem extensão sem suporte. As únicas extensões com suporte são {1}.", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?", "File_0_is_not_a_module_2306": "O arquivo '{0}' não é um módulo.", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "O arquivo '{0}' não está na lista de arquivos de projeto. Os projetos devem listar todos os arquivos ou usar um padrão 'include'.", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern.", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "O arquivo '{0}' não está em 'rootDir' '{1}'. Espera-se que 'rootDir' contenha todos os arquivos de origem.", "File_0_not_found_6053": "Arquivo '{0}' não encontrado.", "File_change_detected_Starting_incremental_compilation_6032": "Alteração do arquivo detectada. Iniciando compilação incremental...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "A especificação de arquivo não pode conter um diretório pai ('..') que aparece após um curinga de diretório recursivo ('**'): '{0}'.", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "A especificação de arquivo não pode terminar em um curinga do diretório recursivo ('**'): '{0}'.", "Fix_all_detected_spelling_errors_95026": "Corrigir todos os erros de ortografia detectados", + "Fix_all_expressions_possibly_missing_await_95085": "Fix all expressions possibly missing 'await'", + "Found_0_errors_6217": "Encontrados {0} erros.", "Found_0_errors_Watching_for_file_changes_6194": "{0} erros encontrados. Monitorando alterações de arquivo.", + "Found_1_error_6216": "Encontrado 1 erro.", "Found_1_error_Watching_for_file_changes_6193": "Um erro encontrado. Monitorando alterações de arquivo.", "Found_package_json_at_0_6099": "'package.json' encontrado em '{0}'.", - "Found_package_json_at_0_Package_ID_is_1_6190": "'package.json' encontrado em '{0}'. A ID do pacote é '{1}'.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "Decorações de função não são permitidas dentro de blocos em modo estrito quando o objetivo é 'ES3' ou 'ES5'.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "Declarações de função não são permitidas dentro de blocos em modo estrito quando o objetivo é 'ES3' ou 'ES5'. Definições de classe estão automaticamente em modo estrito.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "Declarações de função não são permitidas dentro de blocos em modo estrito quando o objetivo é 'ES3' ou 'ES5'. Módulos estão automaticamente em modo estrito.", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "A função não tem a instrução return final e o tipo de retorno não inclui 'undefined'.", "Function_overload_must_be_static_2387": "A sobrecarga de função deve ser estática.", "Function_overload_must_not_be_static_2388": "A sobrecarga de função não deve ser estática.", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "Function type, which lacks return-type annotation, implicitly has an '{0}' return type.", "Generate_get_and_set_accessors_95046": "Gerar acessadores 'get' e 'set'", + "Generates_a_CPU_profile_6223": "Generates a CPU profile.", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "Gera um sourcemap para cada arquivo '.d.ts' correspondente.", "Generates_corresponding_d_ts_file_6002": "Gera o arquivo '.d.ts' correspondente.", "Generates_corresponding_map_file_6043": "Gera o arquivo '.map' correspondente.", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "Implicitamente, o gerador tem o tipo '{0}' porque não produz nenhum valor. Considere fornecer um tipo de retorno.", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.", "Generators_are_not_allowed_in_an_ambient_context_1221": "Os geradores não são permitidos em um contexto de ambiente.", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "Geradores só estão disponíveis ao direcionar para o ECMAScript 2015 ou superior.", "Generic_type_0_requires_1_type_argument_s_2314": "O tipo genérico '{0}' exige {1} argumento(s) de tipo.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "O tipo genérico '{0}' exige argumentos de tipo entre {1} e {2}.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "A instanciação de tipo genérico é muito profunda e possivelmente infinita.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Acessadores getter e setter não concordam quanto à visibilidade.", "Global_module_exports_may_only_appear_at_top_level_1316": "As exportações de módulo global podem somente aparecer no nível superior.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "As exportações de módulo global podem somente aparecer em arquivos de declaração.", "Global_module_exports_may_only_appear_in_module_files_1314": "As exportações de módulo global podem somente aparecer em arquivos de módulo.", "Global_type_0_must_be_a_class_or_interface_type_2316": "O tipo global '{0}' deve ser um tipo de classe ou interface.", "Global_type_0_must_have_1_type_parameter_s_2317": "O tipo global '{0}' deve ter {1} parâmetro(s) de tipo.", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.", "Hexadecimal_digit_expected_1125": "Dígito hexadecimal esperado.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "Identificador esperado. '{0}' é uma palavra reservada no modo estrito.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "Identificador esperado. '{0}' é uma palavra reservada no modo estrito. Definições de classe estão automaticamente no modo estrito.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "Identificador esperado. '{0}' é uma palavra reservada em modo estrito. Os módulos ficam automaticamente em modo estrito.", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "Identifier expected. '{0}' is a reserved word that cannot be used here.", "Identifier_expected_1003": "Identificador esperado.", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "Identificador esperado. '__esModule' é reservado como um marcador exportado ao transformar os módulos ECMAScript.", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`", "Ignore_this_error_message_90019": "Ignorar essa mensagem de erro", "Implement_all_inherited_abstract_classes_95040": "Implementar todas as classes abstratas herdadas", "Implement_all_unimplemented_interfaces_95032": "Implementar todas as interfaces não implementadas", "Implement_inherited_abstract_class_90007": "Implementar classe abstrata herdada", "Implement_interface_0_90006": "Implementar a interface '{0}'", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "A cláusula implements da classe exportada '{0}' tem ou está usando o nome particular '{1}'.", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.", "Import_0_from_module_1_90013": "Importar '{0}' do módulo \"{1}\"", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "Não é possível usar a atribuição de importação durante o direcionamento para módulos de ECMAScript. Use 'importar * como ns de \"mod\"', 'importar {a} de \"mod\"', 'importar d de \"mod\"' ou outro formato de módulo em vez disso.", "Import_declaration_0_is_using_private_name_1_4000": "A declaração da importação '{0}' está usando o nome particular '{1}'.", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "A declaração da importação está em conflito com a declaração local '{0}'.", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "As declarações de importação em um namespace não podem fazer referência a um módulo.", + "Import_default_0_from_module_1_90032": "Import default '{0}' from module \"{1}\"", "Import_emit_helpers_from_tslib_6139": "Importar auxiliares de emissão de 'tslib'.", "Import_may_be_converted_to_a_default_import_80003": "A importação pode ser convertida em uma importação padrão.", "Import_name_cannot_be_0_2438": "O nome da importação não pode ser '{0}'.", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "Importações não são permitidas em acréscimos de módulo. Considere movê-las para o módulo externo delimitador.", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "Em declarações de enumeração de ambiente, o inicializador de membro deve ser uma expressão de constante.", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "Em uma enumeração com várias declarações, somente uma declaração pode omitir um inicializador para o primeiro elemento de enumeração.", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "Em declarações de enumeração 'const', o inicializador de membro deve ser uma expressão de constante.", "Include_modules_imported_with_json_extension_6197": "Incluir módulos importados com a extensão '.json'", "Index_signature_in_type_0_only_permits_reading_2542": "Assinatura de índice no tipo '{0}' permite somente leitura.", "Index_signature_is_missing_in_type_0_2329": "Assinatura de índice ausente no tipo '{0}'.", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "Todas as declarações individuais na declaração mesclada '{0}' devem ser exportadas ou ficar no local.", "Infer_all_types_from_usage_95023": "Inferir todos os tipos de uso", "Infer_parameter_types_from_usage_95012": "Inferir tipos de parâmetro pelo uso", + "Infer_this_type_of_0_from_usage_95080": "Infer 'this' type of '{0}' from usage", "Infer_type_of_0_from_usage_95011": "Inferir tipo de '{0}' pelo uso", "Initialize_property_0_in_the_constructor_90020": "Inicializar a propriedade '{0}' no construtor", "Initialize_static_property_0_90021": "Inicializar a propriedade estática '{0}'", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "JSDoc '...' só pode aparecer no último parâmetro de uma assinatura.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "A marcação do JSDoc \"@param\" tem o nome \"{0}\", mas não há nenhum parâmetro com esse nome.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "A marca '@param' do JSDoc tem o nome '{0}', mas não há nenhum parâmetro com esse nome. Ela corresponderia a 'argumentos' se tivesse um tipo de matriz.", + "JSDoc_type_0_circularly_references_itself_2587": "JSDoc type '{0}' circularly references itself.", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "A marca JSDoc \"@typedef\" deve ter uma anotação de tipo ou ser seguida pelas marcas \"@property\" or \"@member\".", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "Os tipos de JSDoc podem ser usados somente dentro dos comentários de documentação.", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "Tipos JSDoc podem ser movidos para tipos TypeScript.", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "O tipo de elemento JSX '{0}' não tem nenhum constructo nem assinaturas de chamadas.", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "O tipo de elemento JSX '{0}' não é uma função de construtor para elementos JSX.", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "Elementos JSX não podem ter vários atributos com o mesmo nome.", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "JSX expressions may not use the comma operator. Did you mean to write an array?", "JSX_expressions_must_have_one_parent_element_2657": "As expressões JSX devem ter um elemento pai.", "JSX_fragment_has_no_corresponding_closing_tag_17014": "O fragmento JSX não tem uma marcação de fechamento correspondente.", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "O fragmento de JSX não é compatível ao se utilizar um pragma de fábrica JSX embutido", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "O filho do espalhamento JSX deve ser um tipo de matriz.", "Jump_target_cannot_cross_function_boundary_1107": "O destino do salto não pode ultrapassar o limite de função.", "KIND_6034": "TIPO", + "Keywords_cannot_contain_escape_characters_1260": "Keywords cannot contain escape characters.", "LOCATION_6037": "LOCAL", "Language_service_is_disabled_9004": "O serviço de linguagem está desabilitado.", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "O operador antes da vírgula não é usado e não tem efeitos colaterais.", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "Tornar a chamada 'super()' a primeira instrução no construtor", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "O tipo de objeto mapeado implicitamente tem um tipo de modelo 'any'.", "Member_0_implicitly_has_an_1_type_7008": "O membro '{0}' implicitamente tem um tipo '{1}'.", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Merge_conflict_marker_encountered_1185": "Marcador de conflito de mesclagem encontrado.", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "A declaração mesclada '{0}' não pode conter uma declaração de exportação padrão. Considere adicionar uma declaração 'export default {0}' independente.", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "A metapropriedade '{0}' só é permitida no corpo de uma declaração de função, expressão de função ou construtor.", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "O método '{0}' da interface exportada tem ou está usando o nome '{1}' do módulo privado '{2}'.", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "O método '{0}' da interface exportada tem ou está usando o nome privado '{1}'.", "Modifiers_cannot_appear_here_1184": "Modificadores não podem aparecer aqui.", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "O módulo '{0}' não faz referência a um tipo, mas é usado como um tipo aqui.", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "Module '{0}' can only be default-imported using the '{1}' flag", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "Module '{0}' declares '{1}' locally, but it is exported as '{2}'.", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "Module '{0}' declares '{1}' locally, but it is not exported.", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "O módulo '{0}' não faz referência a um valor, mas é usado como um valor aqui.", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "O módulo {0} já exportou um membro denominado '{1}'. Considere reexportar explicitamente para resolver a ambiguidade.", "Module_0_has_no_default_export_1192": "O módulo '{0}' não tem padrão de exportação.", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?", "Module_0_has_no_exported_member_1_2305": "O módulo '{0}' não tem nenhum membro exportado '{1}'.", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "O módulo '{0}' não tem nenhum membro '{1}' exportado. Você quis dizer '{2}'?", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "O módulo '{0}' está oculto por uma declaração de local com o mesmo nome.", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "O módulo '{0}' resolve para uma entidade sem módulo e não pode ser importado usando este constructo.", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "O módulo '{0}' usa 'export =' e não pode ser usado com 'export *'.", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "O módulo '{0}' foi resolvido como um módulo de ambiente declarado em '{1}', já que este arquivo não foi modificado.", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "O módulo '{0}' foi resolvido como módulo de ambiente declarado localmente no arquivo '{1}'.", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "O módulo '{0}' foi resolvido para '{1}', mas '--jsx' não está configurado.", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used.", "Module_Resolution_Options_6174": "Opções da Resolução de Módulo", "Module_name_0_matched_pattern_1_6092": "Nome do módulo '{0}', padrão correspondido '{1}'.", "Module_name_0_was_not_resolved_6090": "======== Nome do módulo '{0}' não foi resolvido. ========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== Nome do módulo '{0}' foi resolvido com sucesso '{1}'. ========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========", "Module_resolution_kind_is_not_specified_using_0_6088": "Resolução de tipo não foi especificado, usando '{0}'.", "Module_resolution_using_rootDirs_has_failed_6111": "Falha na resolução de módulo usando 'rootDirs'.", "Move_to_a_new_file_95049": "Mover para um novo arquivo", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "As propriedades com nome '{0}' dos tipos '{1}' e '{2}' não são idênticas.", "Namespace_0_has_no_exported_member_1_2694": "O namespace '{0}' não tem o membro exportado '{1}'.", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "Nenhum construtor base tem o número especificado de argumentos de tipo.", + "No_constituent_of_type_0_is_callable_2755": "No constituent of type '{0}' is callable.", + "No_constituent_of_type_0_is_constructable_2759": "No constituent of type '{0}' is constructable.", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "No index signature with a parameter of type '{0}' was found on type '{1}'.", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "Nenhuma entrada foi localizada no arquivo de configuração '{0}'. Os caminhos especificados foram 'incluir' '{1}' e 'excluir' '{2}'.", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments.", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments.", + "No_overload_matches_this_call_2769": "No overload matches this call.", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "A classe não abstrata '{0}' não implementa o membro abstrato herdado '{1}' da classe '{2}'.", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "A expressão da classe não abstrata não implementa o membro abstrato herdado '{0}' da classe '{1}'.", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "Non-null assertions can only be used in TypeScript files.", + "Non_simple_parameter_declared_here_1348": "Non-simple parameter declared here.", "Not_all_code_paths_return_a_value_7030": "Nem todos os caminhos de código retornam um valor.", + "Not_all_constituents_of_type_0_are_callable_2756": "Not all constituents of type '{0}' are callable.", + "Not_all_constituents_of_type_0_are_constructable_2760": "Not all constituents of type '{0}' are constructable.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "O tipo de índice numérico '{0}' não é atribuível ao tipo de índice de cadeia de caracteres '{1}'.", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers.", "Numeric_separators_are_not_allowed_here_6188": "Separadores numéricos não são permitidos aqui.", "Object_is_of_type_unknown_2571": "O objeto é do tipo 'desconhecido'.", "Object_is_possibly_null_2531": "Possivelmente, o objeto é 'nulo'.", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "Literais octais não são permitidos em inicializador de membros de enumerações. Use a sintaxe '{0}'.", "Octal_literals_are_not_allowed_in_strict_mode_1121": "Literais octais não são permitidos no modo estrito.", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "Literais octais não estão disponíveis quando se tem como destino ECMAScript 5 e superiores. Use a sintaxe '{0}'.", + "Only_ECMAScript_imports_may_use_import_type_1370": "Only ECMAScript imports may use 'import type'.", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "É permitida apenas uma única declaração de variável em uma instrução 'for...in'.", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "É permitida apenas uma única declaração de variável em uma instrução 'for...of'.", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "Apenas uma função void pode ser chamada com a palavra-chave 'new'.", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "Emita somente arquivos de declaração '.d.ts'.", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "Somente os identificadores/nomes qualificados com argumentos de tipo opcionais tem suporte atualmente nas cláusulas de classe 'extends'.", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "Somente métodos protegidos e públicos da classe base são acessíveis pela palavra-chave 'super'.", + "Operator_0_cannot_be_applied_to_type_1_2736": "Operator '{0}' cannot be applied to type '{1}'.", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "O operador '{0}' não pode ser aplicado aos tipos '{1}' e '{2}'.", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "A opção '{0}' só pode ser especificada no arquivo 'tsconfig.json'.", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "A opção '{0} só pode ser usada quando qualquer uma das opções '--inlineSourceMap' ou '--sourceMap' é fornecida.", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "Option '{0}' cannot be specified when option 'target' is 'ES3'.", "Option_0_cannot_be_specified_with_option_1_5053": "A opção '{0}' não pode ser especificada com a opção '{1}'.", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "A opção '{0}' não pode ser especificada sem especificar a opção '{1}'.", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "A opção '{0}' não pode ser especificada sem a especificação da opção '{1}' ou '{2}'.", "Option_0_should_have_array_of_strings_as_a_value_6103": "A opção '{0}' deve ter matriz de cadeias de um valor.", "Option_build_must_be_the_first_command_line_argument_6369": "A opção '--build' precisa ser o primeiro argumento da linha de comando.", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified.", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "A opção 'isolatedModules' só pode ser usada quando nenhuma opção de '--module' for fornecida ou a opção 'target' for 'ES2015' ou superior.", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "A opção 'paths' não pode ser usada sem se especificar a opção '--baseUrl'.", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "A opção 'project' não pode ser mesclada com arquivos de origem em uma linha de comando.", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'.", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "A opção '--resolveJsonModule' não pode ser especificada sem a estratégia de resolução de módulo de 'nó'.", "Options_0_and_1_cannot_be_combined_6370": "As opções '{0}' e '{1}' não podem ser combinadas.", "Options_Colon_6027": "Opções:", "Output_directory_for_generated_declaration_files_6166": "Diretório de saída para os arquivos de declaração gerados.", "Output_file_0_from_project_1_does_not_exist_6309": "O arquivo de saída '{0}' do projeto '{1}' não existe", "Output_file_0_has_not_been_built_from_source_file_1_6305": "O arquivo de saída '{0}' não foi compilado do arquivo de origem '{1}'.", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "A assinatura de sobrecarga não é compatível com a implementação da função.", + "Overload_0_of_1_2_gave_the_following_error_2772": "Overload {0} of {1}, '{2}', gave the following error.", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "Assinaturas de sobrecarga devem todas ser abstratas ou não abstratas.", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "Todas as assinaturas de sobrecarga devem ser ambiente ou não ambiente.", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "Assinaturas de sobrecarga devem todas ser exportadas ou não exportadas.", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "Todas as assinaturas de sobrecarga devem ser protegidas, privadas ou públicas.", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "O parâmetro '{0}' não pode ser referenciado em seu inicializador.", "Parameter_0_implicitly_has_an_1_type_7006": "O parâmetro '{0}' implicitamente tem um tipo '{1}'.", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "O parâmetro '{0}' não está na mesma posição que o parâmetro '{1}'.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "Parameter '{0}' of accessor has or is using private name '{1}'.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "O parâmetro '{0}' da assinatura de chamada da interface exportada tem ou está usando o nome '{1}' do módulo particular '{2}'.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "O parâmetro '{0}' da assinatura de chamada da interface exportada tem ou está usando o nome particular '{1}'.", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "O parâmetro '{0}' do construtor da classe exportada tem ou está usando o nome '{1}' do módulo externo {2}, mas não pode ser nomeado.", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "O parâmetro '{0}' do método estático público da classe exportada tem ou está usando o nome particular '{1}'.", "Parameter_cannot_have_question_mark_and_initializer_1015": "O parâmetro não pode ter inicializador e ponto de interrogação.", "Parameter_declaration_expected_1138": "Declaração de parâmetro esperada.", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "Parameter has a name but no type. Did you mean '{0}: {1}'?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "Parameter modifiers can only be used in TypeScript files.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "O tipo de parâmetro do setter público '{0}' da classe exportada tem ou está usando o nome '{1}' do módulo privado '{2}'.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "O tipo de parâmetro do setter público '{0}' da classe exportada tem ou está usando o nome privado '{1}'.", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "O tipo de parâmetro do setter estático público '{0}' da classe exportada tem ou está usando o nome '{1}' do módulo privado '{2}'.", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "Analisar em modo estrito e emitir \"usar estrito\" para cada arquivo de origem.", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "O padrão '{0}' pode ter no máximo um caractere '*'.", "Prefix_0_with_an_underscore_90025": "Prefixo '{0}' com um sublinhado", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "Prefix all incorrect property declarations with 'declare'", "Prefix_all_unused_declarations_with_where_possible_95025": "Prefixar com '_' todas as declarações não usadas quando possível", + "Prefix_with_declare_95094": "Prefix with 'declare'", "Print_names_of_files_part_of_the_compilation_6155": "Nomes de impressão das partes dos arquivos da compilação.", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "Print names of files that are part of the compilation and then stop processing.", "Print_names_of_generated_files_part_of_the_compilation_6154": "Nomes de impressão das partes dos arquivos gerados da compilação.", "Print_the_compiler_s_version_6019": "Imprima a versão do compilador.", + "Print_the_final_configuration_instead_of_building_1350": "Print the final configuration instead of building.", "Print_this_message_6017": "Imprima esta mensagem.", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "Private identifiers are not allowed in variable declarations.", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "Private identifiers are not allowed outside class bodies.", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "Private identifiers are only available when targeting ECMAScript 2015 and higher.", + "Private_identifiers_cannot_be_used_as_parameters_18009": "Private identifiers cannot be used as parameters", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "Private or protected member '{0}' cannot be accessed on a type parameter.", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "O projeto '{0}' não pode ser compilado porque sua dependência '{1}' tem erros", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "Project '{0}' can't be built because its dependency '{1}' was not built", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "O projeto '{0}' está desatualizado porque sua dependência '{1}' está desatualizada", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "O projeto '{0}' está desatualizado porque a saída mais antiga '{1}' é mais antiga que a entrada mais recente '{2}'", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "O projeto '{0}' está desatualizado porque o arquivo de saída '{1}' não existe", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "Project '{0}' is out of date because output of its dependency '{1}' has changed", "Project_0_is_up_to_date_6361": "O projeto '{0}' está atualizado", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "O projeto '{0}' está atualizado porque a entrada mais recente '{1}' é mais antiga que a saída mais antiga '{2}'", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "O projeto '{0}' está atualizado com os arquivos .d.ts de suas dependências", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "Projetos a serem referenciados", "Property_0_does_not_exist_on_const_enum_1_2479": "A propriedade '{0}' não existe na enumeração 'const' '{1}'.", "Property_0_does_not_exist_on_type_1_2339": "A propriedade '{0}' não existe no tipo '{1}'.", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "A propriedade '{0}' não existe no tipo '{1}'. Você esqueceu de usar 'await'?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "A propriedade '{0}' não existe no tipo '{1}'. Você quis dizer '{2}'?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "A propriedade '{0}' tem declarações conflitantes e é inacessível no tipo '{1}'.", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "A propriedade '{0}' não tem nenhum inicializador e não está definitivamente atribuída no construtor.", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "A propriedade '{0}' tem implicitamente o tipo 'any' porque o acessador get não tem uma anotação de tipo de retorno.", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "A propriedade '{0}' tem implicitamente o tipo 'any' porque o acessador set não tem uma anotação de tipo de parâmetro.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage.", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "A propriedade '{0}' no tipo '{1}' não pode ser atribuída à mesma propriedade no tipo base '{2}'.", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "A propriedade '{0}' no tipo '{1}' não pode ser atribuída ao tipo '{2}'.", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'.", + "Property_0_is_a_static_member_of_type_1_2576": "Property '{0}' is a static member of type '{1}'", "Property_0_is_declared_but_its_value_is_never_read_6138": "A propriedade '{0}' é declarada, mas seu valor nunca é lido.", "Property_0_is_incompatible_with_index_signature_2530": "A propriedade '{0}' é incompatível com a assinatura de índice.", + "Property_0_is_incompatible_with_rest_element_type_2573": "Property '{0}' is incompatible with rest element type.", "Property_0_is_missing_in_type_1_2324": "A propriedade '{0}' está ausente no tipo '{1}'.", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "Property '{0}' is missing in type '{1}' but required in type '{2}'.", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "Property '{0}' is not accessible outside class '{1}' because it has a private identifier.", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "A propriedade '{0}' é opcional no tipo '{1}', mas obrigatória no tipo '{2}'.", "Property_0_is_private_and_only_accessible_within_class_1_2341": "A propriedade '{0}' é particular e somente é acessível na classe '{1}'.", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "A propriedade '{0}' é particular no tipo '{1}', mas não no tipo '{2}'.", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "A propriedade '{0}' é protegida, mas o tipo '{1}' não é uma classe derivada de '{2}'.", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "A propriedade '{0}' é protegida no tipo '{1}', mas pública no tipo '{2}'.", "Property_0_is_used_before_being_assigned_2565": "A propriedade '{0}' é usada antes de ser atribuída.", + "Property_0_is_used_before_its_initialization_2729": "Property '{0}' is used before its initialization.", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "A propriedade \"{0}\" do atributo de espalhamento JSX não pode ser atribuída à propriedade de destino.", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "A propriedade '{0}' da expressão de classe exportada não pode ser privada nem protegida.", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "A propriedade '{0}' da interface exportada tem ou está usando o nome '{1}' do módulo particular '{2}'.", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "A propriedade '{0}' da interface exportada tem ou está usando o nome particular '{1}'.", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "A propriedade '{0}' do tipo '{1}' não é atribuível ao tipo de índice numérico '{2}'.", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "A propriedade '{0}' do tipo '{1}' não é atribuível ao tipo de índice de cadeia de caracteres '{2}'.", + "Property_0_was_also_declared_here_2733": "Property '{0}' was also declared here.", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.", "Property_assignment_expected_1136": "Atribuição de propriedade esperada.", "Property_destructuring_pattern_expected_1180": "Padrão de desestruturação de propriedade esperado.", "Property_or_signature_expected_1131": "Propriedade ou assinatura esperada.", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "A propriedade estática pública '{0}' da classe exportada tem ou está usando o nome '{1}' do módulo externo {2}, mas não pode ser nomeada.", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "A propriedade estática pública '{0}' da classe exportada tem ou está usando o nome '{1}' do módulo particular '{2}'.", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "A propriedade estática pública '{0}' da classe exportada tem ou está usando o nome particular '{1}'.", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'.", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "Gerar erro em expressões e declarações com um tipo 'any' implícito.", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Gerar erro em expressões 'this' com um tipo 'any' implícito.", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.", "Redirect_output_structure_to_the_directory_6006": "Redirecione a estrutura de saída para o diretório.", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "O projeto referenciado '{0}' deve ter a configuração de \"composite\": true.", + "Remove_all_unnecessary_uses_of_await_95087": "Remove all unnecessary uses of 'await'", "Remove_all_unreachable_code_95051": "Remover todo o código inacessível", "Remove_all_unused_labels_95054": "Remover todos os rótulos não utilizados", "Remove_braces_from_arrow_function_95060": "Remover chaves da função de seta", - "Remove_declaration_for_Colon_0_90004": "Remover declaração para: '{0}'", "Remove_destructuring_90009": "Remover desestruturação", "Remove_import_from_0_90005": "Remover importação de '{0}'", + "Remove_template_tag_90011": "Remove template tag", + "Remove_type_parameters_90012": "Remove type parameters", + "Remove_unnecessary_await_95086": "Remove unnecessary 'await'", "Remove_unreachable_code_95050": "Remover código inacessível", + "Remove_unused_declaration_for_Colon_0_90004": "Remove unused declaration for: '{0}'", "Remove_unused_label_95053": "Remover rótulo não utilizado", "Remove_variable_statement_90010": "Remover instrução de variável", + "Replace_all_unused_infer_with_unknown_90031": "Replace all unused 'infer' with 'unknown'", "Replace_import_with_0_95015": "Substitua a importação com '{0}'.", + "Replace_infer_0_with_unknown_90030": "Replace 'infer {0}' with 'unknown'", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Relate erro quando nem todos os caminhos de código na função retornarem um valor.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Relate erros para casos de fallthrough na instrução switch.", "Report_errors_in_js_files_8019": "Relatar erros em arquivos .js.", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "Resolvendo usando caminhos de pesquisa primários...", "Resolving_with_primary_search_path_0_6121": "Resolvendo com caminho de pesquisa primário '{0}'.", "Rest_parameter_0_implicitly_has_an_any_type_7019": "O parâmetro rest '{0}' implicitamente tem um tipo 'any[]'.", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage.", + "Rest_signatures_are_incompatible_2572": "Rest signatures are incompatible.", "Rest_types_may_only_be_created_from_object_types_2700": "Os tipos de rest podem ser criado somente de tipos de objeto.", + "Return_type_annotation_circularly_references_itself_2577": "Return type annotation circularly references itself.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "O tipo de retorno da assinatura de chamada da interface exportada tem ou está usando o nome '{0}' do módulo particular '{1}'.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "O tipo de retorno da assinatura de chamada da interface exportada tem ou está usando o nome particular '{0}'.", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "O tipo de retorno da assinatura de construtor da interface exportada tem ou está usando o nome '{0}' do módulo particular '{1}'.", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "Diretório raiz não pode ser determinado, ignorando caminhos de pesquisa primários.", "STRATEGY_6039": "ESTRATÉGIA", "Scoped_package_detected_looking_in_0_6182": "Pacote com escopo detectado, procurando no '{0}'", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "Set the 'module' option in your configuration file to '{0}'", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "Set the 'target' option in your configuration file to '{0}'", "Setters_cannot_return_a_value_2408": "Setters não podem retornar um valor.", "Show_all_compiler_options_6169": "Mostrar todas as opções do compilador.", "Show_diagnostic_information_6149": "Mostras as informações de diagnóstico.", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "A assinatura '{0}' deve ser um predicado de tipo.", "Skip_type_checking_of_declaration_files_6012": "Ignorar a verificação de tipo dos arquivos de declaração.", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "Ignorando o build do projeto '{0}' porque a dependência '{1}' tem erros", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "Ignorando a limpeza porque não foram localizados todos os projetos", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "Skipping build of project '{0}' because its dependency '{1}' was not built", "Source_Map_Options_6175": "Opções do Sourcemap", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "A assinatura de sobrecarga especializada não pode ser atribuída a qualquer assinatura não especializada.", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "O especificador de importação dinâmica não pode ser o elemento de difusão.", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "Especifique a versão de destino do ECMAScript: 'ES3' (padrão), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018' ou 'ESNEXT'.", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'.", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "Especifique a geração de código JSX: 'preserve', 'react-native' ou 'react'.", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "Specify emit/checking behavior for imports that are only used for types", + "Specify_file_to_store_incremental_compilation_information_6380": "Specify file to store incremental compilation information", "Specify_library_files_to_be_included_in_the_compilation_6079": "Especifique os arquivos de biblioteca a serem incluídos na compilação.", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "Especifique a geração de código de módulo: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015' ou 'ESNext'.", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'.", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "Especifique a estratégia de resolução de módulo: 'node' (Node.js) ou 'classic' (TypeScript pré-1.6).", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'.", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'.", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'.", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "Especifique a função de fábrica JSX a ser usada ao direcionar a emissão 'react' do JSX, por ex., 'React.createElement' ou 'h'.", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "Especifique o fim da sequência de linha a ser usado ao emitir arquivos: 'CRLF' (dos) ou 'LF' (unix).", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "Especifique o local onde o depurador deve localizar arquivos TypeScript em vez de locais de origem.", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "Especifique o local onde o depurador deve localizar arquivos de mapa em vez de locais gerados.", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "Especifique o diretório raiz de arquivos de entrada. Use para controlar a estrutura do diretório de saída com --outDir.", + "Split_all_invalid_type_only_imports_1367": "Split all invalid type-only imports", + "Split_into_two_separate_import_declarations_1366": "Split into two separate import declarations", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "O operador de espalhamento só está disponível em expressões 'new' no direcionamento a ECMAScript 5 e superior.", "Spread_types_may_only_be_created_from_object_types_2698": "Os tipos de espalhamento podem ser criados apenas de tipos de objeto.", "Starting_compilation_in_watch_mode_6031": "Iniciando compilação no modo de inspeção...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "Declarações de propriedade subsequentes devem ter o mesmo tipo. A propriedade '{0}' deve ser do tipo '{1}', mas aqui tem o tipo '{2}'.", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "Declarações de variável subsequentes devem ter o mesmo tipo. A variável '{0}' deve ser do tipo '{1}', mas aqui tem o tipo '{2}'.", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "A substituição '{0}' para o padrão '{1}' tem um tipo incorreto, 'string' esperada, obteve '{2}'.", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "A substituição '{0}' no padrão '{1}' pode ter no máximo um caractere '*'.", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "Substitution '{0}' in pattern '{1}' can have at most one '*' character.", "Substitutions_for_pattern_0_should_be_an_array_5063": "As substituições para o padrão '{0}' devem ser uma matriz.", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "Substituições para o padrão '{0}' não devem ser uma matriz vazia.", "Successfully_created_a_tsconfig_json_file_6071": "Arquivo tsconfig.json criado com êxito.", @@ -840,78 +1033,121 @@ "Suppress_excess_property_checks_for_object_literals_6072": "Verificações de propriedade de excesso de compactação para literais de objeto.", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "Suprimir erros de noImplicitAny para objetos de indexação sem assinaturas de índice.", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "A referência 'symbol' não se refere ao objeto global do construtor Symbol.", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively.", "Syntax_Colon_0_6023": "Sintaxe: {0}", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "Tagged template expressions are not permitted in an optional chain.", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "The '{0}' modifier can only be used in TypeScript files.", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "O operador '{0}' não pode ser aplicado ao tipo 'symbol'.", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "O operador '{0}' não é permitido para tipos boolianos. Considere usar '{1}'.", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "The '{0}' property of an async iterator must be a method.", + "The_0_property_of_an_iterator_must_be_a_method_2767": "The '{0}' property of an iterator must be a method.", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "O tipo 'Objeto' pode ser atribuído para muito poucos outros tipos. Você desejava usar o tipo 'qualquer' ao invés disso?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "O objeto 'arguments' não pode ser referenciado em uma função de seta em ES3 e ES5. Considere usar uma expressão de função padrão.", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "O objeto 'arguments' não pode ser referenciado em uma função assíncrona ou o método no ES3 e ES5. Considere usar uma função ou um método padrão.", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "O corpo de uma instrução 'if' não pode ser uma instrução vazia.", "The_character_set_of_the_input_files_6163": "O conjunto de caracteres dos arquivos de entrada.", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "The containing arrow function captures the global value of 'this'.", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "O corpo da função ou do módulo contido é muito grande para a análise de fluxo de controle.", "The_current_host_does_not_support_the_0_option_5001": "O host atual não dá suporte à opção '{0}'.", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "The declaration of '{0}' that you probably intended to use is defined here", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "The expected type comes from property '{0}' which is declared here on type '{1}'", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "The expected type comes from the return type of this signature.", + "The_expected_type_comes_from_this_index_signature_6501": "The expected type comes from this index signature.", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "A expressão de uma atribuição de exportação deve ser um identificador ou nome qualificado em um contexto de ambiente.", "The_files_list_in_config_file_0_is_empty_18002": "A lista de 'arquivos' no arquivo de configuração '{0}' está vazia.", + "The_first_export_default_is_here_2752": "The first export default is here.", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "O primeiro parâmetro do método 'then' de uma promessa deve ser um retorno de chamada.", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "O tipo global 'JSX.{0}' não pode ter mais de uma propriedade.", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "A metapropriedade 'import.meta' é permitida apenas usando 'ESNext' para as opções de compilador 'target' e 'module'.", + "The_implementation_signature_is_declared_here_2750": "The implementation signature is declared here.", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "The 'import.meta' meta-property is only allowed when the '--module' option is 'esnext' or 'system'.", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary.", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "O tipo inferido de '{0}' faz referência a um tipo '{1}' inacessível. Uma anotação de tipo é necessária.", + "The_last_overload_gave_the_following_error_2770": "The last overload gave the following error.", + "The_last_overload_is_declared_here_2771": "The last overload is declared here.", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "O lado esquerdo de uma instrução 'for...in' não pode ser um padrão de desestruturação.", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "O lado esquerdo de uma instrução 'for...in' não pode usar uma anotação de tipo.", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "The left-hand side of a 'for...in' statement may not be an optional property access.", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "O lado esquerdo de uma instrução 'for...in' deve ser uma variável ou um acesso à propriedade.", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "O lado esquerdo de uma instrução de 'for...in' deve ser do tipo 'string' ou 'any'.", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "O lado esquerdo de uma instrução 'for...of' não pode usar uma anotação de tipo.", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "The left-hand side of a 'for...of' statement may not be an optional property access.", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "O lado esquerdo de uma instrução 'for...of' deve ser uma variável ou um acesso à propriedade.", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "O lado esquerdo de uma operação aritmética deve ser do tipo 'any', 'number' ou de enumeração.", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "The left-hand side of an assignment expression may not be an optional property access.", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "O lado esquerdo de uma expressão de atribuição deve ser uma variável ou um acesso à propriedade.", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "O lado esquerdo de uma expressão 'in' deve ser do tipo 'any', 'string', 'number' ou 'symbol'.", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "O lado esquerdo de uma expressão 'instanceof' deve ser do tipo 'any', um tipo de objeto ou um parâmetro de tipo.", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "O local usado ao exibir mensagens ao usuário (por exemplo, 'en-us')", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "A profundidade máxima de dependência a ser pesquisada em arquivos node_modules e de carregamento de JavaScript.", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "The operand of a 'delete' operator cannot be a private identifier.", "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "O operando de um operador delete não pode ser uma propriedade somente leitura.", "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "O operando de um operador delete deve ser uma referência de propriedade.", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "The operand of an increment or decrement operator may not be an optional property access.", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "O operando de um operador de incremento ou decremento deve ser uma variável ou um acesso à propriedade.", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "The parser expected to find a '}' to match the '{' token here.", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "O tipo de retorno de um construtor de elemento JSX deve retornar um tipo de objeto.", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "O tipo de retorno de uma função de decorador de parâmetro deve ser 'void' ou 'any'.", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "O tipo de retorno de uma função de decorador de propriedade deve ser 'void' ou 'any'.", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "O tipo de retorno de uma função assíncrona deve ser uma promessa válida ou não deve conter um membro \"then\" que pode ser chamado.", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "O tipo de retorno de uma função assíncrona ou método deve ser o tipo Promessa global.", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "O lado direito de uma instrução 'for...in' deve ser do tipo 'any', um tipo de objeto ou um parâmetro de tipo, mas aqui ele tem o tipo '{0}'.", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "O lado direito de uma operação aritmética deve ser do tipo 'any', 'number' ou de enumeração.", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "O lado direito de uma expressão 'in' deve ser do tipo 'any', um tipo de objeto ou um parâmetro de tipo.", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "O lado direito de uma expressão 'instanceof' deve ser do tipo 'any' ou de um tipo que pode ser atribuído ao tipo de interface 'Function'.", + "The_shadowing_declaration_of_0_is_defined_here_18017": "The shadowing declaration of '{0}' is defined here", "The_specified_path_does_not_exist_Colon_0_5058": "O caminho especificado não existe: '{0}'.", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "O destino de uma atribuição deve ser uma variável ou um acesso à propriedade.", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "The target of an object rest assignment may not be an optional property access.", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "O destino de uma atribuição rest de objeto deve ser uma variável ou um acesso de propriedade.", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "O contexto 'this' de tipo '{0}' não é atribuível para o 'this' do método de tipo '{1}'.", "The_this_types_of_each_signature_are_incompatible_2685": "Os tipos 'this' de cada assinatura são incompatíveis.", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'.", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "O argumento de tipo para o parâmetro de tipo '{0}' não pode ser inferido com base no uso. Considere especificar os argumentos de tipo explicitamente.", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "O tipo retornado pelo método 'next()' de um iterador assíncrono deve ser uma promessa para um tipo com a propriedade 'value'.", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "O tipo retornado pelo método 'next()' de um iterador deve ter uma propriedade 'value'.", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "The type of a function declaration must match the function's signature.", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property.", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "The type returned by the '{0}()' method of an iterator must have a 'value' property.", + "The_types_of_0_are_incompatible_between_these_types_2200": "The types of '{0}' are incompatible between these types.", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "The types returned by '{0}' are incompatible between these types.", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "A declaração de variável de uma instrução 'for...in' não pode ter um inicializador.", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "A declaração de variável de uma instrução 'for...of' não pode ter um inicializador.", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "A instrução \"with\" não tem suporte. Todos os símbolos em um bloco \"with\" terão o tipo \"any\".", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided.", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "This condition will always return true since the function is always defined. Did you mean to call it instead?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "Esta função de construtor pode ser convertida em uma declaração de classe.", + "This_expression_is_not_callable_2349": "This expression is not callable.", + "This_expression_is_not_constructable_2351": "This expression is not constructable.", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.", + "This_may_be_converted_to_an_async_function_80006": "This may be converted to an async function.", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export.", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag.", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "This overload signature is not compatible with its implementation signature.", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "This parameter is not allowed with 'use strict' directive.", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Essa sintaxe requer um auxiliar importado, mas o módulo '{0}' não pode ser encontrado.", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "Essa sintaxe requer um auxiliar importado chamado '{1}', mas o módulo '{0}' não tem nenhum membro exportado '{1}'.", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'.", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.", "Trailing_comma_not_allowed_1009": "Vírgula à direita não permitida.", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Transcompilar cada arquivo como um módulo separado (do mesmo modo que 'ts.transpileModule').", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Tente `npm install @types/{0}`, se existir, ou adicione um novo arquivo de declaração (.d.ts) que contenha `declare module '{0}';`", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`", "Trying_other_entries_in_rootDirs_6110": "Tentando outras entradas em 'rootDirs'.", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "Tentando substituição '{0}', local de módulo candidato: '{1}'.", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "O tipo de tupla '{0}' com comprimento '{1}' não pode ser atribuído à tupla com comprimento '{2}'.", - "Type_0_cannot_be_converted_to_type_1_2352": "O tipo '{0}' não pode ser convertido para o tipo '{1}'.", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "Tuple type '{0}' of length '{1}' has no element at index '{2}'.", + "Tuple_type_arguments_circularly_reference_themselves_4110": "Tuple type arguments circularly reference themselves.", "Type_0_cannot_be_used_as_an_index_type_2538": "O tipo '{0}' não pode ser usado como um tipo de índice.", "Type_0_cannot_be_used_to_index_type_1_2536": "O tipo '{0}' não pode ser usado para indexar o tipo '{1}'.", "Type_0_does_not_satisfy_the_constraint_1_2344": "O tipo '{0}' não satisfaz a restrição '{1}'.", + "Type_0_has_no_call_signatures_2757": "Type '{0}' has no call signatures.", + "Type_0_has_no_construct_signatures_2761": "Type '{0}' has no construct signatures.", "Type_0_has_no_matching_index_signature_for_type_1_2537": "O tipo '{0}' não tem assinatura de índice correspondente para o tipo '{1}'.", "Type_0_has_no_properties_in_common_with_type_1_2559": "O tipo '{0}' não tem propriedades em comum com o tipo '{1}'.", - "Type_0_has_no_property_1_2460": "O tipo '{0}' não tem nenhuma propriedade '{1}'.", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "O tipo '{0}' não tem nenhuma propriedade '{1}' e nenhuma assinatura de índice da cadeia de caracteres.", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "Type '{0}' is missing the following properties from type '{1}': {2}", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.", "Type_0_is_not_a_constructor_function_type_2507": "O tipo '{0}' não é um tipo de função de construtor.", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "O tipo '{0}' não é um tipo de retorno de função assíncrona válido no ES5/ES3, pois não se refere ao valor construtor compatível com a Promessa.", "Type_0_is_not_an_array_type_2461": "O tipo '{0}' não é um tipo de matriz.", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "O tipo '{0}' não é um tipo de matriz. Use a opção do compilador '--downlevelIteration' para permitir a iteração dos iteradores.", "Type_0_is_not_an_array_type_or_a_string_type_2495": "O tipo '{0}' não é um tipo de matriz ou de cadeia de caracteres.", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "O tipo '{0}' não é um tipo de matriz nem um tipo de cadeia de caracteres. Use a opção do compilador '--downlevelIteration' para permitir a iteração dos iteradores.", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "O tipo '{0}' não é um tipo de matriz de um tipo de cadeia ou não tem um método '[Symbol.iterator]()' que retorna um iterador.", @@ -926,17 +1162,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "O tipo '{0}' referencia recursivamente a si próprio como um tipo base.", "Type_alias_0_circularly_references_itself_2456": "O alias de tipo '{0}' referencia circulamente a si próprio.", "Type_alias_name_cannot_be_0_2457": "O nome do alias de tipo não pode ser '{0}'.", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "Type aliases can only be used in TypeScript files.", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "Uma anotação de tipo não pode aparecer em uma declaração de construtor.", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "Type annotations can only be used in TypeScript files.", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "O candidato de argumento de tipo '{1}' não é um argumento de tipo válido porque ele não é um supertipo do candidato '{0}'.", "Type_argument_expected_1140": "Argumento de tipo esperado.", "Type_argument_list_cannot_be_empty_1099": "A lista de argumentos de tipo não pode estar vazia.", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "Type arguments can only be used in TypeScript files.", "Type_arguments_cannot_be_used_here_1342": "Argumentos de tipo não podem ser usados aqui.", + "Type_arguments_for_0_circularly_reference_themselves_4109": "Type arguments for '{0}' circularly reference themselves.", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "Type assertion expressions can only be used in TypeScript files.", "Type_declaration_files_to_be_included_in_compilation_6124": "Arquivos de declaração de tipo a serem incluídos em compilação.", "Type_expected_1110": "Tipo esperado.", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "Type instantiation is excessively deep and possibly infinite.", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "O tipo é referenciado diretamente ou indiretamente em um retorno de chamada de preenchimento do seu próprio método 'then'.", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "O tipo de operando \"await\" deve ser uma promessa válida ou não deve conter um membro \"then\" que pode ser chamado.", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "Type of computed property's value is '{0}', which is not assignable to type '{1}'.", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "O tipo de elementos iterados de um operando \"yield*\" deve ser uma promessa válida ou não deve conter um membro \"then\" que pode ser chamado.", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "O tipo do operando \"yield\" em um gerador assíncrono deve ser uma promessa válida ou não deve conter um membro \"then\" que pode ser chamado.", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.", "Type_parameter_0_has_a_circular_constraint_2313": "O parâmetro de tipo '{0}' tem uma restrição circular.", "Type_parameter_0_has_a_circular_default_2716": "O parâmetro de tipo '{0}' tem um padrão circular.", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "O parâmetro de tipo '{0}' da assinatura de chamada da interface exportada tem ou está usando o nome particular '{1}'.", @@ -944,17 +1188,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "O parâmetro de tipo '{0}' da classe exportada tem ou está usando o nome particular '{1}'.", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "O parâmetro de tipo '{0}' da função exportada tem ou está usando o nome particular '{1}'.", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "O parâmetro de tipo '{0}' da interface exportada tem ou está usando o nome particular '{1}'.", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "Type parameter '{0}' of exported mapped object type is using private name '{1}'.", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "O parâmetro de tipo '{0}' do alias de tipo exportado tem ou está usando o nome privado '{1}'.", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "O parâmetro de tipo '{0}' do método da interface exportada tem ou está usando o nome particular '{1}'.", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "O parâmetro de tipo '{0}' do método público da classe exportada tem ou está usando o nome particular '{1}'.", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "O parâmetro de tipo '{0}' do método estático público da classe exportada tem ou está usando o nome particular '{1}'.", "Type_parameter_declaration_expected_1139": "Declaração de parâmetro de tipo esperada.", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "Type parameter declarations can only be used in TypeScript files.", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "Type parameter defaults can only reference previously declared type parameters.", "Type_parameter_list_cannot_be_empty_1098": "A lista de parâmetros de tipo não pode estar vazia.", "Type_parameter_name_cannot_be_0_2368": "O nome do parâmetro de tipo não pode ser '{0}'.", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "Os parâmetros de tipo não podem aparecer em uma declaração de construtor.", "Type_predicate_0_is_not_assignable_to_1_1226": "O predicado de tipo '{0}' não pode ser atribuído a '{1}'.", "Type_reference_directive_0_was_not_resolved_6120": "======== A diretiva de referência de tipo '{0}' não foi resolvida. ========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== A diretiva de referência de tipo '{0}' foi resolvida com sucesso para '{1}', primário: {2}. ========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========", "Types_have_separate_declarations_of_a_private_property_0_2442": "Tipos têm declarações separadas de uma propriedade privada '{0}'.", "Types_of_parameters_0_and_1_are_incompatible_2328": "Os tipos de parâmetros '{0}' e '{1}' são incompatíveis.", "Types_of_property_0_are_incompatible_2326": "Tipos de propriedade '{0}' são incompatíveis.", @@ -967,10 +1215,18 @@ "Unexpected_token_1012": "Token inesperado.", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "Token inesperado. Um construtor, método, acessador ou propriedade era esperado.", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "Token inesperado. Era esperado um nome de parâmetro de tipo sem chaves.", + "Unexpected_token_Did_you_mean_or_gt_1382": "Unexpected token. Did you mean `{'>'}` or `>`?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "Unexpected token. Did you mean `{'}'}` or `}`?", "Unexpected_token_expected_1179": "Token inesperado. '{' esperado.", + "Unknown_build_option_0_5072": "Unknown build option '{0}'.", + "Unknown_build_option_0_Did_you_mean_1_5077": "Unknown build option '{0}'. Did you mean '{1}'?", "Unknown_compiler_option_0_5023": "Opção do compilador '{0}' desconhecida.", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "Unknown compiler option '{0}'. Did you mean '{1}'?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "Opção desconhecida 'excludes'. Você quis dizer 'exclude'?", "Unknown_type_acquisition_option_0_17010": "Opção de aquisição de tipo desconhecido '{0}'.", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "Unknown type acquisition option '{0}'. Did you mean '{1}'?", + "Unknown_watch_option_0_5078": "Unknown watch option '{0}'.", + "Unknown_watch_option_0_Did_you_mean_1_5079": "Unknown watch option '{0}'. Did you mean '{1}'?", "Unreachable_code_detected_7027": "Código inacessível detectado.", "Unsupported_locale_0_6049": "Localidade '{0}' sem suporte.", "Unterminated_Unicode_escape_sequence_1199": "Sequência de escape Unicode não finalizada.", @@ -980,34 +1236,52 @@ "Unterminated_template_literal_1160": "Literal de modelo não finalizado.", "Untyped_function_calls_may_not_accept_type_arguments_2347": "Chamadas de função não tipadas não podem aceitar argumentos de tipo.", "Unused_label_7028": "Rótulo não utilizado.", + "Updating_output_of_project_0_6373": "Updating output of project '{0}'...", "Updating_output_timestamps_of_project_0_6359": "Atualizando os carimbos de data/hora de saída do projeto '{0}'...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "Updating unchanged output timestamps of project '{0}'...", "Use_synthetic_default_member_95016": "Use o membro sintético 'padrão'.", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "Há suporte para o uso de uma cadeia de caracteres em uma instrução 'for...of' somente no ECMAScript 5 e superior.", + "Using_compiler_options_of_project_reference_redirect_0_6215": "Using compiler options of project reference redirect '{0}'.", "VERSION_6036": "VERSÃO", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "O valor do tipo '{0}' não tem propriedades em comum com o tipo '{1}'. Você queria chamá-lo?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "O valor do tipo '{0}' não pode ser chamado. Você pretendia incluir 'new'?", "Variable_0_implicitly_has_an_1_type_7005": "A variável '{0}' implicitamente tem um tipo '{1}'.", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage.", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "A variável '{0}' tem implicitamente o tipo '{1}' em alguns locais onde o tipo não pode ser determinado.", "Variable_0_is_used_before_being_assigned_2454": "A variável '{0}' é usada antes de ser atribuída.", "Variable_declaration_expected_1134": "Declaração de variável esperada.", "Variable_declaration_list_cannot_be_empty_1123": "A lista de declaração de variável não pode estar vazia.", "Version_0_6029": "Versão {0}", "Watch_input_files_6005": "Observe os arquivos de entrada.", + "Watch_option_0_requires_a_value_of_type_1_5080": "Watch option '{0}' requires a value of type {1}.", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "Se é necessário manter a saída de console desatualizada no modo de inspeção, em vez de limpar a tela.", + "Wrap_invalid_character_in_an_expression_container_95101": "Wrap invalid character in an expression container", + "You_cannot_rename_a_module_via_a_global_import_8031": "You cannot rename a module via a global import.", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "Não é possível renomear elementos que são definidos na biblioteca TypeScript padrão.", "You_cannot_rename_this_element_8000": "Você não pode renomear este elemento.", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "'{0}' aceita muito poucos argumentos para serem usados como um decorador aqui. Você quis dizer para chamá-lo primeiro e gravar '@{0}()'?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "'{0}' and '{1}' operations cannot be mixed without parentheses.", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "'{0}' são especificados duas vezes. O atributo chamado '{0}' será substituído.", - "_0_can_only_be_used_in_a_ts_file_8009": "'{0}' só pode ser usado em um arquivo .ts.", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "'{0}' cannot be used as a value because it was exported using 'export type'.", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "'{0}' cannot be used as a value because it was imported using 'import type'.", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'.", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "'{0}' declarations can only be used in TypeScript files.", "_0_expected_1005": "'{0}' esperado.", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage.", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "Implicitamente, '{0}' tem um retorno tipo 'any' porque ele não tem uma anotação de tipo de retorno e é referenciado direta ou indiretamente em uma das suas expressões de retorno.", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "Implicitamente, '{0}' tem o tipo 'any' porque não tem uma anotação de tipo e é referenciado direta ou indiretamente em seu próprio inicializador.", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "'{0}' é um primitivo, mas '{1}' é um objeto de wrapper. Prefira usar '{0}' quando possível.", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'.", "_0_is_declared_but_its_value_is_never_read_6133": "'{0}' é declarado, mas seu valor nunca é lido.", "_0_is_declared_but_never_used_6196": "'{0}' está declarado, mas nunca foi usado.", + "_0_is_declared_here_2728": "'{0}' is declared here.", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor.", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property.", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}' não é uma metapropriedade para a palavra-chave '{1}'. Você quis dizer '{2}'?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' é referenciado direta ou indiretamente em sua própria expressão base.", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' é referenciado direta ou indiretamente em sua própria anotação de tipo.", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}' is specified more than once, so this usage will be overwritten.", "_0_list_cannot_be_empty_1097": "A lista '{0}' não pode estar vazia.", "_0_modifier_already_seen_1030": "O modificador '{0}' já foi visto.", "_0_modifier_cannot_appear_on_a_class_element_1031": "O modificador '{0}' não pode aparecer em um elemento de classe.", @@ -1021,17 +1295,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "O modificador '{0}' não pode ser usado em um contexto de ambiente.", "_0_modifier_cannot_be_used_with_1_modifier_1243": "O modificador '{0}' não pode ser usado com um modificador '{1}'.", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "O modificador '{0}' não pode ser usado com declarações de classes.", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "'{0}' modifier cannot be used with a private identifier", "_0_modifier_must_precede_1_modifier_1029": "O modificador '{0}' deve preceder o modificador '{1}'.", + "_0_needs_an_explicit_type_annotation_2782": "'{0}' needs an explicit type annotation.", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "'{0}' refere-se apenas a um tipo, mas está sendo usado como um namespace aqui.", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "'{0}' só faz referência a um tipo, mas está sendo usado como valor no momento.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "'{0}' refere-se a uma UMD global, mas o arquivo atual é um módulo. Considere adicionar uma importação.", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "'{0}' refers to a value, but is being used as a type here.", "_0_tag_already_specified_1223": "A marca '{0}' já foi especificada.", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "A marcação '{0}' não pode ser usada independentemente como uma marcação de JSDoc de nível superior.", + "_0_was_also_declared_here_6203": "'{0}' was also declared here.", + "_0_was_exported_here_1377": "'{0}' was exported here.", + "_0_was_imported_here_1376": "'{0}' was imported here.", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "'{0}', que não tem a anotação de tipo de retorno, implicitamente tem um tipo de retorno '{1}'.", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type.", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "O modificador 'abstract' pode aparecer somente em uma declaração de classe, método ou propriedade.", - "await_expression_is_only_allowed_within_an_async_function_1308": "A expressão 'await' só é permitida em funções assíncronas.", + "and_here_6204": "and here.", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "'await' expressions are only allowed within async functions and at the top levels of modules.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "As expressões 'await' não podem ser usadas em inicializadores de parâmetros.", + "await_has_no_effect_on_the_type_of_this_expression_80007": "'await' has no effect on the type of this expression.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "A opção 'baseUrl' é configurada para '{0}', usando este valor para resolver o nome de módulo não relativo '{1}'.", + "can_only_be_used_at_the_start_of_a_file_18026": "'#!' can only be used at the start of a file.", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "'=' só pode ser usado em uma propriedade literal de objeto dentro de uma atribuição de desestruturação.", "case_or_default_expected_1130": "'case' ou 'default' esperado.", "class_expressions_are_not_currently_supported_9003": "No momento, não há suporte para expressões 'class'.", @@ -1039,11 +1325,12 @@ "const_declarations_must_be_initialized_1155": "Declarações 'const' devem ser inicializadas.", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "O inicializador de membro de enumeração 'const' foi avaliado como um valor não finito.", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "O inicializador de membro de enumeração 'const' foi avaliado como o valor não permitido 'NaN'.", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "const enum member initializers can only contain literal values and other computed enum values.", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "Enumerações 'const' só podem ser usadas em expressões de acesso de índice ou propriedade, ou então do lado direito de uma consulta de tipo, declaração de importação ou atribuição de exportação.", + "constructor_is_a_reserved_word_18012": "'#constructor' is a reserved word.", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "'delete' não pode ser chamado em um identificador no modo estrito.", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "excluir isto – o Projeto '{0}' está atualizado porque ele já foi compilado", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "'enum declarations' só podem ser usadas em um arquivo .ts.", - "export_can_only_be_used_in_a_ts_file_8003": "'export=' só pode ser usado em um arquivo .ts.", + "export_can_only_be_used_in_TypeScript_files_8003": "'export =' can only be used in TypeScript files.", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "O modificador 'export' não pode ser aplicado a módulos de ambiente e acréscimos de módulo, pois eles estão sempre visíveis.", "extends_clause_already_seen_1172": "A cláusula 'extends' já foi vista.", "extends_clause_must_precede_implements_clause_1173": "A cláusula 'extends' deve preceder a cláusula 'implements'.", @@ -1053,23 +1340,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "os assessores 'set' e 'get' devem ter o mesmo tipo 'this'.", "get_and_set_accessor_must_have_the_same_type_2380": "Os acessadores 'get' e 'set' devem ser do mesmo tipo.", "implements_clause_already_seen_1175": "A cláusula 'implements' já foi vista.", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "'implements clauses' só podem ser usadas em um arquivo .ts.", - "import_can_only_be_used_in_a_ts_file_8002": "'import ... =' só pode ser usado em um arquivo .ts.", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "'implements' clauses can only be used in TypeScript files.", + "import_can_only_be_used_in_TypeScript_files_8002": "'import ... =' can only be used in TypeScript files.", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "As declarações 'infer' só são permitidas na cláusula 'extends' de um tipo condicional.", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "'interface declarations' só podem ser usadas em um arquivo .ts.", "let_declarations_can_only_be_declared_inside_a_block_1157": "Declarações 'let' só podem ser declaradas dentro de um bloco.", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "O uso de 'let' não é permitido como um nome em declarações 'let' ou 'const'.", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "'module declarations' só podem ser usadas em um arquivo .ts.", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "'new T[]' não pode ser usado para criar uma matriz. Use 'new Array()' em vez disso.", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "A expressão 'new', cujo destino não tem uma assinatura de constructo, implicitamente tem um tipo 'any'.", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "'non-null assertions' só podem ser usados em um arquivo .ts.", "options_6024": "opções", "or_expected_1144": "'{' ou ';' esperado.", "package_json_does_not_have_a_0_field_6100": "'package.json' não tem um campo '{0}'.", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "'package.json' does not have a 'typesVersions' entry that matches version '{0}'.", + "package_json_had_a_falsy_0_field_6220": "'package.json' had a falsy '{0}' field.", "package_json_has_0_field_1_that_references_2_6101": "'package.json' tem '{0}' campo '{1}' que faz referência a '{2}'.", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "'parameter modifiers' só podem ser usados em um arquivo .ts.", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range.", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'.", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "'package.json' has a 'typesVersions' field with version-specific path mappings.", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "A opção 'paths' é especificada, procurando por um padrão para corresponder ao nome do módulo '{0}'.", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "O modificador 'readonly' pode aparecer somente em uma declaração de propriedade ou assinatura de índice.", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "'readonly' type modifier is only permitted on array and tuple literal types.", "require_call_may_be_converted_to_an_import_80005": "A chamada 'require' pode ser convertida em uma importação.", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "A opção 'rootDirs' está configurada, usando-a para resolver o nome de módulo relativo '{0}'.", "super_can_only_be_referenced_in_a_derived_class_2335": "'super' só pode ser referenciado em uma classe derivada.", @@ -1077,6 +1365,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "'super' não pode ser referenciado em um nome de propriedade calculado.", "super_cannot_be_referenced_in_constructor_arguments_2336": "'super' não pode ser referenciado nos argumentos do construtor.", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "'super' é permitido somente em membros de expressões literais de objeto quando a opção 'target' é 'ES2015' ou maior.", + "super_may_not_use_type_arguments_2754": "'super' may not use type arguments.", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "'super' deve ser chamado antes de acessar uma propriedade de 'super' no construtor de uma classe derivada.", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "'super' deve ser chamado antes de acessar 'this' no construtor de uma classe derivada.", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "'super' deve ser seguido por um acesso de membro ou lista de argumentos.", @@ -1087,14 +1376,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "'this' não pode ser referenciado em argumentos de construtor.", "this_cannot_be_referenced_in_current_location_2332": "'this' não pode ser referenciado no local atual.", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "'this' implicitamente tem o tipo 'any' porque não tem uma anotação de tipo.", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "'type aliases' só podem ser usados em um arquivo .ts.", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "'type arguments' só podem ser usados em um arquivo .ts.", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "'type assertion expressions' só podem ser usadas em um arquivo .ts.", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "'type parameter declarations' só podem ser usadas em um arquivo .ts.", - "types_can_only_be_used_in_a_ts_file_8010": "'types' só podem ser usados em um arquivo .ts.", "unique_symbol_types_are_not_allowed_here_1335": "Tipos de 'unique symbol' não são permitidos aqui.", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "Tipos de 'unique symbol' são permitidos apenas em variáveis em uma declaração de variável.", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "Tipos de 'unique symbol' não podem ser usados em uma declaração de variável com um nome associado.", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "'use strict' directive cannot be used with non-simple parameter list.", + "use_strict_directive_used_here_1349": "'use strict' directive used here.", "with_statements_are_not_allowed_in_an_async_function_block_1300": "As declarações 'with' não são permitidas em blocos de funções assíncronas.", "with_statements_are_not_allowed_in_strict_mode_1101": "Instruções 'with' não são permitidas no modo estrito.", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "As expressões 'yield' não podem ser usadas em inicializadores de parâmetros." diff --git a/lib/ru/diagnosticMessages.generated.json b/lib/ru/diagnosticMessages.generated.json index f66fa953ac142..d340bc094e2f4 100644 --- a/lib/ru/diagnosticMessages.generated.json +++ b/lib/ru/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "Модификатор \"{0}\" не может быть использован с объявлением импорта.", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "Модификатор \"{0}\" не может быть использован с объявлением интерфейса.", "A_0_parameter_must_be_the_first_parameter_2680": "В качестве первого параметра необходимо указать \"{0}\".", + "A_bigint_literal_cannot_use_exponential_notation_1352": "A bigint literal cannot use exponential notation.", + "A_bigint_literal_must_be_an_integer_1353": "A bigint literal must be an integer.", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "Параметр шаблона привязки не может быть необязательным в сигнатуре реализации.", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "Оператор break можно использовать только во включающей итерации или операторе switch.", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "Оператор break может переходить только к метке внешнего оператора.", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "Класс может реализовать только идентификатор или полное имя с дополнительными аргументами типа.", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "A class can only implement an object type or intersection of object types with statically known members.", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "Объявление класса без модификатора \"default\" должно иметь имя.", "A_class_may_only_extend_another_class_2311": "Класс может расширять только другой класс.", - "A_class_may_only_implement_another_class_or_interface_2422": "Класс может реализовывать только другой класс или интерфейс.", "A_class_member_cannot_have_the_0_keyword_1248": "Элемент класса не может иметь ключевое слово \"{0}\".", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "Выражение с запятой запрещено в имени вычисляемого свойства.", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "Имя вычисляемого свойства не может ссылаться на параметр типа из содержащего его типа.", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "Имя вычисляемого свойства в интерфейсе должно ссылаться на выражение, тип которого — литерал или \"unique symbol\".", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "Имя вычисляемого свойства должно иметь тип string, number, symbol или any.", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "Имя вычисляемого свойства в форме \"{0}\" должно иметь тип symbol.", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals.", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "Доступ к элементу перечисления констант может осуществляться только с использованием строкового литерала.", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "Инициализатор const в окружающем контексте должен быть строковым или цифровым литералом.", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "Конструктор не может содержать вызов \"super\", если его класс расширяет \"null\".", "A_constructor_cannot_have_a_this_parameter_2681": "Конструктор не может иметь параметр this.", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "Оператор continue можно использовать только в операторе включающей итерации.", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "Оператор continue может переходить только к метке оператора включающей итерации.", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "Модификатор declare нельзя использовать в уже окружающем контексте.", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": "Модификатор declare необходим для объявления верхнего уровня в D.TS-файле.", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "Декоратор может только декорировать реализацию метода, а не перегрузку.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "Предложение default не может повторяться в операторе switch.", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "Экспорт по умолчанию можно использовать только в модуле в стиле ECMAScript.", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "Генератор не может иметь аннотацию типа void.", "A_get_accessor_cannot_have_parameters_1054": "Метод доступа get не может иметь параметров.", "A_get_accessor_must_return_a_value_2378": "Метод доступа get должен возвращать значение.", + "A_label_is_not_allowed_here_1344": "'A label is not allowed here.", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Инициализатор элемента в объявлении перечисления не может ссылаться на элементы, объявленные после него, включая элементы, определенные в других перечислениях.", + "A_method_cannot_be_named_with_a_private_identifier_18022": "A method cannot be named with a private identifier.", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Класс примеси должен иметь конструктор с одиночным параметром REST типа any[].", "A_module_cannot_have_multiple_default_exports_2528": "Модуль не может иметь несколько импортов по умолчанию.", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Объявление пространства имен и класс или функция, с которыми оно объединено, не могут находится в разных файлах.", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Объявление пространства имен не может располагаться раньше класса или функции, с которыми оно объединено.", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "Объявление пространства имен разрешено использовать только в пространстве имен или модуле.", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "Импорт стиля пространства имен не может быть вызван или создан и приведет к сбою во время выполнения.", "A_non_dry_build_would_build_project_0_6357": "При сборке без флага -dry будет собран проект \"{0}\"", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "При сборке без флага -dry будут удалены следующие файлы: {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "A non-dry build would update output of project '{0}'", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "A non-dry build would update timestamps for output of project '{0}'", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "Инициализатор параметра разрешено использовать только в реализации функции или конструктора.", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "Свойство параметра невозможно объявить с помощью параметра REST.", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "Свойство параметра допускается только в реализации конструктора.", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "Класс promise должен содержать метод then.", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "Свойство класса, тип которого — \"unique symbol\", должно быть задано как \"static\" и \"readonly\".", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "Свойство интерфейса или литерала, тип которого — \"unique symbol\", должно быть задано как \"readonly\".", + "A_required_element_cannot_follow_an_optional_element_1257": "A required element cannot follow an optional element.", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "Обязательный параметр не должен следовать за необязательным.", "A_rest_element_cannot_contain_a_binding_pattern_2501": "Элемент rest не может содержать шаблон привязки.", "A_rest_element_cannot_have_a_property_name_2566": "Элемент rest не может иметь имя свойства.", "A_rest_element_cannot_have_an_initializer_1186": "Элемент rest не может содержать инициализатор.", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "Элемент REST должен быть последним в шаблоне деструктуризации.", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "A rest element must be last in a tuple type.", + "A_rest_element_type_must_be_an_array_type_2574": "A rest element type must be an array type.", "A_rest_parameter_cannot_be_optional_1047": "Параметр rest не может быть необязательным.", "A_rest_parameter_cannot_have_an_initializer_1048": "Параметр rest не может иметь инициализатор.", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "Параметр rest должен стоять на последнем месте в списке параметров.", @@ -81,9 +89,9 @@ "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "Условие типа this несовместимо с условием типа на основе параметров.", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "Тип this доступен только в нестатическом элементе класса или интерфейса.", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "Файл tsconfig.json уже определен в \"{0}\".", - "A_tuple_type_element_list_cannot_be_empty_1122": "Список элементов типа кортежа не может быть пустым.", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "Выражение утверждения типа не допускается в левой части выражения, возводимого в степень. Попробуйте заключить выражение в скобки.", "A_type_literal_property_cannot_have_an_initializer_1247": "Свойство литерала типа не может иметь инициализатор.", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "A type-only import can specify a default import or named bindings, but not both.", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "Предикат типов не может ссылаться на параметр rest.", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "Предикат типов не может ссылаться на элемент \"{0}\" в шаблоне привязки.", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "Предикат типов разрешено использовать только в позиции типа возвращаемого значения для функций и методов.", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "Добавьте \"{0}\" в существующее объявление импорта из \"{1}\"", "Add_0_to_unresolved_variable_90008": "Добавить \"{0}.\" к неразрешенной переменной", "Add_all_missing_async_modifiers_95041": "Добавить все отсутствующие модификаторы \"async\"", + "Add_all_missing_imports_95064": "Add all missing imports", "Add_all_missing_members_95022": "Добавить все отсутствующие элементы", "Add_all_missing_super_calls_95039": "Добавить все отсутствующие вызовы super", "Add_async_modifier_to_containing_function_90029": "Добавьте модификатор async в содержащую функцию", + "Add_await_95083": "Add 'await'", + "Add_await_to_initializer_for_0_95084": "Add 'await' to initializer for '{0}'", + "Add_await_to_initializers_95089": "Add 'await' to initializers", "Add_braces_to_arrow_function_95059": "Добавить скобки в стрелочную функцию", + "Add_const_to_all_unresolved_variables_95082": "Add 'const' to all unresolved variables", + "Add_const_to_unresolved_variable_95081": "Add 'const' to unresolved variable", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "Add default import '{0}' to existing import declaration from \"{1}\"", "Add_definite_assignment_assertion_to_property_0_95020": "Добавить утверждение определенного назначения к свойству \"{0}\"", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "Добавить утверждения определенного назначения ко всем неинициализированным свойствам", + "Add_export_to_make_this_file_into_a_module_95097": "Add 'export {}' to make this file into a module", "Add_index_signature_for_property_0_90017": "Добавьте сигнатуру индекса для свойства \"{0}\"", "Add_initializer_to_property_0_95019": "Добавить инициализатор к свойству \"{0}\"", "Add_initializers_to_all_uninitialized_properties_95027": "Добавить инициализаторы ко всем неинициализированным свойствам", + "Add_missing_enum_member_0_95063": "Add missing enum member '{0}'", + "Add_missing_new_operator_to_all_calls_95072": "Add missing 'new' operator to all calls", + "Add_missing_new_operator_to_call_95071": "Add missing 'new' operator to call", "Add_missing_super_call_90001": "Добавьте отсутствующий вызов \"super()\"", "Add_missing_typeof_95052": "Добавить отсутствующий \"typeof\"", + "Add_names_to_all_parameters_without_names_95073": "Add names to all parameters without names", "Add_or_remove_braces_in_an_arrow_function_95058": "Добавить скобки в стрелочную функцию или удалить скобки из нее", + "Add_parameter_name_90034": "Add parameter name", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "Добавить квалификатор ко всем неразрешенным переменным, соответствующим имени члена", "Add_to_all_uncalled_decorators_95044": "Добавить \"()\" ко всем невызванным декораторам", "Add_ts_ignore_to_all_error_messages_95042": "Добавить \"@ts-ignore\" ко всем сообщениям об ошибках", "Add_undefined_type_to_all_uninitialized_properties_95029": "Добавить неопределенный тип ко всем неинициализированным свойствам", "Add_undefined_type_to_property_0_95018": "Добавить тип \"undefined\" к свойству \"{0}\"", + "Add_unknown_conversion_for_non_overlapping_types_95069": "Add 'unknown' conversion for non-overlapping types", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "Add 'unknown' to all conversions of non-overlapping types", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "Добавление файла tsconfig.json поможет организовать проекты, содержащие файлы TypeScript и JavaScript. Дополнительные сведения: https://aka.ms/tsconfig.", "Additional_Checks_6176": "Дополнительные проверки", "Advanced_Options_6178": "Дополнительные параметры", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "Все объявления \"{0}\" должны иметь одинаковые параметры типа.", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "Все объявления абстрактных методов должны быть последовательными.", "All_destructured_elements_are_unused_6198": "Все деструктурированные элементы не используются.", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "All files must be modules when the '--isolatedModules' flag is provided.", "All_imports_in_import_declaration_are_unused_6192": "Ни один из импортов в объявлении импорта не используется.", + "All_type_parameters_are_unused_6205": "All type parameters are unused", "All_variables_are_unused_6199": "Ни одна переменная не используется.", + "Allow_accessing_UMD_globals_from_modules_95076": "Allow accessing UMD globals from modules.", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "Разрешить импорт по умолчанию из модулей без экспорта по умолчанию. Это не повлияет на выведение кода — только на проверку типов.", "Allow_javascript_files_to_be_compiled_6102": "Разрешить компиляцию файлов javascript.", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "Перечисление внешних констант не разрешено, если задан флаг \"--isolatedModules\".", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "Already included file name '{0}' differs from file name '{1}' only in casing.", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "Объявление окружающего модуля не может содержать относительное имя модуля.", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "Внешний модуль не может быть вложен в другие модули или пространства имен.", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "Модуль AMD не может иметь несколько назначений имен.", "An_abstract_accessor_cannot_have_an_implementation_1318": "У абстрактного метода доступа не может быть реализации.", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "Метод доступа нельзя объявить в окружающем контексте.", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "An accessibility modifier cannot be used with a private identifier.", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "An accessor cannot be named with a private identifier.", "An_accessor_cannot_have_type_parameters_1094": "Метод доступа не может иметь параметры типа.", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "Объявление окружающего модуля разрешено использовать только в рамках верхнего уровня файла.", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "Арифметический операнд должен иметь тип any, number или тип перечисления.", + "An_argument_for_0_was_not_provided_6210": "An argument for '{0}' was not provided.", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "An argument matching this binding pattern was not provided.", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.", + "An_arrow_function_cannot_have_a_this_parameter_2730": "An arrow function cannot have a 'this' parameter.", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "Асинхронной функции или методу ES5/ES3 требуется конструктор Promise. Убедитесь, что имеется объявление для конструктора Promise или включите ES2015 в параметр \"--lib\".", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "Асинхронная функция или метод должны иметь допустимый тип возвращаемого значения, поддерживающий ожидание.", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "Асинхронная функция или метод должны вернуть Promise. Убедитесь, что у вас есть объявление для Promise или включите ES2015 в параметр --lib.", "An_async_iterator_must_have_a_next_method_2519": "В асинхронном итераторе должен быть метод next().", "An_element_access_expression_should_take_an_argument_1011": "Выражение доступа к элементу должно принимать аргумент.", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "An enum member cannot be named with a private identifier.", "An_enum_member_cannot_have_a_numeric_name_2452": "Имя элемента перечисления не может быть числовым.", + "An_enum_member_name_must_be_followed_by_a_or_1357": "An enum member name must be followed by a ',', '=', or '}'.", "An_export_assignment_can_only_be_used_in_a_module_1231": "Назначение экспорта может быть использовано только в модуле.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Назначение экспорта нельзя использовать в модуле с другими экспортированными элементами.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Назначение экспорта нельзя использовать в пространстве имен.", "An_export_assignment_cannot_have_modifiers_1120": "Назначение экспорта не может иметь модификаторы.", "An_export_declaration_can_only_be_used_in_a_module_1233": "Объявление экспорта может быть использовано только в модуле.", "An_export_declaration_cannot_have_modifiers_1193": "Объявление экспорта не может иметь модификаторы.", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "An expression of type 'void' cannot be tested for truthiness", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "Расширенное escape-значение в Юникоде должно быть в пределах от 0x0 до 0x10FFFF включительно.", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "An identifier or keyword cannot immediately follow a numeric literal.", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "Реализацию невозможно объявить в окружающих контекстах.", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "An import alias cannot reference a declaration that was exported using 'export type'.", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "An import alias cannot reference a declaration that was imported using 'import type'.", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "Объявление импорта может быть использовано только в пространстве имен или модуле.", "An_import_declaration_cannot_have_modifiers_1191": "Объявление импорта не может иметь модификаторы.", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "Путь импорта не может заканчиваться расширением \"{0}\". Попробуйте импортировать \"{1}\".", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "У параметра сигнатуры индекса должна быть аннотация типа.", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "Тип параметра сигнатуры индекса не может быть псевдонимом типа. Вместо этого рекомендуется написать \"[{0}: {1}]: {2}\".", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "Тип параметра сигнатуры индекса не может быть типом объединения. Рекомендуется использовать тип сопоставляемого объекта.", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "Параметр сигнатуры индекса должен иметь тип string или number.", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "An index signature parameter type must be either 'string' or 'number'.", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "Интерфейс может расширить только идентификатор или полное имя с дополнительными аргументами типа.", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "Интерфейс может расширять только класс или другой интерфейс.", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "An interface can only extend an object type or intersection of object types with statically known members.", "An_interface_property_cannot_have_an_initializer_1246": "Свойство интерфейса не может иметь инициализатор.", "An_iterator_must_have_a_next_method_2489": "Итератор должен иметь метод \"next()\".", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "Объектный литерал не может иметь несколько методов доступа get/set с одинаковым именем.", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "Объектный литерал не может иметь несколько свойств с одинаковым именем в строгом режиме.", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "Объектный литерал не может иметь свойство и метод доступа с одинаковым именем.", "An_object_member_cannot_be_declared_optional_1162": "Элемент объекта не может быть объявлен необязательным.", + "An_optional_chain_cannot_contain_private_identifiers_18030": "An optional chain cannot contain private identifiers.", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "An outer value of 'this' is shadowed by this container.", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "Сигнатура перегрузки не может быть объявлена в качестве генератора.", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "Унарное выражение с оператором \"{0}\" не допускается в левой части выражения, возводимого в степень. Попробуйте заключить выражение в скобки.", "Annotate_everything_with_types_from_JSDoc_95043": "Добавить заметки ко всем элементам с типами JSDoc", "Annotate_with_type_from_JSDoc_95009": "Заметка с типом из JSDoc", "Annotate_with_types_from_JSDoc_95010": "Заметки с типами из JSDoc", + "Another_export_default_is_here_2753": "Another export default is here.", + "Are_you_missing_a_semicolon_2734": "Are you missing a semicolon?", "Argument_expression_expected_1135": "Ожидалось выражение аргумента.", "Argument_for_0_option_must_be_Colon_1_6046": "Аргумент для параметра \"{0}\" должен быть {1}.", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "Аргумент типа \"{0}\" нельзя назначить параметру типа \"{1}\".", "Array_element_destructuring_pattern_expected_1181": "Ожидался шаблон деструктурирования элемента массива.", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "Assertions require every name in the call target to be declared with an explicit type annotation.", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "Assertions require the call target to be an identifier or qualified name.", "Asterisk_Slash_expected_1010": "Ожидалось \"*/\".", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "Улучшения для глобальной области могут быть вложены во внешние модули или неоднозначные объявления модулей только напрямую.", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "Улучшения для глобальной области не должны иметь модификатор declare, если они отображаются в окружающем контексте.", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "Автообнаружение для вводимых данных включено в проекте \"{0}\". Идет запуск дополнительного этапа разрешения для модуля \"{1}\" с использованием расположения кэша \"{2}\".", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "Выражения базового класса не могут ссылаться на параметры типа класса.", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "Тип возвращаемого значения конструктора базового класса \"{0}\" не является классом или типом интерфейса.", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members.", "Base_constructors_must_all_have_the_same_return_type_2510": "Конструкторы базового класса должны иметь одинаковые типы возвращаемых значений.", "Base_directory_to_resolve_non_absolute_module_names_6083": "Базовый каталог для разрешения неабсолютных имен модуля.", "Basic_Options_6172": "Базовые параметры", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "BigInt literals are not available when targeting lower than ES2020.", "Binary_digit_expected_1177": "Ожидался бит.", "Binding_element_0_implicitly_has_an_1_type_7031": "Элемент привязки \"{0}\" имеет неявный тип \"{1}\".", "Block_scoped_variable_0_used_before_its_declaration_2448": "Переменная \"{0}\" с областью видимости, ограниченной блоком, использована перед своим объявлением.", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "Собрать все проекты, включая не требующие обновления", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "Собрать один проект или несколько и их зависимости, если они не обновлены", + "Build_option_0_requires_a_value_of_type_1_5073": "Build option '{0}' requires a value of type {1}.", "Building_project_0_6358": "Сборка проекта \"{0}\"...", "Call_decorator_expression_90028": "Вызовите выражение декоратора", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "Call signature return types '{0}' and '{1}' are incompatible.", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "Сигнатура вызова, у которой нет аннотации типа возвращаемого значения, неявно имеет тип возвращаемого значения any.", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Call_target_does_not_contain_any_signatures_2346": "Объект вызова не содержит сигнатуры.", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "Не удается получить доступ к {0}.{1}, так как {0} является типом, но не является пространством имен. Вы хотели получить тип свойства {1} в {0} с использованием {0}[\"{1}\"]?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "Cannot access ambient const enums when the '--isolatedModules' flag is provided.", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "Не удается назначить тип конструктора \"{0}\" для типа конструктора \"{1}\".", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "Не удается назначить тип конструктора абстрактного класса для типа конструктора класса, не являющегося абстрактным.", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "Не удается задать значение для \"{0}\", так как это константа или свойство, доступное только для чтения.", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "Cannot assign to '{0}' because it is a constant.", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "Cannot assign to '{0}' because it is a read-only property.", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "Не удается задать значение для \"{0}\", так как это не переменная.", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "Не удается улучшить модуль \"{0}\", так как он разрешается в немодульную сущность.", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "Невозможно добавить экспорт значений в модуль \"{0}\", так как он разрешается в немодульную сущность.", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "Невозможно скомпилировать модули с использованием параметра \"{0}\", если флаг \"--module\" не имеет значения \"amd\" или \"system\".", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "Невозможно скомпилировать пространства имен, если задан флаг \"--isolatedModules\".", "Cannot_create_an_instance_of_an_abstract_class_2511": "Невозможно создать экземпляр абстрактного класса.", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'.", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "Не удается экспортировать \"{0}\". Только локальные объявления можно экспортировать из модуля.", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "Не удается расширить класс \"{0}\". Конструктор класса помечен как частный.", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "Не удается расширить интерфейс \"{0}\". Вы имели в виду \"реализует\"?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "Cannot find a tsconfig.json file at the current directory: {0}.", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "Не удается найти файл tsconfig.json в указанном каталоге: \"{0}\".", "Cannot_find_global_type_0_2318": "Не удается найти глобальный тип \"{0}\".", "Cannot_find_global_value_0_2468": "Не удается найти глобальное значение \"{0}\".", "Cannot_find_lib_definition_for_0_2726": "Не удается найти определение lib для \"{0}\".", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "Не удается найти определение lib для \"{0}\". Вы имели в виду \"{1}\"?", "Cannot_find_module_0_2307": "Не удается найти модуль \"{0}\".", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension", "Cannot_find_name_0_2304": "Не удается найти имя \"{0}\".", "Cannot_find_name_0_Did_you_mean_1_2552": "Не удается найти имя \"{0}\". Вы имели в виду \"{1}\"?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "Не удается найти имя \"{0}\". Возможно, вы имели в виду элемент экземпляра \"this.{0}\"?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "Не удается найти имя \"{0}\". Возможно, вы имели в виду статический элемент \"{1}.{0}\"?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery` and then add `jquery` to the types field in your tsconfig.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.", "Cannot_find_namespace_0_2503": "Не удается найти пространство имен \"{0}\".", "Cannot_find_parameter_0_1225": "Не удается найти параметр \"{0}\".", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "Не удается найти общий путь к подкаталогу для входных файлов.", "Cannot_find_type_definition_file_for_0_2688": "Не удается найти файл определения типа для \"{0}\".", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "Невозможно импортировать файлы объявления типа. Рекомендуется импортировать \"{0}\" вместо \"{1}\".", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "Невозможно инициализировать переменную \"{0}\" с внешней областью видимости в той же области видимости, что и объявление \"{1}\" с областью видимости \"Блок\".", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "Не удается вызвать выражение, в типе которого отсутствует сигнатура вызова. Тип \"{0}\" не содержит совместимые сигнатуры вызова.", "Cannot_invoke_an_object_which_is_possibly_null_2721": "Не удается вызвать объект, который может иметь значение \"NULL\".", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "Не удается вызвать объект, который может иметь значение \"NULL\" или \"undefined\".", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "Не удается вызвать объект, который может иметь значение \"undefined\".", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'.", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "Невозможно добавить проект \"{0}\" в начало, так как для него не задан outFile", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "Невозможно повторно экспортировать тип, если установлен флажок \"--isolatedModules\".", "Cannot_read_file_0_Colon_1_5012": "Не удается считать файл \"{0}\": {1}.", "Cannot_redeclare_block_scoped_variable_0_2451": "Невозможно повторно объявить переменную \"{0}\" с областью видимости \"Блок\".", "Cannot_redeclare_exported_variable_0_2323": "Не удается повторно объявить экспортированную переменную \"{0}\".", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "Невозможно повторно объявить идентификатор \"{0}\" в операторе catch.", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "Cannot update output of project '{0}' because there was error reading file '{1}'", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "Невозможно использовать JSX, если не задан флаг \"--jsx\".", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "Невозможно использовать директивы import, export или приращения модуля, если флаг \"--module\" имеет значение \"none\".", "Cannot_use_namespace_0_as_a_type_2709": "Невозможно использовать пространство имен \"{0}\" как тип.", "Cannot_use_namespace_0_as_a_value_2708": "Невозможно использовать пространство имен \"{0}\" как значение.", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "Невозможно использовать new с выражением, у типа которого нет сигнатуры вызова или конструктора.", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "Не удается записать файл \"{0}\", так как он будет перезаписан несколькими входными файлами.", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "Не удается записать файл \"{0}\", так как это привело бы к перезаписи входного файла.", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "Переменная оператора catch не может иметь аннотацию типа.", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "Идет проверка того, является ли \"{0}\" самым длинным соответствующим префиксом для \"{1}\" — \"{2}\".", "Circular_definition_of_import_alias_0_2303": "Циклическое определение псевдонима импорта \"{0}\".", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "Обнаружена цикличность при разрешении конфигурации: {0}", + "Circularity_originates_in_type_at_this_location_2751": "Circularity originates in type at this location.", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "Класс \"{0}\" определяет метод доступа — элемент экземпляра \"{1}\", а расширенный класс \"{2}\" определяет его как функцию — элемент экземпляра.", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "Класс \"{0}\" определяет функцию — элемент экземпляра \"{1}\", а расширенный класс \"{2}\" определяет ее как метод доступа — элемент экземпляра.", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "Класс \"{0}\" определяет функцию-элемент экземпляра \"{1}\", а расширенный класс \"{2}\" определяет ее как свойство-элемент экземпляра.", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "Класс \"{0}\" определяет свойство-элемент экземпляра \"{1}\", а расширенный класс \"{2}\" определяет его как функцию-элемент экземпляра.", "Class_0_incorrectly_extends_base_class_1_2415": "Класс \"{0}\" неправильно расширяет базовый класс \"{1}\".", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "Класс \"{0}\" неправильно реализует класс \"{1}\". Вы хотели расширить \"{1}\" и унаследовать его члены в виде подкласса?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "Статическая сторона класса \"{0}\" неправильно расширяет статическую сторону базового класса \"{1}\".", "Classes_can_only_extend_a_single_class_1174": "Классы могут расширить только один класс.", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "Классы, содержащие абстрактные методы, должны быть отмечены как абстрактные.", + "Classes_may_not_have_a_field_named_constructor_18006": "Classes may not have a field named 'constructor'.", "Command_line_Options_6171": "Параметры командной строки", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "Компиляция проекта по заданному пути к файлу конфигурации или папке с файлом tsconfig.json.", "Compiler_option_0_expects_an_argument_6044": "Параметр компилятора \"{0}\" ожидает аргумент.", "Compiler_option_0_requires_a_value_of_type_1_5024": "Параметр \"{0}\" компилятора требует значение типа {1}.", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "Compiler reserves name '{0}' when emitting private identifier downlevel.", "Composite_projects_may_not_disable_declaration_emit_6304": "Составные проекты не могут отключать выпуск объявления.", + "Composite_projects_may_not_disable_incremental_compilation_6379": "Composite projects may not disable incremental compilation.", "Computed_property_names_are_not_allowed_in_enums_1164": "Имена вычисляемых свойств запрещены в перечислениях.", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "Вычисленные значения запрещены в перечислении с членами, имеющими строковые значения.", "Concatenate_and_emit_output_to_single_file_6001": "Связать и вывести результаты в один файл.", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "Конфликтующие определения для \"{0}\" найдены в \"{1}\" и \"{2}\". Попробуйте установить конкретную версию этой библиотеки, чтобы устранить конфликт.", + "Conflicts_are_in_this_file_6201": "Conflicts are in this file.", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "Construct signature return types '{0}' and '{1}' are incompatible.", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "Сигнатура конструктора, у которой нет аннотации типа возвращаемого значения, неявно имеет тип возвращаемого значения any.", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", "Constructor_implementation_is_missing_2390": "Отсутствует реализация конструктора.", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "Конструктор класса \"{0}\" является частным и доступным только в объявлении класса.", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "Конструктор класса \"{0}\" защищен и доступен только в объявлении класса.", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "Конструкторы производных классов должны содержать вызов super.", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "Содержащий файл не указан, корневой каталог невозможно определить. Выполняется пропуск поиска в папке node_modules.", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.", "Convert_0_to_mapped_object_type_95055": "Преобразовать \"{0}\" в тип сопоставленного объекта", "Convert_all_constructor_functions_to_classes_95045": "Преобразовать все функции конструктора в классы", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "Convert all imports not used as a value to type-only imports", + "Convert_all_re_exported_types_to_type_only_exports_1365": "Convert all re-exported types to type-only exports", "Convert_all_require_to_import_95048": "Преобразовать все \"require\" в \"import\"", + "Convert_all_to_async_functions_95066": "Convert all to async functions", + "Convert_all_to_bigint_numeric_literals_95092": "Convert all to bigint numeric literals", "Convert_all_to_default_imports_95035": "Преобразовать все в импорт по умолчанию", + "Convert_const_to_let_95093": "Convert 'const' to 'let'", + "Convert_default_export_to_named_export_95061": "Convert default export to named export", "Convert_function_0_to_class_95002": "Преобразование функции \"{0}\" в класс", "Convert_function_to_an_ES2015_class_95001": "Преобразование функции в класс ES2015", + "Convert_invalid_character_to_its_html_entity_code_95100": "Convert invalid character to its html entity code", + "Convert_named_export_to_default_export_95062": "Convert named export to default export", "Convert_named_imports_to_namespace_import_95057": "Преобразовать операции импорта имен в импорт пространства имен", "Convert_namespace_import_to_named_imports_95056": "Преобразовать импорт пространства имен в операции импорта имен", + "Convert_parameters_to_destructured_object_95075": "Convert parameters to destructured object", "Convert_require_to_import_95047": "Преобразовать \"require\" в \"import\"", "Convert_to_ES6_module_95017": "Преобразовать в модуль ES6", + "Convert_to_a_bigint_numeric_literal_95091": "Convert to a bigint numeric literal", + "Convert_to_async_function_95065": "Convert to async function", "Convert_to_default_import_95013": "Преобразовать в импорт по умолчанию", + "Convert_to_template_string_95096": "Convert to template string", + "Convert_to_type_only_export_1364": "Convert to type-only export", + "Convert_to_type_only_import_1373": "Convert to type-only import", "Corrupted_locale_file_0_6051": "Поврежденный файл языкового стандарта \"{0}\".", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "Не удалось найти файл объявления модуля \"{0}\". \"{1}\" имеет неявный тип \"any\".", "Could_not_write_file_0_Colon_1_5033": "Не удалось записать файл \"{0}\": \"{1}\".", "DIRECTORY_6038": "КАТАЛОГ", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit.", "Declaration_expected_1146": "Ожидалось объявление.", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "Имя объявления конфликтует со встроенным глобальным идентификатором \"{0}\".", "Declaration_or_statement_expected_1128": "Ожидалось объявление или оператор.", + "Declare_a_private_field_named_0_90053": "Declare a private field named '{0}'.", "Declare_method_0_90023": "Объявите метод \"{0}\"", "Declare_property_0_90016": "Объявите свойство \"{0}\"", "Declare_static_method_0_90024": "Объявите статический метод \"{0}\"", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "Декораторы здесь недопустимы.", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "Декораторы нельзя применять к множественным методам доступа get или set с совпадающим именем.", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "Экспорт модуля по умолчанию использует или имеет закрытое имя \"{0}\".", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "Definite assignment assertions can only be used along with a type annotation.", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "Definitions of the following identifiers conflict with those in another file: {0}", "Delete_all_unused_declarations_95024": "Удалить все неиспользуемые объявления", "Delete_the_outputs_of_all_projects_6365": "Удалить выходные данные всех проектов", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[Устарело.] Используйте --jsxFactory. Укажите объект, вызываемый для createElement при целевом порождении JSX react", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[Устарело.] Используйте --outFile. Сцепление и порождение выходных данных в одном файле", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[Устарело.] Используйте --skipLibCheck. Пропуск проверки типов для файлов объявления библиотеки по умолчанию.", + "Did_you_forget_to_use_await_2773": "Did you forget to use 'await'?", + "Did_you_mean_0_1369": "Did you mean '{0}'?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?", + "Did_you_mean_to_call_this_expression_6212": "Did you mean to call this expression?", + "Did_you_mean_to_mark_this_function_as_async_1356": "Did you mean to mark this function as 'async'?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "Did you mean to parenthesize this function type?", + "Did_you_mean_to_use_new_with_this_expression_6213": "Did you mean to use 'new' with this expression?", "Digit_expected_1124": "Ожидалась цифра.", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "Каталога \"{0}\" не существует. Поиск в нем будет пропускаться.", "Disable_checking_for_this_file_90018": "Отключите проверку для этого файла", "Disable_size_limitations_on_JavaScript_projects_6162": "Отключение ограничений на размеры в проектах JavaScript.", + "Disable_solution_searching_for_this_project_6224": "Disable solution searching for this project.", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "Отключить строгую проверку универсальных сигнатур в типах функций.", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "Disable use of source files instead of declaration files from referenced projects.", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "Запретить ссылки с разным регистром, указывающие на один файл.", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "Не добавлять ссылки с тройной косой чертой или импортированные модули в список скомпилированных файлов.", "Do_not_emit_comments_to_output_6009": "Не создавать комментарии в выходных данных.", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "Не сообщать об ошибках в неиспользуемых метках.", "Do_not_resolve_the_real_path_of_symlinks_6013": "Не разрешать реальный путь symlink.", "Do_not_truncate_error_messages_6165": "Не усекать сообщения об ошибках.", - "Duplicate_declaration_0_2718": "Дублирующееся объявление \"{0}\".", "Duplicate_function_implementation_2393": "Повторяющаяся реализация функции.", "Duplicate_identifier_0_2300": "Повторяющийся идентификатор \"{0}\".", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "Повторяющийся идентификатор \"{0}\". Компилятор резервирует имя \"{1}\" в области верхнего уровня модуля.", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "Повторяющийся идентификатор \"_this\". Компилятор использует объявление переменной \"_this\" для получения ссылки this.", "Duplicate_label_0_1114": "Повторяющаяся метка \"{0}\".", "Duplicate_number_index_signature_2375": "Повторяющаяся сигнатура числового индекса.", + "Duplicate_property_0_2718": "Duplicate property '{0}'.", "Duplicate_string_index_signature_2374": "Повторяющаяся сигнатура строкового индекса.", "Dynamic_import_cannot_have_type_arguments_1326": "При динамическом импорте не могут использоваться аргументы типов", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "Динамический импорт поддерживается, только если флаг \"--module\" имеет значение \"commonjs\" или \"esNext\".", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "При динамическом импорте необходимо указать один описатель в качестве аргумента.", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Описатель динамического импорта должен иметь тип \"string\", но имеет тип \"{0}\".", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'esnext', 'commonjs', 'amd', 'system', or 'umd'.", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other.", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other.", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'.", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "Элемент неявно содержит тип any, так как выражение индекса не имеет тип number.", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "Элемент неявно имеет тип any, так как тип \"{0}\" не содержит сигнатуру индекса.", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "Порождать метку порядка байтов UTF-8 в начале выходных файлов.", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "Порождать один файл с сопоставлениями источников, а не создавать отдельный файл.", + "Emit_class_fields_with_Define_instead_of_Set_6222": "Emit class fields with Define instead of Set.", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "Порождать источник вместе с сопоставителями с исходным кодом в одном файле (нужно задать параметр --inlineSourceMap или --sourceMap).", "Enable_all_strict_type_checking_options_6180": "Включить все параметры строгой проверки типов.", + "Enable_incremental_compilation_6378": "Включить инкрементную компиляцию", "Enable_project_compilation_6302": "Включить компиляцию проекта", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "Enable strict 'bind', 'call', and 'apply' methods on functions.", "Enable_strict_checking_of_function_types_6186": "Включение строгой проверки типов функций.", "Enable_strict_checking_of_property_initialization_in_classes_6187": "Включение строгой проверки инициализации свойств в классах.", "Enable_strict_null_checks_6113": "Включить строгие проверки NULL.", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "Enable the 'experimentalDecorators' option in your configuration file", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "Enable the '--jsx' flag in your configuration file", "Enable_tracing_of_the_name_resolution_process_6085": "Включить трассировку процесса разрешения имен.", "Enable_verbose_logging_6366": "Включить подробное ведение журнала", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "Позволяет обеспечивать взаимодействие между модулями CommonJS и ES посредством создания объектов пространства имен для всех импортов. Подразумевает \"allowSyntheticDefaultImports\".", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "Ожидался элемент перечисления.", "Enum_member_must_have_initializer_1061": "У элемента перечисления должен быть инициализатор.", "Enum_name_cannot_be_0_2431": "Имя перечисления не может иметь значение \"{0}\".", + "Enum_type_0_circularly_references_itself_2586": "Enum type '{0}' circularly references itself.", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "Тип перечисления \"{0}\" имеет элементы с инициализаторами, которые не являются литералами.", "Examples_Colon_0_6026": "Примеры: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "Чрезмерная глубина стека при сравнении типов \"{0}\" и \"{1}\".", @@ -385,7 +490,7 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "Ожидалось аргументов не меньше: {0}, получено: {1} или больше.", "Expected_corresponding_JSX_closing_tag_for_0_17002": "Ожидался соответствующий закрывающий тег JSX для \"{0}\".", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "Ожидался соответствующий закрывающий тег фрагмента JSX.", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "Ожидаемый тип поля \"{0}\" в package.json должен быть string, получен \"{1}\".", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'.", "Experimental_Options_6177": "Экспериментальные параметры", "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "Экспериментальная поддержка для декораторов — это функция, которая будет изменена в будущем выпуске. Задайте параметр experimentalDecorators, чтобы удалить это предупреждение.", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "Явно указанный тип разрешения модуля: \"{0}\".", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "Экспорт и назначения экспорта не разрешены в улучшениях модуля.", "Expression_expected_1109": "Ожидалось выражение.", "Expression_or_comma_expected_1137": "Ожидалось выражение или запятая.", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "Expression produces a union type that is too complex to represent.", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "Разрешение выражения дает идентификатор \"_super\", который используется компилятором для получения ссылки на базовый класс.", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "Разрешение выражения дает объявление переменной \"{0}\", которое используется компилятором для поддержки асинхронных функций.", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "Выражение разрешается в объявление переменной \"_newTarget\", которое компилятор использует для получения ссылки на метасвойство \"new.target\".", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "Извлечь в {0} в {1}", "Extract_to_0_in_1_scope_95008": "Извлечь в {0} в области {1}", "Extract_to_0_in_enclosing_scope_95007": "Извлечь в {0} во включающей области", + "Extract_to_interface_95090": "Extract to interface", + "Extract_to_type_alias_95078": "Extract to type alias", + "Extract_to_typedef_95079": "Extract to typedef", + "Extract_type_95077": "Extract type", "FILE_6035": "ФАЙЛ", "FILE_OR_DIRECTORY_6040": "Файл или каталог", "Failed_to_parse_file_0_Colon_1_5014": "Не удалось проанализировать файл \"{0}\": {1}.", "Fallthrough_case_in_switch_7029": "Случай передачи управления в операторе switch.", "File_0_does_not_exist_6096": "Файл \"{0}\" не существует.", "File_0_exist_use_it_as_a_name_resolution_result_6097": "Файл \"{0}\" существует — используйте его как результат разрешения имени.", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "File '{0}' has an unsupported extension. The only supported extensions are {1}.", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "Файл \"{0}\" имеет неподдерживаемое разрешение, поэтому будет пропущен.", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "Файл \"{0}\" имеет неподдерживаемое расширение. Поддерживаются только следующие расширения: {1}.", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?", "File_0_is_not_a_module_2306": "Файл \"{0}\" не является модулем.", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "Файл \"{0}\" отсутствует в списке файлов проекта. Проекты должны перечислять все файлы или использовать шаблон включения.", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern.", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "Файл \"{0}\" отсутствует в \"rootDir\" \"{1}\". Все исходные файлы должны находиться в каталоге \"rootDir\".", "File_0_not_found_6053": "Файл \"{0}\" не найден.", "File_change_detected_Starting_incremental_compilation_6032": "Обнаружено изменение в файле. Запускается инкрементная компиляция...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "Спецификация файла не может содержать родительский каталог (\"..\"), который указывается после рекурсивного подстановочного знака каталога (\"**\"): \"{0}\".", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "Спецификация файла не может заканчиваться рекурсивным подстановочным знаком каталога (\"**\"): \"{0}\".", "Fix_all_detected_spelling_errors_95026": "Исправить все обнаруженные синтаксические ошибки", + "Fix_all_expressions_possibly_missing_await_95085": "Fix all expressions possibly missing 'await'", + "Found_0_errors_6217": "Найдено ошибок: {0}.", "Found_0_errors_Watching_for_file_changes_6194": "Найдено ошибок: {0}. Отслеживаются изменения в файлах.", + "Found_1_error_6216": "Найдено ошибок: 1.", "Found_1_error_Watching_for_file_changes_6193": "Найдена одна ошибка. Отслеживаются изменения в файлах.", "Found_package_json_at_0_6099": "Обнаружен package.json в \"{0}\".", - "Found_package_json_at_0_Package_ID_is_1_6190": "Найден \"package.json\" в \"{0}\". Идентификатор пакета: \"{1}\".", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "Объявления функций не разрешены в блоках в строгом режиме при нацеливании ES3 или ES5.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "Объявления функций не разрешены в блоках в строгом режиме при нацеливании ES3 или ES5. Определения класса автоматически появляются в строгом режиме.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "Объявления функций не разрешены в блоках в строгом режиме при нацеливании ES3 или ES5. Модули автоматически появляются в строгом режиме.", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "В функции отсутствует завершающий оператор return, а тип возвращаемого значения не включает \"undefined\".", "Function_overload_must_be_static_2387": "Перегрузка функции должна быть статической.", "Function_overload_must_not_be_static_2388": "Перегрузка функции не должна быть статической.", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "Function type, which lacks return-type annotation, implicitly has an '{0}' return type.", "Generate_get_and_set_accessors_95046": "Создать методы доступа get и set", + "Generates_a_CPU_profile_6223": "Generates a CPU profile.", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "Создает сопоставитель с исходным кодом для каждого соответствующего файла \".d.ts\".", "Generates_corresponding_d_ts_file_6002": "Создает соответствующий D.TS-файл.", "Generates_corresponding_map_file_6043": "Создает соответствующий файл с расширением \".map\".", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "Генератор неявно имеет тип \"{0}\", поскольку он не предоставляет никаких значений. Рекомендуется указать тип возвращаемого значения.", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation.", "Generators_are_not_allowed_in_an_ambient_context_1221": "Генераторы не разрешается использовать в окружающем контексте.", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "Генераторы доступны только при разработке для ECMAScript 2015 или более поздних версий.", "Generic_type_0_requires_1_type_argument_s_2314": "Универсальный тип \"{0}\" требует следующее число аргументов типа: {1}.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "Универсальный тип \"{0}\" требует аргументы типа от {1} до {2}.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "Создание экземпляров универсального типа слишком глубокое и, возможно, бесконечное.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Методы доступа get и set не согласуются с точки зрения видимости.", "Global_module_exports_may_only_appear_at_top_level_1316": "Глобальные операции экспорта модуля могут появиться только на верхнем уровне.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "Глобальные операции экспорта модуля могут появиться только в файлах объявления.", "Global_module_exports_may_only_appear_in_module_files_1314": "Глобальные операции экспорта модуля могут появиться только в файлах модуля.", "Global_type_0_must_be_a_class_or_interface_type_2316": "Глобальный тип \"{0}\" должен быть классом или интерфейсом.", "Global_type_0_must_have_1_type_parameter_s_2317": "Глобальный тип \"{0}\" должен иметь следующее число параметров типа: {1}.", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.", "Hexadecimal_digit_expected_1125": "Ожидалась шестнадцатеричная цифра.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "Ожидался идентификатор. \"{0}\" является зарезервированным словом в строгом режиме.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "Ожидался идентификатор. \"{0}\" является зарезервированным словом в строгом режиме. Определения классов автоматически находятся в строгом режиме.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "Ожидался идентификатор. \"{0}\" является зарезервированным словом в строгом режиме. Модули автоматически находятся в строгом режиме.", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "Identifier expected. '{0}' is a reserved word that cannot be used here.", "Identifier_expected_1003": "Ожидался идентификатор.", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "Ожидался идентификатор. Значение \"__esModule\" зарезервировано как экспортируемый маркер при преобразовании модулей ECMAScript.", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`", "Ignore_this_error_message_90019": "Пропустите это сообщение об ошибке", "Implement_all_inherited_abstract_classes_95040": "Реализовать все унаследованные абстрактные классы", "Implement_all_unimplemented_interfaces_95032": "Реализовать все нереализованные интерфейсы", "Implement_inherited_abstract_class_90007": "Реализуйте наследуемый абстрактный класс", "Implement_interface_0_90006": "Реализуйте интерфейс \"{0}\"", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "Предложение Implements экспортированного класса \"{0}\" имеет или использует закрытое имя \"{1}\".", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.", "Import_0_from_module_1_90013": "Импортируйте \"{0}\" из модуля \"{1}\"", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "Назначение импорта невозможно использовать при разработке для модулей ECMAScript. Попробуйте использовать \"import * as ns from \"mod\", \"import {a} from \"mod\", \"import d from \"mod\" или другой формат модуля.", "Import_declaration_0_is_using_private_name_1_4000": "Объявление импорта \"{0}\" использует закрытое имя \"{1}\".", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "Объявление импорта конфликтует с локальным объявлением \"{0}\".", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "Объявления импорта в пространстве имен не могут иметь ссылки на модуль.", + "Import_default_0_from_module_1_90032": "Import default '{0}' from module \"{1}\"", "Import_emit_helpers_from_tslib_6139": "Импорт вспомогательных объектов, участвующих в порождении, из \"tslib\".", "Import_may_be_converted_to_a_default_import_80003": "Импорт можно преобразовать в импорт по умолчанию.", "Import_name_cannot_be_0_2438": "Имя импорта не может иметь значение \"{0}\".", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "Операции импорта запрещены в улучшениях модуля. Попробуйте переместить их в содержащий внешний модуль.", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "Во внешних объявлениях перечислений инициализатор элемента должен быть константным выражением.", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "В перечислении с несколькими объявлениями только одно объявление может опустить инициализатор для своего первого элемента перечисления.", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "В инициализаторе элементов объявлений перечисления const должно быть константным выражением.", "Include_modules_imported_with_json_extension_6197": "Включать модули, импортированные с расширением .json", "Index_signature_in_type_0_only_permits_reading_2542": "Сигнатура индекса в типе \"{0}\" разрешает только чтение.", "Index_signature_is_missing_in_type_0_2329": "В типе \"{0}\" отсутствует сигнатура индекса.", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "Все отдельные объявления в объединенном объявлении \"{0}\" должны быть экспортированными или локальными.", "Infer_all_types_from_usage_95023": "Вывести все типы исходя из использования", "Infer_parameter_types_from_usage_95012": "Выведите типы параметров на основании их использования", + "Infer_this_type_of_0_from_usage_95080": "Infer 'this' type of '{0}' from usage", "Infer_type_of_0_from_usage_95011": "Выведите тип \"{0}\" на основании его использования", "Initialize_property_0_in_the_constructor_90020": "Инициализируйте свойство \"{0}\" в конструкторе", "Initialize_static_property_0_90021": "Инициализируйте статическое свойство \"{0}\"", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "JSDoc \"...\" может использоваться только в последнем параметре сигнатуры.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "У тега \"@param\" JSDoc есть имя \"{0}\", но параметр с таким именем отсутствует.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "Тег \"@param\" JSDoc имеет имя \"{0}\", но параметра с таким именем не существует. Он совпадал бы с \"arguments\", если бы у него был указан тип массива.", + "JSDoc_type_0_circularly_references_itself_2587": "JSDoc type '{0}' circularly references itself.", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "У тега \"@typedef\" JSDoc должна быть аннотация типа, или после него должны стоять теги \"@property\" или \"@member\".", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "Типы JSDoc можно использовать только в комментариях в документации.", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "Типы JSDoc могут быть преобразованы в типы TypeScript.", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "Тип элемента JSX \"{0}\" не имеет конструкций или сигнатур вызова.", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "Тип элемента JSX \"{0}\" не является функцией конструктора для элементов JSX.", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "Элементы JSX не могут иметь несколько атрибутов с одним именем.", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "JSX expressions may not use the comma operator. Did you mean to write an array?", "JSX_expressions_must_have_one_parent_element_2657": "Выражения JSX должны иметь один родительский элемент.", "JSX_fragment_has_no_corresponding_closing_tag_17014": "Фрагмент JSX не имеет соответствующего закрывающего тега.", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "Фрагмент JSX не поддерживается при использовании встроенной директивы pragma фабрики JSX.", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "Дочерний объект расширения JSX должен иметь тип массива.", "Jump_target_cannot_cross_function_boundary_1107": "Целевой объект перехода не может находиться за границей функции.", "KIND_6034": "ВИД", + "Keywords_cannot_contain_escape_characters_1260": "Keywords cannot contain escape characters.", "LOCATION_6037": "РАСПОЛОЖЕНИЕ", "Language_service_is_disabled_9004": "Языковая служба отключена.", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "Сторона оператора слева от запятой не используется и не имеет побочных эффектов.", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "Сделайте вызов \"super()\" первой инструкцией в конструкторе", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "Сопоставленный объект неявно имеет тип шаблона \"любой\".", "Member_0_implicitly_has_an_1_type_7008": "Элемент \"{0}\" неявно имеет тип \"{1}\".", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Merge_conflict_marker_encountered_1185": "Встретилась отметка о конфликте слияния.", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "Объединенное объявление \"{0}\" не может включать объявление экспорта по умолчанию. Рекомендуется добавить вместо него отдельное объявление \"export default {0}\".", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "Метасвойство \"{0}\" разрешено только в тексте объявления функции, выражения функции или конструктора.", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "Метод \"{0}\" экспортированного интерфейса имеет или использует имя \"{1}\" из закрытого модуля \"{2}\".", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "Метод \"{0}\" экспортированного интерфейса имеет или использует закрытое имя \"{1}\".", "Modifiers_cannot_appear_here_1184": "Здесь невозможно использовать модификаторы.", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "Модуль \"{0}\" не ссылается на тип, но используется здесь как тип.", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "Module '{0}' can only be default-imported using the '{1}' flag", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "Module '{0}' declares '{1}' locally, but it is exported as '{2}'.", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "Module '{0}' declares '{1}' locally, but it is not exported.", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "Модуль \"{0}\" не ссылается на значение, но используется здесь как значение.", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "Модуль {0} уже экспортировал элемент с именем \"{1}\". Попробуйте явно повторно экспортировать его, чтобы устранить неоднозначность.", "Module_0_has_no_default_export_1192": "У модуля \"{0}\" нет экспорта по умолчанию.", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?", "Module_0_has_no_exported_member_1_2305": "Модуль \"{0}\" не имеет экспортированного элемента \"{1}\".", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "В модуле \"{0}\" нет экспортированного элемента \"{1}\". Вы имели в виду \"{2}\"?", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "Модуль \"{0}\" скрыт локальным объявлением с таким же именем.", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "Модуль \"{0}\" разрешается в немодульную сущность и не может быть импортирован с помощью этой конструкции.", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "Модуль \"{0}\" использует параметр \"export =\" и не может использоваться с параметром \"export *\".", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "Модуль \"{0}\" был разрешен в окружающий модуль, объявленный в \"{1}\", так как этот файл не был изменен.", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "Модуль \"{0}\" был разрешен как локально объявленный окружающий модуль в файле \"{1}\".", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "Модуль \"{0}\" был разрешен как \"{1}\", но параметр \"--jsx\" не задан.", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used.", "Module_Resolution_Options_6174": "Параметры разрешения модулей", "Module_name_0_matched_pattern_1_6092": "Имя модуля \"{0}\", соответствующий шаблон \"{1}\".", "Module_name_0_was_not_resolved_6090": "======== Имя модуля \"{0}\" не было разрешено. ========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== Имя модуля \"{0}\" было успешно разрешено в \"{1}\". ========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========", "Module_resolution_kind_is_not_specified_using_0_6088": "Тип разрешения модуля не указан, используется \"{0}\".", "Module_resolution_using_rootDirs_has_failed_6111": "Произошел сбой при разрешении модуля с помощью \"rootDirs\".", "Move_to_a_new_file_95049": "Переместить в новый файл", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "Именованное свойство \"{0}\" содержит типы \"{1}\" и \"{2}\", которые не являются идентичными.", "Namespace_0_has_no_exported_member_1_2694": "Пространство имен \"{0}\" не содержит экспортированный элемент \"{1}\".", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "Ни один конструктор базового класса не имеет указанного числа аргументов типа.", + "No_constituent_of_type_0_is_callable_2755": "No constituent of type '{0}' is callable.", + "No_constituent_of_type_0_is_constructable_2759": "No constituent of type '{0}' is constructable.", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "No index signature with a parameter of type '{0}' was found on type '{1}'.", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "Не удалось найти входные данные в файле конфигурации \"{0}\". Указанные пути \"include\": \"{1}\", пути \"exclude\": \"{2}\".", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments.", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments.", + "No_overload_matches_this_call_2769": "No overload matches this call.", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "Класс \"{0}\", не являющийся абстрактным, не реализует наследуемый абстрактный элемент \"{1}\" класса \"{2}\".", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "Выражение неабстрактного класса не реализует унаследованный абстрактный элемент \"{0}\" класса \"{1}\".", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "Non-null assertions can only be used in TypeScript files.", + "Non_simple_parameter_declared_here_1348": "Non-simple parameter declared here.", "Not_all_code_paths_return_a_value_7030": "Не все пути к коду возвращают значение.", + "Not_all_constituents_of_type_0_are_callable_2756": "Not all constituents of type '{0}' are callable.", + "Not_all_constituents_of_type_0_are_constructable_2760": "Not all constituents of type '{0}' are constructable.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "Тип числового индекса \"{0}\" нельзя назначить типу строкового индекса \"{1}\".", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers.", "Numeric_separators_are_not_allowed_here_6188": "Числовые разделители здесь запрещены.", "Object_is_of_type_unknown_2571": "Объект имеет тип \"Неизвестный\".", "Object_is_possibly_null_2531": "Возможно, объект равен null.", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "Восьмеричные литералы запрещены в инициализаторах членов перечисления. Используйте синтаксис \"{0}\".", "Octal_literals_are_not_allowed_in_strict_mode_1121": "Восьмеричные литералы запрещено использовать в строгом режиме.", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "Восьмеричные литералы недоступны при выборе целевой платформы ECMAScript 5 и более поздних. Используйте синтаксис \"{0}\".", + "Only_ECMAScript_imports_may_use_import_type_1370": "Only ECMAScript imports may use 'import type'.", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "В операторе for...in разрешено только одно объявление переменной.", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "В операторе for...of разрешено только одно объявление переменной.", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "С помощью ключевого слова new можно вызвать только функцию void.", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "Порождаются только файлы объявлений \".d.ts\".", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "В предложениях extends класса сейчас поддерживаются только идентификаторы или полные имена с необязательными аргументами типа.", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "Через ключевое слово super доступны только общие и защищенные методы базового класса.", + "Operator_0_cannot_be_applied_to_type_1_2736": "Operator '{0}' cannot be applied to type '{1}'.", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "Оператор \"{0}\" невозможно применить к типам \"{1}\" и \"{2}\".", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "Параметр \"{0}\" можно указать только в файле tsconfig.json.", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "Параметр \"{0}\" можно использовать только при указании \"--inlineSourceMap\" или \"--sourceMap\".", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "Option '{0}' cannot be specified when option 'target' is 'ES3'.", "Option_0_cannot_be_specified_with_option_1_5053": "Параметр \"{0}\" невозможно указать с помощью параметра \"{1}\".", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "Параметр \"{0}\" невозможно указать без указания параметра \"{1}\".", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "Параметр \"{0}\" нельзя указывать без указания параметра \"{1}\" или \"{2}\".", "Option_0_should_have_array_of_strings_as_a_value_6103": "Параметр \"{0}\" должен иметь массив строк в качестве значения.", "Option_build_must_be_the_first_command_line_argument_6369": "Параметр \"--build\" должен быть первым аргументом командной строки.", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified.", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "Параметр isolatedModules можно использовать, только если указан параметр --module или если параметр target — ES2015 или выше.", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "Параметр paths невозможно использовать без указания параметра \"--baseUrl\".", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "Параметр project не может быть указан вместе с исходными файлами в командной строке.", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'.", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "Параметр \"--resolveJsonModule\" нельзя указать без стратегии разрешения модуля node.", "Options_0_and_1_cannot_be_combined_6370": "Параметры \"{0}\" и \"{1}\" не могут использоваться одновременно.", "Options_Colon_6027": "Параметры:", "Output_directory_for_generated_declaration_files_6166": "Выходной каталог для создаваемых файлов объявления.", "Output_file_0_from_project_1_does_not_exist_6309": "Выходной файл \"{0}\" из проекта \"{1}\" не существует", "Output_file_0_has_not_been_built_from_source_file_1_6305": "Выходной файл \"{0}\" не создан из исходного файла \"{1}\".", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "Сигнатура перегрузки несовместима с реализацией функции.", + "Overload_0_of_1_2_gave_the_following_error_2772": "Overload {0} of {1}, '{2}', gave the following error.", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "Сигнатуры перегрузки должны быть абстрактными или неабстрактными.", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "Все сигнатуры перегрузки должны быть либо внешними, либо не внешними.", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "Сигнатуры перегрузки должны быть экспортированы и не экспортированы.", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "Все сигнатуры перегрузки должны быть либо общими, либо закрытыми, либо защищенными.", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "На параметр \"{0}\" невозможно ссылаться в его инициализаторе.", "Parameter_0_implicitly_has_an_1_type_7006": "Параметр \"{0}\" неявно имеет тип \"{1}\".", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "Параметр \"{0}\" находится в позиции, отличной от позиции параметра \"{1}\".", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "Parameter '{0}' of accessor has or is using private name '{1}'.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "Параметр \"{0}\" сигнатуры вызова из экспортированного интерфейса имеет или использует имя \"{1}\" из закрытого модуля \"{2}\".", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "Параметр \"{0}\" сигнатуры вызова из экспортированного интерфейса имеет или использует закрытое имя \"{1}\".", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "Параметр \"{0}\" конструктора из экспортированного класса имеет или использует имя \"{1}\" из внешнего модуля {2}, но не может быть именован.", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "Параметр \"{0}\" общего статического метода из экспортированного класса имеет или использует закрытое имя \"{1}\".", "Parameter_cannot_have_question_mark_and_initializer_1015": "Параметр не может содержать вопросительный знак и инициализатор.", "Parameter_declaration_expected_1138": "Ожидалось объявление параметра.", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "Parameter has a name but no type. Did you mean '{0}: {1}'?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "Parameter modifiers can only be used in TypeScript files.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "Тип параметра открытого метода задания \"{0}\" из экспортированного класса имеет или использует имя \"{1}\" из закрытого модуля \"{2}\".", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "Тип параметра открытого метода задания \"{0}\" из экспортированного класса имеет или использует закрытое имя \"{1}\".", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "Тип параметра открытого статического метода задания \"{0}\" из экспортированного класса имеет или использует имя \"{1}\" из закрытого модуля \"{2}\".", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "Анализ в строгом режиме и создание директивы \"use strict\" для каждого исходного файла.", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "Шаблон \"{0}\" может содержать не больше одного символа \"*\".", "Prefix_0_with_an_underscore_90025": "Добавьте к \"{0}\" префикс — символ подчеркивания", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "Prefix all incorrect property declarations with 'declare'", "Prefix_all_unused_declarations_with_where_possible_95025": "Добавить префикс \"_\" ко всем неиспользуемым объявлениям, где это возможно", + "Prefix_with_declare_95094": "Prefix with 'declare'", "Print_names_of_files_part_of_the_compilation_6155": "Печатать имена файлов, входящих в компиляцию.", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "Print names of files that are part of the compilation and then stop processing.", "Print_names_of_generated_files_part_of_the_compilation_6154": "Печатать имена создаваемых файлов, входящих в компиляцию.", "Print_the_compiler_s_version_6019": "Печать версии компилятора.", + "Print_the_final_configuration_instead_of_building_1350": "Print the final configuration instead of building.", "Print_this_message_6017": "Напечатайте это сообщение.", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "Private identifiers are not allowed in variable declarations.", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "Private identifiers are not allowed outside class bodies.", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "Private identifiers are only available when targeting ECMAScript 2015 and higher.", + "Private_identifiers_cannot_be_used_as_parameters_18009": "Private identifiers cannot be used as parameters", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "Private or protected member '{0}' cannot be accessed on a type parameter.", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "Не удается собрать проект \"{0}\", так как его зависимость \"{1}\" содержит ошибки", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "Project '{0}' can't be built because its dependency '{1}' was not built", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "Проект \"{0}\" требует обновления, так как не обновлена его зависимость \"{1}\"", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "Проект \"{0}\" требует обновления, так как самые старые выходные данные \"{1}\" старше самых новых входных данных \"{2}\"", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "Проект \"{0}\" требует обновления, так как выходного файла \"{1}\" не существует", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "Project '{0}' is out of date because output of its dependency '{1}' has changed", "Project_0_is_up_to_date_6361": "Проект \"{0}\" не требует обновления", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "Проект \"{0}\" не требует обновления, так как самые новые входные данные \"{1}\" старее самых старых выходных данных \"{2}\"", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "Проект \"{0}\" не требует обновления с файлами .d.ts, взятыми из зависимостей проекта", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "Проекты для ссылки", "Property_0_does_not_exist_on_const_enum_1_2479": "Свойство \"{0}\" не существует в перечислении const \"{1}\".", "Property_0_does_not_exist_on_type_1_2339": "Свойство \"{0}\" не существует в типе \"{1}\".", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "Свойство \"{0}\" не существует в типе \"{1}\". Возможно, пропущено \"await\"?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "Свойство \"{0}\" не существует в типе \"{1}\". Вы имели в виду \"{2}\"?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "Свойство \"{0}\" содержит конфликтующие объявления и недоступно в типе \"{1}\".", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "Свойство \"{0}\" не имеет инициализатора, и ему не гарантировано присваивание в конструкторе.", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "Свойство \"{0}\" неявно имеет тип \"все\", так как для его метода доступа get не задана заметка с типом возвращаемого значения.", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "Свойство \"{0}\" неявно имеет тип \"все\", так как для его метода доступа set не задана заметка с типом параметра.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage.", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "Свойство \"{0}\" в типе \"{1}\" невозможно присвоить тому же свойству в базовом типе \"{2}\".", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "Свойство \"{0}\" в типе \"{1}\" не может быть присвоено типу \"{2}\".", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'.", + "Property_0_is_a_static_member_of_type_1_2576": "Property '{0}' is a static member of type '{1}'", "Property_0_is_declared_but_its_value_is_never_read_6138": "Свойство \"{0}\" объявлено, но его значение не было прочитано.", "Property_0_is_incompatible_with_index_signature_2530": "Свойство \"{0}\" несовместимо с сигнатурой индекса.", + "Property_0_is_incompatible_with_rest_element_type_2573": "Property '{0}' is incompatible with rest element type.", "Property_0_is_missing_in_type_1_2324": "Свойство \"{0}\" отсутствует в типе \"{1}\".", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "Property '{0}' is missing in type '{1}' but required in type '{2}'.", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "Property '{0}' is not accessible outside class '{1}' because it has a private identifier.", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "Свойство \"{0}\" является необязательным в типе \"{1}\" и обязательным в типе \"{2}\".", "Property_0_is_private_and_only_accessible_within_class_1_2341": "Свойство \"{0}\" является закрытым и доступно только в классе \"{1}\".", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "Свойство \"{0}\" является закрытым в типе \"{1}\" и не является таковым в типе \"{2}\".", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "Свойство \"{0}\" является защищенным, однако тип \"{1}\" не является классом, производным от \"{2}\".", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "Свойство \"{0}\" является защищенным в типе \"{1}\" и общим в типе \"{2}\".", "Property_0_is_used_before_being_assigned_2565": "Свойство \"{0}\" используется перед присваиванием значения.", + "Property_0_is_used_before_its_initialization_2729": "Property '{0}' is used before its initialization.", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "Свойство \"{0}\" атрибута расширения JSX не может быть назначено для целевого свойства.", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "Свойство \"{0}\" выражения экспортированного класса не может быть частным или защищенным.", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "Свойство \"{0}\" экспортированного интерфейса имеет или использует имя \"{1}\" из закрытого модуля \"{2}\".", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "Свойство \"{0}\" экспортированного интерфейса имеет или использует закрытое имя \"{1}\".", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "Свойство \"{0}\" типа \"{1}\" нельзя назначить типу числового индекса \"{2}\".", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "Свойство \"{0}\" типа \"{1}\" нельзя назначить типу строкового индекса \"{2}\".", + "Property_0_was_also_declared_here_2733": "Property '{0}' was also declared here.", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.", "Property_assignment_expected_1136": "Ожидалось назначение свойства.", "Property_destructuring_pattern_expected_1180": "Ожидался шаблон деструктурирования свойства.", "Property_or_signature_expected_1131": "Ожидалось свойство или сигнатура.", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "Общее статическое свойство \"{0}\" экспортированного класса имеет или использует имя \"{1}\" из внешнего модуля {2}, но не может быть именовано.", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "Общее статическое свойство \"{0}\" экспортированного класса имеет или использует имя \"{1}\" из закрытого модуля \"{2}\".", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "Общее статическое свойство \"{0}\" экспортированного класса имеет или использует закрытое имя \"{1}\".", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'.", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "Вызывать ошибку в выражениях и объявлениях с подразумеваемым типом any.", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Вызвать ошибку в выражениях this с неявным типом any.", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.", "Redirect_output_structure_to_the_directory_6006": "Перенаправить структуру вывода в каталог.", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "Указанный в ссылке проект \"{0}\" должен иметь следующее значение параметра composite: true.", + "Remove_all_unnecessary_uses_of_await_95087": "Remove all unnecessary uses of 'await'", "Remove_all_unreachable_code_95051": "Удалить весь недостижимый код", "Remove_all_unused_labels_95054": "Удалить все неиспользуемые метки", "Remove_braces_from_arrow_function_95060": "Удалить скобки из стрелочной функции", - "Remove_declaration_for_Colon_0_90004": "Удалите объявление: \"{0}\"", "Remove_destructuring_90009": "Удалить деструктурирование", "Remove_import_from_0_90005": "Удалить импорт из \"{0}\"", + "Remove_template_tag_90011": "Remove template tag", + "Remove_type_parameters_90012": "Remove type parameters", + "Remove_unnecessary_await_95086": "Remove unnecessary 'await'", "Remove_unreachable_code_95050": "Удалить недостижимый код", + "Remove_unused_declaration_for_Colon_0_90004": "Remove unused declaration for: '{0}'", "Remove_unused_label_95053": "Удалить неиспользуемую метку", "Remove_variable_statement_90010": "Удалить оператор с переменной", + "Replace_all_unused_infer_with_unknown_90031": "Replace all unused 'infer' with 'unknown'", "Replace_import_with_0_95015": "Замена импорта на \"{0}\".", + "Replace_infer_0_with_unknown_90030": "Replace 'infer {0}' with 'unknown'", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Сообщать об ошибке, если не все пути к коду в функции возвращают значение.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Сообщать об ошибках для случаев передачи управления в операторе switch.", "Report_errors_in_js_files_8019": "Сообщать об ошибках в JS-файлах.", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "Идет разрешение с помощью первичных путей поиска...", "Resolving_with_primary_search_path_0_6121": "Разрешается с помощью первичного пути поиска \"{0}\".", "Rest_parameter_0_implicitly_has_an_any_type_7019": "Параметр rest \"{0}\" неявно имеет тип any[].", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage.", + "Rest_signatures_are_incompatible_2572": "Rest signatures are incompatible.", "Rest_types_may_only_be_created_from_object_types_2700": "Типы REST можно создавать только из типов объектов.", + "Return_type_annotation_circularly_references_itself_2577": "Return type annotation circularly references itself.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "Тип возвращаемого значения сигнатуры вызова из экспортированного интерфейса имеет или использует имя \"{0}\" из закрытого модуля \"{1}\".", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "Тип возвращаемого значения сигнатуры вызова из экспортированного интерфейса имеет или использует закрытое имя \"{0}\".", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "Тип возвращаемого значения сигнатуры конструктора из экспортированного интерфейса имеет или использует имя \"{0}\" из закрытого модуля \"{1}\".", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "Корневой каталог невозможно определить, идет пропуск первичных путей поиска.", "STRATEGY_6039": "СТРАТЕГИЯ", "Scoped_package_detected_looking_in_0_6182": "Обнаружен пакет, относящийся к области; поиск в \"{0}\"", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "Set the 'module' option in your configuration file to '{0}'", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "Set the 'target' option in your configuration file to '{0}'", "Setters_cannot_return_a_value_2408": "Методы доступа set не могут возвращать значения.", "Show_all_compiler_options_6169": "Отображение всех параметров компилятора.", "Show_diagnostic_information_6149": "Отображение сведений диагностики.", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "Сигнатура \"{0}\" должна быть предикатом типа.", "Skip_type_checking_of_declaration_files_6012": "Пропустить проверку типа файлов объявления.", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "Сборка проекта \"{0}\" будет пропущена, так как его зависимость \"{1}\" содержит ошибки", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "Очистка будет пропущена, так как не удалось найти некоторые проекты", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "Skipping build of project '{0}' because its dependency '{1}' was not built", "Source_Map_Options_6175": "Параметры сопоставления источников", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "Специализированная сигнатура перегрузки не поддерживает назначение неспециализированной сигнатуре.", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "Описатель динамического импорта не может быть элементом расширения.", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "Укажите целевую версию ECMAScript: \"ES3\" (по умолчанию), \"ES5\", \"ES2015\", \"ES2016\", \"ES2017\", \"ES2018\" или \"ESNEXT\".", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'.", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "Укажите вариант создания кода JSX: \"preserve\", \"react-native\" или \"react\".", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "Specify emit/checking behavior for imports that are only used for types", + "Specify_file_to_store_incremental_compilation_information_6380": "Specify file to store incremental compilation information", "Specify_library_files_to_be_included_in_the_compilation_6079": "Укажите файлы библиотек для включения в компиляцию.", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "Укажите вариант создания кода модуля: \"none\", \"commonjs\", \"amd\", \"system\", \"umd\", \"es2015\", или \"ESNext\".", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'.", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "Укажите стратегию разрешения модуля: node (Node.js) или classic (TypeScript pre-1.6).", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'.", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'.", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'.", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "Укажите функцию фабрики JSX, используемую при нацеливании на вывод JSX \"react\", например \"React.createElement\" или \"h\".", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "Укажите окончание последовательности строки для использования при порождении файлов: CRLF (DOS) или LF (UNIX).", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "Укажите расположение, в котором отладчик должен найти файлы TypeScript вместо исходных расположений.", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "Укажите расположение, в котором отладчик должен найти файлы карты, вместо созданных расположений.", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "Укажите корневой каталог входных файлов. Используйте его для управления структурой выходных каталогов с --outDir.", + "Split_all_invalid_type_only_imports_1367": "Split all invalid type-only imports", + "Split_into_two_separate_import_declarations_1366": "Split into two separate import declarations", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "Оператор расширения в выражениях new доступен только при разработке для ECMAScript 5 и более поздних версий.", "Spread_types_may_only_be_created_from_object_types_2698": "Типы расширения можно создавать только из типов объектов.", "Starting_compilation_in_watch_mode_6031": "Запуск компиляции в режиме наблюдения...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "Последовательные объявления свойств должны иметь один и тот же тип. Свойство \"{0}\" должно иметь тип \"{1}\", но имеет здесь тип \"{2}\".", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "Последующие объявления переменных должны иметь тот же тип. Переменная \"{0}\" должна иметь тип \"{1}\", однако имеет тип \"{2}\".", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "Подстановка \"{0}\" для шаблона \"{1}\" содержит неправильный тип, ожидается string, получен \"{2}\".", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "Подстановка \"{0}\" в шаблоне \"{1}\" может содержать не больше одного символа \"*\".", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "Substitution '{0}' in pattern '{1}' can have at most one '*' character.", "Substitutions_for_pattern_0_should_be_an_array_5063": "Подстановки для шаблона \"{0}\" должны быть массивом.", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "Замены для шаблона \"{0}\" не должны быть пустым массивом.", "Successfully_created_a_tsconfig_json_file_6071": "Файл tsconfig.json успешно создан.", @@ -840,78 +1033,121 @@ "Suppress_excess_property_checks_for_object_literals_6072": "Подавлять избыточные проверки свойств для объектных литералов.", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "Подавлять ошибки noImplicitAny для объектов индексирования, у которых отсутствуют сигнатуры индекса.", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "Ссылка Symbol не ссылается на глобальный объект конструктора Symbol.", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively.", "Syntax_Colon_0_6023": "Синтаксис: {0}", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "Tagged template expressions are not permitted in an optional chain.", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "The '{0}' modifier can only be used in TypeScript files.", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "Оператор \"{0}\" невозможно применить к типу Symbol.", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "Оператор \"{0}\" не разрешен для логических типов. Попробуйте использовать \"{1}\" вместо него.", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "The '{0}' property of an async iterator must be a method.", + "The_0_property_of_an_iterator_must_be_a_method_2767": "The '{0}' property of an iterator must be a method.", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "Тип Object можно назначить малому количеству других типов. Возможно, вы хотели использовать тип any?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "Нельзя ссылаться на объект типа arguments в стрелочной функции ES3 и ES5. Используйте стандартное выражение функции.", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "На объект arguments невозможно указать ссылку в асинхронной функции или методе в ES3 и ES5. Попробуйте использовать стандартную функцию или метод.", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "Текст оператора if не может быть пустым.", "The_character_set_of_the_input_files_6163": "Кодировка входных файлов.", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "The containing arrow function captures the global value of 'this'.", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "Содержащая функция или текст модуля слишком велики для анализа потока управления.", "The_current_host_does_not_support_the_0_option_5001": "Текущий узел не поддерживает параметр \"{0}\".", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "The declaration of '{0}' that you probably intended to use is defined here", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "The expected type comes from property '{0}' which is declared here on type '{1}'", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "The expected type comes from the return type of this signature.", + "The_expected_type_comes_from_this_index_signature_6501": "The expected type comes from this index signature.", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "Выражение назначения экспорта должно представлять собой идентификатор или полное имя в окружающем контексте.", "The_files_list_in_config_file_0_is_empty_18002": "Список \"files\" в файле конфигурации \"{0}\" пуст.", + "The_first_export_default_is_here_2752": "The first export default is here.", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "Первым параметром метода then класса promise должен быть обратный вызов.", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "Глобальный тип \"JSX.{0}\" не может иметь больше одного свойства.", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "Метасвойство \"import.meta\" разрешено только при использовании \"ESNext\" для параметров компилятора \"target\" и \"module\".", + "The_implementation_signature_is_declared_here_2750": "The implementation signature is declared here.", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "The 'import.meta' meta-property is only allowed when the '--module' option is 'esnext' or 'system'.", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary.", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "Выведенный тип \"{0}\" ссылается на недоступный тип \"{1}\". Требуется аннотация типа.", + "The_last_overload_gave_the_following_error_2770": "The last overload gave the following error.", + "The_last_overload_is_declared_here_2771": "The last overload is declared here.", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "Левый операнд оператора for...in не может быть шаблоном деструктурирования.", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "Левый операнд оператора for...in не может использовать аннотацию типа.", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "The left-hand side of a 'for...in' statement may not be an optional property access.", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "В левой части оператора \"for...in\" должна быть переменная или доступ к свойству.", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "Левый операнд оператора for...in должен иметь тип string или any.", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "Левый операнд оператора for...of не может использовать аннотацию типа.", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "The left-hand side of a 'for...of' statement may not be an optional property access.", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "В левой части оператора \"for...of\" должна быть переменная или доступ к свойству.", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "Левый операнд арифметической операции должен иметь тип any, number или тип перечисления.", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "The left-hand side of an assignment expression may not be an optional property access.", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "В левой части выражения назначения должна быть переменная или доступ к свойству.", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "Левый операнд выражения in должен иметь тип any, string, number или Symbol.", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "Левый операнд выражения instanceof должен иметь тип any, тип объекта или параметр типа.", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "Языковой стандарт, который используется при отображении сообщений пользователю (например, en-us)", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "Максимальная глубина зависимостей для поиска в папке node_modules и загрузки файлов JavaScript.", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "The operand of a 'delete' operator cannot be a private identifier.", "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "Операнд оператора delete не может быть свойством только для чтения.", "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "Операнд оператора delete должен быть ссылкой на свойство.", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "The operand of an increment or decrement operator may not be an optional property access.", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "Операнд оператора инкремента или декремента должен быть переменной или доступом к свойству.", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "The parser expected to find a '}' to match the '{' token here.", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "Тип возвращаемого значения конструктора элемента JSX должен возвращать тип объекта.", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "Тип возвращаемого значения функции декоратора параметра должен быть либо void, либо any.", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "Тип возвращаемого значения функции декоратора свойства должен быть либо void, либо any.", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "Тип возвращаемого значения асинхронной функции должен быть допустимым обещанием либо не должен содержать вызываемый элемент \"then\".", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "Тип возвращаемого значения асинхронной функции или метода должен быть глобальным типом Promise.", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "Правая часть оператора \"for…in\" должна иметь тип \"any\", тип объекта или быть параметром типа, однако указан тип \"{0}\".", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "Правый операнд арифметической операции должен иметь тип any, number или тип перечисления.", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "Правый операнд выражения \"in\" должен иметь тип \"any\", быть типом объекта или параметром типа.", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "Правый операнд выражения instanceof должен иметь тип any или тип, который можно назначить типу интерфейса Function.", + "The_shadowing_declaration_of_0_is_defined_here_18017": "The shadowing declaration of '{0}' is defined here", "The_specified_path_does_not_exist_Colon_0_5058": "Указанный путь не существует: \"{0}\".", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "Целевой объект назначения должен быть переменной или доступом к свойству.", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "The target of an object rest assignment may not be an optional property access.", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "Цель остального назначения объектов должна быть обращением к переменной или свойству.", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "Контекст this типа \"{0}\" не может быть назначен методу this типа \"{1}\".", "The_this_types_of_each_signature_are_incompatible_2685": "Типы this каждой подписи несовместимы.", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'.", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "Аргумент типа для параметра типа \"{0}\" невозможно вывести из использования. Рассмотрите возможность явного указания аргументов типа.", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "Возвращаемый тип метода next() асинхронного итератора должен быть классом promise (для типа со свойством value).", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "Тип, возвращаемый методом \"next()\" итератора, должен содержать свойство value.", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "The type of a function declaration must match the function's signature.", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property.", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "The type returned by the '{0}()' method of an iterator must have a 'value' property.", + "The_types_of_0_are_incompatible_between_these_types_2200": "The types of '{0}' are incompatible between these types.", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "The types returned by '{0}' are incompatible between these types.", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "Объявление переменной оператора for...in не может содержать инициализатор.", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "Объявление переменной оператора for...of не может содержать инициализатор.", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "Оператор with не поддерживается. Все символы в блоке with получат тип any.", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided.", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "This condition will always return true since the function is always defined. Did you mean to call it instead?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "Эту функцию конструктора можно преобразовать в объявление класса.", + "This_expression_is_not_callable_2349": "This expression is not callable.", + "This_expression_is_not_constructable_2351": "This expression is not constructable.", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.", + "This_may_be_converted_to_an_async_function_80006": "This may be converted to an async function.", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export.", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag.", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "This overload signature is not compatible with its implementation signature.", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "This parameter is not allowed with 'use strict' directive.", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Для этого синтаксиса требуется импортированный вспомогательный объект, но найти модуль \"{0}\" не удается.", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "Для этого синтаксиса требуется импортированный вспомогательный объект \"{1}\", но у модуля \"{0}\" нет экспортированного элемента \"{1}\".", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'.", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.", "Trailing_comma_not_allowed_1009": "Завершающая запятая запрещена.", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Транскомпиляция каждого файла как отдельного модуля (аналогично ts.transpileModule).", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Попробуйте команду \"npm install @types/{0}\", если это возможно, или добавьте новый файл объявления (.d.ts), содержащий \"declare module '{0}';\"", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`", "Trying_other_entries_in_rootDirs_6110": "Попытка использовать другие записи в \"rootDirs\".", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "Выполняется попытка замены \"{0}\", расположение модуля кандидата: \"{1}\".", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "Кортеж типа \"{0}\" с длиной \"{1}\" невозможно назначить кортежу с длиной \"{2}\".", - "Type_0_cannot_be_converted_to_type_1_2352": "Тип \"{0}\" невозможно преобразовать в тип \"{1}\".", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "Tuple type '{0}' of length '{1}' has no element at index '{2}'.", + "Tuple_type_arguments_circularly_reference_themselves_4110": "Tuple type arguments circularly reference themselves.", "Type_0_cannot_be_used_as_an_index_type_2538": "Тип \"{0}\" невозможно использовать как тип индекса.", "Type_0_cannot_be_used_to_index_type_1_2536": "Тип \"{0}\" не может использоваться для индексации типа \"{1}\".", "Type_0_does_not_satisfy_the_constraint_1_2344": "Тип \"{0}\" не удовлетворяет ограничению \"{1}\".", + "Type_0_has_no_call_signatures_2757": "Type '{0}' has no call signatures.", + "Type_0_has_no_construct_signatures_2761": "Type '{0}' has no construct signatures.", "Type_0_has_no_matching_index_signature_for_type_1_2537": "Тип \"{0}\" не содержит соответствующую сигнатуру индекса для типа \"{1}\".", "Type_0_has_no_properties_in_common_with_type_1_2559": "У типа \"{0}\" нет общих свойств с типом \"{1}\".", - "Type_0_has_no_property_1_2460": "Тип \"{0}\" не содержит свойство \"{1}\".", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "Тип \"{0}\" не содержит свойство \"{1}\" и сигнатуру строкового индекса.", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "Type '{0}' is missing the following properties from type '{1}': {2}", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.", "Type_0_is_not_a_constructor_function_type_2507": "Тип \"{0}\" не является типом функции конструктора.", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "Тип \"{0}\" не является допустимым типом возвращаемого значения асинхронной функции в ES5/ES3, так как он не ссылается на значение конструктора, совместимое с Promise.", "Type_0_is_not_an_array_type_2461": "Тип \"{0}\" не является типом массива.", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "Тип \"{0}\" не является типом массива. Используйте параметр компилятора \"--downlevelIteration\", чтобы разрешить итерацию итераторов.", "Type_0_is_not_an_array_type_or_a_string_type_2495": "Тип \"{0}\" не является типом массива или типом строки.", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "Тип \"{0}\" не является типом строки или массива. Используйте параметр компилятора \"--downlevelIteration\", чтобы разрешить итерацию итераторов.", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "{0} не является типом массива или строки или в нем нет метода [Symbol.iterator](), который возвращает итератор.", @@ -926,17 +1162,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "Тип \"{0}\" рекурсивно ссылается сам на себя как на базовый тип.", "Type_alias_0_circularly_references_itself_2456": "Псевдоним типа \"{0}\" циклически ссылается на себя.", "Type_alias_name_cannot_be_0_2457": "Псевдоним типа не может иметь имя \"{0}\".", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "Type aliases can only be used in TypeScript files.", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "Аннотация типа не может содержаться в объявлении конструктора.", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "Type annotations can only be used in TypeScript files.", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "Кандидат аргумента типа \"{1}\" является недопустимым аргументом, так как это не супертип кандидата \"{0}\".", "Type_argument_expected_1140": "Ожидался аргумент типа.", "Type_argument_list_cannot_be_empty_1099": "Список аргументов типа не может быть пустым.", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "Type arguments can only be used in TypeScript files.", "Type_arguments_cannot_be_used_here_1342": "Использовать аргументы типа здесь недопустимо.", + "Type_arguments_for_0_circularly_reference_themselves_4109": "Type arguments for '{0}' circularly reference themselves.", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "Type assertion expressions can only be used in TypeScript files.", "Type_declaration_files_to_be_included_in_compilation_6124": "Файлы объявления типа, включаемые в компиляцию.", "Type_expected_1110": "Ожидался тип.", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "Type instantiation is excessively deep and possibly infinite.", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "На тип есть прямые или непрямые ссылки в обратном вызове выполнения собственного метода then.", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "Тип операнда \"await\" должен быть допустимым обещанием либо не должен содержать вызываемый элемент \"then\".", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "Type of computed property's value is '{0}', which is not assignable to type '{1}'.", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "Тип элементов итерации для операнда \"yield*\" должен быть допустимым обещанием либо не должен содержать вызываемый элемент \"then\".", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "Тип операнда \"yield\" в асинхронном генераторе должен быть допустимым обещанием либо не должен содержать вызываемый элемент \"then\".", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.", "Type_parameter_0_has_a_circular_constraint_2313": "Параметр типа \"{0}\" содержит циклическое ограничение.", "Type_parameter_0_has_a_circular_default_2716": "Параметр типа \"{0}\" по умолчанию является циклическим.", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "Параметр типа \"{0}\" сигнатуры вызова из экспортированного интерфейса имеет или использует закрытое имя \"{1}\".", @@ -944,17 +1188,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "Параметр типа \"{0}\" экспортированного класса имеет или использует закрытое имя \"{1}\".", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "Параметр типа \"{0}\" экспортированной функции имеет или использует закрытое имя \"{1}\".", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "Параметр типа \"{0}\" экспортированного интерфейса имеет или использует закрытое имя \"{1}\".", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "Type parameter '{0}' of exported mapped object type is using private name '{1}'.", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "Параметр типа \"{0}\" экспортированного псевдонима типа имеет или использует закрытое имя \"{1}\".", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "Параметр типа \"{0}\" метода из экспортированного интерфейса имеет или использует закрытое имя \"{1}\".", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "Параметр типа \"{0}\" общего метода из экспортированного класса имеет или использует закрытое имя \"{1}\".", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "Параметр типа \"{0}\" общего статического метода из экспортированного класса имеет или использует закрытое имя \"{1}\".", "Type_parameter_declaration_expected_1139": "Ожидалось объявление параметра типа.", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "Type parameter declarations can only be used in TypeScript files.", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "Type parameter defaults can only reference previously declared type parameters.", "Type_parameter_list_cannot_be_empty_1098": "Список параметров типа не может быть пустым.", "Type_parameter_name_cannot_be_0_2368": "Параметр типа не может иметь имя \"{0}\".", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "Параметры типов не могут содержаться в объявлении конструктора.", "Type_predicate_0_is_not_assignable_to_1_1226": "Предикат типов \"{0}\" не может быть назначен для \"{1}\".", "Type_reference_directive_0_was_not_resolved_6120": "======== Директива ссылки на тип \"{0}\" не разрешена. ========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== Директива ссылки на тип \"{0}\" успешно разрешена в \"{1}\", первичный объект: {2}. ========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========", "Types_have_separate_declarations_of_a_private_property_0_2442": "Типы имеют раздельные объявления закрытого свойства \"{0}\".", "Types_of_parameters_0_and_1_are_incompatible_2328": "Типы параметров \"{0}\" и \"{1}\" несовместимы.", "Types_of_property_0_are_incompatible_2326": "Типы свойства \"{0}\" несовместимы.", @@ -967,10 +1215,18 @@ "Unexpected_token_1012": "Неожиданный токен.", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "Неожиданный токен. Ожидался конструктор, метод, метод доступа или свойство.", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "Непредвиденная лексема. Ожидалось имя параметра типа без фигурных скобок.", + "Unexpected_token_Did_you_mean_or_gt_1382": "Unexpected token. Did you mean `{'>'}` or `>`?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "Unexpected token. Did you mean `{'}'}` or `}`?", "Unexpected_token_expected_1179": "Неожиданный токен. Ожидался символ \"{\".", + "Unknown_build_option_0_5072": "Unknown build option '{0}'.", + "Unknown_build_option_0_Did_you_mean_1_5077": "Unknown build option '{0}'. Did you mean '{1}'?", "Unknown_compiler_option_0_5023": "Неизвестный параметр компилятора \"{0}\".", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "Unknown compiler option '{0}'. Did you mean '{1}'?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "Неизвестный параметр excludes. Возможно, вы имели в виду exclude?", "Unknown_type_acquisition_option_0_17010": "Неизвестный параметр получения типа, \"{0}\".", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "Unknown type acquisition option '{0}'. Did you mean '{1}'?", + "Unknown_watch_option_0_5078": "Unknown watch option '{0}'.", + "Unknown_watch_option_0_Did_you_mean_1_5079": "Unknown watch option '{0}'. Did you mean '{1}'?", "Unreachable_code_detected_7027": "Обнаружен недостижимый код.", "Unsupported_locale_0_6049": "Неподдерживаемый языковой стандарт \"{0}\".", "Unterminated_Unicode_escape_sequence_1199": "Незавершенная escape-последовательность Юникода.", @@ -980,34 +1236,52 @@ "Unterminated_template_literal_1160": "Незавершенный литерал шаблона.", "Untyped_function_calls_may_not_accept_type_arguments_2347": "Вызовы функций без типов не могут принимать аргументы типов.", "Unused_label_7028": "Неиспользуемая метка.", + "Updating_output_of_project_0_6373": "Updating output of project '{0}'...", "Updating_output_timestamps_of_project_0_6359": "Обновление меток времени в выходных данных проекта \"{0}\"...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "Updating unchanged output timestamps of project '{0}'...", "Use_synthetic_default_member_95016": "Используйте искусственный элемент \"default\".", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "Использование строки для оператора for...of поддерживается только в ECMAScript 5 и более поздних версиях.", + "Using_compiler_options_of_project_reference_redirect_0_6215": "Using compiler options of project reference redirect '{0}'.", "VERSION_6036": "ВЕРСИЯ", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "Значение типа \"{0}\" не имеет общих свойств со значением типа \"{1}\". Вы хотели вызвать его?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "Значение типа \"{0}\" не может вызываться. Вы хотели использовать new?", "Variable_0_implicitly_has_an_1_type_7005": "Переменная \"{0}\" неявно имеет тип \"{1}\".", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage.", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "Переменная \"{0}\" неявным образом получает тип \"{1}\" в некоторых местах, где ее тип невозможно определить.", "Variable_0_is_used_before_being_assigned_2454": "Переменная \"{0}\" используется перед назначением.", "Variable_declaration_expected_1134": "Ожидалось объявление переменной.", "Variable_declaration_list_cannot_be_empty_1123": "Список объявлений переменной не может быть пустым.", "Version_0_6029": "Версия {0}", "Watch_input_files_6005": "Просмотр входных файлов.", + "Watch_option_0_requires_a_value_of_type_1_5080": "Watch option '{0}' requires a value of type {1}.", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "Сохранять ли устаревшие выходные данные консоли в режиме просмотра вместо очистки экрана.", + "Wrap_invalid_character_in_an_expression_container_95101": "Wrap invalid character in an expression container", + "You_cannot_rename_a_module_via_a_global_import_8031": "You cannot rename a module via a global import.", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "Невозможно переименовать элементы, определенные в стандартной библиотеке TypeScript.", "You_cannot_rename_this_element_8000": "Этот элемент переименовать нельзя.", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "\"{0}\" принимает слишком мало аргументов для использования в качестве декоратора. Вы хотели сначала вызвать его и записать \"@{0}()\"?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "'{0}' and '{1}' operations cannot be mixed without parentheses.", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "\"{0}\" указаны дважды. Атрибут \"{0}\" будет перезаписан.", - "_0_can_only_be_used_in_a_ts_file_8009": "\"{0}\" может использоваться только в TS-файле.", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "'{0}' cannot be used as a value because it was exported using 'export type'.", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "'{0}' cannot be used as a value because it was imported using 'import type'.", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'.", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "'{0}' declarations can only be used in TypeScript files.", "_0_expected_1005": "Ожидалось \"{0}\".", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage.", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "\"{0}\" неявно имеет тип возвращаемого значения any, так как у него нет заметки с типом возвращаемого значения, а также на него прямо или косвенно указана ссылка в одном из его выражений return.", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "\"{0}\" неявно имеет тип any, так как отсутствует аннотация типа и на \"{0}\" есть прямые или непрямые ссылки в его собственном инициализаторе.", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "\"{0}\" является примитивом, но \"{1}\" — объект оболочки. Предпочтительно использовать \"{0}\" по мере возможности.", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'.", "_0_is_declared_but_its_value_is_never_read_6133": "Свойство \"{0}\" объявлено, но его значение не было прочитано.", "_0_is_declared_but_never_used_6196": "\"{0}\" объявлен, но никогда не использовался.", + "_0_is_declared_here_2728": "'{0}' is declared here.", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor.", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property.", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "\"{0}\" не является допустимым метасвойством для ключевого слова \"{1}\". Вы имели в виду \"{2}\"?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "На \"{0}\" есть прямые или непрямые ссылки в его собственном базовом выражении.", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "На \"{0}\" есть прямые или непрямые ссылки в его собственной аннотации типа.", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}' is specified more than once, so this usage will be overwritten.", "_0_list_cannot_be_empty_1097": "Список \"{0}\" не может быть пустым.", "_0_modifier_already_seen_1030": "Модификатор \"{0}\" уже встречался.", "_0_modifier_cannot_appear_on_a_class_element_1031": "Модификатор \"{0}\" не может использоваться в элементе класса.", @@ -1021,17 +1295,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "Модификатор \"{0}\" не может использоваться в окружающем контексте.", "_0_modifier_cannot_be_used_with_1_modifier_1243": "Модификатор \"{0}\" не может использоваться с модификатором \"{1}\".", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "Модификатор \"{0}\" не может использоваться с объявлением класса.", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "'{0}' modifier cannot be used with a private identifier", "_0_modifier_must_precede_1_modifier_1029": "Модификатор \"{0}\" должен предшествовать модификатору \"{1}\".", + "_0_needs_an_explicit_type_annotation_2782": "'{0}' needs an explicit type annotation.", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "\"{0}\" относится только к типу, а здесь используется как пространство имен.", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "\"{0}\" относится только к типу, но используется здесь как значение.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "\"{0}\" ссылается на глобальную переменную UMD, но текущий файл является модулем. Рекомендуется добавить импорт.", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "'{0}' refers to a value, but is being used as a type here.", "_0_tag_already_specified_1223": "Тег \"{0}\" уже указан.", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "Невозможно использовать тег \"{0}\" независимо в качестве тега верхнего уровня JSDoc.", + "_0_was_also_declared_here_6203": "'{0}' was also declared here.", + "_0_was_exported_here_1377": "'{0}' was exported here.", + "_0_was_imported_here_1376": "'{0}' was imported here.", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "\"{0}\", у которого нет аннотации типа возвращаемого значения, неявно имеет тип возвращаемого значения \"{1}\".", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type.", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "Модификатор abstract может отображаться только в объявлении класса, метода или свойства.", - "await_expression_is_only_allowed_within_an_async_function_1308": "Выражение await разрешено использовать только в асинхронной функции.", + "and_here_6204": "and here.", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "'await' expressions are only allowed within async functions and at the top levels of modules.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "Выражения await не могут быть использованы в инициализаторе параметра.", + "await_has_no_effect_on_the_type_of_this_expression_80007": "'await' has no effect on the type of this expression.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "Параметр \"baseUrl\" имеет значение \"{0}\", это значение используется для разрешения безотносительного имени модуля \"{1}\".", + "can_only_be_used_at_the_start_of_a_file_18026": "'#!' can only be used at the start of a file.", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "\"=\" можно использовать только в свойстве объектного литерала в назначении деструктурирования.", "case_or_default_expected_1130": "Ожидалось case или default.", "class_expressions_are_not_currently_supported_9003": "Выражения class в настоящий момент не поддерживаются.", @@ -1039,11 +1325,12 @@ "const_declarations_must_be_initialized_1155": "Объявления \"const\" должны быть инициализированы.", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "Инициализатор элементов перечисления const был вычислен в неконечное значение.", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "Инициализатор элементов перечисления const был вычислен в запрещенное значение NaN.", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "const enum member initializers can only contain literal values and other computed enum values.", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "Перечисления const можно использовать только в выражениях доступа к свойству или индексу, а также в правой части объявления импорта, назначения экспорта или запроса типа.", + "constructor_is_a_reserved_word_18012": "'#constructor' is a reserved word.", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "Невозможно вызвать оператор delete с идентификатором в строгом режиме.", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "удалить это — проект \"{0}\" не требует обновления, так как был собран ранее", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "Объявления перечислений можно использовать только в TS-файле.", - "export_can_only_be_used_in_a_ts_file_8003": "Элемент \"export=\" может использоваться только в TS-файле.", + "export_can_only_be_used_in_TypeScript_files_8003": "'export =' can only be used in TypeScript files.", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "Модификатор export невозможно применить к неоднозначным модулям и улучшениям модулей, так как они всегда видимые.", "extends_clause_already_seen_1172": "Предложение extends уже существует.", "extends_clause_must_precede_implements_clause_1173": "Предложение extends должно предшествовать предложению implements.", @@ -1053,23 +1340,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "Методы доступа \"get\" и \"set\" должны иметь одинаковый тип \"this\".", "get_and_set_accessor_must_have_the_same_type_2380": "Методы доступа get и set должны иметь одинаковый тип.", "implements_clause_already_seen_1175": "Предложение implements уже существует.", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "Предложения implements могут использоваться только в TS-файле.", - "import_can_only_be_used_in_a_ts_file_8002": "Элемент \"import ... =\" может использоваться только в TS-файле.", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "'implements' clauses can only be used in TypeScript files.", + "import_can_only_be_used_in_TypeScript_files_8002": "'import ... =' can only be used in TypeScript files.", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "Объявления \"infer\" допустимы только в предложении \"extends\" условного типа.", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "Объявления интерфейсов могут использоваться только в TS-файле.", "let_declarations_can_only_be_declared_inside_a_block_1157": "Объявления let можно задать только в блоке.", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "Не допускается использование let в качестве имени в объявлениях let или const.", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "Объявления модулей могут использоваться только в TS-файле.", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "Оператор new T[] не может использоваться для создания массива. Используйте вместо него \"new Array()\".", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "Выражение new, у цели которого нет сигнатуры конструктора, неявно имеет тип any.", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "Утверждения для проверки на null могут использоваться только в TS-файле.", "options_6024": "параметры", "or_expected_1144": "Ожидалось \"{\" или \";\".", "package_json_does_not_have_a_0_field_6100": "В package.json нет поля \"{0}\".", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "'package.json' does not have a 'typesVersions' entry that matches version '{0}'.", + "package_json_had_a_falsy_0_field_6220": "'package.json' had a falsy '{0}' field.", "package_json_has_0_field_1_that_references_2_6101": "package.json содержит поле \"{0}\" \"{1}\", которое ссылается на \"{2}\".", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "Модификаторы параметров могут использоваться только в TS-файле.", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range.", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'.", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "'package.json' has a 'typesVersions' field with version-specific path mappings.", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "Параметр paths указан, идет поиск шаблона, соответствующего имени модуля \"{0}\".", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "Модификатор readonly может отображаться только в объявлении свойства или сигнатуре индекса.", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "'readonly' type modifier is only permitted on array and tuple literal types.", "require_call_may_be_converted_to_an_import_80005": "Вызов \"require\" можно преобразовать в \"import\".", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "Параметр \"rootDirs\" задан; он используется для разрешения относительного имени модуля \"{0}\".", "super_can_only_be_referenced_in_a_derived_class_2335": "Ссылка на super может указываться только в производном классе.", @@ -1077,6 +1365,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "Не допускается ссылка на super в имени вычисляемого свойства.", "super_cannot_be_referenced_in_constructor_arguments_2336": "На super невозможно ссылаться в аргументах конструктора.", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "super допускается только в элементах литеральных выражений объекта, если параметр target — ES2015 или выше.", + "super_may_not_use_type_arguments_2754": "'super' may not use type arguments.", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "Перед тем, как получить доступ к свойству \"super\" в конструкторе производного класса, необходимо вызвать \"super\".", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "super следует вызывать перед получением доступа к this в конструкторе производного класса.", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "После super должен идти список аргументов или доступ к элементу.", @@ -1087,14 +1376,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "На this не могут указывать ссылки в аргументах конструктора.", "this_cannot_be_referenced_in_current_location_2332": "На this не могут указывать ссылки в текущем расположении.", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "this неявно содержит тип any, так как он не имеет аннотации типа.", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "Псевдонимы типов могут использоваться только в TS-файле.", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "Аргументы типов могут использоваться только в TS-файле.", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "Выражения утверждения типа могут использоваться только в TS-файле.", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "Объявления параметров типа могут использоваться только в TS-файле.", - "types_can_only_be_used_in_a_ts_file_8010": "Типы могут использоваться только в TS-файле.", "unique_symbol_types_are_not_allowed_here_1335": "Типы \"unique symbol\" здесь запрещены.", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "Типы \"unique symbol\" разрешены только у переменных в операторах с переменными.", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "Типы \"unique symbol\" невозможно использовать в объявлении переменной с именем привязки.", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "'use strict' directive cannot be used with non-simple parameter list.", + "use_strict_directive_used_here_1349": "'use strict' directive used here.", "with_statements_are_not_allowed_in_an_async_function_block_1300": "Операторы with не разрешено использовать в блоке асинхронной функции.", "with_statements_are_not_allowed_in_strict_mode_1101": "Операторы with не разрешено использовать в строгом режиме.", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "Выражения yield не могут быть использованы в инициализаторе параметра." diff --git a/lib/tr/diagnosticMessages.generated.json b/lib/tr/diagnosticMessages.generated.json index dc52ec079efaf..7ef43c5ec7b7c 100644 --- a/lib/tr/diagnosticMessages.generated.json +++ b/lib/tr/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "Bir '{0}' değiştiricisi, içeri aktarma bildirimiyle birlikte kullanılamaz.", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "Bir '{0}' değiştiricisi, arabirim bildirimiyle birlikte kullanılamaz.", "A_0_parameter_must_be_the_first_parameter_2680": "Bir '{0}' parametresi ilk parametre olmalıdır.", + "A_bigint_literal_cannot_use_exponential_notation_1352": "Bir büyük tamsayı sabit değerinde üstel gösterim kullanılamaz.", + "A_bigint_literal_must_be_an_integer_1353": "Büyük tamsayı sabit değeri bir tamsayı olmalıdır.", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "Uygulama imzasındaki bir bağlama deseni parametresi isteğe bağlı olamaz.", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "'break' deyimi yalnızca bir kapsayan yineleme veya switch deyimi içinde kullanılabilir.", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "'break' deyimi, yalnızca kapsayan deyimin etiketine atlayabilir.", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "Bir sınıf, isteğe bağlı tür bağımsız değişkenleri ile yalnızca bir tanımlayıcıyı/tam adı uygulayabilir.", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "Bir sınıf, yalnızca statik olarak bilinen üyelere sahip bir nesne türünü veya nesne türlerinin bir kesişimini uygulayabilir.", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "'default' değiştiricisi olmayan bir sınıf bildiriminin adı olmalıdır.", "A_class_may_only_extend_another_class_2311": "Bir sınıf yalnızca başka bir sınıfı genişletebilir.", - "A_class_may_only_implement_another_class_or_interface_2422": "Bir sınıf yalnızca başka bir sınıfı veya arabirimi uygulayabilir.", "A_class_member_cannot_have_the_0_keyword_1248": "Bir sınıf üyesi '{0}' anahtar kelimesini içeremez.", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "Hesaplanan özellik adında virgül ifadesine izin verilmez.", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "Hesaplanan özellik adı, kapsayan türündeki bir tür parametresine başvuramaz.", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "Bir arabirimdeki hesaplanan özellik adı, sabit değer türündeki veya 'unique symbol' türündeki bir ifadeye başvurmalıdır.", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "Hesaplanan özellik adı 'string', 'number', 'symbol' veya 'any' türünde olmalıdır.", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "'{0}' biçimindeki hesaplanan özellik adı 'symbol' türünde olmalıdır.", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "'const' onaylamaları yalnızca sabit listesi üyelerine veya dize, sayı, Boolean, dizi ya da nesne sabit değerlerine yönelik başvurulara uygulanabilir.", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "const numaralandırma üyesine yalnızca dize sabit değeri kullanılarak erişilebilir.", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "Çevresel bağlamdaki 'const' başlatıcısı bir dize veya sayısal sabit değer olmalıdır.", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "Çevresel bağlamdaki 'const' başlatıcısı bir dize veya sayısal sabit değer ya da sabit değer sabit listesi başvurusu olmalıdır.", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "Sınıfı 'null' değerini aşan bir oluşturucu 'super' çağrısını içeremez.", "A_constructor_cannot_have_a_this_parameter_2681": "Bir oluşturucu 'this' parametresini içeremez.", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "'continue' deyimi yalnızca bir kapsayan yineleme deyimi içinde kullanılabilir.", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "'continue' deyimi, yalnızca kapsayan yineleme deyiminin etiketine atlayabilir.", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "Çevresel bağlamda 'declare' değiştiricisi kullanılamaz.", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": "Bir .d.ts dosyasındaki en üst düzey bildirim için 'declare' değiştiricisi gerekir.", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "Dekoratörler yalnızca metot uygulaması dekore edebilir; aşırı yüklemeleri dekore edemez.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "'default' yan tümcesi, 'switch' deyiminde birden fazla kez bulunamaz.", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "Varsayılan dışarı aktarma, yalnızca ECMAScript stili bir modülde kullanılabilir.", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "Bir oluşturucu 'void' türündeki bir ek açıklamaya sahip olamaz.", "A_get_accessor_cannot_have_parameters_1054": "Bir 'get' erişimcisi parametrelere sahip olamaz.", "A_get_accessor_must_return_a_value_2378": "'get' erişimcisinin bir değer döndürmesi gerekir.", + "A_label_is_not_allowed_here_1344": "'Burada etikete izin verilmiyor.", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "Sabit listesi bildirimindeki bir üye başlatıcısı, diğer sabit listelerinde tanımlanan üyeler dahil olmak üzere kendinden sonra bildirilen üyelere başvuramaz.", + "A_method_cannot_be_named_with_a_private_identifier_18022": "Bir metot özel tanımlayıcıyla adlandırılamaz.", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "Mixin sınıfının 'any[]' türünde tek bir rest parametresi içeren bir oluşturucusu olmalıdır.", "A_module_cannot_have_multiple_default_exports_2528": "Modül, birden fazla varsayılan dışarı aktarmaya sahip olamaz.", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Bir ad alanı bildirimi, birleştirildiği sınıf veya işlevden farklı bir dosyada olamaz.", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Bir ad alanı bildirimi, birleştirildiği sınıf veya işlevden önce gelemez.", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "Ad alanı bildirimine yalnızca bir ad alanında veya modülde izin verilir.", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "Bir ad alanı stili içeri aktarma işlemi çağrılamadığından veya oluşturulamadığından çalışma zamanında hataya yol açacak.", "A_non_dry_build_would_build_project_0_6357": "-dry bayrağı kullanılmayan bir derleme '{0}' projesini derler", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "-dry bayrağı kullanılmayan bir derleme şu dosyaları siler: {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "DRY dışı bir derleme, '{0}' projesinin çıkışını güncelleştirir", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "DRY dışı bir derleme, '{0}' projesinin çıkışı için zaman damgalarını güncelleştirir", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "Parametre başlatıcısına yalnızca bir işlevde veya oluşturucu uygulamasında izin verilir.", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "Parametre özelliği, rest parametresi kullanılarak bildirilemez.", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "Parametre özelliğine yalnızca bir oluşturucu uygulamasında izin verilir.", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "Promise'in bir 'then' metodu olmalıdır.", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "Bir 'unique symbol' türündeki sınıfın özelliği hem 'static' hem de 'readonly' olmalıdır.", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "Bir 'unique symbol' türündeki arabirimin veya tür sabit değerinin özelliği 'readonly' olmalıdır.", + "A_required_element_cannot_follow_an_optional_element_1257": "Gerekli öğe, isteğe bağlı öğeden sonra gelemez.", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "Gerekli parametre, isteğe bağlı parametreden sonra gelemez.", "A_rest_element_cannot_contain_a_binding_pattern_2501": "rest öğesi bir bağlama deseni içeremez.", "A_rest_element_cannot_have_a_property_name_2566": "Rest öğesinin özellik adı olamaz.", "A_rest_element_cannot_have_an_initializer_1186": "rest öğesi bir başlatıcıya sahip olamaz.", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "Rest öğesi, yok etme desenindeki son öğe olmalıdır.", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "REST öğesi, demet türündeki son öğe olmalıdır.", + "A_rest_element_type_must_be_an_array_type_2574": "REST öğesi dizi türünde olmalıdır.", "A_rest_parameter_cannot_be_optional_1047": "rest parametresi isteğe bağlı olamaz.", "A_rest_parameter_cannot_have_an_initializer_1048": "rest parametresi bir başlatıcıya sahip olamaz.", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "rest parametresi, parametre listesinin sonunda bulunmalıdır.", @@ -77,13 +85,13 @@ "A_set_accessor_must_have_exactly_one_parameter_1049": "'set' erişimcisi tam olarak bir parametreye sahip olmalıdır.", "A_set_accessor_parameter_cannot_have_an_initializer_1052": "'set' erişimci parametresinin bir başlatıcısı olamaz.", "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381": "Uygulamaya sahip bir imza, dize sabit değeri türünü kullanamaz.", - "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "Bir sınıf başlatılmış özellik içerdiğinde veya parametre özelliklerine sahip olduğunda 'super' çağrısı, oluşturucudaki ilk deyim olmalıdır.", + "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "Bir sınıf başlatılmış özellikler, parametre özellikleri veya özel tanımlayıcılar içerdiğinde 'super' çağrısı, oluşturucudaki ilk deyim olmalıdır.", "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "'This' tabanlı tür koruması, parametre tabanlı tür koruması ile uyumlu değildir.", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "'this' türü, yalnızca bir sınıfın veya arabirimin statik olmayan bir üyesinde kullanılabilir.", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "'tsconfig.json' dosyası şu konumda zaten tanımlanmış: '{0}'.", - "A_tuple_type_element_list_cannot_be_empty_1122": "Demet türü öğe listesi boş olamaz.", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "Üs ifadesinin sol tarafında tür onaylama ifadesine izin verilmez. İfadeyi parantez içine yazmayı düşünün.", "A_type_literal_property_cannot_have_an_initializer_1247": "Tür sabit değeri özelliği bir başlatıcıya sahip olamaz.", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "Yalnızca tür içeri aktarma işlemleri varsayılan bir içeri aktarmayı veya adlandırılan bağlamaları belirtebilir ancak ikisini birden belirtemez.", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "Bir tür koşulu, rest parametresine başvuru yapamaz.", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "Bir tür koşulu, bağlama desenindeki '{0}' öğesine başvuru yapamaz.", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "Bir tür koşuluna yalnızca işlevlere ve metotlara ait dönüş türü konumunda izin verilir.", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "'{0}' öğesini \"{1}\" konumundaki mevcut içeri aktarma bildirimine ekle", "Add_0_to_unresolved_variable_90008": "Çözümlenmemiş değişkene '{0}.' ekle", "Add_all_missing_async_modifiers_95041": "Tüm eksik 'async' değiştiricileri ekle", + "Add_all_missing_imports_95064": "Tüm eksik içeri aktarmaları ekleyin", "Add_all_missing_members_95022": "Tüm eksik üyeleri ekle", "Add_all_missing_super_calls_95039": "Tüm eksik süper çağrıları ekle", "Add_async_modifier_to_containing_function_90029": "İçeren işleve zaman uyumsuz değiştirici ekle", + "Add_await_95083": "'await' ekleyin", + "Add_await_to_initializer_for_0_95084": "'{0}' için başlatıcıya 'await' ekleyin", + "Add_await_to_initializers_95089": "Başlatıcılara 'await' ekleyin", "Add_braces_to_arrow_function_95059": "Ok işlevine küme ayracı ekleyin", + "Add_const_to_all_unresolved_variables_95082": "Çözümlenmemiş tüm değişkenlere 'const' ekleyin", + "Add_const_to_unresolved_variable_95081": "Çözümlenmemiş değişkene 'const' ekleyin", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "Varsayılan '{0}' içeri aktarmasını \"{1}\" kaynaklı mevcut içeri aktarma bildirimine ekleyin", "Add_definite_assignment_assertion_to_property_0_95020": "'{0}' özelliğine belirli atama onayı ekle", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "Tüm başlatılmamış özelliklere kesin atama onayları ekle", + "Add_export_to_make_this_file_into_a_module_95097": "Bu dosyayı bir modüle dönüştürmek için 'export {}' ekleyin", "Add_index_signature_for_property_0_90017": "'{0}' özelliği için dizin imzası ekle", "Add_initializer_to_property_0_95019": "'{0}' özelliğine başlatıcı ekle", "Add_initializers_to_all_uninitialized_properties_95027": "Tüm başlatılmamış özelliklere başlatıcılar ekle", + "Add_missing_enum_member_0_95063": "Eksik '{0}' sabit listesi üyesini ekleyin", + "Add_missing_new_operator_to_all_calls_95072": "Tüm çağrılara eksik 'new' işlecini ekleyin", + "Add_missing_new_operator_to_call_95071": "Çağrıya eksik 'new' işlecini ekleyin", "Add_missing_super_call_90001": "Eksik 'super()' çağrısını ekle", "Add_missing_typeof_95052": "Eksik 'typeof' öğesini ekle", + "Add_names_to_all_parameters_without_names_95073": "Adları olmayan tüm parametrelere ad ekleyin", "Add_or_remove_braces_in_an_arrow_function_95058": "Ok işlevine küme ayracı ekle veya kaldır", + "Add_parameter_name_90034": "Parametre adı ekleyin", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "Bir üye adıyla eşleşen tüm çözülmemiş değişkenlere niteleyici ekle", "Add_to_all_uncalled_decorators_95044": "Çağrılmayan tüm dekoratörlere '()' ekle", "Add_ts_ignore_to_all_error_messages_95042": "Tüm hata iletilerine '@ts-ignore' ekle", "Add_undefined_type_to_all_uninitialized_properties_95029": "Tüm başlatılmamış özelliklere tanımsız tür ekle", "Add_undefined_type_to_property_0_95018": "'{0}' özelliğine 'undefined' türünü ekle", + "Add_unknown_conversion_for_non_overlapping_types_95069": "Çakışmayan türler için 'unknown' dönüştürmesi ekleyin", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "Çakışmayan türlerin tüm dönüştürmelerine 'unknown' ekleyin", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "Bir tsconfig.json dosyası eklemek, hem TypeScript hem de JavaScript dosyaları içeren projeleri düzenlemenize yardımcı olur. Daha fazla bilgi edinmek için bkz. https://aka.ms/tsconfig.", "Additional_Checks_6176": "Ek Denetimler", "Advanced_Options_6178": "Gelişmiş Seçenekler", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "Tüm '{0}' bildirimleri özdeş tür parametrelerine sahip olmalıdır.", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "Soyut metoda ait tüm bildirimler ardışık olmalıdır.", "All_destructured_elements_are_unused_6198": "Yapısı bozulan öğelerin hiçbiri kullanılmıyor.", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "'--isolatedModules' bayrağı sağlandığında tüm dosyalar modül olmalıdır.", "All_imports_in_import_declaration_are_unused_6192": "İçeri aktarma bildirimindeki hiçbir içeri aktarma kullanılmadı.", + "All_type_parameters_are_unused_6205": "Tüm tür parametreleri kullanılmıyor", "All_variables_are_unused_6199": "Hiçbir değişken kullanılmıyor.", + "Allow_accessing_UMD_globals_from_modules_95076": "Modüllerden UMD genel değişkenlerine erişmeye izin verin.", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "Varsayılan dışarı aktarmaya sahip olmayan modüllerde varsayılan içeri aktarmalara izin verin. Bu işlem kod üretimini etkilemez, yalnızca tür denetimini etkiler.", "Allow_javascript_files_to_be_compiled_6102": "Javascript dosyalarının derlenmesine izin ver.", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "'--isolatedModules' bayrağı sağlandığında çevresel const sabit listesi değerlerine izin verilmez.", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "Zaten eklenmiş olan '{0}' dosya adı, '{1}' dosya adından yalnızca büyük/küçük harf yönünden farklıdır.", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "Çevresel modül bildirimi göreli modül adını belirtemez.", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "Çevresel modüller, diğer modüllerde veya ad alanlarında iç içe bulunamaz.", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "AMD modülü birden fazla ad atamasında sahip olamaz.", "An_abstract_accessor_cannot_have_an_implementation_1318": "Soyut erişimcinin uygulaması olamaz.", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "Erişimci, çevresel bağlamda bildirilemez.", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "Erişilebilirlik değiştiricisi özel bir tanımlayıcıyla kullanılamıyor.", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "Erişimci özel bir tanımlayıcıyla adlandırılamıyor.", "An_accessor_cannot_have_type_parameters_1094": "Erişimci, tür parametrelerine sahip olamaz.", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "Çevresel modül bildirimine yalnızca bir dosyadaki en üst düzeyde izin verilir.", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "Aritmetik işlenen, 'any', 'number' veya sabit listesi türünde olmalıdır.", + "An_argument_for_0_was_not_provided_6210": "'{0}' için bağımsız değişken sağlanmadı.", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "Bu bağlama deseniyle eşleşen bağımsız değişken sağlanmadı.", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "Aritmetik işlenen 'any', 'number', 'bigint' veya bir sabit listesi türünde olmalıdır.", + "An_arrow_function_cannot_have_a_this_parameter_2730": "Ok işlevi 'this' parametresine sahip olamaz.", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "ES5/ES3 içindeki zaman uyumsuz bir fonksiyon veya metot, 'Promise' oluşturucusu gerektiriyor. 'Promise' oluşturucusu için bir bildiriminizin olduğundan veya `--lib` seçeneğinize 'ES2015' eklediğinizden emin olun.", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "Zaman uyumsuz bir işlev veya metot, geçerli bir beklenebilir dönüş türüne sahip olmalıdır.", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "Zaman uyumsuz bir işlevin veya metodun 'Promise' döndürmesi gerekir. Bir 'Promise' bildiriminiz olduğundan emin olun veya `--lib` seçeneğinize 'ES2015' ifadesini ekleyin.", "An_async_iterator_must_have_a_next_method_2519": "Zaman uyumsuz yineleyicinin bir 'next()' metodu olmalıdır.", "An_element_access_expression_should_take_an_argument_1011": "Bir öğe erişimi ifadesi bir bağımsız değişken almalıdır.", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "Sabit listesi üyesi özel bir tanımlayıcıyla adlandırılamaz.", "An_enum_member_cannot_have_a_numeric_name_2452": "Sabit listesi üyesi, sayısal bir ada sahip olamaz.", + "An_enum_member_name_must_be_followed_by_a_or_1357": "Sabit listesi üyesinin adından sonra bir ',', '=' veya '}' gelmelidir.", "An_export_assignment_can_only_be_used_in_a_module_1231": "Dışarı aktarma ataması yalnızca bir modülde kullanılabilir.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Dışarı aktarma ataması, dışarı aktarılmış diğer öğelere sahip bir modülde kullanılamaz.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Ad alanında dışarı aktarma ataması kullanılamaz.", "An_export_assignment_cannot_have_modifiers_1120": "Dışarı aktarma ataması, değiştiricilere sahip olamaz.", "An_export_declaration_can_only_be_used_in_a_module_1233": "Dışarı aktarma bildirimi yalnızca bir modülde kullanılabilir.", "An_export_declaration_cannot_have_modifiers_1193": "Dışarı aktarma bildirimi, değiştiricilere sahip olamaz.", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "'void' türünde bir ifade doğruluk için test edilemiyor", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "Genişletilmiş Unicode kaçış değeri, 0x0 ve 0x10FFFF dahil olmak üzere bu değerler arasında olmalıdır.", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "Tanımlayıcı veya anahtar sözcük, sayısal bir sabit değerden hemen sonra gelemez.", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "Uygulama, çevresel bağlamda bildirilemez.", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "İçeri aktarma diğer adı, 'export type' kullanılarak dışarı aktarılan bir bildirime başvuramaz.", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "İçeri aktarma diğer adı, 'import type' kullanılarak içeri aktarılan bir bildirime başvuramaz.", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "İçeri aktarma bildirimi yalnızca bir ad alanında veya modülde kullanılabilir.", "An_import_declaration_cannot_have_modifiers_1191": "İçeri aktarma bildirimi, değiştiricilere sahip olamaz.", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "İçeri aktarma yolu '{0}' uzantısıyla bitemez. Bunun yerine '{1}' öğesini içeri aktarmayı deneyin.", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "Dizin imzası parametresi, bir tür ek açıklamasına sahip olmalıdır.", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "Dizin imzası parametre türü bir tür diğer adı olamaz. Bunun yerine '[{0}: {1}]: {2}' yazabilirsiniz.", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "Dizin imzası parametre türü bir birleşim türü olamaz. Bunun yerine eşlenen nesne türü kullanabilirsiniz.", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "Dizin imzası parametresi, 'string' veya 'number' türünde olmalıdır.", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "Dizin imzası parametresi, 'string' veya 'number' türünde olmalıdır.", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "Bir arabirim, isteğe bağlı tür bağımsız değişkenleri ile yalnızca bir tanımlayıcıyı/tam adı genişletebilir.", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "Arabirim, yalnızca bir sınıfı veya başka bir arabirimi genişletebilir.", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "Arabirim, yalnızca statik olarak bilinen üyelere sahip bir nesne türünü veya nesne türlerinin bir kesişimini genişletebilir.", "An_interface_property_cannot_have_an_initializer_1246": "Arabirim özelliği bir başlatıcıya sahip olamaz.", "An_iterator_must_have_a_next_method_2489": "Bir yineleyici 'next()' metoduna sahip olmalıdır.", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "Nesne sabit değeri aynı ada sahip birden fazla get/set erişimcisine sahip olamaz.", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "Nesne sabit değeri, katı modda aynı ada sahip birden fazla özelliğe sahip olamaz.", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "Nesne sabit değeri, aynı ada sahip bir özellik ve erişimciye sahip olamaz.", "An_object_member_cannot_be_declared_optional_1162": "Nesne üyesi, isteğe bağlı olarak bildirilemez.", + "An_optional_chain_cannot_contain_private_identifiers_18030": "İsteğe bağlı bir zincir, özel tanımlayıcı içeremez.", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "'this' öğesinin dış değeri bu kapsayıcı tarafından gölgelenir.", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "Aşırı yükleme imzası, bir oluşturucu olarak bildirilemez.", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "Üs ifadesinin sol tarafında '{0}' işlecine sahip bir tek terimli ifadeye izin verilmez. İfadeyi parantez içine yazmayı düşünün.", "Annotate_everything_with_types_from_JSDoc_95043": "Her şeye JSDoc'tan türler ile not ekle", "Annotate_with_type_from_JSDoc_95009": "JSDoc türü ile not ekle", "Annotate_with_types_from_JSDoc_95010": "JSDoc türleri ile not ekle", + "Another_export_default_is_here_2753": "Başka bir dışarı aktarma varsayılanını burada bulabilirsiniz.", + "Are_you_missing_a_semicolon_2734": "Noktalı virgülünüz eksik mi?", "Argument_expression_expected_1135": "Bağımsız değişken ifadesi bekleniyor.", "Argument_for_0_option_must_be_Colon_1_6046": "'{0}' seçeneğinin bağımsız değişkeni {1} olmalıdır.", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "'{0}' türündeki bağımsız değişken '{1}' türündeki parametreye atanamaz.", "Array_element_destructuring_pattern_expected_1181": "Dizi öğesi yok etme deseni bekleniyor.", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "Onaylamalar, çağrı hedefindeki her adın açık bir tür ek açıklaması ile bildirilmesini gerektirir.", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "Onaylamalar, çağrı hedefinin bir tanımlayıcı veya tam ad olmasını gerektirir.", "Asterisk_Slash_expected_1010": "'*/' bekleniyor.", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "Genel kapsam genişletmeleri yalnızca dış modüllerde ya da çevresel modül bildirimlerinde doğrudan yuvalanabilir.", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "Genel kapsam genişletmeleri, zaten çevresel olan bir bağlamda göründükleri durumlar dışında 'declare' değiştiricisine sahip olmalıdır.", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "'{0}' projesinde otomatik tür bulma etkinleştirildi. '{2}' önbellek konumu kullanılarak '{1}' modülü için ek çözümleme geçişi çalıştırılıyor.", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "Temel sınıf ifadelerinde sınıf türü parametrelerine başvuruda bulunulamaz.", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "Temel oluşturucu dönüş türü '{0}', bir sınıf veya arabirim türü değil.", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "'{0}' temel oluşturucu dönüş türü, statik olarak bilinen üyelere sahip bir nesne türü veya nesne türlerinin bir kesişimi değil.", "Base_constructors_must_all_have_the_same_return_type_2510": "Tüm temel oluşturucuların aynı dönüş türüne sahip olması gerekir.", "Base_directory_to_resolve_non_absolute_module_names_6083": "Mutlak olmayan modül adlarını çözümlemek için kullanılan temel dizin.", "Basic_Options_6172": "Temel Seçenekler", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "ES2020'den düşük değerler hedeflendiğinde büyük tamsayı sabit değerleri kullanılamıyor.", "Binary_digit_expected_1177": "İkili sayı bekleniyor.", "Binding_element_0_implicitly_has_an_1_type_7031": "'{0}' bağlama öğesi, örtük olarak '{1}' türü içeriyor.", "Block_scoped_variable_0_used_before_its_declaration_2448": "Blok kapsamlı değişken '{0}', bildirilmeden önce kullanıldı.", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "Güncel görünenler de dahil olmak üzere tüm projeleri derleyin", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "Eskiyse, bir veya daha fazla projeyi ve bağımlılıklarını derleyin", + "Build_option_0_requires_a_value_of_type_1_5073": "'{0}' derleme seçeneği, {1} türünde bir değer gerektiriyor.", "Building_project_0_6358": "'{0}' projesi derleniyor...", "Call_decorator_expression_90028": "Dekoratör ifadesini çağır", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "'{0}' ve '{1}' çağrı imzası dönüş türleri uyumsuz.", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "Dönüş türü ek açıklaması bulunmayan çağrı imzası, örtük olarak 'any' dönüş türüne sahip.", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "Bağımsız değişken içermeyen çağrı imzaları uyumsuz '{0}' ve '{1}' dönüş türlerine sahip.", "Call_target_does_not_contain_any_signatures_2346": "Çağrı hedefi imza içermiyor.", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "'{0}' bir ad alanı değil tür olduğundan '{0}.{1}' erişimi sağlanamıyor. '{0}[\"{1}\"]' değerini belirterek '{0}' içindeki '{1}' özelliğinin türünü almak mı istediniz?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "'--isolatedModules' bayrağı sağlandığında çevresel const sabit listelerine erişilemiyor.", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "'{0}' oluşturucu türüne '{1}' oluşturucu türü atanamaz.", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "Bir soyut oluşturucu türü, soyut olmayan bir oluşturucu türüne atanamaz.", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "Sabit veya salt okunur bir özellik olduğundan '{0}' özelliğine atama yapılamıyor.", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "Sabit olduğundan '{0}' özelliğine atama yapılamıyor.", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "Salt okunur bir özellik olduğundan '{0}' özelliğine atama yapılamıyor.", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "Değişken olmadığından '{0}' öğesine atama yapılamıyor.", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "'{0}' modülü, modül olmayan bir varlığa çözümlendiğinden genişletilemiyor.", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "Modül olmayan bir varlığa çözümlendiğinden '{0}' modülü, değer dışarı aktarmalarıyla genişletilemiyor.", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "'--module' bayrağı 'amd' veya 'system' olmadığı sürece '{0}' seçeneği kullanılarak modül derlenemez.", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "'--isolatedModules' bayrağı sağlandığında ad alanları derlenemez.", "Cannot_create_an_instance_of_an_abstract_class_2511": "Bir soyut sınıfın örneği oluşturulamaz.", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "Değerin yineleyicisinin 'next' metodu '{1}' türünü beklemesine rağmen kapsayan oluşturucu her zaman '{0}' gönderdiğinden yineleme temsili, değere atanamıyor.", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "'{0}' dışarı aktarılamıyor. Bir modülden yalnızca yerel bildirimler dışarı aktarılabilir.", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "'{0}' sınıfı genişletilemez. Sınıf oluşturucusu, özel olarak işaretlenmiş.", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "'{0}' arabirimi genişletilemiyor. Bunun yerine 'implements' kullanmayı deneyin.", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "Geçerli dizinde tsconfig.json dosyası bulunamıyor: {0}.", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "Belirtilen dizinde tsconfig.json dosyası bulunamıyor: '{0}'.", "Cannot_find_global_type_0_2318": "'{0}' genel türü bulunamıyor.", "Cannot_find_global_value_0_2468": "'{0}' genel değeri bulunamıyor.", "Cannot_find_lib_definition_for_0_2726": "'{0}' için kitaplık tanımı bulunamıyor.", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "'{0}' için kitaplık tanımı bulunamıyor. Şunu mu demek istediniz: '{1}'?", "Cannot_find_module_0_2307": "'{0}' modülü bulunamıyor.", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "'{0}' modülü bulunamıyor. Modülü '.json' uzantısıyla içeri aktarmak için '--resolveJsonModule' kullanmayı deneyin", "Cannot_find_name_0_2304": "'{0}' adı bulunamıyor.", "Cannot_find_name_0_Did_you_mean_1_2552": "'{0}' adı bulunamıyor. Bunu mu demek istediniz: '{1}'?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "'{0}' adı bulunamıyor. 'this.{0}' örnek üyesini mi aradınız?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "'{0}' adı bulunamıyor. '{1}.{0}' statik üyesini mi aradınız?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "'{0}' adı bulunamıyor. Hedef kitaplığınızı değiştirmeniz gerekiyor mu? `lib` derleyici seçeneğini es2015 veya üzeri olarak değiştirmeyi deneyin.", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "'{0}' adı bulunamıyor. Hedef kitaplığınızı değiştirmeniz gerekiyor mu? `lib` derleyici seçeneğini 'dom' içerecek şekilde değiştirmeyi deneyin.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "'{0}' adı bulunamıyor. Test Runner için tür tanımlarını yüklemeniz gerekiyor mu? Şunları deneyin: `npm i @types/jest` veya `npm i @types/mocha`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "'{0}' adı bulunamıyor. Test Runner için tür tanımlarını yüklemeniz gerekiyor mu? Şunları deneyin: `npm i @types/jest` veya `npm i @types/mocha`. Ardından tsconfig dosyanızdaki türler alanına `jest` veya `mocha` ekleyin.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "'{0}' adı bulunamıyor. JQuery için tür tanımlarını yüklemeniz gerekiyor mu? Şunu deneyin: `npm i @types/jquery`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "'{0}' adı bulunamıyor. JQuery için tür tanımlarını yüklemeniz gerekiyor mu? Şunu deneyin: `npm i @types/jquery`. Ardından tsconfig dosyanızdaki türler alanına `jquery` öğesini ekleyin.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "'{0}' adı bulunamıyor. Düğüm için tür tanımlarını yüklemeniz gerekiyor mu? Şunu deneyin: `npm i @types/node`.", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "'{0}' adı bulunamıyor. Düğüm için tür tanımlarını yüklemeniz gerekiyor mu? Şunu deneyin: `npm i @types/node`. Ardından tsconfig dosyanızdaki türler alanına `node` ekleyin.", "Cannot_find_namespace_0_2503": "'{0}' ad alanı bulunamıyor.", "Cannot_find_parameter_0_1225": "'{0}' parametresi bulunamıyor.", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "Giriş dosyalarına ait ortak alt dizin yolu bulunamıyor.", "Cannot_find_type_definition_file_for_0_2688": "'{0}' için tür tanımı dosyası bulunamıyor.", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "Tür bildirim dosyaları içeri aktarılamıyor. '{1}' yerine '{0}' dosyasını içeri aktarmanız önerilir.", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "Dış kapsamdaki '{0}' değişkeni, blok kapsamındaki '{1}' bildirimiyle aynı kapsamda başlatılamaz.", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "Türü bir çağrı imzasına sahip olmayan bir ifade çağrılamaz. '{0}' türünün uyumlu çağrı imzası yok.", "Cannot_invoke_an_object_which_is_possibly_null_2721": "Muhtemelen 'null' olan bir nesne çağrılamıyor.", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "Muhtemelen 'null' veya 'undefined' olan bir nesne çağrılamıyor.", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "Muhtemelen 'undefined' olan bir nesne çağrılamıyor.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "Değerin yineleyicisinin 'next' metodu '{1}' türünü beklemesine rağmen dizi bozma her zaman '{0}' gönderdiğinden değer yinelenemiyor.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "Değerin yineleyicisinin 'next' metodu '{1}' türünü beklemesine rağmen dizi yayılması her zaman '{0}' gönderdiğinden değer yinelenemiyor.", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "Değerin yineleyicisinin 'next' metodu '{1}' türünü beklemesine rağmen for-of her zaman '{0}' gönderdiğinden değer yinelenemiyor.", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "{0}' projesi için 'outFile' ayarlanmadığından başa eklenemiyor", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "'--isolatedModules' bayrağı sağlandığında bir tür yeniden dışarı aktarılamaz.", "Cannot_read_file_0_Colon_1_5012": "'{0}' dosyası okunamıyor: {1}.", "Cannot_redeclare_block_scoped_variable_0_2451": "Blok kapsamlı değişken '{0}', yeniden bildirilemiyor.", "Cannot_redeclare_exported_variable_0_2323": "Dışarı aktarılan '{0}' değişkeni yeniden bildirilemiyor.", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "Catch yan tümcesindeki '{0}' tanımlayıcısı yeniden bildirilemiyor.", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "'{1}' dosyası okunurken hata oluştuğundan '{0}' projesinin çıkışı güncelleştirilemiyor", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "'--jsx' bayrağı sağlanmazsa JSX kullanılamaz.", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "'--module' değeri 'none' olduğunda içeri aktarma, dışarı aktarma veya modül genişletme kullanılamaz.", "Cannot_use_namespace_0_as_a_type_2709": "'{0}' ad alanı, tür olarak kullanılamaz.", "Cannot_use_namespace_0_as_a_value_2708": "'{0}' ad alanı, değer olarak kullanılamaz.", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "Türünde çağrı veya yapı imzası olmayan ifadeyle 'new' kullanılamaz.", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "'{0}' dosyası, başvurulan '{1}' projesi tarafından oluşturulan '.tsbuildinfo' dosyasının üzerine yazacağından bu dosya yazılamıyor", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "Birden fazla giriş dosyası tarafından üzerine yazılacağı için '{0}' dosyası yazılamıyor.", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "Giriş dosyasının üzerine yazacağı için '{0}' dosyası yazılamıyor.", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "Catch yan tümcesi değişkeni bir tür ek açıklamasına sahip olamaz.", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "'{0}' ön ekinin '{1}' - '{2}' için eşleşen en uzun ön ek olup olmadığı denetleniyor.", "Circular_definition_of_import_alias_0_2303": "'{0}' içeri aktarma diğer adının döngüsel tanımı.", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "Yapılandırma çözümlenirken döngüsellik algılandı: {0}", + "Circularity_originates_in_type_at_this_location_2751": "Döngüsellik bu konumdaki türden kaynaklanıyor.", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "'{0}' sınıfı, '{1}' örnek üyesi erişimcisini tanımlar; ancak genişletilmiş '{2}' sınıfı, bunu bir örnek üyesi işlevi olarak tanımlar.", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "'{0}' sınıfı, '{1}' örnek üyesi işlevini tanımlar; ancak genişletilmiş '{2}' sınıfı, bunu bir örnek üyesi erişimcisi olarak tanımlar.", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "'{0}' sınıfı, '{1}' örnek üyesi işlevini tanımlar; ancak genişletilmiş '{2}' sınıfı, bunu bir örnek üyesi özelliği olarak tanımlar.", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "'{0}' sınıfı, '{1}' örnek üyesi özelliğini tanımlar; ancak genişletilmiş '{2}' sınıfı, bunu bir örnek üyesi işlevi olarak tanımlar.", "Class_0_incorrectly_extends_base_class_1_2415": "'{0}' sınıfı, '{1}' temel sınıfını yanlış genişletiyor.", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "'{0}' sınıfı hatalı olarak '{1}' sınıfını uyguluyor. '{1}' sınıfını genişletip üyelerini bir alt sınıf olarak devralmak mı istiyordunuz?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "'{0}' statik sınıf tarafı, '{1}' statik temel sınıf tarafını yanlış genişletiyor.", "Classes_can_only_extend_a_single_class_1174": "Sınıflar yalnızca bir sınıfı genişletebilir.", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "Soyut metotlar içeren sınıflar abstract olarak işaretlenmelidir.", + "Classes_may_not_have_a_field_named_constructor_18006": "Sınıflarda 'constructor' adlı bir alan olmayabilir.", "Command_line_Options_6171": "Komut Satırı Seçenekleri", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "Yapılandırma dosyasının yolu veya 'tsconfig.json' dosyasını içeren klasörün yolu belirtilen projeyi derleyin.", "Compiler_option_0_expects_an_argument_6044": "'{0}' derleyici seçeneği, bağımsız değişken bekliyor.", "Compiler_option_0_requires_a_value_of_type_1_5024": "'{0}' derleyici seçeneği, {1} türünde bir değer gerektiriyor.", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "Özel tanımlayıcı alt düzeyi gösterilirken derleyici '{0}' adını ayırır.", "Composite_projects_may_not_disable_declaration_emit_6304": "Bileşik projeler, bildirim gösterimini devre dışı bırakamaz.", + "Composite_projects_may_not_disable_incremental_compilation_6379": "Bileşik projeler artımlı derlemeyi devre dışı bırakamayabilir.", "Computed_property_names_are_not_allowed_in_enums_1164": "Sabit listelerinde hesaplanan özellik adına izin verilmiyor.", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "Dize değeri içeren üyelerin bulunduğu bir sabit listesinde hesaplanan değerlere izin verilmez.", "Concatenate_and_emit_output_to_single_file_6001": "Çıktıyı tek dosyaya birleştirin ve yayın.", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "'{1}' ve '{2}' içinde '{0}' için çakışan tanımlar bulundu. Çakışmayı çözmek için bu kitaplığın belirli bir versiyonunu yüklemeniz önerilir.", + "Conflicts_are_in_this_file_6201": "Çakışmalar bu dosyada bulunuyor.", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "'{0}' ve '{1}' yapı imzası dönüş türleri uyumlu değil.", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "Dönüş türü ek açıklaması bulunmayan yapı imzası, örtük olarak 'any' dönüş türüne sahip.", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "Bağımsız değişken içermeyen yapı imzaları uyumsuz '{0}' ve '{1}' dönüş türlerine sahip.", "Constructor_implementation_is_missing_2390": "Oluşturucu uygulaması yok.", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "'{0}' sınıfının oluşturucusu özel olduğundan, oluşturucuya yalnızca sınıf bildiriminden erişilebilir.", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "'{0}' sınıfının oluşturucusu korumalı olduğundan, oluşturucuya yalnızca sınıf bildiriminden erişilebilir.", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "Türetilmiş sınıflara ilişkin oluşturucular bir 'super' çağrısı içermelidir.", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "Kapsayıcı dosya belirtilmedi ve kök dizini belirlenemiyor; 'node_modules' klasöründe arama atlanıyor.", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "Türler birbiriyle yeterince örtüşmediğinden '{0}' türünün '{1}' türüne dönüştürülmesi bir hata olabilir. Bu bilerek yapıldıysa, ifadeyi önce 'unknown' değerine dönüştürün.", "Convert_0_to_mapped_object_type_95055": "'{0}' öğesini eşlenen nesne türüne dönüştür", "Convert_all_constructor_functions_to_classes_95045": "Tüm oluşturucu işlevleri sınıflara dönüştür", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "Bir değer olarak kullanılmayan tüm içeri aktarmaları yalnızca tür içeri aktarmalarına dönüştürün", + "Convert_all_re_exported_types_to_type_only_exports_1365": "Yeniden dışarı aktarılan tüm türleri yalnızca tür dışarı aktarmalarına dönüştürün", "Convert_all_require_to_import_95048": "Tüm 'require' öğelerini 'import' olarak dönüştür", + "Convert_all_to_async_functions_95066": "Tümünü asenkron işlevlere dönüştürün", + "Convert_all_to_bigint_numeric_literals_95092": "Tümünü büyük tamsayı sayısal sabit değerlerine dönüştürün", "Convert_all_to_default_imports_95035": "Tümünü varsayılan içeri aktarmalara dönüştür", + "Convert_const_to_let_95093": "'const' ifadesini 'let' ifadesine dönüştürün", + "Convert_default_export_to_named_export_95061": "Varsayılan dışarı aktarmayı adlandırılmış dışarı aktarmaya dönüştürün", "Convert_function_0_to_class_95002": "'{0}' işlevini sınıfa dönüştür", "Convert_function_to_an_ES2015_class_95001": "İşlevi bir ES2015 sınıfına dönüştür", + "Convert_invalid_character_to_its_html_entity_code_95100": "Geçersiz karakteri, karakterin HTML varlık koduna dönüştürün", + "Convert_named_export_to_default_export_95062": "Adlandırılmış dışarı aktarmayı varsayılan dışarı aktarmaya dönüştürün", "Convert_named_imports_to_namespace_import_95057": "Adlandırılmış içeri aktarmaları ad alanı içeri aktarmasına dönüştür", "Convert_namespace_import_to_named_imports_95056": "Ad alanı içeri aktarmasını adlandırılmış içeri aktarmalara dönüştür", + "Convert_parameters_to_destructured_object_95075": "Parametreleri, bozulan nesneye dönüştürün", "Convert_require_to_import_95047": "'require' öğesini 'import' olarak dönüştür", "Convert_to_ES6_module_95017": "ES6 modülüne dönüştür", + "Convert_to_a_bigint_numeric_literal_95091": "Büyük tamsayı sayısal sabit değerine dönüştürün", + "Convert_to_async_function_95065": "Asenkron işleve dönüştürün", "Convert_to_default_import_95013": "Varsayılan içeri aktarmaya dönüştür", + "Convert_to_template_string_95096": "Şablon dizesine dönüştürün", + "Convert_to_type_only_export_1364": "Yalnızca tür dışarı aktarmaya dönüştürün", + "Convert_to_type_only_import_1373": "Yalnızca tür içeri aktarmaya dönüştürün", "Corrupted_locale_file_0_6051": "{0} yerel ayar dosyası bozuk.", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "'{0}' modülü için bildirim dosyası bulunamadı. '{1}' örtülü olarak 'any' türüne sahip.", "Could_not_write_file_0_Colon_1_5033": "'{0}' dosyası yazılamadı: {1}.", "DIRECTORY_6038": "DİZİN", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "Bu dosya için bildirim gösterme, '{0}' özel adını kullanmayı gerektiriyor. Açık tür ek açıklaması, bildirim gösterme engelini kaldırabilir.", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "Bu dosya için bildirim gösterme, '{1}' modülündeki '{0}' özel adını kullanmayı gerektiriyor. Açık tür ek açıklaması, bildirim gösterme engelini kaldırabilir.", "Declaration_expected_1146": "Bildirim bekleniyor.", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "Bildirim adı, yerleşik genel tanımlayıcı '{0}' ile çakışıyor.", "Declaration_or_statement_expected_1128": "Bildirim veya deyim bekleniyor.", + "Declare_a_private_field_named_0_90053": "'{0}' adlı bir özel alan bildirin.", "Declare_method_0_90023": "'{0}' metodunu bildir", "Declare_property_0_90016": "'{0}' özelliğini bildir", "Declare_static_method_0_90024": "'{0}' statik metodunu bildir", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "Buradaki dekoratörler geçerli değil.", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "Dekoratörler aynı ada sahip birden fazla get/set erişimcisine uygulanamaz.", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "Modülün varsayılan dışarı aktarımı '{0}' özel adına sahip veya bu adı kullanıyor.", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "Belirli atama onaylamaları yalnızca bir tür ek açıklaması ile birlikte kullanılabilir.", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "Şu tanımlayıcıların tanımları başka bir dosyadaki tanımlarla çakışıyor: {0}", "Delete_all_unused_declarations_95024": "Kullanılmayan tüm bildirimleri sil", "Delete_the_outputs_of_all_projects_6365": "Tüm projelerin çıkışlarını sil", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[Kullanım Dışı] Bunun yerine '--jsxFactory' kullanın. 'react' JSX gösterimi hedefleniyorsa, createElement için çağrılan nesneyi belirtin", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[Kullanım Dışı] Bunun yerine '--outFile' kullanın. Çıkışı tek bir dosya olarak birleştirin ve gösterin", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[Kullanım Dışı] Bunun yerine '--skipLibCheck' kullanın. Varsayılan kitaplık bildirim dosyalarının tür denetimini atlayın.", + "Did_you_forget_to_use_await_2773": "'await' kullanmayı mı unuttunuz?", + "Did_you_mean_0_1369": "Şunu mu demek istediniz: '{0}'?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "'{0}' değerinin 'new (...args: any[]) => {1}' türüne kısıtlanmasını mı istediniz?", + "Did_you_mean_to_call_this_expression_6212": "Bu ifadeyi mi çağırmak istediniz?", + "Did_you_mean_to_mark_this_function_as_async_1356": "Bu işlevi 'async' olarak işaretlemek mi istediniz?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "Bu işlev türünü ayraç içine almak mı istediniz?", + "Did_you_mean_to_use_new_with_this_expression_6213": "Bu ifadeyle 'new' kullanmak mı istediniz?", "Digit_expected_1124": "Rakam bekleniyor.", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "'{0}' dizini yok, içindeki tüm aramalar atlanıyor.", "Disable_checking_for_this_file_90018": "Bu dosya için denetimi devre dışı bırak", "Disable_size_limitations_on_JavaScript_projects_6162": "JavaScript projelerinde boyut sınırlamalarını devre dışı bırakın.", + "Disable_solution_searching_for_this_project_6224": "Bu proje için çözüm aramayı devre dışı bırakın.", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "İşlev türlerinde genel imzalar için katı denetimi devre dışı bırakın.", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "Başvurulan projelerdeki bildirim dosyaları yerine kaynak dosyalarının kullanımını devre dışı bırakın.", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "Aynı dosyaya yönelik tutarsız büyük/küçük harflere sahip başvurulara izin verme.", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "Derlenen dosya listesine üç eğik çizgi başvuruları veya içeri aktarılan modüller eklemeyin.", "Do_not_emit_comments_to_output_6009": "Çıktıya ait açıklamaları gösterme.", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "Kullanılmayan etiketler ile ilgili hataları bildirme.", "Do_not_resolve_the_real_path_of_symlinks_6013": "Simgesel bağlantıların gerçek yolunu çözümlemeyin.", "Do_not_truncate_error_messages_6165": "Hata iletilerini kesmeyin.", - "Duplicate_declaration_0_2718": "Yinelenen '{0}' bildirimi.", "Duplicate_function_implementation_2393": "Yinelenen işlev uygulaması.", "Duplicate_identifier_0_2300": "Yinelenen tanımlayıcı: '{0}'.", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "Yinelenen tanımlayıcı: '{0}'. Derleyici, bir modülün üst düzey kapsamındaki '{1}' adını ayırır.", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "Yinelenen tanımlayıcı: '_this'. Derleyici, 'this' başvurusunu yakalamak için '_this' değişken bildirimini kullanır.", "Duplicate_label_0_1114": "'{0}' etiketi yineleniyor.", "Duplicate_number_index_signature_2375": "Dizin imzasında yinelenen numara.", + "Duplicate_property_0_2718": "'{0}' özelliğini yineleyin.", "Duplicate_string_index_signature_2374": "Dizin imzasında yinelenen dize.", "Dynamic_import_cannot_have_type_arguments_1326": "Dinamik içeri aktarma, tür bağımsız değişkenleri içeremez", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "Dinamik içeri aktarma yalnızca '--module' bayrağı 'commonjs' veya 'esNext' olduğunda desteklenir.", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "Dinamik içeri aktarma, bağımsız değişken olarak bir tanımlayıcı içermelidir.", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Dinamik içeri aktarmanın tanımlayıcısı 'string' türünde olmalıdır, ancak buradaki tür: '{0}'.", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "Dinamik içeri aktarmalar yalnızca '--module' bayrağı 'es2020', 'esnext', 'commonjs', 'amd', 'system' veya 'umd' olarak ayarlandığında desteklenir.", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "'{0}' birleşim türünün her bir üyesi yapı imzalarına sahip ancak bu imzaların hiçbiri birbiriyle uyumlu değil.", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "'{0}' birleşim türünün her bir üyesi imzalara sahip ancak bu imzaların hiçbiri birbiriyle uyumlu değil.", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "'{0}' türündeki ifade '{1}' türünün dizinini oluşturmak için kullanılamadığından öğe, örtük olarak 'any' türüne sahip.", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "Dizin ifadesi 'number' türünde olmadığından, öğe örtük olarak 'any' türü içeriyor.", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "'{0}' türünün dizin imzası olmadığından öğe dolaylı olarak 'any' türüne sahip.", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "'{0}' türünün dizin imzası olmadığından öğe, örtük olarak 'any' türüne sahip. '{1}' türünü mü çağırmak istediniz?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "Çıkış dosyalarının başında bir UTF-8 Bayt Sırası İşareti (BOM) gösterin.", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "Ayrı bir dosya oluşturmak yerine, kaynak eşlemeleri içeren tek bir dosya gösterin.", + "Emit_class_fields_with_Define_instead_of_Set_6222": "Sınıf alanlarını Set yerine Define ile gösterin.", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "Kaynağı, kaynak eşlemeleri ile birlikte tek bir dosya içinde gösterin; '--inlineSourceMap' veya '--sourceMap' öğesinin ayarlanmasını gerektirir.", "Enable_all_strict_type_checking_options_6180": "Tüm katı tür denetleme seçeneklerini etkinleştirin.", + "Enable_incremental_compilation_6378": "Artımlı derlemeyi etkinleştir", "Enable_project_compilation_6302": "Proje derlemeyi etkinleştir", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "İşlevlerde katı 'bind', 'call' ve 'apply' metotlarını etkinleştirin.", "Enable_strict_checking_of_function_types_6186": "İşlev türleri üzerinde katı denetimi etkinleştirin.", "Enable_strict_checking_of_property_initialization_in_classes_6187": "Sınıflarda sıkı özellik başlatma denetimini etkinleştirin.", "Enable_strict_null_checks_6113": "Katı null denetimlerini etkinleştir.", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "Yapılandırma dosyanızda 'experimentalDecorators' seçeneğini etkinleştirin", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "Yapılandırma dosyanızda '--jsx' bayrağını etkinleştirin", "Enable_tracing_of_the_name_resolution_process_6085": "Ad çözümleme işlemini izlemeyi etkinleştir.", "Enable_verbose_logging_6366": "Ayrıntılı günlüğe yazmayı etkinleştir", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "Tüm içeri aktarma işlemleri için ad alanı nesnelerinin oluşturulması aracılığıyla CommonJS ile ES Modülleri arasında yayımlama birlikte çalışabilirliğine imkan tanır. Şu anlama gelir: 'allowSyntheticDefaultImports'.", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "Sabit listesi üyesi bekleniyor.", "Enum_member_must_have_initializer_1061": "Sabit listesi üyesi bir başlatıcıya sahip olmalıdır.", "Enum_name_cannot_be_0_2431": "Sabit listesi adı '{0}' olamaz.", + "Enum_type_0_circularly_references_itself_2586": "'{0}' sabit listesi türü döngüsel olarak kendine başvuruyor.", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "Sabit listesi türü '{0}', sabit değer olmayan başlatıcılara sahip üyeler içeriyor.", "Examples_Colon_0_6026": "Örnekler: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "Aşırı yığın derinliği, '{0}' ve '{1}' türlerini karşılaştırıyor.", @@ -385,9 +490,9 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "En az {0} bağımsız değişken bekleniyordu ancak {1} veya daha fazla bağımsız değişken alındı.", "Expected_corresponding_JSX_closing_tag_for_0_17002": "'{0}' için ilgili JSX kapanış etiketi bekleniyor.", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "JSX parçasına karşılık gelen kapanış etiketi bekleniyordu.", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "'Package.json' öğesindeki '{0}' alanının türünün 'string' olması bekleniyordu, ancak '{1}' alındı.", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "'package.json' dosyasındaki '{0}' alanının '{1}' türünde olması bekleniyordu ancak '{2}' alındı.", "Experimental_Options_6177": "Deneysel Seçenekler", - "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "Dekoratörler için sunulan deneysel destek özelliği, sonraki sürümlerde değiştirilebilir. Bu uyarıyı kaldırmak için 'experimentalDecorators' seçeneğini ayarlayın.", + "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "Dekoratörler için sunulan deneysel destek özelliği, sonraki sürümlerde değiştirilebilir. Bu uyarıyı kaldırmak için 'tsconfig' veya 'jsconfig' dosyanızdaki 'experimentalDecorators' seçeneğini ayarlayın.", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "Açık olarak belirtilen modül çözümleme türü: '{0}'.", "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "ECMAScript modülleri hedeflenirken dışarı aktarma ataması kullanılamaz. Bunun yerine 'export default' veya başka bir modül biçimi kullanmayı deneyin.", "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "'--module' bayrağı 'system' ise dışarı aktarma ataması desteklenmez.", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "Modül genişletmelerinde dışarı aktarmalara ve dışarı aktarma atamalarına izin verilmez.", "Expression_expected_1109": "İfade bekleniyor.", "Expression_or_comma_expected_1137": "İfade veya virgül bekleniyor.", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "İfade, temsili çok karmaşık olan bir birleşim türü oluşturuyor.", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "İfade, derleyicinin temel sınıf başvurusunu yakalamak için kullandığı '_super' öğesi olarak çözümleniyor.", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "İfade, derleyicinin zaman uyumsuz işlevleri desteklemek için kullandığı '{0}' değişken bildirimi olarak çözümleniyor.", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "İfade, derleyicinin 'new.target' meta-özellik başvurusu yakalamak için kullandığı '_newTarget' değişken bildirimi olarak çözümleniyor.", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "{1} içindeki {0} konumuna ayıkla", "Extract_to_0_in_1_scope_95008": "{1} kapsamındaki {0} konumuna ayıkla", "Extract_to_0_in_enclosing_scope_95007": "Çevreleyen kapsamdaki {0} konumuna ayıkla", + "Extract_to_interface_95090": "Arabirime ayıkla", + "Extract_to_type_alias_95078": "Tür diğer adına ayıkla", + "Extract_to_typedef_95079": "typedef'e ayıkla", + "Extract_type_95077": "Türü ayıkla", "FILE_6035": "DOSYA", "FILE_OR_DIRECTORY_6040": "DOSYA VEYA DİZİN", "Failed_to_parse_file_0_Colon_1_5014": "'{0}' dosyası ayrıştırılamadı: {1}.", "Fallthrough_case_in_switch_7029": "switch deyiminde sonraki ifadeye geçiş.", "File_0_does_not_exist_6096": "'{0}' adlı dosya yok.", "File_0_exist_use_it_as_a_name_resolution_result_6097": "'{0}' adlı dosya yok; bunu bir çözümleme sonucu olarak kullanın.", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "'{0}' dosyası desteklenmeyen uzantıya sahip. Yalnızca şu uzantılar desteklenir: {1}.", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "'{0}' dosyasının desteklenmeyen bir uzantısı olduğundan dosya atlanıyor.", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "'{0}' dosyası desteklenmeyen uzantıya sahip. Yalnızca {1} uzantıları desteklenir.", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "'{0}' dosyası bir JavaScript dosyasıdır. 'allowJs' seçeneğini mi etkinleştirmek istediniz?", "File_0_is_not_a_module_2306": "'{0}' dosyası bir modül değil.", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "'{0}' dosyası, proje dosyası listesinde değil. Projelerin tüm dosyaları listelemesi veya bir 'include' düzeni kullanması gerekir.", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "'{0}' dosyası, '{1}' projesinin dosya listesinde değil. Projelerin tüm dosyaları listelemesi veya bir 'include' deseni kullanması gerekir.", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "'{0}' dosyası, 'rootDir' '{1}' dizininde değil. 'rootDir' dizininin tüm kaynak dosyalarını içermesi bekleniyor.", "File_0_not_found_6053": "'{0}' dosyası bulunamadı.", "File_change_detected_Starting_incremental_compilation_6032": "Dosya değişikliği algılandı. Artımlı derleme başlatılıyor...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "Dosya belirtimi, özyinelemeli dizin joker karakterinden ('**') sonra görünen bir üst dizin ('..') içeremez: '{0}'.", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "Dosya belirtimi, özyinelemeli dizin joker karakter ('**') ile bitemez: '{0}'.", "Fix_all_detected_spelling_errors_95026": "Algılanan tüm yazım hatalarını düzelt", + "Fix_all_expressions_possibly_missing_await_95085": "'await' deyiminin eksik olabileceği tüm ifadeleri düzeltin", + "Found_0_errors_6217": "{0} hata bulundu.", "Found_0_errors_Watching_for_file_changes_6194": "{0} hata bulundu. Dosya değişiklikleri izleniyor.", + "Found_1_error_6216": "1 hata bulundu.", "Found_1_error_Watching_for_file_changes_6193": "1 hata bulundu. Dosya değişiklikleri izleniyor.", "Found_package_json_at_0_6099": "'{0}' içinde 'package.json' bulundu.", - "Found_package_json_at_0_Package_ID_is_1_6190": "'{0}' konumunda 'package.json' bulundu. Paket kimliği '{1}'.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "Katı modda 'ES3' veya 'ES5' hedeflenirken blokların içinde işlev bildirimlerine izin verilmez.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "Katı modda 'ES3' veya 'ES5' hedeflenirken blokların içinde işlev bildirimlerine izin verilmez. Sınıf tanımları otomatik olarak katı moddadır.", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "Katı modda 'ES3' veya 'ES5' hedeflenirken blokların içinde işlev bildirimlerine izin verilmez. Modüller otomatik olarak katı moddadır.", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "İşlevin sonunda return deyimi eksik ve dönüş türü 'undefined' içermiyor.", "Function_overload_must_be_static_2387": "İşlev aşırı yüklemesi statik olmalıdır.", "Function_overload_must_not_be_static_2388": "İşlev aşırı yüklemesi statik olmamalıdır.", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "Dönüş türü ek açıklaması bulunmayan işlev türü, örtük olarak '{0}' dönüş türüne sahip.", "Generate_get_and_set_accessors_95046": "'get' ve 'set' erişimcilerini oluşturun", + "Generates_a_CPU_profile_6223": "Bir CPU profili oluşturur.", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "Karşılık gelen her '.d.ts' dosyası için bir kaynak eşlemesi oluşturur.", "Generates_corresponding_d_ts_file_6002": "İlgili '.d.ts' dosyasını oluşturur.", "Generates_corresponding_map_file_6043": "İlgili '.map' dosyasını oluşturur.", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "Oluşturucu herhangi bir değer içermediğinden örtük olarak '{0}' türüne sahip. Bir dönüş türü sağlamayı göz önünde bulundurun.", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "Oluşturucu herhangi bir değer sağlamadığından örtük olarak '{0}' türüne sahip. Bir dönüş türü ek açıklaması sağlamayı deneyin.", "Generators_are_not_allowed_in_an_ambient_context_1221": "Çevresel bağlamda oluşturuculara izin verilmez.", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "Oluşturucular yalnızca ECMEAScript 2015 veya üstü hedeflenirken kullanılabilir.", "Generic_type_0_requires_1_type_argument_s_2314": "'{0}' genel türü, {1} tür bağımsız değişkenini gerektiriyor.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "'{0}' genel türü {1} ile {2} arasında bağımsız değişken gerektirir.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "Genel tür örneği oluşturma işlemi, fazla ayrıntılı ve büyük olasılıkla sınırsız.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Alıcı ve ayarlayıcı erişimcileri görünürlükte anlaşamıyor.", "Global_module_exports_may_only_appear_at_top_level_1316": "Genel modül dışarı aktarmaları yalnızca en üst düzeyde görünebilir.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "Genel modül dışarı aktarmaları yalnızca bildirim dosyalarında görünebilir.", "Global_module_exports_may_only_appear_in_module_files_1314": "Genel modül dışarı aktarmaları yalnızca modül dosyalarında görünebilir.", "Global_type_0_must_be_a_class_or_interface_type_2316": "'{0}' genel türü, bir sınıf veya arabirim türü olmalıdır.", "Global_type_0_must_have_1_type_parameter_s_2317": "'{0}' genel türü, {1} türünde parametre içermelidir.", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "'--incremental' ve '--watch' içinde yeniden derlemelerin olması, bir dosya içindeki değişikliklerin yalnızca doğrudan buna bağımlı olan dosyaları etkileyeceğini varsayar.", "Hexadecimal_digit_expected_1125": "Onaltılık basamak bekleniyor.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "Tanımlayıcı bekleniyor. '{0}', katı modda ayrılmış bir sözcüktür.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "Tanımlayıcı bekleniyor. '{0}', katı modda ayrılmış bir sözcüktür. Sınıf tanımları otomatik olarak katı moddadır.", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "Tanımlayıcı bekleniyor. '{0}', katı modda ayrılmış bir sözcüktür. Modüller otomatik olarak katı moddadır.", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "Tanımlayıcı bekleniyor. '{0}', burada kullanılamayan ayrılmış bir sözcüktür.", "Identifier_expected_1003": "Tanımlayıcı bekleniyor.", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "Tanımlayıcı bekleniyor. '__esModule', ECMAScript modülleri dönüştürülürken, dışarı aktarılan bir işaretçi olarak ayrılmış.", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "'{0}' paketi bu modülü gerçekten kullanıma sunarsa, 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}` öğesini düzeltmek için bir çekme isteği göndermeyi deneyin", "Ignore_this_error_message_90019": "Bu hata iletisini yoksay", "Implement_all_inherited_abstract_classes_95040": "Devralınan tüm soyut sınıfları uygula", "Implement_all_unimplemented_interfaces_95032": "Uygulanmayan tüm arabirimleri uygula", "Implement_inherited_abstract_class_90007": "Devralınan soyut sınıfı uygula", "Implement_interface_0_90006": "'{0}' arabirimini uygula", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "'{1}' özel adına sahip veya bu adı kullanan '{0}' dışarı aktarılan sınıfının yan tümcesini uygular.", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "'symbol' öğesinin örtük olarak 'string' türüne dönüştürülmesi işlemi çalışma zamanında başarısız olur. Bu ifadeyi 'String(...)' içinde sarmalamayı düşünün.", "Import_0_from_module_1_90013": "\"{1}\" modülünden '{0}' öğesini içeri aktar", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "ECMAScript modülleri hedeflenirken içeri aktarma ataması kullanılamaz. Bunun yerine 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"' veya başka bir modül biçimi kullanmayı deneyin.", "Import_declaration_0_is_using_private_name_1_4000": "'{0}' içeri aktarma bildirimi, '{1}' özel adına sahip veya bu adı kullanıyor.", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "İçeri aktarma bildirimi, yerel '{0}' bildirimiyle çakışıyor.", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "Ad alanındaki içeri aktarma bildirimleri bir modüle başvuramaz.", + "Import_default_0_from_module_1_90032": "Varsayılan '{0}' öğesini \"{1}\" modülünden içeri aktar", "Import_emit_helpers_from_tslib_6139": "'Tslib'den yayma yardımcılarını içeri aktar.", "Import_may_be_converted_to_a_default_import_80003": "İçeri aktarma varsayılan bir içeri aktarmaya dönüştürülebilir.", "Import_name_cannot_be_0_2438": "İçeri aktarma adı '{0}' olamaz.", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "Modül genişletmelerinde içeri aktarmalara izin verilmez. Bunları, kapsayan dış modüle taşımanız önerilir.", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "Çevresel sabit listesi bildirimlerinde, üye başlatıcısı sabit ifade olmalıdır.", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "Birden fazla bildirime sahip sabit listesinde yalnızca bir bildirim ilk sabit listesi öğesine ait başlatıcıyı atlayabilir.", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "'const' sabit listesi bildirimlerinde, üye başlatıcısı sabit ifade olmalıdır.", "Include_modules_imported_with_json_extension_6197": "'.json' uzantısıyla içeri aktarılan modülleri dahil et", "Index_signature_in_type_0_only_permits_reading_2542": "'{0}' türündeki dizin imzası yalnızca okumaya izin veriyor.", "Index_signature_is_missing_in_type_0_2329": "'{0}' türündeki dizin imzası yok.", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "'{0}' birleştirilmiş bildirimindeki bildirimlerin tümü dışarı aktarılmış veya yerel olmalıdır.", "Infer_all_types_from_usage_95023": "Tüm türleri kullanımdan çıkar", "Infer_parameter_types_from_usage_95012": "Parametre türleri için kullanımdan çıkarım yap", + "Infer_this_type_of_0_from_usage_95080": "Kullanımdan '{0}' öğesinin 'this' türünü çıkarsa", "Infer_type_of_0_from_usage_95011": "'{0}' türü için kullanımdan çıkarım yap", "Initialize_property_0_in_the_constructor_90020": "Oluşturucu içinde '{0}' özelliğini başlat", "Initialize_static_property_0_90021": "'{0}' statik özelliğini başlat", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "JSDoc '...' yalnızca bir imzanın son parametresi içinde görünebilir.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "JSDoc '@param' etiketinin adı '{0}' ancak bu ada sahip bir parametre yok.", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "JSDoc '@param' etiketi '{0}' adına sahip ancak bu ada sahip bir parametre yok. Bir dizi türü olsaydı 'arguments' ile eşleşirdi.", + "JSDoc_type_0_circularly_references_itself_2587": "'{0}' JSDoc türü döngüsel olarak kendine başvuruyor.", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "JSDoc '@typedef' etiketi bir tür ek açıklamasına sahip olmalıdır veya sonrasında '@property' ya da '@member' etiketlerinden biri gelmelidir.", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "JSDoc türleri yalnızca belge açıklamalarının içinde kullanılabilir.", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "JSDoc türleri TypeScript türlerine taşınabilir.", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "JSX öğesi türü '{0}', oluşturma veya çağrı imzasına sahip değil.", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "JSX öğesi türü '{0}', JSX öğelerine ait bir oluşturucu işlevi değil.", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "JSX öğeleri aynı ada sahip birden fazla özniteliğe sahip olamaz.", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "JSX ifadeleri virgül işlecini kullanamaz. Bir dizi mi yazmak istediniz?", "JSX_expressions_must_have_one_parent_element_2657": "JSX ifadelerinin bir üst öğesi olmalıdır.", "JSX_fragment_has_no_corresponding_closing_tag_17014": "JSX parçasına karşılık gelen bir kapatma etiketi yok.", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "Satır içi JSX fabrika pragma'sı kullanılırken JSX parçası desteklenmez", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "JSX yayılma alt öğesi, bir dizi türü olmalıdır.", "Jump_target_cannot_cross_function_boundary_1107": "Atlama hedefi işlev sınırını geçemez.", "KIND_6034": "TÜR", + "Keywords_cannot_contain_escape_characters_1260": "Anahtar sözcükler kaçış karakterleri içeremez.", "LOCATION_6037": "KONUM", "Language_service_is_disabled_9004": "Dil hizmeti devre dışı.", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "Virgül işlecinin sol tarafı kullanılmıyor ve herhangi bir yan etkisi yok.", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "Oluşturucudaki ilk deyime 'super()' tarafından çağrı yapılmasını sağla", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "Eşleştirilmiş nesne türü örtük olarak 'any' şablon türüne sahip.", "Member_0_implicitly_has_an_1_type_7008": "'{0}' üyesi örtük olarak '{1}' türüne sahip.", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "'{0}' üyesi örtük olarak bir '{1}' türüne sahip ancak kullanımdan daha iyi bir tür çıkarsanabilir.", "Merge_conflict_marker_encountered_1185": "Birleştirme çakışması işaretçisiyle karşılaşıldı.", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "'{0}' birleştirilen bildirimi, varsayılan bir dışarı aktarma bildirimini içeremez. Bunun yerine ayrı bir 'export default {0}' bildirimi eklemeyi göz önünde bulundurun.", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "'{0}' meta-özelliğine yalnızca bir işlev bildiriminin, işlev ifadesinin veya oluşturucunun gövdesinde izin verilir.", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "Dışarı aktarılan arabirimin '{0}' metodu, '{2}' özel modülündeki '{1}' adına sahip veya bu adı kullanıyor.", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "Dışarı aktarılan arabirimin '{0}' metodu, '{1}' özel adına sahip veya bu adı kullanıyor.", "Modifiers_cannot_appear_here_1184": "Değiştiriciler burada görüntülenemez.", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "'{0}' modülü bir türe başvurmuyor ancak burada bir tür olarak kullanılmış.", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "'{0}' modülü yalnızca varsayılan olarak '{1}' bayrağı kullanılarak içeri aktarılabilir", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "'{0}' modülü '{1}' öğesini yerel olarak bildiriyor ancak '{2}' olarak dışarı aktarıldı.", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "'{0}' modülü '{1}' öğesini yerel olarak bildiriyor ancak dışarı aktarılmadı.", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "'{0}' modülü bir türe başvurmuyor ancak burada bir tür olarak kullanılmış. Şunu mu demek istediniz?: 'typeof import('{0}')'", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "'{0}' modülü bir değere başvurmuyor ancak burada bir değer olarak kullanılmış.", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "{0} modülü, '{1}' adlı bir üyeyi zaten dışarı aktardı. Belirsizliği çözmek için açık olarak yeniden dışarı aktarmayı göz önünde bulundurun.", "Module_0_has_no_default_export_1192": "'{0}' modülü için varsayılan dışarı aktarma yok.", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "'{0}' modülünün varsayılan dışarı aktarması yok. Bunun yerine 'import { {1} } from {0}' kullanmak mı istediniz?", "Module_0_has_no_exported_member_1_2305": "'{0}' modülü, dışarı aktarılan '{1}' üyesine sahip değil.", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "{0}' modülünün dışarı aktarılan '{1}' adlı bir üyesi yok. Şunu mu demek istediniz: '{2}'?", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "'{0}' modülünün dışarı aktarılmış '{1}' üyesi yok. Bunun yerine 'import {1} from {0}' kullanmak mı istediniz?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "'{0}' modülü, aynı ada sahip bir yerel bildirim tarafından gizleniyor.", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "'{0}' modülü, modül olmayan bir varlığa çözümleniyor ve bu oluşturma ile içeri aktarılamaz.", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "'{0}' modülü 'export =' kullanıyor ve 'export *' ile birlikte kullanılamaz.", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "'{1}' dosyası değiştirilmediğinden '{0}' modülü, bu dosyada bildirilen çevresel modül olarak çözümlendi.", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "'{0}' modülü, '{1}' dosyasında yerel olarak bildirilmiş çevresel modül olarak çözümlendi.", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "'{0}' modülü '{1}' olarak çözüldü ancak '--jsx' ayarlanmadı.", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "'{0}' modülü '{1}' olarak çözümlendi ancak '--resolveJsonModule' kullanılmadı.", "Module_Resolution_Options_6174": "Modül Çözümleme Seçenekleri", "Module_name_0_matched_pattern_1_6092": "Modül adı: '{0}', eşleşen desen: '{1}'.", "Module_name_0_was_not_resolved_6090": "======== '{0}' modül adı çözümlenemedi. ========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== '{0}' modül adı '{1}' öğesine başarıyla çözümlendi. ========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== '{0}' modül adı '{2}' Paket Kimliğiyle '{1}' olarak başarıyla çözümlendi. ========", "Module_resolution_kind_is_not_specified_using_0_6088": "Modül çözümleme türü belirtilmedi, '{0}' kullanılıyor.", "Module_resolution_using_rootDirs_has_failed_6111": "'rootDirs' kullanarak modül çözümleme başarısız oldu.", "Move_to_a_new_file_95049": "Yeni bir dosyaya taşı", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "'{1}' ve '{2}' türündeki '{0}' adlı özellikler aynı değil.", "Namespace_0_has_no_exported_member_1_2694": "'{0}' ad alanında dışarı aktarılan '{1}' üyesi yok.", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "Hiçbir temel oluşturucu, belirtilen tür bağımsız değişkeni sayısına sahip değil.", + "No_constituent_of_type_0_is_callable_2755": "'{0}' türünde çağrılabilir bileşen yok.", + "No_constituent_of_type_0_is_constructable_2759": "'{0}' türünde oluşturulabilir bileşen yok.", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "'{1}' türü üzerinde '{0}' türünde parametreye sahip dizin imzası bulunamadı.", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "'{0}' yapılandırma dosyasında giriş bulunamadı. Belirtilen 'include' yolları: '{1}', 'exclude' yolları: '{2}'.", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "{0} bağımsız değişken bekleyen aşırı yükleme yok ancak {1} veya {2} bağımsız değişken bekleyen aşırı yüklemeler var.", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "{0} tür bağımsız değişkeni bekleyen aşırı yükleme yok ancak {1} veya {2} tür bağımsız değişkeni bekleyen aşırı yüklemeler var.", + "No_overload_matches_this_call_2769": "Bu çağrıyla eşleşen aşırı yükleme yok.", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "'{0}' toplu özelliği için kapsamda değer yok. Bir değer tanımlayın ya da bir başlatıcı sağlayın.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "Soyut olmayan '{0}' sınıfı, '{2}' sınıfından devralınan '{1}' soyut üyesini uygulamıyor.", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "Soyut olmayan sınıf ifadesi, '{1}' sınıfından devralınan '{0}' soyut üyesini uygulamıyor.", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "Null olmayan onaylamalar yalnızca TypeScript dosyalarında kullanılabilir.", + "Non_simple_parameter_declared_here_1348": "Basit olmayan parametre burada bildirildi.", "Not_all_code_paths_return_a_value_7030": "Tüm kod yolları bir değer döndürmez.", + "Not_all_constituents_of_type_0_are_callable_2756": "'{0}' türündeki tüm bileşenler çağrılabilir değil.", + "Not_all_constituents_of_type_0_are_constructable_2760": "'{0}' türündeki tüm bileşenler oluşturulabilir değil.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "'{0}' sayısal dizin türü, '{1}' dize dizini türüne atanamaz.", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "2^53 veya üzeri mutlak değerlere sahip sayısal sabit değerler, tamsayı olarak doğru bir şekilde temsil edilemeyecek kadar büyüktür.", "Numeric_separators_are_not_allowed_here_6188": "Burada sayısal ayırıcılara izin verilmez.", "Object_is_of_type_unknown_2571": "Nesne 'unknown' türünde.", "Object_is_possibly_null_2531": "Nesne büyük olasılıkla 'null'.", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "Sabit listesi üyelerinin başlatıcısında sekizlik sabit değerlere izin verilmez. '{0}' söz dizimini kullanın.", "Octal_literals_are_not_allowed_in_strict_mode_1121": "Katı modda sekizlik sabit değerlere izin verilmez.", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "ECMAScript 5 ve üzeri hedeflenirken sekizlik sabit değerler kullanılamaz. '{0}' söz dizimini kullanın.", + "Only_ECMAScript_imports_may_use_import_type_1370": "Yalnızca ECMAScript içeri aktarma işlemleri 'import type' kullanabilir.", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "'for...in' deyiminde yalnızca tek bir değişken bildirimine izin verilir.", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "'for...of' deyiminde yalnızca tek bir değişken bildirimine izin verilir.", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "'new' anahtar sözcüğüyle yalnızca void işlevi çağrılabilir.", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "Yalnızca '.d.ts' bildirim dosyalarını yayımla.", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "Sınıf 'extends' yan tümceleri içinde, şu an için yalnızca isteğe bağlı tür bağımsız değişkenlerine sahip tanımlayıcılar/tam adlar destekleniyor.", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "'super' anahtar sözcüğüyle yalnızca temel sınıfa ait ortak ve korunan metotlara erişilebilir.", + "Operator_0_cannot_be_applied_to_type_1_2736": "'{0}' işleci '{1}' türüne uygulanamıyor.", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "'{0}' işleci, '{1}' ve '{2}' türüne uygulanamaz.", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "'{0}' seçeneği yalnızca 'tsconfig.json' dosyasında belirtilebilir.", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "'{0} seçeneği yalnızca '--inlineSourceMap' veya '--sourceMap' seçeneği sağlandığında kullanılabilir.", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "'target' seçeneği 'ES3' olduğunda '{0}' seçeneği belirtilemiyor.", "Option_0_cannot_be_specified_with_option_1_5053": "'{0}' seçeneği, '{1}' seçeneği ile belirtilemez.", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "'{0}' seçeneği, '{1}' seçeneği belirtilmeden belirtilemez.", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "'{1}' seçeneği veya '{2}' seçeneği belirtilmeden '{0}' seçeneği belirtilemez.", "Option_0_should_have_array_of_strings_as_a_value_6103": "'{0}' seçeneği değer olarak, dizelerden oluşan bir dizi içermelidir.", "Option_build_must_be_the_first_command_line_argument_6369": "'--build' seçeneği ilk komut satırı bağımsız değişkeni olmalıdır.", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "'--incremental' seçeneği yalnızca tsconfig kullanılarak, tek dosyada gösterilerek veya `--tsBuildInfoFile` seçeneği sağlandığında belirtilebilir.", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "'isolatedModules' seçeneği, yalnızca '--module' sağlandığında veya 'target' seçeneği 'ES2015' veya daha yüksek bir sürüm değerine sahip olduğunda kullanılabilir.", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "'Paths' seçeneği, '--baseUrl' seçeneği belirtilmeden kullanılamaz.", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "'project' seçeneği, komut satırındaki kaynak dosyalarıyla karıştırılamaz.", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "'--resolveJsonModule' seçeneği yalnızca modül kodu oluşturma 'commonjs', 'amd', 'es2015' veya 'esNext' olduğunda belirtilebilir.", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "'node' modül çözümleme stratejisi olmadan '--resolveJsonModule' seçeneği belirtilemez.", "Options_0_and_1_cannot_be_combined_6370": "'{0}' ve '{1}' seçenekleri birleştirilemez.", "Options_Colon_6027": "Seçenekler:", "Output_directory_for_generated_declaration_files_6166": "Oluşturulan bildirim dosyaları için çıkış dizini.", "Output_file_0_from_project_1_does_not_exist_6309": "'{1}' projesinden '{0}' çıkış dosyası yok", "Output_file_0_has_not_been_built_from_source_file_1_6305": "Çıkış dosyası '{0}' '{1}' kaynak dosyasından oluşturulmamış.", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "Aşırı yükleme imzası işlev uygulamasıyla uyumlu değil.", + "Overload_0_of_1_2_gave_the_following_error_2772": "{1} metodunun {0} aşırı yüklemesi ('{2}'), aşağıdaki hatayı verdi.", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "Aşırı yükleme imzalarının hepsi soyut veya soyut olmayan olmalıdır.", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "Aşırı yükleme imzalarının tümü çevresel veya çevresel olmayan türde olmalıdır.", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "Aşırı yükleme imzalarının hepsi dışarı aktarılmış veya dışarı aktarılmamış olmalıdır.", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "Aşırı yükleme imzalarının tümü ortak, özel veya korumalı olmalıdır.", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "'{0}' parametresine başlatıcısında başvurulamaz.", "Parameter_0_implicitly_has_an_1_type_7006": "'{0}' parametresi örtük olarak '{1}' türüne sahip.", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "'{0}' parametresi örtük olarak bir '{1}' türüne sahip ancak kullanımdan daha iyi bir tür çıkarsanabilir.", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "'{0}' parametresi, '{1}' parametresi ile aynı konumda değil.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "Erişimcinin '{0}' parametresi, {2} dış modülündeki '{1}' adına sahip veya bu adı kullanıyor ancak adlandırılamıyor.", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "Erişimcinin '{0}' parametresi, '{2}' özel modülündeki '{1}' adına sahip veya bu adı kullanıyor.", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "Erişimcinin '{0}' parametresi, '{1}' özel adına sahip veya bu adı kullanıyor.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "Dışarı aktarılan arabirimdeki çağrı imzasının '{0}' parametresi, '{2}' özel modülündeki '{1}' adına sahip veya bu adı kullanıyor.", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "Dışarı aktarılan arabirimdeki çağrı imzasının '{0}' parametresi, '{1}' özel adına sahip veya bu adı kullanıyor.", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "Dışarı aktarılan sınıftaki oluşturucunun '{0}' parametresi, {2} dış modülündeki '{1}' adına sahip veya bu adı kullanıyor, ancak adlandırılamıyor.", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "Dışarı aktarılan sınıftaki statik metodun '{0}' parametresi, '{1}' özel adına sahip veya bu adı kullanıyor.", "Parameter_cannot_have_question_mark_and_initializer_1015": "Parametre soru işareti ve başlatıcı içeremez.", "Parameter_declaration_expected_1138": "Parametre bildirimi bekleniyor.", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "Parametrenin adı var ancak türü yok. Şunu mu demek istediniz: '{0}: {1}'?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "Parametre değiştiricileri yalnızca TypeScript dosyalarında kullanılabilir.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "Dışarı aktarılan sınıftaki genel ayarlayıcı '{0}' için parametre türü, '{2}' özel modülündeki '{1}' adına sahip veya bu adı kullanıyor.", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "Dışarı aktarılan sınıftaki genel ayarlayıcı '{0}' için parametre türü, '{1}' özel adına sahip veya bu adı kullanıyor.", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "Dışarı aktarılan sınıftaki genel statik ayarlayıcı '{0}' için parametre türü, '{2}' özel modülündeki '{1}' adına sahip veya bu adı kullanıyor.", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "Katı modda ayrıştırın ve her kaynak dosya için \"use strict\" kullanın.", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "'{0}' deseni en fazla bir adet '*' karakteri içerebilir.", "Prefix_0_with_an_underscore_90025": "'{0}' için ön ek olarak alt çizgi kullan", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "Hatalı tüm özellik bildirimlerinin başına 'declare' ekleyin", "Prefix_all_unused_declarations_with_where_possible_95025": "Mümkün olduğunda tüm kullanılmayan bildirimlerin başına '_' ekle", + "Prefix_with_declare_95094": "Başına 'declare' ekleyin", "Print_names_of_files_part_of_the_compilation_6155": "Derlemenin parçası olan dosyaların adlarını yazdırın.", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "Derlemenin parçası olan dosyaların adlarını yazdırın ve sonra işlemeyi durdurun.", "Print_names_of_generated_files_part_of_the_compilation_6154": "Oluşturulan dosyalardan, derlemenin parçası olanların adlarını yazdırın.", "Print_the_compiler_s_version_6019": "Derleyici sürümünü yazdır.", + "Print_the_final_configuration_instead_of_building_1350": "Derlemek yerine son yapılandırmayı yazdırın.", "Print_this_message_6017": "Bu iletiyi yazdır.", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "Değişken bildirimlerinde özel tanımlayıcılara izin verilmiyor.", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "Sınıf gövdelerinin dışında özel tanımlayıcılara izin verilmiyor.", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "Özel tanımlayıcılar yalnızca ECMAScript 2015 veya üzeri hedeflenirken kullanılabilir.", + "Private_identifiers_cannot_be_used_as_parameters_18009": "Özel tanımlayıcılar parametre olarak kullanılamaz", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "Özel veya korumalı '{0}' üyesine bir tür parametresinde erişilemiyor.", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "'{0}' projesinin '{1}' bağımlılığında hatalar olduğundan proje derlenemiyor", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "'{0}' projesinin '{1}' bağımlılığı derlenmediğinden proje derlenemiyor", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "'{0}' projesinin '{1}' bağımlılığı güncel olmadığından proje güncel değil", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "En eski '{1}' çıkışı en yeni '{2}' girişinden daha eski olduğundan '{0}' projesi güncel değil", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "Çıkış dosyası '{1}' mevcut olmadığından '{0}' projesi güncel değil", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "'{0}' projesinin çıkışı geçerli '{2}' sürümünden farklı olan '{1}' sürümü ile oluşturulduğundan proje güncel değil", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "'{0}' projesinin '{1}' bağımlılığı değiştirildiğinden proje güncel değil", "Project_0_is_up_to_date_6361": "'{0}' projesi güncel", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "En yeni '{1}' girişi en eski '{2}' çıkışından daha eski olduğundan '{0}' projesi güncel", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "'{0}' projesi bağımlılıklarından d.ts dosyaları ile güncel", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "Başvurulacak projeler", "Property_0_does_not_exist_on_const_enum_1_2479": "'{0}' özelliği, '{1}' 'const' sabit listesi üzerinde değil.", "Property_0_does_not_exist_on_type_1_2339": "'{0}' özelliği, '{1}' türünde değil.", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "'{0}' özelliği '{1}' türü üzerinde yok. 'await' kullanmayı mı unuttunuz?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "'{0}' özelliği '{1}' türünde yok. Bunu mu demek istediniz: '{2}'?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "'{0}' özelliği, çakışan bildirimler içeriyor ve '{1}' türü içinde erişilebilir değil.", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "'{0}' özelliği başlatıcı içermiyor ve oluşturucuda kesin olarak atanmamış.", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "'{0}' özelliği, get erişimcisinin dönüş türü ek açıklaması olmadığı için örtük olarak 'any' türü içeriyor.", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "'{0}' özelliği, set erişimcisinin parametre türü ek açıklaması olmadığı için örtük olarak 'any' türü içeriyor.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "'{0}' özelliği örtük olarak 'any' türüne sahip ancak özelliğin get erişimcisi için kullanımdan daha iyi bir tür çıkarsanabilir.", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "'{0}' özelliği örtük olarak 'any' türüne sahip ancak özelliğin set erişimcisi için kullanımdan daha iyi bir tür çıkarsanabilir.", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "'{1}' türündeki '{0}' özelliği, '{2}' temel türündeki aynı özelliğe atanamaz.", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "'{1}' türündeki '{0}' özelliği, '{2}' türüne atanamaz.", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "'{1}' türündeki '{0}' özelliği, '{2}' türünün içinden erişilemeyen farklı bir üyeye başvuruyor.", + "Property_0_is_a_static_member_of_type_1_2576": "'{0}' özelliği, '{1}' türünde statik bir üye", "Property_0_is_declared_but_its_value_is_never_read_6138": "'{0}' özelliği bildirildi ancak değeri hiç okunmadı.", "Property_0_is_incompatible_with_index_signature_2530": "'{0}' özelliği, dizin imzasıyla uyumsuz.", + "Property_0_is_incompatible_with_rest_element_type_2573": "'{0}' özelliği REST öğesi türüyle uyumsuz.", "Property_0_is_missing_in_type_1_2324": "'{0}' özelliği '{1}' türünde değil.", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "'{0}' özelliği, '{1}' türünde eksik ancak '{2}' türünde gereklidir.", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "'{0}' özelliğinin özel tanımlayıcısı olduğundan özelliğe '{1}' sınıfı dışında erişilemiyor.", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "'{0}' özelliği, '{1}' türünde isteğe bağlıdır, ancak '{2}' türünde gereklidir.", "Property_0_is_private_and_only_accessible_within_class_1_2341": "'{0}' özelliği özeldir ve yalnızca '{1}' sınıfı içinden erişilebilir.", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "'{0}' özelliği, '{1}' türünde özel, '{2}' türünde özel değildir.", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "'{0}' özelliği korumalıdır; ancak '{1}' türü, '{2}' öğesinden türetilmiş bir sınıf değildir.", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "'{0}' özelliği '{1}' türünde korumalı, '{2}' türünde ise ortaktır.", "Property_0_is_used_before_being_assigned_2565": "'{0}' özelliği atanmadan önce kullanıldı.", + "Property_0_is_used_before_its_initialization_2729": "'{0}' özelliği başlatılmadan önce kullanılıyor.", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "JSX yayılma özniteliğine ait '{0}' özelliği, hedef özelliğe atanamaz.", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "Dışarı aktarılan sınıf ifadesinin '{0}' özelliği, özel veya korumalı olmayabilir.", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "Dışarı aktarılan arabirimin '{0}' özelliği, '{2}' özel modülündeki '{1}' adına sahip veya bu adı kullanıyor.", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "Dışarı aktarılan arabirimin '{0}' özelliği, '{1}' özel adına sahip veya bu adı kullanıyor.", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "'{1}' türünün '{0}' özelliği, '{2}' sayısal dizin türüne atanamaz.", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "'{1}' türünün '{0}' özelliği, '{2}' dize dizini türüne atanamaz.", + "Property_0_was_also_declared_here_2733": "'{0}' özelliği de burada bildirildi.", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "'{0}' özelliği '{1}' içindeki temel özelliğin üzerine yazacak. Bu bilerek yapılıyorsa bir başlatıcı ekleyin. Aksi takdirde, bir 'declare' değiştiricisi ekleyin veya gereksiz bildirimi kaldırın.", "Property_assignment_expected_1136": "Özellik ataması bekleniyor.", "Property_destructuring_pattern_expected_1180": "Özellik yok etme deseni bekleniyor.", "Property_or_signature_expected_1131": "Özellik veya imza bekleniyor.", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "Dışarı aktarılan sınıfın '{0}' ortak statik özelliği, {2} dış modülündeki '{1}' adına sahip veya bu adı kullanıyor, ancak adlandırılamıyor.", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "Dışarı aktarılan sınıfın '{0}' ortak statik özelliği, '{2}' özel modülündeki '{1}' adına sahip veya bu adı kullanıyor.", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "Dışarı aktarılan sınıfın '{0}' ortak statik özelliği, '{1}' özel adına sahip veya bu adı kullanıyor.", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "'{0}' tam adının başında '@param {object} {1}' olmadan bu ada izin verilmiyor.", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "Belirtilen 'any' türüne sahip ifade ve bildirimlerde hata oluştur.", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Örtük olarak 'any' türü içeren 'this' ifadelerinde hata tetikle.", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "'--isolatedModules' bayrağı sağlandığında bir türü yeniden dışarı aktarmak için 'export type' kullanmak gerekir.", "Redirect_output_structure_to_the_directory_6006": "Çıktı yapısını dizine yeniden yönlendir.", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "Başvurulan proje '{0}' \"composite\": true ayarına sahip olmalıdır.", + "Remove_all_unnecessary_uses_of_await_95087": "Tüm gereksiz 'await' kullanımlarını kaldırın", "Remove_all_unreachable_code_95051": "Tüm erişilemeyen kodları kaldır", "Remove_all_unused_labels_95054": "Kullanılmayan tüm etiketleri kaldır", "Remove_braces_from_arrow_function_95060": "Ok işlevinden küme ayraçlarını kaldır", - "Remove_declaration_for_Colon_0_90004": "'{0}' bildirimini kaldır", "Remove_destructuring_90009": "Yıkmayı kaldır", "Remove_import_from_0_90005": "'{0}' öğesinden içeri aktarmayı kaldır", + "Remove_template_tag_90011": "Şablon etiketini kaldırın", + "Remove_type_parameters_90012": "Tür parametrelerini kaldırın", + "Remove_unnecessary_await_95086": "Gereksiz 'await' öğesini kaldırın", "Remove_unreachable_code_95050": "Erişilemeyen kodları kaldır", + "Remove_unused_declaration_for_Colon_0_90004": "Kullanılmayan '{0}' bildirimini kaldırın.", "Remove_unused_label_95053": "Kullanılmayan etiketi kaldır", "Remove_variable_statement_90010": "Değişken deyimini kaldır", + "Replace_all_unused_infer_with_unknown_90031": "Kullanılmayan tüm 'infer' öğelerini 'unknown' ile değiştirin", "Replace_import_with_0_95015": "İçeri aktarma işlemini '{0}' ile değiştirin.", + "Replace_infer_0_with_unknown_90030": "'infer {0}' öğesini 'unknown' ile değiştirin", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "İşlevdeki tüm kod yolları bir değer döndürmediğinde hata bildir.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "switch deyiminde sonraki ifadelere geçiş ile ilgili hataları bildir.", "Report_errors_in_js_files_8019": ".js dosyalarındaki hataları bildirin.", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "Birincil arama yolları kullanılarak çözümleniyor...", "Resolving_with_primary_search_path_0_6121": "Birincil arama yolu '{0}' kullanılarak çözümleniyor.", "Rest_parameter_0_implicitly_has_an_any_type_7019": "'{0}' rest parametresi, örtük olarak 'any[]' türüne sahip.", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "'{0}' REST parametresi örtük olarak 'any[]' türüne sahip ancak kullanımdan daha iyi bir tür çıkarsanabilir.", + "Rest_signatures_are_incompatible_2572": "REST imzaları uyumsuz.", "Rest_types_may_only_be_created_from_object_types_2700": "Rest türleri yalnızca nesne türlerinden oluşturulabilir.", + "Return_type_annotation_circularly_references_itself_2577": "Dönüş türü ek açıklaması döngüsel olarak kendine başvuruyor.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "Dışarı aktarılan arabirimdeki çağrı imzasının dönüş türü, '{1}' özel modülündeki '{0}' adına sahip veya bu adı kullanıyor.", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "Dışarı aktarılan arabirimdeki çağrı imzasının dönüş türü, '{0}' özel adına sahip veya bu adı kullanıyor.", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "Dışarı aktarılan arabirimdeki oluşturucu imzasının dönüş türü, '{1}' özel modülündeki '{0}' adına sahip veya bu adı kullanıyor.", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "Kök dizin belirlenemiyor, birincil arama yolları atlanıyor.", "STRATEGY_6039": "STRATEJİ", "Scoped_package_detected_looking_in_0_6182": "Kapsamlı paket algılandı, '{0}' içinde aranıyor", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "Yapılandırma dosyanızdaki 'module' seçeneğini '{0}' olarak ayarlayın", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "Yapılandırma dosyanızdaki 'target' seçeneğini '{0}' olarak ayarlayın", "Setters_cannot_return_a_value_2408": "Ayarlayıcılar bir değer döndüremez.", "Show_all_compiler_options_6169": "Tüm derleyici seçeneklerini gösterin.", "Show_diagnostic_information_6149": "Tanılama bilgilerini gösterin.", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "'{0}' imzası bir tür koşulu olmalıdır.", "Skip_type_checking_of_declaration_files_6012": "Bildirim dosyalarının tür denetimini atla.", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "'{0}' projesinin '{1}' bağımlılığında hatalar olduğundan projenin derlenmesi atlanıyor", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "Tüm projeler bulunamadığından temizleme atlanıyor", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "'{0}' projesinin '{1}' bağımlılığı derlenmediğinden projenin derlenmesi atlanıyor", "Source_Map_Options_6175": "Kaynak Eşleme Seçenekleri", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "Özelleşmiş aşırı yükleme imzası özelleşmemiş imzalara atanamaz.", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "Dinamik içeri aktarmanın tanımlayıcısı, yayılma öğesi olamaz.", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "ECMAScript hedef sürümünü belirleyin: 'ES3' (varsayılan), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018' ya da 'ESNEXT'.", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "ECMAScript hedef sürümünü belirtin: 'ES3' (varsayılan), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020' veya 'ESNEXT'.", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "JSX kod oluşturma seçeneğini belirtin: 'preserve', 'react-native' veya 'react'.", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "Yalnızca türlere yönelik kullanılan içeri aktarmalar için gösterme/denetleme davranışını belirtin", + "Specify_file_to_store_incremental_compilation_information_6380": "Artımlı derleme bilgilerinin depolanacağı dosyayı belirtin", "Specify_library_files_to_be_included_in_the_compilation_6079": "Derlemeye dahil edilecek kitaplık dosyalarını belirtin.", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "Modül kodu oluşturmayı belirtin: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015' veya 'ESNext'.", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "Modül kodu oluşturmayı belirtin: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020' veya 'ESNext'.", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "Modül çözümleme stratejisini belirtin: 'Node' (Node.js) veya 'classic' (TypeScript pre-1.6).", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "Dosya sistemi olayları kullanılarak oluşturulamadığında yoklama izlemesi oluşturmak için strateji belirtin: 'FixedInterval' (varsayılan), 'PriorityInterval', 'DynamicPriority'.", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "Özyinelemeli izlemeyi yerel olarak desteklemeyen platformlarda dizini izlemek için strateji belirtin: 'UseFsEvents' (varsayılan), 'FixedPollingInterval', 'DynamicPriorityPolling'.", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "Dosya izlemek için strateji belirtin: 'FixedPollingInterval' (varsayılan), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'.", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "'React.createElement' veya 'h' gibi 'react' JSX emit hedeflerken kullanılacak JSX fabrika işlevini belirtin.", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "Dosyalar gösterilirken kullanılacak satır sonu dizisini belirtin: 'CRLF' (dos) veya 'LF' (unix).", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "Hata ayıklayıcının TypeScript dosyalarını kaynak konumlar yerine nerede bulması gerektiğini belirtin.", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "Hata ayıklayıcının, eşlem dosyalarını üretilen konumlar yerine nerede bulması gerektiğini belirtin.", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "Giriş dosyalarının kök dizinini belirtin. Çıkış dizininin yapısını --outDir ile denetlemek için kullanın.", + "Split_all_invalid_type_only_imports_1367": "Geçersiz tüm yalnızca tür içeri aktarmalarını bölün", + "Split_into_two_separate_import_declarations_1366": "İki ayrı içeri aktarma bildirimine bölün", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "'new' ifadelerindeki yayılma işleci yalnızca ECMAScript 5 ve üzeri hedeflenirken kullanılabilir.", "Spread_types_may_only_be_created_from_object_types_2698": "Yayılma türleri yalnızca nesne türlerinden oluşturulabilir.", "Starting_compilation_in_watch_mode_6031": "Derleme, izleme modunda başlatılıyor...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "Ardışık özellik bildirimleri aynı türe sahip olmalıdır. '{0}' özelliği '{1}' türünde olmalıdır, ancak burada '{2}' türüne sahip.", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "Ardışık değişken bildirimleri aynı türe sahip olmalıdır. '{0}' değişkeni '{1}' türünde olmalıdır, ancak burada '{2}' türüne sahip.", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "'{1}' deseni için '{0}' alternatifinin türü hatalı; beklenen: 'string' alınan: '{2}'.", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "'{1}' desenindeki '{0}' değişimi, en fazla bir adet '*' karakteri içerebilir.", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "'{1}' desenindeki '{0}' alternatifi en fazla bir '*' karakteri içerebilir.", "Substitutions_for_pattern_0_should_be_an_array_5063": "'{0}' deseni için değişimler bir dizi olmalıdır.", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "'{0}' deseni için değiştirme değeri boş bir dizi olamaz.", "Successfully_created_a_tsconfig_json_file_6071": "tsconfig.json dosyası başarıyla oluşturuldu.", @@ -840,78 +1033,122 @@ "Suppress_excess_property_checks_for_object_literals_6072": "Nesne sabit değerlerine ait fazla özellik denetimlerini gösterme.", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "Dizin imzaları olmayan nesneler için dizin oluştururken noImplicitAny hatalarını gösterme.", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "'Symbol' başvurusu, genel Simge oluşturucu nesnesine başvurmaz.", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "Geri çağırmaları eşzamanlı olarak çağırın ve özyinelemeli izlemeyi yerel olarak desteklemeyen platformlardaki dizin izleyicilerinin durumunu güncelleştirin.", "Syntax_Colon_0_6023": "Söz dizimi: {0}", + "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229": "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'.", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "İsteğe bağlı bir zincirde etiketli şablon ifadelerine izin verilmiyor.", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "'{0}' değiştiricisi yalnızca TypeScript dosyalarında kullanılabilir.", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "'{0}' işleci, 'symbol' türüne uygulanamaz.", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "'{0}' işlecine boole türü için izin verilmez. Bunun yerine '{1}' kullanmayı göz önünde bulundurun.", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "Asenkron bir yineleyicinin '{0}' özelliği bir metot olmalıdır.", + "The_0_property_of_an_iterator_must_be_a_method_2767": "Yineleyicinin '{0}' özelliği bir metot olmalıdır.", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "'Object' türü başka çok az sayıda türe atanabilir. Bunun yerine 'any' türünü mü kullanmak istemiştiniz?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "ES3 ve ES5'te bulunan bir ok işlevinde 'arguments' nesnesine başvuru yapılamaz. Standart bir işlev ifadesi kullanmayı göz önünde bulundurun.", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "ES3 ve ES5'te 'arguments' nesnesine zaman uyumsuz bir işlev veya metot içinde başvurulamaz. Standart bir işlev veya metot kullanmayı düşünün.", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "'if' deyiminin gövdesi boş deyim olamaz.", "The_character_set_of_the_input_files_6163": "Giriş dosyalarının karakter kümesi.", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "Kapsayıcı ok işlevi, 'this' öğesinin genel değerini yakalar.", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "İçeren işlev veya modül gövdesi, denetim akışı analizi için çok büyük.", "The_current_host_does_not_support_the_0_option_5001": "Mevcut ana bilgisayar '{0}' seçeneğini desteklemiyor.", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "Büyük olasılıkla kullanmayı amaçladığınız '{0}' bildirimi burada tanımlanır", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "Beklenen tür, burada '{1}' türünde bildirilen '{0}' özelliğinden geliyor", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "Beklenen tür bu imzanın dönüş türünden geliyor.", + "The_expected_type_comes_from_this_index_signature_6501": "Beklenen tür bu dizin imzasından geliyor.", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "Bir dışarı aktarma ataması ifadesi, çevresel bağlamda bir tanımlayıcı veya tam ad olmalıdır.", "The_files_list_in_config_file_0_is_empty_18002": "'{0}' yapılandırma dosyasındaki 'dosyalar' listesi boş.", + "The_first_export_default_is_here_2752": "İlk dışarı aktarma varsayılanı buradadır.", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "Promise'in 'then' metodunun ilk parametresi, bir geri arama parametresi olmalıdır.", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "'JSX.{0}' genel türü birden fazla özelliğe sahip olamaz.", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "'import.meta' meta özelliğine yalnızca 'target' ve 'module' derleyici seçenekleri için 'ESNext' kullanıldığında izin verilir.", + "The_implementation_signature_is_declared_here_2750": "Uygulama imzası burada bildirilir.", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "'import.meta' meta özelliğine yalnızca '--module' seçeneği 'esnext' veya 'system' olduğunda izin verilir.", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "'{0}' öğesinin çıkarsanan türü, '{1}' başvurusu olmadan adlandırılamaz. Bu büyük olasılıkla taşınabilir değildir. Tür ek açıklaması gereklidir.", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "Çıkarsanan '{0}' türü, erişilemeyen bir '{1}' türüne başvuruyor. Tür ek açıklaması gereklidir.", + "The_last_overload_gave_the_following_error_2770": "Son aşırı yükleme aşağıdaki hatayı verdi.", + "The_last_overload_is_declared_here_2771": "Son aşırı yükleme burada bildirilir.", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "'for...in' deyiminin sol tarafı yok etme deseni olamaz.", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "'for...in' deyiminin sol tarafında tür ek açıklaması kullanılamaz.", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "'for...in' deyiminin sol tarafı, isteğe bağlı bir özellik erişimi olamaz.", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "'for...in' deyiminin sol tarafında bir değişken veya özellik erişimi bulunmalıdır.", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "'for...in' deyiminin sol tarafı 'string' veya 'any' türünde olmalıdır.", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "'for...of' deyiminin sol tarafında tür ek açıklaması kullanılamaz.", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "'for...of' deyiminin sol tarafı, isteğe bağlı bir özellik erişimi olamaz.", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "'for...of' deyiminin sol tarafında bir değişken veya özellik erişimi bulunmalıdır.", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "Aritmetik işlemin sol tarafı, 'any', 'number' veya bir sabit listesi türünde olmalıdır.", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "Aritmetik işlemin sol tarafı, 'any', 'number', 'bigint' veya bir sabit listesi türünde olmalıdır.", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "Atama ifadesinin sol tarafı, isteğe bağlı bir özellik erişimi olamaz.", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "Atama ifadesinin sol tarafında bir değişken veya özellik erişimi bulunmalıdır.", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "'in' ifadesinin sol tarafı, 'any', 'string', 'number' veya 'symbol' türünde olmalıdır.", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "'instanceof' ifadesinin sol tarafı 'any' türünde, bir nesne türü veya tür parametresi olmalıdır.", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "Kullanıcıya ileti görüntülenirken kullanılacak yerel ayar (örn. 'tr-tr')", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "node_modules altında arama yapmak ve JavaScript dosyalarını yüklemek için en yüksek bağımlılık derinliği.", - "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "Delete işlecinin işleneni, salt okunur bir özellik olamaz.", - "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "Delete işlecinin işleneni, bir özellik başvurusu olmalıdır.", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "'delete' operatörünün işleneni özel bir tanımlayıcı olamaz.", + "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "'delete' operatörünün işleneni, salt okunur bir özellik olamaz.", + "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "'delete' operatörünün işleneni, bir özellik başvurusu olmalıdır.", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "Artırma veya eksiltme operatörünün işleneni, isteğe bağlı bir özellik erişimi olamaz.", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "Artırma veya eksiltme operatörünün işleneni, bir değişken veya özellik erişimi olmalıdır.", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "Ayrıştırıcı, buradaki '{' belirteciyle eşleştirmek için bir '}' bulmayı bekliyordu.", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "'{0}' özelliği aynı yazımı içeren başka bir özel tanımlayıcı tarafından gölgelendiğinden bu sınıf içindeki '{1}' türü üzerinde bu özelliğe erişilemiyor.", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "JSX öğe oluşturucusuna ait dönüş türü bir nesne türünü döndürmelidir.", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "Parametre dekoratör işlevine ait dönüş türü 'void' veya 'any' olmalıdır.", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "Özellik dekoratör işlevine ait dönüş türü 'void' veya 'any' olmalıdır.", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "Zaman uyumsuz bir işlevin dönüş türü, geçerli bir promise olmalı veya çağrılabilir 'then' üyesi içermemelidir.", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "Zaman uyumsuz bir işlevin ya da metodun döndürme türü, genel Promise türü olmalıdır.", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "'for...in' deyiminin sağ tarafı 'any' türünde, bir nesne türü veya tür parametresi olmalıdır ancak burada '{0}' türüne sahip.", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "Aritmetik işlemin sağ tarafı, 'any', 'number' veya bir sabit listesi türünde olmalıdır.", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "Aritmetik işlemin sağ tarafı, 'any', 'number', 'bigint' veya bir sabit listesi türünde olmalıdır.", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "'in' ifadesinin sağ tarafı 'any' türünde, bir nesne türü veya tür parametresi olmalıdır.", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "'instanceof' ifadesinin sağ tarafı 'any' türünde veya 'Function' arabirim türüne atanabilir bir türde olmalıdır.", + "The_shadowing_declaration_of_0_is_defined_here_18017": "'{0}' için gölgeleme bildirimi burada tanımlanır", "The_specified_path_does_not_exist_Colon_0_5058": "Belirtilen yol yok: '{0}'.", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "Atama hedefi, bir değişken veya özellik erişimi olmalıdır.", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "Nesne REST atamasının hedefi, isteğe bağlı bir özellik erişimi olamaz.", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "Nesne geri kalan özellik atamasının hedefi, bir değişken veya özellik erişimi olmalıdır.", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "'{0}' türünün 'this' bağlamı, metodun '{1}' türündeki 'this' değerine atanamaz.", "The_this_types_of_each_signature_are_incompatible_2685": "İmzaların 'this' türleri uyumsuz.", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "'{0}' türü 'readonly' olduğundan değiştirilebilir '{1}' türüne atanamıyor.", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "'{0}' tür parametresinin tür bağımsız değişkeni kullanımdan belirlenemez. Tür bağımsız değişkenlerini açık olarak belirtmeyi göz önünde bulundurun.", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "Zaman uyumsuz yineleyicinin 'next()' metodu tarafından döndürülen tür, 'value' özelliğine sahip bir tür için promise olmalıdır.", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "Bir yineleyicinin 'next()' metodu tarafından döndürülen tür, 'value' özelliğine sahip olmalıdır.", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "İşlev bildiriminin türü işlevin imzasıyla eşleşmelidir.", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "Asenkron yineleyicinin '{0}()' metodu tarafından döndürülen tür, 'value' özelliğine sahip bir tür için promise olmalıdır.", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "Bir yineleyicinin '{0}()' metodu tarafından döndürülen tür, 'value' özelliğine sahip olmalıdır.", + "The_types_of_0_are_incompatible_between_these_types_2200": "'{0}' türleri bu türler arasında uyumsuz.", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "'{0}' tarafından döndürülen türler, bu türler arasında uyumsuz.", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "'for...in' deyiminin değişken bildirimi bir başlatıcıya sahip olamaz.", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "'for...of' deyiminin değişken bildirimi bir başlatıcıya sahip olamaz.", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "'with' ifadesi desteklenmiyor. 'with' bloklarındaki tüm simgeler 'any' türüne sahip olacaktır.", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "Bu JSX etiketinin '{0}' özelliği, '{1}' türünde tek bir alt öğe bekliyor ancak birden çok alt öğe sağlandı.", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "Bu JSX etiketinin '{0}' özelliği, birden çok alt öğe gerektiren '{1}' türünü bekliyor ancak yalnızca tek bir alt öğe sağlandı.", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "'{1}' ve '{2}' türleri çakışmadığından bu koşul her zaman '{0}' döndürür.", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "İşlev her zaman tanımlı olduğundan bu koşul her zaman true döndürür. Bunun yerine işlevi çağırmayı mı istediniz?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "Bu oluşturucu işlevi bir sınıf bildirimine dönüştürülebilir.", + "This_expression_is_not_callable_2349": "Bu ifade çağrılabilir değil.", + "This_expression_is_not_constructable_2351": "Bu ifade oluşturulabilir değil.", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "'importsNotUsedAsValues', 'error' olarak ayarlandığından bu içeri aktarma hiçbir zaman bir değer olarak kullanılmaz ve 'import type' kullanmalıdır.", + "This_may_be_converted_to_an_async_function_80006": "Bu, asenkron bir işleve dönüştürülebilir.", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "Bu modüle yalnızca '{0}' bayrağını açıp varsayılan dışarı aktarma işlemine başvurarak ECMAScript içeri/dışarı aktarma işlemleri ile başvurulabilir.", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "Bu modül, 'export =' kullanılarak bildirildi ve yalnızca '{0}' bayrağı kullanılırken varsayılan bir içeri aktarma ile kullanılabilir.", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "Bu aşırı yükleme imzası, uygulama imzasıyla uyumlu değil.", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "Bu parametreye 'use strict' yönergesi ile izin verilmiyor.", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "Bu söz dizimi, içeri aktarılan bir yardımcı gerektiriyor ancak '{0}' modülü bulunamıyor.", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "Bu söz dizimi, '{1}' adlı içeri aktarılan yardımcıyı gerektiriyor ancak '{0}' modülünde dışarı aktarılan '{1}' üyesi yok.", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "Bu söz dizimi, '{0}' içinde bulunmayan '{1}' adlı içeri aktarılmış bir yardımcı gerektirir. '{0}' sürümünüzü yükseltmeyi deneyin.", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "Üst düzey 'await' ifadelerine yalnızca 'module' seçeneği 'esnext' ya da 'system' olarak ayarlandığında ve 'target' seçeneği 'es2017' veya üzeri olarak ayarlandığında izin verilir.", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": ".d.ts dosyalarındaki üst düzey bildirimler bir 'declare' veya 'export' değiştiricisi ile başlamalıdır.", "Trailing_comma_not_allowed_1009": "Sona eklenen virgüle izin verilmez.", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "Her dosyayı ayrı bir modül olarak derleyin ('ts.transpileModule' gibi).", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Varsa `npm install @types/{0}` deneyin veya `declare module '{0}';` öğesini içeren yeni bir bildirim (.d.ts) dosyası ekleyin", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "Varsa `npm install @types/{1}` deneyin veya `declare module '{0}';` öğesini içeren yeni bir bildirim (.d.ts) dosyası ekleyin", "Trying_other_entries_in_rootDirs_6110": "'rootDirs' içindeki diğer girişler deneniyor.", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "'{0}' alternatifi deneniyor, aday modül konumu: '{1}'.", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "'{1}' uzunluğuna sahip '{0}' demeti, '{2}' uzunluğuna sahip demete atanamaz.", - "Type_0_cannot_be_converted_to_type_1_2352": "'{0}' türü '{1}' türüne dönüştürülemez.", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "'{1}' uzunluğundaki '{0}' demet türü, '{2}' dizininde öğe içermiyor.", + "Tuple_type_arguments_circularly_reference_themselves_4110": "Demet türü bağımsız değişkenleri döngüsel olarak kendisine başvuruyor.", "Type_0_cannot_be_used_as_an_index_type_2538": "'{0}' türü, dizin türü olarak kullanılamaz.", "Type_0_cannot_be_used_to_index_type_1_2536": "'{0}' türü, '{1}' türünü dizinlemek için kullanılamaz.", "Type_0_does_not_satisfy_the_constraint_1_2344": "'{0}' türü, '{1}' kısıtlamasını karşılamıyor.", + "Type_0_has_no_call_signatures_2757": "'{0}' türünün çağrı imzası yok.", + "Type_0_has_no_construct_signatures_2761": "'{0}' türünün oluşturma imzası yok.", "Type_0_has_no_matching_index_signature_for_type_1_2537": "'{0}' türü, '{1}' türüyle eşleşen dizin imzasına sahip değil.", "Type_0_has_no_properties_in_common_with_type_1_2559": "'{0}' türünün '{1}' türüyle ortak özelliği yok.", - "Type_0_has_no_property_1_2460": "'{0}' türü, '{1}' özelliğine sahip değil.", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "'{0}' türü, '{1}' özelliğine ve dize dizin imzasına sahip değil.", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "'{0}' türünde, '{1}' türündeki şu özellikler eksik: {2}", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "'{0}' türünde, '{1}' türündeki şu özellikler eksik: {2} ve diğer {3} özellik.", "Type_0_is_not_a_constructor_function_type_2507": "'{0}' türü bir oluşturucu işlevi türü değil.", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "ES5/ES3 içindeki '{0}' türü, Promise ile uyumlu bir oluşturucu değerine başvurmadığından geçerli bir zaman uyumsuz işlev dönüş türü değil.", "Type_0_is_not_an_array_type_2461": "'{0}' türü bir dizi türü değil.", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "'{0}' türü bir dizi türü değil. Yineleyicilerin yinelenmesine izin vermek için '--downlevelIteration' derleyici seçeneğini kullanın.", "Type_0_is_not_an_array_type_or_a_string_type_2495": "'{0}' türü, bir dizi türü veya dize türü değil.", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "'{0}' türü bir dizi türü veya bir dize türü değil. Yineleyicilerin yinelenmesine izin vermek için '--downlevelIteration' derleyici seçeneğini kullanın.", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "'{0}' türü, bir dizi türü veya dize türü değil ya da bir yineleyici döndüren '[Symbol.iterator]()' metoduna sahip değil.", @@ -926,17 +1163,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "'{0}' türü, öz yinelemeli şekilde kendine temel tür olarak başvuruyor.", "Type_alias_0_circularly_references_itself_2456": "'{0}' tür diğer adı, döngüsel olarak kendine başvuruyor.", "Type_alias_name_cannot_be_0_2457": "Tür diğer adı '{0}' olamaz.", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "Tür diğer adları, yalnızca TypeScript dosyalarında kullanılabilir.", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "Tür ek açıklaması, oluşturucu bildiriminde görüntülenemez.", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "Tür ek açıklamaları yalnızca TypeScript dosyalarında kullanılabilir.", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "'{1}' tür bağımsız değişken adayı, '{0}' adayının üst türü olmadığından geçerli bir tür bağımsız değişkeni değil.", "Type_argument_expected_1140": "Tür bağımsız değişkeni bekleniyor.", "Type_argument_list_cannot_be_empty_1099": "Tür bağımsız değişkeni listesi boş olamaz.", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "Tür bağımsız değişkenleri yalnızca TypeScript dosyalarında kullanılabilir.", "Type_arguments_cannot_be_used_here_1342": "Tür bağımsız değişkenleri burada kullanılamaz.", + "Type_arguments_for_0_circularly_reference_themselves_4109": "'{0}' için tür bağımsız değişkenleri, döngüsel olarak kendisine başvuruyor.", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "Tür onaylama ifadeleri, yalnızca TypeScript dosyalarında kullanılabilir.", "Type_declaration_files_to_be_included_in_compilation_6124": "Derlemeye eklenecek tür bildirim dosyaları.", "Type_expected_1110": "Tür bekleniyor.", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "Tür örneği oluşturma işlemi, fazla ayrıntılı ve büyük olasılıkla sınırsız.", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "Türe, kendi 'then' metodunun tamamlama geri aramasında doğrudan veya dolaylı olarak başvuruluyor.", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "'await' işleneninin türü, geçerli bir promise olmalı veya çağrılabilir 'then' üyesi içermemelidir.", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "Hesaplanan özellik değerinin '{0}' türü, '{1}' türüne atanamıyor.", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "Bir 'yield*' işleneninin yinelenen öğelerinin türü, geçerli bir promise olmalı veya çağrılabilir 'then' üyesi içermemelidir.", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "Zaman uyumsuz bir oluşturucudaki 'yield' işleneninin türü, geçerli bir promise olmalı veya çağrılabilir 'then' üyesi içermemelidir.", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "Tür bu içeri aktarmadan kaynaklanıyor. Bir ad alanı stili içeri aktarma işlemi çağrılamaz ya da oluşturulamaz ve çalışma zamanında hataya neden olur. Bunun yerine varsayılan içeri aktarmayı kullanmayı veya içeri aktarmayı burada gerektirmeyi deneyin.", "Type_parameter_0_has_a_circular_constraint_2313": "'{0}' tür parametresi döngüsel bir kısıtlamaya sahip.", "Type_parameter_0_has_a_circular_default_2716": "'{0}' tür parametresi döngüsel bir varsayılana sahip.", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "Dışarı aktarılan arabirimdeki çağrı imzasının '{0}' tür parametresi, '{1}' özel adına sahip veya bu adı kullanıyor.", @@ -944,17 +1189,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "Dışarı aktarılan sınıfın '{0}' tür parametresi, '{1}' özel adına sahip veya bu adı kullanıyor.", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "Dışarı aktarılan işlevin '{0}' tür parametresi, '{1}' özel adına sahip veya bu adı kullanıyor.", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "Dışarı aktarılan arabirimin '{0}' tür parametresi, '{1}' özel adına sahip veya bu adı kullanıyor.", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "Dışarı aktarılmış eşlenen nesne türüne ait '{0}' tür parametresi, '{1}' özel adını kullanıyor.", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "Dışarı aktarılan tür diğer adına ait '{0}' tür parametresi, '{1}' özel adına sahip veya bu adı kullanıyor.", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "Dışarı aktarılan arabirimdeki metodun '{0}' tür parametresi, '{1}' özel adına sahip veya bu adı kullanıyor.", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "Dışarı aktarılan sınıftaki ortak metodun '{0}' tür parametresi, '{1}' özel adına sahip veya bu adı kullanıyor.", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "Dışarı aktarılan sınıftaki ortak statik metodun '{0}' tür parametresi, '{1}' özel adına sahip veya bu adı kullanıyor.", "Type_parameter_declaration_expected_1139": "Tür parametresi bildirimi bekleniyor.", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "Tür parametresi bildirimleri yalnızca TypeScript dosyalarında kullanılabilir.", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "Tür parametresi varsayılanları yalnızca önceden bildirilen tür parametrelerine başvurabilir.", "Type_parameter_list_cannot_be_empty_1098": "Tür parametresi listesi boş olamaz.", "Type_parameter_name_cannot_be_0_2368": "Tür parametresi adı '{0}' olamaz.", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "Tür parametreleri, oluşturucu bildiriminde görüntülenemez.", "Type_predicate_0_is_not_assignable_to_1_1226": "'{0}' tür koşulu, '{1}' öğesine atanamaz.", "Type_reference_directive_0_was_not_resolved_6120": "======== '{0}' tür başvuru yönergesi çözümlenmedi. ========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== '{0}' tür başvuru yönergesi '{1}' olarak başarıyla çözümlendi, birincil: {2}. ========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== '{0}' tür başvuru yönergesi '{2}' Paket Kimliğine sahip '{1}' olarak başarıyla çözümlendi, birincil: {3}. ========", "Types_have_separate_declarations_of_a_private_property_0_2442": "Türler, '{0}' özel özelliğinin ayrı bildirimlerine sahip.", "Types_of_parameters_0_and_1_are_incompatible_2328": "'{0}' ve '{1}' parametre türleri uyumsuz.", "Types_of_property_0_are_incompatible_2326": "'{0}' özellik türleri uyumsuz.", @@ -967,10 +1216,18 @@ "Unexpected_token_1012": "Beklenmeyen belirteç.", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "Beklenmeyen belirteç. Bir oluşturucu, metot, erişimci veya özellik bekleniyordu.", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "Beklenmeyen belirteç. Küme ayracı olmadan bir tür parametresi adı bekleniyordu.", + "Unexpected_token_Did_you_mean_or_gt_1382": "Beklenmeyen belirteç. Şunu mu demek istediniz: `{'>'}` veya `>`?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "Beklenmeyen belirteç. Şunu mu demek istediniz: `{'}'}` veya `}`?", "Unexpected_token_expected_1179": "Beklenmeyen belirteç. '{' bekleniyordu.", + "Unknown_build_option_0_5072": "Bilinmeyen '{0}' derleme seçeneği.", + "Unknown_build_option_0_Did_you_mean_1_5077": "Bilinmeyen '{0}' derleme seçeneği. Şunu mu demek istediniz: '{1}'?", "Unknown_compiler_option_0_5023": "Bilinmeyen '{0}' derleyici seçeneği.", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "Bilinmeyen '{0}' derleyici seçeneği. Şunu mu demek istediniz: '{1}'?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "'Excludes' seçeneği bilinmiyor. 'Exclude' seçeneğini mi belirtmek istediniz?", "Unknown_type_acquisition_option_0_17010": "Bilinmeyen '{0}' tür alımı seçeneği.", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "Bilinmeyen '{0}' tür alma seçeneği. Şunu mu demek istediniz: '{1}'?", + "Unknown_watch_option_0_5078": "Bilinmeyen '{0}' izleme seçeneği.", + "Unknown_watch_option_0_Did_you_mean_1_5079": "Bilinmeyen '{0}' izleme seçeneği. Şunu mu demek istediniz: '{1}'?", "Unreachable_code_detected_7027": "Erişilemeyen kod algılandı.", "Unsupported_locale_0_6049": "Desteklenmeyen '{0}' yerel ayarı.", "Unterminated_Unicode_escape_sequence_1199": "Sonlandırılmamış Unicode kaçış dizisi.", @@ -980,34 +1237,52 @@ "Unterminated_template_literal_1160": "Sonlandırılmamış şablon sabit değeri.", "Untyped_function_calls_may_not_accept_type_arguments_2347": "Türü belirtilmemiş işlev çağrıları tür bağımsız değişkenlerini kabul etmeyebilir.", "Unused_label_7028": "Kullanılmayan etiket.", + "Updating_output_of_project_0_6373": "'{0}' projesinin çıkışı güncelleştiriliyor...", "Updating_output_timestamps_of_project_0_6359": "'{0}' projesinin çıkış zaman damgaları güncelleştiriliyor...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "'{0}' projesinin değiştirilmemiş çıkış zaman damgaları güncelleştiriliyor...", "Use_synthetic_default_member_95016": "Yapay 'default' üyesini kullanın.", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "'for...of' deyiminde dize kullanma yalnızca ECMAScript 5 veya üzerinde desteklenir.", + "Using_compiler_options_of_project_reference_redirect_0_6215": "'{0}' proje başvurusu yeniden yönlendirmesinin derleyici seçenekleri kullanılıyor.", "VERSION_6036": "SÜRÜM", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "'{0}' türünün değeri ile '{1}' türü arasında hiç ortak özellik yok. Bunun yerine çağrı yapmak mı istediniz?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "'{0}' türündeki değeri çağrılabilir değil. 'new' öğesini mi eklemek istemiştiniz?", "Variable_0_implicitly_has_an_1_type_7005": "'{0}' değişkeni örtük olarak '{1}' türüne sahip.", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "'{0}' değişkeni örtük olarak bir '{1}' türüne sahip ancak kullanımdan daha iyi bir tür çıkarsanabilir.", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "'{0}' değişkeni bazı konumlarda örtük olarak '{1}' türüne sahip ancak kullanımdan daha iyi bir tür çıkarsanabilir.", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "'{0}' değişkeni, türünün belirlenemeyeceği bazı konumlarda örtülü olarak '{1}' türünü içeriyor.", "Variable_0_is_used_before_being_assigned_2454": "'{0}' değişkeni atanmadan önce kullanılır.", "Variable_declaration_expected_1134": "Değişken bildirimi bekleniyor.", "Variable_declaration_list_cannot_be_empty_1123": "Değişken bildirim listesi boş olamaz.", "Version_0_6029": "Sürüm {0}", "Watch_input_files_6005": "Giriş dosyalarını izleyin.", + "Watch_option_0_requires_a_value_of_type_1_5080": "'{0}' izleme seçeneği, {1} türünde bir değer gerektiriyor.", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "Eski konsol çıktısının ekrandan kaldırılmak yerine izleme modunda tutulup tutulmayacağı.", + "Wrap_invalid_character_in_an_expression_container_95101": "Geçersiz karakteri bir ifade kapsayıcısında sarmalayın", + "You_cannot_rename_a_module_via_a_global_import_8031": "Genel içeri aktarma aracılığıyla bir modülü yeniden adlandıramazsınız.", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "Standart TypeScript kitaplığında tanımlanmış öğeleri yeniden adlandıramazsınız.", "You_cannot_rename_this_element_8000": "Bu öğeyi yeniden adlandıramazsınız.", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "'{0}' burada dekoratör olarak kullanılmak için çok az bağımsız değişken kabul ediyor. Önce çağırıp '@{0}()' yazmak mı istediniz?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "'{0}' ve '{1}' işlemleri ayraç olmadan karıştırılamaz.", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "'{0}' iki kez belirtildi. '{0}' özniteliğinin üzerine yazılacak.", - "_0_can_only_be_used_in_a_ts_file_8009": "'{0}' yalnızca bir .ts dosyasında kullanılabilir.", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "'{0}', 'export type' kullanılarak dışarı aktarıldığından değer olarak kullanılamaz.", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "'{0}', 'import type' kullanılarak içeri aktarıldığından değer olarak kullanılamaz.", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "'{0}' bileşenleri, alt öğe olarak metin kabul etmez. JSX'teki metin 'string' türünde ancak beklenen '{1}' türü: '{2}'.", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "'{0}' bildirimleri yalnızca TypeScript dosyalarında kullanılabilir.", "_0_expected_1005": "'{0}' bekleniyor.", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "'{0}' örtük olarak bir '{1}' dönüş türüne sahip ancak kullanımdan daha iyi bir tür çıkarsanabilir.", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "Dönüş türü ek açıklamasına sahip olmadığından ve doğrudan veya dolaylı olarak dönüş ifadelerinden birinde kendine başvurulduğundan, '{0}' öğesi örtük olarak 'any' türüne sahip.", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "Bir tür ek açıklamasına sahip olmadığından ve kendi başlatıcısında doğrudan veya dolaylı olarak başvurulduğundan, '{0}' öğesi örtük olarak 'any' türüne sahip.", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "'{0}' temel elemandır ancak '{1}' sarmalayıcı nesnedir. Mümkün olduğunda '{0}' kullanmayı tercih edin.", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "'{0}', '{1}' türündeki kısıtlamaya atanabilir ancak '{1}' örneği, '{2}' kısıtlamasının farklı bir alt türüyle oluşturulabilir.", "_0_is_declared_but_its_value_is_never_read_6133": "'{0}' bildirildi ancak değeri hiç okunmadı.", "_0_is_declared_but_never_used_6196": "'{0}' bildirildi ancak hiç kullanılmadı.", + "_0_is_declared_here_2728": "'{0}' burada bildirilir.", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "'{0}', '{1}' sınıfında bir özellik olarak tanımlandı ancak burada, '{2}' içinde bir erişimci olarak geçersiz kılındı.", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "'{0}', '{1}' sınıfında bir erişimci olarak tanımlandı ancak burada, '{2}' içinde örnek özelliği olarak geçersiz kılındı.", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}', '{1}' anahtar sözcüğü için geçerli bir meta özellik değil. Bunu mu demek istediniz: '{2}'?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' öğesine kendi temel ifadesinde doğrudan veya dolaylı olarak başvuruluyor.", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' öğesine kendi tür ek açıklamasında doğrudan veya dolaylı olarak başvuruluyor.", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "'{0}' birden çok kez belirtildiğinden bu kullanımın üzerine yazılacak.", "_0_list_cannot_be_empty_1097": "'{0}' listesi boş olamaz.", "_0_modifier_already_seen_1030": "'{0}' değiştiricisi zaten görüldü.", "_0_modifier_cannot_appear_on_a_class_element_1031": "'{0}' değiştiricisi bir sınıf öğesinde görüntülenemez.", @@ -1021,17 +1296,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "'{0}' değiştiricisi bir çevresel bağlamda kullanılamaz.", "_0_modifier_cannot_be_used_with_1_modifier_1243": "'{0}' değiştiricisi, '{1}' değiştiricisi ile birlikte kullanılamaz.", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "'{0}' değiştiricisi bir sınıf bildirimiyle birlikte kullanılamaz.", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "'{0}' değiştiricisi özel bir tanımlayıcıyla birlikte kullanılamaz", "_0_modifier_must_precede_1_modifier_1029": "'{0}' değiştiricisi, '{1}' değiştiricisinden önce gelmelidir.", + "_0_needs_an_explicit_type_annotation_2782": "'{0}' açık bir tür ek açıklamasına ihtiyaç duyuyor.", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "'{0}' yalnızca bir türe başvuruyor, ancak burada bir ad alanı olarak kullanılıyor.", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "'{0}' yalnızca bir türe başvuruyor, ancak burada bir değer olarak kullanılıyor.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "'{0}' yalnızca bir türe başvuruyor ancak burada bir değer olarak kullanılıyor. Hedef kitaplığınızı değiştirmeniz gerekiyor mu? `lib` derleyici seçeneğini es2015 veya üzeri olarak değiştirmeyi deneyin.", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "'{0}' bir UMD genel öğesine başvuruyor, ancak geçerli dosya bir modül. Bunun yerine bir içeri aktarma eklemeyi deneyin.", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "'{0}' yalnızca bir değere başvuruyor ancak burada bir tür olarak kullanılıyor.", "_0_tag_already_specified_1223": "'{0}' etiketi zaten belirtildi.", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "'{0}' etiketi tek başına üst düzey bir JSDoc etiketi olarak kullanılamaz.", + "_0_was_also_declared_here_6203": "'{0}' öğesi de burada bildirildi.", + "_0_was_exported_here_1377": "'{0}' burada dışarı aktarıldı.", + "_0_was_imported_here_1376": "'{0}' burada içeri aktarıldı.", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "Dönüş türü ek açıklaması olmayan '{0}', örtük olarak '{1}' dönüş türüne sahip.", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "Dönüş türü ek açıklaması olmayan '{0}', örtük olarak '{1}' yield türüne sahip.", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "'abstract' değiştiricisi yalnızca sınıf, metot veya özellik bildiriminde görünebilir.", - "await_expression_is_only_allowed_within_an_async_function_1308": "'await' ifadesine yalnızca bir zaman uyumsuz işlevde izin verilir.", + "and_here_6204": "ve buraya.", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "'await' ifadelerine yalnızca dosya bir modül olduğunda dosyanın en üst düzeyinde izin verilir ancak bu dosyanın içeri veya dışarı aktarma işlemi yok. Bu dosyayı modül yapmak için boş bir 'export {}' eklemeyi deneyin.", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "'await' ifadelerine yalnızca asenkron işlevler içinde ve modüllerin en üst düzeylerinde izin verilir.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "'await' ifadeleri bir parametre başlatıcısında kullanılamaz.", + "await_has_no_effect_on_the_type_of_this_expression_80007": "'await' öğesinin bu ifadenin türü üzerinde etkisi yoktur.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "'baseUrl' seçeneği '{0}' olarak ayarlandı; göreli olmayan '{1}' modül adını çözümlemek için bu değer kullanılıyor.", + "can_only_be_used_at_the_start_of_a_file_18026": "'#!' yalnızca dosyanın başlangıcında kullanılabilir.", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "'=', yalnızca yok etme ataması içindeki bir nesne sabit değeri özelliğinde kullanılabilir.", "case_or_default_expected_1130": "'case' veya 'default' ifadeleri bekleniyor.", "class_expressions_are_not_currently_supported_9003": "'class' ifadeleri şu anda desteklenmiyor.", @@ -1039,11 +1326,12 @@ "const_declarations_must_be_initialized_1155": "'const' bildirimlerinin başlatılması gerekiyor.", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "'const' sabit listesi üyesi başlatıcısı, sonlu olmayan bir değer olarak hesaplandı.", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "'const' sabit listesi üyesi başlatıcısı, izin verilmeyen 'NaN' değeri olarak hesaplandı.", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "const sabit listesi üyesi başlatıcıları yalnızca sabit değerleri ve diğer hesaplanan sabit listesi değerlerini içerebilir.", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "'const' sabit listeleri yalnızca bir özellikte, dizin erişim ifadelerinde, içeri aktarma bildiriminin veya dışarı aktarma atamasının sağ tarafında ya da tür sorgusunda kullanılabilir.", + "constructor_is_a_reserved_word_18012": "'#constructor' ayrılmış bir sözcüktür.", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "'delete', katı moddaki bir tanımlayıcıda çağrılamaz.", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "bunu silin - '{0}' projesi önceden derlenmiş olduğundan güncel", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "'enum declarations' yalnızca bir .ts dosyasında kullanılabilir.", - "export_can_only_be_used_in_a_ts_file_8003": "'export=' yalnızca bir .ts dosyasında kullanılabilir.", + "export_can_only_be_used_in_TypeScript_files_8003": "'export =' yalnızca TypeScript dosyalarında kullanılabilir.", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "'export' değiştiricisi, her zaman görünür olduğu için çevresel modüllere ve modül genişletmelerine uygulanamaz.", "extends_clause_already_seen_1172": "'extends' yan tümcesi zaten görüldü.", "extends_clause_must_precede_implements_clause_1173": "'extends' yan tümcesi, 'implements' yan tümcesinden önce gelmelidir.", @@ -1053,23 +1341,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "'get' ve 'set' erişimcisi aynı 'this' türüne sahip olmalıdır.", "get_and_set_accessor_must_have_the_same_type_2380": "'get' ve 'set' erişimcisi aynı türde olmalıdır.", "implements_clause_already_seen_1175": "'implements' yan tümcesi zaten görüldü.", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "'implements clauses' yalnızca bir .ts dosyasında kullanılabilir.", - "import_can_only_be_used_in_a_ts_file_8002": "'import ... =' yalnızca bir .ts dosyasında kullanılabilir.", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "'implements' yan tümceleri yalnızca TypeScript dosyalarında kullanılabilir.", + "import_can_only_be_used_in_TypeScript_files_8002": "'import ... =' yalnızca TypeScript dosyalarında kullanılabilir.", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "'infer' bildirimlerine yalnızca bir koşullu türün 'extends' yan tümcesinde izin verilir.", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "'interface declarations' yalnızca bir .ts dosyasında kullanılabilir.", "let_declarations_can_only_be_declared_inside_a_block_1157": "'let' bildirimleri yalnızca bu bloğun içinde bildirilebilir.", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "'let' ifadesi, 'let' veya 'const' bildirimlerinde ad olarak kullanılamaz.", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "'module declarations' yalnızca bir .ts dosyasında kullanılabilir.", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "'new T[]', dizi oluşturmak için kullanılamaz. Bunun yerine 'new Array()' kullanın.", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "Yapı imzası bulunmayan 'new' ifadesi örtük olarak 'any' türüne sahip.", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "'non-null assertions' yalnızca .ts dosyasında kullanılabilir.", "options_6024": "seçenekler", "or_expected_1144": "'{' veya ';' bekleniyor.", "package_json_does_not_have_a_0_field_6100": "'package.json' geçerli bir '{0}' alanına sahip değil.", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "'package.json', '{0}' sürümüyle eşleşen bir 'typesVersions' girdisine sahip değil.", + "package_json_had_a_falsy_0_field_6220": "'package.json' hatalı bir '{0}' alanı içeriyordu.", "package_json_has_0_field_1_that_references_2_6101": "'package.json', '{2}' öğesine başvuruda bulunan '{1}' adlı '{0}' alanını içeriyor.", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "'parameter modifiers' yalnızca bir .ts dosyasında kullanılabilir.", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "'package.json', geçerli bir semver aralığı olmayan '{0}' 'typesVersions' girdisine sahip.", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "'package.json', '{2}' modül adıyla eşleşen bir desen arayan '{1}' derleyici sürümüyle eşleşen '{0}' 'typesVersions' girdisine sahip.", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "'package.json', sürüme özgü yol eşlemeleri olan bir 'typesVersions' alanına sahip.", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "'paths' seçeneği belirtildi, '{0}' modül adıyla eşleşen bir desen aranıyor.", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "'readonly' değiştiricisi yalnızca özellik bildiriminde ya da dizin imzasında görünebilir.", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "'readonly' tür değiştiricisine yalnızca dizide ve demet sabit değeri türlerinde izin verilir.", "require_call_may_be_converted_to_an_import_80005": "'require' çağrısı bir import olarak dönüştürülebilir.", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "'rootDirs' seçeneği ayarlandı, '{0}' göreli modül adını çözümlemek için bu değer kullanılıyor.", "super_can_only_be_referenced_in_a_derived_class_2335": "'super' öğesine yalnızca bir türetilmiş sınıfta başvurulabilir.", @@ -1077,6 +1366,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "'super' öğesine hesaplanan bir özellik adında başvurulamaz.", "super_cannot_be_referenced_in_constructor_arguments_2336": "'super' öğesine oluşturucu bağımsız değişkenlerinde başvurulamaz.", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "Nesne değişmez ifadelerinde 'super' değerine yalnızca 'target' seçeneği 'ES2015' veya üzeri olarak ayarlandığında izin verilir.", + "super_may_not_use_type_arguments_2754": "'super', tür bağımsız değişkenlerini kullanamaz.", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "Türetilmiş bir sınıfın oluşturucusunda 'super' özelliğine erişmeden önce 'super' çağrılmalıdır.", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "Türetilen bir sınıfın oluşturucusundaki 'this' değerine erişilmeden önce 'super' çağrılmalıdır.", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "'super' öğesinden sonra bir bağımsız değişken listesi veya üye erişimi gelmelidir.", @@ -1087,14 +1377,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "'super' öğesine oluşturucu bağımsız değişkenlerinde başvurulamaz.", "this_cannot_be_referenced_in_current_location_2332": "'this' öğesine geçerli konumda başvurulamaz.", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "'this', tür ek açıklamasına sahip olmadığından örtük olarak 'any' türü içeriyor", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "'type aliases' yalnızca bir .ts dosyasında kullanılabilir.", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "'type arguments' yalnızca bir .ts dosyasında kullanılabilir.", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "'type assertion expressions' yalnızca bir .ts dosyasında kullanılabilir.", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "'type parameter declarations' yalnızca bir .ts dosyasında kullanılabilir.", - "types_can_only_be_used_in_a_ts_file_8010": "'types' yalnızca bir .ts dosyasında kullanılabilir.", "unique_symbol_types_are_not_allowed_here_1335": "Burada 'unique symbol' türlerine izin verilmez.", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "'unique symbol' türlerine yalnızca bir değişken deyimindeki değişkenlerde izin verilir.", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "'unique symbol' türleri, bağlama adına sahip bir değişken bildiriminde kullanılamaz.", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "'use strict' yönergesi, basit olmayan parametre listesiyle birlikte kullanılamıyor.", + "use_strict_directive_used_here_1349": "'use strict' yönergesi burada kullanıldı.", "with_statements_are_not_allowed_in_an_async_function_block_1300": "'with' deyimlerine zaman uyumsuz bir işlev bloğunda izin verilmez.", "with_statements_are_not_allowed_in_strict_mode_1101": "'with' deyimlerine katı modda izin verilmez.", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "'yield' ifadeleri bir parametre başlatıcısında kullanılamaz." diff --git a/lib/tsc.js b/lib/tsc.js index 372f8322cace9..4116f5c196145 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ @@ -66,7 +66,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook }; var ts; (function (ts) { - ts.versionMajorMinor = "3.8"; + ts.versionMajorMinor = "3.9"; ts.version = ts.versionMajorMinor + ".0-dev"; function tryGetNativeMap() { return typeof Map !== "undefined" && "entries" in Map.prototype ? Map : undefined; @@ -1190,6 +1190,13 @@ var ts; ts.identity = identity; function toLowerCase(x) { return x.toLowerCase(); } ts.toLowerCase = toLowerCase; + var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; + function toFileNameLowerCase(x) { + return fileNameLowerCaseRegExp.test(x) ? + x.replace(fileNameLowerCaseRegExp, toLowerCase) : + x; + } + ts.toFileNameLowerCase = toFileNameLowerCase; function notImplemented() { throw new Error("Not implemented"); } @@ -1507,7 +1514,7 @@ var ts; return false; } function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toLowerCase; + return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; } ts.createGetCanonicalFileName = createGetCanonicalFileName; function patternText(_a) { @@ -1658,80 +1665,174 @@ var ts; } } } + function padLeft(s, length) { + while (s.length < length) { + s = " " + s; + } + return s; + } + ts.padLeft = padLeft; + function padRight(s, length) { + while (s.length < length) { + s = s + " "; + } + return s; + } + ts.padRight = padRight; })(ts || (ts = {})); var ts; (function (ts) { var Debug; (function (Debug) { - Debug.currentAssertionLevel = 0; + var currentAssertionLevel = 0; Debug.isDebugging = false; + var assertionCache = {}; + function getAssertionLevel() { + return currentAssertionLevel; + } + Debug.getAssertionLevel = getAssertionLevel; + function setAssertionLevel(level) { + var prevAssertionLevel = currentAssertionLevel; + currentAssertionLevel = level; + if (level > prevAssertionLevel) { + for (var _i = 0, _a = ts.getOwnKeys(assertionCache); _i < _a.length; _i++) { + var key = _a[_i]; + var cachedFunc = assertionCache[key]; + if (cachedFunc !== undefined && Debug[key] !== cachedFunc.assertion && level >= cachedFunc.level) { + Debug[key] = cachedFunc; + assertionCache[key] = undefined; + } + } + } + } + Debug.setAssertionLevel = setAssertionLevel; function shouldAssert(level) { - return Debug.currentAssertionLevel >= level; + return currentAssertionLevel >= level; } Debug.shouldAssert = shouldAssert; + function shouldAssertFunction(level, name) { + if (!shouldAssert(level)) { + assertionCache[name] = { level: level, assertion: Debug[name] }; + Debug[name] = ts.noop; + return false; + } + return true; + } + function fail(message, stackCrawlMark) { + debugger; + var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); + if (Error.captureStackTrace) { + Error.captureStackTrace(e, stackCrawlMark || fail); + } + throw e; + } + Debug.fail = fail; + function failBadSyntaxKind(node, message, stackCrawlMark) { + return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", stackCrawlMark || failBadSyntaxKind); + } + Debug.failBadSyntaxKind = failBadSyntaxKind; function assert(expression, message, verboseDebugInfo, stackCrawlMark) { if (!expression) { + message = message ? "False expression: " + message : "False expression."; if (verboseDebugInfo) { message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); } - fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert); + fail(message, stackCrawlMark || assert); } } Debug.assert = assert; - function assertEqual(a, b, msg, msg2) { + function assertEqual(a, b, msg, msg2, stackCrawlMark) { if (a !== b) { var message = msg ? msg2 ? msg + " " + msg2 : msg : ""; - fail("Expected " + a + " === " + b + ". " + message); + fail("Expected " + a + " === " + b + ". " + message, stackCrawlMark || assertEqual); } } Debug.assertEqual = assertEqual; - function assertLessThan(a, b, msg) { + function assertLessThan(a, b, msg, stackCrawlMark) { if (a >= b) { - fail("Expected " + a + " < " + b + ". " + (msg || "")); + fail("Expected " + a + " < " + b + ". " + (msg || ""), stackCrawlMark || assertLessThan); } } Debug.assertLessThan = assertLessThan; - function assertLessThanOrEqual(a, b) { + function assertLessThanOrEqual(a, b, stackCrawlMark) { if (a > b) { - fail("Expected " + a + " <= " + b); + fail("Expected " + a + " <= " + b, stackCrawlMark || assertLessThanOrEqual); } } Debug.assertLessThanOrEqual = assertLessThanOrEqual; - function assertGreaterThanOrEqual(a, b) { + function assertGreaterThanOrEqual(a, b, stackCrawlMark) { if (a < b) { - fail("Expected " + a + " >= " + b); + fail("Expected " + a + " >= " + b, stackCrawlMark || assertGreaterThanOrEqual); } } Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual; - function fail(message, stackCrawlMark) { - debugger; - var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); - if (Error.captureStackTrace) { - Error.captureStackTrace(e, stackCrawlMark || fail); + function assertIsDefined(value, message, stackCrawlMark) { + if (value === undefined || value === null) { + fail(message, stackCrawlMark || assertIsDefined); } - throw e; } - Debug.fail = fail; - function assertDefined(value, message) { - if (value === undefined || value === null) - return fail(message); + Debug.assertIsDefined = assertIsDefined; + function checkDefined(value, message, stackCrawlMark) { + assertIsDefined(value, message, stackCrawlMark || checkDefined); return value; } - Debug.assertDefined = assertDefined; - function assertEachDefined(value, message) { + Debug.checkDefined = checkDefined; + Debug.assertDefined = checkDefined; + function assertEachIsDefined(value, message, stackCrawlMark) { for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { var v = value_1[_i]; - assertDefined(v, message); + assertIsDefined(v, message, stackCrawlMark || assertEachIsDefined); } + } + Debug.assertEachIsDefined = assertEachIsDefined; + function checkEachDefined(value, message, stackCrawlMark) { + assertEachIsDefined(value, message, stackCrawlMark || checkEachDefined); return value; } - Debug.assertEachDefined = assertEachDefined; + Debug.checkEachDefined = checkEachDefined; + Debug.assertEachDefined = checkEachDefined; function assertNever(member, message, stackCrawlMark) { if (message === void 0) { message = "Illegal value:"; } var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member); return fail(message + " " + detail, stackCrawlMark || assertNever); } Debug.assertNever = assertNever; + function assertEachNode(nodes, test, message, stackCrawlMark) { + if (shouldAssertFunction(1, "assertEachNode")) { + assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertEachNode); + } + } + Debug.assertEachNode = assertEachNode; + function assertNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1, "assertNode")) { + assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNode); + } + } + Debug.assertNode = assertNode; + function assertNotNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1, "assertNotNode")) { + assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNotNode); + } + } + Debug.assertNotNode = assertNotNode; + function assertOptionalNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1, "assertOptionalNode")) { + assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertOptionalNode); + } + } + Debug.assertOptionalNode = assertOptionalNode; + function assertOptionalToken(node, kind, message, stackCrawlMark) { + if (shouldAssertFunction(1, "assertOptionalToken")) { + assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, stackCrawlMark || assertOptionalToken); + } + } + Debug.assertOptionalToken = assertOptionalToken; + function assertMissingNode(node, message, stackCrawlMark) { + if (shouldAssertFunction(1, "assertMissingNode")) { + assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, stackCrawlMark || assertMissingNode); + } + } + Debug.assertMissingNode = assertMissingNode; function getFunctionName(func) { if (typeof func !== "function") { return ""; @@ -1826,28 +1927,6 @@ var ts; return formatEnum(flags, ts.ObjectFlags, true); } Debug.formatObjectFlags = formatObjectFlags; - function failBadSyntaxKind(node, message) { - return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", failBadSyntaxKind); - } - Debug.failBadSyntaxKind = failBadSyntaxKind; - Debug.assertEachNode = shouldAssert(1) - ? function (nodes, test, message) { return assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertEachNode); } - : ts.noop; - Debug.assertNode = shouldAssert(1) - ? function (node, test, message) { return assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertNotNode = shouldAssert(1) - ? function (node, test, message) { return assert(test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertOptionalNode = shouldAssert(1) - ? function (node, test, message) { return assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertOptionalNode); } - : ts.noop; - Debug.assertOptionalToken = shouldAssert(1) - ? function (node, kind, message) { return assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, Debug.assertOptionalToken); } - : ts.noop; - Debug.assertMissingNode = shouldAssert(1) - ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } - : ts.noop; var isDebugInfoEnabled = false; var extendedDebugModule; function extendedDebug() { @@ -2063,7 +2142,7 @@ var ts; if (prerelease === void 0) { prerelease = ""; } if (build === void 0) { build = ""; } if (typeof major === "string") { - var result = ts.Debug.assertDefined(tryParseComponents(major), "Invalid version"); + var result = ts.Debug.checkDefined(tryParseComponents(major), "Invalid version"); (major = result.major, minor = result.minor, patch = result.patch, prerelease = result.prerelease, build = result.build); } ts.Debug.assert(major >= 0, "Invalid argument: major"); @@ -2163,7 +2242,7 @@ var ts; } var VersionRange = (function () { function VersionRange(spec) { - this._alternatives = spec ? ts.Debug.assertDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; + this._alternatives = spec ? ts.Debug.checkDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; } VersionRange.tryParse = function (text) { var sets = parseRange(text); @@ -2729,7 +2808,7 @@ var ts; callbacksCache.add(path, callback); return { close: function () { - var watcher = ts.Debug.assertDefined(cache.get(path)); + var watcher = ts.Debug.checkDefined(cache.get(path)); callbacksCache.remove(path, callback); watcher.refCount--; if (watcher.refCount) @@ -2808,7 +2887,7 @@ var ts; return { dirName: dirName, close: function () { - var directoryWatcher = ts.Debug.assertDefined(cache.get(dirPath)); + var directoryWatcher = ts.Debug.checkDefined(cache.get(dirPath)); if (callbackToAdd) callbackCache.remove(dirPath, callbackToAdd); directoryWatcher.refCount--; @@ -2964,7 +3043,7 @@ var ts; }; function watchFile(fileName, callback, pollingInterval, options) { options = updateOptionsForWatchFile(options, useNonPollingWatchers); - var watchFileKind = ts.Debug.assertDefined(options.watchFile); + var watchFileKind = ts.Debug.checkDefined(options.watchFile); switch (watchFileKind) { case ts.WatchFileKind.FixedPollingInterval: return pollingWatchFile(fileName, callback, PollingInterval.Low, undefined); @@ -3036,7 +3115,7 @@ var ts; function nonRecursiveWatchDirectory(directoryName, callback, recursive, options) { ts.Debug.assert(!recursive); options = updateOptionsForWatchDirectory(options); - var watchDirectoryKind = ts.Debug.assertDefined(options.watchDirectory); + var watchDirectoryKind = ts.Debug.checkDefined(options.watchDirectory); switch (watchDirectoryKind) { case ts.WatchDirectoryKind.FixedPollingInterval: return pollingWatchFile(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium, undefined); @@ -3561,46 +3640,8 @@ var ts; return hash.digest("hex"); } } - function getChakraSystem() { - var realpath = ChakraHost.realpath && (function (path) { return ChakraHost.realpath(path); }); - return { - newLine: ChakraHost.newLine || "\r\n", - args: ChakraHost.args, - useCaseSensitiveFileNames: !!ChakraHost.useCaseSensitiveFileNames, - write: ChakraHost.echo, - readFile: function (path, _encoding) { - return ChakraHost.readFile(path); - }, - writeFile: function (path, data, writeByteOrderMark) { - if (writeByteOrderMark) { - data = byteOrderMarkIndicator + data; - } - ChakraHost.writeFile(path, data); - }, - resolvePath: ChakraHost.resolvePath, - fileExists: ChakraHost.fileExists, - deleteFile: ChakraHost.deleteFile, - getModifiedTime: ChakraHost.getModifiedTime, - setModifiedTime: ChakraHost.setModifiedTime, - directoryExists: ChakraHost.directoryExists, - createDirectory: ChakraHost.createDirectory, - getExecutingFilePath: function () { return ChakraHost.executingFile; }, - getCurrentDirectory: function () { return ChakraHost.currentDirectory; }, - getDirectories: ChakraHost.getDirectories, - getEnvironmentVariable: ChakraHost.getEnvironmentVariable || (function () { return ""; }), - readDirectory: function (path, extensions, excludes, includes, _depth) { - var pattern = ts.getFileMatcherPatterns(path, excludes, includes, !!ChakraHost.useCaseSensitiveFileNames, ChakraHost.currentDirectory); - return ChakraHost.readDirectory(path, extensions, pattern.basePaths, pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern); - }, - exit: ChakraHost.quit, - realpath: realpath - }; - } var sys; - if (typeof ChakraHost !== "undefined") { - sys = getChakraSystem(); - } - else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { + if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { sys = getNodeSystem(); } if (sys) { @@ -3610,9 +3651,9 @@ var ts; })(); if (ts.sys && ts.sys.getEnvironmentVariable) { setCustomPollingValues(ts.sys); - ts.Debug.currentAssertionLevel = /^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) + ts.Debug.setAssertionLevel(/^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) ? 1 - : 0; + : 0); } if (ts.sys && ts.sys.debugMode) { ts.Debug.isDebugging = true; @@ -4350,8 +4391,9 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), - Type_only_0_must_reference_a_type_but_1_is_a_value: diag(1361, ts.DiagnosticCategory.Error, "Type_only_0_must_reference_a_type_but_1_is_a_value_1361", "Type-only {0} must reference a type, but '{1}' is a value."), - Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported: diag(1362, ts.DiagnosticCategory.Error, "Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported_1362", "Enum '{0}' cannot be used as a value because only its type has been imported."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), + _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), + _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, ts.DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), Convert_to_type_only_export: diag(1364, ts.DiagnosticCategory.Message, "Convert_to_type_only_export_1364", "Convert to type-only export"), Convert_all_re_exported_types_to_type_only_exports: diag(1365, ts.DiagnosticCategory.Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), @@ -4361,11 +4403,16 @@ var ts; Did_you_mean_0: diag(1369, ts.DiagnosticCategory.Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"), Only_ECMAScript_imports_may_use_import_type: diag(1370, ts.DiagnosticCategory.Error, "Only_ECMAScript_imports_may_use_import_type_1370", "Only ECMAScript imports may use 'import type'."), This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error: diag(1371, ts.DiagnosticCategory.Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371", "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'."), - This_import_may_be_converted_to_a_type_only_import: diag(1372, ts.DiagnosticCategory.Suggestion, "This_import_may_be_converted_to_a_type_only_import_1372", "This import may be converted to a type-only import."), Convert_to_type_only_import: diag(1373, ts.DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"), Convert_all_imports_not_used_as_a_value_to_type_only_imports: diag(1374, ts.DiagnosticCategory.Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"), await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1376, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1376", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + _0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."), + _0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."), + Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), + An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), + Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), + Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", undefined, true), @@ -4526,6 +4573,8 @@ var ts; Type_alias_0_circularly_references_itself: diag(2456, ts.DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), Type_alias_name_cannot_be_0: diag(2457, ts.DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, ts.DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Module_0_declares_1_locally_but_it_is_not_exported: diag(2459, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), + Module_0_declares_1_locally_but_it_is_exported_as_2: diag(2460, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), Type_0_is_not_an_array_type: diag(2461, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, ts.DiagnosticCategory.Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, ts.DiagnosticCategory.Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), @@ -4749,7 +4798,7 @@ var ts; Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, ts.DiagnosticCategory.Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, ts.DiagnosticCategory.Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension"), Property_0_was_also_declared_here: diag(2733, ts.DiagnosticCategory.Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), - It_is_highly_likely_that_you_are_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "It_is_highly_likely_that_you_are_missing_a_semicolon_2734", "It is highly likely that you are missing a semicolon."), + Are_you_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, ts.DiagnosticCategory.Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), Operator_0_cannot_be_applied_to_type_1: diag(2736, ts.DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: diag(2737, ts.DiagnosticCategory.Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), @@ -4798,6 +4847,7 @@ var ts; The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: diag(2780, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: diag(2781, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), _0_needs_an_explicit_type_annotation: diag(2782, ts.DiagnosticCategory.Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), + _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: diag(2783, ts.DiagnosticCategory.Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), @@ -4985,7 +5035,7 @@ var ts; File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, ts.DiagnosticCategory.Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, ts.DiagnosticCategory.Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), NEWLINE: diag(6061, ts.DiagnosticCategory.Message, "NEWLINE_6061", "NEWLINE"), - Option_0_can_only_be_specified_in_tsconfig_json_file: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_6064", "Option '{0}' can only be specified in 'tsconfig.json' file."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), Enables_experimental_support_for_ES7_decorators: diag(6065, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), Enables_experimental_support_for_ES7_async_functions: diag(6068, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_async_functions_6068", "Enables experimental support for ES7 async functions."), @@ -5146,6 +5196,8 @@ var ts; Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling: diag(6226, ts.DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'."), Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority: diag(6227, ts.DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'."), Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6228, ts.DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228", "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively."), + Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, ts.DiagnosticCategory.Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), Projects_to_reference: diag(6300, ts.DiagnosticCategory.Message, "Projects_to_reference_6300", "Projects to reference"), Enable_project_compilation: diag(6302, ts.DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"), Composite_projects_may_not_disable_declaration_emit: diag(6304, ts.DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), @@ -5342,6 +5394,7 @@ var ts; Import_default_0_from_module_1: diag(90032, ts.DiagnosticCategory.Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""), Add_default_import_0_to_existing_import_declaration_from_1: diag(90033, ts.DiagnosticCategory.Message, "Add_default_import_0_to_existing_import_declaration_from_1_90033", "Add default import '{0}' to existing import declaration from \"{1}\""), Add_parameter_name: diag(90034, ts.DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"), + Declare_a_private_field_named_0: diag(90053, ts.DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), Convert_function_to_an_ES2015_class: diag(95001, ts.DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), Convert_function_0_to_class: diag(95002, ts.DiagnosticCategory.Message, "Convert_function_0_to_class_95002", "Convert function '{0}' to class"), Extract_to_0_in_1: diag(95004, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), @@ -5437,6 +5490,8 @@ var ts; Add_export_to_make_this_file_into_a_module: diag(95097, ts.DiagnosticCategory.Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), Set_the_target_option_in_your_configuration_file_to_0: diag(95098, ts.DiagnosticCategory.Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), Set_the_module_option_in_your_configuration_file_to_0: diag(95099, ts.DiagnosticCategory.Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), + Convert_invalid_character_to_its_html_entity_code: diag(95100, ts.DiagnosticCategory.Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), + Wrap_invalid_character_in_an_expression_container: diag(95101, ts.DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95101", "Wrap invalid character in an expression container"), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), @@ -5715,6 +5770,12 @@ var ts; function isDigit(ch) { return ch >= 48 && ch <= 57; } + function isHexDigit(ch) { + return isDigit(ch) || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102; + } + function isCodePoint(code) { + return code <= 0x10FFFF; + } function isOctalDigit(ch) { return ch >= 48 && ch <= 55; } @@ -6056,6 +6117,7 @@ var ts; reScanGreaterToken: reScanGreaterToken, reScanSlashToken: reScanSlashToken, reScanTemplateToken: reScanTemplateToken, + reScanTemplateHeadOrNoSubstitutionTemplate: reScanTemplateHeadOrNoSubstitutionTemplate, scanJsxIdentifier: scanJsxIdentifier, scanJsxAttributeValue: scanJsxAttributeValue, reScanJsxAttributeValue: reScanJsxAttributeValue, @@ -6292,7 +6354,7 @@ var ts; } return result; } - function scanTemplateAndSetTokenValue() { + function scanTemplateAndSetTokenValue(isTaggedTemplate) { var startedWithBacktick = text.charCodeAt(pos) === 96; pos++; var start = pos; @@ -6321,7 +6383,7 @@ var ts; } if (currChar === 92) { contents += text.substring(start, pos); - contents += scanEscapeSequence(); + contents += scanEscapeSequence(isTaggedTemplate); start = pos; continue; } @@ -6341,7 +6403,8 @@ var ts; tokenValue = contents; return resultingToken; } - function scanEscapeSequence() { + function scanEscapeSequence(isTaggedTemplate) { + var start = pos; pos++; if (pos >= end) { error(ts.Diagnostics.Unexpected_end_of_text); @@ -6351,6 +6414,11 @@ var ts; pos++; switch (ch) { case 48: + if (isTaggedTemplate && pos < end && isDigit(text.charCodeAt(pos))) { + pos++; + tokenFlags |= 2048; + return text.substring(start, pos); + } return "\0"; case 98: return "\b"; @@ -6369,14 +6437,50 @@ var ts; case 34: return "\""; case 117: + if (isTaggedTemplate) { + for (var escapePos = pos; escapePos < pos + 4; escapePos++) { + if (escapePos < end && !isHexDigit(text.charCodeAt(escapePos)) && text.charCodeAt(escapePos) !== 123) { + pos = escapePos; + tokenFlags |= 2048; + return text.substring(start, pos); + } + } + } if (pos < end && text.charCodeAt(pos) === 123) { - tokenFlags |= 8; pos++; + if (isTaggedTemplate && !isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048; + return text.substring(start, pos); + } + if (isTaggedTemplate) { + var savePos = pos; + var escapedValueString = scanMinimumNumberOfHexDigits(1, false); + var escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + if (!isCodePoint(escapedValue) || text.charCodeAt(pos) !== 125) { + tokenFlags |= 2048; + return text.substring(start, pos); + } + else { + pos = savePos; + } + } + tokenFlags |= 8; return scanExtendedUnicodeEscape(); } tokenFlags |= 1024; return scanHexadecimalEscape(4); case 120: + if (isTaggedTemplate) { + if (!isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048; + return text.substring(start, pos); + } + else if (!isHexDigit(text.charCodeAt(pos + 1))) { + pos++; + tokenFlags |= 2048; + return text.substring(start, pos); + } + } return scanHexadecimalEscape(2); case 13: if (pos < end && text.charCodeAt(pos) === 10) { @@ -6632,7 +6736,7 @@ var ts; tokenValue = scanString(); return token = 10; case 96: - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(false); case 37: if (text.charCodeAt(pos + 1) === 61) { return pos += 2, token = 68; @@ -6954,10 +7058,12 @@ var ts; if (ch === 92) { tokenValue += scanIdentifierParts(); } - return token = 76; } - error(ts.Diagnostics.Invalid_character); - return token = 0; + else { + tokenValue = "#"; + error(ts.Diagnostics.Invalid_character); + } + return token = 76; default: if (isIdentifierStart(ch, languageVersion)) { pos += charSize(ch); @@ -7050,10 +7156,14 @@ var ts; } return token; } - function reScanTemplateToken() { + function reScanTemplateToken(isTaggedTemplate) { ts.Debug.assert(token === 19, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + pos = tokenPos; + return token = scanTemplateAndSetTokenValue(true); } function reScanJsxToken() { pos = tokenPos = startPos; @@ -7090,7 +7200,11 @@ var ts; return token = 18; } var firstNonWhitespace = 0; + var lastNonWhitespace = -1; while (pos < end) { + if (!isWhiteSpaceSingleLine(char)) { + lastNonWhitespace = pos; + } char = text.charCodeAt(pos); if (char === 123) { break; @@ -7102,6 +7216,14 @@ var ts; } break; } + if (char === 62) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); + } + if (char === 125) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); + } + if (lastNonWhitespace > 0) + lastNonWhitespace++; if (isLineBreak(char) && firstNonWhitespace === 0) { firstNonWhitespace = -1; } @@ -7110,7 +7232,8 @@ var ts; } pos++; } - tokenValue = text.substring(startPos, pos); + var endPosition = lastNonWhitespace === -1 ? pos : lastNonWhitespace; + tokenValue = text.substring(startPos, endPosition); return firstNonWhitespace === -1 ? 12 : 11; } function scanJsxIdentifier() { @@ -7692,8 +7815,8 @@ var ts; switch (declaration.kind) { case 75: return declaration; - case 322: - case 316: { + case 323: + case 317: { var name = declaration.name; if (name.kind === 153) { return name.right; @@ -7717,9 +7840,9 @@ var ts; return undefined; } } - case 321: + case 322: return getNameOfJSDocTypedef(declaration); - case 315: + case 316: return nameForNamelessJSDocTypedef(declaration); case 259: { var expression = declaration.expression; @@ -7793,6 +7916,10 @@ var ts; return getFirstJSDocTag(node, isJSDocAugmentsTag); } ts.getJSDocAugmentsTag = getJSDocAugmentsTag; + function getJSDocImplementsTags(node) { + return getAllJSDocTags(node, isJSDocImplementsTag); + } + ts.getJSDocImplementsTags = getJSDocImplementsTags; function getJSDocClassTag(node) { return getFirstJSDocTag(node, isJSDocClassTag); } @@ -7876,6 +8003,10 @@ var ts; function getFirstJSDocTag(node, predicate) { return ts.find(getJSDocTags(node), predicate); } + function getAllJSDocTags(node, predicate) { + return getJSDocTags(node).filter(predicate); + } + ts.getAllJSDocTags = getAllJSDocTags; function getAllJSDocTagsOfKind(node, kind) { return getJSDocTags(node).filter(function (doc) { return doc.kind === kind; }); } @@ -8190,7 +8321,7 @@ var ts; } ts.isParenthesizedExpression = isParenthesizedExpression; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 325) { + while (node.kind === 326) { node = node.expression; } return node; @@ -8605,67 +8736,71 @@ var ts; } ts.isJSDoc = isJSDoc; function isJSDocAuthorTag(node) { - return node.kind === 308; + return node.kind === 309; } ts.isJSDocAuthorTag = isJSDocAuthorTag; function isJSDocAugmentsTag(node) { return node.kind === 307; } ts.isJSDocAugmentsTag = isJSDocAugmentsTag; + function isJSDocImplementsTag(node) { + return node.kind === 308; + } + ts.isJSDocImplementsTag = isJSDocImplementsTag; function isJSDocClassTag(node) { - return node.kind === 309; + return node.kind === 310; } ts.isJSDocClassTag = isJSDocClassTag; function isJSDocPublicTag(node) { - return node.kind === 310; + return node.kind === 311; } ts.isJSDocPublicTag = isJSDocPublicTag; function isJSDocPrivateTag(node) { - return node.kind === 311; + return node.kind === 312; } ts.isJSDocPrivateTag = isJSDocPrivateTag; function isJSDocProtectedTag(node) { - return node.kind === 312; + return node.kind === 313; } ts.isJSDocProtectedTag = isJSDocProtectedTag; function isJSDocReadonlyTag(node) { - return node.kind === 313; + return node.kind === 314; } ts.isJSDocReadonlyTag = isJSDocReadonlyTag; function isJSDocEnumTag(node) { - return node.kind === 315; + return node.kind === 316; } ts.isJSDocEnumTag = isJSDocEnumTag; function isJSDocThisTag(node) { - return node.kind === 318; + return node.kind === 319; } ts.isJSDocThisTag = isJSDocThisTag; function isJSDocParameterTag(node) { - return node.kind === 316; + return node.kind === 317; } ts.isJSDocParameterTag = isJSDocParameterTag; function isJSDocReturnTag(node) { - return node.kind === 317; + return node.kind === 318; } ts.isJSDocReturnTag = isJSDocReturnTag; function isJSDocTypeTag(node) { - return node.kind === 319; + return node.kind === 320; } ts.isJSDocTypeTag = isJSDocTypeTag; function isJSDocTemplateTag(node) { - return node.kind === 320; + return node.kind === 321; } ts.isJSDocTemplateTag = isJSDocTemplateTag; function isJSDocTypedefTag(node) { - return node.kind === 321; + return node.kind === 322; } ts.isJSDocTypedefTag = isJSDocTypedefTag; function isJSDocPropertyTag(node) { - return node.kind === 322; + return node.kind === 323; } ts.isJSDocPropertyTag = isJSDocPropertyTag; function isJSDocPropertyLikeTag(node) { - return node.kind === 322 || node.kind === 316; + return node.kind === 323 || node.kind === 317; } ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag; function isJSDocTypeLiteral(node) { @@ -8673,7 +8808,7 @@ var ts; } ts.isJSDocTypeLiteral = isJSDocTypeLiteral; function isJSDocCallbackTag(node) { - return node.kind === 314; + return node.kind === 315; } ts.isJSDocCallbackTag = isJSDocCallbackTag; function isJSDocSignature(node) { @@ -8681,7 +8816,7 @@ var ts; } ts.isJSDocSignature = isJSDocSignature; function isSyntaxList(n) { - return n.kind === 323; + return n.kind === 324; } ts.isSyntaxList = isSyntaxList; function isNode(node) { @@ -8726,21 +8861,20 @@ var ts; return isImportSpecifier(node) || isExportSpecifier(node); } ts.isImportOrExportSpecifier = isImportOrExportSpecifier; - function isTypeOnlyImportOrExportName(node) { - if (node.kind !== 75) { - return false; - } - switch (node.parent.kind) { + function isTypeOnlyImportOrExportDeclaration(node) { + switch (node.kind) { case 258: case 263: - return node.parent.parent.parent.isTypeOnly; - case 255: + return node.parent.parent.isTypeOnly; + case 256: return node.parent.isTypeOnly; + case 255: + return node.isTypeOnly; default: return false; } } - ts.isTypeOnlyImportOrExportName = isTypeOnlyImportOrExportName; + ts.isTypeOnlyImportOrExportDeclaration = isTypeOnlyImportOrExportDeclaration; function isStringTextContainingNode(node) { return node.kind === 10 || isTemplateLiteralKind(node.kind); } @@ -9089,8 +9223,8 @@ var ts; case 213: case 217: case 215: + case 327: case 326: - case 325: return true; default: return isUnaryExpressionKind(kind); @@ -9103,15 +9237,15 @@ var ts; } ts.isAssertionExpression = isAssertionExpression; function isPartiallyEmittedExpression(node) { - return node.kind === 325; + return node.kind === 326; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; function isNotEmittedStatement(node) { - return node.kind === 324; + return node.kind === 325; } ts.isNotEmittedStatement = isNotEmittedStatement; function isSyntheticReference(node) { - return node.kind === 329; + return node.kind === 330; } ts.isSyntheticReference = isSyntheticReference; function isNotEmittedOrPartiallyEmittedNode(node) { @@ -9228,9 +9362,9 @@ var ts; || kind === 247 || kind === 155 || kind === 242 - || kind === 321 - || kind === 314 - || kind === 322; + || kind === 322 + || kind === 315 + || kind === 323; } function isDeclarationStatementKind(kind) { return kind === 244 @@ -9265,13 +9399,13 @@ var ts; || kind === 225 || kind === 229 || kind === 236 - || kind === 324 - || kind === 328 - || kind === 327; + || kind === 325 + || kind === 329 + || kind === 328; } function isDeclaration(node) { if (node.kind === 155) { - return (node.parent && node.parent.kind !== 320) || ts.isInJSFile(node); + return (node.parent && node.parent.kind !== 321) || ts.isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -9349,15 +9483,15 @@ var ts; } ts.isCaseOrDefaultClause = isCaseOrDefaultClause; function isJSDocNode(node) { - return node.kind >= 294 && node.kind <= 322; + return node.kind >= 294 && node.kind <= 323; } ts.isJSDocNode = isJSDocNode; function isJSDocCommentContainingNode(node) { - return node.kind === 303 || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 303 || node.kind === 302 || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode; function isJSDocTag(node) { - return node.kind >= 306 && node.kind <= 322; + return node.kind >= 306 && node.kind <= 323; } ts.isJSDocTag = isJSDocTag; function isSetAccessor(node) { @@ -9382,7 +9516,18 @@ var ts; } ts.hasInitializer = hasInitializer; function hasOnlyExpressionInitializer(node) { - return hasInitializer(node) && !isForStatement(node) && !isForInStatement(node) && !isForOfStatement(node) && !isJsxAttribute(node); + switch (node.kind) { + case 242: + case 156: + case 191: + case 158: + case 159: + case 281: + case 284: + return true; + default: + return false; + } } ts.hasOnlyExpressionInitializer = hasOnlyExpressionInitializer; function isObjectLiteralElement(node) { @@ -9465,14 +9610,6 @@ var ts; return (symbol.flags & 33554432) !== 0; } ts.isTransientSymbol = isTransientSymbol; - function isTypeOnlyAlias(symbol) { - return isTransientSymbol(symbol) && !!symbol.immediateTarget; - } - ts.isTypeOnlyAlias = isTypeOnlyAlias; - function isTypeOnlyEnumAlias(symbol) { - return isTypeOnlyAlias(symbol) && !!(symbol.immediateTarget.flags & 384); - } - ts.isTypeOnlyEnumAlias = isTypeOnlyEnumAlias; var stringWriter = createSingleLineStringWriter(); function createSingleLineStringWriter() { var str = ""; @@ -9813,7 +9950,7 @@ var ts; if (includeJsDoc && ts.hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0]); } - if (node.kind === 323 && node._children.length > 0) { + if (node.kind === 324 && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); @@ -9832,7 +9969,7 @@ var ts; } ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; function isJSDocTypeExpressionOrChild(node) { - return node.kind === 294 || (node.parent && isJSDocTypeExpressionOrChild(node.parent)); + return !!findAncestor(node, ts.isJSDocTypeExpression); } function getTextOfNodeFromSourceText(sourceText, node, includeTrivia) { if (includeTrivia === void 0) { includeTrivia = false; } @@ -9863,24 +10000,29 @@ var ts; return emitNode && emitNode.flags || 0; } ts.getEmitFlags = getEmitFlags; - function getLiteralText(node, sourceFile, neverAsciiEscape) { + function getLiteralText(node, sourceFile, neverAsciiEscape, jsxAttributeEscape) { if (!nodeIsSynthesized(node) && node.parent && !((ts.isNumericLiteral(node) && node.numericLiteralFlags & 512) || ts.isBigIntLiteral(node))) { return getSourceTextOfNodeFromSourceFile(sourceFile, node); } - var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216) ? escapeString : escapeNonAsciiString; switch (node.kind) { - case 10: + case 10: { + var escapeText = jsxAttributeEscape ? escapeJsxAttributeString : + neverAsciiEscape || (getEmitFlags(node) & 16777216) ? escapeString : + escapeNonAsciiString; if (node.singleQuote) { return "'" + escapeText(node.text, 39) + "'"; } else { return '"' + escapeText(node.text, 34) + '"'; } + } case 14: case 15: case 16: - case 17: + case 17: { + var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216) ? escapeString : + escapeNonAsciiString; var rawText = node.rawText || escapeTemplateSubstitution(escapeText(node.text, 96)); switch (node.kind) { case 14: @@ -9893,6 +10035,7 @@ var ts; return "}" + rawText + "`"; } break; + } case 8: case 9: case 13: @@ -10027,8 +10170,8 @@ var ts; ts.isBlockScope = isBlockScope; function isDeclarationWithTypeParameters(node) { switch (node.kind) { - case 314: - case 321: + case 315: + case 322: case 305: return true; default: @@ -10050,7 +10193,7 @@ var ts; case 214: case 246: case 247: - case 320: + case 321: case 244: case 161: case 162: @@ -10128,12 +10271,15 @@ var ts; ts.getTextOfPropertyName = getTextOfPropertyName; function entityNameToString(name) { switch (name.kind) { + case 104: + return "this"; + case 76: case 75: return getFullWidth(name) === 0 ? ts.idText(name) : getTextOfNode(name); case 153: return entityNameToString(name.left) + "." + entityNameToString(name.right); case 194: - if (ts.isIdentifier(name.name)) { + if (ts.isIdentifier(name.name) || ts.isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { @@ -10363,7 +10509,7 @@ var ts; return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); case 155: return node === parent.constraint; - case 320: + case 321: return node === parent.constraint; case 159: case 158: @@ -10926,6 +11072,13 @@ var ts; } } ts.isInExpressionContext = isInExpressionContext; + function isPartOfTypeQuery(node) { + while (node.kind === 153 || node.kind === 75) { + node = node.parent; + } + return node.kind === 172; + } + ts.isPartOfTypeQuery = isPartOfTypeQuery; function isExternalModuleImportEqualsDeclaration(node) { return node.kind === 253 && node.moduleReference.kind === 265; } @@ -11360,6 +11513,21 @@ var ts; return node.kind === 254 && !!node.importClause && !!node.importClause.name; } ts.isDefaultImport = isDefaultImport; + function forEachImportClauseDeclaration(node, action) { + if (node.name) { + var result = action(node); + if (result) + return result; + } + if (node.namedBindings) { + var result = ts.isNamespaceImport(node.namedBindings) + ? action(node.namedBindings) + : ts.forEach(node.namedBindings.elements, action); + if (result) + return result; + } + } + ts.forEachImportClauseDeclaration = forEachImportClauseDeclaration; function hasQuestionToken(node) { if (node) { switch (node.kind) { @@ -11383,7 +11551,7 @@ var ts; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function isJSDocTypeAlias(node) { - return node.kind === 321 || node.kind === 314 || node.kind === 315; + return node.kind === 322 || node.kind === 315 || node.kind === 316; } ts.isJSDocTypeAlias = isJSDocTypeAlias; function isTypeAlias(node) { @@ -11504,7 +11672,7 @@ var ts; } ts.getHostSignatureFromJSDocHost = getHostSignatureFromJSDocHost; function getJSDocHost(node) { - return ts.Debug.assertDefined(findAncestor(node.parent, ts.isJSDoc)).parent; + return ts.Debug.checkDefined(findAncestor(node.parent, ts.isJSDoc)).parent; } ts.getJSDocHost = getJSDocHost; function getTypeParameterFromJsDoc(node) { @@ -11731,9 +11899,27 @@ var ts; node.kind === 281 && isAliasableExpression(node.initializer); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; + function getAliasDeclarationFromName(node) { + switch (node.parent.kind) { + case 255: + case 258: + case 256: + case 263: + case 259: + case 253: + return node.parent; + case 153: + do { + node = node.parent; + } while (node.parent.kind === 153); + return getAliasDeclarationFromName(node); + } + } + ts.getAliasDeclarationFromName = getAliasDeclarationFromName; function isAliasableExpression(e) { return isEntityNameExpression(e) || ts.isClassExpression(e); } + ts.isAliasableExpression = isAliasableExpression; function exportAssignmentIsAlias(node) { var e = getExportAssignmentExpression(node); return isAliasableExpression(e); @@ -11764,14 +11950,19 @@ var ts; return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassExtendsHeritageElement = getClassExtendsHeritageElement; - function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 113); - return heritageClause ? heritageClause.types : undefined; + function getEffectiveImplementsTypeNodes(node) { + if (isInJSFile(node)) { + return ts.getJSDocImplementsTags(node).map(function (n) { return n.class; }); + } + else { + var heritageClause = getHeritageClause(node.heritageClauses, 113); + return heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.types; + } } - ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; + ts.getEffectiveImplementsTypeNodes = getEffectiveImplementsTypeNodes; function getAllSuperTypeNodes(node) { return ts.isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || ts.emptyArray : - ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getClassImplementsHeritageClauseElements(node)) || ts.emptyArray : + ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || ts.emptyArray : ts.emptyArray; } ts.getAllSuperTypeNodes = getAllSuperTypeNodes; @@ -12061,7 +12252,7 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 326: + case 327: return 0; case 213: return 1; @@ -12250,6 +12441,12 @@ var ts; function escapeTemplateSubstitution(str) { return str.replace(templateSubstitutionRegExp, "\\${"); } + function hasInvalidEscape(template) { + return template && !!(ts.isNoSubstitutionTemplateLiteral(template) + ? template.templateFlags + : (template.head.templateFlags || ts.some(template.templateSpans, function (span) { return !!span.literal.templateFlags; }))); + } + ts.hasInvalidEscape = hasInvalidEscape; var doubleQuoteEscapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; var singleQuoteEscapedCharsRegExp = /[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; var backtickQuoteEscapedCharsRegExp = /[\\\`]/g; @@ -12268,6 +12465,21 @@ var ts; "\u2029": "\\u2029", "\u0085": "\\u0085" }); + function encodeUtf16EscapeSequence(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + var paddedHexCode = ("0000" + hexCharCode).slice(-4); + return "\\u" + paddedHexCode; + } + function getReplacement(c, offset, input) { + if (c.charCodeAt(0) === 0) { + var lookAhead = input.charCodeAt(offset + c.length); + if (lookAhead >= 48 && lookAhead <= 57) { + return "\\x00"; + } + return "\\0"; + } + return escapedCharsMap.get(c) || encodeUtf16EscapeSequence(c.charCodeAt(0)); + } function escapeString(s, quoteChar) { var escapedCharsRegExp = quoteChar === 96 ? backtickQuoteEscapedCharsRegExp : quoteChar === 39 ? singleQuoteEscapedCharsRegExp : @@ -12275,6 +12487,36 @@ var ts; return s.replace(escapedCharsRegExp, getReplacement); } ts.escapeString = escapeString; + var nonAsciiCharacters = /[^\u0000-\u007F]/g; + function escapeNonAsciiString(s, quoteChar) { + s = escapeString(s, quoteChar); + return nonAsciiCharacters.test(s) ? + s.replace(nonAsciiCharacters, function (c) { return encodeUtf16EscapeSequence(c.charCodeAt(0)); }) : + s; + } + ts.escapeNonAsciiString = escapeNonAsciiString; + var jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxEscapedCharsMap = ts.createMapFromTemplate({ + "\"": """, + "\'": "'" + }); + function encodeJsxCharacterEntity(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + return "&#x" + hexCharCode + ";"; + } + function getJsxAttributeStringReplacement(c) { + if (c.charCodeAt(0) === 0) { + return "�"; + } + return jsxEscapedCharsMap.get(c) || encodeJsxCharacterEntity(c.charCodeAt(0)); + } + function escapeJsxAttributeString(s, quoteChar) { + var escapedCharsRegExp = quoteChar === 39 ? jsxSingleQuoteEscapedCharsRegExp : + jsxDoubleQuoteEscapedCharsRegExp; + return s.replace(escapedCharsRegExp, getJsxAttributeStringReplacement); + } + ts.escapeJsxAttributeString = escapeJsxAttributeString; function stripQuotes(name) { var length = name.length; if (length >= 2 && name.charCodeAt(0) === name.charCodeAt(length - 1) && isQuoteOrBacktick(name.charCodeAt(0))) { @@ -12288,34 +12530,11 @@ var ts; charCode === 34 || charCode === 96; } - function getReplacement(c, offset, input) { - if (c.charCodeAt(0) === 0) { - var lookAhead = input.charCodeAt(offset + c.length); - if (lookAhead >= 48 && lookAhead <= 57) { - return "\\x00"; - } - return "\\0"; - } - return escapedCharsMap.get(c) || get16BitUnicodeEscapeSequence(c.charCodeAt(0)); - } function isIntrinsicJsxName(name) { var ch = name.charCodeAt(0); return (ch >= 97 && ch <= 122) || ts.stringContains(name, "-"); } ts.isIntrinsicJsxName = isIntrinsicJsxName; - function get16BitUnicodeEscapeSequence(charCode) { - var hexCharCode = charCode.toString(16).toUpperCase(); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - var nonAsciiCharacters = /[^\u0000-\u007F]/g; - function escapeNonAsciiString(s, quoteChar) { - s = escapeString(s, quoteChar); - return nonAsciiCharacters.test(s) ? - s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) : - s; - } - ts.escapeNonAsciiString = escapeNonAsciiString; var indentStrings = ["", " "]; function getIndentString(level) { if (indentStrings[level] === undefined) { @@ -12895,6 +13114,9 @@ var ts; } ts.getSelectedModifierFlags = getSelectedModifierFlags; function getModifierFlags(node) { + if (node.kind >= 0 && node.kind <= 152) { + return 0; + } if (node.modifierFlagsCache & 536870912) { return node.modifierFlagsCache & ~536870912; } @@ -13007,7 +13229,7 @@ var ts; } ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { - return node.kind === 75 || node.kind === 104 || + return node.kind === 75 || node.kind === 104 || node.kind === 102 || node.kind === 194 && isDottedName(node.expression) || node.kind === 200 && isDottedName(node.expression); } @@ -13533,6 +13755,14 @@ var ts; return node.kind === 194 || node.kind === 195; } ts.isAccessExpression = isAccessExpression; + function getNameOfAccessExpression(node) { + if (node.kind === 194) { + return node.name; + } + ts.Debug.assert(node.kind === 195); + return node.argumentExpression; + } + ts.getNameOfAccessExpression = getNameOfAccessExpression; function isBundleFileTextLike(section) { switch (section.kind) { case "text": @@ -13583,6 +13813,26 @@ var ts; this.parent = undefined; this.original = undefined; } + function Token(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0; + this.transformFlags = 0; + this.parent = undefined; + } + function Identifier(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0; + this.transformFlags = 0; + this.parent = undefined; + this.original = undefined; + this.flowNode = undefined; + } function SourceMapSource(fileName, text, skipTrivia) { this.fileName = fileName; this.text = text; @@ -13590,8 +13840,8 @@ var ts; } ts.objectAllocator = { getNodeConstructor: function () { return Node; }, - getTokenConstructor: function () { return Node; }, - getIdentifierConstructor: function () { return Node; }, + getTokenConstructor: function () { return Token; }, + getIdentifierConstructor: function () { return Identifier; }, getPrivateIdentifierConstructor: function () { return Node; }, getSourceFileConstructor: function () { return Node; }, getSymbolConstructor: function () { return Symbol; }, @@ -13605,7 +13855,7 @@ var ts; ts.setObjectAllocator = setObjectAllocator; function formatStringFromArgs(text, args, baseIndex) { if (baseIndex === void 0) { baseIndex = 0; } - return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.assertDefined(args[+index + baseIndex]); }); + return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.checkDefined(args[+index + baseIndex]); }); } ts.formatStringFromArgs = formatStringFromArgs; function setLocalizedDiagnosticMessages(messages) { @@ -14489,6 +14739,32 @@ var ts; return (negative && base10Value !== "0" ? "-" : "") + base10Value; } ts.pseudoBigIntToString = pseudoBigIntToString; + function isValidTypeOnlyAliasUseSite(useSite) { + return !!(useSite.flags & 8388608) + || isPartOfTypeQuery(useSite) + || isFirstIdentifierOfNonEmittingHeritageClause(useSite) + || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) + || !isExpressionNode(useSite); + } + ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite; + function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { + while (node.kind === 75 || node.kind === 194) { + node = node.parent; + } + if (node.kind !== 154) { + return false; + } + if (hasModifier(node.parent, 128)) { + return true; + } + var containerKind = node.parent.parent.kind; + return containerKind === 246 || containerKind === 173; + } + function isFirstIdentifierOfNonEmittingHeritageClause(node) { + var _a, _b; + var heritageClause = (_a = ts.tryCast(node.parent.parent, ts.isHeritageClause)) !== null && _a !== void 0 ? _a : ts.tryCast((_b = node.parent.parent) === null || _b === void 0 ? void 0 : _b.parent, ts.isHeritageClause); + return (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.token) === 113 || (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.parent.kind) === 246; + } })(ts || (ts = {})); var ts; (function (ts) { @@ -14894,7 +15170,7 @@ var ts; return visitNode(cbNode, node.expression); case 264: return visitNodes(cbNode, cbNodes, node.decorators); - case 326: + case 327: return visitNodes(cbNode, cbNodes, node.elements); case 266: return visitNode(cbNode, node.openingElement) || @@ -14934,24 +15210,27 @@ var ts; visitNode(cbNode, node.type); case 303: return visitNodes(cbNode, cbNodes, node.tags); - case 316: - case 322: + case 317: + case 323: return visitNode(cbNode, node.tagName) || (node.isNameFirst ? visitNode(cbNode, node.name) || visitNode(cbNode, node.typeExpression) : visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name)); - case 308: + case 309: return visitNode(cbNode, node.tagName); + case 308: + return visitNode(cbNode, node.tagName) || + visitNode(cbNode, node.class); case 307: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.class); - case 320: + case 321: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters); - case 321: + case 322: return visitNode(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 294 @@ -14959,14 +15238,14 @@ var ts; visitNode(cbNode, node.fullName) : visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression)); - case 314: + case 315: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression); - case 317: - case 319: case 318: - case 315: + case 320: + case 319: + case 316: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.typeExpression); case 305: @@ -14976,17 +15255,71 @@ var ts; case 304: return ts.forEach(node.jsDocPropertyTags, cbNode); case 306: - case 309: case 310: case 311: case 312: case 313: + case 314: return visitNode(cbNode, node.tagName); - case 325: + case 326: return visitNode(cbNode, node.expression); } } ts.forEachChild = forEachChild; + function forEachChildRecursively(rootNode, cbNode, cbNodes) { + var stack = [rootNode]; + while (stack.length) { + var parent = stack.pop(); + var res = visitAllPossibleChildren(parent, gatherPossibleChildren(parent)); + if (res) { + return res; + } + } + return; + function gatherPossibleChildren(node) { + var children = []; + forEachChild(node, addWorkItem, addWorkItem); + return children; + function addWorkItem(n) { + children.unshift(n); + } + } + function visitAllPossibleChildren(parent, children) { + for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { + var child = children_1[_i]; + if (ts.isArray(child)) { + if (cbNodes) { + var res = cbNodes(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + for (var i = child.length - 1; i >= 0; i--) { + var realChild = child[i]; + var res = cbNode(realChild, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + stack.push(realChild); + } + } + else { + stack.push(child); + var res = cbNode(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + } + } + } + ts.forEachChildRecursively = forEachChildRecursively; function createSourceFile(fileName, sourceText, languageVersion, setParentNodes, scriptKind) { if (setParentNodes === void 0) { setParentNodes = false; } ts.performance.mark("beforeParse"); @@ -15221,24 +15554,15 @@ var ts; return node; } function fixupParentReferences(rootNode) { - var parent = rootNode; - forEachChild(rootNode, visitNode); - return; - function visitNode(n) { - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; - forEachChild(n, visitNode); - if (ts.hasJSDocNodes(n)) { - for (var _i = 0, _a = n.jsDoc; _i < _a.length; _i++) { - var jsDoc = _a[_i]; - jsDoc.parent = n; - parent = jsDoc; - forEachChild(jsDoc, visitNode); - } + forEachChildRecursively(rootNode, bindParentToChild); + function bindParentToChild(child, parent) { + child.parent = parent; + if (ts.hasJSDocNodes(child)) { + for (var _i = 0, _a = child.jsDoc; _i < _a.length; _i++) { + var doc = _a[_i]; + bindParentToChild(doc, child); + forEachChildRecursively(doc, bindParentToChild); } - parent = saveParent; } } } @@ -15378,8 +15702,11 @@ var ts; function reScanSlashToken() { return currentToken = scanner.reScanSlashToken(); } - function reScanTemplateToken() { - return currentToken = scanner.reScanTemplateToken(); + function reScanTemplateToken(isTaggedTemplate) { + return currentToken = scanner.reScanTemplateToken(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + return currentToken = scanner.reScanTemplateHeadOrNoSubstitutionTemplate(); } function reScanLessThanToken() { return currentToken = scanner.reScanLessThanToken(); @@ -15561,7 +15888,7 @@ var ts; } return identifier; } - function createIdentifier(isIdentifier, diagnosticMessage) { + function createIdentifier(isIdentifier, diagnosticMessage, privateIdentifierDiagnosticMessage) { identifierCount++; if (isIdentifier) { var node = createNode(75); @@ -15572,6 +15899,10 @@ var ts; nextTokenWithoutCheck(); return finishNode(node); } + if (token() === 76) { + parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + return createIdentifier(true); + } var reportAtCurrentPosition = token() === 1; var isReservedWord = scanner.isReservedWord(); var msgArg = scanner.getTokenText(); @@ -15580,8 +15911,8 @@ var ts; ts.Diagnostics.Identifier_expected; return createMissingNode(75, reportAtCurrentPosition, diagnosticMessage || defaultMessage, msgArg); } - function parseIdentifier(diagnosticMessage) { - return createIdentifier(isIdentifier(), diagnosticMessage); + function parseIdentifier(diagnosticMessage, privateIdentifierDiagnosticMessage) { + return createIdentifier(isIdentifier(), diagnosticMessage, privateIdentifierDiagnosticMessage); } function parseIdentifierName(diagnosticMessage) { return createIdentifier(ts.tokenIsIdentifierOrKeyword(token()), diagnosticMessage); @@ -15732,9 +16063,9 @@ var ts; return isIdentifier() && !isHeritageClauseExtendsOrImplementsKeyword(); } case 8: - return isIdentifierOrPattern(); + return isIdentifierOrPrivateIdentifierOrPattern(); case 10: - return token() === 27 || token() === 25 || isIdentifierOrPattern(); + return token() === 27 || token() === 25 || isIdentifierOrPrivateIdentifierOrPattern(); case 19: return isIdentifier(); case 15: @@ -16177,24 +16508,24 @@ var ts; } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } - function parseTemplateExpression() { + function parseTemplateExpression(isTaggedTemplate) { var template = createNode(211); - template.head = parseTemplateHead(); + template.head = parseTemplateHead(isTaggedTemplate); ts.Debug.assert(template.head.kind === 15, "Template head has wrong token kind"); var list = []; var listPos = getNodePos(); do { - list.push(parseTemplateSpan()); + list.push(parseTemplateSpan(isTaggedTemplate)); } while (ts.last(list).literal.kind === 16); template.templateSpans = createNodeArray(list, listPos); return finishNode(template); } - function parseTemplateSpan() { + function parseTemplateSpan(isTaggedTemplate) { var span = createNode(221); span.expression = allowInAnd(parseExpression); var literal; if (token() === 19) { - reScanTemplateToken(); + reScanTemplateToken(isTaggedTemplate); literal = parseTemplateMiddleOrTemplateTail(); } else { @@ -16206,7 +16537,10 @@ var ts; function parseLiteralNode() { return parseLiteralLikeNode(token()); } - function parseTemplateHead() { + function parseTemplateHead(isTaggedTemplate) { + if (isTaggedTemplate) { + reScanTemplateHeadOrNoSubstitutionTemplate(); + } var fragment = parseLiteralLikeNode(token()); ts.Debug.assert(fragment.kind === 15, "Template head has wrong token kind"); return fragment; @@ -16238,6 +16572,9 @@ var ts; if (node.kind === 8) { node.numericLiteralFlags = scanner.getTokenFlags() & 1008; } + if (ts.isTemplateLiteralKind(node.kind)) { + node.templateFlags = scanner.getTokenFlags() & 2048; + } nextToken(); finishNode(node); return node; @@ -16398,7 +16735,7 @@ var ts; } function isStartOfParameter(isJSDocParameter) { return token() === 25 || - isIdentifierOrPattern() || + isIdentifierOrPrivateIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 59 || isStartOfType(!isJSDocParameter); @@ -16413,7 +16750,7 @@ var ts; node.decorators = parseDecorators(); node.modifiers = parseModifiers(); node.dotDotDotToken = parseOptionalToken(25); - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_cannot_be_used_as_parameters); if (ts.getFullWidth(node.name) === 0 && !node.modifiers && ts.isModifierKind(token())) { nextToken(); } @@ -17064,6 +17401,7 @@ var ts; case 29: case 127: case 121: + case 76: return true; default: if (isBinaryOperator()) { @@ -17873,8 +18211,8 @@ var ts; tagExpression.questionDotToken = questionDotToken; tagExpression.typeArguments = typeArguments; tagExpression.template = token() === 14 - ? parseLiteralNode() - : parseTemplateExpression(); + ? (reScanTemplateHeadOrNoSubstitutionTemplate(), parseLiteralNode()) + : parseTemplateExpression(true); if (questionDotToken || tag.flags & 32) { tagExpression.flags |= 32; } @@ -18012,7 +18350,7 @@ var ts; } break; case 15: - return parseTemplateExpression(); + return parseTemplateExpression(false); } return parseIdentifier(ts.Diagnostics.Expression_expected); } @@ -18706,24 +19044,27 @@ var ts; parseExpected(23); return finishNode(node); } - function isIdentifierOrPattern() { - return token() === 18 || token() === 22 || isIdentifier(); + function isIdentifierOrPrivateIdentifierOrPattern() { + return token() === 18 + || token() === 22 + || token() === 76 + || isIdentifier(); } - function parseIdentifierOrPattern() { + function parseIdentifierOrPattern(privateIdentifierDiagnosticMessage) { if (token() === 22) { return parseArrayBindingPattern(); } if (token() === 18) { return parseObjectBindingPattern(); } - return parseIdentifier(); + return parseIdentifier(undefined, privateIdentifierDiagnosticMessage); } function parseVariableDeclarationAllowExclamation() { return parseVariableDeclaration(true); } function parseVariableDeclaration(allowExclamation) { var node = createNode(242); - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_are_not_allowed_in_variable_declarations); if (allowExclamation && node.name.kind === 75 && token() === 53 && !scanner.hasPrecedingLineBreak()) { node.exclamationToken = parseTokenNode(); @@ -19262,17 +19603,18 @@ var ts; } return finishNode(node); } - function parseNamespaceExport() { - var node = createNode(262); + function parseNamespaceExport(pos) { + var node = createNode(262, pos); node.name = parseIdentifier(); return finishNode(node); } function parseExportDeclaration(node) { node.kind = 260; node.isTypeOnly = parseOptional(145); + var namespaceExportPos = scanner.getStartPos(); if (parseOptional(41)) { if (parseOptional(123)) { - node.exportClause = parseNamespaceExport(); + node.exportClause = parseNamespaceExport(namespaceExportPos); } parseExpected(149); node.moduleSpecifier = parseModuleSpecifier(); @@ -19535,25 +19877,28 @@ var ts; case "author": tag = parseAuthorTag(start, tagName, margin); break; + case "implements": + tag = parseImplementsTag(start, tagName); + break; case "augments": case "extends": tag = parseAugmentsTag(start, tagName); break; case "class": case "constructor": - tag = parseSimpleTag(start, 309, tagName); + tag = parseSimpleTag(start, 310, tagName); break; case "public": - tag = parseSimpleTag(start, 310, tagName); + tag = parseSimpleTag(start, 311, tagName); break; case "private": - tag = parseSimpleTag(start, 311, tagName); + tag = parseSimpleTag(start, 312, tagName); break; case "protected": - tag = parseSimpleTag(start, 312, tagName); + tag = parseSimpleTag(start, 313, tagName); break; case "readonly": - tag = parseSimpleTag(start, 313, tagName); + tag = parseSimpleTag(start, 314, tagName); break; case "this": tag = parseThisTag(start, tagName); @@ -19604,9 +19949,11 @@ var ts; comments.push(text); indent += text.length; } - if (initialMargin) { - pushComment(initialMargin); - state = 2; + if (initialMargin !== undefined) { + if (initialMargin !== "") { + pushComment(initialMargin); + } + state = 1; } var tok = token(); loop: while (true) { @@ -19724,7 +20071,7 @@ var ts; case 174: return isObjectOrObjectArrayTypeReference(node.elementType); default: - return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object"; + return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; } } function parseParameterOrPropertyTag(start, tagName, target, indent) { @@ -19737,8 +20084,8 @@ var ts; typeExpression = tryParseTypeExpression(); } var result = target === 1 ? - createNode(322, start) : - createNode(316, start); + createNode(323, start) : + createNode(317, start); var comment = parseTagComments(indent + scanner.getStartPos() - start); var nestedTypeLiteral = target !== 4 && parseNestedTypeLiteral(typeExpression, name, target, indent); if (nestedTypeLiteral) { @@ -19761,7 +20108,7 @@ var ts; var start_3 = scanner.getStartPos(); var children = void 0; while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) { - if (child.kind === 316 || child.kind === 322) { + if (child.kind === 317 || child.kind === 323) { children = ts.append(children, child); } } @@ -19780,7 +20127,7 @@ var ts; if (ts.some(tags, ts.isJSDocReturnTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(317, start); + var result = createNode(318, start); result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); @@ -19789,13 +20136,13 @@ var ts; if (ts.some(tags, ts.isJSDocTypeTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(319, start); + var result = createNode(320, start); result.tagName = tagName; result.typeExpression = parseJSDocTypeExpression(true); return finishNode(result); } function parseAuthorTag(start, tagName, indent) { - var result = createNode(308, start); + var result = createNode(309, start); result.tagName = tagName; var authorInfoWithEmail = tryParse(function () { return tryParseAuthorNameAndEmail(); }); if (!authorInfoWithEmail) { @@ -19848,6 +20195,12 @@ var ts; return comments.length === 0 ? undefined : comments.join(""); } } + function parseImplementsTag(start, tagName) { + var result = createNode(308, start); + result.tagName = tagName; + result.class = parseExpressionWithTypeArgumentsForAugments(); + return finishNode(result); + } function parseAugmentsTag(start, tagName) { var result = createNode(307, start); result.tagName = tagName; @@ -19881,14 +20234,14 @@ var ts; return finishNode(tag); } function parseThisTag(start, tagName) { - var tag = createNode(318, start); + var tag = createNode(319, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(true); skipWhitespace(); return finishNode(tag); } function parseEnumTag(start, tagName) { - var tag = createNode(315, start); + var tag = createNode(316, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(true); skipWhitespace(); @@ -19897,7 +20250,7 @@ var ts; function parseTypedefTag(start, tagName, indent) { var typeExpression = tryParseTypeExpression(); skipWhitespaceOrAsterisk(); - var typedefTag = createNode(321, start); + var typedefTag = createNode(322, start); typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(); typedefTag.name = getJSDocTypeAliasName(typedefTag.fullName); @@ -19913,7 +20266,7 @@ var ts; if (!jsdocTypeLiteral) { jsdocTypeLiteral = createNode(304, start); } - if (child.kind === 319) { + if (child.kind === 320) { if (childTypeTag) { break; } @@ -19958,7 +20311,7 @@ var ts; return typeNameOrNamespaceName; } function parseCallbackTag(start, tagName, indent) { - var callbackTag = createNode(314, start); + var callbackTag = createNode(315, start); callbackTag.tagName = tagName; callbackTag.fullName = parseJSDocTypeNameWithNamespace(); callbackTag.name = getJSDocTypeAliasName(callbackTag.fullName); @@ -19973,7 +20326,7 @@ var ts; var returnTag = tryParse(function () { if (parseOptionalJsdoc(59)) { var tag = parseTag(indent); - if (tag && tag.kind === 317) { + if (tag && tag.kind === 318) { return tag; } } @@ -20018,7 +20371,7 @@ var ts; case 59: if (canParseTag) { var child = tryParseChildTag(target, indent); - if (child && (child.kind === 316 || child.kind === 322) && + if (child && (child.kind === 317 || child.kind === 323) && target !== 4 && name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; @@ -20084,10 +20437,10 @@ var ts; var typeParameter = createNode(155); typeParameter.name = parseJSDocIdentifierName(ts.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces); finishNode(typeParameter); - skipWhitespace(); + skipWhitespaceOrAsterisk(); typeParameters.push(typeParameter); } while (parseOptionalJsdoc(27)); - var result = createNode(320, start); + var result = createNode(321, start); result.tagName = tagName; result.constraint = constraint; result.typeParameters = createNodeArray(typeParameters, typeParametersPos); @@ -21404,6 +21757,7 @@ var ts; { name: "noErrorTruncation", type: "boolean", + affectsSemanticDiagnostics: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Do_not_truncate_error_messages }, @@ -21529,6 +21883,7 @@ var ts; { name: "forceConsistentCasingInFileNames", type: "boolean", + affectsModuleResolution: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file }, @@ -21787,46 +22142,73 @@ var ts; parseStrings(args); } } + ts.parseCommandLineWorker = parseCommandLineWorker; function parseOptionValue(args, i, diagnostics, opt, options, errors) { if (opt.isTSConfigOnly) { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name)); + var optValue = args[i]; + if (optValue === "null") { + options[opt.name] = undefined; + i++; + } + else if (opt.type === "boolean") { + if (optValue === "false") { + options[opt.name] = false; + i++; + } + else { + if (optValue === "true") + i++; + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, opt.name)); + } + } + else { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, opt.name)); + if (optValue && !ts.startsWith(optValue, "-")) + i++; + } } else { if (!args[i] && opt.type !== "boolean") { errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name, getCompilerOptionValueTypeString(opt))); } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i]); - i++; - break; - case "boolean": - var optValue = args[i]; - options[opt.name] = optValue !== "false"; - if (optValue === "false" || optValue === "true") { + if (args[i] !== "null") { + switch (opt.type) { + case "number": + options[opt.name] = parseInt(args[i]); i++; - } - break; - case "string": - options[opt.name] = args[i] || ""; - i++; - break; - case "list": - var result = parseListTypeOption(opt, args[i], errors); - options[opt.name] = result || []; - if (result) { + break; + case "boolean": + var optValue = args[i]; + options[opt.name] = optValue !== "false"; + if (optValue === "false" || optValue === "true") { + i++; + } + break; + case "string": + options[opt.name] = args[i] || ""; i++; - } - break; - default: - options[opt.name] = parseCustomTypeOption(opt, args[i], errors); - i++; - break; + break; + case "list": + var result = parseListTypeOption(opt, args[i], errors); + options[opt.name] = result || []; + if (result) { + i++; + } + break; + default: + options[opt.name] = parseCustomTypeOption(opt, args[i], errors); + i++; + break; + } + } + else { + options[opt.name] = undefined; + i++; } } return i; } - var compilerOptionsDidYouMeanDiagnostics = { + ts.compilerOptionsDidYouMeanDiagnostics = { getOptionsNameMap: getOptionsNameMap, optionDeclarations: ts.optionDeclarations, unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, @@ -21834,7 +22216,7 @@ var ts; optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); + return parseCommandLineWorker(ts.compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; function getOptionFromName(optionName, allowShort) { @@ -21987,7 +22369,7 @@ var ts; name: "compilerOptions", type: "object", elementOptions: getCommandLineCompilerOptionsMap(), - extraKeyDiagnostics: compilerOptionsDidYouMeanDiagnostics, + extraKeyDiagnostics: ts.compilerOptionsDidYouMeanDiagnostics, }, { name: "watchOptions", @@ -22414,7 +22796,7 @@ var ts; } ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { - if (option) { + if (option && !isNullOrUndefined(value)) { if (option.type === "list") { var values = value; if (option.element.isFilePath && values.length) { @@ -22728,7 +23110,7 @@ var ts; } function getExtendedConfig(sourceFile, extendedConfigPath, host, basePath, resolutionStack, errors, extendedConfigCache) { var _a; - var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toLowerCase(extendedConfigPath); + var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toFileNameLowerCase(extendedConfigPath); var value; var extendedResult; var extendedConfig; @@ -22797,7 +23179,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, compilerOptionsDidYouMeanDiagnostics, errors); + convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, ts.compilerOptionsDidYouMeanDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -22907,7 +23289,7 @@ var ts; function getFileNamesFromConfigSpecs(spec, basePath, options, host, extraFileExtensions) { if (extraFileExtensions === void 0) { extraFileExtensions = []; } basePath = ts.normalizePath(basePath); - var keyMapper = host.useCaseSensitiveFileNames ? ts.identity : ts.toLowerCase; + var keyMapper = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); var literalFileMap = ts.createMap(); var wildcardFileMap = ts.createMap(); var wildCardJsonFileMap = ts.createMap(); @@ -23026,7 +23408,7 @@ var ts; var match = wildcardDirectoryPattern.exec(spec); if (match) { return { - key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(), + key: useCaseSensitiveFileNames ? match[0] : ts.toFileNameLowerCase(match[0]), flags: watchRecursivePattern.test(spec) ? 1 : 0 }; } @@ -24470,7 +24852,7 @@ var ts; } } function getDisplayName(node) { - return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.assertDefined(getDeclarationName(node))); + return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.checkDefined(getDeclarationName(node))); } function declareSymbol(symbolTable, parent, node, includes, excludes, isReplaceableByMethod) { ts.Debug.assert(!ts.hasDynamicName(node)); @@ -24783,9 +25165,9 @@ var ts; case 196: bindCallExpressionFlow(node); break; - case 321: - case 314: + case 322: case 315: + case 316: bindJSDocTypeAlias(node); break; case 290: { @@ -24891,8 +25273,11 @@ var ts; function createLoopLabel() { return initFlowNode({ flags: 8, antecedents: undefined }); } + function createReduceLabel(target, antecedents, antecedent) { + return initFlowNode({ flags: 1024, target: target, antecedents: antecedents, antecedent: antecedent }); + } function setFlowNodeReferenced(flow) { - flow.flags |= flow.flags & 1024 ? 2048 : 1024; + flow.flags |= flow.flags & 2048 ? 4096 : 2048; } function addAntecedent(label, antecedent) { if (!(antecedent.flags & 1) && !ts.contains(label.antecedents, antecedent)) { @@ -25123,47 +25508,45 @@ var ts; } } function bindTryStatement(node) { - var preFinallyLabel = createBranchLabel(); var saveReturnTarget = currentReturnTarget; var saveExceptionTarget = currentExceptionTarget; - currentReturnTarget = createBranchLabel(); - currentExceptionTarget = node.catchClause ? createBranchLabel() : currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + var normalExitLabel = createBranchLabel(); + var returnLabel = createBranchLabel(); + var exceptionLabel = createBranchLabel(); + if (node.finallyBlock) { + currentReturnTarget = returnLabel; + } + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.tryBlock); - addAntecedent(preFinallyLabel, currentFlow); - var flowAfterTry = currentFlow; - var flowAfterCatch = unreachableFlow; + addAntecedent(normalExitLabel, currentFlow); if (node.catchClause) { - currentFlow = finishFlowLabel(currentExceptionTarget); - currentExceptionTarget = currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + currentFlow = finishFlowLabel(exceptionLabel); + exceptionLabel = createBranchLabel(); + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.catchClause); - addAntecedent(preFinallyLabel, currentFlow); - flowAfterCatch = currentFlow; + addAntecedent(normalExitLabel, currentFlow); } - var exceptionTarget = finishFlowLabel(currentExceptionTarget); currentReturnTarget = saveReturnTarget; currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { - var preFinallyFlow = initFlowNode({ flags: 4096, antecedent: exceptionTarget, lock: {} }); - addAntecedent(preFinallyLabel, preFinallyFlow); - currentFlow = finishFlowLabel(preFinallyLabel); + var finallyLabel = createBranchLabel(); + finallyLabel.antecedents = ts.concatenate(ts.concatenate(normalExitLabel.antecedents, exceptionLabel.antecedents), returnLabel.antecedents); + currentFlow = finallyLabel; bind(node.finallyBlock); - if (!(currentFlow.flags & 1)) { - if ((flowAfterTry.flags & 1) && (flowAfterCatch.flags & 1)) { - currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow - ? reportedUnreachableFlow - : unreachableFlow; - } + if (currentFlow.flags & 1) { + currentFlow = unreachableFlow; } - if (!(currentFlow.flags & 1)) { - var afterFinallyFlow = initFlowNode({ flags: 8192, antecedent: currentFlow }); - preFinallyFlow.lock = afterFinallyFlow; - currentFlow = afterFinallyFlow; + else { + if (currentReturnTarget && returnLabel.antecedents) { + addAntecedent(currentReturnTarget, createReduceLabel(finallyLabel, returnLabel.antecedents, currentFlow)); + } + currentFlow = normalExitLabel.antecedents ? createReduceLabel(finallyLabel, normalExitLabel.antecedents, currentFlow) : unreachableFlow; } } else { - currentFlow = finishFlowLabel(preFinallyLabel); + currentFlow = finishFlowLabel(normalExitLabel); } } function bindSwitchStatement(node) { @@ -25317,27 +25700,121 @@ var ts; } } function bindBinaryExpressionFlow(node) { - var operator = node.operatorToken.kind; - if (operator === 55 || operator === 56 || operator === 60) { - if (isTopLevelLogicalExpression(node)) { - var postExpressionLabel = createBranchLabel(); - bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); - currentFlow = finishFlowLabel(postExpressionLabel); + var workStacks = { + expr: [node], + state: [1], + inStrictMode: [undefined], + parent: [undefined], + subtreeFlags: [undefined] + }; + var stackIndex = 0; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0: { + node.parent = parent; + var saveInStrictMode = inStrictMode; + bindWorker(node); + var saveParent = parent; + parent = node; + var subtreeFlagsState = void 0; + if (skipTransformFlagAggregation) { + } + else if (node.transformFlags & 536870912) { + skipTransformFlagAggregation = true; + subtreeFlagsState = -1; + } + else { + var savedSubtreeTransformFlags = subtreeTransformFlags; + subtreeTransformFlags = 0; + subtreeFlagsState = savedSubtreeTransformFlags; + } + advanceState(1, saveInStrictMode, saveParent, subtreeFlagsState); + break; + } + case 1: { + var operator = node.operatorToken.kind; + if (operator === 55 || operator === 56 || operator === 60) { + if (isTopLevelLogicalExpression(node)) { + var postExpressionLabel = createBranchLabel(); + bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); + currentFlow = finishFlowLabel(postExpressionLabel); + } + else { + bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + completeNode(); + } + else { + advanceState(2); + maybeBind(node.left); + } + break; + } + case 2: { + advanceState(3); + maybeBind(node.operatorToken); + break; + } + case 3: { + advanceState(4); + maybeBind(node.right); + break; + } + case 4: { + var operator = node.operatorToken.kind; + if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { + bindAssignmentTargetFlow(node.left); + if (operator === 62 && node.left.kind === 195) { + var elementAccess = node.left; + if (isNarrowableOperand(elementAccess.expression)) { + currentFlow = createFlowMutation(256, currentFlow, node); + } + } + } + completeNode(); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for bindBinaryExpressionFlow"); } - else { - bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + function advanceState(state, isInStrictMode, parent, subtreeFlags) { + workStacks.state[stackIndex] = state; + if (isInStrictMode !== undefined) { + workStacks.inStrictMode[stackIndex] = isInStrictMode; + } + if (parent !== undefined) { + workStacks.parent[stackIndex] = parent; + } + if (subtreeFlags !== undefined) { + workStacks.subtreeFlags[stackIndex] = subtreeFlags; } } - else { - bindEachChild(node); - if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { - bindAssignmentTargetFlow(node.left); - if (operator === 62 && node.left.kind === 195) { - var elementAccess = node.left; - if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowMutation(256, currentFlow, node); - } + function completeNode() { + if (workStacks.inStrictMode[stackIndex] !== undefined) { + if (workStacks.subtreeFlags[stackIndex] === -1) { + skipTransformFlagAggregation = false; + subtreeTransformFlags |= node.transformFlags & ~getTransformFlagsSubtreeExclusions(node.kind); } + else if (workStacks.subtreeFlags[stackIndex] !== undefined) { + subtreeTransformFlags = workStacks.subtreeFlags[stackIndex] | computeTransformFlagsForNode(node, subtreeTransformFlags); + } + inStrictMode = workStacks.inStrictMode[stackIndex]; + parent = workStacks.parent[stackIndex]; + } + stackIndex--; + } + function maybeBind(node) { + if (node && ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0; + workStacks.inStrictMode[stackIndex] = undefined; + workStacks.parent[stackIndex] = undefined; + workStacks.subtreeFlags[stackIndex] = undefined; + } + else { + bind(node); } } } @@ -25382,7 +25859,7 @@ var ts; } function bindJSDocTypeAlias(node) { node.tagName.parent = node; - if (node.kind !== 315 && node.fullName) { + if (node.kind !== 316 && node.fullName) { setParentPointers(node, node.fullName); } } @@ -25558,8 +26035,8 @@ var ts; case 201: case 202: case 300: - case 321: - case 314: + case 322: + case 315: case 247: case 186: return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); @@ -25732,7 +26209,9 @@ var ts; container = declName.parent.expression.name; break; case 5: - container = ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression; + container = isExportsOrModuleExportsOrAlias(file, declName.parent.expression) ? file + : ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name + : declName.parent.expression; break; case 0: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); @@ -26078,7 +26557,7 @@ var ts; case 304: case 186: return bindAnonymousTypeWorker(node); - case 309: + case 310: return bindJSDocClassTag(node); case 193: return bindObjectLiteralExpression(node); @@ -26141,22 +26620,22 @@ var ts; } case 250: return updateStrictModeStatementList(node.statements); - case 316: + case 317: if (node.parent.kind === 305) { return bindParameter(node); } if (node.parent.kind !== 304) { break; } - case 322: + case 323: var propTag = node; var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 299 ? 4 | 16777216 : 4; return declareSymbolAndAddToSymbolTable(propTag, flags, 0); - case 321: - case 314: + case 322: case 315: + case 316: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -26219,6 +26698,7 @@ var ts; declareSymbol(container.symbol.exports, container.symbol, node, 8388608, 0); } else if (ts.isNamespaceExport(node.exportClause)) { + node.exportClause.parent = node; declareSymbol(container.symbol.exports, container.symbol, node.exportClause, 2097152, 2097152); } } @@ -26584,7 +27064,7 @@ var ts; } } function bindParameter(node) { - if (node.kind === 316 && container.kind !== 305) { + if (node.kind === 317 && container.kind !== 305) { return; } if (inStrictMode && !(node.flags & 8388608)) { @@ -27192,7 +27672,7 @@ var ts; break; case 199: case 217: - case 325: + case 326: transformFlags |= 1; excludeFlags = 536870912; break; @@ -27226,8 +27706,16 @@ var ts; case 15: case 16: case 17: - case 211: + if (node.templateFlags) { + transformFlags |= 32; + break; + } case 198: + if (ts.hasInvalidEscape(node.template)) { + transformFlags |= 32; + break; + } + case 211: case 282: case 120: case 219: @@ -27430,7 +27918,7 @@ var ts; return 536879104; case 199: case 217: - case 325: + case 326: case 200: case 102: return 536870912; @@ -27682,6 +28170,7 @@ var ts; var typeCount = 0; var symbolCount = 0; var enumCount = 0; + var totalInstantiationCount = 0; var instantiationCount = 0; var instantiationDepth = 0; var constraintDepth = 0; @@ -27718,6 +28207,7 @@ var ts; getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount") + symbolCount; }, getTypeCount: function () { return typeCount; }, + getInstantiationCount: function () { return totalInstantiationCount; }, getRelationCacheSizes: function () { return ({ assignable: assignableRelation.size, identity: identityRelation.size, @@ -27785,7 +28275,7 @@ var ts; }, getSymbolAtLocation: function (node) { node = ts.getParseTreeNode(node); - return node ? getSymbolAtLocation(node) : undefined; + return node ? getSymbolAtLocation(node, true) : undefined; }, getShorthandAssignmentValueSymbol: function (node) { node = ts.getParseTreeNode(node); @@ -27838,7 +28328,29 @@ var ts; getRootSymbols: getRootSymbols, getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node, contextFlags) : undefined; + if (!node) { + return undefined; + } + var containingCall = ts.findAncestor(node, ts.isCallLikeExpression); + var containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; + if (contextFlags & 4 && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = true; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = undefined; + } + var result = getContextualType(node, contextFlags); + if (contextFlags & 4 && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = undefined; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + } + return result; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -28068,9 +28580,9 @@ var ts; var enumNumberIndexInfo = createIndexInfo(stringType, true); var iterationTypesCache = ts.createMap(); var noIterationTypes = { - get yieldType() { throw new Error("Not supported"); }, - get returnType() { throw new Error("Not supported"); }, - get nextType() { throw new Error("Not supported"); }, + get yieldType() { return ts.Debug.fail("Not supported"); }, + get returnType() { return ts.Debug.fail("Not supported"); }, + get nextType() { return ts.Debug.fail("Not supported"); }, }; var anyIterationTypes = createIterationTypes(anyType, anyType, anyType); var anyIterationTypesExceptNext = createIterationTypes(anyType, anyType, unknownType); @@ -28209,6 +28721,7 @@ var ts; if (jsxPragma) { var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); + ts.visitNode(file.localJsxFactory, markAsSynthetic); if (file.localJsxFactory) { return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } @@ -28219,6 +28732,7 @@ var ts; _jsxNamespace = "React"; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); + ts.visitNode(_jsxFactoryEntity, markAsSynthetic); if (_jsxFactoryEntity) { _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } @@ -28227,7 +28741,15 @@ var ts; _jsxNamespace = ts.escapeLeadingUnderscores(compilerOptions.reactNamespace); } } + if (!_jsxFactoryEntity) { + _jsxFactoryEntity = ts.createQualifiedName(ts.createIdentifier(ts.unescapeLeadingUnderscores(_jsxNamespace)), "createElement"); + } return _jsxNamespace; + function markAsSynthetic(node) { + node.pos = -1; + node.end = -1; + return ts.visitEachChild(node, markAsSynthetic, ts.nullTransformationContext); + } } function getEmitResolver(sourceFile, cancellationToken) { getDiagnostics(sourceFile, cancellationToken); @@ -28570,7 +29092,13 @@ var ts; return !ts.findAncestor(usage, function (n) { return ts.isComputedPropertyName(n) && n.parent.parent === declaration; }); } else if (ts.isPropertyDeclaration(declaration)) { - return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage); + return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, false); + } + else if (ts.isParameterPropertyDeclaration(declaration, declaration.parent)) { + var container_3 = ts.getEnclosingBlockScopeContainer(declaration.parent); + return !(compilerOptions.target === 99 && !!compilerOptions.useDefineForClassFields + && ts.getContainingClass(declaration) === ts.getContainingClass(usage) + && isUsedInFunctionOrInstanceProperty(usage, declaration, container_3)); } return true; } @@ -28581,7 +29109,19 @@ var ts; return true; } var container = ts.getEnclosingBlockScopeContainer(declaration); - return !!(usage.flags & 4194304) || isInTypeQuery(usage) || isUsedInFunctionOrInstanceProperty(usage, declaration, container); + if (!!(usage.flags & 4194304) || isInTypeQuery(usage)) { + return true; + } + if (isUsedInFunctionOrInstanceProperty(usage, declaration, container)) { + if (compilerOptions.target === 99 && !!compilerOptions.useDefineForClassFields) { + return (ts.isPropertyDeclaration(declaration) || ts.isParameterPropertyDeclaration(declaration, declaration.parent)) && + !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, true); + } + else { + return true; + } + } + return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); switch (declaration.parent.parent.kind) { @@ -28623,7 +29163,7 @@ var ts; return false; }); } - function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage) { + function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, stopAtAnyPropertyDeclaration) { if (usage.end > declaration.end) { return false; } @@ -28633,8 +29173,12 @@ var ts; } switch (node.kind) { case 202: - case 159: return true; + case 159: + return stopAtAnyPropertyDeclaration && + (ts.isPropertyDeclaration(declaration) && node.parent === declaration.parent + || ts.isParameterPropertyDeclaration(declaration, declaration.parent) && node.parent === declaration.parent.parent) + ? "quit" : true; case 223: switch (node.parent.kind) { case 163: @@ -28827,9 +29371,9 @@ var ts; location = location.parent; } break; - case 321: - case 314: + case 322: case 315: + case 316: location = ts.getJSDocHost(location); break; case 156: @@ -28879,6 +29423,7 @@ var ts; !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && + !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { @@ -28902,7 +29447,7 @@ var ts; return undefined; } if (nameNotFoundMessage) { - if (propertyWithInvalidInitializer) { + if (propertyWithInvalidInitializer && !(compilerOptions.target === 99 && compilerOptions.useDefineForClassFields)) { var propertyName = propertyWithInvalidInitializer.name; error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), diagnosticName(nameArg)); return undefined; @@ -28931,9 +29476,27 @@ var ts; error(errorLocation, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(associatedDeclarationForContainingInitializer.name), ts.declarationNameToString(errorLocation)); } } + if (result && errorLocation && meaning & 111551 && result.flags & 2097152) { + checkSymbolUsageInExpressionContext(result, name, errorLocation); + } } return result; } + function checkSymbolUsageInExpressionContext(symbol, name, useSite) { + if (!ts.isValidTypeOnlyAliasUseSite(useSite)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol); + if (typeOnlyDeclaration) { + var message = typeOnlyDeclaration.kind === 263 + ? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type + : ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + var unescapedName = ts.unescapeLeadingUnderscores(name); + ts.addRelatedInfo(error(useSite, message, unescapedName), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, unescapedName)); + } + } + } function getIsDeferredContext(location, lastLocation) { if (location.kind !== 202 && location.kind !== 201) { return ts.isTypeQueryNode(location) || ((ts.isFunctionLikeDeclaration(location) || @@ -29056,9 +29619,19 @@ var ts; } return false; } + function isPrimitiveTypeName(name) { + return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; + } + function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 263) { + error(errorLocation, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); + return true; + } + return false; + } function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) { if (meaning & (111551 & ~1024)) { - if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") { + if (isPrimitiveTypeName(name)) { error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name)); return true; } @@ -29089,9 +29662,7 @@ var ts; if (meaning & (111551 & ~1024 & ~788968)) { var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 & ~111551, undefined, undefined, false)); if (symbol) { - error(errorLocation, ts.isTypeOnlyEnumAlias(symbol) - ? ts.Diagnostics.Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported - : ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); + error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); return true; } } @@ -29153,19 +29724,62 @@ var ts; } } function getDeclarationOfAliasSymbol(symbol) { - return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration); + return ts.find(symbol.declarations, isAliasSymbolDeclaration); + } + function isAliasSymbolDeclaration(node) { + return node.kind === 253 || + node.kind === 252 || + node.kind === 255 && !!node.name || + node.kind === 256 || + node.kind === 262 || + node.kind === 258 || + node.kind === 263 || + node.kind === 259 && ts.exportAssignmentIsAlias(node) || + ts.isBinaryExpression(node) && ts.getAssignmentDeclarationKind(node) === 2 && ts.exportAssignmentIsAlias(node) || + ts.isPropertyAccessExpression(node) + && ts.isBinaryExpression(node.parent) + && node.parent.left === node + && node.parent.operatorToken.kind === 62 + && isAliasableOrJsExpression(node.parent.right) || + node.kind === 282 || + node.kind === 281 && isAliasableOrJsExpression(node.initializer); + } + function isAliasableOrJsExpression(e) { + return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { if (node.moduleReference.kind === 265) { - return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); + var immediate = resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)); + var resolved_4 = resolveExternalModuleSymbol(immediate); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved_4, false); + return resolved_4; + } + var resolved = getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); + checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved); + return resolved; + } + function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) { + if (markSymbolOfAliasDeclarationIfTypeOnly(node, undefined, resolved, false)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node)); + var message = typeOnlyDeclaration.kind === 263 + ? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type + : ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + var name = ts.unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + ts.addRelatedInfo(error(node.moduleReference, message), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); } - return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); } - function resolveExportByName(moduleSymbol, name, dontResolveAlias) { + function resolveExportByName(moduleSymbol, name, sourceNode, dontResolveAlias) { var exportValue = moduleSymbol.exports.get("export="); - return exportValue - ? getPropertyOfType(getTypeOfSymbol(exportValue), name) - : resolveSymbol(moduleSymbol.exports.get(name), dontResolveAlias); + if (exportValue) { + return getPropertyOfType(getTypeOfSymbol(exportValue), name); + } + var exportSymbol = moduleSymbol.exports.get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(sourceNode, exportSymbol, resolved, false); + return resolved; } function isSyntacticDefault(node) { return ((ts.isExportAssignment(node) && !node.isExportEquals) || ts.hasModifier(node, 512) || ts.isExportSpecifier(node)); @@ -29175,11 +29789,11 @@ var ts; return false; } if (!file || file.isDeclarationFile) { - var defaultExportSymbol = resolveExportByName(moduleSymbol, "default", true); + var defaultExportSymbol = resolveExportByName(moduleSymbol, "default", undefined, true); if (defaultExportSymbol && ts.some(defaultExportSymbol.declarations, isSyntacticDefault)) { return false; } - if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias)) { + if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), undefined, dontResolveAlias)) { return false; } return true; @@ -29187,7 +29801,7 @@ var ts; if (!ts.isSourceFileJS(file)) { return hasExportAssignmentSymbol(moduleSymbol); } - return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias); + return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), undefined, dontResolveAlias); } function getTargetOfImportClause(node, dontResolveAlias) { var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier); @@ -29197,7 +29811,7 @@ var ts; exportDefaultSymbol = moduleSymbol; } else { - exportDefaultSymbol = resolveExportByName(moduleSymbol, "default", dontResolveAlias); + exportDefaultSymbol = resolveExportByName(moduleSymbol, "default", node, dontResolveAlias); } var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); var hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias); @@ -29219,26 +29833,27 @@ var ts; } } else if (hasSyntheticDefault) { - return maybeTypeOnly(resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || - resolveSymbol(moduleSymbol, dontResolveAlias)); + var resolved = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, moduleSymbol, resolved, false); + return resolved; } - return maybeTypeOnly(exportDefaultSymbol); - } - function maybeTypeOnly(symbol) { - if (symbol && node.isTypeOnly && node.name) { - return createTypeOnlyImportOrExport(node.name, symbol); - } - return symbol; + markSymbolOfAliasDeclarationIfTypeOnly(node, exportDefaultSymbol, undefined, false); + return exportDefaultSymbol; } } function getTargetOfNamespaceImport(node, dontResolveAlias) { var moduleSpecifier = node.parent.parent.moduleSpecifier; - var moduleSymbol = resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, false); - return moduleSymbol && node.parent.isTypeOnly ? createTypeOnlySymbol(moduleSymbol) : moduleSymbol; + var immediate = resolveExternalModuleName(node, moduleSpecifier); + var resolved = resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, false); + return resolved; } function getTargetOfNamespaceExport(node, dontResolveAlias) { var moduleSpecifier = node.parent.moduleSpecifier; - return moduleSpecifier && resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, false); + var immediate = moduleSpecifier && resolveExternalModuleName(node, moduleSpecifier); + var resolved = moduleSpecifier && resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, false); + return resolved; } function combineValueAndTypeSymbols(valueSymbol, typeSymbol) { if (valueSymbol === unknownSymbol && typeSymbol === unknownSymbol) { @@ -29253,14 +29868,19 @@ var ts; if (valueSymbol.valueDeclaration) result.valueDeclaration = valueSymbol.valueDeclaration; if (typeSymbol.members) - result.members = typeSymbol.members; + result.members = ts.cloneMap(typeSymbol.members); if (valueSymbol.exports) - result.exports = valueSymbol.exports; + result.exports = ts.cloneMap(valueSymbol.exports); return result; } - function getExportOfModule(symbol, name, dontResolveAlias) { + function getExportOfModule(symbol, specifier, dontResolveAlias) { + var _a; if (symbol.flags & 1536) { - return resolveSymbol(getExportsOfSymbol(symbol).get(name), dontResolveAlias); + var name = ((_a = specifier.propertyName) !== null && _a !== void 0 ? _a : specifier.name).escapedText; + var exportSymbol = getExportsOfSymbol(symbol).get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(specifier, exportSymbol, resolved, false); + return resolved; } } function getPropertyOfVariable(symbol, name) { @@ -29273,6 +29893,7 @@ var ts; } function getExternalModuleMember(node, specifier, dontResolveAlias) { if (dontResolveAlias === void 0) { dontResolveAlias = false; } + var _a; var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); var name = specifier.propertyName || specifier.name; var suppressInteropError = name.escapedText === "default" && !!(compilerOptions.allowSyntheticDefaultImports || compilerOptions.esModuleInterop); @@ -29290,7 +29911,7 @@ var ts; symbolFromVariable = getPropertyOfVariable(targetSymbol, name.escapedText); } symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias); - var symbolFromModule = getExportOfModule(targetSymbol, name.escapedText, dontResolveAlias); + var symbolFromModule = getExportOfModule(targetSymbol, specifier, dontResolveAlias); if (symbolFromModule === undefined && name.escapedText === "default") { var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); if (canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias)) { @@ -29312,11 +29933,11 @@ var ts; } } else { - if (moduleSymbol.exports && moduleSymbol.exports.has("default")) { + if ((_a = moduleSymbol.exports) === null || _a === void 0 ? void 0 : _a.has("default")) { error(name, ts.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, declarationName); } else { - error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + reportNonExportedMember(name, declarationName, moduleSymbol, moduleName); } } } @@ -29324,84 +29945,47 @@ var ts; } } } + function reportNonExportedMember(name, declarationName, moduleSymbol, moduleName) { + var _a; + var localSymbol = (_a = moduleSymbol.valueDeclaration.locals) === null || _a === void 0 ? void 0 : _a.get(name.escapedText); + var exports = moduleSymbol.exports; + if (localSymbol) { + var exportedSymbol = exports && !exports.has("export=") + ? ts.find(symbolsToArray(exports), function (symbol) { return !!getSymbolIfSameReference(symbol, localSymbol); }) + : undefined; + var diagnostic = exportedSymbol + ? error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) + : error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); + ts.addRelatedInfo.apply(void 0, __spreadArrays([diagnostic], ts.map(localSymbol.declarations, function (decl, index) { + return ts.createDiagnosticForNode(decl, index === 0 ? ts.Diagnostics._0_is_declared_here : ts.Diagnostics.and_here, declarationName); + }))); + } + else { + error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + } + } function getTargetOfImportSpecifier(node, dontResolveAlias) { var resolved = getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias); - if (resolved && node.parent.parent.isTypeOnly) { - return createTypeOnlyImportOrExport(node.name, resolved); - } + markSymbolOfAliasDeclarationIfTypeOnly(node, undefined, resolved, false); return resolved; } function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) { - return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); - } - function createTypeOnlyImportOrExport(sourceNode, target) { - var _a, _b; - var symbol = createTypeOnlySymbol(target); - if (!symbol && target !== unknownSymbol) { - var identifier = ts.isExportSpecifier(sourceNode) ? sourceNode.name : sourceNode; - var nameText = ts.idText(identifier); - var diagnostic = error(identifier, ts.Diagnostics.Type_only_0_must_reference_a_type_but_1_is_a_value, ts.isExportSpecifier(sourceNode) ? "export" : "import", nameText); - var targetDeclaration = (_a = target.valueDeclaration) !== null && _a !== void 0 ? _a : (_b = target.declarations) === null || _b === void 0 ? void 0 : _b[0]; - if (targetDeclaration) { - ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(targetDeclaration, ts.Diagnostics._0_is_declared_here, nameText)); - } - } - return symbol; - } - function createTypeOnlySymbol(target) { - if (target.flags & 512) { - return createNamespaceModuleForModule(target); - } - if (target.flags & 384) { - return createNamespaceModuleForEnum(target); - } - if (!(target.flags & 111551)) { - return target; - } - if (target.flags & 788968) { - var alias = createSymbol(524288, target.escapedName); - alias.declarations = ts.emptyArray; - alias.immediateTarget = target; - return alias; - } - } - function createNamespaceModuleForEnum(enumSymbol) { - ts.Debug.assert(!!(enumSymbol.flags & 384)); - var symbol = createSymbol(1024 | 524288, enumSymbol.escapedName); - symbol.immediateTarget = enumSymbol; - symbol.declarations = enumSymbol.declarations; - if (enumSymbol.exports) { - symbol.exports = ts.createSymbolTable(); - enumSymbol.exports.forEach(function (exportSymbol, key) { - symbol.exports.set(key, ts.Debug.assertDefined(createTypeOnlySymbol(exportSymbol))); - }); - } - return symbol; - } - function createNamespaceModuleForModule(moduleSymbol) { - ts.Debug.assert(!!(moduleSymbol.flags & 512)); - var filtered = createSymbol(1024, moduleSymbol.escapedName); - filtered.declarations = moduleSymbol.declarations; - if (moduleSymbol.exports) { - filtered.exports = ts.createSymbolTable(); - moduleSymbol.exports.forEach(function (exportSymbol, key) { - var typeOnlyExport = createTypeOnlySymbol(exportSymbol); - if (typeOnlyExport) { - filtered.exports.set(key, typeOnlyExport); - } - }); - } - return filtered; + var resolved = resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, undefined, resolved, false); + return resolved; } function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) { - var target = node.parent.parent.moduleSpecifier ? + var resolved = node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node, dontResolveAlias) : resolveEntityName(node.propertyName || node.name, meaning, false, dontResolveAlias); - return target && node.parent.parent.isTypeOnly ? createTypeOnlyImportOrExport(node, target) : target; + markSymbolOfAliasDeclarationIfTypeOnly(node, undefined, resolved, false); + return resolved; } function getTargetOfExportAssignment(node, dontResolveAlias) { var expression = (ts.isExportAssignment(node) ? node.expression : node.right); - return getTargetOfAliasLikeExpression(expression, dontResolveAlias); + var resolved = getTargetOfAliasLikeExpression(expression, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, undefined, resolved, false); + return resolved; } function getTargetOfAliasLikeExpression(expression, dontResolveAlias) { if (ts.isClassExpression(expression)) { @@ -29487,12 +30071,41 @@ var ts; } return links.target; } + function markSymbolOfAliasDeclarationIfTypeOnly(aliasDeclaration, immediateTarget, finalTarget, overwriteEmpty) { + if (!aliasDeclaration) + return false; + var sourceSymbol = getSymbolOfNode(aliasDeclaration); + if (ts.isTypeOnlyImportOrExportDeclaration(aliasDeclaration)) { + var links_1 = getSymbolLinks(sourceSymbol); + links_1.typeOnlyDeclaration = aliasDeclaration; + return true; + } + var links = getSymbolLinks(sourceSymbol); + return markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, immediateTarget, overwriteEmpty) + || markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, finalTarget, overwriteEmpty); + } + function markSymbolOfAliasDeclarationIfTypeOnlyWorker(aliasDeclarationLinks, target, overwriteEmpty) { + var _a, _b, _c; + if (target && (aliasDeclarationLinks.typeOnlyDeclaration === undefined || overwriteEmpty && aliasDeclarationLinks.typeOnlyDeclaration === false)) { + var exportSymbol = (_b = (_a = target.exports) === null || _a === void 0 ? void 0 : _a.get("export=")) !== null && _b !== void 0 ? _b : target; + var typeOnly = exportSymbol.declarations && ts.find(exportSymbol.declarations, ts.isTypeOnlyImportOrExportDeclaration); + aliasDeclarationLinks.typeOnlyDeclaration = (_c = typeOnly !== null && typeOnly !== void 0 ? typeOnly : getSymbolLinks(exportSymbol).typeOnlyDeclaration) !== null && _c !== void 0 ? _c : false; + } + return !!aliasDeclarationLinks.typeOnlyDeclaration; + } + function getTypeOnlyAliasDeclaration(symbol) { + if (!(symbol.flags & 2097152)) { + return undefined; + } + var links = getSymbolLinks(symbol); + return links.typeOnlyDeclaration || undefined; + } function markExportAsReferenced(node) { var symbol = getSymbolOfNode(node); var target = resolveAlias(symbol); if (target) { var markAlias = target === unknownSymbol || - ((target.flags & 111551) && !isConstEnumOrConstEnumOnlyModule(target)); + ((target.flags & 111551) && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol)); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -29513,6 +30126,12 @@ var ts; } } } + function markConstEnumAliasAsReferenced(symbol) { + var links = getSymbolLinks(symbol); + if (!links.constEnumReferenced) { + links.constEnumReferenced = true; + } + } function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) { if (entityName.kind === 75 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; @@ -29535,8 +30154,8 @@ var ts; var namespaceMeaning = 1920 | (ts.isInJSFile(name) ? meaning & 111551 : 0); var symbol; if (name.kind === 75) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); - var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; + var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); + var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, true); if (!symbol) { return symbolFromJSPrototype; @@ -29579,6 +30198,9 @@ var ts; throw ts.Debug.assertNever(name, "Unknown entity name kind."); } ts.Debug.assert((ts.getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here."); + if (!ts.nodeIsSynthesized(name) && ts.isEntityName(name) && (symbol.flags & 2097152 || name.parent.kind === 259)) { + markSymbolOfAliasDeclarationIfTypeOnly(ts.getAliasDeclarationFromName(name), symbol, undefined, true); + } return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol); } function resolveEntityNameFromAssignmentDeclaration(name, meaning) { @@ -29629,7 +30251,7 @@ var ts; } function getExpandoSymbol(symbol) { var decl = symbol.valueDeclaration; - if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288) { + if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 || ts.getExpandoInitializer(decl, false)) { return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); @@ -30028,7 +30650,7 @@ var ts; return getMergedSymbol(symbol && (symbol.flags & 1048576) !== 0 ? symbol.exportSymbol : symbol); } function symbolIsValue(symbol) { - return !!(symbol.flags & 111551 || symbol.flags & 2097152 && resolveAlias(symbol).flags & 111551); + return !!(symbol.flags & 111551 || symbol.flags & 2097152 && resolveAlias(symbol).flags & 111551 && !getTypeOnlyAliasDeclaration(symbol)); } function findConstructorDeclaration(node) { var members = node.members; @@ -30122,7 +30744,7 @@ var ts; } case 249: var sym = getSymbolOfNode(location); - if (result = callback(sym.exports || emptySymbols)) { + if (result = callback((sym === null || sym === void 0 ? void 0 : sym.exports) || emptySymbols)) { return { value: result }; } break; @@ -30264,6 +30886,7 @@ var ts; if (!ts.length(symbols)) return; var hadAccessibleChain; + var earlyModuleBail = false; for (var _i = 0, _a = symbols; _i < _a.length; _i++) { var symbol = _a[_i]; var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, false); @@ -30276,6 +30899,10 @@ var ts; } else { if (ts.some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { + if (shouldComputeAliasesToMakeVisible) { + earlyModuleBail = true; + continue; + } return { accessibility: 0 }; @@ -30293,6 +30920,11 @@ var ts; return parentResult; } } + if (earlyModuleBail) { + return { + accessibility: 0 + }; + } if (hadAccessibleChain) { return { accessibility: 1, @@ -30468,7 +31100,7 @@ var ts; } function toNodeBuilderFlags(flags) { if (flags === void 0) { flags = 0; } - return flags & 9469291; + return flags & 277904747; } function createNodeBuilder() { return { @@ -30571,7 +31203,7 @@ var ts; } if (type.flags & 128) { context.approximateLength += (type.value.length + 2); - return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value), 16777216)); + return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value, !!(context.flags & 268435456)), 16777216)); } if (type.flags & 256) { var value = type.value; @@ -31049,8 +31681,8 @@ var ts; typeElements.push(preserveCommentsOn(propertySignature)); } function preserveCommentsOn(node) { - if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 322; })) { - var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 322; }); + if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 323; })) { + var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 323; }); var commentText = d.comment; if (commentText) { ts.setSyntheticLeadingComments(node, [{ kind: 3, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -31167,7 +31799,7 @@ var ts; function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags) { var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 156); if (!parameterDeclaration && !ts.isTransientSymbol(parameterSymbol)) { - parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 316); + parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 317); } var parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -31220,7 +31852,7 @@ var ts; var chain; var isTypeParameter = symbol.flags & 262144; if (!isTypeParameter && (context.enclosingDeclaration || context.flags & 64) && !(context.flags & 134217728)) { - chain = ts.Debug.assertDefined(getSymbolChain(symbol, meaning, true)); + chain = ts.Debug.checkDefined(getSymbolChain(symbol, meaning, true)); ts.Debug.assert(chain && chain.length > 0); } else { @@ -31570,7 +32202,7 @@ var ts; return createPropertyNameNodeForIdentifierOrLiteral(rawName, singleQuote); } function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384) { var name = "" + nameType.value; @@ -31788,7 +32420,7 @@ var ts; symbol.flags & (2 | 1 | 4) && symbol.escapedName !== "export="; var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); - if (symbol.flags & 16 || isConstMergedWithNSPrintableAsSignatureMerge) { + if (symbol.flags & (16 | 8192) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288) { @@ -31840,7 +32472,7 @@ var ts; function includePrivateSymbol(symbol) { if (ts.some(symbol.declarations, ts.isParameterDeclaration)) return; - ts.Debug.assertDefined(deferredPrivates); + ts.Debug.assertIsDefined(deferredPrivates); getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); deferredPrivates.set("" + getSymbolId(symbol), symbol); } @@ -32009,18 +32641,19 @@ var ts; var typeParamDecls = ts.map(localParams, function (p) { return typeParameterToDeclaration(p, context); }); var classType = getDeclaredTypeOfClassOrInterface(symbol); var baseTypes = getBaseTypes(classType); + var implementsTypes = getImplementsTypes(classType); var staticType = getTypeOfSymbol(symbol); var staticBaseType = getBaseConstructorTypeOfClass(staticType); - var heritageClauses = !ts.length(baseTypes) ? undefined : [ts.createHeritageClause(90, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]; + var heritageClauses = __spreadArrays(!ts.length(baseTypes) ? [] : [ts.createHeritageClause(90, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))], !ts.length(implementsTypes) ? [] : [ts.createHeritageClause(113, ts.map(implementsTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]); var symbolProps = getPropertiesOfType(classType); var publicSymbolProps = ts.filter(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return !(ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name)); }); var hasPrivateIdentifier = ts.some(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name); }); var privateProperties = hasPrivateIdentifier ? @@ -32183,7 +32816,7 @@ var ts; && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName)))) { return []; } - var flag = modifierFlags | (isStatic ? 32 : 0); + var flag = (modifierFlags & ~256) | (isStatic ? 32 : 0); var name = getPropertyNameNodeForSymbol(p, context); var firstPropertyLikeDecl = ts.find(p.declarations, ts.or(ts.isPropertyDeclaration, ts.isAccessor, ts.isVariableDeclaration, ts.isPropertySignature, ts.isBinaryExpression, ts.isPropertyAccessExpression)); if (p.flags & 98304 && useAccessors) { @@ -32228,7 +32861,7 @@ var ts; return serializePropertySymbolForInterfaceWorker(p, false, baseType); } function getDeclarationWithTypeAnnotation(symbol) { - return ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); + return symbol.declarations && ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); } function serializeTypeForDeclaration(type, symbol) { var declWithExistingAnnotation = getDeclarationWithTypeAnnotation(symbol); @@ -32520,7 +33153,7 @@ var ts; return location.kind === 290 || ts.isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384) { var name = "" + nameType.value; @@ -32551,10 +33184,13 @@ var ts; if (ts.isCallExpression(declaration) && ts.isBindableObjectDefinePropertyCall(declaration)) { return ts.symbolName(symbol); } - if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096) && symbol.nameType && symbol.nameType.flags & 384) { - var result = getNameOfSymbolFromNameType(symbol, context); - if (result !== undefined) { - return result; + if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096)) { + var nameType = getSymbolLinks(symbol).nameType; + if (nameType && nameType.flags & 384) { + var result = getNameOfSymbolFromNameType(symbol, context); + if (result !== undefined) { + return result; + } } } return ts.declarationNameToString(name_2); @@ -32589,9 +33225,9 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 314: - case 321: case 315: + case 322: + case 316: return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent)); case 191: return isDeclarationVisible(node.parent.parent); @@ -32735,8 +33371,6 @@ var ts; case 4: return !!target.immediateBaseConstraint; case 6: - return !!getSymbolLinks(target).resolvedJSDocType; - case 7: return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); @@ -32944,11 +33578,6 @@ var ts; if (optional === void 0) { optional = true; } return strictNullChecks && optional ? getOptionalType(type) : type; } - function isParameterOfContextuallyTypedFunction(node) { - return node.kind === 156 && - (node.parent.kind === 201 || node.parent.kind === 202) && - !!getContextualType(node.parent); - } function getTypeForVariableLikeDeclaration(declaration, includeOptionality) { if (ts.isVariableDeclaration(declaration) && declaration.parent.parent.kind === 231) { var indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression))); @@ -32997,7 +33626,7 @@ var ts; return getTypeAtPosition(getSignatureFromDeclaration(typeTag), func.parameters.indexOf(declaration)); } } - var type = declaration.symbol.escapedName === "this" ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration, true); + var type = declaration.symbol.escapedName === "this" ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration); if (type) { return addOptionality(type, isOptional); } @@ -33008,14 +33637,14 @@ var ts; return containerObjectType; } } - if (declaration.initializer && !isParameterOfContextuallyTypedFunction(declaration)) { + if (declaration.initializer) { var type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration)); return addOptionality(type, isOptional); } if (ts.isJsxAttribute(declaration)) { return trueType; } - if (ts.isBindingPattern(declaration.name) && !isParameterOfContextuallyTypedFunction(declaration)) { + if (ts.isBindingPattern(declaration.name)) { return getTypeFromBindingPattern(declaration.name, false, true); } return undefined; @@ -33588,8 +34217,8 @@ var ts; function getTypeOfSymbolWithDeferredType(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); links.type = links.deferralParent.flags & 1048576 ? getUnionType(links.deferralConstituents) : getIntersectionType(links.deferralConstituents); } return links.type; @@ -33680,10 +34309,10 @@ var ts; case 201: case 202: case 247: - case 320: case 321: + case 322: + case 316: case 315: - case 314: case 186: case 180: var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); @@ -33797,6 +34426,28 @@ var ts; } return type.resolvedBaseConstructorType; } + function getImplementsTypes(type) { + var resolvedImplementsTypes = ts.emptyArray; + for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + var implementsTypeNodes = ts.getEffectiveImplementsTypeNodes(declaration); + if (!implementsTypeNodes) + continue; + for (var _b = 0, implementsTypeNodes_1 = implementsTypeNodes; _b < implementsTypeNodes_1.length; _b++) { + var node = implementsTypeNodes_1[_b]; + var implementsType = getTypeFromTypeNode(node); + if (implementsType !== errorType) { + if (resolvedImplementsTypes === ts.emptyArray) { + resolvedImplementsTypes = [implementsType]; + } + else { + resolvedImplementsTypes.push(implementsType); + } + } + } + } + return resolvedImplementsTypes; + } function getBaseTypes(type) { if (!type.resolvedBaseTypes) { if (type.objectFlags & 8) { @@ -33962,17 +34613,9 @@ var ts; if (!pushTypeResolution(symbol, 2)) { return errorType; } - var type = void 0; - var declaration = void 0; - if (ts.isTypeOnlyAlias(symbol)) { - type = getDeclaredTypeOfSymbol(symbol.immediateTarget); - declaration = symbol.valueDeclaration; - } - else { - declaration = ts.Debug.assertDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); - var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; - type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; - } + var declaration = ts.Debug.checkDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); + var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; + var type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; if (popTypeResolution()) { var typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); if (typeParameters) { @@ -34820,7 +35463,7 @@ var ts; var checkFlags = 8192 | (readonlyMask && isReadonlySymbol(prop) ? 8 : 0); var inferredProp = createSymbol(4 | prop.flags & optionalMask, prop.escapedName, checkFlags); inferredProp.declarations = prop.declarations; - inferredProp.nameType = prop.nameType; + inferredProp.nameType = getSymbolLinks(prop).nameType; inferredProp.propertyType = getTypeOfSymbol(prop); inferredProp.mappedType = type.mappedType; inferredProp.constraintType = type.constraintType; @@ -34892,7 +35535,7 @@ var ts; var isReadonly = !!(templateModifiers & 1 || !(templateModifiers & 2) && modifiersProp && isReadonlySymbol(modifiersProp)); var prop = createSymbol(4 | (isOptional ? 16777216 : 0), propName, isReadonly ? 8 : 0); - prop.type = strictNullChecks && isOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + prop.type = strictNullChecks && isOptional && !maybeTypeOfKind(propType, 32768 | 16384) ? getOptionalType(propType) : strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 ? getTypeWithFacts(propType, 524288) : propType; if (modifiersProp) { @@ -35389,7 +36032,7 @@ var ts; var type = getTypeOfSymbol(prop); if (!firstType) { firstType = type; - nameType = prop.nameType; + nameType = getSymbolLinks(prop).nameType; } else if (type !== firstType) { checkFlags |= 64; @@ -36074,7 +36717,7 @@ var ts; function getTypeArguments(type) { var _a, _b; if (!type.resolvedTypeArguments) { - if (!pushTypeResolution(type, 7)) { + if (!pushTypeResolution(type, 6)) { return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; } var node = type.node; @@ -36120,7 +36763,7 @@ var ts; return errorType; } } - if (node.kind === 169 && isAliasedType(node)) { + if (node.kind === 169 && isDeferredTypeReferenceNode(node, ts.length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference(type, node, undefined); } var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgumentsFromTypeReferenceNode(node), typeParameters, minTypeArgumentCount, isJs)); @@ -36181,9 +36824,6 @@ var ts; if (symbol.flags & (32 | 64)) { return getTypeFromClassOrInterfaceReference(node, symbol); } - if (ts.isTypeOnlyAlias(symbol)) { - return getTypeReferenceType(node, symbol.immediateTarget); - } if (symbol.flags & 524288) { return getTypeFromTypeAliasReference(node, symbol); } @@ -36206,24 +36846,28 @@ var ts; return errorType; } function getTypeFromJSDocValueReference(node, symbol) { - var valueType = getTypeOfSymbol(symbol); - var typeType = valueType; - if (symbol.valueDeclaration) { - var decl = ts.getRootDeclaration(symbol.valueDeclaration); - var isRequireAlias = false; - if (ts.isVariableDeclaration(decl) && decl.initializer) { - var expr = decl.initializer; - while (ts.isPropertyAccessExpression(expr)) { - expr = expr.expression; + var links = getNodeLinks(node); + if (!links.resolvedJSDocType) { + var valueType = getTypeOfSymbol(symbol); + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 188 && node.qualifier; + if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { + typeType = getTypeReferenceType(node, valueType.symbol); } - isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, true) && !!valueType.symbol; - } - var isImportTypeWithQualifier = node.kind === 188 && node.qualifier; - if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { - typeType = getTypeReferenceType(node, valueType.symbol); } + links.resolvedJSDocType = typeType; } - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + return links.resolvedJSDocType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 || substitute === typeVariable) { @@ -36324,6 +36968,10 @@ var ts; function getTypeFromTypeReference(node) { var links = getNodeLinks(node); if (!links.resolvedType) { + if (ts.isConstTypeReference(node) && ts.isAssertionExpression(node.parent)) { + links.resolvedSymbol = unknownSymbol; + return links.resolvedType = checkExpressionCached(node.parent.expression); + } var symbol = void 0; var type = void 0; var meaning = 788968; @@ -36492,7 +37140,12 @@ var ts; var minLength = ts.findLastIndex(node.elementTypes, function (n) { return n.kind !== 176 && n !== restElement; }) + 1; return getTupleTypeOfArity(node.elementTypes.length, minLength, !!restElement, readonly, undefined); } - function isAliasedType(node) { + function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 174 ? mayResolveTypeAlias(node.elementType) : + node.kind === 175 ? ts.some(node.elementTypes, mayResolveTypeAlias) : + hasDefaultTypeArguments || ts.some(node.typeArguments, mayResolveTypeAlias)); + } + function isResolvedByTypeAlias(node) { var parent = node.parent; switch (parent.kind) { case 182: @@ -36502,12 +37155,40 @@ var ts; case 185: case 180: case 184: - return isAliasedType(parent); + return isResolvedByTypeAlias(parent); case 247: return true; } return false; } + function mayResolveTypeAlias(node) { + switch (node.kind) { + case 169: + return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node.typeName, 788968).flags & 524288); + case 172: + return true; + case 184: + return node.operator !== 147 && mayResolveTypeAlias(node.type); + case 182: + case 176: + case 299: + case 297: + case 298: + case 294: + return mayResolveTypeAlias(node.type); + case 177: + return node.type.kind !== 174 || mayResolveTypeAlias(node.type.elementType); + case 178: + case 179: + return ts.some(node.types, mayResolveTypeAlias); + case 185: + return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); + case 180: + return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || + mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); + } + return false; + } function getTypeFromArrayOrTupleTypeNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { @@ -36515,7 +37196,7 @@ var ts; if (target === emptyGenericType) { links.resolvedType = emptyObjectType; } - else if (isAliasedType(node)) { + else if (isDeferredTypeReferenceNode(node)) { links.resolvedType = node.kind === 175 && node.elementTypes.length === 0 ? target : createDeferredTypeReference(target, node, undefined); } @@ -37014,7 +37695,7 @@ var ts; } function getLiteralTypeFromProperty(prop, include) { if (!(ts.getDeclarationModifierFlagsFromSymbol(prop) & 24)) { - var type = getLateBoundSymbol(prop).nameType; + var type = getSymbolLinks(getLateBoundSymbol(prop)).nameType; if (!type && !ts.isKnownSymbol(prop)) { if (prop.escapedName === "default") { type = getLiteralType("default"); @@ -37261,10 +37942,24 @@ var ts; accessNode; } function isGenericObjectType(type) { - return maybeTypeOfKind(type, 58982400 | 131072); + if (type.flags & 3145728) { + if (!(type.objectFlags & 4194304)) { + type.objectFlags |= 4194304 | + (ts.some(type.types, isGenericObjectType) ? 8388608 : 0); + } + return !!(type.objectFlags & 8388608); + } + return !!(type.flags & 58982400) || isGenericMappedType(type); } function isGenericIndexType(type) { - return maybeTypeOfKind(type, 58982400 | 4194304); + if (type.flags & 3145728) { + if (!(type.objectFlags & 16777216)) { + type.objectFlags |= 16777216 | + (ts.some(type.types, isGenericIndexType) ? 33554432 : 0); + } + return !!(type.objectFlags & 33554432); + } + return !!(type.flags & (58982400 | 4194304)); } function isThisTypeParameter(type) { return !!(type.flags & 262144 && type.isThisType); @@ -37286,13 +37981,19 @@ var ts; return writing ? getIntersectionType(types) : getUnionType(types); } } + function unwrapSubstitution(type) { + if (type.flags & 33554432) { + return type.substitute; + } + return type; + } function getSimplifiedIndexedAccessType(type, writing) { var cache = writing ? "simplifiedForWriting" : "simplifiedForReading"; if (type[cache]) { return type[cache] === circularConstraintType ? type : type[cache]; } type[cache] = circularConstraintType; - var objectType = getSimplifiedType(type.objectType, writing); + var objectType = unwrapSubstitution(getSimplifiedType(type.objectType, writing)); var indexType = getSimplifiedType(type.indexType, writing); var distributedOverIndex = distributeObjectOverIndexType(objectType, indexType, writing); if (distributedOverIndex) { @@ -37427,17 +38128,17 @@ var ts; if (checkType === wildcardType || extendsType === wildcardType) { return wildcardType; } - var checkTypeInstantiable = maybeTypeOfKind(checkType, 63176704 | 131072); + var checkTypeInstantiable = isGenericObjectType(checkType) || isGenericIndexType(checkType); var combinedMapper; if (root.inferTypeParameters) { var context = createInferenceContext(root.inferTypeParameters, undefined, 0); - if (!checkTypeInstantiable) { + if (!checkTypeInstantiable || !ts.some(root.inferTypeParameters, function (t) { return t === extendsType; })) { inferTypes(context.inferences, checkType, extendsType, 128 | 256); } combinedMapper = combineTypeMappers(mapper, context.mapper); } var inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType; - if (!checkTypeInstantiable && !maybeTypeOfKind(inferredExtendsType, 63176704 | 131072)) { + if (!checkTypeInstantiable && !isGenericObjectType(inferredExtendsType) && !isGenericIndexType(inferredExtendsType)) { if (inferredExtendsType.flags & 3) { return instantiateType(root.trueType, combinedMapper || mapper); } @@ -37655,7 +38356,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; members.set(prop.escapedName, result); } @@ -37665,7 +38366,7 @@ var ts; return spread; } } - function getSpreadType(left, right, symbol, objectFlags, readonly) { + function getSpreadType(left, right, symbol, objectFlags, readonly, isParentTypeNullable) { if (left.flags & 1 || right.flags & 1) { return anyType; } @@ -37681,16 +38382,16 @@ var ts; if (left.flags & 1048576) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(left, readonly); if (merged) { - return getSpreadType(merged, right, symbol, objectFlags, readonly); + return getSpreadType(merged, right, symbol, objectFlags, readonly, isParentTypeNullable); } - return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly); }); + return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly, isParentTypeNullable); }); } if (right.flags & 1048576) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(right, readonly); if (merged) { - return getSpreadType(left, merged, symbol, objectFlags, readonly); + return getSpreadType(left, merged, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304)); } - return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly); }); + return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304)); }); } if (right.flags & (528 | 296 | 2112 | 132 | 1056 | 67108864 | 4194304)) { return left; @@ -37745,9 +38446,17 @@ var ts; result.leftSpread = leftProp; result.rightSpread = rightProp; result.declarations = declarations; - result.nameType = leftProp.nameType; + result.nameType = getSymbolLinks(leftProp).nameType; members.set(leftProp.escapedName, result); } + else if (strictNullChecks && + !isParentTypeNullable && + symbol && + !isFromSpreadAssignment(leftProp, symbol) && + isFromSpreadAssignment(rightProp, symbol) && + !maybeTypeOfKind(rightType, 98304)) { + error(leftProp.valueDeclaration, ts.Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, ts.unescapeLeadingUnderscores(leftProp.escapedName)); + } } else { members.set(leftProp.escapedName, getSpreadSymbol(leftProp, readonly)); @@ -37771,7 +38480,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; return result; } @@ -38068,8 +38777,8 @@ var ts; if (symbol.valueDeclaration) { result.valueDeclaration = symbol.valueDeclaration; } - if (symbol.nameType) { - result.nameType = symbol.nameType; + if (links.nameType) { + result.nameType = links.nameType; } return result; } @@ -38201,7 +38910,7 @@ var ts; var templateMapper = combineTypeMappers(mapper, createTypeMapper([getTypeParameterFromMappedType(type)], [key])); var propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper); var modifiers = getMappedTypeModifiers(type); - return strictNullChecks && modifiers & 4 && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + return strictNullChecks && modifiers & 4 && !maybeTypeOfKind(propType, 32768 | 16384) ? getOptionalType(propType) : strictNullChecks && modifiers & 8 && isOptional ? getTypeWithFacts(propType, 524288) : propType; } @@ -38254,6 +38963,7 @@ var ts; error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } + totalInstantiationCount++; instantiationCount++; instantiationDepth++; var result = instantiateTypeWorker(type, mapper); @@ -38284,15 +38994,17 @@ var ts; } return type; } - if (flags & 1048576 && !(flags & 131068)) { - var types = type.types; - var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getUnionType(newTypes, 1, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; - } - if (flags & 2097152) { + if ((flags & 2097152) || (flags & 1048576 && !(flags & 131068))) { + if (!couldContainTypeVariables(type)) { + return type; + } var types = type.types; var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; + return newTypes === types + ? type + : (flags & 2097152) + ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) + : getUnionType(newTypes, 1, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)); } if (flags & 4194304) { return getIndexType(instantiateType(type.type, mapper)); @@ -38372,25 +39084,25 @@ var ts; return false; } function isContextSensitiveFunctionLikeDeclaration(node) { - if (ts.isFunctionDeclaration(node) && (!ts.isInJSFile(node) || !getTypeForDeclarationFromJSDocComment(node))) { - return false; - } - if (node.typeParameters) { - return false; - } - if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { - return true; - } - if (node.kind !== 202) { - var parameter = ts.firstOrUndefined(node.parameters); - if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + return (!ts.isFunctionDeclaration(node) || ts.isInJSFile(node) && !!getTypeForDeclarationFromJSDocComment(node)) && + (hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node)); + } + function hasContextSensitiveParameters(node) { + if (!node.typeParameters) { + if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { return true; } + if (node.kind !== 202) { + var parameter = ts.firstOrUndefined(node.parameters); + if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + return true; + } + } } - return hasContextSensitiveReturnExpression(node); + return false; } function hasContextSensitiveReturnExpression(node) { - return !!node.body && node.body.kind !== 223 && isContextSensitive(node.body); + return !ts.getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 223 && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (ts.isInJSFile(func) && ts.isFunctionDeclaration(func) || isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) && @@ -38538,6 +39250,11 @@ var ts; if (target.symbol && ts.length(target.symbol.declarations)) { ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(target.symbol.declarations[0], ts.Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature)); } + if ((ts.getFunctionFlags(node) & 2) === 0 + && !getTypeOfPropertyOfType(sourceReturn, "then") + && checkTypeRelatedTo(createPromiseType(sourceReturn), targetReturn, relation, undefined)) { + ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async)); + } return true; } } @@ -38779,11 +39496,19 @@ var ts; if (isTupleLikeType(source)) { return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); } - var tupleizedType = checkArrayLiteral(node, 1, true); - if (isTupleLikeType(tupleizedType)) { - return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + var oldContext = node.contextualType; + node.contextualType = target; + try { + var tupleizedType = checkArrayLiteral(node, 1, true); + node.contextualType = oldContext; + if (isTupleLikeType(tupleizedType)) { + return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + } + return false; + } + finally { + node.contextualType = oldContext; } - return false; } function generateObjectLiteralElements(node) { var _i, _a, prop, type, _b; @@ -39096,11 +39821,18 @@ var ts; if (isFreshLiteralType(target)) { target = target.regularType; } - if (source === target || - relation === comparableRelation && !(target.flags & 131072) && isSimpleTypeRelatedTo(target, source, relation) || - relation !== identityRelation && isSimpleTypeRelatedTo(source, target, relation)) { + if (source === target) { return true; } + if (relation !== identityRelation) { + if (relation === comparableRelation && !(target.flags & 131072) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation)) { + return true; + } + } + else { + if (!(source.flags === target.flags && source.flags & 66584576)) + return false; + } if (source.flags & 524288 && target.flags & 524288) { var related = relation.get(getRelationKey(source, target, 0, relation)); if (related !== undefined) { @@ -39116,11 +39848,17 @@ var ts; return ts.getObjectFlags(source) & 4096 && !isUnhyphenatedJsxName(sourceProp.escapedName); } function getNormalizedType(type, writing) { - return isFreshLiteralType(type) ? type.regularType : - ts.getObjectFlags(type) & 4 && type.node ? createTypeReference(type.target, getTypeArguments(type)) : - type.flags & 33554432 ? writing ? type.typeVariable : type.substitute : - type.flags & 25165824 ? getSimplifiedType(type, writing) : - type; + do { + var t = isFreshLiteralType(type) ? type.regularType : + ts.getObjectFlags(type) & 4 && type.node ? createTypeReference(type.target, getTypeArguments(type)) : + type.flags & 33554432 ? writing ? type.typeVariable : type.substitute : + type.flags & 25165824 ? getSimplifiedType(type, writing) : + type; + if (t === type) + break; + type = t; + } while (true); + return type; } function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer) { var errorInfo; @@ -39360,18 +40098,20 @@ var ts; if (intersectionState === void 0) { intersectionState = 0; } var source = getNormalizedType(originalSource, false); var target = getNormalizedType(originalTarget, true); + if (source === target) + return -1; + if (relation === identityRelation) { + return isIdenticalTo(source, target); + } if (target.flags & 1048576 && source.flags & 524288 && target.types.length <= 3 && maybeTypeOfKind(target, 98304)) { var nullStrippedTarget = extractTypesOfKind(target, ~98304); if (!(nullStrippedTarget.flags & (1048576 | 131072))) { + if (source === nullStrippedTarget) + return -1; target = nullStrippedTarget; } } - if (source === target) - return -1; - if (relation === identityRelation) { - return isIdenticalTo(source, target); - } if (relation === comparableRelation && !(target.flags & 131072) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation, reportErrors ? reportError : undefined)) return -1; @@ -39479,19 +40219,18 @@ var ts; return result; } function isIdenticalTo(source, target) { - var result; var flags = source.flags & target.flags; - if (flags & 524288 || flags & 8388608 || flags & 16777216 || flags & 4194304 || flags & 33554432) { - return recursiveTypeRelatedTo(source, target, false, 0); + if (!(flags & 66584576)) { + return 0; } - if (flags & (1048576 | 2097152)) { - if (result = eachTypeRelatedToSomeType(source, target)) { - if (result &= eachTypeRelatedToSomeType(target, source)) { - return result; - } + if (flags & 3145728) { + var result_3 = eachTypeRelatedToSomeType(source, target); + if (result_3) { + result_3 &= eachTypeRelatedToSomeType(target, source); } + return result_3; } - return 0; + return recursiveTypeRelatedTo(source, target, false, 0); } function getTypeOfPropertyInTypes(types, name) { var appendPropType = function (propTypes, type) { @@ -39518,7 +40257,7 @@ var ts; checkTypes = reducedTarget.flags & 1048576 ? reducedTarget.types : [reducedTarget]; } var _loop_11 = function (prop) { - if (shouldCheckAsExcessProperty(prop, source.symbol)) { + if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) { if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) { if (reportErrors) { var errorTarget = filterType(reducedTarget, isExcessPropertyCheckTarget); @@ -39771,21 +40510,21 @@ var ts; if (flags & 4194304) { return isRelatedTo(source.type, target.type, false); } - var result_3 = 0; + var result_4 = 0; if (flags & 8388608) { - if (result_3 = isRelatedTo(source.objectType, target.objectType, false)) { - if (result_3 &= isRelatedTo(source.indexType, target.indexType, false)) { - return result_3; + if (result_4 = isRelatedTo(source.objectType, target.objectType, false)) { + if (result_4 &= isRelatedTo(source.indexType, target.indexType, false)) { + return result_4; } } } if (flags & 16777216) { if (source.root.isDistributive === target.root.isDistributive) { - if (result_3 = isRelatedTo(source.checkType, target.checkType, false)) { - if (result_3 &= isRelatedTo(source.extendsType, target.extendsType, false)) { - if (result_3 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), false)) { - if (result_3 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), false)) { - return result_3; + if (result_4 = isRelatedTo(source.checkType, target.checkType, false)) { + if (result_4 &= isRelatedTo(source.extendsType, target.extendsType, false)) { + if (result_4 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), false)) { + if (result_4 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), false)) { + return result_4; } } } @@ -40019,11 +40758,11 @@ var ts; } } if (source.flags & (524288 | 2097152) && target.flags & 1048576) { - var objectOnlyTarget = extractTypesOfKind(target, 524288); + var objectOnlyTarget = extractTypesOfKind(target, 524288 | 2097152 | 33554432); if (objectOnlyTarget.flags & 1048576) { - var result_4 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); - if (result_4) { - return result_4; + var result_5 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); + if (result_5) { + return result_5; } } } @@ -40065,18 +40804,18 @@ var ts; var modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source) === getMappedTypeModifiers(target) : getCombinedMappedTypeOptionality(source) <= getCombinedMappedTypeOptionality(target)); if (modifiersRelated) { - var result_5; + var result_6; var targetConstraint = getConstraintTypeFromMappedType(target); var sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMarkers : reportUnreliableMarkers); - if (result_5 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { + if (result_6 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]); - return result_5 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); + return result_6 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); } } return 0; } function typeRelatedToDiscriminatedType(source, target) { - var sourceProperties = getPropertiesOfObjectType(source); + var sourceProperties = getPropertiesOfType(source); var sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target); if (!sourcePropertiesFiltered) return 0; @@ -40106,7 +40845,7 @@ var ts; var type = _a[_i]; var _loop_13 = function (i) { var sourceProperty = sourcePropertiesFiltered[i]; - var targetProperty = getPropertyOfObjectType(type, sourceProperty.escapedName); + var targetProperty = getPropertyOfType(type, sourceProperty.escapedName); if (!targetProperty) return "continue-outer"; if (sourceProperty === targetProperty) @@ -40178,10 +40917,10 @@ var ts; var source = getTypeOfSourceProperty(sourceProp); if (ts.getCheckFlags(targetProp) & 65536 && !getSymbolLinks(targetProp).type) { var links = getSymbolLinks(targetProp); - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); var unionParent = !!(links.deferralParent.flags & 1048576); - var result_6 = unionParent ? 0 : -1; + var result_7 = unionParent ? 0 : -1; var targetTypes = links.deferralConstituents; for (var _i = 0, targetTypes_3 = targetTypes; _i < targetTypes_3.length; _i++) { var targetType = targetTypes_3[_i]; @@ -40190,7 +40929,7 @@ var ts; if (!related) { return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - result_6 &= related; + result_7 &= related; } else { if (related) { @@ -40198,13 +40937,13 @@ var ts; } } } - if (unionParent && !result_6 && targetIsOptional) { - result_6 = isRelatedTo(source, undefinedType); + if (unionParent && !result_7 && targetIsOptional) { + result_7 = isRelatedTo(source, undefinedType); } - if (unionParent && !result_6 && reportErrors) { + if (unionParent && !result_7 && reportErrors) { return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - return result_6; + return result_7; } else { return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors, undefined, intersectionState); @@ -40267,13 +41006,14 @@ var ts; if (unmatchedProperty.valueDeclaration && ts.isNamedDeclaration(unmatchedProperty.valueDeclaration) && ts.isPrivateIdentifier(unmatchedProperty.valueDeclaration.name) - && ts.isClassDeclaration(source.symbol.valueDeclaration)) { + && source.symbol + && source.symbol.flags & 32) { var privateIdentifierDescription = unmatchedProperty.valueDeclaration.name.escapedText; var symbolTableKey = ts.getSymbolNameForPrivateIdentifier(source.symbol, privateIdentifierDescription); - if (symbolTableKey && !!getPropertyOfType(source, symbolTableKey)) { - var sourceName = source.symbol.valueDeclaration.name; - var targetName = ts.isClassDeclaration(target.symbol.valueDeclaration) ? target.symbol.valueDeclaration.name : undefined; - reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName || anon), diagnosticName(targetName || anon)); + if (symbolTableKey && getPropertyOfType(source, symbolTableKey)) { + var sourceName = ts.getDeclarationName(source.symbol.valueDeclaration); + var targetName = ts.getDeclarationName(target.symbol.valueDeclaration); + reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName.escapedText === "" ? anon : sourceName), diagnosticName(targetName.escapedText === "" ? anon : targetName)); return; } } @@ -40499,7 +41239,11 @@ var ts; var props = source.flags & 2097152 ? getPropertiesOfUnionOrIntersectionType(source) : getPropertiesOfObjectType(source); for (var _i = 0, props_2 = props; _i < props_2.length; _i++) { var prop = props_2[_i]; - if (isIgnoredJsxProperty(source, prop) || prop.nameType && prop.nameType.flags & 8192) { + if (isIgnoredJsxProperty(source, prop)) { + continue; + } + var nameType = getSymbolLinks(prop).nameType; + if (nameType && nameType.flags & 8192) { continue; } if (kind === 0 || isNumericLiteralName(prop.escapedName)) { @@ -40612,6 +41356,10 @@ var ts; var match = discriminable.indexOf(true); return match === -1 || discriminable.indexOf(true, match + 1) !== -1 ? defaultValue : target.types[match]; } + function isFromSpreadAssignment(prop, container) { + var _a; + return ((_a = prop.valueDeclaration) === null || _a === void 0 ? void 0 : _a.parent) !== container.valueDeclaration; + } function isWeakType(type) { if (type.flags & 524288) { var resolved = resolveStructuredTypeMembers(type); @@ -41148,8 +41896,9 @@ var ts; if (source.valueDeclaration) { symbol.valueDeclaration = source.valueDeclaration; } - if (source.nameType) { - symbol.nameType = source.nameType; + var nameType = getSymbolLinks(source).nameType; + if (nameType) { + symbol.nameType = nameType; } return symbol; } @@ -41504,17 +42253,18 @@ var ts; } function couldContainTypeVariables(type) { var objectFlags = ts.getObjectFlags(type); - return !!(type.flags & 63176704 || + if (objectFlags & 67108864) { + return !!(objectFlags & 134217728); + } + var result = !!(type.flags & 63176704 || objectFlags & 4 && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 && type.symbol && type.symbol.flags & (16 | 8192 | 32 | 2048 | 4096) && type.symbol.declarations || objectFlags & (32 | 131072) || - type.flags & 3145728 && !(type.flags & 1024) && couldUnionOrIntersectionContainTypeVariables(type)); - } - function couldUnionOrIntersectionContainTypeVariables(type) { - if (type.couldContainTypeVariables === undefined) { - type.couldContainTypeVariables = ts.some(type.types, couldContainTypeVariables); + type.flags & 3145728 && !(type.flags & 1024) && ts.some(type.types, couldContainTypeVariables)); + if (type.flags & 3899393) { + type.objectFlags |= 67108864 | (result ? 134217728 : 0); } - return type.couldContainTypeVariables; + return result; } function isTypeParameterAtTopLevel(type, typeParameter) { return !!(type === typeParameter || @@ -41640,6 +42390,12 @@ var ts; inference.contraCandidates ? getIntersectionType(inference.contraCandidates) : undefined; } + function hasSkipDirectInferenceFlag(node) { + return !!getNodeLinks(node).skipDirectInference; + } + function isFromInferenceBlockedSource(type) { + return !!(type.symbol && ts.some(type.symbol.declarations, hasSkipDirectInferenceFlag)); + } function inferTypes(inferences, originalSource, originalTarget, priority, contravariant) { if (priority === void 0) { priority = 0; } if (contravariant === void 0) { contravariant = false; } @@ -41700,7 +42456,7 @@ var ts; } if (target.flags & 8650752) { if (ts.getObjectFlags(source) & 2097152 || source === nonInferrableAnyType || source === silentNeverType || - (priority & 32 && (source === autoType || source === autoArrayType))) { + (priority & 32 && (source === autoType || source === autoArrayType)) || isFromInferenceBlockedSource(source)) { return; } var inference = getInferenceInfoForType(target); @@ -41804,6 +42560,12 @@ var ts; invokeOnce(source, target, inferFromObjectTypes); } } + if (source.flags & 25165824) { + var simplified = getSimplifiedType(source, contravariant); + if (simplified !== source) { + inferFromTypes(simplified, target); + } + } } function inferWithPriority(source, target, newPriority) { var savePriority = priority; @@ -41959,7 +42721,7 @@ var ts; } if (constraintType.flags & 4194304) { var inference = getInferenceInfoForType(constraintType.type); - if (inference && !inference.isFixed) { + if (inference && !inference.isFixed && !isFromInferenceBlockedSource(source)) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { inferWithPriority(inferredType, inference.typeParameter, ts.getObjectFlags(source) & 2097152 ? @@ -42101,7 +42863,7 @@ var ts; } } function isTypeOrBaseIdenticalTo(s, t) { - return isTypeIdenticalTo(s, t) || !!(s.flags & (128 | 256)) && isTypeIdenticalTo(getBaseTypeOfLiteralType(s), t); + return isTypeIdenticalTo(s, t) || !!(t.flags & 4 && s.flags & 128 || t.flags & 8 && s.flags & 256); } function isTypeCloselyMatchedBy(s, t) { return !!(s.flags & 524288 && t.flags & 524288 && s.symbol && s.symbol === t.symbol || @@ -42809,6 +43571,8 @@ var ts; return getExplicitTypeOfSymbol(symbol.flags & 2097152 ? resolveAlias(symbol) : symbol, diagnostic); case 104: return getExplicitThisType(node); + case 102: + return checkSuperExpression(node); case 194: var type = getTypeOfDottedName(node.expression, diagnostic); var prop = type && getPropertyOfType(type, node.name.escapedText); @@ -42865,9 +43629,6 @@ var ts; lastFlowNodeReachable = result; return result; } - function isUnlockedReachableFlowNode(flow) { - return !(flow.flags & 4096 && flow.lock.locked) && isReachableFlowNodeWorker(flow, false); - } function isFalseExpression(expr) { var node = ts.skipParentheses(expr); return node.kind === 91 || node.kind === 209 && (node.operatorToken.kind === 55 && (isFalseExpression(node.left) || isFalseExpression(node.right)) || @@ -42879,7 +43640,7 @@ var ts; return lastFlowNodeReachable; } var flags = flow.flags; - if (flags & 2048) { + if (flags & 4096) { if (!noCacheCheck) { var id = getFlowNodeId(flow); var reachable = flowNodeReachable[id]; @@ -42887,7 +43648,7 @@ var ts; } noCacheCheck = false; } - if (flags & (16 | 96 | 256 | 4096)) { + if (flags & (16 | 96 | 256)) { flow = flow.antecedent; } else if (flags & 512) { @@ -42907,7 +43668,7 @@ var ts; flow = flow.antecedent; } else if (flags & 4) { - return ts.some(flow.antecedents, isUnlockedReachableFlowNode); + return ts.some(flow.antecedents, function (f) { return isReachableFlowNodeWorker(f, false); }); } else if (flags & 8) { flow = flow.antecedents[0]; @@ -42918,11 +43679,13 @@ var ts; } flow = flow.antecedent; } - else if (flags & 8192) { + else if (flags & 1024) { lastFlowNode = undefined; - flow.locked = true; + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; var result = isReachableFlowNodeWorker(flow.antecedent, false); - flow.locked = false; + target.antecedents = saveAntecedents; return result; } else { @@ -42966,7 +43729,7 @@ var ts; flowDepth++; while (true) { var flags = flow.flags; - if (flags & 2048) { + if (flags & 4096) { for (var i = sharedFlowStart; i < sharedFlowCount; i++) { if (sharedFlowNodes[i] === flow) { flowDepth--; @@ -42975,16 +43738,7 @@ var ts; } } var type = void 0; - if (flags & 8192) { - flow.locked = true; - type = getTypeAtFlowNode(flow.antecedent); - flow.locked = false; - } - else if (flags & 4096) { - flow = flow.antecedent; - continue; - } - else if (flags & 16) { + if (flags & 16) { type = getTypeAtFlowAssignment(flow); if (!type) { flow = flow.antecedent; @@ -43020,6 +43774,13 @@ var ts; continue; } } + else if (flags & 1024) { + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; + type = getTypeAtFlowNode(flow.antecedent); + target.antecedents = saveAntecedents; + } else if (flags & 2) { var container = flow.node; if (container && container !== flowContainer && @@ -43034,7 +43795,7 @@ var ts; else { type = convertAutoToAny(declaredType); } - if (flags & 2048) { + if (flags & 4096) { sharedFlowNodes[sharedFlowCount] = flow; sharedFlowTypes[sharedFlowCount] = type; sharedFlowCount++; @@ -43199,9 +43960,6 @@ var ts; var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; - if (antecedent.flags & 4096 && antecedent.lock.locked) { - continue; - } if (!bypassFlow && antecedent.flags & 128 && antecedent.clauseStart === antecedent.clauseEnd) { bypassFlow = antecedent; continue; @@ -43755,12 +44513,19 @@ var ts; return symbol.flags & 3 && (getDeclarationNodeFlagsFromSymbol(symbol) & 2) !== 0 && getTypeOfSymbol(symbol) !== autoArrayType; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - var annotationIncludesUndefined = strictNullChecks && - declaration.kind === 156 && - declaration.initializer && - getFalsyFlags(declaredType) & 32768 && - !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768); - return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288) : declaredType; + if (pushTypeResolution(declaration.symbol, 2)) { + var annotationIncludesUndefined = strictNullChecks && + declaration.kind === 156 && + declaration.initializer && + getFalsyFlags(declaredType) & 32768 && + !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768); + popTypeResolution(); + return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288) : declaredType; + } + else { + reportCircularityError(declaration.symbol); + return declaredType; + } } function isConstraintPosition(node) { var parent = node.parent; @@ -43782,8 +44547,13 @@ var ts; return !!ts.findAncestor(location, function (e) { return e.parent && ts.isExportAssignment(e.parent) && e.parent.expression === e && ts.isEntityNameExpression(e); }); } function markAliasReferenced(symbol, location) { - if (isNonLocalAlias(symbol, 111551) && !isInTypeQuery(location) && ((compilerOptions.preserveConstEnums && isExportOrExportExpression(location)) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol)))) { - markAliasSymbolAsReferenced(symbol); + if (isNonLocalAlias(symbol, 111551) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol)) { + if (compilerOptions.preserveConstEnums && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + markAliasSymbolAsReferenced(symbol); + } + else { + markConstEnumAliasAsReferenced(symbol); + } } } function checkIdentifier(node) { @@ -44053,7 +44823,7 @@ var ts; break; case 159: case 158: - if (ts.hasModifier(container, 32)) { + if (ts.hasModifier(container, 32) && !(compilerOptions.target === 99 && compilerOptions.useDefineForClassFields)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); } break; @@ -44353,7 +45123,7 @@ var ts; } return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } - var parent = func.parent; + var parent = ts.walkUpParenthesizedExpressions(func.parent); if (parent.kind === 209 && parent.operatorToken.kind === 62) { var target = parent.left; if (ts.isAccessExpression(target)) { @@ -44370,7 +45140,7 @@ var ts; } return undefined; } - function getContextuallyTypedParameterType(parameter, forCache) { + function getContextuallyTypedParameterType(parameter) { var func = parameter.parent; if (!isContextSensitiveFunctionOrObjectLiteralMethod(func)) { return undefined; @@ -44393,14 +45163,6 @@ var ts; } var contextualSignature = getContextualSignature(func); if (contextualSignature) { - if (forCache) { - contextuallyCheckFunctionExpressionOrObjectLiteralMethod(func); - var type = getTypeOfSymbol(getMergedSymbol(func.symbol)); - if (isTypeAny(type)) { - return type; - } - contextualSignature = getSignaturesOfType(type, 0)[0]; - } var index = func.parameters.indexOf(parameter) - (ts.getThisParameter(func) ? 1 : 0); return parameter.dotDotDotToken && ts.lastOrUndefined(func.parameters) === parameter ? getRestTypeAtPosition(contextualSignature, index) : @@ -44414,7 +45176,7 @@ var ts; } switch (declaration.kind) { case 156: - return getContextuallyTypedParameterType(declaration, false); + return getContextuallyTypedParameterType(declaration); case 191: return getContextualTypeForBindingElement(declaration); } @@ -44517,16 +45279,13 @@ var ts; } return undefined; } - function getContextualTypeForArgument(callTarget, arg, contextFlags) { + function getContextualTypeForArgument(callTarget, arg) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); - if (contextFlags && contextFlags & 4 && signature.target && !ts.hasTypeArguments(callTarget)) { - signature = getBaseSignature(signature.target); - } if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } @@ -44828,7 +45587,7 @@ var ts; return stringType; } case 197: - return getContextualTypeForArgument(parent, node, contextFlags); + return getContextualTypeForArgument(parent, node); case 199: case 217: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -44872,7 +45631,7 @@ var ts; if (ts.isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== 4) { return node.parent.contextualType; } - return getContextualTypeForArgumentAtIndex(node, 0, contextFlags); + return getContextualTypeForArgumentAtIndex(node, 0); } function getEffectiveFirstArgumentForJsxSignature(signature, node) { return getJsxReferenceKind(node) !== 0 @@ -45054,44 +45813,59 @@ var ts; function checkArrayLiteral(node, checkMode, forceTuple) { var elements = node.elements; var elementCount = elements.length; - var hasNonEndingSpreadElement = false; var elementTypes = []; - var inDestructuringPattern = ts.isAssignmentTarget(node); + var hasEndingSpreadElement = false; + var hasNonEndingSpreadElement = false; var contextualType = getApparentTypeOfContextualType(node); + var inDestructuringPattern = ts.isAssignmentTarget(node); var inConstContext = isConstContext(node); - for (var index = 0; index < elementCount; index++) { - var e = elements[index]; - if (inDestructuringPattern && e.kind === 213) { - var restArrayType = checkExpression(e.expression, checkMode, forceTuple); - var restElementType = getIndexTypeOfType(restArrayType, 1) || - getIteratedTypeOrElementType(65, restArrayType, undefinedType, undefined, false); - if (restElementType) { - elementTypes.push(restElementType); + for (var i = 0; i < elementCount; i++) { + var e = elements[i]; + var spread = e.kind === 213 && e.expression; + var spreadType = spread && checkExpression(spread, checkMode, forceTuple); + if (spreadType && isTupleType(spreadType)) { + elementTypes.push.apply(elementTypes, getTypeArguments(spreadType)); + if (spreadType.target.hasRestElement) { + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; } } else { - var elementContextualType = getContextualTypeForElementExpression(contextualType, index); - var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); - elementTypes.push(type); - } - if (index < elementCount - 1 && e.kind === 213) { - hasNonEndingSpreadElement = true; + if (inDestructuringPattern && spreadType) { + var restElementType = getIndexTypeOfType(spreadType, 1) || + getIteratedTypeOrElementType(65, spreadType, undefinedType, undefined, false); + if (restElementType) { + elementTypes.push(restElementType); + } + } + else { + var elementContextualType = getContextualTypeForElementExpression(contextualType, elementTypes.length); + var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); + elementTypes.push(type); + } + if (spread) { + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; + } } } if (!hasNonEndingSpreadElement) { - var hasRestElement = elementCount > 0 && elements[elementCount - 1].kind === 213; - var minLength = elementCount - (hasRestElement ? 1 : 0); + var minLength = elementTypes.length - (hasEndingSpreadElement ? 1 : 0); var tupleResult = void 0; if (inDestructuringPattern && minLength > 0) { - var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasRestElement)); + var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); type.pattern = node; return type; } - else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasRestElement, elementCount, inConstContext)) { + else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasEndingSpreadElement, elementTypes.length, inConstContext)) { return createArrayLiteralType(tupleResult); } else if (forceTuple) { - return createArrayLiteralType(createTupleType(elementTypes, minLength, hasRestElement)); + return createArrayLiteralType(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); } } return createArrayLiteralType(createArrayType(elementTypes.length ? @@ -45290,10 +46064,10 @@ var ts; } propertiesArray.push(member); } - if (contextualTypeHasPattern) { + if (contextualTypeHasPattern && node.parent.kind !== 283) { for (var _i = 0, _a = getPropertiesOfType(contextualType); _i < _a.length; _i++) { var prop = _a[_i]; - if (!propertiesTable.get(prop.escapedName) && !(spread && getPropertyOfType(spread, prop.escapedName))) { + if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216)) { error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } @@ -45343,6 +46117,7 @@ var ts; } function checkJsxSelfClosingElementDeferred(node) { checkJsxOpeningLikeElementOrOpeningFragment(node); + resolveUntypedCall(node); } function checkJsxSelfClosingElement(node, _checkMode) { checkNodeDeferred(node); @@ -45694,7 +46469,7 @@ var ts; var reactSym = resolveName(reactLocation, reactNamespace, 111551, reactRefErr, reactNamespace, true); if (reactSym) { reactSym.isReferenced = 67108863; - if (reactSym.flags & 2097152) { + if (reactSym.flags & 2097152 && !getTypeOnlyAliasDeclaration(reactSym)) { markAliasSymbolAsReferenced(reactSym); } } @@ -45813,7 +46588,7 @@ var ts; return false; } var thisType = getTypeFromTypeNode(thisParameter.type); - enclosingClass = ((thisType.flags & 262144) ? getConstraintOfTypeParameter(thisType) : thisType); + enclosingClass = ((thisType.flags & 262144) ? getConstraintOfTypeParameter(thisType) : thisType).target; } if (flags & 32) { return true; @@ -46646,7 +47421,79 @@ var ts; function checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors, containingMessageChain, errorOutputContainer) { var paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); var attributesType = checkExpressionWithContextualType(node.attributes, paramType, undefined, checkMode); - return checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, undefined, containingMessageChain, errorOutputContainer); + return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, undefined, containingMessageChain, errorOutputContainer); + function checkTagNameDoesNotExpectTooManyArguments() { + var _a; + var tagType = ts.isJsxOpeningElement(node) || ts.isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : undefined; + if (!tagType) { + return true; + } + var tagCallSignatures = getSignaturesOfType(tagType, 0); + if (!ts.length(tagCallSignatures)) { + return true; + } + var factory = getJsxFactoryEntity(node); + if (!factory) { + return true; + } + var factorySymbol = resolveEntityName(factory, 111551, true, false, node); + if (!factorySymbol) { + return true; + } + var factoryType = getTypeOfSymbol(factorySymbol); + var callSignatures = getSignaturesOfType(factoryType, 0); + if (!ts.length(callSignatures)) { + return true; + } + var hasFirstParamSignatures = false; + var maxParamCount = 0; + for (var _i = 0, callSignatures_1 = callSignatures; _i < callSignatures_1.length; _i++) { + var sig = callSignatures_1[_i]; + var firstparam = getTypeAtPosition(sig, 0); + var signaturesOfParam = getSignaturesOfType(firstparam, 0); + if (!ts.length(signaturesOfParam)) + continue; + for (var _b = 0, signaturesOfParam_1 = signaturesOfParam; _b < signaturesOfParam_1.length; _b++) { + var paramSig = signaturesOfParam_1[_b]; + hasFirstParamSignatures = true; + if (hasEffectiveRestParameter(paramSig)) { + return true; + } + var paramCount = getParameterCount(paramSig); + if (paramCount > maxParamCount) { + maxParamCount = paramCount; + } + } + } + if (!hasFirstParamSignatures) { + return true; + } + var absoluteMinArgCount = Infinity; + for (var _c = 0, tagCallSignatures_1 = tagCallSignatures; _c < tagCallSignatures_1.length; _c++) { + var tagSig = tagCallSignatures_1[_c]; + var tagRequiredArgCount = getMinArgumentCount(tagSig); + if (tagRequiredArgCount < absoluteMinArgCount) { + absoluteMinArgCount = tagRequiredArgCount; + } + } + if (absoluteMinArgCount <= maxParamCount) { + return true; + } + if (reportErrors) { + var diag = ts.createDiagnosticForNode(node.tagName, ts.Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, ts.entityNameToString(node.tagName), absoluteMinArgCount, ts.entityNameToString(factory), maxParamCount); + var tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) === null || _a === void 0 ? void 0 : _a.valueDeclaration; + if (tagNameDeclaration) { + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(tagNameDeclaration, ts.Diagnostics._0_is_declared_here, ts.entityNameToString(node.tagName))); + } + if (errorOutputContainer && errorOutputContainer.skipLogging) { + (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); + } + if (!errorOutputContainer.skipLogging) { + diagnostics.add(diag); + } + } + return false; + } } function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors, containingMessageChain) { var errorOutputContainer = { errors: undefined, skipLogging: true }; @@ -47044,7 +47891,7 @@ var ts; } } } - return produceDiagnostics || !args ? resolveErrorCall(node) : getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); + return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); function chooseOverload(candidates, relation, signatureHelpTrailingComma) { if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; } candidatesForArgumentError = undefined; @@ -47118,6 +47965,7 @@ var ts; } function getCandidateForOverloadFailure(node, candidates, args, hasCandidatesOutArray) { ts.Debug.assert(candidates.length > 0); + checkNodeDeferred(node); return hasCandidatesOutArray || candidates.length === 1 || candidates.some(function (c) { return !!c.typeParameters; }) ? pickLongestCandidateSignature(node, candidates, args) : createUnionOfSignaturesForOverloadFailure(candidates); @@ -47263,7 +48111,7 @@ var ts; if (node.arguments.length === 1) { var text = ts.getSourceFileOfNode(node).text; if (ts.isLineBreak(text.charCodeAt(ts.skipTrivia(text, node.expression.end, true) - 1))) { - relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.It_is_highly_likely_that_you_are_missing_a_semicolon); + relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.Are_you_missing_a_semicolon); } } invocationError(node.expression, apparentType, 0, relatedInformation); @@ -48038,22 +48886,44 @@ var ts; if (!parameter) { signature.thisParameter = createSymbolWithType(context.thisParameter, undefined); } - assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); + assignParameterType(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { - var contextualParameterType = getTypeAtPosition(context, i); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + var contextualParameterType = tryGetTypeAtPosition(context, i); + assignParameterType(parameter, contextualParameterType); } } if (signatureHasRestParameter(signature)) { var parameter = ts.last(signature.parameters); if (ts.isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { var contextualParameterType = getRestTypeAtPosition(context, len); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + assignParameterType(parameter, contextualParameterType); + } + } + } + function assignNonContextualParameterTypes(signature) { + if (signature.thisParameter) { + assignParameterType(signature.thisParameter); + } + for (var _i = 0, _a = signature.parameters; _i < _a.length; _i++) { + var parameter = _a[_i]; + assignParameterType(parameter); + } + } + function assignParameterType(parameter, type) { + var links = getSymbolLinks(parameter); + if (!links.type) { + var declaration = parameter.valueDeclaration; + links.type = type || getWidenedTypeForVariableLikeDeclaration(declaration, true); + if (declaration.name.kind !== 75) { + if (links.type === unknownType) { + links.type = getTypeFromBindingPattern(declaration.name); + } + assignBindingElementTypes(declaration.name); } } } @@ -48070,19 +48940,6 @@ var ts; } } } - function assignTypeToParameterAndFixTypeParameters(parameter, contextualType) { - var links = getSymbolLinks(parameter); - if (!links.type) { - links.type = contextualType; - var decl = parameter.valueDeclaration; - if (decl.name.kind !== 75) { - if (links.type === unknownType) { - links.type = getTypeFromBindingPattern(decl.name); - } - assignBindingElementTypes(decl.name); - } - } - } function createPromiseType(promisedType) { var globalPromiseType = getGlobalPromiseType(true); if (globalPromiseType !== emptyGenericType) { @@ -48377,7 +49234,7 @@ var ts; ts.Debug.assert(node.kind !== 161 || ts.isObjectLiteralMethod(node)); checkNodeDeferred(node); if (checkMode && checkMode & 4 && isContextSensitive(node)) { - if (!ts.getEffectiveReturnTypeNode(node) && hasContextSensitiveReturnExpression(node)) { + if (!ts.getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) { var contextualSignature = getContextualSignature(node); if (contextualSignature && couldContainTypeVariables(getReturnTypeOfSignature(contextualSignature))) { var links = getNodeLinks(node); @@ -48397,12 +49254,8 @@ var ts; if (!hasGrammarError && node.kind === 201) { checkGrammarForGenerator(node); } - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return type; - } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); - return type; + return getTypeOfSymbol(getSymbolOfNode(node)); } function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) { var links = getNodeLinks(node); @@ -48410,13 +49263,12 @@ var ts; var contextualSignature = getContextualSignature(node); if (!(links.flags & 1024)) { links.flags |= 1024; - if (contextualSignature) { - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return; - } - var signature = getSignaturesOfType(type, 0)[0]; - if (isContextSensitive(node)) { + var signature = ts.firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfNode(node)), 0)); + if (!signature) { + return; + } + if (isContextSensitive(node)) { + if (contextualSignature) { var inferenceContext = getInferenceContext(node); if (checkMode && checkMode & 2) { inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext); @@ -48425,11 +49277,14 @@ var ts; instantiateSignature(contextualSignature, inferenceContext.mapper) : contextualSignature; assignContextualParameterTypes(signature, instantiatedContextualSignature); } - if (!getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { - var returnType = getReturnTypeFromBody(node, checkMode); - if (!signature.resolvedReturnType) { - signature.resolvedReturnType = returnType; - } + else { + assignNonContextualParameterTypes(signature); + } + } + if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { + var returnType = getReturnTypeFromBody(node, checkMode); + if (!signature.resolvedReturnType) { + signature.resolvedReturnType = returnType; } } checkSignatureDeclaration(node); @@ -48713,7 +49568,7 @@ var ts; return numberType; } function maybeTypeOfKind(type, kind) { - if (type.flags & kind & ~131072 || kind & 131072 && isGenericMappedType(type)) { + if (type.flags & kind) { return true; } if (type.flags & 3145728) { @@ -48982,11 +49837,70 @@ var ts; return (target.flags & 98304) !== 0 || isTypeComparableTo(source, target); } function checkBinaryExpression(node, checkMode) { - if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { - return checkExpression(node.right, checkMode); + var workStacks = { + expr: [node], + state: [0], + leftType: [undefined] + }; + var stackIndex = 0; + var lastResult; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0: { + if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { + finishInvocation(checkExpression(node.right, checkMode)); + break; + } + checkGrammarNullishCoalesceWithLogicalExpression(node); + var operator = node.operatorToken.kind; + if (operator === 62 && (node.left.kind === 193 || node.left.kind === 192)) { + finishInvocation(checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 104)); + break; + } + advanceState(1); + maybeCheckExpression(node.left); + break; + } + case 1: { + var leftType = lastResult; + workStacks.leftType[stackIndex] = leftType; + var operator = node.operatorToken.kind; + if (operator === 55 || operator === 56 || operator === 60) { + checkTruthinessOfType(leftType, node.left); + } + advanceState(2); + maybeCheckExpression(node.right); + break; + } + case 2: { + var leftType = workStacks.leftType[stackIndex]; + var rightType = lastResult; + finishInvocation(checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node)); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for checkBinaryExpression"); + } + } + return lastResult; + function finishInvocation(result) { + lastResult = result; + stackIndex--; + } + function advanceState(nextState) { + workStacks.state[stackIndex] = nextState; + } + function maybeCheckExpression(node) { + if (ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0; + workStacks.leftType[stackIndex] = undefined; + } + else { + lastResult = checkExpression(node, checkMode); + } } - checkGrammarNullishCoalesceWithLogicalExpression(node); - return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, checkMode, node); } function checkGrammarNullishCoalesceWithLogicalExpression(node) { var left = node.left, operatorToken = node.operatorToken, right = node.right; @@ -49012,6 +49926,10 @@ var ts; leftType = checkExpression(left, checkMode); } var rightType = checkExpression(right, checkMode); + return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode); + } + function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode) { + var operator = operatorToken.kind; switch (operator) { case 41: case 42: @@ -49344,7 +50262,8 @@ var ts; return getContextualIterationType(2, func) || anyType; } function checkConditionalExpression(node, checkMode) { - checkTruthinessExpression(node.condition); + var type = checkTruthinessExpression(node.condition); + checkTestingKnownTruthyCallableType(node.condition, node.whenTrue, type); var type1 = checkExpression(node.whenTrue, checkMode); var type2 = checkExpression(node.whenFalse, checkMode); return getUnionType([type1, type2], 2); @@ -49367,14 +50286,18 @@ var ts; var context = getContextNode(node); var saveContextualType = context.contextualType; var saveInferenceContext = context.inferenceContext; - context.contextualType = contextualType; - context.inferenceContext = inferenceContext; - var type = checkExpression(node, checkMode | 1 | (inferenceContext ? 2 : 0)); - var result = maybeTypeOfKind(type, 2944) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? - getRegularTypeOfLiteralType(type) : type; - context.contextualType = saveContextualType; - context.inferenceContext = saveInferenceContext; - return result; + try { + context.contextualType = contextualType; + context.inferenceContext = inferenceContext; + var type = checkExpression(node, checkMode | 1 | (inferenceContext ? 2 : 0)); + var result = maybeTypeOfKind(type, 2944) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? + getRegularTypeOfLiteralType(type) : type; + return result; + } + finally { + context.contextualType = saveContextualType; + context.inferenceContext = saveInferenceContext; + } } function checkExpressionCached(node, checkMode) { var links = getNodeLinks(node); @@ -49648,9 +50571,13 @@ var ts; } var saveContextualType = node.contextualType; node.contextualType = anyType; - var type = links.contextFreeType = checkExpression(node, 4); - node.contextualType = saveContextualType; - return type; + try { + var type = links.contextFreeType = checkExpression(node, 4); + return type; + } + finally { + node.contextualType = saveContextualType; + } } function checkExpression(node, checkMode, forceTuple) { var saveCurrentNode = currentNode; @@ -50433,7 +51360,7 @@ var ts; getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return ts.hasModifier(node, 8) && !!(node.flags & 8388608); + return (ts.hasModifier(node, 8) || ts.isPrivateIdentifierPropertyDeclaration(node)) && !!(node.flags & 8388608); } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedModifierFlags(n); @@ -50681,9 +51608,9 @@ var ts; switch (d.kind) { case 246: case 247: - case 321: - case 314: + case 322: case 315: + case 316: return 2; case 249: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 @@ -50691,6 +51618,7 @@ var ts; : 4; case 245: case 248: + case 284: return 2 | 1; case 290: return 2 | 1 | 4; @@ -50702,10 +51630,10 @@ var ts; case 253: case 256: case 255: - var result_7 = 0; + var result_8 = 0; var target = resolveAlias(getSymbolOfNode(d)); - ts.forEach(target.declarations, function (d) { result_7 |= getDeclarationSpaces(d); }); - return result_7; + ts.forEach(target.declarations, function (d) { result_8 |= getDeclarationSpaces(d); }); + return result_8; case 242: case 191: case 244: @@ -50903,7 +51831,8 @@ var ts; if (rootSymbol && rootSymbol.flags & 2097152 && symbolIsValue(rootSymbol) - && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol))) { + && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol)) + && !getTypeOnlyAliasDeclaration(rootSymbol)) { markAliasSymbolAsReferenced(rootSymbol); } } @@ -51075,6 +52004,13 @@ var ts; } checkSignatureDeclaration(node); } + function checkJSDocImplementsTag(node) { + var classLike = ts.getJSDocHost(node); + if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { + error(classLike, ts.Diagnostics.JSDoc_0_is_not_attached_to_a_class, ts.idText(node.tagName)); + return; + } + } function checkJSDocAugmentsTag(node) { var classLike = ts.getJSDocHost(node); if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { @@ -51221,7 +52157,9 @@ var ts; break; } var symbol = getSymbolOfNode(member); - if (!symbol.isReferenced && (ts.hasModifier(member, 8) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name))) { + if (!symbol.isReferenced + && (ts.hasModifier(member, 8) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name)) + && !(member.flags & 8388608)) { addDiagnostic(member, 0, ts.createDiagnosticForNode(member.name, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; @@ -51710,21 +52648,21 @@ var ts; function checkIfStatement(node) { checkGrammarStatementInAmbientContext(node); var type = checkTruthinessExpression(node.expression); - checkTestingKnownTruthyCallableType(node, type); + checkTestingKnownTruthyCallableType(node.expression, node.thenStatement, type); checkSourceElement(node.thenStatement); if (node.thenStatement.kind === 224) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); } - function checkTestingKnownTruthyCallableType(ifStatement, type) { + function checkTestingKnownTruthyCallableType(condExpr, body, type) { if (!strictNullChecks) { return; } - var testedNode = ts.isIdentifier(ifStatement.expression) - ? ifStatement.expression - : ts.isPropertyAccessExpression(ifStatement.expression) - ? ifStatement.expression.name + var testedNode = ts.isIdentifier(condExpr) + ? condExpr + : ts.isPropertyAccessExpression(condExpr) + ? condExpr.name : undefined; if (!testedNode) { return; @@ -51741,7 +52679,7 @@ var ts; if (!testedFunctionSymbol) { return; } - var functionIsUsedInBody = ts.forEachChild(ifStatement.thenStatement, function check(childNode) { + var functionIsUsedInBody = ts.forEachChild(body, function check(childNode) { if (ts.isIdentifier(childNode)) { var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol.id === testedFunctionSymbol.id) { @@ -51751,7 +52689,7 @@ var ts; return ts.forEachChild(childNode, check); }); if (!functionIsUsedInBody) { - error(ifStatement.expression, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); + error(condExpr, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); } } function checkDoStatement(node) { @@ -51764,13 +52702,15 @@ var ts; checkTruthinessExpression(node.expression); checkSourceElement(node.statement); } - function checkTruthinessExpression(node, checkMode) { - var type = checkExpression(node, checkMode); + function checkTruthinessOfType(type, node) { if (type.flags & 16384) { error(node, ts.Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); } return type; } + function checkTruthinessExpression(node, checkMode) { + return checkTruthinessOfType(checkExpression(node, checkMode), node); + } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { if (node.initializer && node.initializer.kind === 243) { @@ -52001,6 +52941,12 @@ var ts; } return noIterationTypes; } + function getCachedIterationTypes(type, cacheKey) { + return type[cacheKey]; + } + function setCachedIterationTypes(type, cacheKey, cachedTypes) { + return type[cacheKey] = cachedTypes; + } function getIterationTypesOfIterable(type, use, errorNode) { if (isTypeAny(type)) { return anyIterationTypes; @@ -52016,7 +52962,7 @@ var ts; return iterationTypes_1; } var cacheKey = use & 2 ? "iterationTypesOfAsyncIterable" : "iterationTypesOfIterable"; - var cachedTypes = type[cacheKey]; + var cachedTypes = getCachedIterationTypes(type, cacheKey); if (cachedTypes) return cachedTypes === noIterationTypes ? undefined : cachedTypes; var allIterationTypes; @@ -52034,7 +52980,7 @@ var ts; } } var iterationTypes = allIterationTypes ? combineIterationTypes(allIterationTypes) : noIterationTypes; - type[cacheKey] = iterationTypes; + setCachedIterationTypes(type, cacheKey, iterationTypes); return iterationTypes === noIterationTypes ? undefined : iterationTypes; } function getAsyncFromSyncIterationTypes(iterationTypes, errorNode) { @@ -52062,7 +53008,7 @@ var ts; if (iterationTypes) { if (use & 2) { if (iterationTypes !== noIterationTypes) { - return type.iterationTypesOfAsyncIterable = getAsyncFromSyncIterationTypes(iterationTypes, errorNode); + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", getAsyncFromSyncIterationTypes(iterationTypes, errorNode)); } } else { @@ -52080,9 +53026,9 @@ var ts; var iterationTypes = getIterationTypesOfIterableSlow(type, syncIterationTypesResolver, errorNode); if (iterationTypes !== noIterationTypes) { if (use & 2) { - return type.iterationTypesOfAsyncIterable = iterationTypes + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", iterationTypes ? getAsyncFromSyncIterationTypes(iterationTypes, errorNode) - : noIterationTypes; + : noIterationTypes); } else { return iterationTypes; @@ -52092,7 +53038,7 @@ var ts; return noIterationTypes; } function getIterationTypesOfIterableCached(type, resolver) { - return type[resolver.iterableCacheKey]; + return getCachedIterationTypes(type, resolver.iterableCacheKey); } function getIterationTypesOfGlobalIterableType(globalType, resolver) { var globalIterationTypes = getIterationTypesOfIterableCached(globalType, resolver) || @@ -52105,26 +53051,27 @@ var ts; isReferenceToType(type, globalType = resolver.getGlobalIterableIteratorType(false))) { var yieldType = getTypeArguments(type)[0]; var _a = getIterationTypesOfGlobalIterableType(globalType, resolver), returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } if (isReferenceToType(type, resolver.getGlobalGeneratorType(false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } function getIterationTypesOfIterableSlow(type, resolver, errorNode) { + var _a; var method = getPropertyOfType(type, ts.getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName)); var methodType = method && !(method.flags & 16777216) ? getTypeOfSymbol(method) : undefined; if (isTypeAny(methodType)) { - return type[resolver.iterableCacheKey] = anyIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes); } var signatures = methodType ? getSignaturesOfType(methodType, 0) : undefined; if (!ts.some(signatures)) { - return type[resolver.iterableCacheKey] = noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes); } var iteratorType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), 2); - var iterationTypes = getIterationTypesOfIterator(iteratorType, resolver, errorNode) || noIterationTypes; - return type[resolver.iterableCacheKey] = iterationTypes; + var iterationTypes = (_a = getIterationTypesOfIterator(iteratorType, resolver, errorNode)) !== null && _a !== void 0 ? _a : noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes); } function reportTypeNotIterableError(errorNode, type, allowAsyncIterables) { var message = allowAsyncIterables @@ -52142,7 +53089,7 @@ var ts; return iterationTypes === noIterationTypes ? undefined : iterationTypes; } function getIterationTypesOfIteratorCached(type, resolver) { - return type[resolver.iteratorCacheKey]; + return getCachedIterationTypes(type, resolver.iteratorCacheKey); } function getIterationTypesOfIteratorFast(type, resolver) { var globalType = resolver.getGlobalIterableIteratorType(false); @@ -52151,12 +53098,12 @@ var ts; var globalIterationTypes = getIterationTypesOfIteratorCached(globalType, resolver) || getIterationTypesOfIteratorSlow(globalType, resolver, undefined); var _a = globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes, returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } if (isReferenceToType(type, resolver.getGlobalIteratorType(false)) || isReferenceToType(type, resolver.getGlobalGeneratorType(false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } function isIteratorResult(type, kind) { @@ -52173,26 +53120,26 @@ var ts; if (isTypeAny(type)) { return anyIterationTypes; } - var cachedTypes = type.iterationTypesOfIteratorResult; + var cachedTypes = getCachedIterationTypes(type, "iterationTypesOfIteratorResult"); if (cachedTypes) { return cachedTypes; } if (isReferenceToType(type, getGlobalIteratorYieldResultType(false))) { var yieldType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType_1, undefined, undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType_1, undefined, undefined)); } if (isReferenceToType(type, getGlobalIteratorReturnResultType(false))) { var returnType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(undefined, returnType_1, undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(undefined, returnType_1, undefined)); } var yieldIteratorResult = filterType(type, isYieldIteratorResult); var yieldType = yieldIteratorResult !== neverType ? getTypeOfPropertyOfType(yieldIteratorResult, "value") : undefined; var returnIteratorResult = filterType(type, isReturnIteratorResult); var returnType = returnIteratorResult !== neverType ? getTypeOfPropertyOfType(returnIteratorResult, "value") : undefined; if (!yieldType && !returnType) { - return type.iterationTypesOfIteratorResult = noIterationTypes; + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", noIterationTypes); } - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType, returnType || voidType, undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType, returnType || voidType, undefined)); } function getIterationTypesOfMethod(type, resolver, methodName, errorNode) { var method = getPropertyOfType(type, methodName); @@ -52259,7 +53206,7 @@ var ts; getIterationTypesOfMethod(type, resolver, "return", errorNode), getIterationTypesOfMethod(type, resolver, "throw", errorNode), ]); - return type[resolver.iteratorCacheKey] = iterationTypes; + return setCachedIterationTypes(type, resolver.iteratorCacheKey, iterationTypes); } function getIterationTypeOfGeneratorFunctionReturnType(kind, returnType, isAsyncGenerator) { if (isTypeAny(returnType)) { @@ -52697,7 +53644,7 @@ var ts; checkKindsOfPropertyMemberOverrides(type, baseType_1); } } - var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(node); + var implementedTypeNodes = ts.getEffectiveImplementsTypeNodes(node); if (implementedTypeNodes) { for (var _b = 0, implementedTypeNodes_1 = implementedTypeNodes; _b < implementedTypeNodes_1.length; _b++) { var typeRefNode = implementedTypeNodes_1[_b]; @@ -52982,6 +53929,7 @@ var ts; function checkTypeAliasDeclaration(node) { checkGrammarDecoratorsAndModifiers(node); checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_alias_name_cannot_be_0); + checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); checkSourceElement(node.type); registerForUnusedIdentifiersCheck(node); @@ -53471,6 +54419,9 @@ var ts; if (!checkGrammarDecoratorsAndModifiers(node) && ts.hasModifiers(node)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); } + if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0) { + checkExternalEmitHelpers(node, 1048576); + } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { if (ts.isNamedExports(node.exportClause)) { @@ -53505,16 +54456,14 @@ var ts; return !isInAppropriateContext; } function importClauseContainsReferencedImport(importClause) { - return importClause.name && isReferenced(importClause) - || importClause.namedBindings && namedBindingsContainsReferencedImport(importClause.namedBindings); - function isReferenced(declaration) { - return !!getMergedSymbol(getSymbolOfNode(declaration)).isReferenced; - } - function namedBindingsContainsReferencedImport(namedBindings) { - return ts.isNamespaceImport(namedBindings) - ? isReferenced(namedBindings) - : ts.some(namedBindings.elements, isReferenced); - } + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolOfNode(declaration).isReferenced; + }); + } + function importClauseContainsConstEnumUsedAsValue(importClause) { + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolLinks(getSymbolOfNode(declaration)).constEnumReferenced; + }); } function checkImportsForTypeOnlyConversion(sourceFile) { for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { @@ -53523,11 +54472,9 @@ var ts; statement.importClause && !statement.importClause.isTypeOnly && importClauseContainsReferencedImport(statement.importClause) && - !isReferencedAliasDeclaration(statement.importClause, true)) { - var isError = compilerOptions.importsNotUsedAsValues === 2; - errorOrSuggestion(isError, statement, isError - ? ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error - : ts.Diagnostics.This_import_may_be_converted_to_a_type_only_import); + !isReferencedAliasDeclaration(statement.importClause, true) && + !importClauseContainsConstEnumUsedAsValue(statement.importClause)) { + error(statement, ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error); } } } @@ -53722,15 +54669,17 @@ var ts; return checkImportType(node); case 307: return checkJSDocAugmentsTag(node); - case 321: - case 314: + case 308: + return checkJSDocImplementsTag(node); + case 322: case 315: + case 316: return checkJSDocTypeAliasTag(node); - case 320: + case 321: return checkJSDocTemplateTag(node); - case 319: + case 320: return checkJSDocTypeTag(node); - case 316: + case 317: return checkJSDocParameterTag(node); case 300: checkJSDocFunctionType(node); @@ -53889,6 +54838,13 @@ var ts; currentNode = node; instantiationCount = 0; switch (node.kind) { + case 196: + case 197: + case 198: + case 157: + case 268: + resolveUntypedCall(node); + break; case 201: case 202: case 161: @@ -53956,7 +54912,9 @@ var ts; } }); } - if (!node.isDeclarationFile && ts.isExternalModule(node)) { + if (compilerOptions.importsNotUsedAsValues === 2 && + !node.isDeclarationFile && + ts.isExternalModule(node)) { checkImportsForTypeOnlyConversion(node); } if (ts.isExternalOrCommonJsModule(node)) { @@ -54231,10 +55189,10 @@ var ts; return entityNameSymbol; } } - if (name.parent.kind === 316) { + if (name.parent.kind === 317) { return ts.getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 155 && name.parent.parent.kind === 320) { + if (name.parent.kind === 155 && name.parent.parent.kind === 321) { ts.Debug.assert(!ts.isInJSFile(name)); var typeParameter = ts.getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -54273,7 +55231,7 @@ var ts; } return undefined; } - function getSymbolAtLocation(node) { + function getSymbolAtLocation(node, ignoreErrors) { if (node.kind === 290) { return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } @@ -54338,7 +55296,7 @@ var ts; ((node.parent.kind === 254 || node.parent.kind === 260) && node.parent.moduleSpecifier === node) || ((ts.isInJSFile(node) && ts.isRequireCall(node.parent, false)) || ts.isImportCall(node.parent)) || (ts.isLiteralTypeNode(node.parent) && ts.isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent)) { - return resolveExternalModuleName(node, node); + return resolveExternalModuleName(node, node, ignoreErrors); } if (ts.isCallExpression(parent) && ts.isBindableObjectDefinePropertyCall(parent) && parent.arguments[1] === node) { return getSymbolOfNode(parent); @@ -54356,9 +55314,9 @@ var ts; case 80: return getSymbolOfNode(node.parent); case 188: - return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal) : undefined; + return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : undefined; case 89: - return ts.isExportAssignment(node.parent) ? ts.Debug.assertDefined(node.parent.symbol) : undefined; + return ts.isExportAssignment(node.parent) ? ts.Debug.checkDefined(node.parent.symbol) : undefined; default: return undefined; } @@ -54406,7 +55364,7 @@ var ts; if (isDeclarationNameOrImportPropertyName(node)) { var symbol = getSymbolAtLocation(node); if (symbol) { - return ts.isTypeOnlyImportOrExportName(node) ? getDeclaredTypeOfSymbol(symbol) : getTypeOfSymbol(symbol); + return getTypeOfSymbol(symbol); } return errorType; } @@ -54577,7 +55535,7 @@ var ts; var node = ts.getParseTreeNode(nodeIn, ts.isIdentifier); if (node) { var symbol = getReferencedValueSymbol(node); - if (isNonLocalAlias(symbol, 111551)) { + if (isNonLocalAlias(symbol, 111551) && !getTypeOnlyAliasDeclaration(symbol)) { return getDeclarationOfAliasSymbol(symbol); } } @@ -54637,11 +55595,13 @@ var ts; function isValueAliasDeclaration(node) { switch (node.kind) { case 253: + return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); case 255: case 256: case 258: case 263: - return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); + var symbol = getSymbolOfNode(node) || unknownSymbol; + return isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol); case 260: var exportClause = node.exportClause; return !!exportClause && (ts.isNamespaceExport(exportClause) || @@ -54673,14 +55633,15 @@ var ts; return isConstEnumSymbol(s) || !!s.constEnumOnlyModule; } function isReferencedAliasDeclaration(node, checkChildren) { - if (ts.isAliasSymbolDeclaration(node)) { + if (isAliasSymbolDeclaration(node)) { var symbol = getSymbolOfNode(node); if (symbol && getSymbolLinks(symbol).referenced) { return true; } var target = getSymbolLinks(symbol).target; if (target && ts.getModifierFlags(node) & 1 && - target.flags & 111551 && (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { + target.flags & 111551 && + (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { return true; } } @@ -54904,6 +55865,9 @@ var ts; var type = getTypeOfSymbol(getSymbolOfNode(node)); return literalTypeToNode(type, node, tracker); } + function getJsxFactoryEntity(location) { + return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; + } function createResolver() { var resolvedTypeReferenceDirectives = host.getResolvedTypeReferenceDirectives(); var fileToDirective; @@ -54967,7 +55931,7 @@ var ts; var symbol = node && getSymbolOfNode(node); return !!(symbol && ts.getCheckFlags(symbol) & 4096); }, - getJsxFactoryEntity: function (location) { return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; }, + getJsxFactoryEntity: getJsxFactoryEntity, getAllAccessorDeclarations: function (accessor) { accessor = ts.getParseTreeNode(accessor, ts.isGetOrSetAccessorDeclaration); var otherKind = accessor.kind === 164 ? 163 : 164; @@ -55199,7 +56163,7 @@ var ts; var helpersModule = resolveHelpersModule(sourceFile, location); if (helpersModule !== unknownSymbol) { var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (var helper = 1; helper <= 524288; helper <<= 1) { + for (var helper = 1; helper <= 1048576; helper <<= 1) { if (uncheckedHelpers & helper) { var name = getHelperName(helper); var symbol = getSymbol(helpersModule.exports, ts.escapeLeadingUnderscores(name), 111551); @@ -55235,6 +56199,7 @@ var ts; case 131072: return "__makeTemplateObject"; case 262144: return "__classPrivateFieldGet"; case 524288: return "__classPrivateFieldSet"; + case 1048576: return "__createBinding"; default: return ts.Debug.fail("Unrecognized helper"); } } @@ -55317,6 +56282,9 @@ var ts; return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract"); } } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + } flags |= ts.modifierToFlag(modifier.kind); break; case 120: @@ -55398,6 +56366,9 @@ var ts; else if ((node.parent.flags & 8388608) && node.parent.kind === 250) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); + } flags |= 2; lastDeclare = modifier; break; @@ -55423,7 +56394,7 @@ var ts; } } if (ts.isNamedDeclaration(node) && node.name.kind === 76) { - return grammarErrorOnNode(node, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); } flags |= 128; break; @@ -55466,9 +56437,6 @@ var ts; else if (node.kind === 156 && (flags & 92) && node.dotDotDotToken) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } - else if (ts.isNamedDeclaration(node) && (flags & 28) && node.name.kind === 76) { - return grammarErrorOnNode(node, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); - } if (flags & 256) { return checkGrammarAsyncModifier(node, lastAsync); } @@ -55968,7 +56936,7 @@ var ts; if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } - var parameter = ts.Debug.assertDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); + var parameter = ts.Debug.checkDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); } @@ -56388,9 +57356,9 @@ var ts; return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } if (node.parent.kind === 223 || node.parent.kind === 250 || node.parent.kind === 290) { - var links_1 = getNodeLinks(node.parent); - if (!links_1.hasReportedStatementInAmbientContext) { - return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); + var links_2 = getNodeLinks(node.parent); + if (!links_2.hasReportedStatementInAmbientContext) { + return links_2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); } } else { @@ -56787,6 +57755,9 @@ var ts; } ts.getGeneratedNameForNode = getGeneratedNameForNode; function createPrivateIdentifier(text) { + if (text[0] !== "#") { + ts.Debug.fail("First character of private identifier must be #: " + text); + } var node = createSynthesizedNode(76); node.escapedText = ts.escapeLeadingUnderscores(text); return node; @@ -57889,7 +58860,7 @@ var ts; } var token = rawTextScanner.scan(); if (token === 23) { - token = rawTextScanner.reScanTemplateToken(); + token = rawTextScanner.reScanTemplateToken(false); } if (rawTextScanner.isUnterminated()) { rawTextScanner.setText(undefined); @@ -58727,27 +59698,27 @@ var ts; } ts.createJSDocTypeExpression = createJSDocTypeExpression; function createJSDocTypeTag(typeExpression, comment) { - var tag = createJSDocTag(319, "type"); + var tag = createJSDocTag(320, "type"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; } ts.createJSDocTypeTag = createJSDocTypeTag; function createJSDocReturnTag(typeExpression, comment) { - var tag = createJSDocTag(317, "returns"); + var tag = createJSDocTag(318, "returns"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; } ts.createJSDocReturnTag = createJSDocReturnTag; function createJSDocThisTag(typeExpression) { - var tag = createJSDocTag(318, "this"); + var tag = createJSDocTag(319, "this"); tag.typeExpression = typeExpression; return tag; } ts.createJSDocThisTag = createJSDocThisTag; function createJSDocParamTag(name, isBracketed, typeExpression, comment) { - var tag = createJSDocTag(316, "param"); + var tag = createJSDocTag(317, "param"); tag.typeExpression = typeExpression; tag.name = name; tag.isBracketed = isBracketed; @@ -59105,28 +60076,28 @@ var ts; } ts.getMutableClone = getMutableClone; function createNotEmittedStatement(original) { - var node = createSynthesizedNode(324); + var node = createSynthesizedNode(325); node.original = original; setTextRange(node, original); return node; } ts.createNotEmittedStatement = createNotEmittedStatement; function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(328); + var node = createSynthesizedNode(329); node.emitNode = {}; node.original = original; return node; } ts.createEndOfDeclarationMarker = createEndOfDeclarationMarker; function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(327); + var node = createSynthesizedNode(328); node.emitNode = {}; node.original = original; return node; } ts.createMergeDeclarationMarker = createMergeDeclarationMarker; function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(325); + var node = createSynthesizedNode(326); node.expression = expression; node.original = original; setTextRange(node, original); @@ -59142,7 +60113,7 @@ var ts; ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function flattenCommaElements(node) { if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) { - if (node.kind === 326) { + if (node.kind === 327) { return node.elements; } if (ts.isBinaryExpression(node) && node.operatorToken.kind === 27) { @@ -59152,7 +60123,7 @@ var ts; return node; } function createCommaList(elements) { - var node = createSynthesizedNode(326); + var node = createSynthesizedNode(327); node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements)); return node; } @@ -59164,7 +60135,7 @@ var ts; } ts.updateCommaList = updateCommaList; function createSyntheticReferenceExpression(expression, thisArg) { - var node = createSynthesizedNode(329); + var node = createSynthesizedNode(330); node.expression = expression; node.thisArg = thisArg; return node; @@ -59209,6 +60180,8 @@ var ts; ts.importDefaultHelper, ts.classPrivateFieldGetHelper, ts.classPrivateFieldSetHelper, + ts.createBindingHelper, + ts.setModuleDefaultHelper ], function (helper) { return helper.name; })); } function createUnparsedSource() { @@ -59237,7 +60210,7 @@ var ts; stripInternal = mapTextOrStripInternal; bundleFileInfo = mapPathOrType === "js" ? textOrInputFiles.buildInfo.bundle.js : textOrInputFiles.buildInfo.bundle.dts; if (node.oldFileOfCurrentEmit) { - parseOldFileOfCurrentEmit(node, ts.Debug.assertDefined(bundleFileInfo)); + parseOldFileOfCurrentEmit(node, ts.Debug.checkDefined(bundleFileInfo)); return node; } } @@ -59400,13 +60373,13 @@ var ts; }; node.javascriptPath = declarationTextOrJavascriptPath; node.javascriptMapPath = javascriptMapPath; - node.declarationPath = ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath); + node.declarationPath = ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath); node.declarationMapPath = declarationMapPath; node.buildInfoPath = declarationMapTextOrBuildInfoPath; Object.defineProperties(node, { javascriptText: { get: function () { return definedTextGetter_1(declarationTextOrJavascriptPath); } }, javascriptMapText: { get: function () { return textGetter_1(javascriptMapPath); } }, - declarationText: { get: function () { return definedTextGetter_1(ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath)); } }, + declarationText: { get: function () { return definedTextGetter_1(ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath)); } }, declarationMapText: { get: function () { return textGetter_1(declarationMapPath); } }, buildInfo: { get: function () { return getAndCacheBuildInfo_1(function () { return textGetter_1(declarationMapTextOrBuildInfoPath); }); } } }); @@ -59882,8 +60855,8 @@ var ts; argumentsList.push(ts.createNull()); } if (children.length > 1) { - for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { - var child = children_1[_i]; + for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { + var child = children_2[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -59901,8 +60874,8 @@ var ts; argumentsList.push(ts.createNull()); if (children && children.length > 0) { if (children.length > 1) { - for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { - var child = children_2[_i]; + for (var _i = 0, children_3 = children; _i < children_3.length; _i++) { + var child = children_3[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -59946,10 +60919,10 @@ var ts; name: "typescript:spread", importName: "__spread", scoped: false, + dependencies: [ts.readHelper], text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };" }; function createSpreadHelper(context, argumentList, location) { - context.requestEmitHelper(ts.readHelper); context.requestEmitHelper(ts.spreadHelper); return ts.setTextRange(ts.createCall(getUnscopedHelperName("__spread"), undefined, argumentList), location); } @@ -60566,7 +61539,7 @@ var ts; case 195: case 194: case 218: - case 325: + case 326: node = node.expression; continue; } @@ -60583,7 +61556,7 @@ var ts; ts.parenthesizeConciseBody = parenthesizeConciseBody; function isCommaSequence(node) { return node.kind === 209 && node.operatorToken.kind === 27 || - node.kind === 326; + node.kind === 327; } ts.isCommaSequence = isCommaSequence; function isOuterExpression(node, kinds) { @@ -60595,7 +61568,7 @@ var ts; case 217: case 218: return (kinds & 2) !== 0; - case 325: + case 326: return (kinds & 4) !== 0; } return false; @@ -60632,7 +61605,7 @@ var ts; case 199: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression); case 217: return ts.updateAsExpression(outerExpression, expression, outerExpression.type); case 218: return ts.updateNonNullExpression(outerExpression, expression); - case 325: return ts.updatePartiallyEmittedExpression(outerExpression, expression); + case 326: return ts.updatePartiallyEmittedExpression(outerExpression, expression); } } function isIgnorableParen(node) { @@ -61337,9 +62310,9 @@ var ts; return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression)); case 290: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); - case 325: - return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); case 326: + return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); + case 327: return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression)); default: return node; @@ -61378,7 +62351,7 @@ var ts; case 224: case 215: case 241: - case 324: + case 325: break; case 153: result = reduceNode(node.left, cbNode, result); @@ -61746,10 +62719,10 @@ var ts; case 290: result = reduceNodes(node.statements, cbNodes, result); break; - case 325: + case 326: result = reduceNode(node.expression, cbNode, result); break; - case 326: + case 327: result = reduceNodes(node.elements, cbNodes, result); break; default: @@ -62642,10 +63615,12 @@ var ts; if (index === statements.length) { return index; } - var statement = statements[index]; - if (statement.kind === 226 && ts.isSuperCall(statement.expression)) { - result.push(ts.visitNode(statement, visitor, ts.isStatement)); - return index + 1; + var superIndex = ts.findIndex(statements, function (s) { return ts.isExpressionStatement(s) && ts.isSuperCall(s.expression); }, index); + if (superIndex > -1) { + for (var i = index; i <= superIndex; i++) { + result.push(ts.visitNode(statements[i], visitor, ts.isStatement)); + } + return superIndex + 1; } return index; } @@ -62884,7 +63859,7 @@ var ts; && !(element.transformFlags & (8192 | 16384)) && !(ts.getTargetOfBindingOrAssignmentElement(element).transformFlags & (8192 | 16384)) && !ts.isComputedPropertyName(propertyName)) { - bindingElements = ts.append(bindingElements, element); + bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor)); } else { if (bindingElements) { @@ -63048,6 +64023,72 @@ var ts; } })(ts || (ts = {})); var ts; +(function (ts) { + var ProcessLevel; + (function (ProcessLevel) { + ProcessLevel[ProcessLevel["LiftRestriction"] = 0] = "LiftRestriction"; + ProcessLevel[ProcessLevel["All"] = 1] = "All"; + })(ProcessLevel = ts.ProcessLevel || (ts.ProcessLevel = {})); + function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) { + var tag = ts.visitNode(node.tag, visitor, ts.isExpression); + var templateArguments = [undefined]; + var cookedStrings = []; + var rawStrings = []; + var template = node.template; + if (level === ProcessLevel.LiftRestriction && !ts.hasInvalidEscape(template)) + return node; + if (ts.isNoSubstitutionTemplateLiteral(template)) { + cookedStrings.push(createTemplateCooked(template)); + rawStrings.push(getRawLiteral(template, currentSourceFile)); + } + else { + cookedStrings.push(createTemplateCooked(template.head)); + rawStrings.push(getRawLiteral(template.head, currentSourceFile)); + for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { + var templateSpan = _a[_i]; + cookedStrings.push(createTemplateCooked(templateSpan.literal)); + rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile)); + templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); + } + } + var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); + if (ts.isExternalModule(currentSourceFile)) { + var tempVar = ts.createUniqueName("templateObject"); + recordTaggedTemplateString(tempVar); + templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); + } + else { + templateArguments[0] = helperCall; + } + return ts.createCall(tag, undefined, templateArguments); + } + ts.processTaggedTemplateExpression = processTaggedTemplateExpression; + function createTemplateCooked(template) { + return template.templateFlags ? ts.createIdentifier("undefined") : ts.createLiteral(template.text); + } + function getRawLiteral(node, currentSourceFile) { + var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + var isLast = node.kind === 14 || node.kind === 17; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + text = text.replace(/\r\n?/g, "\n"); + return ts.setTextRange(ts.createLiteral(text), node); + } + function createTemplateObjectHelper(context, cooked, raw) { + context.requestEmitHelper(ts.templateObjectHelper); + return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), undefined, [ + cooked, + raw + ]); + } + ts.templateObjectHelper = { + name: "typescript:makeTemplateObject", + importName: "__makeTemplateObject", + scoped: false, + priority: 0, + text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" + }; +})(ts || (ts = {})); +var ts; (function (ts) { var USE_NEW_TYPE_METADATA_FORMAT = false; function transformTypeScript(context) { @@ -63369,8 +64410,6 @@ var ts; facts |= 32; else if (isNamedExternalModuleExport(node)) facts |= 16; - if (languageVersion <= 1 && (facts & 7)) - facts |= 128; return facts; } function hasTypeScriptClassSyntax(node) { @@ -63388,7 +64427,7 @@ var ts; } var staticProperties = ts.getProperties(node, true, true); var facts = getClassFacts(node, staticProperties); - if (facts & 128) { + if (facts & 7) { context.startLexicalEnvironment(); } var name = node.name || (facts & 5 ? ts.getGeneratedNameForNode(node) : undefined); @@ -63399,7 +64438,7 @@ var ts; addClassElementDecorationStatements(statements, node, false); addClassElementDecorationStatements(statements, node, true); addConstructorDecorationStatement(statements, node); - if (facts & 128) { + if (facts & 7) { var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentSourceFile.text, node.members.end), 19); var localName = ts.getInternalName(node); var outer = ts.createPartiallyEmittedExpression(localName); @@ -63412,9 +64451,12 @@ var ts; ts.insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment()); var iife = ts.createImmediatelyInvokedArrowFunction(statements); ts.setEmitFlags(iife, 33554432); + if (languageVersion > 1) { + ts.addSyntheticLeadingComment(iife, 3, "* @class "); + } var varStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([ ts.createVariableDeclaration(ts.getLocalName(node, false, false), undefined, iife) - ])); + ], languageVersion > 1 ? 2 : undefined)); ts.setOriginalNode(varStatement, node); ts.setCommentRange(varStatement, node); ts.setSourceMapRange(varStatement, ts.moveRangePastDecorators(node)); @@ -63424,7 +64466,7 @@ var ts; if (facts & 8) { addExportMemberAssignment(statements, node); } - else if (facts & 128 || facts & 2) { + else if (facts & 7 || facts & 2) { if (facts & 32) { statements.push(ts.createExportDefault(ts.getLocalName(node, false, true))); } @@ -63439,7 +64481,7 @@ var ts; return ts.singleOrMany(statements); } function createClassDeclarationHeadWithoutDecorators(node, name, facts) { - var modifiers = !(facts & 128) + var modifiers = !(facts & 7) ? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier) : undefined; var classDeclaration = ts.createClassDeclaration(undefined, modifiers, name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node)); @@ -64452,7 +65494,7 @@ var ts; if (!resolver.isValueAliasDeclaration(node)) { return undefined; } - var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedImportBindings); + var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedExportBindings); return exportClause ? ts.updateExportDeclaration(node, undefined, undefined, exportClause, node.moduleSpecifier, node.isTypeOnly) : undefined; @@ -65044,7 +66086,7 @@ var ts; var classExpression = ts.updateClassExpression(node, node.modifiers, node.name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass)); if (ts.some(staticProperties) || ts.some(pendingExpressions)) { if (isDecoratedClassDeclaration) { - ts.Debug.assertDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); + ts.Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); if (pendingStatements && pendingExpressions && ts.some(pendingExpressions)) { pendingStatements.push(ts.createExpressionStatement(ts.inlineExpressions(pendingExpressions))); } @@ -65890,18 +66932,24 @@ var ts; var enclosingFunctionFlags; var enclosingSuperContainerFlags = 0; var hasLexicalThis; + var currentSourceFile; + var taggedTemplateStringDeclarations; var capturedSuperProperties; var hasSuperElementAccess; var substitutedSuperAccessors = []; return ts.chainBundle(transformSourceFile); + function recordTaggedTemplateString(temp) { + taggedTemplateStringDeclarations = ts.append(taggedTemplateStringDeclarations, ts.createVariableDeclaration(temp)); + } function transformSourceFile(node) { if (node.isDeclarationFile) { return node; } - exportedVariableStatement = false; - hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); - var visited = ts.visitEachChild(node, visitor, context); + currentSourceFile = node; + var visited = visitSourceFile(node); ts.addEmitHelpers(visited, context.readEmitHelpers()); + currentSourceFile = undefined; + taggedTemplateStringDeclarations = undefined; return visited; } function visitor(node) { @@ -65977,6 +67025,8 @@ var ts; return visitExpressionStatement(node); case 200: return visitParenthesizedExpression(node, noDestructuringValue); + case 198: + return visitTaggedTemplateExpression(node); case 194: if (capturedSuperProperties && ts.isPropertyAccessExpression(node) && node.expression.kind === 102) { capturedSuperProperties.set(node.name.escapedText, true); @@ -66077,6 +67127,18 @@ var ts; function visitParenthesizedExpression(node, noDestructuringValue) { return ts.visitEachChild(node, noDestructuringValue ? visitorNoDestructuringValue : visitor, context); } + function visitSourceFile(node) { + exportedVariableStatement = false; + hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); + var visited = ts.visitEachChild(node, visitor, context); + var statement = ts.concatenate(visited.statements, taggedTemplateStringDeclarations && [ + ts.createVariableStatement(undefined, ts.createVariableDeclarationList(taggedTemplateStringDeclarations)) + ]); + return ts.updateSourceFileNode(visited, ts.setTextRange(ts.createNodeArray(statement), node.statements)); + } + function visitTaggedTemplateExpression(node) { + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.LiftRestriction); + } function visitBinaryExpression(node, noDestructuringValue) { if (ts.isDestructuringAssignment(node) && node.left.transformFlags & 16384) { return ts.flattenDestructuringAssignment(node, visitor, context, 1, !noDestructuringValue); @@ -66483,10 +67545,10 @@ var ts; name: "typescript:asyncGenerator", importName: "__asyncGenerator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n 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); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };" }; function createAsyncGeneratorHelper(context, generatorFunc, hasLexicalThis) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncGeneratorHelper); (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144; return ts.createCall(ts.getUnscopedHelperName("__asyncGenerator"), undefined, [ @@ -66499,10 +67561,10 @@ var ts; name: "typescript:asyncDelegator", importName: "__asyncDelegator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n };" }; function createAsyncDelegatorHelper(context, expression, location) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncDelegator); return ts.setTextRange(ts.createCall(ts.getUnscopedHelperName("__asyncDelegator"), undefined, [expression]), location); } @@ -68117,10 +69179,15 @@ var ts; } return ts.visitEachChild(node, visitor, context); } + function isVariableStatementOfTypeScriptClassWrapper(node) { + return node.declarationList.declarations.length === 1 + && !!node.declarationList.declarations[0].initializer + && !!(ts.getEmitFlags(node.declarationList.declarations[0].initializer) & 33554432); + } function visitVariableStatement(node) { var ancestorFacts = enterSubtree(0, ts.hasModifier(node, 1) ? 32 : 0); var updated; - if (convertedLoopState && (node.declarationList.flags & 3) === 0) { + if (convertedLoopState && (node.declarationList.flags & 3) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { var assignments = void 0; for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var decl = _a[_i]; @@ -68896,7 +69963,10 @@ var ts; function visitTypeScriptClassWrapper(node) { var body = ts.cast(ts.cast(ts.skipOuterExpressions(node.expression), ts.isArrowFunction).body, ts.isBlock); var isVariableStatementWithInitializer = function (stmt) { return ts.isVariableStatement(stmt) && !!ts.first(stmt.declarationList.declarations).initializer; }; + var savedConvertedLoopState = convertedLoopState; + convertedLoopState = undefined; var bodyStatements = ts.visitNodes(body.statements, visitor, ts.isStatement); + convertedLoopState = savedConvertedLoopState; var classStatements = ts.filter(bodyStatements, isVariableStatementWithInitializer); var remainingStatements = ts.filter(bodyStatements, function (stmt) { return !isVariableStatementWithInitializer(stmt); }); var varStatement = ts.cast(ts.first(classStatements), ts.isVariableStatement); @@ -69036,45 +70106,7 @@ var ts; return node; } function visitTaggedTemplateExpression(node) { - var tag = ts.visitNode(node.tag, visitor, ts.isExpression); - var templateArguments = [undefined]; - var cookedStrings = []; - var rawStrings = []; - var template = node.template; - if (ts.isNoSubstitutionTemplateLiteral(template)) { - cookedStrings.push(ts.createLiteral(template.text)); - rawStrings.push(getRawLiteral(template)); - } - else { - cookedStrings.push(ts.createLiteral(template.head.text)); - rawStrings.push(getRawLiteral(template.head)); - for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { - var templateSpan = _a[_i]; - cookedStrings.push(ts.createLiteral(templateSpan.literal.text)); - rawStrings.push(getRawLiteral(templateSpan.literal)); - templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); - } - } - var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); - if (ts.isExternalModule(currentSourceFile)) { - var tempVar = ts.createUniqueName("templateObject"); - recordTaggedTemplateString(tempVar); - templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); - } - else { - templateArguments[0] = helperCall; - } - return ts.createCall(tag, undefined, templateArguments); - } - function getRawLiteral(node) { - var text = node.rawText; - if (text === undefined) { - text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - var isLast = node.kind === 14 || node.kind === 17; - text = text.substring(1, text.length - (isLast ? 1 : 2)); - } - text = text.replace(/\r\n?/g, "\n"); - return ts.setTextRange(ts.createLiteral(text), node); + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.All); } function visitTemplateExpression(node) { var expressions = []; @@ -69259,13 +70291,6 @@ var ts; ts.createFileLevelUniqueName("_super") ]); } - function createTemplateObjectHelper(context, cooked, raw) { - context.requestEmitHelper(ts.templateObjectHelper); - return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), undefined, [ - cooked, - raw - ]); - } ts.extendsHelper = { name: "typescript:extends", importName: "__extends", @@ -69273,13 +70298,6 @@ var ts; priority: 0, text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();" }; - ts.templateObjectHelper = { - name: "typescript:makeTemplateObject", - importName: "__makeTemplateObject", - scoped: false, - priority: 0, - text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" - }; })(ts || (ts = {})); var ts; (function (ts) { @@ -71026,7 +72044,7 @@ var ts; startLexicalEnvironment(); var statements = []; var ensureUseStrict = ts.getStrictOptionValue(compilerOptions, "alwaysStrict") || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile)); - var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor); + var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict && !ts.isJsonSourceFile(node), sourceElementVisitor); if (shouldEmitUnderscoreUnderscoreESModule()) { ts.append(statements, createUnderscoreUnderscoreESModule()); } @@ -71035,9 +72053,6 @@ var ts; addExportEqualsIfNeeded(statements, false); ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements)); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - ts.addEmitHelper(updated, exportStarHelper); - } ts.addEmitHelpers(updated, context.readEmitHelpers()); return updated; } @@ -71153,9 +72168,6 @@ var ts; addExportEqualsIfNeeded(statements, true); ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var body = ts.createBlock(statements, true); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - ts.addEmitHelper(body, exportStarHelper); - } if (needUMDDynamicImportHelper) { ts.addEmitHelper(body, dynamicImportUMDHelper); } @@ -71196,9 +72208,9 @@ var ts; return visitFunctionDeclaration(node); case 245: return visitClassDeclaration(node); - case 327: - return visitMergeDeclarationMarker(node); case 328: + return visitMergeDeclarationMarker(node); + case 329: return visitEndOfDeclarationMarker(node); default: return ts.visitEachChild(node, moduleExpressionElementVisitor, context); @@ -71448,8 +72460,13 @@ var ts; } for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) { var specifier = _a[_i]; - var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); - statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue)), specifier), specifier)); + if (languageVersion === 0) { + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createCreateBindingHelper(context, generatedName, ts.createLiteral(specifier.propertyName || specifier.name), specifier.propertyName ? ts.createLiteral(specifier.name) : undefined)), specifier), specifier)); + } + else { + var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue, undefined, true)), specifier), specifier)); + } } return ts.singleOrMany(statements); } @@ -71527,7 +72544,7 @@ var ts; } variables = ts.append(variables, variable); } - else if (variable.initializer) { + else { expressions = ts.append(expressions, transformInitializedVariable(variable)); } } @@ -71568,7 +72585,7 @@ var ts; return ts.flattenDestructuringAssignment(ts.visitNode(node, moduleExpressionElementVisitor), undefined, context, 0, false, createAllExportExpressions); } else { - return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name), node.name), ts.visitNode(node.initializer, moduleExpressionElementVisitor)); + return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name), node.name), node.initializer ? ts.visitNode(node.initializer, moduleExpressionElementVisitor) : ts.createVoidZero()); } } function visitMergeDeclarationMarker(node) { @@ -71610,7 +72627,7 @@ var ts; case 257: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; - statements = appendExportsOfDeclaration(statements, importBinding); + statements = appendExportsOfDeclaration(statements, importBinding, true); } break; } @@ -71663,19 +72680,19 @@ var ts; } return statements; } - function appendExportsOfDeclaration(statements, decl) { + function appendExportsOfDeclaration(statements, decl, liveBinding) { var name = ts.getDeclarationName(decl); var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(ts.idText(name)); if (exportSpecifiers) { for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) { var exportSpecifier = exportSpecifiers_1[_i]; - statements = appendExportStatement(statements, exportSpecifier.name, name, exportSpecifier.name); + statements = appendExportStatement(statements, exportSpecifier.name, name, exportSpecifier.name, undefined, liveBinding); } } return statements; } - function appendExportStatement(statements, exportName, expression, location, allowComments) { - statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments)); + function appendExportStatement(statements, exportName, expression, location, allowComments, liveBinding) { + statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); return statements; } function createUnderscoreUnderscoreESModule() { @@ -71695,16 +72712,23 @@ var ts; ts.setEmitFlags(statement, 1048576); return statement; } - function createExportStatement(name, value, location, allowComments) { - var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value)), location); + function createExportStatement(name, value, location, allowComments, liveBinding) { + var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value, undefined, liveBinding)), location); ts.startOnNewLine(statement); if (!allowComments) { ts.setEmitFlags(statement, 1536); } return statement; } - function createExportExpression(name, value, location) { - return ts.setTextRange(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); + function createExportExpression(name, value, location, liveBinding) { + return ts.setTextRange(liveBinding && languageVersion !== 0 ? ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [ + ts.createIdentifier("exports"), + ts.createLiteral(name), + ts.createObjectLiteral([ + ts.createPropertyAssignment("enumerable", ts.createLiteral(true)), + ts.createPropertyAssignment("get", ts.createFunctionExpression(undefined, undefined, undefined, undefined, [], undefined, ts.createBlock([ts.createReturn(value)]))) + ]) + ]) : ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); } function modifierVisitor(node) { switch (node.kind) { @@ -71843,16 +72867,35 @@ var ts; } } ts.transformModule = transformModule; + ts.createBindingHelper = { + name: "typescript:commonjscreatebinding", + importName: "__createBinding", + scoped: false, + priority: 1, + text: "\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));" + }; + function createCreateBindingHelper(context, module, inputName, outputName) { + context.requestEmitHelper(ts.createBindingHelper); + return ts.createCall(ts.getUnscopedHelperName("__createBinding"), undefined, __spreadArrays([ts.createIdentifier("exports"), module, inputName], (outputName ? [outputName] : []))); + } + ts.setModuleDefaultHelper = { + name: "typescript:commonjscreatevalue", + importName: "__setModuleDefault", + scoped: false, + priority: 1, + text: "\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});" + }; var exportStarHelper = { name: "typescript:export-star", - scoped: true, - text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }" + importName: "__exportStar", + scoped: false, + dependencies: [ts.createBindingHelper], + priority: 2, + text: "\n var __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p);\n }" }; function createExportStarHelper(context, module) { - var compilerOptions = context.getCompilerOptions(); - return compilerOptions.importHelpers - ? ts.createCall(ts.getUnscopedHelperName("__exportStar"), undefined, [module, ts.createIdentifier("exports")]) - : ts.createCall(ts.createIdentifier("__export"), undefined, [module]); + context.requestEmitHelper(exportStarHelper); + return ts.createCall(ts.getUnscopedHelperName("__exportStar"), undefined, [module, ts.createIdentifier("exports")]); } var dynamicImportUMDHelper = { name: "typescript:dynamicimport-sync-require", @@ -71863,7 +72906,9 @@ var ts; name: "typescript:commonjsimportstar", importName: "__importStar", scoped: false, - text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};" + dependencies: [ts.createBindingHelper, ts.setModuleDefaultHelper], + priority: 2, + text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};" }; ts.importDefaultHelper = { name: "typescript:commonjsimportdefault", @@ -72141,7 +73186,7 @@ var ts; return ts.singleOrMany(statements); } function visitExportDeclaration(node) { - ts.Debug.assertDefined(node); + ts.Debug.assertIsDefined(node); return undefined; } function visitImportEqualsDeclaration(node) { @@ -72443,9 +73488,9 @@ var ts; return visitCatchClause(node); case 223: return visitBlock(node); - case 327: - return visitMergeDeclarationMarker(node); case 328: + return visitMergeDeclarationMarker(node); + case 329: return visitEndOfDeclarationMarker(node); default: return destructuringAndImportCallVisitor(node); @@ -72826,7 +73871,9 @@ var ts; } function onEmitNode(hint, node, emitCallback) { if (ts.isSourceFile(node)) { - helperNameSubstitutions = ts.createMap(); + if ((ts.isExternalModule(node) || compilerOptions.isolatedModules) && compilerOptions.importHelpers) { + helperNameSubstitutions = ts.createMap(); + } previousOnEmitNode(hint, node, emitCallback); helperNameSubstitutions = undefined; } @@ -73571,7 +74618,7 @@ var ts; ts.forEach(sourceFile.libReferenceDirectives, function (ref) { var lib = host.getLibFileFromReference(ref); if (lib) { - ret.set(ref.fileName.toLocaleLowerCase(), true); + ret.set(ts.toFileNameLowerCase(ref.fileName), true); } }); return ret; @@ -74519,7 +75566,7 @@ var ts; } ts.noEmitNotification = noEmitNotification; function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(330); + var enabledSyntaxKindFeatures = new Array(331); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -74585,6 +75632,7 @@ var ts; transformed: transformed, substituteNode: substituteNode, emitNodeWithNotification: emitNodeWithNotification, + isEmitNotificationEnabled: isEmitNotificationEnabled, dispose: dispose, diagnostics: diagnostics }; @@ -74698,6 +75746,12 @@ var ts; ts.Debug.assert(state > 0, "Cannot modify the transformation context during initialization."); ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed."); ts.Debug.assert(!helper.scoped, "Cannot request a scoped emit helper."); + if (helper.dependencies) { + for (var _i = 0, _a = helper.dependencies; _i < _a.length; _i++) { + var h = _a[_i]; + requestEmitHelper(h); + } + } emitHelpers = ts.append(emitHelpers, helper); } function readEmitHelpers() { @@ -74839,7 +75893,7 @@ var ts; } ts.getOutputExtension = getOutputExtension; function rootDirOfOptions(configFile) { - return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.assertDefined(configFile.options.configFilePath)); + return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.checkDefined(configFile.options.configFilePath)); } function getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, outputDir) { return outputDir ? @@ -74860,7 +75914,7 @@ var ts; ts.fileExtensionIs(inputFileName, ".tsx") && configFile.options.jsx === 1 ? ".jsx" : ".js"); - return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.assertDefined(configFile.options.configFilePath), ignoreCase) !== 0 ? + return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.checkDefined(configFile.options.configFilePath), ignoreCase) !== 0 ? outputFileName : undefined; } @@ -74933,7 +75987,7 @@ var ts; function getFirstProjectOutput(configFile, ignoreCase) { if (configFile.options.outFile || configFile.options.out) { var jsFilePath = getOutputPathsForBundle(configFile.options, false).jsFilePath; - return ts.Debug.assertDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); + return ts.Debug.checkDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); } for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) { var inputFileName = _b[_a]; @@ -75048,6 +76102,7 @@ var ts; var printer = createPrinter(printerOptions, { hasGlobalName: resolver.hasGlobalName, onEmitNode: transform.emitNodeWithNotification, + isEmitNotificationEnabled: transform.isEmitNotificationEnabled, substituteNode: transform.substituteNode, }); ts.Debug.assert(transform.transformed.length === 1, "Should only see one output from the transform"); @@ -75094,6 +76149,7 @@ var ts; var declarationPrinter = createPrinter(printerOptions, { hasGlobalName: resolver.hasGlobalName, onEmitNode: declarationTransform.emitNodeWithNotification, + isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled, substituteNode: declarationTransform.substituteNode, }); var declBlocked = (!!declarationTransform.diagnostics && !!declarationTransform.diagnostics.length) || !!host.isEmitBlocked(declarationFilePath) || !!compilerOptions.noEmit; @@ -75195,7 +76251,7 @@ var ts; var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText); return "data:application/json;base64," + base64SourceMapText; } - var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.assertDefined(sourceMapFilePath))); + var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath))); if (mapOptions.mapRoot) { var sourceMapDir = ts.normalizeSlashes(mapOptions.mapRoot); if (sourceFile) { @@ -75269,7 +76325,7 @@ var ts; sourceFile.statements = ts.createNodeArray(); return sourceFile; }); - var jsBundle = ts.Debug.assertDefined(bundle.js); + var jsBundle = ts.Debug.checkDefined(bundle.js); ts.forEach(jsBundle.sources && jsBundle.sources.prologues, function (prologueInfo) { var sourceFile = sourceFiles[prologueInfo.file]; sourceFile.text = prologueInfo.text; @@ -75285,10 +76341,10 @@ var ts; } function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) { var _a = getOutputPathsForBundle(config.options, false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath; - var buildInfoText = host.readFile(ts.Debug.assertDefined(buildInfoPath)); + var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath)); if (!buildInfoText) return buildInfoPath; - var jsFileText = host.readFile(ts.Debug.assertDefined(jsFilePath)); + var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath)); if (!jsFileText) return jsFilePath; var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath); @@ -75372,7 +76428,7 @@ var ts; function createPrinter(printerOptions, handlers) { if (printerOptions === void 0) { printerOptions = {}; } if (handlers === void 0) { handlers = {}; } - var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; + var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, isEmitNotificationEnabled = handlers.isEmitNotificationEnabled, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; var extendedDiagnostics = !!printerOptions.extendedDiagnostics; var newLine = ts.getNewLineCharacter(printerOptions); var moduleKind = ts.getEmitModuleKind(printerOptions); @@ -75390,7 +76446,7 @@ var ts; var write = writeBase; var isOwnFileEmit; var bundleFileInfo = printerOptions.writeBundleFileInfo ? { sections: [] } : undefined; - var relativeToBuildInfo = bundleFileInfo ? ts.Debug.assertDefined(printerOptions.relativeToBuildInfo) : undefined; + var relativeToBuildInfo = bundleFileInfo ? ts.Debug.checkDefined(printerOptions.relativeToBuildInfo) : undefined; var recordInternalSection = printerOptions.recordInternalSection; var sourceFileTextPos = 0; var sourceFileTextKind = "text"; @@ -75655,12 +76711,15 @@ var ts; return; return pipelineEmit(1, node); } + function emitJsxAttributeValue(node) { + return pipelineEmit(ts.isStringLiteral(node) ? 6 : 4, node); + } function pipelineEmit(emitHint, node) { var savedLastNode = lastNode; var savedLastSubstitution = lastSubstitution; lastNode = node; lastSubstitution = undefined; - var pipelinePhase = getPipelinePhase(0, node); + var pipelinePhase = getPipelinePhase(0, emitHint, node); pipelinePhase(emitHint, node); ts.Debug.assert(lastNode === node); var substitute = lastSubstitution; @@ -75668,14 +76727,14 @@ var ts; lastSubstitution = savedLastSubstitution; return substitute || node; } - function getPipelinePhase(phase, node) { + function getPipelinePhase(phase, emitHint, node) { switch (phase) { case 0: - if (onEmitNode !== ts.noEmitNotification) { + if (onEmitNode !== ts.noEmitNotification && (!isEmitNotificationEnabled || isEmitNotificationEnabled(node))) { return pipelineEmitWithNotification; } case 1: - if (substituteNode !== ts.noEmitSubstitution) { + if (substituteNode !== ts.noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node)) !== node) { return pipelineEmitWithSubstitution; } case 2: @@ -75692,12 +76751,12 @@ var ts; return ts.Debug.assertNever(phase); } } - function getNextPipelinePhase(currentPhase, node) { - return getPipelinePhase(currentPhase + 1, node); + function getNextPipelinePhase(currentPhase, emitHint, node) { + return getPipelinePhase(currentPhase + 1, emitHint, node); } function pipelineEmitWithNotification(hint, node) { ts.Debug.assert(lastNode === node); - var pipelinePhase = getNextPipelinePhase(0, node); + var pipelinePhase = getNextPipelinePhase(0, hint, node); onEmitNode(hint, node, pipelinePhase); ts.Debug.assert(lastNode === node); } @@ -75707,6 +76766,8 @@ var ts; return emitSourceFile(ts.cast(node, ts.isSourceFile)); if (hint === 2) return emitIdentifier(ts.cast(node, ts.isIdentifier)); + if (hint === 6) + return emitLiteral(ts.cast(node, ts.isStringLiteral), true); if (hint === 3) return emitMappedTypeParameter(ts.cast(node, ts.isTypeParameterDeclaration)); if (hint === 5) { @@ -75720,7 +76781,7 @@ var ts; case 15: case 16: case 17: - return emitLiteral(node); + return emitLiteral(node, false); case 292: case 286: return emitUnparsedSourceOrPrepend(node); @@ -75951,27 +77012,28 @@ var ts; return emitSpreadAssignment(node); case 284: return emitEnumMember(node); - case 316: - case 322: - return emitJSDocPropertyLikeTag(node); case 317: - case 319: + case 323: + return emitJSDocPropertyLikeTag(node); case 318: - case 315: + case 320: + case 319: + case 316: return emitJSDocSimpleTypedTag(node); + case 308: case 307: - return emitJSDocAugmentsTag(node); - case 320: - return emitJSDocTemplateTag(node); + return emitJSDocHeritageTag(node); case 321: + return emitJSDocTemplateTag(node); + case 322: return emitJSDocTypedefTag(node); - case 314: + case 315: return emitJSDocCallbackTag(node); case 305: return emitJSDocSignature(node); case 304: return emitJSDocTypeLiteral(node); - case 309: + case 310: case 306: return emitJSDocSimpleTag(node); case 303: @@ -75995,7 +77057,7 @@ var ts; case 10: case 13: case 14: - return emitLiteral(node); + return emitLiteral(node, false); case 75: return emitIdentifier(node); case 91: @@ -76066,9 +77128,9 @@ var ts; return emitJsxSelfClosingElement(node); case 270: return emitJsxFragment(node); - case 325: - return emitPartiallyEmittedExpression(node); case 326: + return emitPartiallyEmittedExpression(node); + case 327: return emitCommaList(node); } } @@ -76082,8 +77144,7 @@ var ts; } function pipelineEmitWithSubstitution(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(1, node); - lastSubstitution = substituteNode(hint, node); + var pipelinePhase = getNextPipelinePhase(1, hint, node); pipelinePhase(hint, lastSubstitution); ts.Debug.assert(lastNode === node || lastSubstitution === node); } @@ -76159,10 +77220,10 @@ var ts; return helpers && ts.stableSort(helpers, ts.compareEmitHelpers); } function emitNumericOrBigIntLiteral(node) { - emitLiteral(node); + emitLiteral(node, false); } - function emitLiteral(node) { - var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape); + function emitLiteral(node, jsxAttributeEscape) { + var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape); if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 10 || ts.isTemplateLiteralKind(node.kind))) { writeLiteral(text); @@ -76590,7 +77651,7 @@ var ts; function mayNeedDotDotForPropertyAccess(expression) { expression = ts.skipPartiallyEmittedExpressions(expression); if (ts.isNumericLiteral(expression)) { - var text = getLiteralTextOfNode(expression, true); + var text = getLiteralTextOfNode(expression, true, false); return !expression.numericLiteralFlags && !ts.stringContains(text, ts.tokenToString(24)); } else if (ts.isAccessExpression(expression)) { @@ -76690,17 +77751,57 @@ var ts; writeTokenText(node.operator, writeOperator); } function emitBinaryExpression(node) { - var isCommaOperator = node.operatorToken.kind !== 27; - var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); - var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); - emitExpression(node.left); - increaseIndentIf(indentBeforeOperator, isCommaOperator); - emitLeadingCommentsOfPosition(node.operatorToken.pos); - writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 ? writeKeyword : writeOperator); - emitTrailingCommentsOfPosition(node.operatorToken.end, true); - increaseIndentIf(indentAfterOperator, true); - emitExpression(node.right); - decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + var nodeStack = [node]; + var stateStack = [0]; + var stackIndex = 0; + while (stackIndex >= 0) { + node = nodeStack[stackIndex]; + switch (stateStack[stackIndex]) { + case 0: { + maybePipelineEmitExpression(node.left); + break; + } + case 1: { + var isCommaOperator = node.operatorToken.kind !== 27; + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + increaseIndentIf(indentBeforeOperator, isCommaOperator); + emitLeadingCommentsOfPosition(node.operatorToken.pos); + writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 ? writeKeyword : writeOperator); + emitTrailingCommentsOfPosition(node.operatorToken.end, true); + increaseIndentIf(indentAfterOperator, true); + maybePipelineEmitExpression(node.right); + break; + } + case 2: { + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + stackIndex--; + break; + } + default: return ts.Debug.fail("Invalid state " + stateStack[stackIndex] + " for emitBinaryExpressionWorker"); + } + } + function maybePipelineEmitExpression(next) { + stateStack[stackIndex]++; + var savedLastNode = lastNode; + var savedLastSubstitution = lastSubstitution; + lastNode = next; + lastSubstitution = undefined; + var pipelinePhase = getPipelinePhase(0, 1, next); + if (pipelinePhase === pipelineEmitWithHint && ts.isBinaryExpression(next)) { + stackIndex++; + stateStack[stackIndex] = 0; + nodeStack[stackIndex] = next; + } + else { + pipelinePhase(1, next); + } + ts.Debug.assert(lastNode === next); + lastNode = savedLastNode; + lastSubstitution = savedLastSubstitution; + } } function emitConditionalExpression(node) { var indentBeforeQuestion = needsIndentation(node, node.condition, node.questionToken); @@ -76893,11 +77994,11 @@ var ts; var node = ts.getParseTreeNode(contextNode); var isSimilarNode = node && node.kind === contextNode.kind; var startPos = pos; - if (isSimilarNode) { + if (isSimilarNode && currentSourceFile) { pos = ts.skipTrivia(currentSourceFile.text, pos); } if (emitLeadingCommentsOfPosition && isSimilarNode && contextNode.pos !== startPos) { - var needsIndent = indentLeading && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); + var needsIndent = indentLeading && currentSourceFile && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); if (needsIndent) { increaseIndent(); } @@ -77356,7 +78457,7 @@ var ts; } function emitJsxAttribute(node) { emit(node.name); - emitNodeWithPrefix("=", writePunctuation, node.initializer, emit); + emitNodeWithPrefix("=", writePunctuation, node.initializer, emitJsxAttributeValue); } function emitJsxSpreadAttribute(node) { writePunctuation("{..."); @@ -77466,7 +78567,7 @@ var ts; } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 319 && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 320 && !node.comment) { writeSpace(); emit(node.tags[0]); } @@ -77482,7 +78583,7 @@ var ts; emitJSDocTypeExpression(tag.typeExpression); emitJSDocComment(tag.comment); } - function emitJSDocAugmentsTag(tag) { + function emitJSDocHeritageTag(tag) { emitJSDocTagName(tag.tagName); writeSpace(); writePunctuation("{"); @@ -78271,19 +79372,19 @@ var ts; } return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node, includeTrivia); } - function getLiteralTextOfNode(node, neverAsciiEscape) { + function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) { if (node.kind === 10 && node.textSourceNode) { var textSourceNode = node.textSourceNode; if (ts.isIdentifier(textSourceNode)) { - return neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? - "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : - "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; + return jsxAttributeEscape ? "\"" + ts.escapeJsxAttributeString(getTextOfNode(textSourceNode)) + "\"" : + neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : + "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; } else { - return getLiteralTextOfNode(textSourceNode, neverAsciiEscape); + return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape); } } - return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape); + return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape, jsxAttributeEscape); } function pushNameGenerationScope(node) { if (node && ts.getEmitFlags(node) & 524288) { @@ -78589,7 +79690,7 @@ var ts; hasWrittenComment = false; var emitFlags = ts.getEmitFlags(node); var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end; - var isEmittedNode = node.kind !== 324; + var isEmittedNode = node.kind !== 325; var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0 || node.kind === 11; var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0 || node.kind === 11; var savedContainerPos = containerPos; @@ -78611,7 +79712,7 @@ var ts; } ts.forEach(ts.getSyntheticLeadingComments(node), emitLeadingSynthesizedComment); exitComment(); - var pipelinePhase = getNextPipelinePhase(2, node); + var pipelinePhase = getNextPipelinePhase(2, hint, node); if (emitFlags & 2048) { commentsDisabled = true; pipelinePhase(hint, node); @@ -78826,7 +79927,7 @@ var ts; } function pipelineEmitWithSourceMap(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(3, node); + var pipelinePhase = getNextPipelinePhase(3, hint, node); if (ts.isUnparsedSource(node) || ts.isUnparsedPrepend(node)) { pipelinePhase(hint, node); } @@ -78840,7 +79941,7 @@ var ts; else { var _a = ts.getSourceMapRange(node), pos = _a.pos, end = _a.end, _b = _a.source, source = _b === void 0 ? sourceMapSource : _b; var emitFlags = ts.getEmitFlags(node); - if (node.kind !== 324 + if (node.kind !== 325 && (emitFlags & 16) === 0 && pos >= 0) { emitSourcePos(source, skipSourceTrivia(source, pos)); @@ -78853,7 +79954,7 @@ var ts; else { pipelinePhase(hint, node); } - if (node.kind !== 324 + if (node.kind !== 325 && (emitFlags & 32) === 0 && end >= 0) { emitSourcePos(source, end); @@ -79558,12 +80659,6 @@ var ts; return formatStyle + text + resetEscapeSequence; } ts.formatColorAndReset = formatColorAndReset; - function padLeft(s, length) { - while (s.length < length) { - s = " " + s; - } - return s; - } function formatCodeSpan(file, start, length, indent, squiggleColor, host) { var _a = ts.getLineAndCharacterOfPosition(file, start), firstLine = _a.line, firstLineChar = _a.character; var _b = ts.getLineAndCharacterOfPosition(file, start + length), lastLine = _b.line, lastLineChar = _b.character; @@ -79577,7 +80672,7 @@ var ts; for (var i = firstLine; i <= lastLine; i++) { context += host.getNewLine(); if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) { - context += indent + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); + context += indent + formatColorAndReset(ts.padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); i = lastLine - 1; } var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0); @@ -79585,9 +80680,9 @@ var ts; var lineContent = file.text.slice(lineStart, lineEnd); lineContent = lineContent.replace(/\s+$/g, ""); lineContent = lineContent.replace("\t", " "); - context += indent + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; context += lineContent + host.getNewLine(); - context += indent + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; context += squiggleColor; if (i === firstLine) { var lastCharForLine = i === lastLine ? lastLineChar : undefined; @@ -79728,7 +80823,7 @@ var ts; hasInvalidatedResolution(sourceFile.path); } function sourceFileVersionUptoDate(sourceFile) { - return sourceFile.version === getSourceVersion(sourceFile.resolvedPath); + return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName); } function projectReferenceUptoDate(oldRef, newRef, index) { if (!ts.projectReferenceIsEqualTo(oldRef, newRef)) { @@ -79810,10 +80905,10 @@ var ts; var hasEmitBlockingDiagnostics = ts.createMap(); var _compilerOptionsObjectLiteralSyntax; var moduleResolutionCache; - var resolveModuleNamesWorker; + var actualResolveModuleNamesWorker; var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse; if (host.resolveModuleNames) { - resolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.assertEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { + actualResolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.checkEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { if (!resolved || resolved.extension !== undefined) { return resolved; } @@ -79825,15 +80920,15 @@ var ts; else { moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); }, options); var loader_1 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache, redirectedReference).resolvedModule; }; - resolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; + actualResolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; } - var resolveTypeReferenceDirectiveNamesWorker; + var actualResolveTypeReferenceDirectiveNamesWorker; if (host.resolveTypeReferenceDirectives) { - resolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.assertEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; } else { var loader_2 = function (typesRef, containingFile, redirectedReference) { return ts.resolveTypeReferenceDirective(typesRef, containingFile, options, host, redirectedReference).resolvedTypeReferenceDirective; }; - resolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; } var packageIdToSourceFile = ts.createMap(); var sourceFileToPackageName = ts.createMap(); @@ -79966,6 +81061,7 @@ var ts; getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); }, getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); }, getTypeCount: function () { return getDiagnosticsProducingTypeChecker().getTypeCount(); }, + getInstantiationCount: function () { return getDiagnosticsProducingTypeChecker().getInstantiationCount(); }, getRelationCacheSizes: function () { return getDiagnosticsProducingTypeChecker().getRelationCacheSizes(); }, getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; }, getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; }, @@ -79993,6 +81089,20 @@ var ts; ts.performance.mark("afterProgram"); ts.performance.measure("Program", "beforeProgram", "afterProgram"); return program; + function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference) { + ts.performance.mark("beforeResolveModule"); + var result = actualResolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference); + ts.performance.mark("afterResolveModule"); + ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule"); + return result; + } + function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference) { + ts.performance.mark("beforeResolveTypeReference"); + var result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference); + ts.performance.mark("afterResolveTypeReference"); + ts.performance.measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"); + return result; + } function compareDefaultLibFiles(a, b) { return ts.compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b)); } @@ -80050,13 +81160,13 @@ var ts; } var oldSourceFile = oldProgram && oldProgram.getSourceFile(containingFile); if (oldSourceFile !== file && file.resolvedModules) { - var result_8 = []; + var result_9 = []; for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { var moduleName = moduleNames_1[_i]; var resolvedModule = file.resolvedModules.get(moduleName); - result_8.push(resolvedModule); + result_9.push(resolvedModule); } - return result_8; + return result_9; } var unknownModuleNames; var result; @@ -80277,7 +81387,7 @@ var ts; newSourceFile.resolvedModules = oldSourceFile.resolvedModules; } if (resolveTypeReferenceDirectiveNamesWorker) { - var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); var resolutions_1 = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFilePath, getResolvedProjectReferenceToRedirect(newSourceFile.originalFileName)); var resolutionsChanged_1 = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions_1, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo); if (resolutionsChanged_1) { @@ -80545,17 +81655,17 @@ var ts; function getJSSyntacticDiagnosticsForFile(sourceFile) { return runWithCancellationToken(function () { var diagnostics = []; - var parent = sourceFile; - walk(sourceFile); + walk(sourceFile, sourceFile); + ts.forEachChildRecursively(sourceFile, walk, walkArray); return diagnostics; - function walk(node) { + function walk(node, parent) { switch (parent.kind) { case 156: case 159: case 161: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); - return; + return "skip"; } case 160: case 162: @@ -80567,70 +81677,66 @@ var ts; case 242: if (parent.type === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } } switch (node.kind) { case 255: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node.parent, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); - return; + return "skip"; } break; case 260: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); - return; + return "skip"; } break; case 253: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 259: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 279: var heritageClause = node; if (heritageClause.token === 113) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 246: var interfaceKeyword = ts.tokenToString(114); - ts.Debug.assertDefined(interfaceKeyword); + ts.Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); - return; + return "skip"; case 249: var moduleKeyword = node.flags & 16 ? ts.tokenToString(136) : ts.tokenToString(135); - ts.Debug.assertDefined(moduleKeyword); + ts.Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); - return; + return "skip"; case 247: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 248: - var enumKeyword = ts.Debug.assertDefined(ts.tokenToString(88)); + var enumKeyword = ts.Debug.checkDefined(ts.tokenToString(88)); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); - return; + return "skip"; case 218: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 217: diagnostics.push(createDiagnosticForNode(node.type, ts.Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 199: ts.Debug.fail(); } - var prevParent = parent; - parent = node; - ts.forEachChild(node, walk, walkArray); - parent = prevParent; } - function walkArray(nodes) { + function walkArray(nodes, parent) { if (parent.decorators === nodes && !options.experimentalDecorators) { diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)); } @@ -80646,11 +81752,12 @@ var ts; case 202: if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } case 225: if (nodes === parent.modifiers) { - return checkModifiers(parent.modifiers, parent.kind === 225); + checkModifiers(parent.modifiers, parent.kind === 225); + return "skip"; } break; case 159: @@ -80661,13 +81768,13 @@ var ts; diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, ts.tokenToString(modifier.kind))); } } - return; + return "skip"; } break; case 156: if (nodes === parent.modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 196: @@ -80678,14 +81785,10 @@ var ts; case 198: if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; } - for (var _b = 0, nodes_6 = nodes; _b < nodes_6.length; _b++) { - var node = nodes_6[_b]; - walk(node); - } } function checkModifiers(modifiers, isConstValid) { for (var _i = 0, modifiers_1 = modifiers; _i < modifiers_1.length; _i++) { @@ -80871,7 +81974,7 @@ var ts; } } function getLibFileFromReference(ref) { - var libName = ref.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(ref.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { return getSourceFile(ts.combinePaths(defaultLibraryPath, libFileName)); @@ -81056,7 +82159,7 @@ var ts; file.originalFileName = originalFileName; addFileToRefFileMap(fileName, file, refFile); if (host.useCaseSensitiveFileNames()) { - var pathLowerCase = path.toLowerCase(); + var pathLowerCase = ts.toFileNameLowerCase(path); var existingFile = filesByNameIgnoreCase.get(pathLowerCase); if (existingFile) { reportFileNamesDifferOnlyInCasingError(fileName, existingFile, refFile); @@ -81212,7 +82315,7 @@ var ts; }); } function processTypeReferenceDirectives(file) { - var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); if (!typeDirectives) { return; } @@ -81220,7 +82323,7 @@ var ts; for (var i = 0; i < typeDirectives.length; i++) { var ref = file.typeReferenceDirectives[i]; var resolvedTypeReferenceDirective = resolutions[i]; - var fileName = ref.fileName.toLocaleLowerCase(); + var fileName = ts.toFileNameLowerCase(ref.fileName); ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective); processTypeReferenceDirective(fileName, resolvedTypeReferenceDirective, { kind: ts.RefFileKind.TypeReferenceDirective, @@ -81274,7 +82377,7 @@ var ts; } function processLibReferenceDirectives(file) { ts.forEach(file.libReferenceDirectives, function (libReference) { - var libName = libReference.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(libReference.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { processRootFile(ts.combinePaths(defaultLibraryPath, libFileName), true, true); @@ -81393,7 +82496,7 @@ var ts; projectReferenceRedirects.set(sourceFilePath, false); return undefined; } - sourceFile = ts.Debug.assertDefined(commandLine.options.configFile); + sourceFile = ts.Debug.checkDefined(commandLine.options.configFile); ts.Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath); addFileToFilesByName(sourceFile, sourceFilePath, undefined); } @@ -81457,6 +82560,9 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } + if (!options.listFilesOnly && options.noEmit && ts.isIncrementalCompilation(options)) { + createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); + } verifyProjectReferences(); if (options.composite) { var rootPaths = ts.arrayToSet(rootNames, toPath); @@ -81621,7 +82727,7 @@ var ts; chain = ts.chainDiagnosticMessages(chain, ts.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file, emitFileName); blockEmittingOfFile(emitFileName, ts.createCompilerDiagnosticFromMessageChain(chain)); } - var emitFileKey = !host.useCaseSensitiveFileNames() ? emitFilePath.toLocaleLowerCase() : emitFilePath; + var emitFileKey = !host.useCaseSensitiveFileNames() ? ts.toFileNameLowerCase(emitFilePath) : emitFilePath; if (emitFilesSeen.has(emitFileKey)) { blockEmittingOfFile(emitFileName, ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files, emitFileName)); } @@ -81637,7 +82743,7 @@ var ts; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } - var refFile = ts.Debug.assertDefined(getSourceFileByPath(refPathToReportErrorOn.file)); + var refFile = ts.Debug.checkDefined(getSourceFileByPath(refPathToReportErrorOn.file)); var kind = refPathToReportErrorOn.kind, index = refPathToReportErrorOn.index; var pos, end; switch (kind) { @@ -81851,7 +82957,7 @@ var ts; return { fileExists: function (f) { return directoryStructureHost.fileExists(f); }, readDirectory: function (root, extensions, excludes, includes, depth) { - ts.Debug.assertDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + ts.Debug.assertIsDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: function (f) { return directoryStructureHost.readFile(f); }, @@ -82030,7 +83136,7 @@ var ts; var useOldState = canReuseOldState(referencedMap, oldState); for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) { var sourceFile = _a[_i]; - var version_1 = ts.Debug.assertDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); + var version_1 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined; if (referencedMap) { var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName); @@ -82434,7 +83540,7 @@ var ts; if (nextKey.done) { return undefined; } - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var compilerOptions = program.getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); @@ -82455,10 +83561,10 @@ var ts; if (affectedFilesPendingEmit) { var seenEmittedFiles = state.seenEmittedFiles || (state.seenEmittedFiles = ts.createMap()); for (var i = state.affectedFilesPendingEmitIndex; i < affectedFilesPendingEmit.length; i++) { - var affectedFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); + var affectedFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); if (affectedFile) { var seenKind = seenEmittedFiles.get(affectedFile.resolvedPath); - var emitKind = ts.Debug.assertDefined(ts.Debug.assertDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); + var emitKind = ts.Debug.checkDefined(ts.Debug.checkDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); if (seenKind === undefined || seenKind < emitKind) { state.affectedFilesPendingEmitIndex = i; return { affectedFile: affectedFile, emitKind: emitKind }; @@ -82476,7 +83582,7 @@ var ts; if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) { if (!state.cleanedDiagnosticsOfLibFiles) { state.cleanedDiagnosticsOfLibFiles = true; - var program_1 = ts.Debug.assertDefined(state.program); + var program_1 = ts.Debug.checkDefined(state.program); var options_2 = program_1.getCompilerOptions(); ts.forEach(program_1.getSourceFiles(), function (f) { return program_1.isSourceFileDefaultLibrary(f) && @@ -82493,10 +83599,10 @@ var ts; function handleDtsMayChangeOf(state, path, cancellationToken, computeHash) { removeSemanticDiagnosticsOf(state, path); if (!state.changedFilesSet.has(path)) { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var sourceFile = program.getSourceFileByPath(path); if (sourceFile) { - ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.assertDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); + ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); if (ts.getEmitDeclarations(state.compilerOptions)) { addToAffectedFilesPendingEmit(state, path, 0); } @@ -82513,8 +83619,8 @@ var ts; return !state.semanticDiagnosticsFromOldState.size; } function isChangedSignagure(state, path) { - var newSignature = ts.Debug.assertDefined(state.currentAffectedFilesSignatures).get(path); - var oldSignagure = ts.Debug.assertDefined(state.fileInfos.get(path)).signature; + var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path); + var oldSignagure = ts.Debug.checkDefined(state.fileInfos.get(path)).signature; return newSignature !== oldSignagure; } function forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, fn) { @@ -82533,7 +83639,7 @@ var ts; seenFileNamesMap.set(currentPath, true); var result = fn(state, currentPath); if (result && isChangedSignagure(state, currentPath)) { - var currentSourceFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(currentPath); + var currentSourceFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(currentPath); queue.push.apply(queue, ts.BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath)); } } @@ -82617,7 +83723,7 @@ var ts; return { result: result, affected: affected }; } function getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken) { - return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.assertDefined(state.program).getProgramDiagnostics(sourceFile)); + return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.checkDefined(state.program).getProgramDiagnostics(sourceFile)); } function getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken) { var path = sourceFile.resolvedPath; @@ -82627,7 +83733,7 @@ var ts; return cachedDiagnostics; } } - var diagnostics = ts.Debug.assertDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); + var diagnostics = ts.Debug.checkDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); if (state.semanticDiagnosticsPerFile) { state.semanticDiagnosticsPerFile.set(path, diagnostics); } @@ -82636,7 +83742,7 @@ var ts; function getProgramBuildInfo(state, getCanonicalFileName) { if (state.compilerOptions.outFile || state.compilerOptions.out) return undefined; - var currentDirectory = ts.Debug.assertDefined(state.program).getCurrentDirectory(); + var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory(); var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory)); var fileInfos = {}; state.fileInfos.forEach(function (value, key) { @@ -82791,10 +83897,10 @@ var ts; backupState = cloneBuilderProgramState(state); }; builderProgram.restoreState = function () { - state = ts.Debug.assertDefined(backupState); + state = ts.Debug.checkDefined(backupState); backupState = undefined; }; - builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.assertDefined(state.program), sourceFile); }; + builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); }; builderProgram.getSemanticDiagnostics = getSemanticDiagnostics; builderProgram.emit = emit; builderProgram.releaseProgram = function () { @@ -82823,20 +83929,20 @@ var ts; if (state.emittedBuildInfo) { return undefined; } - var affected_1 = ts.Debug.assertDefined(state.program); + var affected_1 = ts.Debug.checkDefined(state.program); return toAffectedFileEmitResult(state, affected_1.emitBuildInfo(writeFile || ts.maybeBind(host, host.writeFile), cancellationToken), affected_1, 1, false, true); } (affected = pendingAffectedFile.affectedFile, emitKind = pendingAffectedFile.emitKind); isPendingEmitFile = true; } else { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); if (state.programEmitComplete) return undefined; affected = program; } } - return toAffectedFileEmitResult(state, ts.Debug.assertDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile); + return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile); } function emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) { if (kind === BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram) { @@ -82864,7 +83970,7 @@ var ts; }; } } - return ts.Debug.assertDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); + return ts.Debug.checkDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); } function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) { while (true) { @@ -82887,10 +83993,10 @@ var ts; } function getSemanticDiagnostics(sourceFile, cancellationToken) { assertSourceFileOkWithoutNextAffectedCall(state, sourceFile); - var compilerOptions = ts.Debug.assertDefined(state.program).getCompilerOptions(); + var compilerOptions = ts.Debug.checkDefined(state.program).getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); - return ts.Debug.assertDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); + return ts.Debug.checkDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); } if (sourceFile) { return getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken); @@ -82898,7 +84004,7 @@ var ts; while (getSemanticDiagnosticsOfNextAffectedFile(cancellationToken)) { } var diagnostics; - for (var _i = 0, _a = ts.Debug.assertDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { + for (var _i = 0, _a = ts.Debug.checkDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { var sourceFile_1 = _a[_i]; diagnostics = ts.addRange(diagnostics, getSemanticDiagnosticsOfFile(state, sourceFile_1, cancellationToken)); } @@ -83000,7 +84106,7 @@ var ts; close: ts.noop, }; function getProgram() { - return ts.Debug.assertDefined(state.program); + return ts.Debug.checkDefined(state.program); } } ts.createRedirectedBuilderProgram = createRedirectedBuilderProgram; @@ -83085,6 +84191,7 @@ var ts; var directoryWatchesOfFailedLookups = ts.createMap(); var rootDir = rootDirForResolution && ts.removeTrailingDirectorySeparator(ts.getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory())); var rootPath = (rootDir && resolutionHost.toPath(rootDir)); + var rootSplitLength = rootPath !== undefined ? rootPath.split(ts.directorySeparator).length : 0; var typeRootsWatches = ts.createMap(); return { startRecordingFilesWithChangedResolutions: startRecordingFilesWithChangedResolutions, @@ -83175,7 +84282,7 @@ var ts; } var globalCache = resolutionHost.getGlobalCache(); if (globalCache !== undefined && !ts.isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && ts.extensionIsTS(primaryResult.resolvedModule.extension))) { - var _a = ts.loadModuleFromGlobalCache(ts.Debug.assertDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; + var _a = ts.loadModuleFromGlobalCache(ts.Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; if (resolvedModule) { return { resolvedModule: resolvedModule, failedLookupLocations: ts.addRange(primaryResult.failedLookupLocations, failedLookupLocations) }; } @@ -83274,13 +84381,21 @@ var ts; function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath) { if (isInDirectoryPath(rootPath, failedLookupLocationPath)) { failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory()); - ts.Debug.assert(failedLookupLocation.length === failedLookupLocationPath.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); - var subDirectoryInRoot = failedLookupLocationPath.indexOf(ts.directorySeparator, rootPath.length + 1); - if (subDirectoryInRoot !== -1) { - return { dir: failedLookupLocation.substr(0, subDirectoryInRoot), dirPath: failedLookupLocationPath.substr(0, subDirectoryInRoot) }; + var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator); + var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator); + ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); + if (failedLookupPathSplit.length > rootSplitLength + 1) { + return { + dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator), + dirPath: failedLookupPathSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator) + }; } else { - return { dir: rootDir, dirPath: rootPath, nonRecursive: false }; + return { + dir: rootDir, + dirPath: rootPath, + nonRecursive: false + }; } } return getDirectoryToWatchFromFailedLookupLocationDirectory(ts.getDirectoryPath(ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory())), ts.getDirectoryPath(failedLookupLocationPath)); @@ -83470,7 +84585,7 @@ var ts; if (!resolution.isInvalidated && isInvalidatedResolution(resolution, getResolutionWithResolvedFileName)) { resolution.isInvalidated = true; (filesWithInvalidatedResolutions || (filesWithInvalidatedResolutions = ts.createMap())).set(containingFilePath, true); - if (containingFilePath.endsWith(ts.inferredTypesContainingFile)) { + if (ts.endsWith(containingFilePath, ts.inferredTypesContainingFile)) { resolutionHost.onChangedAutomaticTypeDirectiveNames(); } } @@ -84858,7 +85973,7 @@ var ts; if (!compilerHost.resolveModuleNames) { var loader_3 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference).resolvedModule; }; compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference) { - return ts.loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_3); + return ts.loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_3); }; } var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchFilePath = _a.watchFilePath, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog; @@ -85235,7 +86350,7 @@ var ts; if (state.options.verbose) reportStatus(state, ts.Diagnostics.Building_project_0, project); if (config.fileNames.length === 0) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); buildResult = BuildResultFlags.None; step = Step.QueueReferencingProjects; return; @@ -85243,7 +86358,7 @@ var ts; var host = state.host, compilerHost = state.compilerHost; state.projectCompilerOptions = config.options; updateModuleResolutionCache(state, project, config); - program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), config.errors, config.projectReferences); + program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences); step++; } function handleDiagnostics(diagnostics, errorFlags, errorType) { @@ -85256,14 +86371,14 @@ var ts; } } function getSyntaxDiagnostics(cancellationToken) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); handleDiagnostics(__spreadArrays(program.getConfigFileParsingDiagnostics(), program.getOptionsDiagnostics(cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSyntacticDiagnostics(undefined, cancellationToken)), BuildResultFlags.SyntaxErrors, "Syntactic"); } function getSemanticDiagnostics(cancellationToken) { - handleDiagnostics(ts.Debug.assertDefined(program).getSemanticDiagnostics(undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); + handleDiagnostics(ts.Debug.checkDefined(program).getSemanticDiagnostics(undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); } function emit(writeFileCallback, cancellationToken, customTransformers) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); ts.Debug.assert(step === Step.Emit); program.backupState(); var declDiagnostics; @@ -85385,11 +86500,11 @@ var ts; emitBundle(writeFile, customTransformers); break; case Step.BuildInvalidatedProjectOfBundle: - ts.Debug.assertDefined(invalidatedProjectOfBundle).done(cancellationToken); + ts.Debug.checkDefined(invalidatedProjectOfBundle).done(cancellationToken); step = Step.Done; break; case Step.QueueReferencingProjects: - queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.assertDefined(buildResult)); + queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.checkDefined(buildResult)); step++; break; case Step.Done: @@ -85405,7 +86520,7 @@ var ts; if (status.type !== ts.UpToDateStatusType.OutOfDateWithPrepend || options.force) return true; return config.fileNames.length === 0 || - !!config.errors.length || + !!ts.getConfigFileParsingDiagnostics(config).length || !ts.isIncrementalCompilation(config.options); } function getNextInvalidatedProject(state, buildOrder, reportQueue) { @@ -85450,7 +86565,7 @@ var ts; verboseReportProjectStatus(state, project, status); if (!options.force) { if (status.type === ts.UpToDateStatusType.UpToDate) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); if (options.dry) { reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date, project); @@ -85458,12 +86573,12 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); return createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder); } } if (status.type === ts.UpToDateStatusType.UpstreamBlocked) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); if (options.verbose) { reportStatus(state, status.upstreamProjectBlocked ? @@ -85473,7 +86588,7 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.ContainerOnly) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); continue; } @@ -86151,18 +87266,6 @@ var ts; } return options.pretty; } - function padLeft(s, length) { - while (s.length < length) { - s = " " + s; - } - return s; - } - function padRight(s, length) { - while (s.length < length) { - s = s + " "; - } - return s; - } function getOptionsForHelp(commandLine) { return !!commandLine.options.all ? ts.sort(ts.optionDeclarations, function (a, b) { return ts.compareStringsCaseInsensitive(a.name, b.name); }) : @@ -86311,13 +87414,12 @@ var ts; if (commandLine.fileNames.length === 0 && !configFileName) { if (commandLine.options.showConfig) { reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0, ts.normalizePath(sys.getCurrentDirectory()))); - return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } else { printVersion(sys); printHelp(sys, getOptionsForHelp(commandLine)); - return sys.exit(ts.ExitStatus.Success); } + return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } var currentDirectory = sys.getCurrentDirectory(); var commandLineOptions = ts.convertToOptionsWithAbsolutePaths(commandLine.options, function (fileName) { return ts.getNormalizedAbsolutePath(fileName, currentDirectory); }); @@ -86544,6 +87646,7 @@ var ts; reportCountStatistic("Identifiers", program.getIdentifierCount()); reportCountStatistic("Symbols", program.getSymbolCount()); reportCountStatistic("Types", program.getTypeCount()); + reportCountStatistic("Instantiations", program.getInstantiationCount()); if (memoryUsed >= 0) { reportStatisticalValue("Memory used", Math.round(memoryUsed / 1000) + "K"); } @@ -86585,7 +87688,7 @@ var ts; } for (var _b = 0, statistics_2 = statistics; _b < statistics_2.length; _b++) { var _c = statistics_2[_b], name = _c.name, value = _c.value; - sys.write(padRight(name + ":", nameSize + 2) + padLeft(value.toString(), valueSize) + sys.newLine); + sys.write(ts.padRight(name + ":", nameSize + 2) + ts.padLeft(value.toString(), valueSize) + sys.newLine); } } function reportStatisticalValue(name, value) { diff --git a/lib/tsserver.js b/lib/tsserver.js index c9e6eac45e5dc..42114ba77152d 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ @@ -92,7 +92,7 @@ var ts; (function (ts) { // WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configurePrerelease` too. - ts.versionMajorMinor = "3.8"; + ts.versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ ts.version = ts.versionMajorMinor + ".0-dev"; /** @@ -1389,6 +1389,46 @@ var ts; /** Returns lower case string */ function toLowerCase(x) { return x.toLowerCase(); } ts.toLowerCase = toLowerCase; + // We convert the file names to lower case as key for file name on case insensitive file system + // While doing so we need to handle special characters (eg \u0130) to ensure that we dont convert + // it to lower case, fileName with its lowercase form can exist along side it. + // Handle special characters and make those case sensitive instead + // + // |-#--|-Unicode--|-Char code-|-Desc-------------------------------------------------------------------| + // | 1. | i | 105 | Ascii i | + // | 2. | I | 73 | Ascii I | + // |-------- Special characters ------------------------------------------------------------------------| + // | 3. | \u0130 | 304 | Uppper case I with dot above | + // | 4. | i,\u0307 | 105,775 | i, followed by 775: Lower case of (3rd item) | + // | 5. | I,\u0307 | 73,775 | I, followed by 775: Upper case of (4th item), lower case is (4th item) | + // | 6. | \u0131 | 305 | Lower case i without dot, upper case is I (2nd item) | + // | 7. | \u00DF | 223 | Lower case sharp s | + // + // Because item 3 is special where in its lowercase character has its own + // upper case form we cant convert its case. + // Rest special characters are either already in lower case format or + // they have corresponding upper case character so they dont need special handling + // + // But to avoid having to do string building for most common cases, also ignore + // a-z, 0-9, \u0131, \u00DF, \, /, ., : and space + var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; + /** + * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - \u0130) + * This function is used in places where we want to make file name as a key on these systems + * It is possible on mac to be able to refer to file name with I with dot on top as a fileName with its lower case form + * But on windows we cannot. Windows can have fileName with I with dot on top next to its lower case and they can not each be referred with the lowercase forms + * Technically we would want this function to be platform sepcific as well but + * our api has till now only taken caseSensitive as the only input and just for some characters we dont want to update API and ensure all customers use those api + * We could use upper case and we would still need to deal with the descripencies but + * we want to continue using lower case since in most cases filenames are lowercasewe and wont need any case changes and avoid having to store another string for the key + * So for this function purpose, we go ahead and assume character I with dot on top it as case sensitive since its very unlikely to use lower case form of that special character + */ + function toFileNameLowerCase(x) { + return fileNameLowerCaseRegExp.test(x) ? + x.replace(fileNameLowerCaseRegExp, toLowerCase) : + x; + } + ts.toFileNameLowerCase = toFileNameLowerCase; /** Throws an error because a function is not implemented. */ function notImplemented() { throw new Error("Not implemented"); @@ -1817,7 +1857,7 @@ var ts; return false; } function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toLowerCase; + return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; } ts.createGetCanonicalFileName = createGetCanonicalFileName; function patternText(_a) { @@ -1974,84 +2014,192 @@ var ts; } } } + function padLeft(s, length) { + while (s.length < length) { + s = " " + s; + } + return s; + } + ts.padLeft = padLeft; + function padRight(s, length) { + while (s.length < length) { + s = s + " "; + } + return s; + } + ts.padRight = padRight; })(ts || (ts = {})); /* @internal */ var ts; (function (ts) { var Debug; (function (Debug) { - /* eslint-disable prefer-const */ - Debug.currentAssertionLevel = 0 /* None */; + var currentAssertionLevel = 0 /* None */; + // eslint-disable-next-line prefer-const Debug.isDebugging = false; - /* eslint-enable prefer-const */ + var assertionCache = {}; + function getAssertionLevel() { + return currentAssertionLevel; + } + Debug.getAssertionLevel = getAssertionLevel; + function setAssertionLevel(level) { + var prevAssertionLevel = currentAssertionLevel; + currentAssertionLevel = level; + if (level > prevAssertionLevel) { + // restore assertion functions for the current assertion level (see `shouldAssertFunction`). + for (var _i = 0, _a = ts.getOwnKeys(assertionCache); _i < _a.length; _i++) { + var key = _a[_i]; + var cachedFunc = assertionCache[key]; + if (cachedFunc !== undefined && Debug[key] !== cachedFunc.assertion && level >= cachedFunc.level) { + Debug[key] = cachedFunc; + assertionCache[key] = undefined; + } + } + } + } + Debug.setAssertionLevel = setAssertionLevel; function shouldAssert(level) { - return Debug.currentAssertionLevel >= level; + return currentAssertionLevel >= level; } Debug.shouldAssert = shouldAssert; + /** + * Tests whether an assertion function should be executed. If it shouldn't, it is cached and replaced with `ts.noop`. + * Replaced assertion functions are restored when `Debug.setAssertionLevel` is set to a high enough level. + * @param level The minimum assertion level required. + * @param name The name of the current assertion function. + */ + function shouldAssertFunction(level, name) { + if (!shouldAssert(level)) { + assertionCache[name] = { level: level, assertion: Debug[name] }; + Debug[name] = ts.noop; + return false; + } + return true; + } + function fail(message, stackCrawlMark) { + debugger; + var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); + if (Error.captureStackTrace) { + Error.captureStackTrace(e, stackCrawlMark || fail); + } + throw e; + } + Debug.fail = fail; + function failBadSyntaxKind(node, message, stackCrawlMark) { + return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", stackCrawlMark || failBadSyntaxKind); + } + Debug.failBadSyntaxKind = failBadSyntaxKind; function assert(expression, message, verboseDebugInfo, stackCrawlMark) { if (!expression) { + message = message ? "False expression: " + message : "False expression."; if (verboseDebugInfo) { message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); } - fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert); + fail(message, stackCrawlMark || assert); } } Debug.assert = assert; - function assertEqual(a, b, msg, msg2) { + function assertEqual(a, b, msg, msg2, stackCrawlMark) { if (a !== b) { var message = msg ? msg2 ? msg + " " + msg2 : msg : ""; - fail("Expected " + a + " === " + b + ". " + message); + fail("Expected " + a + " === " + b + ". " + message, stackCrawlMark || assertEqual); } } Debug.assertEqual = assertEqual; - function assertLessThan(a, b, msg) { + function assertLessThan(a, b, msg, stackCrawlMark) { if (a >= b) { - fail("Expected " + a + " < " + b + ". " + (msg || "")); + fail("Expected " + a + " < " + b + ". " + (msg || ""), stackCrawlMark || assertLessThan); } } Debug.assertLessThan = assertLessThan; - function assertLessThanOrEqual(a, b) { + function assertLessThanOrEqual(a, b, stackCrawlMark) { if (a > b) { - fail("Expected " + a + " <= " + b); + fail("Expected " + a + " <= " + b, stackCrawlMark || assertLessThanOrEqual); } } Debug.assertLessThanOrEqual = assertLessThanOrEqual; - function assertGreaterThanOrEqual(a, b) { + function assertGreaterThanOrEqual(a, b, stackCrawlMark) { if (a < b) { - fail("Expected " + a + " >= " + b); + fail("Expected " + a + " >= " + b, stackCrawlMark || assertGreaterThanOrEqual); } } Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual; - function fail(message, stackCrawlMark) { - debugger; - var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); - if (Error.captureStackTrace) { - Error.captureStackTrace(e, stackCrawlMark || fail); + function assertIsDefined(value, message, stackCrawlMark) { + // eslint-disable-next-line no-null/no-null + if (value === undefined || value === null) { + fail(message, stackCrawlMark || assertIsDefined); } - throw e; } - Debug.fail = fail; - function assertDefined(value, message) { - // eslint-disable-next-line no-null/no-null - if (value === undefined || value === null) - return fail(message); + Debug.assertIsDefined = assertIsDefined; + function checkDefined(value, message, stackCrawlMark) { + assertIsDefined(value, message, stackCrawlMark || checkDefined); return value; } - Debug.assertDefined = assertDefined; - function assertEachDefined(value, message) { + Debug.checkDefined = checkDefined; + /** + * @deprecated Use `checkDefined` to check whether a value is defined inline. Use `assertIsDefined` to check whether + * a value is defined at the statement level. + */ + Debug.assertDefined = checkDefined; + function assertEachIsDefined(value, message, stackCrawlMark) { for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { var v = value_1[_i]; - assertDefined(v, message); + assertIsDefined(v, message, stackCrawlMark || assertEachIsDefined); } + } + Debug.assertEachIsDefined = assertEachIsDefined; + function checkEachDefined(value, message, stackCrawlMark) { + assertEachIsDefined(value, message, stackCrawlMark || checkEachDefined); return value; } - Debug.assertEachDefined = assertEachDefined; + Debug.checkEachDefined = checkEachDefined; + /** + * @deprecated Use `checkEachDefined` to check whether the elements of an array are defined inline. Use `assertEachIsDefined` to check whether + * the elements of an array are defined at the statement level. + */ + Debug.assertEachDefined = checkEachDefined; function assertNever(member, message, stackCrawlMark) { if (message === void 0) { message = "Illegal value:"; } var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member); return fail(message + " " + detail, stackCrawlMark || assertNever); } Debug.assertNever = assertNever; + function assertEachNode(nodes, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) { + assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertEachNode); + } + } + Debug.assertEachNode = assertEachNode; + function assertNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertNode")) { + assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNode); + } + } + Debug.assertNode = assertNode; + function assertNotNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) { + assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNotNode); + } + } + Debug.assertNotNode = assertNotNode; + function assertOptionalNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) { + assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertOptionalNode); + } + } + Debug.assertOptionalNode = assertOptionalNode; + function assertOptionalToken(node, kind, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) { + assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, stackCrawlMark || assertOptionalToken); + } + } + Debug.assertOptionalToken = assertOptionalToken; + function assertMissingNode(node, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) { + assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, stackCrawlMark || assertMissingNode); + } + } + Debug.assertMissingNode = assertMissingNode; function getFunctionName(func) { if (typeof func !== "function") { return ""; @@ -2149,28 +2297,6 @@ var ts; return formatEnum(flags, ts.ObjectFlags, /*isFlags*/ true); } Debug.formatObjectFlags = formatObjectFlags; - function failBadSyntaxKind(node, message) { - return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", failBadSyntaxKind); - } - Debug.failBadSyntaxKind = failBadSyntaxKind; - Debug.assertEachNode = shouldAssert(1 /* Normal */) - ? function (nodes, test, message) { return assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertEachNode); } - : ts.noop; - Debug.assertNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertNotNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertOptionalNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertOptionalNode); } - : ts.noop; - Debug.assertOptionalToken = shouldAssert(1 /* Normal */) - ? function (node, kind, message) { return assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, Debug.assertOptionalToken); } - : ts.noop; - Debug.assertMissingNode = shouldAssert(1 /* Normal */) - ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } - : ts.noop; var isDebugInfoEnabled = false; var extendedDebugModule; function extendedDebug() { @@ -2456,7 +2582,7 @@ var ts; if (prerelease === void 0) { prerelease = ""; } if (build === void 0) { build = ""; } if (typeof major === "string") { - var result = ts.Debug.assertDefined(tryParseComponents(major), "Invalid version"); + var result = ts.Debug.checkDefined(tryParseComponents(major), "Invalid version"); (major = result.major, minor = result.minor, patch = result.patch, prerelease = result.prerelease, build = result.build); } ts.Debug.assert(major >= 0, "Invalid argument: major"); @@ -2587,7 +2713,7 @@ var ts; */ var VersionRange = /** @class */ (function () { function VersionRange(spec) { - this._alternatives = spec ? ts.Debug.assertDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; + this._alternatives = spec ? ts.Debug.checkDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; } VersionRange.tryParse = function (text) { var sets = parseRange(text); @@ -3127,32 +3253,33 @@ var ts; SyntaxKind[SyntaxKind["JSDocSignature"] = 305] = "JSDocSignature"; SyntaxKind[SyntaxKind["JSDocTag"] = 306] = "JSDocTag"; SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 307] = "JSDocAugmentsTag"; - SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 308] = "JSDocAuthorTag"; - SyntaxKind[SyntaxKind["JSDocClassTag"] = 309] = "JSDocClassTag"; - SyntaxKind[SyntaxKind["JSDocPublicTag"] = 310] = "JSDocPublicTag"; - SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 311] = "JSDocPrivateTag"; - SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 312] = "JSDocProtectedTag"; - SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 313] = "JSDocReadonlyTag"; - SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 314] = "JSDocCallbackTag"; - SyntaxKind[SyntaxKind["JSDocEnumTag"] = 315] = "JSDocEnumTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 316] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 317] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocThisTag"] = 318] = "JSDocThisTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 319] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 320] = "JSDocTemplateTag"; - SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 321] = "JSDocTypedefTag"; - SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 322] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 308] = "JSDocImplementsTag"; + SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 309] = "JSDocAuthorTag"; + SyntaxKind[SyntaxKind["JSDocClassTag"] = 310] = "JSDocClassTag"; + SyntaxKind[SyntaxKind["JSDocPublicTag"] = 311] = "JSDocPublicTag"; + SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 312] = "JSDocPrivateTag"; + SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 313] = "JSDocProtectedTag"; + SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 314] = "JSDocReadonlyTag"; + SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 315] = "JSDocCallbackTag"; + SyntaxKind[SyntaxKind["JSDocEnumTag"] = 316] = "JSDocEnumTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 317] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 318] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocThisTag"] = 319] = "JSDocThisTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 320] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 321] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 322] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 323] = "JSDocPropertyTag"; // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 323] = "SyntaxList"; + SyntaxKind[SyntaxKind["SyntaxList"] = 324] = "SyntaxList"; // Transformation nodes - SyntaxKind[SyntaxKind["NotEmittedStatement"] = 324] = "NotEmittedStatement"; - SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 325] = "PartiallyEmittedExpression"; - SyntaxKind[SyntaxKind["CommaListExpression"] = 326] = "CommaListExpression"; - SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 327] = "MergeDeclarationMarker"; - SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 328] = "EndOfDeclarationMarker"; - SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 329] = "SyntheticReferenceExpression"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 325] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 326] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["CommaListExpression"] = 327] = "CommaListExpression"; + SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 328] = "MergeDeclarationMarker"; + SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 329] = "EndOfDeclarationMarker"; + SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 330] = "SyntheticReferenceExpression"; // Enum value count - SyntaxKind[SyntaxKind["Count"] = 330] = "Count"; + SyntaxKind[SyntaxKind["Count"] = 331] = "Count"; // Markers SyntaxKind[SyntaxKind["FirstAssignment"] = 62] = "FirstAssignment"; SyntaxKind[SyntaxKind["LastAssignment"] = 74] = "LastAssignment"; @@ -3182,9 +3309,9 @@ var ts; SyntaxKind[SyntaxKind["LastStatement"] = 241] = "LastStatement"; SyntaxKind[SyntaxKind["FirstNode"] = 153] = "FirstNode"; SyntaxKind[SyntaxKind["FirstJSDocNode"] = 294] = "FirstJSDocNode"; - SyntaxKind[SyntaxKind["LastJSDocNode"] = 322] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 323] = "LastJSDocNode"; SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 306] = "FirstJSDocTagNode"; - SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 322] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 323] = "LastJSDocTagNode"; /* @internal */ SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 122] = "FirstContextualKeyword"; /* @internal */ SyntaxKind[SyntaxKind["LastContextualKeyword"] = 152] = "LastContextualKeyword"; })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {})); @@ -3317,6 +3444,8 @@ var ts; /* @internal */ TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape"; /* @internal */ + TokenFlags[TokenFlags["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape"; + /* @internal */ TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; /* @internal */ TokenFlags[TokenFlags["NumericLiteralFlags"] = 1008] = "NumericLiteralFlags"; @@ -3334,10 +3463,9 @@ var ts; FlowFlags[FlowFlags["SwitchClause"] = 128] = "SwitchClause"; FlowFlags[FlowFlags["ArrayMutation"] = 256] = "ArrayMutation"; FlowFlags[FlowFlags["Call"] = 512] = "Call"; - FlowFlags[FlowFlags["Referenced"] = 1024] = "Referenced"; - FlowFlags[FlowFlags["Shared"] = 2048] = "Shared"; - FlowFlags[FlowFlags["PreFinally"] = 4096] = "PreFinally"; - FlowFlags[FlowFlags["AfterFinally"] = 8192] = "AfterFinally"; + FlowFlags[FlowFlags["ReduceLabel"] = 1024] = "ReduceLabel"; + FlowFlags[FlowFlags["Referenced"] = 2048] = "Referenced"; + FlowFlags[FlowFlags["Shared"] = 4096] = "Shared"; FlowFlags[FlowFlags["Label"] = 12] = "Label"; FlowFlags[FlowFlags["Condition"] = 96] = "Condition"; })(FlowFlags = ts.FlowFlags || (ts.FlowFlags = {})); @@ -3392,7 +3520,7 @@ var ts; ContextFlags[ContextFlags["None"] = 0] = "None"; ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; - ContextFlags[ContextFlags["BaseConstraint"] = 4] = "BaseConstraint"; + ContextFlags[ContextFlags["Completions"] = 4] = "Completions"; })(ContextFlags = ts.ContextFlags || (ts.ContextFlags = {})); // NOTE: If modifying this enum, must modify `TypeFormatFlags` too! var NodeBuilderFlags; @@ -3414,6 +3542,7 @@ var ts; NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; // Error handling NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; NodeBuilderFlags[NodeBuilderFlags["AllowQualifedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifedNameInPlaceOfIdentifier"; @@ -3451,6 +3580,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; TypeFormatFlags[TypeFormatFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; TypeFormatFlags[TypeFormatFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + TypeFormatFlags[TypeFormatFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; // Error Handling TypeFormatFlags[TypeFormatFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; // TypeFormatFlags exclusive @@ -3462,7 +3592,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 4194304] = "InFirstTypeArgument"; TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 8388608] = "InTypeAlias"; /** @deprecated */ TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 0] = "WriteOwnNameForAnyLike"; - TypeFormatFlags[TypeFormatFlags["NodeBuilderFlagsMask"] = 9469291] = "NodeBuilderFlagsMask"; + TypeFormatFlags[TypeFormatFlags["NodeBuilderFlagsMask"] = 277904747] = "NodeBuilderFlagsMask"; })(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {})); var SymbolFormatFlags; (function (SymbolFormatFlags) { @@ -3756,6 +3886,8 @@ var ts; TypeFlags[TypeFlags["ObjectFlagsType"] = 3899393] = "ObjectFlagsType"; /* @internal */ TypeFlags[TypeFlags["Simplifiable"] = 25165824] = "Simplifiable"; + /* @internal */ + TypeFlags[TypeFlags["Substructure"] = 66584576] = "Substructure"; // 'Narrowable' types are types where narrowing actually narrows. // This *should* be every type other than null, undefined, void, and never TypeFlags[TypeFlags["Narrowable"] = 133970943] = "Narrowable"; @@ -3774,9 +3906,6 @@ var ts; TypeFlags[TypeFlags["IncludesWildcard"] = 4194304] = "IncludesWildcard"; /* @internal */ TypeFlags[TypeFlags["IncludesEmptyObject"] = 8388608] = "IncludesEmptyObject"; - // The following flag is used for different purposes by maybeTypeOfKind - /* @internal */ - TypeFlags[TypeFlags["GenericMappedType"] = 131072] = "GenericMappedType"; })(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {})); var ObjectFlags; (function (ObjectFlags) { @@ -3806,6 +3935,18 @@ var ts; ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 1048576] = "ContainsObjectOrArrayLiteral"; /* @internal */ ObjectFlags[ObjectFlags["NonInferrableType"] = 2097152] = "NonInferrableType"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericObjectTypeComputed"] = 4194304] = "IsGenericObjectTypeComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericIndexTypeComputed"] = 16777216] = "IsGenericIndexTypeComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericIndexType"] = 33554432] = "IsGenericIndexType"; + /* @internal */ + ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 67108864] = "CouldContainTypeVariablesComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 134217728] = "CouldContainTypeVariables"; ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; /* @internal */ ObjectFlags[ObjectFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; @@ -3981,12 +4122,12 @@ var ts; JsxEmit[JsxEmit["React"] = 2] = "React"; JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative"; })(JsxEmit = ts.JsxEmit || (ts.JsxEmit = {})); - var importsNotUsedAsValues; - (function (importsNotUsedAsValues) { - importsNotUsedAsValues[importsNotUsedAsValues["Remove"] = 0] = "Remove"; - importsNotUsedAsValues[importsNotUsedAsValues["Preserve"] = 1] = "Preserve"; - importsNotUsedAsValues[importsNotUsedAsValues["Error"] = 2] = "Error"; - })(importsNotUsedAsValues = ts.importsNotUsedAsValues || (ts.importsNotUsedAsValues = {})); + var ImportsNotUsedAsValues; + (function (ImportsNotUsedAsValues) { + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Remove"] = 0] = "Remove"; + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Preserve"] = 1] = "Preserve"; + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Error"] = 2] = "Error"; + })(ImportsNotUsedAsValues = ts.ImportsNotUsedAsValues || (ts.ImportsNotUsedAsValues = {})); var NewLineKind; (function (NewLineKind) { NewLineKind[NewLineKind["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed"; @@ -4305,8 +4446,9 @@ var ts; ExternalEmitHelpers[ExternalEmitHelpers["MakeTemplateObject"] = 131072] = "MakeTemplateObject"; ExternalEmitHelpers[ExternalEmitHelpers["ClassPrivateFieldGet"] = 262144] = "ClassPrivateFieldGet"; ExternalEmitHelpers[ExternalEmitHelpers["ClassPrivateFieldSet"] = 524288] = "ClassPrivateFieldSet"; + ExternalEmitHelpers[ExternalEmitHelpers["CreateBinding"] = 1048576] = "CreateBinding"; ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper"; - ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 524288] = "LastEmitHelper"; + ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 1048576] = "LastEmitHelper"; // Helpers included by ES2015 for..of ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes"; // Helpers included by ES2017 for..await..of @@ -4326,6 +4468,7 @@ var ts; EmitHint[EmitHint["MappedTypeParameter"] = 3] = "MappedTypeParameter"; EmitHint[EmitHint["Unspecified"] = 4] = "Unspecified"; EmitHint[EmitHint["EmbeddedStatement"] = 5] = "EmbeddedStatement"; + EmitHint[EmitHint["JsxAttributeValue"] = 6] = "JsxAttributeValue"; })(EmitHint = ts.EmitHint || (ts.EmitHint = {})); /*@internal*/ var BundleFileSectionKind; @@ -4788,7 +4931,7 @@ var ts; callbacksCache.add(path, callback); return { close: function () { - var watcher = ts.Debug.assertDefined(cache.get(path)); + var watcher = ts.Debug.checkDefined(cache.get(path)); callbacksCache.remove(path, callback); watcher.refCount--; if (watcher.refCount) @@ -4886,7 +5029,7 @@ var ts; return { dirName: dirName, close: function () { - var directoryWatcher = ts.Debug.assertDefined(cache.get(dirPath)); + var directoryWatcher = ts.Debug.checkDefined(cache.get(dirPath)); if (callbackToAdd) callbackCache.remove(dirPath, callbackToAdd); directoryWatcher.refCount--; @@ -5073,7 +5216,7 @@ var ts; }; function watchFile(fileName, callback, pollingInterval, options) { options = updateOptionsForWatchFile(options, useNonPollingWatchers); - var watchFileKind = ts.Debug.assertDefined(options.watchFile); + var watchFileKind = ts.Debug.checkDefined(options.watchFile); switch (watchFileKind) { case ts.WatchFileKind.FixedPollingInterval: return pollingWatchFile(fileName, callback, PollingInterval.Low, /*options*/ undefined); @@ -5153,7 +5296,7 @@ var ts; function nonRecursiveWatchDirectory(directoryName, callback, recursive, options) { ts.Debug.assert(!recursive); options = updateOptionsForWatchDirectory(options); - var watchDirectoryKind = ts.Debug.assertDefined(options.watchDirectory); + var watchDirectoryKind = ts.Debug.checkDefined(options.watchDirectory); switch (watchDirectoryKind) { case ts.WatchDirectoryKind.FixedPollingInterval: return pollingWatchFile(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium, @@ -5759,48 +5902,8 @@ var ts; return hash.digest("hex"); } } - function getChakraSystem() { - var realpath = ChakraHost.realpath && (function (path) { return ChakraHost.realpath(path); }); - return { - newLine: ChakraHost.newLine || "\r\n", - args: ChakraHost.args, - useCaseSensitiveFileNames: !!ChakraHost.useCaseSensitiveFileNames, - write: ChakraHost.echo, - readFile: function (path, _encoding) { - // encoding is automatically handled by the implementation in ChakraHost - return ChakraHost.readFile(path); - }, - writeFile: function (path, data, writeByteOrderMark) { - // If a BOM is required, emit one - if (writeByteOrderMark) { - data = byteOrderMarkIndicator + data; - } - ChakraHost.writeFile(path, data); - }, - resolvePath: ChakraHost.resolvePath, - fileExists: ChakraHost.fileExists, - deleteFile: ChakraHost.deleteFile, - getModifiedTime: ChakraHost.getModifiedTime, - setModifiedTime: ChakraHost.setModifiedTime, - directoryExists: ChakraHost.directoryExists, - createDirectory: ChakraHost.createDirectory, - getExecutingFilePath: function () { return ChakraHost.executingFile; }, - getCurrentDirectory: function () { return ChakraHost.currentDirectory; }, - getDirectories: ChakraHost.getDirectories, - getEnvironmentVariable: ChakraHost.getEnvironmentVariable || (function () { return ""; }), - readDirectory: function (path, extensions, excludes, includes, _depth) { - var pattern = ts.getFileMatcherPatterns(path, excludes, includes, !!ChakraHost.useCaseSensitiveFileNames, ChakraHost.currentDirectory); - return ChakraHost.readDirectory(path, extensions, pattern.basePaths, pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern); - }, - exit: ChakraHost.quit, - realpath: realpath - }; - } var sys; - if (typeof ChakraHost !== "undefined") { - sys = getChakraSystem(); - } - else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { + if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { // process and process.nextTick checks if current environment is node-like // process.browser check excludes webpack and browserify sys = getNodeSystem(); @@ -5813,9 +5916,9 @@ var ts; })(); if (ts.sys && ts.sys.getEnvironmentVariable) { setCustomPollingValues(ts.sys); - ts.Debug.currentAssertionLevel = /^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) + ts.Debug.setAssertionLevel(/^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ - : 0 /* None */; + : 0 /* None */); } if (ts.sys && ts.sys.debugMode) { ts.Debug.isDebugging = true; @@ -6761,8 +6864,9 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), - Type_only_0_must_reference_a_type_but_1_is_a_value: diag(1361, ts.DiagnosticCategory.Error, "Type_only_0_must_reference_a_type_but_1_is_a_value_1361", "Type-only {0} must reference a type, but '{1}' is a value."), - Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported: diag(1362, ts.DiagnosticCategory.Error, "Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported_1362", "Enum '{0}' cannot be used as a value because only its type has been imported."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), + _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), + _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, ts.DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), Convert_to_type_only_export: diag(1364, ts.DiagnosticCategory.Message, "Convert_to_type_only_export_1364", "Convert to type-only export"), Convert_all_re_exported_types_to_type_only_exports: diag(1365, ts.DiagnosticCategory.Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), @@ -6772,11 +6876,16 @@ var ts; Did_you_mean_0: diag(1369, ts.DiagnosticCategory.Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"), Only_ECMAScript_imports_may_use_import_type: diag(1370, ts.DiagnosticCategory.Error, "Only_ECMAScript_imports_may_use_import_type_1370", "Only ECMAScript imports may use 'import type'."), This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error: diag(1371, ts.DiagnosticCategory.Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371", "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'."), - This_import_may_be_converted_to_a_type_only_import: diag(1372, ts.DiagnosticCategory.Suggestion, "This_import_may_be_converted_to_a_type_only_import_1372", "This import may be converted to a type-only import."), Convert_to_type_only_import: diag(1373, ts.DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"), Convert_all_imports_not_used_as_a_value_to_type_only_imports: diag(1374, ts.DiagnosticCategory.Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"), await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1376, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1376", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + _0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."), + _0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."), + Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), + An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), + Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), + Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), @@ -6937,6 +7046,8 @@ var ts; Type_alias_0_circularly_references_itself: diag(2456, ts.DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), Type_alias_name_cannot_be_0: diag(2457, ts.DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, ts.DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Module_0_declares_1_locally_but_it_is_not_exported: diag(2459, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), + Module_0_declares_1_locally_but_it_is_exported_as_2: diag(2460, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), Type_0_is_not_an_array_type: diag(2461, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, ts.DiagnosticCategory.Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, ts.DiagnosticCategory.Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), @@ -7160,7 +7271,7 @@ var ts; Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, ts.DiagnosticCategory.Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, ts.DiagnosticCategory.Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension"), Property_0_was_also_declared_here: diag(2733, ts.DiagnosticCategory.Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), - It_is_highly_likely_that_you_are_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "It_is_highly_likely_that_you_are_missing_a_semicolon_2734", "It is highly likely that you are missing a semicolon."), + Are_you_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, ts.DiagnosticCategory.Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), Operator_0_cannot_be_applied_to_type_1: diag(2736, ts.DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: diag(2737, ts.DiagnosticCategory.Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), @@ -7209,6 +7320,7 @@ var ts; The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: diag(2780, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: diag(2781, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), _0_needs_an_explicit_type_annotation: diag(2782, ts.DiagnosticCategory.Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), + _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: diag(2783, ts.DiagnosticCategory.Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), @@ -7396,7 +7508,7 @@ var ts; File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, ts.DiagnosticCategory.Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, ts.DiagnosticCategory.Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), NEWLINE: diag(6061, ts.DiagnosticCategory.Message, "NEWLINE_6061", "NEWLINE"), - Option_0_can_only_be_specified_in_tsconfig_json_file: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_6064", "Option '{0}' can only be specified in 'tsconfig.json' file."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), Enables_experimental_support_for_ES7_decorators: diag(6065, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), Enables_experimental_support_for_ES7_async_functions: diag(6068, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_async_functions_6068", "Enables experimental support for ES7 async functions."), @@ -7557,6 +7669,8 @@ var ts; Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling: diag(6226, ts.DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'."), Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority: diag(6227, ts.DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'."), Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6228, ts.DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228", "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively."), + Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, ts.DiagnosticCategory.Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), Projects_to_reference: diag(6300, ts.DiagnosticCategory.Message, "Projects_to_reference_6300", "Projects to reference"), Enable_project_compilation: diag(6302, ts.DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"), Composite_projects_may_not_disable_declaration_emit: diag(6304, ts.DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), @@ -7753,6 +7867,7 @@ var ts; Import_default_0_from_module_1: diag(90032, ts.DiagnosticCategory.Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""), Add_default_import_0_to_existing_import_declaration_from_1: diag(90033, ts.DiagnosticCategory.Message, "Add_default_import_0_to_existing_import_declaration_from_1_90033", "Add default import '{0}' to existing import declaration from \"{1}\""), Add_parameter_name: diag(90034, ts.DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"), + Declare_a_private_field_named_0: diag(90053, ts.DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), Convert_function_to_an_ES2015_class: diag(95001, ts.DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), Convert_function_0_to_class: diag(95002, ts.DiagnosticCategory.Message, "Convert_function_0_to_class_95002", "Convert function '{0}' to class"), Extract_to_0_in_1: diag(95004, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), @@ -7848,6 +7963,8 @@ var ts; Add_export_to_make_this_file_into_a_module: diag(95097, ts.DiagnosticCategory.Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), Set_the_target_option_in_your_configuration_file_to_0: diag(95098, ts.DiagnosticCategory.Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), Set_the_module_option_in_your_configuration_file_to_0: diag(95099, ts.DiagnosticCategory.Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), + Convert_invalid_character_to_its_html_entity_code: diag(95100, ts.DiagnosticCategory.Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), + Wrap_invalid_character_in_an_expression_container: diag(95101, ts.DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95101", "Wrap invalid character in an expression container"), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), @@ -8212,6 +8329,12 @@ var ts; function isDigit(ch) { return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; } + function isHexDigit(ch) { + return isDigit(ch) || ch >= 65 /* A */ && ch <= 70 /* F */ || ch >= 97 /* a */ && ch <= 102 /* f */; + } + function isCodePoint(code) { + return code <= 0x10FFFF; + } /* @internal */ function isOctalDigit(ch) { return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; @@ -8599,6 +8722,7 @@ var ts; reScanGreaterToken: reScanGreaterToken, reScanSlashToken: reScanSlashToken, reScanTemplateToken: reScanTemplateToken, + reScanTemplateHeadOrNoSubstitutionTemplate: reScanTemplateHeadOrNoSubstitutionTemplate, scanJsxIdentifier: scanJsxIdentifier, scanJsxAttributeValue: scanJsxAttributeValue, reScanJsxAttributeValue: reScanJsxAttributeValue, @@ -8847,7 +8971,7 @@ var ts; * Sets the current 'tokenValue' and returns a NoSubstitutionTemplateLiteral or * a literal component of a TemplateExpression. */ - function scanTemplateAndSetTokenValue() { + function scanTemplateAndSetTokenValue(isTaggedTemplate) { var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; pos++; var start = pos; @@ -8879,7 +9003,7 @@ var ts; // Escape character if (currChar === 92 /* backslash */) { contents += text.substring(start, pos); - contents += scanEscapeSequence(); + contents += scanEscapeSequence(isTaggedTemplate); start = pos; continue; } @@ -8901,7 +9025,8 @@ var ts; tokenValue = contents; return resultingToken; } - function scanEscapeSequence() { + function scanEscapeSequence(isTaggedTemplate) { + var start = pos; pos++; if (pos >= end) { error(ts.Diagnostics.Unexpected_end_of_text); @@ -8911,6 +9036,12 @@ var ts; pos++; switch (ch) { case 48 /* _0 */: + // '\01' + if (isTaggedTemplate && pos < end && isDigit(text.charCodeAt(pos))) { + pos++; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } return "\0"; case 98 /* b */: return "\b"; @@ -8929,16 +9060,55 @@ var ts; case 34 /* doubleQuote */: return "\""; case 117 /* u */: + if (isTaggedTemplate) { + // '\u' or '\u0' or '\u00' or '\u000' + for (var escapePos = pos; escapePos < pos + 4; escapePos++) { + if (escapePos < end && !isHexDigit(text.charCodeAt(escapePos)) && text.charCodeAt(escapePos) !== 123 /* openBrace */) { + pos = escapePos; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + } + } // '\u{DDDDDDDD}' if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) { - tokenFlags |= 8 /* ExtendedUnicodeEscape */; pos++; + // '\u{' + if (isTaggedTemplate && !isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + if (isTaggedTemplate) { + var savePos = pos; + var escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false); + var escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + // '\u{Not Code Point' or '\u{CodePoint' + if (!isCodePoint(escapedValue) || text.charCodeAt(pos) !== 125 /* closeBrace */) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + else { + pos = savePos; + } + } + tokenFlags |= 8 /* ExtendedUnicodeEscape */; return scanExtendedUnicodeEscape(); } tokenFlags |= 1024 /* UnicodeEscape */; // '\uDDDD' return scanHexadecimalEscape(/*numDigits*/ 4); case 120 /* x */: + if (isTaggedTemplate) { + if (!isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + else if (!isHexDigit(text.charCodeAt(pos + 1))) { + pos++; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + } // '\xDD' return scanHexadecimalEscape(/*numDigits*/ 2); // when encountering a LineContinuation (i.e. a backslash and a line terminator sequence), @@ -9212,7 +9382,7 @@ var ts; tokenValue = scanString(); return token = 10 /* StringLiteral */; case 96 /* backtick */: - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ false); case 37 /* percent */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { return pos += 2, token = 68 /* PercentEqualsToken */; @@ -9542,11 +9712,12 @@ var ts; if (ch === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } - return token = 76 /* PrivateIdentifier */; } - error(ts.Diagnostics.Invalid_character); - // no `pos++` because already advanced past the '#' - return token = 0 /* Unknown */; + else { + tokenValue = "#"; + error(ts.Diagnostics.Invalid_character); + } + return token = 76 /* PrivateIdentifier */; default: if (isIdentifierStart(ch, languageVersion)) { pos += charSize(ch); @@ -9648,10 +9819,14 @@ var ts; /** * Unconditionally back up and scan a template expression portion. */ - function reScanTemplateToken() { + function reScanTemplateToken(isTaggedTemplate) { ts.Debug.assert(token === 19 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + pos = tokenPos; + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ true); } function reScanJsxToken() { pos = tokenPos = startPos; @@ -9689,9 +9864,15 @@ var ts; } // First non-whitespace character on this line. var firstNonWhitespace = 0; + var lastNonWhitespace = -1; // These initial values are special because the first line is: // firstNonWhitespace = 0 to indicate that we want leading whitespace, while (pos < end) { + // We want to keep track of the last non-whitespace (but including + // newlines character for hitting the end of the JSX Text region) + if (!isWhiteSpaceSingleLine(char)) { + lastNonWhitespace = pos; + } char = text.charCodeAt(pos); if (char === 123 /* openBrace */) { break; @@ -9703,6 +9884,14 @@ var ts; } break; } + if (char === 62 /* greaterThan */) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); + } + if (char === 125 /* closeBrace */) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); + } + if (lastNonWhitespace > 0) + lastNonWhitespace++; // FirstNonWhitespace is 0, then we only see whitespaces so far. If we see a linebreak, we want to ignore that whitespaces. // i.e (- : whitespace) //
---- @@ -9717,7 +9906,8 @@ var ts; } pos++; } - tokenValue = text.substring(startPos, pos); + var endPosition = lastNonWhitespace === -1 ? pos : lastNonWhitespace; + tokenValue = text.substring(startPos, endPosition); return firstNonWhitespace === -1 ? 12 /* JsxTextAllWhiteSpaces */ : 11 /* JsxText */; } // Scans a JSX identifier; these differ from normal identifiers in that @@ -10448,8 +10638,8 @@ var ts; switch (declaration.kind) { case 75 /* Identifier */: return declaration; - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: { + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: { var name = declaration.name; if (name.kind === 153 /* QualifiedName */) { return name.right; @@ -10473,9 +10663,9 @@ var ts; return undefined; } } - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 315 /* JSDocEnumTag */: + case 316 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); case 259 /* ExportAssignment */: { var expression = declaration.expression; @@ -10579,6 +10769,11 @@ var ts; return getFirstJSDocTag(node, isJSDocAugmentsTag); } ts.getJSDocAugmentsTag = getJSDocAugmentsTag; + /** Gets the JSDoc implements tags for the node if present */ + function getJSDocImplementsTags(node) { + return getAllJSDocTags(node, isJSDocImplementsTag); + } + ts.getJSDocImplementsTags = getJSDocImplementsTags; /** Gets the JSDoc class tag for the node if present */ function getJSDocClassTag(node) { return getFirstJSDocTag(node, isJSDocClassTag); @@ -10693,7 +10888,12 @@ var ts; function getFirstJSDocTag(node, predicate) { return ts.find(getJSDocTags(node), predicate); } - /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + /** Gets all JSDoc tags that match a specified predicate */ + function getAllJSDocTags(node, predicate) { + return getJSDocTags(node).filter(predicate); + } + ts.getAllJSDocTags = getAllJSDocTags; + /** Gets all JSDoc tags of a specified kind */ function getAllJSDocTagsOfKind(node, kind) { return getJSDocTags(node).filter(function (doc) { return doc.kind === kind; }); } @@ -11039,7 +11239,7 @@ var ts; } ts.isParenthesizedExpression = isParenthesizedExpression; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 325 /* PartiallyEmittedExpression */) { + while (node.kind === 326 /* PartiallyEmittedExpression */) { node = node.expression; } return node; @@ -11463,67 +11663,71 @@ var ts; } ts.isJSDoc = isJSDoc; function isJSDocAuthorTag(node) { - return node.kind === 308 /* JSDocAuthorTag */; + return node.kind === 309 /* JSDocAuthorTag */; } ts.isJSDocAuthorTag = isJSDocAuthorTag; function isJSDocAugmentsTag(node) { return node.kind === 307 /* JSDocAugmentsTag */; } ts.isJSDocAugmentsTag = isJSDocAugmentsTag; + function isJSDocImplementsTag(node) { + return node.kind === 308 /* JSDocImplementsTag */; + } + ts.isJSDocImplementsTag = isJSDocImplementsTag; function isJSDocClassTag(node) { - return node.kind === 309 /* JSDocClassTag */; + return node.kind === 310 /* JSDocClassTag */; } ts.isJSDocClassTag = isJSDocClassTag; function isJSDocPublicTag(node) { - return node.kind === 310 /* JSDocPublicTag */; + return node.kind === 311 /* JSDocPublicTag */; } ts.isJSDocPublicTag = isJSDocPublicTag; function isJSDocPrivateTag(node) { - return node.kind === 311 /* JSDocPrivateTag */; + return node.kind === 312 /* JSDocPrivateTag */; } ts.isJSDocPrivateTag = isJSDocPrivateTag; function isJSDocProtectedTag(node) { - return node.kind === 312 /* JSDocProtectedTag */; + return node.kind === 313 /* JSDocProtectedTag */; } ts.isJSDocProtectedTag = isJSDocProtectedTag; function isJSDocReadonlyTag(node) { - return node.kind === 313 /* JSDocReadonlyTag */; + return node.kind === 314 /* JSDocReadonlyTag */; } ts.isJSDocReadonlyTag = isJSDocReadonlyTag; function isJSDocEnumTag(node) { - return node.kind === 315 /* JSDocEnumTag */; + return node.kind === 316 /* JSDocEnumTag */; } ts.isJSDocEnumTag = isJSDocEnumTag; function isJSDocThisTag(node) { - return node.kind === 318 /* JSDocThisTag */; + return node.kind === 319 /* JSDocThisTag */; } ts.isJSDocThisTag = isJSDocThisTag; function isJSDocParameterTag(node) { - return node.kind === 316 /* JSDocParameterTag */; + return node.kind === 317 /* JSDocParameterTag */; } ts.isJSDocParameterTag = isJSDocParameterTag; function isJSDocReturnTag(node) { - return node.kind === 317 /* JSDocReturnTag */; + return node.kind === 318 /* JSDocReturnTag */; } ts.isJSDocReturnTag = isJSDocReturnTag; function isJSDocTypeTag(node) { - return node.kind === 319 /* JSDocTypeTag */; + return node.kind === 320 /* JSDocTypeTag */; } ts.isJSDocTypeTag = isJSDocTypeTag; function isJSDocTemplateTag(node) { - return node.kind === 320 /* JSDocTemplateTag */; + return node.kind === 321 /* JSDocTemplateTag */; } ts.isJSDocTemplateTag = isJSDocTemplateTag; function isJSDocTypedefTag(node) { - return node.kind === 321 /* JSDocTypedefTag */; + return node.kind === 322 /* JSDocTypedefTag */; } ts.isJSDocTypedefTag = isJSDocTypedefTag; function isJSDocPropertyTag(node) { - return node.kind === 322 /* JSDocPropertyTag */; + return node.kind === 323 /* JSDocPropertyTag */; } ts.isJSDocPropertyTag = isJSDocPropertyTag; function isJSDocPropertyLikeTag(node) { - return node.kind === 322 /* JSDocPropertyTag */ || node.kind === 316 /* JSDocParameterTag */; + return node.kind === 323 /* JSDocPropertyTag */ || node.kind === 317 /* JSDocParameterTag */; } ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag; function isJSDocTypeLiteral(node) { @@ -11531,7 +11735,7 @@ var ts; } ts.isJSDocTypeLiteral = isJSDocTypeLiteral; function isJSDocCallbackTag(node) { - return node.kind === 314 /* JSDocCallbackTag */; + return node.kind === 315 /* JSDocCallbackTag */; } ts.isJSDocCallbackTag = isJSDocCallbackTag; function isJSDocSignature(node) { @@ -11546,7 +11750,7 @@ var ts; // they may be used with transformations. /* @internal */ function isSyntaxList(n) { - return n.kind === 323 /* SyntaxList */; + return n.kind === 324 /* SyntaxList */; } ts.isSyntaxList = isSyntaxList; /* @internal */ @@ -11604,21 +11808,20 @@ var ts; return isImportSpecifier(node) || isExportSpecifier(node); } ts.isImportOrExportSpecifier = isImportOrExportSpecifier; - function isTypeOnlyImportOrExportName(node) { - if (node.kind !== 75 /* Identifier */) { - return false; - } - switch (node.parent.kind) { + function isTypeOnlyImportOrExportDeclaration(node) { + switch (node.kind) { case 258 /* ImportSpecifier */: case 263 /* ExportSpecifier */: - return node.parent.parent.parent.isTypeOnly; - case 255 /* ImportClause */: + return node.parent.parent.isTypeOnly; + case 256 /* NamespaceImport */: return node.parent.isTypeOnly; + case 255 /* ImportClause */: + return node.isTypeOnly; default: return false; } } - ts.isTypeOnlyImportOrExportName = isTypeOnlyImportOrExportName; + ts.isTypeOnlyImportOrExportDeclaration = isTypeOnlyImportOrExportDeclaration; function isStringTextContainingNode(node) { return node.kind === 10 /* StringLiteral */ || isTemplateLiteralKind(node.kind); } @@ -12019,8 +12222,8 @@ var ts; case 213 /* SpreadElement */: case 217 /* AsExpression */: case 215 /* OmittedExpression */: - case 326 /* CommaListExpression */: - case 325 /* PartiallyEmittedExpression */: + case 327 /* CommaListExpression */: + case 326 /* PartiallyEmittedExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -12034,17 +12237,17 @@ var ts; ts.isAssertionExpression = isAssertionExpression; /* @internal */ function isPartiallyEmittedExpression(node) { - return node.kind === 325 /* PartiallyEmittedExpression */; + return node.kind === 326 /* PartiallyEmittedExpression */; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; /* @internal */ function isNotEmittedStatement(node) { - return node.kind === 324 /* NotEmittedStatement */; + return node.kind === 325 /* NotEmittedStatement */; } ts.isNotEmittedStatement = isNotEmittedStatement; /* @internal */ function isSyntheticReference(node) { - return node.kind === 329 /* SyntheticReferenceExpression */; + return node.kind === 330 /* SyntheticReferenceExpression */; } ts.isSyntheticReference = isSyntheticReference; /* @internal */ @@ -12177,9 +12380,9 @@ var ts; || kind === 247 /* TypeAliasDeclaration */ || kind === 155 /* TypeParameter */ || kind === 242 /* VariableDeclaration */ - || kind === 321 /* JSDocTypedefTag */ - || kind === 314 /* JSDocCallbackTag */ - || kind === 322 /* JSDocPropertyTag */; + || kind === 322 /* JSDocTypedefTag */ + || kind === 315 /* JSDocCallbackTag */ + || kind === 323 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { return kind === 244 /* FunctionDeclaration */ @@ -12214,14 +12417,14 @@ var ts; || kind === 225 /* VariableStatement */ || kind === 229 /* WhileStatement */ || kind === 236 /* WithStatement */ - || kind === 324 /* NotEmittedStatement */ - || kind === 328 /* EndOfDeclarationMarker */ - || kind === 327 /* MergeDeclarationMarker */; + || kind === 325 /* NotEmittedStatement */ + || kind === 329 /* EndOfDeclarationMarker */ + || kind === 328 /* MergeDeclarationMarker */; } /* @internal */ function isDeclaration(node) { if (node.kind === 155 /* TypeParameter */) { - return (node.parent && node.parent.kind !== 320 /* JSDocTemplateTag */) || ts.isInJSFile(node); + return (node.parent && node.parent.kind !== 321 /* JSDocTemplateTag */) || ts.isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -12316,18 +12519,18 @@ var ts; /** True if node is of some JSDoc syntax kind. */ /* @internal */ function isJSDocNode(node) { - return node.kind >= 294 /* FirstJSDocNode */ && node.kind <= 322 /* LastJSDocNode */; + return node.kind >= 294 /* FirstJSDocNode */ && node.kind <= 323 /* LastJSDocNode */; } ts.isJSDocNode = isJSDocNode; /** True if node is of a kind that may contain comment text. */ function isJSDocCommentContainingNode(node) { - return node.kind === 303 /* JSDocComment */ || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 303 /* JSDocComment */ || node.kind === 302 /* JSDocNamepathType */ || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode; // TODO: determine what this does before making it public. /* @internal */ function isJSDocTag(node) { - return node.kind >= 306 /* FirstJSDocTagNode */ && node.kind <= 322 /* LastJSDocTagNode */; + return node.kind >= 306 /* FirstJSDocTagNode */ && node.kind <= 323 /* LastJSDocTagNode */; } ts.isJSDocTag = isJSDocTag; function isSetAccessor(node) { @@ -12359,9 +12562,19 @@ var ts; } ts.hasInitializer = hasInitializer; /** True if has initializer node attached to it. */ - /* @internal */ function hasOnlyExpressionInitializer(node) { - return hasInitializer(node) && !isForStatement(node) && !isForInStatement(node) && !isForOfStatement(node) && !isJsxAttribute(node); + switch (node.kind) { + case 242 /* VariableDeclaration */: + case 156 /* Parameter */: + case 191 /* BindingElement */: + case 158 /* PropertySignature */: + case 159 /* PropertyDeclaration */: + case 281 /* PropertyAssignment */: + case 284 /* EnumMember */: + return true; + default: + return false; + } } ts.hasOnlyExpressionInitializer = hasOnlyExpressionInitializer; function isObjectLiteralElement(node) { @@ -12449,14 +12662,6 @@ var ts; return (symbol.flags & 33554432 /* Transient */) !== 0; } ts.isTransientSymbol = isTransientSymbol; - function isTypeOnlyAlias(symbol) { - return isTransientSymbol(symbol) && !!symbol.immediateTarget; - } - ts.isTypeOnlyAlias = isTypeOnlyAlias; - function isTypeOnlyEnumAlias(symbol) { - return isTypeOnlyAlias(symbol) && !!(symbol.immediateTarget.flags & 384 /* Enum */); - } - ts.isTypeOnlyEnumAlias = isTypeOnlyEnumAlias; var stringWriter = createSingleLineStringWriter(); function createSingleLineStringWriter() { var str = ""; @@ -12852,7 +13057,7 @@ var ts; // the syntax list itself considers them as normal trivia. Therefore if we simply skip // trivia for the list, we may have skipped the JSDocComment as well. So we should process its // first child to determine the actual position of its first token. - if (node.kind === 323 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 324 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); @@ -12871,7 +13076,7 @@ var ts; } ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; function isJSDocTypeExpressionOrChild(node) { - return node.kind === 294 /* JSDocTypeExpression */ || (node.parent && isJSDocTypeExpressionOrChild(node.parent)); + return !!findAncestor(node, ts.isJSDocTypeExpression); } function getTextOfNodeFromSourceText(sourceText, node, includeTrivia) { if (includeTrivia === void 0) { includeTrivia = false; } @@ -12910,30 +13115,35 @@ var ts; return emitNode && emitNode.flags || 0; } ts.getEmitFlags = getEmitFlags; - function getLiteralText(node, sourceFile, neverAsciiEscape) { + function getLiteralText(node, sourceFile, neverAsciiEscape, jsxAttributeEscape) { // If we don't need to downlevel and we can reach the original source text using // the node's parent reference, then simply get the text as it was originally written. if (!nodeIsSynthesized(node) && node.parent && !((ts.isNumericLiteral(node) && node.numericLiteralFlags & 512 /* ContainsSeparator */) || ts.isBigIntLiteral(node))) { return getSourceTextOfNodeFromSourceFile(sourceFile, node); } - // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text - // had to include a backslash: `not \${a} substitution`. - var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : escapeNonAsciiString; // If we can't reach the original source text, use the canonical form if it's a number, // or a (possibly escaped) quoted form of the original text if it's string-like. switch (node.kind) { - case 10 /* StringLiteral */: + case 10 /* StringLiteral */: { + var escapeText = jsxAttributeEscape ? escapeJsxAttributeString : + neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : + escapeNonAsciiString; if (node.singleQuote) { return "'" + escapeText(node.text, 39 /* singleQuote */) + "'"; } else { return '"' + escapeText(node.text, 34 /* doubleQuote */) + '"'; } + } case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: - case 17 /* TemplateTail */: + case 17 /* TemplateTail */: { + // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text + // had to include a backslash: `not \${a} substitution`. + var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : + escapeNonAsciiString; var rawText = node.rawText || escapeTemplateSubstitution(escapeText(node.text, 96 /* backtick */)); switch (node.kind) { case 14 /* NoSubstitutionTemplateLiteral */: @@ -12946,6 +13156,7 @@ var ts; return "}" + rawText + "`"; } break; + } case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 13 /* RegularExpressionLiteral */: @@ -13104,8 +13315,8 @@ var ts; ts.isBlockScope = isBlockScope; function isDeclarationWithTypeParameters(node) { switch (node.kind) { - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: case 305 /* JSDocSignature */: return true; default: @@ -13127,7 +13338,7 @@ var ts; case 214 /* ClassExpression */: case 246 /* InterfaceDeclaration */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: case 244 /* FunctionDeclaration */: case 161 /* MethodDeclaration */: case 162 /* Constructor */: @@ -13210,12 +13421,15 @@ var ts; ts.getTextOfPropertyName = getTextOfPropertyName; function entityNameToString(name) { switch (name.kind) { + case 104 /* ThisKeyword */: + return "this"; + case 76 /* PrivateIdentifier */: case 75 /* Identifier */: return getFullWidth(name) === 0 ? ts.idText(name) : getTextOfNode(name); case 153 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); case 194 /* PropertyAccessExpression */: - if (ts.isIdentifier(name.name)) { + if (ts.isIdentifier(name.name) || ts.isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { @@ -13465,7 +13679,7 @@ var ts; return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); case 155 /* TypeParameter */: return node === parent.constraint; - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return node === parent.constraint; case 159 /* PropertyDeclaration */: case 158 /* PropertySignature */: @@ -14084,6 +14298,13 @@ var ts; } } ts.isInExpressionContext = isInExpressionContext; + function isPartOfTypeQuery(node) { + while (node.kind === 153 /* QualifiedName */ || node.kind === 75 /* Identifier */) { + node = node.parent; + } + return node.kind === 172 /* TypeQuery */; + } + ts.isPartOfTypeQuery = isPartOfTypeQuery; function isExternalModuleImportEqualsDeclaration(node) { return node.kind === 253 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 265 /* ExternalModuleReference */; } @@ -14569,6 +14790,21 @@ var ts; return node.kind === 254 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } ts.isDefaultImport = isDefaultImport; + function forEachImportClauseDeclaration(node, action) { + if (node.name) { + var result = action(node); + if (result) + return result; + } + if (node.namedBindings) { + var result = ts.isNamespaceImport(node.namedBindings) + ? action(node.namedBindings) + : ts.forEach(node.namedBindings.elements, action); + if (result) + return result; + } + } + ts.forEachImportClauseDeclaration = forEachImportClauseDeclaration; function hasQuestionToken(node) { if (node) { switch (node.kind) { @@ -14592,7 +14828,7 @@ var ts; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function isJSDocTypeAlias(node) { - return node.kind === 321 /* JSDocTypedefTag */ || node.kind === 314 /* JSDocCallbackTag */ || node.kind === 315 /* JSDocEnumTag */; + return node.kind === 322 /* JSDocTypedefTag */ || node.kind === 315 /* JSDocCallbackTag */ || node.kind === 316 /* JSDocEnumTag */; } ts.isJSDocTypeAlias = isJSDocTypeAlias; function isTypeAlias(node) { @@ -14721,7 +14957,7 @@ var ts; } ts.getHostSignatureFromJSDocHost = getHostSignatureFromJSDocHost; function getJSDocHost(node) { - return ts.Debug.assertDefined(findAncestor(node.parent, ts.isJSDoc)).parent; + return ts.Debug.checkDefined(findAncestor(node.parent, ts.isJSDoc)).parent; } ts.getJSDocHost = getJSDocHost; function getTypeParameterFromJsDoc(node) { @@ -14983,9 +15219,27 @@ var ts; node.kind === 281 /* PropertyAssignment */ && isAliasableExpression(node.initializer); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; + function getAliasDeclarationFromName(node) { + switch (node.parent.kind) { + case 255 /* ImportClause */: + case 258 /* ImportSpecifier */: + case 256 /* NamespaceImport */: + case 263 /* ExportSpecifier */: + case 259 /* ExportAssignment */: + case 253 /* ImportEqualsDeclaration */: + return node.parent; + case 153 /* QualifiedName */: + do { + node = node.parent; + } while (node.parent.kind === 153 /* QualifiedName */); + return getAliasDeclarationFromName(node); + } + } + ts.getAliasDeclarationFromName = getAliasDeclarationFromName; function isAliasableExpression(e) { return isEntityNameExpression(e) || ts.isClassExpression(e); } + ts.isAliasableExpression = isAliasableExpression; function exportAssignmentIsAlias(node) { var e = getExportAssignmentExpression(node); return isAliasableExpression(e); @@ -15017,15 +15271,20 @@ var ts; return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassExtendsHeritageElement = getClassExtendsHeritageElement; - function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 113 /* ImplementsKeyword */); - return heritageClause ? heritageClause.types : undefined; + function getEffectiveImplementsTypeNodes(node) { + if (isInJSFile(node)) { + return ts.getJSDocImplementsTags(node).map(function (n) { return n.class; }); + } + else { + var heritageClause = getHeritageClause(node.heritageClauses, 113 /* ImplementsKeyword */); + return heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.types; + } } - ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; + ts.getEffectiveImplementsTypeNodes = getEffectiveImplementsTypeNodes; /** Returns the node in an `extends` or `implements` clause of a class or interface. */ function getAllSuperTypeNodes(node) { return ts.isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || ts.emptyArray : - ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getClassImplementsHeritageClauseElements(node)) || ts.emptyArray : + ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || ts.emptyArray : ts.emptyArray; } ts.getAllSuperTypeNodes = getAllSuperTypeNodes; @@ -15348,7 +15607,7 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return 0; case 213 /* SpreadElement */: return 1; @@ -15540,6 +15799,13 @@ var ts; function escapeTemplateSubstitution(str) { return str.replace(templateSubstitutionRegExp, "\\${"); } + /** @internal */ + function hasInvalidEscape(template) { + return template && !!(ts.isNoSubstitutionTemplateLiteral(template) + ? template.templateFlags + : (template.head.templateFlags || ts.some(template.templateSpans, function (span) { return !!span.literal.templateFlags; }))); + } + ts.hasInvalidEscape = hasInvalidEscape; // This consists of the first 19 unprintable ASCII characters, canonical escapes, lineSeparator, // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in // the language service. These characters should be escaped when printing, and if any characters are added, @@ -15564,6 +15830,23 @@ var ts; "\u2029": "\\u2029", "\u0085": "\\u0085" // nextLine }); + function encodeUtf16EscapeSequence(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + var paddedHexCode = ("0000" + hexCharCode).slice(-4); + return "\\u" + paddedHexCode; + } + function getReplacement(c, offset, input) { + if (c.charCodeAt(0) === 0 /* nullCharacter */) { + var lookAhead = input.charCodeAt(offset + c.length); + if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) { + // If the null character is followed by digits, print as a hex escape to prevent the result from parsing as an octal (which is forbidden in strict mode) + return "\\x00"; + } + // Otherwise, keep printing a literal \0 for the null character + return "\\0"; + } + return escapedCharsMap.get(c) || encodeUtf16EscapeSequence(c.charCodeAt(0)); + } /** * Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), * but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) @@ -15576,6 +15859,42 @@ var ts; return s.replace(escapedCharsRegExp, getReplacement); } ts.escapeString = escapeString; + var nonAsciiCharacters = /[^\u0000-\u007F]/g; + function escapeNonAsciiString(s, quoteChar) { + s = escapeString(s, quoteChar); + // Replace non-ASCII characters with '\uNNNN' escapes if any exist. + // Otherwise just return the original string. + return nonAsciiCharacters.test(s) ? + s.replace(nonAsciiCharacters, function (c) { return encodeUtf16EscapeSequence(c.charCodeAt(0)); }) : + s; + } + ts.escapeNonAsciiString = escapeNonAsciiString; + // This consists of the first 19 unprintable ASCII characters, JSX canonical escapes, lineSeparator, + // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in + // the language service. These characters should be escaped when printing, and if any characters are added, + // the map below must be updated. + var jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxEscapedCharsMap = ts.createMapFromTemplate({ + "\"": """, + "\'": "'" + }); + function encodeJsxCharacterEntity(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + return "&#x" + hexCharCode + ";"; + } + function getJsxAttributeStringReplacement(c) { + if (c.charCodeAt(0) === 0 /* nullCharacter */) { + return "�"; + } + return jsxEscapedCharsMap.get(c) || encodeJsxCharacterEntity(c.charCodeAt(0)); + } + function escapeJsxAttributeString(s, quoteChar) { + var escapedCharsRegExp = quoteChar === 39 /* singleQuote */ ? jsxSingleQuoteEscapedCharsRegExp : + jsxDoubleQuoteEscapedCharsRegExp; + return s.replace(escapedCharsRegExp, getJsxAttributeStringReplacement); + } + ts.escapeJsxAttributeString = escapeJsxAttributeString; /** * Strip off existed surrounding single quotes, double quotes, or backticks from a given string * @@ -15594,38 +15913,11 @@ var ts; charCode === 34 /* doubleQuote */ || charCode === 96 /* backtick */; } - function getReplacement(c, offset, input) { - if (c.charCodeAt(0) === 0 /* nullCharacter */) { - var lookAhead = input.charCodeAt(offset + c.length); - if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) { - // If the null character is followed by digits, print as a hex escape to prevent the result from parsing as an octal (which is forbidden in strict mode) - return "\\x00"; - } - // Otherwise, keep printing a literal \0 for the null character - return "\\0"; - } - return escapedCharsMap.get(c) || get16BitUnicodeEscapeSequence(c.charCodeAt(0)); - } function isIntrinsicJsxName(name) { var ch = name.charCodeAt(0); return (ch >= 97 /* a */ && ch <= 122 /* z */) || ts.stringContains(name, "-"); } ts.isIntrinsicJsxName = isIntrinsicJsxName; - function get16BitUnicodeEscapeSequence(charCode) { - var hexCharCode = charCode.toString(16).toUpperCase(); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - var nonAsciiCharacters = /[^\u0000-\u007F]/g; - function escapeNonAsciiString(s, quoteChar) { - s = escapeString(s, quoteChar); - // Replace non-ASCII characters with '\uNNNN' escapes if any exist. - // Otherwise just return the original string. - return nonAsciiCharacters.test(s) ? - s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) : - s; - } - ts.escapeNonAsciiString = escapeNonAsciiString; var indentStrings = ["", " "]; function getIndentString(level) { if (indentStrings[level] === undefined) { @@ -16282,6 +16574,9 @@ var ts; } ts.getSelectedModifierFlags = getSelectedModifierFlags; function getModifierFlags(node) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 152 /* LastToken */) { + return 0 /* None */; + } if (node.modifierFlagsCache & 536870912 /* HasComputedFlags */) { return node.modifierFlagsCache & ~536870912 /* HasComputedFlags */; } @@ -16397,7 +16692,7 @@ var ts; } ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { - return node.kind === 75 /* Identifier */ || node.kind === 104 /* ThisKeyword */ || + return node.kind === 75 /* Identifier */ || node.kind === 104 /* ThisKeyword */ || node.kind === 102 /* SuperKeyword */ || node.kind === 194 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 200 /* ParenthesizedExpression */ && isDottedName(node.expression); } @@ -17015,6 +17310,14 @@ var ts; return node.kind === 194 /* PropertyAccessExpression */ || node.kind === 195 /* ElementAccessExpression */; } ts.isAccessExpression = isAccessExpression; + function getNameOfAccessExpression(node) { + if (node.kind === 194 /* PropertyAccessExpression */) { + return node.name; + } + ts.Debug.assert(node.kind === 195 /* ElementAccessExpression */); + return node.argumentExpression; + } + ts.getNameOfAccessExpression = getNameOfAccessExpression; function isBundleFileTextLike(section) { switch (section.kind) { case "text" /* Text */: @@ -17065,6 +17368,26 @@ var ts; this.parent = undefined; this.original = undefined; } + function Token(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0 /* None */; + this.transformFlags = 0 /* None */; + this.parent = undefined; + } + function Identifier(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0 /* None */; + this.transformFlags = 0 /* None */; + this.parent = undefined; + this.original = undefined; + this.flowNode = undefined; + } function SourceMapSource(fileName, text, skipTrivia) { this.fileName = fileName; this.text = text; @@ -17073,8 +17396,8 @@ var ts; // eslint-disable-next-line prefer-const ts.objectAllocator = { getNodeConstructor: function () { return Node; }, - getTokenConstructor: function () { return Node; }, - getIdentifierConstructor: function () { return Node; }, + getTokenConstructor: function () { return Token; }, + getIdentifierConstructor: function () { return Identifier; }, getPrivateIdentifierConstructor: function () { return Node; }, getSourceFileConstructor: function () { return Node; }, getSymbolConstructor: function () { return Symbol; }, @@ -17088,7 +17411,7 @@ var ts; ts.setObjectAllocator = setObjectAllocator; function formatStringFromArgs(text, args, baseIndex) { if (baseIndex === void 0) { baseIndex = 0; } - return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.assertDefined(args[+index + baseIndex]); }); + return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.checkDefined(args[+index + baseIndex]); }); } ts.formatStringFromArgs = formatStringFromArgs; /* @internal */ @@ -18085,6 +18408,34 @@ var ts; return (negative && base10Value !== "0" ? "-" : "") + base10Value; } ts.pseudoBigIntToString = pseudoBigIntToString; + function isValidTypeOnlyAliasUseSite(useSite) { + return !!(useSite.flags & 8388608 /* Ambient */) + || isPartOfTypeQuery(useSite) + || isFirstIdentifierOfNonEmittingHeritageClause(useSite) + || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) + || !isExpressionNode(useSite); + } + ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite; + function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { + while (node.kind === 75 /* Identifier */ || node.kind === 194 /* PropertyAccessExpression */) { + node = node.parent; + } + if (node.kind !== 154 /* ComputedPropertyName */) { + return false; + } + if (hasModifier(node.parent, 128 /* Abstract */)) { + return true; + } + var containerKind = node.parent.parent.kind; + return containerKind === 246 /* InterfaceDeclaration */ || containerKind === 173 /* TypeLiteral */; + } + /** Returns true for the first identifier of 1) an `implements` clause, and 2) an `extends` clause of an interface. */ + function isFirstIdentifierOfNonEmittingHeritageClause(node) { + var _a, _b; + // Number of parents to climb from identifier is 2 for `implements I`, 3 for `implements x.I` + var heritageClause = (_a = ts.tryCast(node.parent.parent, ts.isHeritageClause)) !== null && _a !== void 0 ? _a : ts.tryCast((_b = node.parent.parent) === null || _b === void 0 ? void 0 : _b.parent, ts.isHeritageClause); + return (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.token) === 113 /* ImplementsKeyword */ || (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.parent.kind) === 246 /* InterfaceDeclaration */; + } })(ts || (ts = {})); var ts; (function (ts) { @@ -18513,7 +18864,7 @@ var ts; return visitNode(cbNode, node.expression); case 264 /* MissingDeclaration */: return visitNodes(cbNode, cbNodes, node.decorators); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return visitNodes(cbNode, cbNodes, node.elements); case 266 /* JsxElement */: return visitNode(cbNode, node.openingElement) || @@ -18553,24 +18904,27 @@ var ts; visitNode(cbNode, node.type); case 303 /* JSDocComment */: return visitNodes(cbNode, cbNodes, node.tags); - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return visitNode(cbNode, node.tagName) || (node.isNameFirst ? visitNode(cbNode, node.name) || visitNode(cbNode, node.typeExpression) : visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name)); - case 308 /* JSDocAuthorTag */: + case 309 /* JSDocAuthorTag */: return visitNode(cbNode, node.tagName); + case 308 /* JSDocImplementsTag */: + return visitNode(cbNode, node.tagName) || + visitNode(cbNode, node.class); case 307 /* JSDocAugmentsTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.class); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters); - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return visitNode(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 294 /* JSDocTypeExpression */ @@ -18578,14 +18932,14 @@ var ts; visitNode(cbNode, node.fullName) : visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression)); - case 314 /* JSDocCallbackTag */: + case 315 /* JSDocCallbackTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression); - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 318 /* JSDocThisTag */: - case 315 /* JSDocEnumTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 319 /* JSDocThisTag */: + case 316 /* JSDocEnumTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.typeExpression); case 305 /* JSDocSignature */: @@ -18595,17 +18949,85 @@ var ts; case 304 /* JSDocTypeLiteral */: return ts.forEach(node.jsDocPropertyTags, cbNode); case 306 /* JSDocTag */: - case 309 /* JSDocClassTag */: - case 310 /* JSDocPublicTag */: - case 311 /* JSDocPrivateTag */: - case 312 /* JSDocProtectedTag */: - case 313 /* JSDocReadonlyTag */: + case 310 /* JSDocClassTag */: + case 311 /* JSDocPublicTag */: + case 312 /* JSDocPrivateTag */: + case 313 /* JSDocProtectedTag */: + case 314 /* JSDocReadonlyTag */: return visitNode(cbNode, node.tagName); - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return visitNode(cbNode, node.expression); } } ts.forEachChild = forEachChild; + /** @internal */ + /** + * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes + * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; additionally, + * unlike `forEachChild`, embedded arrays are flattened and the 'cbNode' callback is invoked for each element. + * If a callback returns a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. + * + * @param node a given node to visit its children + * @param cbNode a callback to be invoked for all child nodes + * @param cbNodes a callback to be invoked for embedded array + * + * @remarks Unlike `forEachChild`, `forEachChildRecursively` handles recursively invoking the traversal on each child node found, + * and while doing so, handles traversing the structure without relying on the callstack to encode the tree structure. + */ + function forEachChildRecursively(rootNode, cbNode, cbNodes) { + var stack = [rootNode]; + while (stack.length) { + var parent = stack.pop(); + var res = visitAllPossibleChildren(parent, gatherPossibleChildren(parent)); + if (res) { + return res; + } + } + return; + function gatherPossibleChildren(node) { + var children = []; + forEachChild(node, addWorkItem, addWorkItem); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal + return children; + function addWorkItem(n) { + children.unshift(n); + } + } + function visitAllPossibleChildren(parent, children) { + for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { + var child = children_1[_i]; + if (ts.isArray(child)) { + if (cbNodes) { + var res = cbNodes(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + for (var i = child.length - 1; i >= 0; i--) { + var realChild = child[i]; + var res = cbNode(realChild, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + stack.push(realChild); + } + } + else { + stack.push(child); + var res = cbNode(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + } + } + } + ts.forEachChildRecursively = forEachChildRecursively; function createSourceFile(fileName, sourceText, languageVersion, setParentNodes, scriptKind) { if (setParentNodes === void 0) { setParentNodes = false; } ts.performance.mark("beforeParse"); @@ -18956,27 +19378,15 @@ var ts; // a syntax tree, and no semantic features, then the binding process is an unnecessary // overhead. This functions allows us to set all the parents, without all the expense of // binding. - var parent = rootNode; - forEachChild(rootNode, visitNode); - return; - function visitNode(n) { - // walk down setting parents that differ from the parent we think it should be. This - // allows us to quickly bail out of setting parents for subtrees during incremental - // parsing - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; - forEachChild(n, visitNode); - if (ts.hasJSDocNodes(n)) { - for (var _i = 0, _a = n.jsDoc; _i < _a.length; _i++) { - var jsDoc = _a[_i]; - jsDoc.parent = n; - parent = jsDoc; - forEachChild(jsDoc, visitNode); - } + forEachChildRecursively(rootNode, bindParentToChild); + function bindParentToChild(child, parent) { + child.parent = parent; + if (ts.hasJSDocNodes(child)) { + for (var _i = 0, _a = child.jsDoc; _i < _a.length; _i++) { + var doc = _a[_i]; + bindParentToChild(doc, child); + forEachChildRecursively(doc, bindParentToChild); } - parent = saveParent; } } } @@ -19147,8 +19557,11 @@ var ts; function reScanSlashToken() { return currentToken = scanner.reScanSlashToken(); } - function reScanTemplateToken() { - return currentToken = scanner.reScanTemplateToken(); + function reScanTemplateToken(isTaggedTemplate) { + return currentToken = scanner.reScanTemplateToken(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + return currentToken = scanner.reScanTemplateHeadOrNoSubstitutionTemplate(); } function reScanLessThanToken() { return currentToken = scanner.reScanLessThanToken(); @@ -19368,7 +19781,7 @@ var ts; // An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues // with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for // each identifier in order to reduce memory consumption. - function createIdentifier(isIdentifier, diagnosticMessage) { + function createIdentifier(isIdentifier, diagnosticMessage, privateIdentifierDiagnosticMessage) { identifierCount++; if (isIdentifier) { var node = createNode(75 /* Identifier */); @@ -19380,6 +19793,10 @@ var ts; nextTokenWithoutCheck(); return finishNode(node); } + if (token() === 76 /* PrivateIdentifier */) { + parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + return createIdentifier(/*isIdentifier*/ true); + } // Only for end of file because the error gets reported incorrectly on embedded script tags. var reportAtCurrentPosition = token() === 1 /* EndOfFileToken */; var isReservedWord = scanner.isReservedWord(); @@ -19389,8 +19806,8 @@ var ts; ts.Diagnostics.Identifier_expected; return createMissingNode(75 /* Identifier */, reportAtCurrentPosition, diagnosticMessage || defaultMessage, msgArg); } - function parseIdentifier(diagnosticMessage) { - return createIdentifier(isIdentifier(), diagnosticMessage); + function parseIdentifier(diagnosticMessage, privateIdentifierDiagnosticMessage) { + return createIdentifier(isIdentifier(), diagnosticMessage, privateIdentifierDiagnosticMessage); } function parseIdentifierName(diagnosticMessage) { return createIdentifier(ts.tokenIsIdentifierOrKeyword(token()), diagnosticMessage); @@ -19566,9 +19983,9 @@ var ts; return isIdentifier() && !isHeritageClauseExtendsOrImplementsKeyword(); } case 8 /* VariableDeclarations */: - return isIdentifierOrPattern(); + return isIdentifierOrPrivateIdentifierOrPattern(); case 10 /* ArrayBindingElements */: - return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isIdentifierOrPattern(); + return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isIdentifierOrPrivateIdentifierOrPattern(); case 19 /* TypeParameters */: return isIdentifier(); case 15 /* ArrayLiteralMembers */: @@ -20164,24 +20581,24 @@ var ts; } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } - function parseTemplateExpression() { + function parseTemplateExpression(isTaggedTemplate) { var template = createNode(211 /* TemplateExpression */); - template.head = parseTemplateHead(); + template.head = parseTemplateHead(isTaggedTemplate); ts.Debug.assert(template.head.kind === 15 /* TemplateHead */, "Template head has wrong token kind"); var list = []; var listPos = getNodePos(); do { - list.push(parseTemplateSpan()); + list.push(parseTemplateSpan(isTaggedTemplate)); } while (ts.last(list).literal.kind === 16 /* TemplateMiddle */); template.templateSpans = createNodeArray(list, listPos); return finishNode(template); } - function parseTemplateSpan() { + function parseTemplateSpan(isTaggedTemplate) { var span = createNode(221 /* TemplateSpan */); span.expression = allowInAnd(parseExpression); var literal; if (token() === 19 /* CloseBraceToken */) { - reScanTemplateToken(); + reScanTemplateToken(isTaggedTemplate); literal = parseTemplateMiddleOrTemplateTail(); } else { @@ -20193,7 +20610,10 @@ var ts; function parseLiteralNode() { return parseLiteralLikeNode(token()); } - function parseTemplateHead() { + function parseTemplateHead(isTaggedTemplate) { + if (isTaggedTemplate) { + reScanTemplateHeadOrNoSubstitutionTemplate(); + } var fragment = parseLiteralLikeNode(token()); ts.Debug.assert(fragment.kind === 15 /* TemplateHead */, "Template head has wrong token kind"); return fragment; @@ -20231,6 +20651,9 @@ var ts; if (node.kind === 8 /* NumericLiteral */) { node.numericLiteralFlags = scanner.getTokenFlags() & 1008 /* NumericLiteralFlags */; } + if (ts.isTemplateLiteralKind(node.kind)) { + node.templateFlags = scanner.getTokenFlags() & 2048 /* ContainsInvalidEscape */; + } nextToken(); finishNode(node); return node; @@ -20414,7 +20837,7 @@ var ts; } function isStartOfParameter(isJSDocParameter) { return token() === 25 /* DotDotDotToken */ || - isIdentifierOrPattern() || + isIdentifierOrPrivateIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 59 /* AtToken */ || isStartOfType(/*inStartOfParameter*/ !isJSDocParameter); @@ -20431,7 +20854,7 @@ var ts; node.dotDotDotToken = parseOptionalToken(25 /* DotDotDotToken */); // FormalParameter [Yield,Await]: // BindingElement[?Yield,?Await] - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_cannot_be_used_as_parameters); if (ts.getFullWidth(node.name) === 0 && !node.modifiers && ts.isModifierKind(token())) { // in cases like // 'use strict' @@ -21168,6 +21591,7 @@ var ts; case 29 /* LessThanToken */: case 127 /* AwaitKeyword */: case 121 /* YieldKeyword */: + case 76 /* PrivateIdentifier */: // Yield/await always starts an expression. Either it is an identifier (in which case // it is definitely an expression). Or it's a keyword (either because we're in // a generator or async function, or in strict mode (or both)) and it started a yield or await expression. @@ -22351,8 +22775,8 @@ var ts; tagExpression.questionDotToken = questionDotToken; tagExpression.typeArguments = typeArguments; tagExpression.template = token() === 14 /* NoSubstitutionTemplateLiteral */ - ? parseLiteralNode() - : parseTemplateExpression(); + ? (reScanTemplateHeadOrNoSubstitutionTemplate(), parseLiteralNode()) + : parseTemplateExpression(/*isTaggedTemplate*/ true); if (questionDotToken || tag.flags & 32 /* OptionalChain */) { tagExpression.flags |= 32 /* OptionalChain */; } @@ -22513,7 +22937,7 @@ var ts; } break; case 15 /* TemplateHead */: - return parseTemplateExpression(); + return parseTemplateExpression(/* isTaggedTemplate */ false); } return parseIdentifier(ts.Diagnostics.Expression_expected); } @@ -23277,24 +23701,27 @@ var ts; parseExpected(23 /* CloseBracketToken */); return finishNode(node); } - function isIdentifierOrPattern() { - return token() === 18 /* OpenBraceToken */ || token() === 22 /* OpenBracketToken */ || isIdentifier(); + function isIdentifierOrPrivateIdentifierOrPattern() { + return token() === 18 /* OpenBraceToken */ + || token() === 22 /* OpenBracketToken */ + || token() === 76 /* PrivateIdentifier */ + || isIdentifier(); } - function parseIdentifierOrPattern() { + function parseIdentifierOrPattern(privateIdentifierDiagnosticMessage) { if (token() === 22 /* OpenBracketToken */) { return parseArrayBindingPattern(); } if (token() === 18 /* OpenBraceToken */) { return parseObjectBindingPattern(); } - return parseIdentifier(); + return parseIdentifier(/*diagnosticMessage*/ undefined, privateIdentifierDiagnosticMessage); } function parseVariableDeclarationAllowExclamation() { return parseVariableDeclaration(/*allowExclamation*/ true); } function parseVariableDeclaration(allowExclamation) { var node = createNode(242 /* VariableDeclaration */); - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_are_not_allowed_in_variable_declarations); if (allowExclamation && node.name.kind === 75 /* Identifier */ && token() === 53 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) { node.exclamationToken = parseTokenNode(); @@ -23928,17 +24355,18 @@ var ts; } return finishNode(node); } - function parseNamespaceExport() { - var node = createNode(262 /* NamespaceExport */); + function parseNamespaceExport(pos) { + var node = createNode(262 /* NamespaceExport */, pos); node.name = parseIdentifier(); return finishNode(node); } function parseExportDeclaration(node) { node.kind = 260 /* ExportDeclaration */; node.isTypeOnly = parseOptional(145 /* TypeKeyword */); + var namespaceExportPos = scanner.getStartPos(); if (parseOptional(41 /* AsteriskToken */)) { if (parseOptional(123 /* AsKeyword */)) { - node.exportClause = parseNamespaceExport(); + node.exportClause = parseNamespaceExport(namespaceExportPos); } parseExpected(149 /* FromKeyword */); node.moduleSpecifier = parseModuleSpecifier(); @@ -24270,25 +24698,28 @@ var ts; case "author": tag = parseAuthorTag(start, tagName, margin); break; + case "implements": + tag = parseImplementsTag(start, tagName); + break; case "augments": case "extends": tag = parseAugmentsTag(start, tagName); break; case "class": case "constructor": - tag = parseSimpleTag(start, 309 /* JSDocClassTag */, tagName); + tag = parseSimpleTag(start, 310 /* JSDocClassTag */, tagName); break; case "public": - tag = parseSimpleTag(start, 310 /* JSDocPublicTag */, tagName); + tag = parseSimpleTag(start, 311 /* JSDocPublicTag */, tagName); break; case "private": - tag = parseSimpleTag(start, 311 /* JSDocPrivateTag */, tagName); + tag = parseSimpleTag(start, 312 /* JSDocPrivateTag */, tagName); break; case "protected": - tag = parseSimpleTag(start, 312 /* JSDocProtectedTag */, tagName); + tag = parseSimpleTag(start, 313 /* JSDocProtectedTag */, tagName); break; case "readonly": - tag = parseSimpleTag(start, 313 /* JSDocReadonlyTag */, tagName); + tag = parseSimpleTag(start, 314 /* JSDocReadonlyTag */, tagName); break; case "this": tag = parseThisTag(start, tagName); @@ -24340,10 +24771,12 @@ var ts; comments.push(text); indent += text.length; } - if (initialMargin) { + if (initialMargin !== undefined) { // jump straight to saving comments if there is some initial indentation - pushComment(initialMargin); - state = 2 /* SavingComments */; + if (initialMargin !== "") { + pushComment(initialMargin); + } + state = 1 /* SawAsterisk */; } var tok = token(); loop: while (true) { @@ -24471,7 +24904,7 @@ var ts; case 174 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: - return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object"; + return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; } } function parseParameterOrPropertyTag(start, tagName, target, indent) { @@ -24484,8 +24917,8 @@ var ts; typeExpression = tryParseTypeExpression(); } var result = target === 1 /* Property */ ? - createNode(322 /* JSDocPropertyTag */, start) : - createNode(316 /* JSDocParameterTag */, start); + createNode(323 /* JSDocPropertyTag */, start) : + createNode(317 /* JSDocParameterTag */, start); var comment = parseTagComments(indent + scanner.getStartPos() - start); var nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent); if (nestedTypeLiteral) { @@ -24508,7 +24941,7 @@ var ts; var start_3 = scanner.getStartPos(); var children = void 0; while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) { - if (child.kind === 316 /* JSDocParameterTag */ || child.kind === 322 /* JSDocPropertyTag */) { + if (child.kind === 317 /* JSDocParameterTag */ || child.kind === 323 /* JSDocPropertyTag */) { children = ts.append(children, child); } } @@ -24527,7 +24960,7 @@ var ts; if (ts.some(tags, ts.isJSDocReturnTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(317 /* JSDocReturnTag */, start); + var result = createNode(318 /* JSDocReturnTag */, start); result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); @@ -24536,13 +24969,13 @@ var ts; if (ts.some(tags, ts.isJSDocTypeTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(319 /* JSDocTypeTag */, start); + var result = createNode(320 /* JSDocTypeTag */, start); result.tagName = tagName; result.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); return finishNode(result); } function parseAuthorTag(start, tagName, indent) { - var result = createNode(308 /* JSDocAuthorTag */, start); + var result = createNode(309 /* JSDocAuthorTag */, start); result.tagName = tagName; var authorInfoWithEmail = tryParse(function () { return tryParseAuthorNameAndEmail(); }); if (!authorInfoWithEmail) { @@ -24595,6 +25028,12 @@ var ts; return comments.length === 0 ? undefined : comments.join(""); } } + function parseImplementsTag(start, tagName) { + var result = createNode(308 /* JSDocImplementsTag */, start); + result.tagName = tagName; + result.class = parseExpressionWithTypeArgumentsForAugments(); + return finishNode(result); + } function parseAugmentsTag(start, tagName) { var result = createNode(307 /* JSDocAugmentsTag */, start); result.tagName = tagName; @@ -24628,14 +25067,14 @@ var ts; return finishNode(tag); } function parseThisTag(start, tagName) { - var tag = createNode(318 /* JSDocThisTag */, start); + var tag = createNode(319 /* JSDocThisTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); return finishNode(tag); } function parseEnumTag(start, tagName) { - var tag = createNode(315 /* JSDocEnumTag */, start); + var tag = createNode(316 /* JSDocEnumTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); @@ -24644,7 +25083,7 @@ var ts; function parseTypedefTag(start, tagName, indent) { var typeExpression = tryParseTypeExpression(); skipWhitespaceOrAsterisk(); - var typedefTag = createNode(321 /* JSDocTypedefTag */, start); + var typedefTag = createNode(322 /* JSDocTypedefTag */, start); typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(); typedefTag.name = getJSDocTypeAliasName(typedefTag.fullName); @@ -24660,7 +25099,7 @@ var ts; if (!jsdocTypeLiteral) { jsdocTypeLiteral = createNode(304 /* JSDocTypeLiteral */, start); } - if (child.kind === 319 /* JSDocTypeTag */) { + if (child.kind === 320 /* JSDocTypeTag */) { if (childTypeTag) { break; } @@ -24706,7 +25145,7 @@ var ts; return typeNameOrNamespaceName; } function parseCallbackTag(start, tagName, indent) { - var callbackTag = createNode(314 /* JSDocCallbackTag */, start); + var callbackTag = createNode(315 /* JSDocCallbackTag */, start); callbackTag.tagName = tagName; callbackTag.fullName = parseJSDocTypeNameWithNamespace(); callbackTag.name = getJSDocTypeAliasName(callbackTag.fullName); @@ -24721,7 +25160,7 @@ var ts; var returnTag = tryParse(function () { if (parseOptionalJsdoc(59 /* AtToken */)) { var tag = parseTag(indent); - if (tag && tag.kind === 317 /* JSDocReturnTag */) { + if (tag && tag.kind === 318 /* JSDocReturnTag */) { return tag; } } @@ -24766,7 +25205,7 @@ var ts; case 59 /* AtToken */: if (canParseTag) { var child = tryParseChildTag(target, indent); - if (child && (child.kind === 316 /* JSDocParameterTag */ || child.kind === 322 /* JSDocPropertyTag */) && + if (child && (child.kind === 317 /* JSDocParameterTag */ || child.kind === 323 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; @@ -24833,10 +25272,10 @@ var ts; var typeParameter = createNode(155 /* TypeParameter */); typeParameter.name = parseJSDocIdentifierName(ts.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces); finishNode(typeParameter); - skipWhitespace(); + skipWhitespaceOrAsterisk(); typeParameters.push(typeParameter); } while (parseOptionalJsdoc(27 /* CommaToken */)); - var result = createNode(320 /* JSDocTemplateTag */, start); + var result = createNode(321 /* JSDocTemplateTag */, start); result.tagName = tagName; result.constraint = constraint; result.typeParameters = createNodeArray(typeParameters, typeParametersPos); @@ -26392,6 +26831,7 @@ var ts; { name: "noErrorTruncation", type: "boolean", + affectsSemanticDiagnostics: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Do_not_truncate_error_messages }, @@ -26521,6 +26961,7 @@ var ts; { name: "forceConsistentCasingInFileNames", type: "boolean", + affectsModuleResolution: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file }, @@ -26722,6 +27163,7 @@ var ts; createDiagnostics(diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnostics(diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption); } + /*@internal*/ function parseCommandLineWorker(diagnostics, commandLine, readFile) { var options = {}; var watchOptions; @@ -26798,50 +27240,78 @@ var ts; parseStrings(args); } } + ts.parseCommandLineWorker = parseCommandLineWorker; function parseOptionValue(args, i, diagnostics, opt, options, errors) { if (opt.isTSConfigOnly) { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name)); + var optValue = args[i]; + if (optValue === "null") { + options[opt.name] = undefined; + i++; + } + else if (opt.type === "boolean") { + if (optValue === "false") { + options[opt.name] = false; + i++; + } + else { + if (optValue === "true") + i++; + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, opt.name)); + } + } + else { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, opt.name)); + if (optValue && !ts.startsWith(optValue, "-")) + i++; + } } else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). if (!args[i] && opt.type !== "boolean") { errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name, getCompilerOptionValueTypeString(opt))); } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i]); - i++; - break; - case "boolean": - // boolean flag has optional value true, false, others - var optValue = args[i]; - options[opt.name] = optValue !== "false"; - // consume next argument as boolean flag value - if (optValue === "false" || optValue === "true") { + if (args[i] !== "null") { + switch (opt.type) { + case "number": + options[opt.name] = parseInt(args[i]); i++; - } - break; - case "string": - options[opt.name] = args[i] || ""; - i++; - break; - case "list": - var result = parseListTypeOption(opt, args[i], errors); - options[opt.name] = result || []; - if (result) { + break; + case "boolean": + // boolean flag has optional value true, false, others + var optValue = args[i]; + options[opt.name] = optValue !== "false"; + // consume next argument as boolean flag value + if (optValue === "false" || optValue === "true") { + i++; + } + break; + case "string": + options[opt.name] = args[i] || ""; i++; - } - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - options[opt.name] = parseCustomTypeOption(opt, args[i], errors); - i++; - break; + break; + case "list": + var result = parseListTypeOption(opt, args[i], errors); + options[opt.name] = result || []; + if (result) { + i++; + } + break; + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + options[opt.name] = parseCustomTypeOption(opt, args[i], errors); + i++; + break; + } + } + else { + options[opt.name] = undefined; + i++; } } return i; } - var compilerOptionsDidYouMeanDiagnostics = { + /*@internal*/ + ts.compilerOptionsDidYouMeanDiagnostics = { getOptionsNameMap: getOptionsNameMap, optionDeclarations: ts.optionDeclarations, unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, @@ -26849,7 +27319,7 @@ var ts; optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); + return parseCommandLineWorker(ts.compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; /** @internal */ @@ -27026,7 +27496,7 @@ var ts; name: "compilerOptions", type: "object", elementOptions: getCommandLineCompilerOptionsMap(), - extraKeyDiagnostics: compilerOptionsDidYouMeanDiagnostics, + extraKeyDiagnostics: ts.compilerOptionsDidYouMeanDiagnostics, }, { name: "watchOptions", @@ -27504,7 +27974,7 @@ var ts; } ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { - if (option) { + if (option && !isNullOrUndefined(value)) { if (option.type === "list") { var values = value; if (option.element.isFilePath && values.length) { @@ -27855,7 +28325,7 @@ var ts; } function getExtendedConfig(sourceFile, extendedConfigPath, host, basePath, resolutionStack, errors, extendedConfigCache) { var _a; - var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toLowerCase(extendedConfigPath); + var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toFileNameLowerCase(extendedConfigPath); var value; var extendedResult; var extendedConfig; @@ -27925,7 +28395,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, compilerOptionsDidYouMeanDiagnostics, errors); + convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, ts.compilerOptionsDidYouMeanDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -28112,7 +28582,7 @@ var ts; function getFileNamesFromConfigSpecs(spec, basePath, options, host, extraFileExtensions) { if (extraFileExtensions === void 0) { extraFileExtensions = []; } basePath = ts.normalizePath(basePath); - var keyMapper = host.useCaseSensitiveFileNames ? ts.identity : ts.toLowerCase; + var keyMapper = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); // Literal file names (provided via the "files" array in tsconfig.json) are stored in a // file map with a possibly case insensitive key. We use this map later when when including // wildcard paths. @@ -28271,7 +28741,7 @@ var ts; var match = wildcardDirectoryPattern.exec(spec); if (match) { return { - key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(), + key: useCaseSensitiveFileNames ? match[0] : ts.toFileNameLowerCase(match[0]), flags: watchRecursivePattern.test(spec) ? 1 /* Recursive */ : 0 /* None */ }; } @@ -29991,7 +30461,7 @@ var ts; } } function getDisplayName(node) { - return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.assertDefined(getDeclarationName(node))); + return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.checkDefined(getDeclarationName(node))); } /** * Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. @@ -30392,9 +30862,9 @@ var ts; case 196 /* CallExpression */: bindCallExpressionFlow(node); break; - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime @@ -30501,9 +30971,12 @@ var ts; function createLoopLabel() { return initFlowNode({ flags: 8 /* LoopLabel */, antecedents: undefined }); } + function createReduceLabel(target, antecedents, antecedent) { + return initFlowNode({ flags: 1024 /* ReduceLabel */, target: target, antecedents: antecedents, antecedent: antecedent }); + } function setFlowNodeReferenced(flow) { // On first reference we set the Referenced flag, thereafter we set the Shared flag - flow.flags |= flow.flags & 1024 /* Referenced */ ? 2048 /* Shared */ : 1024 /* Referenced */; + flow.flags |= flow.flags & 2048 /* Referenced */ ? 4096 /* Shared */ : 2048 /* Referenced */; } function addAntecedent(label, antecedent) { if (!(antecedent.flags & 1 /* Unreachable */) && !ts.contains(label.antecedents, antecedent)) { @@ -30734,35 +31207,36 @@ var ts; } } function bindTryStatement(node) { - var preFinallyLabel = createBranchLabel(); // We conservatively assume that *any* code in the try block can cause an exception, but we only need // to track code that causes mutations (because only mutations widen the possible control flow type of - // a variable). The currentExceptionTarget is the target label for control flows that result from - // exceptions. We add all mutation flow nodes as antecedents of this label such that we can analyze them - // as possible antecedents of the start of catch or finally blocks. Furthermore, we add the current - // control flow to represent exceptions that occur before any mutations. + // a variable). The exceptionLabel is the target label for control flows that result from exceptions. + // We add all mutation flow nodes as antecedents of this label such that we can analyze them as possible + // antecedents of the start of catch or finally blocks. Furthermore, we add the current control flow to + // represent exceptions that occur before any mutations. var saveReturnTarget = currentReturnTarget; var saveExceptionTarget = currentExceptionTarget; - currentReturnTarget = createBranchLabel(); - currentExceptionTarget = node.catchClause ? createBranchLabel() : currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + var normalExitLabel = createBranchLabel(); + var returnLabel = createBranchLabel(); + var exceptionLabel = createBranchLabel(); + if (node.finallyBlock) { + currentReturnTarget = returnLabel; + } + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.tryBlock); - addAntecedent(preFinallyLabel, currentFlow); - var flowAfterTry = currentFlow; - var flowAfterCatch = unreachableFlow; + addAntecedent(normalExitLabel, currentFlow); if (node.catchClause) { // Start of catch clause is the target of exceptions from try block. - currentFlow = finishFlowLabel(currentExceptionTarget); + currentFlow = finishFlowLabel(exceptionLabel); // The currentExceptionTarget now represents control flows from exceptions in the catch clause. // Effectively, in a try-catch-finally, if an exception occurs in the try block, the catch block // acts like a second try block. - currentExceptionTarget = currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + exceptionLabel = createBranchLabel(); + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.catchClause); - addAntecedent(preFinallyLabel, currentFlow); - flowAfterCatch = currentFlow; + addAntecedent(normalExitLabel, currentFlow); } - var exceptionTarget = finishFlowLabel(currentExceptionTarget); currentReturnTarget = saveReturnTarget; currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { @@ -30775,35 +31249,33 @@ var ts; // When analyzing a control flow graph that starts inside a finally block we want to consider all // five possibilities above. However, when analyzing a control flow graph that starts outside (past) // the finally block, we only want to consider the first two (if we're past a finally block then it - // must have completed normally). To make this possible, we inject two extra nodes into the control - // flow graph: An after-finally with an antecedent of the control flow at the end of the finally - // block, and a pre-finally with an antecedent that represents all exceptional control flows. The - // 'lock' property of the pre-finally references the after-finally, and the after-finally has a - // boolean 'locked' property that we set to true when analyzing a control flow that contained the - // the after-finally node. When the lock associated with a pre-finally is locked, the antecedent of - // the pre-finally (i.e. the exceptional control flows) are skipped. - var preFinallyFlow = initFlowNode({ flags: 4096 /* PreFinally */, antecedent: exceptionTarget, lock: {} }); - addAntecedent(preFinallyLabel, preFinallyFlow); - currentFlow = finishFlowLabel(preFinallyLabel); + // must have completed normally). Likewise, when analyzing a control flow graph from return statements + // in try or catch blocks in an IIFE, we only want to consider the third. To make this possible, we + // inject a ReduceLabel node into the control flow graph. This node contains an alternate reduced + // set of antecedents for the pre-finally label. As control flow analysis passes by a ReduceLabel + // node, the pre-finally label is temporarily switched to the reduced antecedent set. + var finallyLabel = createBranchLabel(); + finallyLabel.antecedents = ts.concatenate(ts.concatenate(normalExitLabel.antecedents, exceptionLabel.antecedents), returnLabel.antecedents); + currentFlow = finallyLabel; bind(node.finallyBlock); - // If the end of the finally block is reachable, but the end of the try and catch blocks are not, - // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should - // result in an unreachable current control flow. - if (!(currentFlow.flags & 1 /* Unreachable */)) { - if ((flowAfterTry.flags & 1 /* Unreachable */) && (flowAfterCatch.flags & 1 /* Unreachable */)) { - currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow - ? reportedUnreachableFlow - : unreachableFlow; - } + if (currentFlow.flags & 1 /* Unreachable */) { + // If the end of the finally block is unreachable, the end of the entire try statement is unreachable. + currentFlow = unreachableFlow; } - if (!(currentFlow.flags & 1 /* Unreachable */)) { - var afterFinallyFlow = initFlowNode({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); - preFinallyFlow.lock = afterFinallyFlow; - currentFlow = afterFinallyFlow; + else { + // If we have an IIFE return target and return statements in the try or catch blocks, add a control + // flow that goes back through the finally block and back through only the return statements. + if (currentReturnTarget && returnLabel.antecedents) { + addAntecedent(currentReturnTarget, createReduceLabel(finallyLabel, returnLabel.antecedents, currentFlow)); + } + // If the end of the finally block is reachable, but the end of the try and catch blocks are not, + // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should + // result in an unreachable current control flow. + currentFlow = normalExitLabel.antecedents ? createReduceLabel(finallyLabel, normalExitLabel.antecedents, currentFlow) : unreachableFlow; } } else { - currentFlow = finishFlowLabel(preFinallyLabel); + currentFlow = finishFlowLabel(normalExitLabel); } } function bindSwitchStatement(node) { @@ -30961,28 +31433,145 @@ var ts; bindAssignmentTargetFlow(node.operand); } } + var BindBinaryExpressionFlowState; + (function (BindBinaryExpressionFlowState) { + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindThenBindChildren"] = 0] = "BindThenBindChildren"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["MaybeBindLeft"] = 1] = "MaybeBindLeft"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindToken"] = 2] = "BindToken"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindRight"] = 3] = "BindRight"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["FinishBind"] = 4] = "FinishBind"; + })(BindBinaryExpressionFlowState || (BindBinaryExpressionFlowState = {})); function bindBinaryExpressionFlow(node) { - var operator = node.operatorToken.kind; - if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { - if (isTopLevelLogicalExpression(node)) { - var postExpressionLabel = createBranchLabel(); - bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); - currentFlow = finishFlowLabel(postExpressionLabel); + var workStacks = { + expr: [node], + state: [1 /* MaybeBindLeft */], + inStrictMode: [undefined], + parent: [undefined], + subtreeFlags: [undefined] + }; + var stackIndex = 0; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0 /* BindThenBindChildren */: { + // This state is used only when recuring, to emulate the work that `bind` does before + // reaching `bindChildren`. A normal call to `bindBinaryExpressionFlow` will already have done this work. + node.parent = parent; + var saveInStrictMode = inStrictMode; + bindWorker(node); + var saveParent = parent; + parent = node; + var subtreeFlagsState = void 0; + // While this next part does the work of `bindChildren` before it descends into `bindChildrenWorker` + // and uses `subtreeFlagsState` to queue up the work that needs to be done once the node is bound. + if (skipTransformFlagAggregation) { + // do nothing extra + } + else if (node.transformFlags & 536870912 /* HasComputedFlags */) { + skipTransformFlagAggregation = true; + subtreeFlagsState = -1; + } + else { + var savedSubtreeTransformFlags = subtreeTransformFlags; + subtreeTransformFlags = 0; + subtreeFlagsState = savedSubtreeTransformFlags; + } + advanceState(1 /* MaybeBindLeft */, saveInStrictMode, saveParent, subtreeFlagsState); + break; + } + case 1 /* MaybeBindLeft */: { + var operator = node.operatorToken.kind; + // TODO: bindLogicalExpression is recursive - if we want to handle deeply nested `&&` expressions + // we'll need to handle the `bindLogicalExpression` scenarios in this state machine, too + // For now, though, since the common cases are chained `+`, leaving it recursive is fine + if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { + if (isTopLevelLogicalExpression(node)) { + var postExpressionLabel = createBranchLabel(); + bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); + currentFlow = finishFlowLabel(postExpressionLabel); + } + else { + bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + completeNode(); + } + else { + advanceState(2 /* BindToken */); + maybeBind(node.left); + } + break; + } + case 2 /* BindToken */: { + advanceState(3 /* BindRight */); + maybeBind(node.operatorToken); + break; + } + case 3 /* BindRight */: { + advanceState(4 /* FinishBind */); + maybeBind(node.right); + break; + } + case 4 /* FinishBind */: { + var operator = node.operatorToken.kind; + if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { + bindAssignmentTargetFlow(node.left); + if (operator === 62 /* EqualsToken */ && node.left.kind === 195 /* ElementAccessExpression */) { + var elementAccess = node.left; + if (isNarrowableOperand(elementAccess.expression)) { + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); + } + } + } + completeNode(); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for bindBinaryExpressionFlow"); } - else { - bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + /** + * Note that `advanceState` sets the _current_ head state, and that `maybeBind` potentially pushes on a new + * head state; so `advanceState` must be called before any `maybeBind` during a state's execution. + */ + function advanceState(state, isInStrictMode, parent, subtreeFlags) { + workStacks.state[stackIndex] = state; + if (isInStrictMode !== undefined) { + workStacks.inStrictMode[stackIndex] = isInStrictMode; + } + if (parent !== undefined) { + workStacks.parent[stackIndex] = parent; + } + if (subtreeFlags !== undefined) { + workStacks.subtreeFlags[stackIndex] = subtreeFlags; } } - else { - bindEachChild(node); - if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { - bindAssignmentTargetFlow(node.left); - if (operator === 62 /* EqualsToken */ && node.left.kind === 195 /* ElementAccessExpression */) { - var elementAccess = node.left; - if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); - } + function completeNode() { + if (workStacks.inStrictMode[stackIndex] !== undefined) { + if (workStacks.subtreeFlags[stackIndex] === -1) { + skipTransformFlagAggregation = false; + subtreeTransformFlags |= node.transformFlags & ~getTransformFlagsSubtreeExclusions(node.kind); + } + else if (workStacks.subtreeFlags[stackIndex] !== undefined) { + subtreeTransformFlags = workStacks.subtreeFlags[stackIndex] | computeTransformFlagsForNode(node, subtreeTransformFlags); } + inStrictMode = workStacks.inStrictMode[stackIndex]; + parent = workStacks.parent[stackIndex]; + } + stackIndex--; + } + /** + * If `node` is a BinaryExpression, adds it to the local work stack, otherwise recursively binds it + */ + function maybeBind(node) { + if (node && ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0 /* BindThenBindChildren */; + workStacks.inStrictMode[stackIndex] = undefined; + workStacks.parent[stackIndex] = undefined; + workStacks.subtreeFlags[stackIndex] = undefined; + } + else { + bind(node); } } } @@ -31027,7 +31616,7 @@ var ts; } function bindJSDocTypeAlias(node) { node.tagName.parent = node; - if (node.kind !== 315 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 316 /* JSDocEnumTag */ && node.fullName) { setParentPointers(node, node.fullName); } } @@ -31243,8 +31832,8 @@ var ts; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 300 /* JSDocFunctionType */: - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: case 247 /* TypeAliasDeclaration */: case 186 /* MappedType */: // All the children of these container types are never visible through another @@ -31449,7 +32038,9 @@ var ts; container = declName.parent.expression.name; break; case 5 /* Property */: - container = ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression; + container = isExportsOrModuleExportsOrAlias(file, declName.parent.expression) ? file + : ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name + : declName.parent.expression; break; case 0 /* None */: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); @@ -31864,7 +32455,7 @@ var ts; case 304 /* JSDocTypeLiteral */: case 186 /* MappedType */: return bindAnonymousTypeWorker(node); - case 309 /* JSDocClassTag */: + case 310 /* JSDocClassTag */: return bindJSDocClassTag(node); case 193 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); @@ -31932,7 +32523,7 @@ var ts; // falls through case 250 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: if (node.parent.kind === 305 /* JSDocSignature */) { return bindParameter(node); } @@ -31940,15 +32531,15 @@ var ts; break; } // falls through - case 322 /* JSDocPropertyTag */: + case 323 /* JSDocPropertyTag */: var propTag = node; var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 299 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -32020,6 +32611,9 @@ var ts; declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* ExportStar */, 0 /* None */); } else if (ts.isNamespaceExport(node.exportClause)) { + // declareSymbol walks up parents to find name text, parent _must_ be set + // but won't be set by the normal binder walk until `bindChildren` later on. + node.exportClause.parent = node; declareSymbol(container.symbol.exports, container.symbol, node.exportClause, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } } @@ -32455,7 +33049,7 @@ var ts; } } function bindParameter(node) { - if (node.kind === 316 /* JSDocParameterTag */ && container.kind !== 305 /* JSDocSignature */) { + if (node.kind === 317 /* JSDocParameterTag */ && container.kind !== 305 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 8388608 /* Ambient */)) { @@ -33172,7 +33766,7 @@ var ts; break; case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: // These nodes are TypeScript syntax. transformFlags |= 1 /* AssertTypeScript */; excludeFlags = 536870912 /* OuterExpressionExcludes */; @@ -33209,8 +33803,18 @@ var ts; case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: case 17 /* TemplateTail */: - case 211 /* TemplateExpression */: + if (node.templateFlags) { + transformFlags |= 32 /* AssertES2018 */; + break; + } + // falls through case 198 /* TaggedTemplateExpression */: + if (ts.hasInvalidEscape(node.template)) { + transformFlags |= 32 /* AssertES2018 */; + break; + } + // falls through + case 211 /* TemplateExpression */: case 282 /* ShorthandPropertyAssignment */: case 120 /* StaticKeyword */: case 219 /* MetaProperty */: @@ -33437,7 +34041,7 @@ var ts; return 536879104 /* BindingPatternExcludes */; case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: case 200 /* ParenthesizedExpression */: case 102 /* SuperKeyword */: return 536870912 /* OuterExpressionExcludes */; @@ -33771,8 +34375,7 @@ var ts; TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType"; TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; - TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; - TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 7] = "ResolvedTypeArguments"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 6] = "ResolvedTypeArguments"; })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); var CheckMode; (function (CheckMode) { @@ -33899,6 +34502,7 @@ var ts; var typeCount = 0; var symbolCount = 0; var enumCount = 0; + var totalInstantiationCount = 0; var instantiationCount = 0; var instantiationDepth = 0; var constraintDepth = 0; @@ -33941,6 +34545,7 @@ var ts; getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount") + symbolCount; }, getTypeCount: function () { return typeCount; }, + getInstantiationCount: function () { return totalInstantiationCount; }, getRelationCacheSizes: function () { return ({ assignable: assignableRelation.size, identity: identityRelation.size, @@ -34008,7 +34613,8 @@ var ts; }, getSymbolAtLocation: function (node) { node = ts.getParseTreeNode(node); - return node ? getSymbolAtLocation(node) : undefined; + // set ignoreErrors: true because any lookups invoked by the API shouldn't cause any new errors + return node ? getSymbolAtLocation(node, /*ignoreErrors*/ true) : undefined; }, getShorthandAssignmentValueSymbol: function (node) { node = ts.getParseTreeNode(node); @@ -34061,7 +34667,29 @@ var ts; getRootSymbols: getRootSymbols, getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node, contextFlags) : undefined; + if (!node) { + return undefined; + } + var containingCall = ts.findAncestor(node, ts.isCallLikeExpression); + var containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; + if (contextFlags & 4 /* Completions */ && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = true; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = undefined; + } + var result = getContextualType(node, contextFlags); + if (contextFlags & 4 /* Completions */ && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = undefined; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + } + return result; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -34301,9 +34929,9 @@ var ts; var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); var iterationTypesCache = ts.createMap(); // cache for common IterationTypes instances var noIterationTypes = { - get yieldType() { throw new Error("Not supported"); }, - get returnType() { throw new Error("Not supported"); }, - get nextType() { throw new Error("Not supported"); }, + get yieldType() { return ts.Debug.fail("Not supported"); }, + get returnType() { return ts.Debug.fail("Not supported"); }, + get nextType() { return ts.Debug.fail("Not supported"); }, }; var anyIterationTypes = createIterationTypes(anyType, anyType, anyType); var anyIterationTypesExceptNext = createIterationTypes(anyType, anyType, unknownType); @@ -34451,6 +35079,7 @@ var ts; if (jsxPragma) { var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); + ts.visitNode(file.localJsxFactory, markAsSynthetic); if (file.localJsxFactory) { return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } @@ -34461,6 +35090,7 @@ var ts; _jsxNamespace = "React"; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); + ts.visitNode(_jsxFactoryEntity, markAsSynthetic); if (_jsxFactoryEntity) { _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } @@ -34469,7 +35099,15 @@ var ts; _jsxNamespace = ts.escapeLeadingUnderscores(compilerOptions.reactNamespace); } } + if (!_jsxFactoryEntity) { + _jsxFactoryEntity = ts.createQualifiedName(ts.createIdentifier(ts.unescapeLeadingUnderscores(_jsxNamespace)), "createElement"); + } return _jsxNamespace; + function markAsSynthetic(node) { + node.pos = -1; + node.end = -1; + return ts.visitEachChild(node, markAsSynthetic, ts.nullTransformationContext); + } } function getEmitResolver(sourceFile, cancellationToken) { // Ensure we have all the type information in place for this file so that all the @@ -34858,7 +35496,14 @@ var ts; } else if (ts.isPropertyDeclaration(declaration)) { // still might be illegal if a self-referencing property initializer (eg private x = this.x) - return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage); + return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, /*stopAtAnyPropertyDeclaration*/ false); + } + else if (ts.isParameterPropertyDeclaration(declaration, declaration.parent)) { + var container_3 = ts.getEnclosingBlockScopeContainer(declaration.parent); + // foo = this.bar is illegal in esnext+useDefineForClassFields when bar is a parameter property + return !(compilerOptions.target === 99 /* ESNext */ && !!compilerOptions.useDefineForClassFields + && ts.getContainingClass(declaration) === ts.getContainingClass(usage) + && isUsedInFunctionOrInstanceProperty(usage, declaration, container_3)); } return true; } @@ -34866,6 +35511,7 @@ var ts; // 1. inside an export specifier // 2. inside a function // 3. inside an instance property initializer, a reference to a non-instance property + // (except when target: "esnext" and useDefineForClassFields: true and the reference is to a parameter property) // 4. inside a static property initializer, a reference to a static method in the same class // 5. inside a TS export= declaration (since we will move the export statement during emit to avoid TDZ) // or if usage is in a type context: @@ -34880,7 +35526,19 @@ var ts; return true; } var container = ts.getEnclosingBlockScopeContainer(declaration); - return !!(usage.flags & 4194304 /* JSDoc */) || isInTypeQuery(usage) || isUsedInFunctionOrInstanceProperty(usage, declaration, container); + if (!!(usage.flags & 4194304 /* JSDoc */) || isInTypeQuery(usage)) { + return true; + } + if (isUsedInFunctionOrInstanceProperty(usage, declaration, container)) { + if (compilerOptions.target === 99 /* ESNext */ && !!compilerOptions.useDefineForClassFields) { + return (ts.isPropertyDeclaration(declaration) || ts.isParameterPropertyDeclaration(declaration, declaration.parent)) && + !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, /*stopAtAnyPropertyDeclaration*/ true); + } + else { + return true; + } + } + return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); switch (declaration.parent.parent.kind) { @@ -34925,7 +35583,8 @@ var ts; return false; }); } - function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage) { + /** stopAtAnyPropertyDeclaration is used for detecting ES-standard class field use-before-def errors */ + function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, stopAtAnyPropertyDeclaration) { // always legal if usage is after declaration if (usage.end > declaration.end) { return false; @@ -34938,8 +35597,13 @@ var ts; } switch (node.kind) { case 202 /* ArrowFunction */: - case 159 /* PropertyDeclaration */: return true; + case 159 /* PropertyDeclaration */: + // even when stopping at any property declaration, they need to come from the same class + return stopAtAnyPropertyDeclaration && + (ts.isPropertyDeclaration(declaration) && node.parent === declaration.parent + || ts.isParameterPropertyDeclaration(declaration, declaration.parent) && node.parent === declaration.parent.parent) + ? "quit" : true; case 223 /* Block */: switch (node.parent.kind) { case 163 /* GetAccessor */: @@ -35217,9 +35881,9 @@ var ts; location = location.parent; } break; - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: // js type aliases do not resolve names from their host, so skip past it location = ts.getJSDocHost(location); break; @@ -35273,6 +35937,7 @@ var ts; !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && + !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { @@ -35297,9 +35962,10 @@ var ts; } // Perform extra checks only if error reporting was requested if (nameNotFoundMessage) { - if (propertyWithInvalidInitializer) { + if (propertyWithInvalidInitializer && !(compilerOptions.target === 99 /* ESNext */ && compilerOptions.useDefineForClassFields)) { // We have a match, but the reference occurred within a property initializer and the identifier also binds - // to a local variable in the constructor where the code will be emitted. + // to a local variable in the constructor where the code will be emitted. Note that this is actually allowed + // with ESNext+useDefineForClassFields because the scope semantics are different. var propertyName = propertyWithInvalidInitializer.name; error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), diagnosticName(nameArg)); return undefined; @@ -35343,9 +36009,27 @@ var ts; error(errorLocation, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(associatedDeclarationForContainingInitializer.name), ts.declarationNameToString(errorLocation)); } } + if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */) { + checkSymbolUsageInExpressionContext(result, name, errorLocation); + } } return result; } + function checkSymbolUsageInExpressionContext(symbol, name, useSite) { + if (!ts.isValidTypeOnlyAliasUseSite(useSite)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol); + if (typeOnlyDeclaration) { + var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type + : ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + var unescapedName = ts.unescapeLeadingUnderscores(name); + ts.addRelatedInfo(error(useSite, message, unescapedName), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, unescapedName)); + } + } + } function getIsDeferredContext(location, lastLocation) { if (location.kind !== 202 /* ArrowFunction */ && location.kind !== 201 /* FunctionExpression */) { // initializers in instance property declaration of class like entities are executed in constructor and thus deferred @@ -35478,9 +36162,19 @@ var ts; } return false; } + function isPrimitiveTypeName(name) { + return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; + } + function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 263 /* ExportSpecifier */) { + error(errorLocation, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); + return true; + } + return false; + } function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) { if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */)) { - if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") { + if (isPrimitiveTypeName(name)) { error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name)); return true; } @@ -35511,9 +36205,7 @@ var ts; if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */ & ~788968 /* Type */)) { var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 /* NamespaceModule */ & ~111551 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); if (symbol) { - error(errorLocation, ts.isTypeOnlyEnumAlias(symbol) - ? ts.Diagnostics.Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported - : ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); + error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); return true; } } @@ -35581,19 +36273,78 @@ var ts; } } function getDeclarationOfAliasSymbol(symbol) { - return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration); + return ts.find(symbol.declarations, isAliasSymbolDeclaration); + } + /** + * An alias symbol is created by one of the following declarations: + * import = ... + * import from ... + * import * as from ... + * import { x as } from ... + * export { x as } from ... + * export * as ns from ... + * export = + * export default + * module.exports = + * {} + * {name: } + */ + function isAliasSymbolDeclaration(node) { + return node.kind === 253 /* ImportEqualsDeclaration */ || + node.kind === 252 /* NamespaceExportDeclaration */ || + node.kind === 255 /* ImportClause */ && !!node.name || + node.kind === 256 /* NamespaceImport */ || + node.kind === 262 /* NamespaceExport */ || + node.kind === 258 /* ImportSpecifier */ || + node.kind === 263 /* ExportSpecifier */ || + node.kind === 259 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node) || + ts.isBinaryExpression(node) && ts.getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && ts.exportAssignmentIsAlias(node) || + ts.isPropertyAccessExpression(node) + && ts.isBinaryExpression(node.parent) + && node.parent.left === node + && node.parent.operatorToken.kind === 62 /* EqualsToken */ + && isAliasableOrJsExpression(node.parent.right) || + node.kind === 282 /* ShorthandPropertyAssignment */ || + node.kind === 281 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer); + } + function isAliasableOrJsExpression(e) { + return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { if (node.moduleReference.kind === 265 /* ExternalModuleReference */) { - return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); + var immediate = resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)); + var resolved_4 = resolveExternalModuleSymbol(immediate); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved_4, /*overwriteEmpty*/ false); + return resolved_4; } - return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); + var resolved = getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); + checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved); + return resolved; } - function resolveExportByName(moduleSymbol, name, dontResolveAlias) { + function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) { + if (markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node)); + var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type + : ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + // Non-null assertion is safe because the optionality comes from ImportClause, + // but if an ImportClause was the typeOnlyDeclaration, it had to have a `name`. + var name = ts.unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + ts.addRelatedInfo(error(node.moduleReference, message), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); + } + } + function resolveExportByName(moduleSymbol, name, sourceNode, dontResolveAlias) { var exportValue = moduleSymbol.exports.get("export=" /* ExportEquals */); - return exportValue - ? getPropertyOfType(getTypeOfSymbol(exportValue), name) - : resolveSymbol(moduleSymbol.exports.get(name), dontResolveAlias); + if (exportValue) { + return getPropertyOfType(getTypeOfSymbol(exportValue), name); + } + var exportSymbol = moduleSymbol.exports.get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(sourceNode, exportSymbol, resolved, /*overwriteEmpty*/ false); + return resolved; } function isSyntacticDefault(node) { return ((ts.isExportAssignment(node) && !node.isExportEquals) || ts.hasModifier(node, 512 /* Default */) || ts.isExportSpecifier(node)); @@ -35605,13 +36356,13 @@ var ts; // Declaration files (and ambient modules) if (!file || file.isDeclarationFile) { // Definitely cannot have a synthetic default if they have a syntactic default member specified - var defaultExportSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, /*dontResolveAlias*/ true); // Dont resolve alias because we want the immediately exported symbol's declaration + var defaultExportSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, /*sourceNode*/ undefined, /*dontResolveAlias*/ true); // Dont resolve alias because we want the immediately exported symbol's declaration if (defaultExportSymbol && ts.some(defaultExportSymbol.declarations, isSyntacticDefault)) { return false; } // It _might_ still be incorrect to assume there is no __esModule marker on the import at runtime, even if there is no `default` member // So we check a bit more, - if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias)) { + if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), /*sourceNode*/ undefined, dontResolveAlias)) { // If there is an `__esModule` specified in the declaration (meaning someone explicitly added it or wrote it in their code), // it definitely is a module and does not have a synthetic default return false; @@ -35626,7 +36377,7 @@ var ts; return hasExportAssignmentSymbol(moduleSymbol); } // JS files have a synthetic default if they do not contain ES2015+ module syntax (export = is not valid in js) _and_ do not have an __esModule marker - return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias); + return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), /*sourceNode*/ undefined, dontResolveAlias); } function getTargetOfImportClause(node, dontResolveAlias) { var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier); @@ -35636,7 +36387,7 @@ var ts; exportDefaultSymbol = moduleSymbol; } else { - exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, dontResolveAlias); + exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, node, dontResolveAlias); } var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); var hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias); @@ -35659,26 +36410,27 @@ var ts; } else if (hasSyntheticDefault) { // per emit behavior, a synthetic default overrides a "real" .default member if `__esModule` is not present - return maybeTypeOnly(resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || - resolveSymbol(moduleSymbol, dontResolveAlias)); - } - return maybeTypeOnly(exportDefaultSymbol); - } - function maybeTypeOnly(symbol) { - if (symbol && node.isTypeOnly && node.name) { - return createTypeOnlyImportOrExport(node.name, symbol); + var resolved = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, moduleSymbol, resolved, /*overwriteTypeOnly*/ false); + return resolved; } - return symbol; + markSymbolOfAliasDeclarationIfTypeOnly(node, exportDefaultSymbol, /*finalTarget*/ undefined, /*overwriteTypeOnly*/ false); + return exportDefaultSymbol; } } function getTargetOfNamespaceImport(node, dontResolveAlias) { var moduleSpecifier = node.parent.parent.moduleSpecifier; - var moduleSymbol = resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); - return moduleSymbol && node.parent.isTypeOnly ? createTypeOnlySymbol(moduleSymbol) : moduleSymbol; + var immediate = resolveExternalModuleName(node, moduleSpecifier); + var resolved = resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfNamespaceExport(node, dontResolveAlias) { var moduleSpecifier = node.parent.moduleSpecifier; - return moduleSpecifier && resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + var immediate = moduleSpecifier && resolveExternalModuleName(node, moduleSpecifier); + var resolved = moduleSpecifier && resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); + return resolved; } // This function creates a synthetic symbol that combines the value side of one symbol with the // type/namespace side of another symbol. Consider this example: @@ -35711,14 +36463,19 @@ var ts; if (valueSymbol.valueDeclaration) result.valueDeclaration = valueSymbol.valueDeclaration; if (typeSymbol.members) - result.members = typeSymbol.members; + result.members = ts.cloneMap(typeSymbol.members); if (valueSymbol.exports) - result.exports = valueSymbol.exports; + result.exports = ts.cloneMap(valueSymbol.exports); return result; } - function getExportOfModule(symbol, name, dontResolveAlias) { + function getExportOfModule(symbol, specifier, dontResolveAlias) { + var _a; if (symbol.flags & 1536 /* Module */) { - return resolveSymbol(getExportsOfSymbol(symbol).get(name), dontResolveAlias); + var name = ((_a = specifier.propertyName) !== null && _a !== void 0 ? _a : specifier.name).escapedText; + var exportSymbol = getExportsOfSymbol(symbol).get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(specifier, exportSymbol, resolved, /*overwriteEmpty*/ false); + return resolved; } } function getPropertyOfVariable(symbol, name) { @@ -35731,6 +36488,7 @@ var ts; } function getExternalModuleMember(node, specifier, dontResolveAlias) { if (dontResolveAlias === void 0) { dontResolveAlias = false; } + var _a; var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); // TODO: GH#18217 var name = specifier.propertyName || specifier.name; var suppressInteropError = name.escapedText === "default" /* Default */ && !!(compilerOptions.allowSyntheticDefaultImports || compilerOptions.esModuleInterop); @@ -35750,7 +36508,7 @@ var ts; } // if symbolFromVariable is export - get its final target symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias); - var symbolFromModule = getExportOfModule(targetSymbol, name.escapedText, dontResolveAlias); + var symbolFromModule = getExportOfModule(targetSymbol, specifier, dontResolveAlias); if (symbolFromModule === undefined && name.escapedText === "default" /* Default */) { var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); if (canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias)) { @@ -35772,11 +36530,11 @@ var ts; } } else { - if (moduleSymbol.exports && moduleSymbol.exports.has("default" /* Default */)) { + if ((_a = moduleSymbol.exports) === null || _a === void 0 ? void 0 : _a.has("default" /* Default */)) { error(name, ts.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, declarationName); } else { - error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + reportNonExportedMember(name, declarationName, moduleSymbol, moduleName); } } } @@ -35784,90 +36542,47 @@ var ts; } } } + function reportNonExportedMember(name, declarationName, moduleSymbol, moduleName) { + var _a; + var localSymbol = (_a = moduleSymbol.valueDeclaration.locals) === null || _a === void 0 ? void 0 : _a.get(name.escapedText); + var exports = moduleSymbol.exports; + if (localSymbol) { + var exportedSymbol = exports && !exports.has("export=" /* ExportEquals */) + ? ts.find(symbolsToArray(exports), function (symbol) { return !!getSymbolIfSameReference(symbol, localSymbol); }) + : undefined; + var diagnostic = exportedSymbol + ? error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) + : error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); + ts.addRelatedInfo.apply(void 0, __spreadArrays([diagnostic], ts.map(localSymbol.declarations, function (decl, index) { + return ts.createDiagnosticForNode(decl, index === 0 ? ts.Diagnostics._0_is_declared_here : ts.Diagnostics.and_here, declarationName); + }))); + } + else { + error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + } + } function getTargetOfImportSpecifier(node, dontResolveAlias) { var resolved = getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias); - if (resolved && node.parent.parent.isTypeOnly) { - return createTypeOnlyImportOrExport(node.name, resolved); - } + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); return resolved; } function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) { - return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); - } - /** - * Creates a type alias symbol with a target symbol for type-only imports and exports. - * The symbol for `A` in `export type { A }` or `export type { A } from "./mod"` has - * `TypeFlags.Alias` so that alias resolution works as usual, but once the target `A` - * has been resolved, we essentially want to pretend we have a type alias to that target. - */ - function createTypeOnlyImportOrExport(sourceNode, target) { - var _a, _b; - var symbol = createTypeOnlySymbol(target); - if (!symbol && target !== unknownSymbol) { - var identifier = ts.isExportSpecifier(sourceNode) ? sourceNode.name : sourceNode; - var nameText = ts.idText(identifier); - var diagnostic = error(identifier, ts.Diagnostics.Type_only_0_must_reference_a_type_but_1_is_a_value, ts.isExportSpecifier(sourceNode) ? "export" : "import", nameText); - var targetDeclaration = (_a = target.valueDeclaration) !== null && _a !== void 0 ? _a : (_b = target.declarations) === null || _b === void 0 ? void 0 : _b[0]; - if (targetDeclaration) { - ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(targetDeclaration, ts.Diagnostics._0_is_declared_here, nameText)); - } - } - return symbol; - } - function createTypeOnlySymbol(target) { - if (target.flags & 512 /* ValueModule */) { - return createNamespaceModuleForModule(target); - } - if (target.flags & 384 /* Enum */) { - return createNamespaceModuleForEnum(target); - } - if (!(target.flags & 111551 /* Value */)) { - return target; - } - if (target.flags & 788968 /* Type */) { - var alias = createSymbol(524288 /* TypeAlias */, target.escapedName); - alias.declarations = ts.emptyArray; - alias.immediateTarget = target; - return alias; - } - } - function createNamespaceModuleForEnum(enumSymbol) { - ts.Debug.assert(!!(enumSymbol.flags & 384 /* Enum */)); - var symbol = createSymbol(1024 /* NamespaceModule */ | 524288 /* TypeAlias */, enumSymbol.escapedName); - symbol.immediateTarget = enumSymbol; - symbol.declarations = enumSymbol.declarations; - if (enumSymbol.exports) { - symbol.exports = ts.createSymbolTable(); - enumSymbol.exports.forEach(function (exportSymbol, key) { - symbol.exports.set(key, ts.Debug.assertDefined(createTypeOnlySymbol(exportSymbol))); - }); - } - return symbol; - } - function createNamespaceModuleForModule(moduleSymbol) { - ts.Debug.assert(!!(moduleSymbol.flags & 512 /* ValueModule */)); - var filtered = createSymbol(1024 /* NamespaceModule */, moduleSymbol.escapedName); - filtered.declarations = moduleSymbol.declarations; - if (moduleSymbol.exports) { - filtered.exports = ts.createSymbolTable(); - moduleSymbol.exports.forEach(function (exportSymbol, key) { - var typeOnlyExport = createTypeOnlySymbol(exportSymbol); - if (typeOnlyExport) { - filtered.exports.set(key, typeOnlyExport); - } - }); - } - return filtered; + var resolved = resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) { - var target = node.parent.parent.moduleSpecifier ? + var resolved = node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node, dontResolveAlias) : resolveEntityName(node.propertyName || node.name, meaning, /*ignoreErrors*/ false, dontResolveAlias); - return target && node.parent.parent.isTypeOnly ? createTypeOnlyImportOrExport(node, target) : target; + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfExportAssignment(node, dontResolveAlias) { var expression = (ts.isExportAssignment(node) ? node.expression : node.right); - return getTargetOfAliasLikeExpression(expression, dontResolveAlias); + var resolved = getTargetOfAliasLikeExpression(expression, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfAliasLikeExpression(expression, dontResolveAlias) { if (ts.isClassExpression(expression)) { @@ -35957,12 +36672,64 @@ var ts; } return links.target; } + /** + * Marks a symbol as type-only if its declaration is syntactically type-only. + * If it is not itself marked type-only, but resolves to a type-only alias + * somewhere in its resolution chain, save a reference to the type-only alias declaration + * so the alias _not_ marked type-only can be identified as _transitively_ type-only. + * + * This function is called on each alias declaration that could be type-only or resolve to + * another type-only alias during `resolveAlias`, so that later, when an alias is used in a + * JS-emitting expression, we can quickly determine if that symbol is effectively type-only + * and issue an error if so. + * + * @param aliasDeclaration The alias declaration not marked as type-only + * has already been marked as not resolving to a type-only alias. Used when recursively resolving qualified + * names of import aliases, e.g. `import C = a.b.C`. If namespace `a` is not found to be type-only, the + * import declaration will initially be marked as not resolving to a type-only symbol. But, namespace `b` + * must still be checked for a type-only marker, overwriting the previous negative result if found. + * @param immediateTarget The symbol to which the alias declaration immediately resolves + * @param finalTarget The symbol to which the alias declaration ultimately resolves + * @param overwriteEmpty Checks `resolvesToSymbol` for type-only declarations even if `aliasDeclaration` + */ + function markSymbolOfAliasDeclarationIfTypeOnly(aliasDeclaration, immediateTarget, finalTarget, overwriteEmpty) { + if (!aliasDeclaration) + return false; + // If the declaration itself is type-only, mark it and return. + // No need to check what it resolves to. + var sourceSymbol = getSymbolOfNode(aliasDeclaration); + if (ts.isTypeOnlyImportOrExportDeclaration(aliasDeclaration)) { + var links_1 = getSymbolLinks(sourceSymbol); + links_1.typeOnlyDeclaration = aliasDeclaration; + return true; + } + var links = getSymbolLinks(sourceSymbol); + return markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, immediateTarget, overwriteEmpty) + || markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, finalTarget, overwriteEmpty); + } + function markSymbolOfAliasDeclarationIfTypeOnlyWorker(aliasDeclarationLinks, target, overwriteEmpty) { + var _a, _b, _c; + if (target && (aliasDeclarationLinks.typeOnlyDeclaration === undefined || overwriteEmpty && aliasDeclarationLinks.typeOnlyDeclaration === false)) { + var exportSymbol = (_b = (_a = target.exports) === null || _a === void 0 ? void 0 : _a.get("export=" /* ExportEquals */)) !== null && _b !== void 0 ? _b : target; + var typeOnly = exportSymbol.declarations && ts.find(exportSymbol.declarations, ts.isTypeOnlyImportOrExportDeclaration); + aliasDeclarationLinks.typeOnlyDeclaration = (_c = typeOnly !== null && typeOnly !== void 0 ? typeOnly : getSymbolLinks(exportSymbol).typeOnlyDeclaration) !== null && _c !== void 0 ? _c : false; + } + return !!aliasDeclarationLinks.typeOnlyDeclaration; + } + /** Indicates that a symbol directly or indirectly resolves to a type-only import or export. */ + function getTypeOnlyAliasDeclaration(symbol) { + if (!(symbol.flags & 2097152 /* Alias */)) { + return undefined; + } + var links = getSymbolLinks(symbol); + return links.typeOnlyDeclaration || undefined; + } function markExportAsReferenced(node) { var symbol = getSymbolOfNode(node); var target = resolveAlias(symbol); if (target) { var markAlias = target === unknownSymbol || - ((target.flags & 111551 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target)); + ((target.flags & 111551 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol)); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -35990,6 +36757,14 @@ var ts; } } } + // Aliases that resolve to const enums are not marked as referenced because they are not emitted, + // but their usage in value positions must be tracked to determine if the import can be type-only. + function markConstEnumAliasAsReferenced(symbol) { + var links = getSymbolLinks(symbol); + if (!links.constEnumReferenced) { + links.constEnumReferenced = true; + } + } // This function is only for imports with entity names function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) { // There are three things we might try to look for. In the following examples, @@ -36025,8 +36800,8 @@ var ts; var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 111551 /* Value */ : 0); var symbol; if (name.kind === 75 /* Identifier */) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); - var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; + var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); + var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true); if (!symbol) { return symbolFromJSPrototype; @@ -36069,6 +36844,9 @@ var ts; throw ts.Debug.assertNever(name, "Unknown entity name kind."); } ts.Debug.assert((ts.getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); + if (!ts.nodeIsSynthesized(name) && ts.isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 259 /* ExportAssignment */)) { + markSymbolOfAliasDeclarationIfTypeOnly(ts.getAliasDeclarationFromName(name), symbol, /*finalTarget*/ undefined, /*overwriteEmpty*/ true); + } return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol); } /** @@ -36133,7 +36911,7 @@ var ts; */ function getExpandoSymbol(symbol) { var decl = symbol.valueDeclaration; - if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */) { + if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */ || ts.getExpandoInitializer(decl, /*isPrototypeAssignment*/ false)) { return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); @@ -36569,7 +37347,7 @@ var ts; return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 ? symbol.exportSymbol : symbol); } function symbolIsValue(symbol) { - return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */); + return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */ && !getTypeOnlyAliasDeclaration(symbol)); } function findConstructorDeclaration(node) { var members = node.members; @@ -36672,7 +37450,7 @@ var ts; // `sym` may not have exports if this module declaration is backed by the symbol for a `const` that's being rewritten // into a namespace - in such cases, it's best to just let the namespace appear empty (the const members couldn't have referred // to one another anyway) - if (result = callback(sym.exports || emptySymbols)) { + if (result = callback((sym === null || sym === void 0 ? void 0 : sym.exports) || emptySymbols)) { return { value: result }; } break; @@ -36845,6 +37623,7 @@ var ts; if (!ts.length(symbols)) return; var hadAccessibleChain; + var earlyModuleBail = false; for (var _i = 0, _a = symbols; _i < _a.length; _i++) { var symbol = _a[_i]; // Symbol is accessible if it by itself is accessible @@ -36858,6 +37637,14 @@ var ts; } else { if (ts.some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { + if (shouldComputeAliasesToMakeVisible) { + earlyModuleBail = true; + // Generally speaking, we want to use the aliases that already exist to refer to a module, if present + // In order to do so, we need to find those aliases in order to retain them in declaration emit; so + // if we are in declaration emit, we cannot use the fast path for module visibility until we've exhausted + // all other visibility options (in order to capture the possible aliases used to reference the module) + continue; + } // Any meaning of a module symbol is always accessible via an `import` type return { accessibility: 0 /* Accessible */ @@ -36891,6 +37678,11 @@ var ts; return parentResult; } } + if (earlyModuleBail) { + return { + accessibility: 0 /* Accessible */ + }; + } if (hadAccessibleChain) { return { accessibility: 1 /* NotAccessible */, @@ -37090,7 +37882,7 @@ var ts; } function toNodeBuilderFlags(flags) { if (flags === void 0) { flags = 0 /* None */; } - return flags & 9469291 /* NodeBuilderFlagsMask */; + return flags & 277904747 /* NodeBuilderFlagsMask */; } function createNodeBuilder() { return { @@ -37194,7 +37986,7 @@ var ts; } if (type.flags & 128 /* StringLiteral */) { context.approximateLength += (type.value.length + 2); - return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value), 16777216 /* NoAsciiEscaping */)); + return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value, !!(context.flags & 268435456 /* UseSingleQuotesForStringLiteralType */)), 16777216 /* NoAsciiEscaping */)); } if (type.flags & 256 /* NumberLiteral */) { var value = type.value; @@ -37692,8 +38484,8 @@ var ts; typeElements.push(preserveCommentsOn(propertySignature)); } function preserveCommentsOn(node) { - if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 322 /* JSDocPropertyTag */; })) { - var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 322 /* JSDocPropertyTag */; }); + if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 323 /* JSDocPropertyTag */; })) { + var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 323 /* JSDocPropertyTag */; }); var commentText = d.comment; if (commentText) { ts.setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -37817,7 +38609,7 @@ var ts; function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags) { var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 156 /* Parameter */); if (!parameterDeclaration && !ts.isTransientSymbol(parameterSymbol)) { - parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 316 /* JSDocParameterTag */); + parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 317 /* JSDocParameterTag */); } var parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -37874,7 +38666,7 @@ var ts; var chain; var isTypeParameter = symbol.flags & 262144 /* TypeParameter */; if (!isTypeParameter && (context.enclosingDeclaration || context.flags & 64 /* UseFullyQualifiedType */) && !(context.flags & 134217728 /* DoNotIncludeSymbolChain */)) { - chain = ts.Debug.assertDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); + chain = ts.Debug.checkDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); ts.Debug.assert(chain && chain.length > 0); } else { @@ -38249,7 +39041,7 @@ var ts; } // See getNameForSymbolFromNameType for a stringy equivalent function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; @@ -38524,7 +39316,7 @@ var ts; symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */; var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); - if (symbol.flags & 16 /* Function */ || isConstMergedWithNSPrintableAsSignatureMerge) { + if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288 /* TypeAlias */) { @@ -38583,7 +39375,7 @@ var ts; function includePrivateSymbol(symbol) { if (ts.some(symbol.declarations, ts.isParameterDeclaration)) return; - ts.Debug.assertDefined(deferredPrivates); + ts.Debug.assertIsDefined(deferredPrivates); getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol deferredPrivates.set("" + getSymbolId(symbol), symbol); } @@ -38724,7 +39516,7 @@ var ts; // function g() {} // module.exports.g = g // ``` - // In such a situation, we have a local variable named `g`, and a seperate exported variable named `g`. + // In such a situation, we have a local variable named `g`, and a separate exported variable named `g`. // Naively, we would emit // ``` // function g() {} @@ -38815,18 +39607,19 @@ var ts; var typeParamDecls = ts.map(localParams, function (p) { return typeParameterToDeclaration(p, context); }); var classType = getDeclaredTypeOfClassOrInterface(symbol); var baseTypes = getBaseTypes(classType); + var implementsTypes = getImplementsTypes(classType); var staticType = getTypeOfSymbol(symbol); var staticBaseType = getBaseConstructorTypeOfClass(staticType); - var heritageClauses = !ts.length(baseTypes) ? undefined : [ts.createHeritageClause(90 /* ExtendsKeyword */, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]; + var heritageClauses = __spreadArrays(!ts.length(baseTypes) ? [] : [ts.createHeritageClause(90 /* ExtendsKeyword */, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))], !ts.length(implementsTypes) ? [] : [ts.createHeritageClause(113 /* ImplementsKeyword */, ts.map(implementsTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]); var symbolProps = getPropertiesOfType(classType); var publicSymbolProps = ts.filter(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return !(ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name)); }); var hasPrivateIdentifier = ts.some(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name); }); // Boil down all private properties into a single one. @@ -38858,8 +39651,8 @@ var ts; } function serializeAsAlias(symbol, localName, modifierFlags) { // synthesize an alias, eg `export { symbolName as Name }` - // need to mark the alias `symbol` points - // at as something we need to serialize as a private declaration as well + // need to mark the alias `symbol` points at + // as something we need to serialize as a private declaration as well var node = getDeclarationOfAliasSymbol(symbol); if (!node) return ts.Debug.fail(); @@ -39062,7 +39855,7 @@ var ts; && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName)))) { return []; } - var flag = modifierFlags | (isStatic ? 32 /* Static */ : 0); + var flag = (modifierFlags & ~256 /* Async */) | (isStatic ? 32 /* Static */ : 0); var name = getPropertyNameNodeForSymbol(p, context); var firstPropertyLikeDecl = ts.find(p.declarations, ts.or(ts.isPropertyDeclaration, ts.isAccessor, ts.isVariableDeclaration, ts.isPropertySignature, ts.isBinaryExpression, ts.isPropertyAccessExpression)); if (p.flags & 98304 /* Accessor */ && useAccessors) { @@ -39126,7 +39919,7 @@ var ts; return serializePropertySymbolForInterfaceWorker(p, /*isStatic*/ false, baseType); } function getDeclarationWithTypeAnnotation(symbol) { - return ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); + return symbol.declarations && ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); } /** * Unlike `typeToTypeNodeHelper`, this handles setting up the `AllowUniqueESSymbolType` flag @@ -39444,7 +40237,7 @@ var ts; return location.kind === 290 /* SourceFile */ || ts.isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; @@ -39485,11 +40278,14 @@ var ts; if (ts.isCallExpression(declaration) && ts.isBindableObjectDefinePropertyCall(declaration)) { return ts.symbolName(symbol); } - if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096 /* Late */) && symbol.nameType && symbol.nameType.flags & 384 /* StringOrNumberLiteral */) { - // Computed property name isn't late bound, but has a well-known name type - use name type to generate a symbol name - var result = getNameOfSymbolFromNameType(symbol, context); - if (result !== undefined) { - return result; + if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096 /* Late */)) { + var nameType = getSymbolLinks(symbol).nameType; + if (nameType && nameType.flags & 384 /* StringOrNumberLiteral */) { + // Computed property name isn't late bound, but has a well-known name type - use name type to generate a symbol name + var result = getNameOfSymbolFromNameType(symbol, context); + if (result !== undefined) { + return result; + } } } return ts.declarationNameToString(name_2); @@ -39524,9 +40320,9 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: - case 315 /* JSDocEnumTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 316 /* JSDocEnumTag */: // Top-level jsdoc type aliases are considered exported // First parent is comment node, second is hosting declaration or token; we only care about those tokens or declarations whose parent is a source file return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent)); @@ -39698,9 +40494,7 @@ var ts; return !!target.resolvedReturnType; case 4 /* ImmediateBaseConstraint */: return !!target.immediateBaseConstraint; - case 6 /* JSDocTypeReference */: - return !!getSymbolLinks(target).resolvedJSDocType; - case 7 /* ResolvedTypeArguments */: + case 6 /* ResolvedTypeArguments */: return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); @@ -39940,11 +40734,6 @@ var ts; if (optional === void 0) { optional = true; } return strictNullChecks && optional ? getOptionalType(type) : type; } - function isParameterOfContextuallyTypedFunction(node) { - return node.kind === 156 /* Parameter */ && - (node.parent.kind === 201 /* FunctionExpression */ || node.parent.kind === 202 /* ArrowFunction */) && - !!getContextualType(node.parent); - } // Return the inferred type for a variable, parameter, or property declaration function getTypeForVariableLikeDeclaration(declaration, includeOptionality) { // A variable declared in a for..in statement is of type string, or of type keyof T when the @@ -40009,7 +40798,7 @@ var ts; } } // Use contextual parameter type if one is available - var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration, /*forCache*/ true); + var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration); if (type) { return addOptionality(type, isOptional); } @@ -40022,7 +40811,7 @@ var ts; } // Use the type of the initializer expression if one is present and the declaration is // not a parameter of a contextually typed function - if (declaration.initializer && !isParameterOfContextuallyTypedFunction(declaration)) { + if (declaration.initializer) { var type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration)); return addOptionality(type, isOptional); } @@ -40033,7 +40822,7 @@ var ts; } // If the declaration specifies a binding pattern and is not a parameter of a contextually // typed function, use the type implied by the binding pattern - if (ts.isBindingPattern(declaration.name) && !isParameterOfContextuallyTypedFunction(declaration)) { + if (ts.isBindingPattern(declaration.name)) { return getTypeFromBindingPattern(declaration.name, /*includePatternInType*/ false, /*reportErrors*/ true); } // No type specified and nothing can be inferred @@ -40673,8 +41462,8 @@ var ts; function getTypeOfSymbolWithDeferredType(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); links.type = links.deferralParent.flags & 1048576 /* Union */ ? getUnionType(links.deferralConstituents) : getIntersectionType(links.deferralConstituents); } return links.type; @@ -40771,10 +41560,10 @@ var ts; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: - case 321 /* JSDocTypedefTag */: - case 315 /* JSDocEnumTag */: - case 314 /* JSDocCallbackTag */: + case 321 /* JSDocTemplateTag */: + case 322 /* JSDocTypedefTag */: + case 316 /* JSDocEnumTag */: + case 315 /* JSDocCallbackTag */: case 186 /* MappedType */: case 180 /* ConditionalType */: var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); @@ -40905,6 +41694,28 @@ var ts; } return type.resolvedBaseConstructorType; } + function getImplementsTypes(type) { + var resolvedImplementsTypes = ts.emptyArray; + for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + var implementsTypeNodes = ts.getEffectiveImplementsTypeNodes(declaration); + if (!implementsTypeNodes) + continue; + for (var _b = 0, implementsTypeNodes_1 = implementsTypeNodes; _b < implementsTypeNodes_1.length; _b++) { + var node = implementsTypeNodes_1[_b]; + var implementsType = getTypeFromTypeNode(node); + if (implementsType !== errorType) { + if (resolvedImplementsTypes === ts.emptyArray) { + resolvedImplementsTypes = [implementsType]; + } + else { + resolvedImplementsTypes.push(implementsType); + } + } + } + } + return resolvedImplementsTypes; + } function getBaseTypes(type) { if (!type.resolvedBaseTypes) { if (type.objectFlags & 8 /* Tuple */) { @@ -41100,20 +41911,10 @@ var ts; if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { return errorType; } - var type = void 0; - var declaration = void 0; - if (ts.isTypeOnlyAlias(symbol)) { - // Symbol is synthetic type alias for type-only import or export. - // See `createSyntheticTypeAlias`. - type = getDeclaredTypeOfSymbol(symbol.immediateTarget); - declaration = symbol.valueDeclaration; - } - else { - declaration = ts.Debug.assertDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); - var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; - // If typeNode is missing, we will error in checkJSDocTypedefTag. - type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; - } + var declaration = ts.Debug.checkDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); + var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; + // If typeNode is missing, we will error in checkJSDocTypedefTag. + var type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; if (popTypeResolution()) { var typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); if (typeParameters) { @@ -42106,7 +42907,7 @@ var ts; var checkFlags = 8192 /* ReverseMapped */ | (readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0); var inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.escapedName, checkFlags); inferredProp.declarations = prop.declarations; - inferredProp.nameType = prop.nameType; + inferredProp.nameType = getSymbolLinks(prop).nameType; inferredProp.propertyType = getTypeOfSymbol(prop); inferredProp.mappedType = type.mappedType; inferredProp.constraintType = type.constraintType; @@ -42194,7 +42995,7 @@ var ts; // When creating an optional property in strictNullChecks mode, if 'undefined' isn't assignable to the // type, we include 'undefined' in the type. Similarly, when creating a non-optional property in strictNullChecks // mode, if the underlying property is optional we remove 'undefined' from the type. - prop.type = strictNullChecks && isOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + prop.type = strictNullChecks && isOptional && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType) : strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */ ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType; if (modifiersProp) { @@ -42757,7 +43558,7 @@ var ts; var type = getTypeOfSymbol(prop); if (!firstType) { firstType = type; - nameType = prop.nameType; + nameType = getSymbolLinks(prop).nameType; } else if (type !== firstType) { checkFlags |= 64 /* HasNonUniformType */; @@ -43521,7 +44322,7 @@ var ts; function getTypeArguments(type) { var _a, _b; if (!type.resolvedTypeArguments) { - if (!pushTypeResolution(type, 7 /* ResolvedTypeArguments */)) { + if (!pushTypeResolution(type, 6 /* ResolvedTypeArguments */)) { return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; } var node = type.node; @@ -43571,7 +44372,7 @@ var ts; return errorType; } } - if (node.kind === 169 /* TypeReference */ && isAliasedType(node)) { + if (node.kind === 169 /* TypeReference */ && isDeferredTypeReferenceNode(node, ts.length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference(type, node, /*mapper*/ undefined); } // In a type reference, the outer type parameters of the referenced class or interface are automatically @@ -43643,9 +44444,6 @@ var ts; if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) { return getTypeFromClassOrInterfaceReference(node, symbol); } - if (ts.isTypeOnlyAlias(symbol)) { - return getTypeReferenceType(node, symbol.immediateTarget); - } if (symbol.flags & 524288 /* TypeAlias */) { return getTypeFromTypeAliasReference(node, symbol); } @@ -43675,26 +44473,30 @@ var ts; * but this function's special-case code fakes alias resolution as well. */ function getTypeFromJSDocValueReference(node, symbol) { - var valueType = getTypeOfSymbol(symbol); - var typeType = valueType; - if (symbol.valueDeclaration) { - var decl = ts.getRootDeclaration(symbol.valueDeclaration); - var isRequireAlias = false; - if (ts.isVariableDeclaration(decl) && decl.initializer) { - var expr = decl.initializer; - // skip past entity names, eg `require("x").a.b.c` - while (ts.isPropertyAccessExpression(expr)) { - expr = expr.expression; + var links = getNodeLinks(node); + if (!links.resolvedJSDocType) { + var valueType = getTypeOfSymbol(symbol); + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + // skip past entity names, eg `require("x").a.b.c` + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 188 /* ImportType */ && node.qualifier; + // valueType might not have a symbol, eg, {import('./b').STRING_LITERAL} + if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { + typeType = getTypeReferenceType(node, valueType.symbol); } - isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; - } - var isImportTypeWithQualifier = node.kind === 188 /* ImportType */ && node.qualifier; - // valueType might not have a symbol, eg, {import('./b').STRING_LITERAL} - if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { - typeType = getTypeReferenceType(node, valueType.symbol); } + links.resolvedJSDocType = typeType; } - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + return links.resolvedJSDocType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === typeVariable) { @@ -43795,6 +44597,11 @@ var ts; function getTypeFromTypeReference(node) { var links = getNodeLinks(node); if (!links.resolvedType) { + // handle LS queries on the `const` in `x as const` by resolving to the type of `x` + if (ts.isConstTypeReference(node) && ts.isAssertionExpression(node.parent)) { + links.resolvedSymbol = unknownSymbol; + return links.resolvedType = checkExpressionCached(node.parent.expression); + } var symbol = void 0; var type = void 0; var meaning = 788968 /* Type */; @@ -43973,10 +44780,17 @@ var ts; var minLength = ts.findLastIndex(node.elementTypes, function (n) { return n.kind !== 176 /* OptionalType */ && n !== restElement; }) + 1; return getTupleTypeOfArity(node.elementTypes.length, minLength, !!restElement, readonly, /*associatedNames*/ undefined); } + // Return true if the given type reference node is directly aliased or if it needs to be deferred + // because it is possibly contained in a circular chain of eagerly resolved types. + function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 174 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : + node.kind === 175 /* TupleType */ ? ts.some(node.elementTypes, mayResolveTypeAlias) : + hasDefaultTypeArguments || ts.some(node.typeArguments, mayResolveTypeAlias)); + } // Return true when the given node is transitively contained in type constructs that eagerly // resolve their constituent types. We include SyntaxKind.TypeReference because type arguments // of type aliases are eagerly resolved. - function isAliasedType(node) { + function isResolvedByTypeAlias(node) { var parent = node.parent; switch (parent.kind) { case 182 /* ParenthesizedType */: @@ -43986,12 +44800,42 @@ var ts; case 185 /* IndexedAccessType */: case 180 /* ConditionalType */: case 184 /* TypeOperator */: - return isAliasedType(parent); + return isResolvedByTypeAlias(parent); case 247 /* TypeAliasDeclaration */: return true; } return false; } + // Return true if resolving the given node (i.e. getTypeFromTypeNode) possibly causes resolution + // of a type alias. + function mayResolveTypeAlias(node) { + switch (node.kind) { + case 169 /* TypeReference */: + return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node.typeName, 788968 /* Type */).flags & 524288 /* TypeAlias */); + case 172 /* TypeQuery */: + return true; + case 184 /* TypeOperator */: + return node.operator !== 147 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); + case 182 /* ParenthesizedType */: + case 176 /* OptionalType */: + case 299 /* JSDocOptionalType */: + case 297 /* JSDocNullableType */: + case 298 /* JSDocNonNullableType */: + case 294 /* JSDocTypeExpression */: + return mayResolveTypeAlias(node.type); + case 177 /* RestType */: + return node.type.kind !== 174 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 178 /* UnionType */: + case 179 /* IntersectionType */: + return ts.some(node.types, mayResolveTypeAlias); + case 185 /* IndexedAccessType */: + return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); + case 180 /* ConditionalType */: + return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || + mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); + } + return false; + } function getTypeFromArrayOrTupleTypeNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { @@ -43999,7 +44843,7 @@ var ts; if (target === emptyGenericType) { links.resolvedType = emptyObjectType; } - else if (isAliasedType(node)) { + else if (isDeferredTypeReferenceNode(node)) { links.resolvedType = node.kind === 175 /* TupleType */ && node.elementTypes.length === 0 ? target : createDeferredTypeReference(target, node, /*mapper*/ undefined); } @@ -44572,7 +45416,7 @@ var ts; } function getLiteralTypeFromProperty(prop, include) { if (!(ts.getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */)) { - var type = getLateBoundSymbol(prop).nameType; + var type = getSymbolLinks(getLateBoundSymbol(prop)).nameType; if (!type && !ts.isKnownSymbol(prop)) { if (prop.escapedName === "default" /* Default */) { type = getLiteralType("default"); @@ -44829,10 +45673,24 @@ var ts; accessNode; } function isGenericObjectType(type) { - return maybeTypeOfKind(type, 58982400 /* InstantiableNonPrimitive */ | 131072 /* GenericMappedType */); + if (type.flags & 3145728 /* UnionOrIntersection */) { + if (!(type.objectFlags & 4194304 /* IsGenericObjectTypeComputed */)) { + type.objectFlags |= 4194304 /* IsGenericObjectTypeComputed */ | + (ts.some(type.types, isGenericObjectType) ? 8388608 /* IsGenericObjectType */ : 0); + } + return !!(type.objectFlags & 8388608 /* IsGenericObjectType */); + } + return !!(type.flags & 58982400 /* InstantiableNonPrimitive */) || isGenericMappedType(type); } function isGenericIndexType(type) { - return maybeTypeOfKind(type, 58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */); + if (type.flags & 3145728 /* UnionOrIntersection */) { + if (!(type.objectFlags & 16777216 /* IsGenericIndexTypeComputed */)) { + type.objectFlags |= 16777216 /* IsGenericIndexTypeComputed */ | + (ts.some(type.types, isGenericIndexType) ? 33554432 /* IsGenericIndexType */ : 0); + } + return !!(type.objectFlags & 33554432 /* IsGenericIndexType */); + } + return !!(type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */)); } function isThisTypeParameter(type) { return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType); @@ -44859,6 +45717,12 @@ var ts; return writing ? getIntersectionType(types) : getUnionType(types); } } + function unwrapSubstitution(type) { + if (type.flags & 33554432 /* Substitution */) { + return type.substitute; + } + return type; + } // Transform an indexed access to a simpler form, if possible. Return the simpler form, or return // the type itself if no transformation is possible. The writing flag indicates that the type is // the target of an assignment. @@ -44870,7 +45734,7 @@ var ts; type[cache] = circularConstraintType; // We recursively simplify the object type as it may in turn be an indexed access type. For example, with // '{ [P in T]: { [Q in U]: number } }[T][U]' we want to first simplify the inner indexed access type. - var objectType = getSimplifiedType(type.objectType, writing); + var objectType = unwrapSubstitution(getSimplifiedType(type.objectType, writing)); var indexType = getSimplifiedType(type.indexType, writing); // T[A | B] -> T[A] | T[B] (reading) // T[A | B] -> T[A] & T[B] (writing) @@ -45035,11 +45899,15 @@ var ts; if (checkType === wildcardType || extendsType === wildcardType) { return wildcardType; } - var checkTypeInstantiable = maybeTypeOfKind(checkType, 63176704 /* Instantiable */ | 131072 /* GenericMappedType */); + var checkTypeInstantiable = isGenericObjectType(checkType) || isGenericIndexType(checkType); var combinedMapper; if (root.inferTypeParameters) { var context = createInferenceContext(root.inferTypeParameters, /*signature*/ undefined, 0 /* None */); - if (!checkTypeInstantiable) { + // We skip inference of the possible `infer` types unles the `extendsType` _is_ an infer type + // if it was, it's trivial to say that extendsType = checkType, however such a pattern is used to + // "reset" the type being build up during constraint calculation and avoid making an apparently "infinite" constraint + // so in those cases we refain from performing inference and retain the uninfered type parameter + if (!checkTypeInstantiable || !ts.some(root.inferTypeParameters, function (t) { return t === extendsType; })) { // We don't want inferences from constraints as they may cause us to eagerly resolve the // conditional type instead of deferring resolution. Also, we always want strict function // types rules (i.e. proper contravariance) for inferences. @@ -45050,7 +45918,7 @@ var ts; // Instantiate the extends type including inferences for 'infer T' type parameters var inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType; // We attempt to resolve the conditional type only when the check and extends types are non-generic - if (!checkTypeInstantiable && !maybeTypeOfKind(inferredExtendsType, 63176704 /* Instantiable */ | 131072 /* GenericMappedType */)) { + if (!checkTypeInstantiable && !isGenericObjectType(inferredExtendsType) && !isGenericIndexType(inferredExtendsType)) { if (inferredExtendsType.flags & 3 /* AnyOrUnknown */) { return instantiateType(root.trueType, combinedMapper || mapper); } @@ -45283,7 +46151,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 /* Readonly */ : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; members.set(prop.escapedName, result); } @@ -45298,7 +46166,7 @@ var 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, right, symbol, objectFlags, readonly) { + function getSpreadType(left, right, symbol, objectFlags, readonly, isParentTypeNullable) { if (left.flags & 1 /* Any */ || right.flags & 1 /* Any */) { return anyType; } @@ -45314,16 +46182,16 @@ var ts; if (left.flags & 1048576 /* Union */) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(left, readonly); if (merged) { - return getSpreadType(merged, right, symbol, objectFlags, readonly); + return getSpreadType(merged, right, symbol, objectFlags, readonly, isParentTypeNullable); } - return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly); }); + return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly, isParentTypeNullable); }); } if (right.flags & 1048576 /* Union */) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(right, readonly); if (merged) { - return getSpreadType(left, merged, symbol, objectFlags, readonly); + return getSpreadType(left, merged, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304 /* Nullable */)); } - return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly); }); + return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304 /* Nullable */)); }); } if (right.flags & (528 /* BooleanLike */ | 296 /* NumberLike */ | 2112 /* BigIntLike */ | 132 /* StringLike */ | 1056 /* EnumLike */ | 67108864 /* NonPrimitive */ | 4194304 /* Index */)) { return left; @@ -45382,9 +46250,17 @@ var ts; result.leftSpread = leftProp; result.rightSpread = rightProp; result.declarations = declarations; - result.nameType = leftProp.nameType; + result.nameType = getSymbolLinks(leftProp).nameType; members.set(leftProp.escapedName, result); } + else if (strictNullChecks && + !isParentTypeNullable && + symbol && + !isFromSpreadAssignment(leftProp, symbol) && + isFromSpreadAssignment(rightProp, symbol) && + !maybeTypeOfKind(rightType, 98304 /* Nullable */)) { + error(leftProp.valueDeclaration, ts.Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, ts.unescapeLeadingUnderscores(leftProp.escapedName)); + } } else { members.set(leftProp.escapedName, getSpreadSymbol(leftProp, readonly)); @@ -45409,7 +46285,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 /* Readonly */ : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; return result; } @@ -45735,8 +46611,8 @@ var ts; if (symbol.valueDeclaration) { result.valueDeclaration = symbol.valueDeclaration; } - if (symbol.nameType) { - result.nameType = symbol.nameType; + if (links.nameType) { + result.nameType = links.nameType; } return result; } @@ -45888,7 +46764,7 @@ var ts; var templateMapper = combineTypeMappers(mapper, createTypeMapper([getTypeParameterFromMappedType(type)], [key])); var propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper); var modifiers = getMappedTypeModifiers(type); - return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType) : strictNullChecks && modifiers & 8 /* ExcludeOptional */ && isOptional ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType; } @@ -45951,6 +46827,7 @@ var ts; error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } + totalInstantiationCount++; instantiationCount++; instantiationDepth++; var result = instantiateTypeWorker(type, mapper); @@ -45984,15 +46861,17 @@ var ts; } return type; } - if (flags & 1048576 /* Union */ && !(flags & 131068 /* Primitive */)) { - var types = type.types; - var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getUnionType(newTypes, 1 /* Literal */, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; - } - if (flags & 2097152 /* Intersection */) { + if ((flags & 2097152 /* Intersection */) || (flags & 1048576 /* Union */ && !(flags & 131068 /* Primitive */))) { + if (!couldContainTypeVariables(type)) { + return type; + } var types = type.types; var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; + return newTypes === types + ? type + : (flags & 2097152 /* Intersection */) + ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) + : getUnionType(newTypes, 1 /* Literal */, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)); } if (flags & 4194304 /* Index */) { return getIndexType(instantiateType(type.type, mapper)); @@ -46081,30 +46960,30 @@ var ts; return false; } function isContextSensitiveFunctionLikeDeclaration(node) { - if (ts.isFunctionDeclaration(node) && (!ts.isInJSFile(node) || !getTypeForDeclarationFromJSDocComment(node))) { - return false; - } + return (!ts.isFunctionDeclaration(node) || ts.isInJSFile(node) && !!getTypeForDeclarationFromJSDocComment(node)) && + (hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node)); + } + function hasContextSensitiveParameters(node) { // Functions with type parameters are not context sensitive. - if (node.typeParameters) { - return false; - } - // Functions with any parameters that lack type annotations are context sensitive. - if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { - return true; - } - if (node.kind !== 202 /* ArrowFunction */) { - // If the first parameter is not an explicit 'this' parameter, then the function has - // an implicit 'this' parameter which is subject to contextual typing. - var parameter = ts.firstOrUndefined(node.parameters); - if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + if (!node.typeParameters) { + // Functions with any parameters that lack type annotations are context sensitive. + if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { return true; } + if (node.kind !== 202 /* ArrowFunction */) { + // If the first parameter is not an explicit 'this' parameter, then the function has + // an implicit 'this' parameter which is subject to contextual typing. + var parameter = ts.firstOrUndefined(node.parameters); + if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + return true; + } + } } - return hasContextSensitiveReturnExpression(node); + return false; } function hasContextSensitiveReturnExpression(node) { // TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value. - return !!node.body && node.body.kind !== 223 /* Block */ && isContextSensitive(node.body); + return !ts.getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 223 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (ts.isInJSFile(func) && ts.isFunctionDeclaration(func) || isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) && @@ -46277,6 +47156,13 @@ var ts; if (target.symbol && ts.length(target.symbol.declarations)) { ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(target.symbol.declarations[0], ts.Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature)); } + if ((ts.getFunctionFlags(node) & 2 /* Async */) === 0 + // exclude cases where source itself is promisy - this way we don't make a suggestion when relating + // an IPromise and a Promise that are slightly different + && !getTypeOfPropertyOfType(sourceReturn, "then") + && checkTypeRelatedTo(createPromiseType(sourceReturn), targetReturn, relation, /*errorNode*/ undefined)) { + ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async)); + } return true; } } @@ -46534,11 +47420,20 @@ var ts; return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); } // recreate a tuple from the elements, if possible - var tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, /*forceTuple*/ true); - if (isTupleLikeType(tupleizedType)) { - return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + // Since we're re-doing the expression type, we need to reapply the contextual type + var oldContext = node.contextualType; + node.contextualType = target; + try { + var tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, /*forceTuple*/ true); + node.contextualType = oldContext; + if (isTupleLikeType(tupleizedType)) { + return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + } + return false; + } + finally { + node.contextualType = oldContext; } - return false; } function generateObjectLiteralElements(node) { var _i, _a, prop, type, _b; @@ -46884,11 +47779,18 @@ var ts; if (isFreshLiteralType(target)) { target = target.regularType; } - if (source === target || - relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || - relation !== identityRelation && isSimpleTypeRelatedTo(source, target, relation)) { + if (source === target) { return true; } + if (relation !== identityRelation) { + if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation)) { + return true; + } + } + else { + if (!(source.flags === target.flags && source.flags & 66584576 /* Substructure */)) + return false; + } if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) { var related = relation.get(getRelationKey(source, target, 0 /* None */, relation)); if (related !== undefined) { @@ -46904,11 +47806,17 @@ var ts; return ts.getObjectFlags(source) & 4096 /* JsxAttributes */ && !isUnhyphenatedJsxName(sourceProp.escapedName); } function getNormalizedType(type, writing) { - return isFreshLiteralType(type) ? type.regularType : - ts.getObjectFlags(type) & 4 /* Reference */ && type.node ? createTypeReference(type.target, getTypeArguments(type)) : - type.flags & 33554432 /* Substitution */ ? writing ? type.typeVariable : type.substitute : - type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : - type; + do { + var t = isFreshLiteralType(type) ? type.regularType : + ts.getObjectFlags(type) & 4 /* Reference */ && type.node ? createTypeReference(type.target, getTypeArguments(type)) : + type.flags & 33554432 /* Substitution */ ? writing ? type.typeVariable : type.substitute : + type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : + type; + if (t === type) + break; + type = t; + } while (true); + return type; } /** * Checks if 'source' is related to 'target' (e.g.: is a assignable to). @@ -47196,6 +48104,11 @@ var ts; // side) or the type variable (on the target side). var source = getNormalizedType(originalSource, /*writing*/ false); var target = getNormalizedType(originalTarget, /*writing*/ true); + if (source === target) + return -1 /* True */; + if (relation === identityRelation) { + return isIdenticalTo(source, target); + } // Try to see if we're relating something like `Foo` -> `Bar | null | undefined`. // If so, reporting the `null` and `undefined` in the type is hardly useful. // First, see if we're even relating an object type to a union. @@ -47209,15 +48122,11 @@ var ts; target.types.length <= 3 && maybeTypeOfKind(target, 98304 /* Nullable */)) { var nullStrippedTarget = extractTypesOfKind(target, ~98304 /* Nullable */); if (!(nullStrippedTarget.flags & (1048576 /* Union */ | 131072 /* Never */))) { + if (source === nullStrippedTarget) + return -1 /* True */; target = nullStrippedTarget; } } - // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases - if (source === target) - return -1 /* True */; - if (relation === identityRelation) { - return isIdenticalTo(source, target); - } if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation, reportErrors ? reportError : undefined)) return -1 /* True */; @@ -47358,19 +48267,18 @@ var ts; return result; } function isIdenticalTo(source, target) { - var result; var flags = source.flags & target.flags; - if (flags & 524288 /* Object */ || flags & 8388608 /* IndexedAccess */ || flags & 16777216 /* Conditional */ || flags & 4194304 /* Index */ || flags & 33554432 /* Substitution */) { - return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, 0 /* None */); + if (!(flags & 66584576 /* Substructure */)) { + return 0 /* False */; } - if (flags & (1048576 /* Union */ | 2097152 /* Intersection */)) { - if (result = eachTypeRelatedToSomeType(source, target)) { - if (result &= eachTypeRelatedToSomeType(target, source)) { - return result; - } + if (flags & 3145728 /* UnionOrIntersection */) { + var result_3 = eachTypeRelatedToSomeType(source, target); + if (result_3) { + result_3 &= eachTypeRelatedToSomeType(target, source); } + return result_3; } - return 0 /* False */; + return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, 0 /* None */); } function getTypeOfPropertyInTypes(types, name) { var appendPropType = function (propTypes, type) { @@ -47397,7 +48305,7 @@ var ts; checkTypes = reducedTarget.flags & 1048576 /* Union */ ? reducedTarget.types : [reducedTarget]; } var _loop_11 = function (prop) { - if (shouldCheckAsExcessProperty(prop, source.symbol)) { + if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) { if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) { if (reportErrors) { // Report error in terms of object types in the target as those are the only ones @@ -47687,21 +48595,21 @@ var ts; if (flags & 4194304 /* Index */) { return isRelatedTo(source.type, target.type, /*reportErrors*/ false); } - var result_3 = 0 /* False */; + var result_4 = 0 /* False */; if (flags & 8388608 /* IndexedAccess */) { - if (result_3 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { + return result_4; } } } if (flags & 16777216 /* Conditional */) { if (source.root.isDistributive === target.root.isDistributive) { - if (result_3 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { + return result_4; } } } @@ -47980,11 +48888,11 @@ var ts; // with respect to T. We do not report errors here, as we will use the existing // error result from checking each constituent of the union. if (source.flags & (524288 /* Object */ | 2097152 /* Intersection */) && target.flags & 1048576 /* Union */) { - var objectOnlyTarget = extractTypesOfKind(target, 524288 /* Object */); + var objectOnlyTarget = extractTypesOfKind(target, 524288 /* Object */ | 2097152 /* Intersection */ | 33554432 /* Substitution */); if (objectOnlyTarget.flags & 1048576 /* Union */) { - var result_4 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); - if (result_4) { - return result_4; + var result_5 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); + if (result_5) { + return result_5; } } } @@ -48051,12 +48959,12 @@ var ts; var modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source) === getMappedTypeModifiers(target) : getCombinedMappedTypeOptionality(source) <= getCombinedMappedTypeOptionality(target)); if (modifiersRelated) { - var result_5; + var result_6; var targetConstraint = getConstraintTypeFromMappedType(target); var sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMarkers : reportUnreliableMarkers); - if (result_5 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { + if (result_6 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]); - return result_5 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); + return result_6 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); } } return 0 /* False */; @@ -48071,7 +48979,7 @@ var ts; // // NOTE: See ~/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts // for examples. - var sourceProperties = getPropertiesOfObjectType(source); + var sourceProperties = getPropertiesOfType(source); var sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target); if (!sourcePropertiesFiltered) return 0 /* False */; @@ -48110,7 +49018,7 @@ var ts; var type = _a[_i]; var _loop_13 = function (i) { var sourceProperty = sourcePropertiesFiltered[i]; - var targetProperty = getPropertyOfObjectType(type, sourceProperty.escapedName); + var targetProperty = getPropertyOfType(type, sourceProperty.escapedName); if (!targetProperty) return "continue-outer"; if (sourceProperty === targetProperty) @@ -48187,10 +49095,10 @@ var ts; if (ts.getCheckFlags(targetProp) & 65536 /* DeferredType */ && !getSymbolLinks(targetProp).type) { // Rather than resolving (and normalizing) the type, relate constituent-by-constituent without performing normalization or seconadary passes var links = getSymbolLinks(targetProp); - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); var unionParent = !!(links.deferralParent.flags & 1048576 /* Union */); - var result_6 = unionParent ? 0 /* False */ : -1 /* True */; + var result_7 = unionParent ? 0 /* False */ : -1 /* True */; var targetTypes = links.deferralConstituents; for (var _i = 0, targetTypes_3 = targetTypes; _i < targetTypes_3.length; _i++) { var targetType = targetTypes_3[_i]; @@ -48200,7 +49108,7 @@ var ts; // Can't assign to a target individually - have to fallback to assigning to the _whole_ intersection (which forces normalization) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - result_6 &= related; + result_7 &= related; } else { if (related) { @@ -48208,17 +49116,17 @@ var ts; } } } - if (unionParent && !result_6 && targetIsOptional) { - result_6 = isRelatedTo(source, undefinedType); + if (unionParent && !result_7 && targetIsOptional) { + result_7 = isRelatedTo(source, undefinedType); } - if (unionParent && !result_6 && reportErrors) { + if (unionParent && !result_7 && reportErrors) { // The easiest way to get the right errors here is to un-defer (which may be costly) // If it turns out this is too costly too often, we can replicate the error handling logic within // typeRelatedToSomeType without the discriminatable type branch (as that requires a manifest union // type on which to hand discriminable properties, which we are expressly trying to avoid here) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - return result_6; + return result_7; } else { return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors, /*headMessage*/ undefined, intersectionState); @@ -48291,13 +49199,14 @@ var ts; if (unmatchedProperty.valueDeclaration && ts.isNamedDeclaration(unmatchedProperty.valueDeclaration) && ts.isPrivateIdentifier(unmatchedProperty.valueDeclaration.name) - && ts.isClassDeclaration(source.symbol.valueDeclaration)) { + && source.symbol + && source.symbol.flags & 32 /* Class */) { var privateIdentifierDescription = unmatchedProperty.valueDeclaration.name.escapedText; var symbolTableKey = ts.getSymbolNameForPrivateIdentifier(source.symbol, privateIdentifierDescription); - if (symbolTableKey && !!getPropertyOfType(source, symbolTableKey)) { - var sourceName = source.symbol.valueDeclaration.name; - var targetName = ts.isClassDeclaration(target.symbol.valueDeclaration) ? target.symbol.valueDeclaration.name : undefined; - reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName || anon), diagnosticName(targetName || anon)); + if (symbolTableKey && getPropertyOfType(source, symbolTableKey)) { + var sourceName = ts.getDeclarationName(source.symbol.valueDeclaration); + var targetName = ts.getDeclarationName(target.symbol.valueDeclaration); + reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName.escapedText === "" ? anon : sourceName), diagnosticName(targetName.escapedText === "" ? anon : targetName)); return; } } @@ -48544,7 +49453,11 @@ var ts; for (var _i = 0, props_2 = props; _i < props_2.length; _i++) { var prop = props_2[_i]; // Skip over ignored JSX and symbol-named members - if (isIgnoredJsxProperty(source, prop) || prop.nameType && prop.nameType.flags & 8192 /* UniqueESSymbol */) { + if (isIgnoredJsxProperty(source, prop)) { + continue; + } + var nameType = getSymbolLinks(prop).nameType; + if (nameType && nameType.flags & 8192 /* UniqueESSymbol */) { continue; } if (kind === 0 /* String */ || isNumericLiteralName(prop.escapedName)) { @@ -48667,6 +49580,10 @@ var ts; // make sure exactly 1 matches before returning it return match === -1 || discriminable.indexOf(/*searchElement*/ true, match + 1) !== -1 ? defaultValue : target.types[match]; } + function isFromSpreadAssignment(prop, container) { + var _a; + return ((_a = prop.valueDeclaration) === null || _a === void 0 ? void 0 : _a.parent) !== container.valueDeclaration; + } /** * A type is 'weak' if it is an object type with at least one optional property * and no required properties, call/construct signatures or index signatures @@ -49164,7 +50081,7 @@ var ts; } /** * Check if a Type was written as a tuple type literal. - * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. + * Prefer using isTupleLikeType() unless the use of `elementTypes`/`getTypeArguments` is required. */ function isTupleType(type) { return !!(ts.getObjectFlags(type) & 4 /* Reference */ && type.target.objectFlags & 8 /* Tuple */); @@ -49310,8 +50227,9 @@ var ts; if (source.valueDeclaration) { symbol.valueDeclaration = source.valueDeclaration; } - if (source.nameType) { - symbol.nameType = source.nameType; + var nameType = getSymbolLinks(source).nameType; + if (nameType) { + symbol.nameType = nameType; } return symbol; } @@ -49693,17 +50611,18 @@ var ts; // results for union and intersection types for performance reasons. function couldContainTypeVariables(type) { var objectFlags = ts.getObjectFlags(type); - return !!(type.flags & 63176704 /* Instantiable */ || + if (objectFlags & 67108864 /* CouldContainTypeVariablesComputed */) { + return !!(objectFlags & 134217728 /* CouldContainTypeVariables */); + } + var result = !!(type.flags & 63176704 /* Instantiable */ || objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 131072 /* ObjectRestType */) || - type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && couldUnionOrIntersectionContainTypeVariables(type)); - } - function couldUnionOrIntersectionContainTypeVariables(type) { - if (type.couldContainTypeVariables === undefined) { - type.couldContainTypeVariables = ts.some(type.types, couldContainTypeVariables); + type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && ts.some(type.types, couldContainTypeVariables)); + if (type.flags & 3899393 /* ObjectFlagsType */) { + type.objectFlags |= 67108864 /* CouldContainTypeVariablesComputed */ | (result ? 134217728 /* CouldContainTypeVariables */ : 0); } - return type.couldContainTypeVariables; + return result; } function isTypeParameterAtTopLevel(type, typeParameter) { return !!(type === typeParameter || @@ -49849,6 +50768,12 @@ var ts; inference.contraCandidates ? getIntersectionType(inference.contraCandidates) : undefined; } + function hasSkipDirectInferenceFlag(node) { + return !!getNodeLinks(node).skipDirectInference; + } + function isFromInferenceBlockedSource(type) { + return !!(type.symbol && ts.some(type.symbol.declarations, hasSkipDirectInferenceFlag)); + } function inferTypes(inferences, originalSource, originalTarget, priority, contravariant) { if (priority === void 0) { priority = 0; } if (contravariant === void 0) { contravariant = false; } @@ -49940,7 +50865,7 @@ var ts; // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). if (ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ || source === nonInferrableAnyType || source === silentNeverType || - (priority & 32 /* ReturnType */ && (source === autoType || source === autoArrayType))) { + (priority & 32 /* ReturnType */ && (source === autoType || source === autoArrayType)) || isFromInferenceBlockedSource(source)) { return; } var inference = getInferenceInfoForType(target); @@ -50061,6 +50986,12 @@ var ts; invokeOnce(source, target, inferFromObjectTypes); } } + if (source.flags & 25165824 /* Simplifiable */) { + var simplified = getSimplifiedType(source, contravariant); + if (simplified !== source) { + inferFromTypes(simplified, target); + } + } } function inferWithPriority(source, target, newPriority) { var savePriority = priority; @@ -50238,7 +51169,7 @@ var ts; // type and then make a secondary inference from that type to T. We make a secondary inference // such that direct inferences to T get priority over inferences to Partial, for example. var inference = getInferenceInfoForType(constraintType.type); - if (inference && !inference.isFixed) { + if (inference && !inference.isFixed && !isFromInferenceBlockedSource(source)) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { // We assign a lower priority to inferences made from types containing non-inferrable @@ -50400,7 +51331,7 @@ var ts; } } function isTypeOrBaseIdenticalTo(s, t) { - return isTypeIdenticalTo(s, t) || !!(s.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) && isTypeIdenticalTo(getBaseTypeOfLiteralType(s), t); + return isTypeIdenticalTo(s, t) || !!(t.flags & 4 /* String */ && s.flags & 128 /* StringLiteral */ || t.flags & 8 /* Number */ && s.flags & 256 /* NumberLiteral */); } function isTypeCloselyMatchedBy(s, t) { return !!(s.flags & 524288 /* Object */ && t.flags & 524288 /* Object */ && s.symbol && s.symbol === t.symbol || @@ -51170,6 +52101,8 @@ var ts; return getExplicitTypeOfSymbol(symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol, diagnostic); case 104 /* ThisKeyword */: return getExplicitThisType(node); + case 102 /* SuperKeyword */: + return checkSuperExpression(node); case 194 /* PropertyAccessExpression */: var type = getTypeOfDottedName(node.expression, diagnostic); var prop = type && getPropertyOfType(type, node.name.escapedText); @@ -51225,14 +52158,11 @@ var ts; diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis)); } function isReachableFlowNode(flow) { - var result = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); + var result = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ false); lastFlowNode = flow; lastFlowNodeReachable = result; return result; } - function isUnlockedReachableFlowNode(flow) { - return !(flow.flags & 4096 /* PreFinally */ && flow.lock.locked) && isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); - } function isFalseExpression(expr) { var node = ts.skipParentheses(expr); return node.kind === 91 /* FalseKeyword */ || node.kind === 209 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || @@ -51244,15 +52174,15 @@ var ts; return lastFlowNodeReachable; } var flags = flow.flags; - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { if (!noCacheCheck) { var id = getFlowNodeId(flow); var reachable = flowNodeReachable[id]; - return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ true)); + return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ true)); } noCacheCheck = false; } - if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */ | 4096 /* PreFinally */)) { + if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */)) { flow = flow.antecedent; } else if (flags & 512 /* Call */) { @@ -51273,7 +52203,7 @@ var ts; } else if (flags & 4 /* BranchLabel */) { // A branching point is reachable if any branch is reachable. - return ts.some(flow.antecedents, isUnlockedReachableFlowNode); + return ts.some(flow.antecedents, function (f) { return isReachableFlowNodeWorker(f, /*noCacheCheck*/ false); }); } else if (flags & 8 /* LoopLabel */) { // A loop is reachable if the control flow path that leads to the top is reachable. @@ -51287,12 +52217,14 @@ var ts; } flow = flow.antecedent; } - else if (flags & 8192 /* AfterFinally */) { - // Cache is unreliable once we start locking nodes + else if (flags & 1024 /* ReduceLabel */) { + // Cache is unreliable once we start adjusting labels lastFlowNode = undefined; - flow.locked = true; - var result = isReachableFlowNodeWorker(flow.antecedent, /*skipCacheCheck*/ false); - flow.locked = false; + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; + var result = isReachableFlowNodeWorker(flow.antecedent, /*noCacheCheck*/ false); + target.antecedents = saveAntecedents; return result; } else { @@ -51342,7 +52274,7 @@ var ts; flowDepth++; while (true) { var flags = flow.flags; - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { // We cache results of flow type resolution for shared nodes that were previously visited in // the same getFlowTypeOfReference invocation. A node is considered shared when it is the // antecedent of more than one node. @@ -51354,19 +52286,7 @@ var ts; } } var type = void 0; - if (flags & 8192 /* AfterFinally */) { - // block flow edge: finally -> pre-try (for larger explanation check comment in binder.ts - bindTryStatement - flow.locked = true; - type = getTypeAtFlowNode(flow.antecedent); - flow.locked = false; - } - else if (flags & 4096 /* PreFinally */) { - // locked pre-finally flows are filtered out in getTypeAtFlowBranchLabel - // so here just redirect to antecedent - flow = flow.antecedent; - continue; - } - else if (flags & 16 /* Assignment */) { + if (flags & 16 /* Assignment */) { type = getTypeAtFlowAssignment(flow); if (!type) { flow = flow.antecedent; @@ -51402,6 +52322,13 @@ var ts; continue; } } + else if (flags & 1024 /* ReduceLabel */) { + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; + type = getTypeAtFlowNode(flow.antecedent); + target.antecedents = saveAntecedents; + } else if (flags & 2 /* Start */) { // Check if we should continue with the control flow of the containing function. var container = flow.node; @@ -51420,7 +52347,7 @@ var ts; // simply return the non-auto declared type to reduce follow-on errors. type = convertAutoToAny(declaredType); } - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { // Record visited node and the associated type in the cache. sharedFlowNodes[sharedFlowCount] = flow; sharedFlowTypes[sharedFlowCount] = type; @@ -51604,12 +52531,6 @@ var ts; var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; - if (antecedent.flags & 4096 /* PreFinally */ && antecedent.lock.locked) { - // if flow correspond to branch from pre-try to finally and this branch is locked - this means that - // we initially have started following the flow outside the finally block. - // in this case we should ignore this branch. - continue; - } if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.clauseStart === antecedent.clauseEnd) { // The antecedent is the bypass branch of a potentially exhaustive switch statement. bypassFlow = antecedent; @@ -52289,12 +53210,19 @@ var ts; } /** remove undefined from the annotated type of a parameter when there is an initializer (that doesn't include undefined) */ function removeOptionalityFromDeclaredType(declaredType, declaration) { - var annotationIncludesUndefined = strictNullChecks && - declaration.kind === 156 /* Parameter */ && - declaration.initializer && - getFalsyFlags(declaredType) & 32768 /* Undefined */ && - !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768 /* Undefined */); - return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; + if (pushTypeResolution(declaration.symbol, 2 /* DeclaredType */)) { + var annotationIncludesUndefined = strictNullChecks && + declaration.kind === 156 /* Parameter */ && + declaration.initializer && + getFalsyFlags(declaredType) & 32768 /* Undefined */ && + !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768 /* Undefined */); + popTypeResolution(); + return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; + } + else { + reportCircularityError(declaration.symbol); + return declaredType; + } } function isConstraintPosition(node) { var parent = node.parent; @@ -52320,8 +53248,13 @@ var ts; return !!ts.findAncestor(location, function (e) { return e.parent && ts.isExportAssignment(e.parent) && e.parent.expression === e && ts.isEntityNameExpression(e); }); } function markAliasReferenced(symbol, location) { - if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && ((compilerOptions.preserveConstEnums && isExportOrExportExpression(location)) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol)))) { - markAliasSymbolAsReferenced(symbol); + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol)) { + if (compilerOptions.preserveConstEnums && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + markAliasSymbolAsReferenced(symbol); + } + else { + markConstEnumAliasAsReferenced(symbol); + } } } function checkIdentifier(node) { @@ -52660,7 +53593,7 @@ var ts; break; case 159 /* PropertyDeclaration */: case 158 /* PropertySignature */: - if (ts.hasModifier(container, 32 /* Static */)) { + if (ts.hasModifier(container, 32 /* Static */) && !(compilerOptions.target === 99 /* ESNext */ && compilerOptions.useDefineForClassFields)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks } @@ -53066,7 +53999,7 @@ var ts; } // In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the // contextual type for 'this' is 'obj'. - var parent = func.parent; + var parent = ts.walkUpParenthesizedExpressions(func.parent); if (parent.kind === 209 /* BinaryExpression */ && parent.operatorToken.kind === 62 /* EqualsToken */) { var target = parent.left; if (ts.isAccessExpression(target)) { @@ -53085,7 +54018,7 @@ var ts; return undefined; } // Return contextual type of parameter or undefined if no contextual type is available - function getContextuallyTypedParameterType(parameter, forCache) { + function getContextuallyTypedParameterType(parameter) { var func = parameter.parent; if (!isContextSensitiveFunctionOrObjectLiteralMethod(func)) { return undefined; @@ -53108,19 +54041,6 @@ var ts; } var contextualSignature = getContextualSignature(func); if (contextualSignature) { - if (forCache) { - // Calling the below guarantees the types are primed and assigned in the same way - // as when the parameter is reached via `checkFunctionExpressionOrObjectLiteralMethod`. - // This should prevent any uninstantiated inference variables in the contextual signature - // from leaking, and should lock in cached parameter types via `assignContextualParameterTypes` - // which we will then immediately use the results of below. - contextuallyCheckFunctionExpressionOrObjectLiteralMethod(func); - var type = getTypeOfSymbol(getMergedSymbol(func.symbol)); - if (isTypeAny(type)) { - return type; - } - contextualSignature = getSignaturesOfType(type, 0 /* Call */)[0]; - } var index = func.parameters.indexOf(parameter) - (ts.getThisParameter(func) ? 1 : 0); return parameter.dotDotDotToken && ts.lastOrUndefined(func.parameters) === parameter ? getRestTypeAtPosition(contextualSignature, index) : @@ -53134,7 +54054,7 @@ var ts; } switch (declaration.kind) { case 156 /* Parameter */: - return getContextuallyTypedParameterType(declaration, /*forCache*/ false); + return getContextuallyTypedParameterType(declaration); case 191 /* BindingElement */: return getContextualTypeForBindingElement(declaration); // By default, do nothing and return undefined - only parameters and binding elements have context implied by a parent @@ -53251,18 +54171,15 @@ var ts; return undefined; } // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg, contextFlags) { + function getContextualTypeForArgument(callTarget, arg) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); // -1 for e.g. the expression of a CallExpression, or the tag of a TaggedTemplateExpression - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { // If we're already in the process of resolving the given signature, don't resolve again as // that could cause infinite recursion. Instead, return anySignature. var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); - if (contextFlags && contextFlags & 4 /* BaseConstraint */ && signature.target && !ts.hasTypeArguments(callTarget)) { - signature = getBaseSignature(signature.target); - } if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } @@ -53624,7 +54541,7 @@ var ts; } /* falls through */ case 197 /* NewExpression */: - return getContextualTypeForArgument(parent, node, contextFlags); + return getContextualTypeForArgument(parent, node); case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -53666,13 +54583,13 @@ var ts; return ancestor && ancestor.inferenceContext; } function getContextualJsxElementAttributesType(node, contextFlags) { - if (ts.isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== 4 /* BaseConstraint */) { + if (ts.isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== 4 /* Completions */) { // Contextually applied type is moved from attributes up to the outer jsx attributes so when walking up from the children they get hit // _However_ to hit them from the _attributes_ we must look for them here; otherwise we'll used the declared type // (as below) instead! return node.parent.contextualType; } - return getContextualTypeForArgumentAtIndex(node, 0, contextFlags); + return getContextualTypeForArgumentAtIndex(node, 0); } function getEffectiveFirstArgumentForJsxSignature(signature, node) { return getJsxReferenceKind(node) !== 0 /* Component */ @@ -53878,58 +54795,73 @@ var ts; function checkArrayLiteral(node, checkMode, forceTuple) { var elements = node.elements; var elementCount = elements.length; - var hasNonEndingSpreadElement = false; var elementTypes = []; - var inDestructuringPattern = ts.isAssignmentTarget(node); + var hasEndingSpreadElement = false; + var hasNonEndingSpreadElement = false; var contextualType = getApparentTypeOfContextualType(node); + var inDestructuringPattern = ts.isAssignmentTarget(node); var inConstContext = isConstContext(node); - for (var index = 0; index < elementCount; index++) { - var e = elements[index]; - if (inDestructuringPattern && e.kind === 213 /* SpreadElement */) { - // Given the following situation: - // var c: {}; - // [...c] = ["", 0]; - // - // c is represented in the tree as a spread element in an array literal. - // But c really functions as a rest element, and its purpose is to provide - // a contextual type for the right hand side of the assignment. Therefore, - // instead of calling checkExpression on "...c", which will give an error - // if c is not iterable/array-like, we need to act as if we are trying to - // get the contextual element type from it. So we do something similar to - // getContextualTypeForElementExpression, which will crucially not error - // if there is no index type / iterated type. - var restArrayType = checkExpression(e.expression, checkMode, forceTuple); - var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) || - getIteratedTypeOrElementType(65 /* Destructuring */, restArrayType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); - if (restElementType) { - elementTypes.push(restElementType); + for (var i = 0; i < elementCount; i++) { + var e = elements[i]; + var spread = e.kind === 213 /* SpreadElement */ && e.expression; + var spreadType = spread && checkExpression(spread, checkMode, forceTuple); + if (spreadType && isTupleType(spreadType)) { + elementTypes.push.apply(elementTypes, getTypeArguments(spreadType)); + if (spreadType.target.hasRestElement) { + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; } } else { - var elementContextualType = getContextualTypeForElementExpression(contextualType, index); - var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); - elementTypes.push(type); - } - if (index < elementCount - 1 && e.kind === 213 /* SpreadElement */) { - hasNonEndingSpreadElement = true; + if (inDestructuringPattern && spreadType) { + // Given the following situation: + // var c: {}; + // [...c] = ["", 0]; + // + // c is represented in the tree as a spread element in an array literal. + // But c really functions as a rest element, and its purpose is to provide + // a contextual type for the right hand side of the assignment. Therefore, + // instead of calling checkExpression on "...c", which will give an error + // if c is not iterable/array-like, we need to act as if we are trying to + // get the contextual element type from it. So we do something similar to + // getContextualTypeForElementExpression, which will crucially not error + // if there is no index type / iterated type. + var restElementType = getIndexTypeOfType(spreadType, 1 /* Number */) || + getIteratedTypeOrElementType(65 /* Destructuring */, spreadType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); + if (restElementType) { + elementTypes.push(restElementType); + } + } + else { + var elementContextualType = getContextualTypeForElementExpression(contextualType, elementTypes.length); + var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); + elementTypes.push(type); + } + if (spread) { // tuples are done above, so these are only arrays + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; + } } } if (!hasNonEndingSpreadElement) { - var hasRestElement = elementCount > 0 && elements[elementCount - 1].kind === 213 /* SpreadElement */; - var minLength = elementCount - (hasRestElement ? 1 : 0); + var minLength = elementTypes.length - (hasEndingSpreadElement ? 1 : 0); // If array literal is actually a destructuring pattern, mark it as an implied type. We do this such // that we get the same behavior for "var [x, y] = []" and "[x, y] = []". var tupleResult = void 0; if (inDestructuringPattern && minLength > 0) { - var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasRestElement)); + var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); type.pattern = node; return type; } - else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasRestElement, elementCount, inConstContext)) { + else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasEndingSpreadElement, elementTypes.length, inConstContext)) { return createArrayLiteralType(tupleResult); } else if (forceTuple) { - return createArrayLiteralType(createTupleType(elementTypes, minLength, hasRestElement)); + return createArrayLiteralType(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); } } return createArrayLiteralType(createArrayType(elementTypes.length ? @@ -54166,10 +55098,12 @@ var ts; } // If object literal is contextually typed by the implied type of a binding pattern, augment the result // type with those properties for which the binding pattern specifies a default value. - if (contextualTypeHasPattern) { + // If the object literal is spread into another object literal, skip this step and let the top-level object + // literal handle it instead. + if (contextualTypeHasPattern && node.parent.kind !== 283 /* SpreadAssignment */) { for (var _i = 0, _a = getPropertiesOfType(contextualType); _i < _a.length; _i++) { var prop = _a[_i]; - if (!propertiesTable.get(prop.escapedName) && !(spread && getPropertyOfType(spread, prop.escapedName))) { + if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } @@ -54220,6 +55154,7 @@ var ts; } function checkJsxSelfClosingElementDeferred(node) { checkJsxOpeningLikeElementOrOpeningFragment(node); + resolveUntypedCall(node); // ensure type arguments and parameters are typechecked, even if there is an arity error } function checkJsxSelfClosingElement(node, _checkMode) { checkNodeDeferred(node); @@ -54661,7 +55596,7 @@ var ts; // if jsx emit was not react as there wont be error being emitted reactSym.isReferenced = 67108863 /* All */; // If react symbol is alias, mark it as refereced - if (reactSym.flags & 2097152 /* Alias */) { + if (reactSym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(reactSym)) { markAliasSymbolAsReferenced(reactSym); } } @@ -54829,7 +55764,7 @@ var ts; return false; } var thisType = getTypeFromTypeNode(thisParameter.type); - enclosingClass = ((thisType.flags & 262144 /* TypeParameter */) ? getConstraintOfTypeParameter(thisType) : thisType); + enclosingClass = ((thisType.flags & 262144 /* TypeParameter */) ? getConstraintOfTypeParameter(thisType) : thisType).target; } // No further restrictions for static properties if (flags & 32 /* Static */) { @@ -55787,8 +56722,83 @@ var ts; // can be specified by users through attributes property. var paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); var attributesType = checkExpressionWithContextualType(node.attributes, paramType, /*inferenceContext*/ undefined, checkMode); - return checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, + return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, /*headMessage*/ undefined, containingMessageChain, errorOutputContainer); + function checkTagNameDoesNotExpectTooManyArguments() { + var _a; + var tagType = ts.isJsxOpeningElement(node) || ts.isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : undefined; + if (!tagType) { + return true; + } + var tagCallSignatures = getSignaturesOfType(tagType, 0 /* Call */); + if (!ts.length(tagCallSignatures)) { + return true; + } + var factory = getJsxFactoryEntity(node); + if (!factory) { + return true; + } + var factorySymbol = resolveEntityName(factory, 111551 /* Value */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, node); + if (!factorySymbol) { + return true; + } + var factoryType = getTypeOfSymbol(factorySymbol); + var callSignatures = getSignaturesOfType(factoryType, 0 /* Call */); + if (!ts.length(callSignatures)) { + return true; + } + var hasFirstParamSignatures = false; + var maxParamCount = 0; + // Check that _some_ first parameter expects a FC-like thing, and that some overload of the SFC expects an acceptable number of arguments + for (var _i = 0, callSignatures_1 = callSignatures; _i < callSignatures_1.length; _i++) { + var sig = callSignatures_1[_i]; + var firstparam = getTypeAtPosition(sig, 0); + var signaturesOfParam = getSignaturesOfType(firstparam, 0 /* Call */); + if (!ts.length(signaturesOfParam)) + continue; + for (var _b = 0, signaturesOfParam_1 = signaturesOfParam; _b < signaturesOfParam_1.length; _b++) { + var paramSig = signaturesOfParam_1[_b]; + hasFirstParamSignatures = true; + if (hasEffectiveRestParameter(paramSig)) { + return true; // some signature has a rest param, so function components can have an arbitrary number of arguments + } + var paramCount = getParameterCount(paramSig); + if (paramCount > maxParamCount) { + maxParamCount = paramCount; + } + } + } + if (!hasFirstParamSignatures) { + // Not a single signature had a first parameter which expected a signature - for back compat, and + // to guard against generic factories which won't have signatures directly, do not error + return true; + } + var absoluteMinArgCount = Infinity; + for (var _c = 0, tagCallSignatures_1 = tagCallSignatures; _c < tagCallSignatures_1.length; _c++) { + var tagSig = tagCallSignatures_1[_c]; + var tagRequiredArgCount = getMinArgumentCount(tagSig); + if (tagRequiredArgCount < absoluteMinArgCount) { + absoluteMinArgCount = tagRequiredArgCount; + } + } + if (absoluteMinArgCount <= maxParamCount) { + return true; // some signature accepts the number of arguments the function component provides + } + if (reportErrors) { + var diag = ts.createDiagnosticForNode(node.tagName, ts.Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, ts.entityNameToString(node.tagName), absoluteMinArgCount, ts.entityNameToString(factory), maxParamCount); + var tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) === null || _a === void 0 ? void 0 : _a.valueDeclaration; + if (tagNameDeclaration) { + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(tagNameDeclaration, ts.Diagnostics._0_is_declared_here, ts.entityNameToString(node.tagName))); + } + if (errorOutputContainer && errorOutputContainer.skipLogging) { + (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); + } + if (!errorOutputContainer.skipLogging) { + diagnostics.add(diag); + } + } + return false; + } } function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors, containingMessageChain) { var errorOutputContainer = { errors: undefined, skipLogging: true }; @@ -56269,7 +57279,7 @@ var ts; } } } - return produceDiagnostics || !args ? resolveErrorCall(node) : getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); + return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); function chooseOverload(candidates, relation, signatureHelpTrailingComma) { if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; } candidatesForArgumentError = undefined; @@ -56351,9 +57361,9 @@ var ts; } } // No signature was applicable. We have already reported the errors for the invalid signature. - // If this is a type resolution session, e.g. Language Service, try to get better information than anySignature. function getCandidateForOverloadFailure(node, candidates, args, hasCandidatesOutArray) { ts.Debug.assert(candidates.length > 0); // Else should not have called this. + checkNodeDeferred(node); // Normally we will combine overloads. Skip this if they have type parameters since that's hard to combine. // Don't do this if there is a `candidatesOutArray`, // because then we want the chosen best candidate to be one of the overloads, not a combination. @@ -56528,7 +57538,7 @@ var ts; if (node.arguments.length === 1) { var text = ts.getSourceFileOfNode(node).text; if (ts.isLineBreak(text.charCodeAt(ts.skipTrivia(text, node.expression.end, /* stopAfterLineBreak */ true) - 1))) { - relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.It_is_highly_likely_that_you_are_missing_a_semicolon); + relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.Are_you_missing_a_semicolon); } } invocationError(node.expression, apparentType, 0 /* Call */, relatedInformation); @@ -57417,15 +58427,15 @@ var ts; if (!parameter) { signature.thisParameter = createSymbolWithType(context.thisParameter, /*type*/ undefined); } - assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); + assignParameterType(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { - var contextualParameterType = getTypeAtPosition(context, i); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + var contextualParameterType = tryGetTypeAtPosition(context, i); + assignParameterType(parameter, contextualParameterType); } } if (signatureHasRestParameter(signature)) { @@ -57433,7 +58443,30 @@ var ts; var parameter = ts.last(signature.parameters); if (ts.isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { var contextualParameterType = getRestTypeAtPosition(context, len); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + assignParameterType(parameter, contextualParameterType); + } + } + } + function assignNonContextualParameterTypes(signature) { + if (signature.thisParameter) { + assignParameterType(signature.thisParameter); + } + for (var _i = 0, _a = signature.parameters; _i < _a.length; _i++) { + var parameter = _a[_i]; + assignParameterType(parameter); + } + } + function assignParameterType(parameter, type) { + var links = getSymbolLinks(parameter); + if (!links.type) { + var declaration = parameter.valueDeclaration; + links.type = type || getWidenedTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true); + if (declaration.name.kind !== 75 /* Identifier */) { + // if inference didn't come up with anything but unknown, fall back to the binding pattern if present. + if (links.type === unknownType) { + links.type = getTypeFromBindingPattern(declaration.name); + } + assignBindingElementTypes(declaration.name); } } } @@ -57452,20 +58485,6 @@ var ts; } } } - function assignTypeToParameterAndFixTypeParameters(parameter, contextualType) { - var links = getSymbolLinks(parameter); - if (!links.type) { - links.type = contextualType; - var decl = parameter.valueDeclaration; - if (decl.name.kind !== 75 /* Identifier */) { - // if inference didn't come up with anything but unknown, fall back to the binding pattern if present. - if (links.type === unknownType) { - links.type = getTypeFromBindingPattern(decl.name); - } - assignBindingElementTypes(decl.name); - } - } - } function createPromiseType(promisedType) { // creates a `Promise` type where `T` is the promisedType argument var globalPromiseType = getGlobalPromiseType(/*reportErrors*/ true); @@ -57827,7 +58846,7 @@ var ts; // The identityMapper object is used to indicate that function expressions are wildcards if (checkMode && checkMode & 4 /* SkipContextSensitive */ && isContextSensitive(node)) { // Skip parameters, return signature with return type that retains noncontextual parts so inferences can still be drawn in an early stage - if (!ts.getEffectiveReturnTypeNode(node) && hasContextSensitiveReturnExpression(node)) { + if (!ts.getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) { // Return plain anyFunctionType if there is no possibility we'll make inferences from the return type var contextualSignature = getContextualSignature(node); if (contextualSignature && couldContainTypeVariables(getReturnTypeOfSignature(contextualSignature))) { @@ -57849,12 +58868,8 @@ var ts; if (!hasGrammarError && node.kind === 201 /* FunctionExpression */) { checkGrammarForGenerator(node); } - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return type; - } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); - return type; + return getTypeOfSymbol(getSymbolOfNode(node)); } function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) { var links = getNodeLinks(node); @@ -57866,13 +58881,12 @@ var ts; // already assigned contextual types. if (!(links.flags & 1024 /* ContextChecked */)) { links.flags |= 1024 /* ContextChecked */; - if (contextualSignature) { - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return; - } - var signature = getSignaturesOfType(type, 0 /* Call */)[0]; - if (isContextSensitive(node)) { + var signature = ts.firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfNode(node)), 0 /* Call */)); + if (!signature) { + return; + } + if (isContextSensitive(node)) { + if (contextualSignature) { var inferenceContext = getInferenceContext(node); if (checkMode && checkMode & 2 /* Inferential */) { inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext); @@ -57881,11 +58895,15 @@ var ts; instantiateSignature(contextualSignature, inferenceContext.mapper) : contextualSignature; assignContextualParameterTypes(signature, instantiatedContextualSignature); } - if (!getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { - var returnType = getReturnTypeFromBody(node, checkMode); - if (!signature.resolvedReturnType) { - signature.resolvedReturnType = returnType; - } + else { + // Force resolution of all parameter types such that the absence of a contextual type is consistently reflected. + assignNonContextualParameterTypes(signature); + } + } + if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { + var returnType = getReturnTypeFromBody(node, checkMode); + if (!signature.resolvedReturnType) { + signature.resolvedReturnType = returnType; } } checkSignatureDeclaration(node); @@ -58201,7 +59219,7 @@ var ts; // Return true if type might be of the given kind. A union or intersection type might be of a given // kind if at least one constituent type is of the given kind. function maybeTypeOfKind(type, kind) { - if (type.flags & kind & ~131072 /* GenericMappedType */ || kind & 131072 /* GenericMappedType */ && isGenericMappedType(type)) { + if (type.flags & kind) { return true; } if (type.flags & 3145728 /* UnionOrIntersection */) { @@ -58498,12 +59516,81 @@ var ts; function isTypeEqualityComparableTo(source, target) { return (target.flags & 98304 /* Nullable */) !== 0 || isTypeComparableTo(source, target); } + var CheckBinaryExpressionState; + (function (CheckBinaryExpressionState) { + CheckBinaryExpressionState[CheckBinaryExpressionState["MaybeCheckLeft"] = 0] = "MaybeCheckLeft"; + CheckBinaryExpressionState[CheckBinaryExpressionState["CheckRight"] = 1] = "CheckRight"; + CheckBinaryExpressionState[CheckBinaryExpressionState["FinishCheck"] = 2] = "FinishCheck"; + })(CheckBinaryExpressionState || (CheckBinaryExpressionState = {})); function checkBinaryExpression(node, checkMode) { - if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { - return checkExpression(node.right, checkMode); + var workStacks = { + expr: [node], + state: [0 /* MaybeCheckLeft */], + leftType: [undefined] + }; + var stackIndex = 0; + var lastResult; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0 /* MaybeCheckLeft */: { + if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { + finishInvocation(checkExpression(node.right, checkMode)); + break; + } + checkGrammarNullishCoalesceWithLogicalExpression(node); + var operator = node.operatorToken.kind; + if (operator === 62 /* EqualsToken */ && (node.left.kind === 193 /* ObjectLiteralExpression */ || node.left.kind === 192 /* ArrayLiteralExpression */)) { + finishInvocation(checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 104 /* ThisKeyword */)); + break; + } + advanceState(1 /* CheckRight */); + maybeCheckExpression(node.left); + break; + } + case 1 /* CheckRight */: { + var leftType = lastResult; + workStacks.leftType[stackIndex] = leftType; + var operator = node.operatorToken.kind; + if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { + checkTruthinessOfType(leftType, node.left); + } + advanceState(2 /* FinishCheck */); + maybeCheckExpression(node.right); + break; + } + case 2 /* FinishCheck */: { + var leftType = workStacks.leftType[stackIndex]; + var rightType = lastResult; + finishInvocation(checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node)); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for checkBinaryExpression"); + } + } + return lastResult; + function finishInvocation(result) { + lastResult = result; + stackIndex--; + } + /** + * Note that `advanceState` sets the _current_ head state, and that `maybeCheckExpression` potentially pushes on a new + * head state; so `advanceState` must be called before any `maybeCheckExpression` during a state's execution. + */ + function advanceState(nextState) { + workStacks.state[stackIndex] = nextState; + } + function maybeCheckExpression(node) { + if (ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0 /* MaybeCheckLeft */; + workStacks.leftType[stackIndex] = undefined; + } + else { + lastResult = checkExpression(node, checkMode); + } } - checkGrammarNullishCoalesceWithLogicalExpression(node); - return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, checkMode, node); } function checkGrammarNullishCoalesceWithLogicalExpression(node) { var left = node.left, operatorToken = node.operatorToken, right = node.right; @@ -58516,6 +59603,8 @@ var ts; } } } + // Note that this and `checkBinaryExpression` above should behave mostly the same, except this elides some + // expression-wide checks and does not use a work stack to fold nested binary expressions into the same callstack frame function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { var operator = operatorToken.kind; if (operator === 62 /* EqualsToken */ && (left.kind === 193 /* ObjectLiteralExpression */ || left.kind === 192 /* ArrayLiteralExpression */)) { @@ -58529,6 +59618,10 @@ var ts; leftType = checkExpression(left, checkMode); } var rightType = checkExpression(right, checkMode); + return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode); + } + function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode) { + var operator = operatorToken.kind; switch (operator) { case 41 /* AsteriskToken */: case 42 /* AsteriskAsteriskToken */: @@ -58899,7 +59992,8 @@ var ts; return getContextualIterationType(2 /* Next */, func) || anyType; } function checkConditionalExpression(node, checkMode) { - checkTruthinessExpression(node.condition); + var type = checkTruthinessExpression(node.condition); + checkTestingKnownTruthyCallableType(node.condition, node.whenTrue, type); var type1 = checkExpression(node.whenTrue, checkMode); var type2 = checkExpression(node.whenFalse, checkMode); return getUnionType([type1, type2], 2 /* Subtype */); @@ -58927,17 +60021,24 @@ var ts; var context = getContextNode(node); var saveContextualType = context.contextualType; var saveInferenceContext = context.inferenceContext; - context.contextualType = contextualType; - context.inferenceContext = inferenceContext; - var type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0)); - // We strip literal freshness when an appropriate contextual type is present such that contextually typed - // literals always preserve their literal types (otherwise they might widen during type inference). An alternative - // here would be to not mark contextually typed literals as fresh in the first place. - var result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? - getRegularTypeOfLiteralType(type) : type; - context.contextualType = saveContextualType; - context.inferenceContext = saveInferenceContext; - return result; + try { + context.contextualType = contextualType; + context.inferenceContext = inferenceContext; + var type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0)); + // We strip literal freshness when an appropriate contextual type is present such that contextually typed + // literals always preserve their literal types (otherwise they might widen during type inference). An alternative + // here would be to not mark contextually typed literals as fresh in the first place. + var result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? + getRegularTypeOfLiteralType(type) : type; + return result; + } + finally { + // In the event our operation is canceled or some other exception occurs, reset the contextual type + // so that we do not accidentally hold onto an instance of the checker, as a Type created in the services layer + // may hold onto the checker that created it. + context.contextualType = saveContextualType; + context.inferenceContext = saveInferenceContext; + } } function checkExpressionCached(node, checkMode) { var links = getNodeLinks(node); @@ -59259,9 +60360,16 @@ var ts; } var saveContextualType = node.contextualType; node.contextualType = anyType; - var type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */); - node.contextualType = saveContextualType; - return type; + try { + var type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */); + return type; + } + finally { + // In the event our operation is canceled or some other exception occurs, reset the contextual type + // so that we do not accidentally hold onto an instance of the checker, as a Type created in the services layer + // may hold onto the checker that created it. + node.contextualType = saveContextualType; + } } function checkExpression(node, checkMode, forceTuple) { var saveCurrentNode = currentNode; @@ -60123,7 +61231,7 @@ var ts; getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return ts.hasModifier(node, 8 /* Private */) && !!(node.flags & 8388608 /* Ambient */); + return (ts.hasModifier(node, 8 /* Private */) || ts.isPrivateIdentifierPropertyDeclaration(node)) && !!(node.flags & 8388608 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedModifierFlags(n); @@ -60416,9 +61524,9 @@ var ts; case 247 /* TypeAliasDeclaration */: // A jsdoc typedef and callback are, by definition, type aliases. // falls through - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return 2 /* ExportType */; case 249 /* ModuleDeclaration */: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ @@ -60426,6 +61534,7 @@ var ts; : 4 /* ExportNamespace */; case 245 /* ClassDeclaration */: case 248 /* EnumDeclaration */: + case 284 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; case 290 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; @@ -60440,10 +61549,10 @@ var ts; case 253 /* ImportEqualsDeclaration */: case 256 /* NamespaceImport */: case 255 /* ImportClause */: - var result_7 = 0 /* None */; + var result_8 = 0 /* None */; var target = resolveAlias(getSymbolOfNode(d)); - ts.forEach(target.declarations, function (d) { result_7 |= getDeclarationSpaces(d); }); - return result_7; + ts.forEach(target.declarations, function (d) { result_8 |= getDeclarationSpaces(d); }); + return result_8; case 242 /* VariableDeclaration */: case 191 /* BindingElement */: case 244 /* FunctionDeclaration */: @@ -60766,7 +61875,8 @@ var ts; if (rootSymbol && rootSymbol.flags & 2097152 /* Alias */ && symbolIsValue(rootSymbol) - && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol))) { + && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol)) + && !getTypeOnlyAliasDeclaration(rootSymbol)) { markAliasSymbolAsReferenced(rootSymbol); } } @@ -60960,6 +62070,13 @@ var ts; } checkSignatureDeclaration(node); } + function checkJSDocImplementsTag(node) { + var classLike = ts.getJSDocHost(node); + if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { + error(classLike, ts.Diagnostics.JSDoc_0_is_not_attached_to_a_class, ts.idText(node.tagName)); + return; + } + } function checkJSDocAugmentsTag(node) { var classLike = ts.getJSDocHost(node); if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { @@ -61132,7 +62249,9 @@ var ts; break; } var symbol = getSymbolOfNode(member); - if (!symbol.isReferenced && (ts.hasModifier(member, 8 /* Private */) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name))) { + if (!symbol.isReferenced + && (ts.hasModifier(member, 8 /* Private */) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name)) + && !(member.flags & 8388608 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, ts.createDiagnosticForNode(member.name, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; @@ -61697,21 +62816,21 @@ var ts; // Grammar checking checkGrammarStatementInAmbientContext(node); var type = checkTruthinessExpression(node.expression); - checkTestingKnownTruthyCallableType(node, type); + checkTestingKnownTruthyCallableType(node.expression, node.thenStatement, type); checkSourceElement(node.thenStatement); if (node.thenStatement.kind === 224 /* EmptyStatement */) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); } - function checkTestingKnownTruthyCallableType(ifStatement, type) { + function checkTestingKnownTruthyCallableType(condExpr, body, type) { if (!strictNullChecks) { return; } - var testedNode = ts.isIdentifier(ifStatement.expression) - ? ifStatement.expression - : ts.isPropertyAccessExpression(ifStatement.expression) - ? ifStatement.expression.name + var testedNode = ts.isIdentifier(condExpr) + ? condExpr + : ts.isPropertyAccessExpression(condExpr) + ? condExpr.name : undefined; if (!testedNode) { return; @@ -61733,7 +62852,7 @@ var ts; if (!testedFunctionSymbol) { return; } - var functionIsUsedInBody = ts.forEachChild(ifStatement.thenStatement, function check(childNode) { + var functionIsUsedInBody = ts.forEachChild(body, function check(childNode) { if (ts.isIdentifier(childNode)) { var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol.id === testedFunctionSymbol.id) { @@ -61743,7 +62862,7 @@ var ts; return ts.forEachChild(childNode, check); }); if (!functionIsUsedInBody) { - error(ifStatement.expression, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); + error(condExpr, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); } } function checkDoStatement(node) { @@ -61758,13 +62877,15 @@ var ts; checkTruthinessExpression(node.expression); checkSourceElement(node.statement); } - function checkTruthinessExpression(node, checkMode) { - var type = checkExpression(node, checkMode); + function checkTruthinessOfType(type, node) { if (type.flags & 16384 /* Void */) { error(node, ts.Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); } return type; } + function checkTruthinessExpression(node, checkMode) { + return checkTruthinessOfType(checkExpression(node, checkMode), node); + } function checkForStatement(node) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { @@ -62064,6 +63185,12 @@ var ts; } return noIterationTypes; } + function getCachedIterationTypes(type, cacheKey) { + return type[cacheKey]; + } + function setCachedIterationTypes(type, cacheKey, cachedTypes) { + return type[cacheKey] = cachedTypes; + } /** * Gets the *yield*, *return*, and *next* types from an `Iterable`-like or `AsyncIterable`-like type. * @@ -62100,7 +63227,7 @@ var ts; return iterationTypes_1; } var cacheKey = use & 2 /* AllowsAsyncIterablesFlag */ ? "iterationTypesOfAsyncIterable" : "iterationTypesOfIterable"; - var cachedTypes = type[cacheKey]; + var cachedTypes = getCachedIterationTypes(type, cacheKey); if (cachedTypes) return cachedTypes === noIterationTypes ? undefined : cachedTypes; var allIterationTypes; @@ -62118,7 +63245,7 @@ var ts; } } var iterationTypes = allIterationTypes ? combineIterationTypes(allIterationTypes) : noIterationTypes; - type[cacheKey] = iterationTypes; + setCachedIterationTypes(type, cacheKey, iterationTypes); return iterationTypes === noIterationTypes ? undefined : iterationTypes; } function getAsyncFromSyncIterationTypes(iterationTypes, errorNode) { @@ -62157,7 +63284,7 @@ var ts; if (use & 2 /* AllowsAsyncIterablesFlag */) { // for a sync iterable in an async context, only use the cached types if they are valid. if (iterationTypes !== noIterationTypes) { - return type.iterationTypesOfAsyncIterable = getAsyncFromSyncIterationTypes(iterationTypes, errorNode); + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", getAsyncFromSyncIterationTypes(iterationTypes, errorNode)); } } else { @@ -62175,9 +63302,9 @@ var ts; var iterationTypes = getIterationTypesOfIterableSlow(type, syncIterationTypesResolver, errorNode); if (iterationTypes !== noIterationTypes) { if (use & 2 /* AllowsAsyncIterablesFlag */) { - return type.iterationTypesOfAsyncIterable = iterationTypes + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", iterationTypes ? getAsyncFromSyncIterationTypes(iterationTypes, errorNode) - : noIterationTypes; + : noIterationTypes); } else { return iterationTypes; @@ -62194,7 +63321,7 @@ var ts; * `getIterationTypesOfIterable` instead. */ function getIterationTypesOfIterableCached(type, resolver) { - return type[resolver.iterableCacheKey]; + return getCachedIterationTypes(type, resolver.iterableCacheKey); } function getIterationTypesOfGlobalIterableType(globalType, resolver) { var globalIterationTypes = getIterationTypesOfIterableCached(globalType, resolver) || @@ -62227,14 +63354,14 @@ var ts; // While we define these as `any` and `undefined` in our libs by default, a custom lib *could* use // different definitions. var _a = getIterationTypesOfGlobalIterableType(globalType, resolver), returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } // As an optimization, if the type is an instantiation of the following global type, then // just grab its related type arguments: // - `Generator` or `AsyncGenerator` if (isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } /** @@ -62248,18 +63375,19 @@ var ts; * `getIterationTypesOfIterable` instead. */ function getIterationTypesOfIterableSlow(type, resolver, errorNode) { + var _a; var method = getPropertyOfType(type, ts.getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName)); var methodType = method && !(method.flags & 16777216 /* Optional */) ? getTypeOfSymbol(method) : undefined; if (isTypeAny(methodType)) { - return type[resolver.iterableCacheKey] = anyIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes); } var signatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : undefined; if (!ts.some(signatures)) { - return type[resolver.iterableCacheKey] = noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes); } var iteratorType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), 2 /* Subtype */); - var iterationTypes = getIterationTypesOfIterator(iteratorType, resolver, errorNode) || noIterationTypes; - return type[resolver.iterableCacheKey] = iterationTypes; + var iterationTypes = (_a = getIterationTypesOfIterator(iteratorType, resolver, errorNode)) !== null && _a !== void 0 ? _a : noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes); } function reportTypeNotIterableError(errorNode, type, allowAsyncIterables) { var message = allowAsyncIterables @@ -62290,7 +63418,7 @@ var ts; * `getIterationTypesOfIterator` instead. */ function getIterationTypesOfIteratorCached(type, resolver) { - return type[resolver.iteratorCacheKey]; + return getCachedIterationTypes(type, resolver.iteratorCacheKey); } /** * Gets the iteration types of an `Iterator`-like or `AsyncIterator`-like type from the @@ -62319,12 +63447,12 @@ var ts; var globalIterationTypes = getIterationTypesOfIteratorCached(globalType, resolver) || getIterationTypesOfIteratorSlow(globalType, resolver, /*errorNode*/ undefined); var _a = globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes, returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } if (isReferenceToType(type, resolver.getGlobalIteratorType(/*reportErrors*/ false)) || isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } function isIteratorResult(type, kind) { @@ -62352,7 +63480,7 @@ var ts; if (isTypeAny(type)) { return anyIterationTypes; } - var cachedTypes = type.iterationTypesOfIteratorResult; + var cachedTypes = getCachedIterationTypes(type, "iterationTypesOfIteratorResult"); if (cachedTypes) { return cachedTypes; } @@ -62360,11 +63488,11 @@ var ts; // or `IteratorReturnResult` types, then just grab its type argument. if (isReferenceToType(type, getGlobalIteratorYieldResultType(/*reportErrors*/ false))) { var yieldType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType_1, /*returnType*/ undefined, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType_1, /*returnType*/ undefined, /*nextType*/ undefined)); } if (isReferenceToType(type, getGlobalIteratorReturnResultType(/*reportErrors*/ false))) { var returnType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(/*yieldType*/ undefined, returnType_1, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(/*yieldType*/ undefined, returnType_1, /*nextType*/ undefined)); } // Choose any constituents that can produce the requested iteration type. var yieldIteratorResult = filterType(type, isYieldIteratorResult); @@ -62372,13 +63500,13 @@ var ts; var returnIteratorResult = filterType(type, isReturnIteratorResult); var returnType = returnIteratorResult !== neverType ? getTypeOfPropertyOfType(returnIteratorResult, "value") : undefined; if (!yieldType && !returnType) { - return type.iterationTypesOfIteratorResult = noIterationTypes; + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", noIterationTypes); } // From https://tc39.github.io/ecma262/#sec-iteratorresult-interface // > ... If the iterator does not have a return value, `value` is `undefined`. In that case, the // > `value` property may be absent from the conforming object if it does not inherit an explicit // > `value` property. - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType, returnType || voidType, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType, returnType || voidType, /*nextType*/ undefined)); } /** * Gets the *yield*, *return*, and *next* types of a the `next()`, `return()`, or @@ -62471,7 +63599,7 @@ var ts; getIterationTypesOfMethod(type, resolver, "return", errorNode), getIterationTypesOfMethod(type, resolver, "throw", errorNode), ]); - return type[resolver.iteratorCacheKey] = iterationTypes; + return setCachedIterationTypes(type, resolver.iteratorCacheKey, iterationTypes); } /** * Gets the requested "iteration type" from a type that is either `Iterable`-like, `Iterator`-like, @@ -62865,7 +63993,7 @@ var ts; var sourceConstraint = constraint && getTypeFromTypeNode(constraint); var targetConstraint = getConstraintOfTypeParameter(target); // relax check if later interface augmentation has no constraint, it's more broad and is OK to merge with - // a more constrained interface (this could be generalized to a full heirarchy check, but that's maybe overkill) + // a more constrained interface (this could be generalized to a full hierarchy check, but that's maybe overkill) if (sourceConstraint && targetConstraint && !isTypeIdenticalTo(sourceConstraint, targetConstraint)) { return false; } @@ -62969,7 +64097,7 @@ var ts; checkKindsOfPropertyMemberOverrides(type, baseType_1); } } - var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(node); + var implementedTypeNodes = ts.getEffectiveImplementsTypeNodes(node); if (implementedTypeNodes) { for (var _b = 0, implementedTypeNodes_1 = implementedTypeNodes; _b < implementedTypeNodes_1.length; _b++) { var typeRefNode = implementedTypeNodes_1[_b]; @@ -63294,6 +64422,7 @@ var ts; // Grammar checking checkGrammarDecoratorsAndModifiers(node); checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_alias_name_cannot_be_0); + checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); checkSourceElement(node.type); registerForUnusedIdentifiersCheck(node); @@ -63838,6 +64967,9 @@ var ts; if (!checkGrammarDecoratorsAndModifiers(node) && ts.hasModifiers(node)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); } + if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0 /* ES3 */) { + checkExternalEmitHelpers(node, 1048576 /* CreateBinding */); + } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { // export { x, y } @@ -63875,16 +65007,14 @@ var ts; return !isInAppropriateContext; } function importClauseContainsReferencedImport(importClause) { - return importClause.name && isReferenced(importClause) - || importClause.namedBindings && namedBindingsContainsReferencedImport(importClause.namedBindings); - function isReferenced(declaration) { - return !!getMergedSymbol(getSymbolOfNode(declaration)).isReferenced; - } - function namedBindingsContainsReferencedImport(namedBindings) { - return ts.isNamespaceImport(namedBindings) - ? isReferenced(namedBindings) - : ts.some(namedBindings.elements, isReferenced); - } + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolOfNode(declaration).isReferenced; + }); + } + function importClauseContainsConstEnumUsedAsValue(importClause) { + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolLinks(getSymbolOfNode(declaration)).constEnumReferenced; + }); } function checkImportsForTypeOnlyConversion(sourceFile) { for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { @@ -63893,11 +65023,9 @@ var ts; statement.importClause && !statement.importClause.isTypeOnly && importClauseContainsReferencedImport(statement.importClause) && - !isReferencedAliasDeclaration(statement.importClause, /*checkChildren*/ true)) { - var isError = compilerOptions.importsNotUsedAsValues === 2 /* Error */; - errorOrSuggestion(isError, statement, isError - ? ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error - : ts.Diagnostics.This_import_may_be_converted_to_a_type_only_import); + !isReferencedAliasDeclaration(statement.importClause, /*checkChildren*/ true) && + !importClauseContainsConstEnumUsedAsValue(statement.importClause)) { + error(statement, ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error); } } } @@ -64107,15 +65235,17 @@ var ts; return checkImportType(node); case 307 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 308 /* JSDocImplementsTag */: + return checkJSDocImplementsTag(node); + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: return checkJSDocParameterTag(node); case 300 /* JSDocFunctionType */: checkJSDocFunctionType(node); @@ -64294,6 +65424,16 @@ var ts; currentNode = node; instantiationCount = 0; switch (node.kind) { + case 196 /* CallExpression */: + case 197 /* NewExpression */: + case 198 /* TaggedTemplateExpression */: + case 157 /* Decorator */: + case 268 /* JsxOpeningElement */: + // These node kinds are deferred checked when overload resolution fails + // To save on work, we ensure the arguments are checked just once, in + // a deferred way + resolveUntypedCall(node); + break; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 161 /* MethodDeclaration */: @@ -64363,7 +65503,9 @@ var ts; } }); } - if (!node.isDeclarationFile && ts.isExternalModule(node)) { + if (compilerOptions.importsNotUsedAsValues === 2 /* Error */ && + !node.isDeclarationFile && + ts.isExternalModule(node)) { checkImportsForTypeOnlyConversion(node); } if (ts.isExternalOrCommonJsModule(node)) { @@ -64677,10 +65819,10 @@ var ts; return entityNameSymbol; } } - if (name.parent.kind === 316 /* JSDocParameterTag */) { + if (name.parent.kind === 317 /* JSDocParameterTag */) { return ts.getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 155 /* TypeParameter */ && name.parent.parent.kind === 320 /* JSDocTemplateTag */) { + if (name.parent.kind === 155 /* TypeParameter */ && name.parent.parent.kind === 321 /* JSDocTemplateTag */) { ts.Debug.assert(!ts.isInJSFile(name)); // Otherwise `isDeclarationName` would have been true. var typeParameter = ts.getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -64721,7 +65863,7 @@ var ts; // Do we want to return undefined here? return undefined; } - function getSymbolAtLocation(node) { + function getSymbolAtLocation(node, ignoreErrors) { if (node.kind === 290 /* SourceFile */) { return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } @@ -64794,7 +65936,7 @@ var ts; ((node.parent.kind === 254 /* ImportDeclaration */ || node.parent.kind === 260 /* ExportDeclaration */) && node.parent.moduleSpecifier === node) || ((ts.isInJSFile(node) && ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteralLike*/ false)) || ts.isImportCall(node.parent)) || (ts.isLiteralTypeNode(node.parent) && ts.isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent)) { - return resolveExternalModuleName(node, node); + return resolveExternalModuleName(node, node, ignoreErrors); } if (ts.isCallExpression(parent) && ts.isBindableObjectDefinePropertyCall(parent) && parent.arguments[1] === node) { return getSymbolOfNode(parent); @@ -64814,9 +65956,9 @@ var ts; case 80 /* ClassKeyword */: return getSymbolOfNode(node.parent); case 188 /* ImportType */: - return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal) : undefined; + return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : undefined; case 89 /* ExportKeyword */: - return ts.isExportAssignment(node.parent) ? ts.Debug.assertDefined(node.parent.symbol) : undefined; + return ts.isExportAssignment(node.parent) ? ts.Debug.checkDefined(node.parent.symbol) : undefined; default: return undefined; } @@ -64870,7 +66012,7 @@ var ts; if (isDeclarationNameOrImportPropertyName(node)) { var symbol = getSymbolAtLocation(node); if (symbol) { - return ts.isTypeOnlyImportOrExportName(node) ? getDeclaredTypeOfSymbol(symbol) : getTypeOfSymbol(symbol); + return getTypeOfSymbol(symbol); } return errorType; } @@ -65089,7 +66231,7 @@ var ts; var symbol = getReferencedValueSymbol(node); // We should only get the declaration of an alias if there isn't a local value // declaration for the symbol - if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */)) { + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !getTypeOnlyAliasDeclaration(symbol)) { return getDeclarationOfAliasSymbol(symbol); } } @@ -65170,11 +66312,13 @@ var ts; function isValueAliasDeclaration(node) { switch (node.kind) { case 253 /* ImportEqualsDeclaration */: + return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); case 255 /* ImportClause */: case 256 /* NamespaceImport */: case 258 /* ImportSpecifier */: case 263 /* ExportSpecifier */: - return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); + var symbol = getSymbolOfNode(node) || unknownSymbol; + return isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol); case 260 /* ExportDeclaration */: var exportClause = node.exportClause; return !!exportClause && (ts.isNamespaceExport(exportClause) || @@ -65209,14 +66353,15 @@ var ts; return isConstEnumSymbol(s) || !!s.constEnumOnlyModule; } function isReferencedAliasDeclaration(node, checkChildren) { - if (ts.isAliasSymbolDeclaration(node)) { + if (isAliasSymbolDeclaration(node)) { var symbol = getSymbolOfNode(node); if (symbol && getSymbolLinks(symbol).referenced) { return true; } var target = getSymbolLinks(symbol).target; // TODO: GH#18217 if (target && ts.getModifierFlags(node) & 1 /* Export */ && - target.flags & 111551 /* Value */ && (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { + target.flags & 111551 /* Value */ && + (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { // An `export import ... =` of a value symbol is always considered referenced return true; } @@ -65460,6 +66605,9 @@ var ts; var type = getTypeOfSymbol(getSymbolOfNode(node)); return literalTypeToNode(type, node, tracker); } + function getJsxFactoryEntity(location) { + return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; + } function createResolver() { // this variable and functions that use it are deliberately moved here from the outer scope // to avoid scope pollution @@ -65530,7 +66678,7 @@ var ts; var symbol = node && getSymbolOfNode(node); return !!(symbol && ts.getCheckFlags(symbol) & 4096 /* Late */); }, - getJsxFactoryEntity: function (location) { return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; }, + getJsxFactoryEntity: getJsxFactoryEntity, getAllAccessorDeclarations: function (accessor) { accessor = ts.getParseTreeNode(accessor, ts.isGetOrSetAccessorDeclaration); // TODO: GH#18217 var otherKind = accessor.kind === 164 /* SetAccessor */ ? 163 /* GetAccessor */ : 164 /* SetAccessor */; @@ -65796,7 +66944,7 @@ var ts; var helpersModule = resolveHelpersModule(sourceFile, location); if (helpersModule !== unknownSymbol) { var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (var helper = 1 /* FirstEmitHelper */; helper <= 524288 /* LastEmitHelper */; helper <<= 1) { + for (var helper = 1 /* FirstEmitHelper */; helper <= 1048576 /* LastEmitHelper */; helper <<= 1) { if (uncheckedHelpers & helper) { var name = getHelperName(helper); var symbol = getSymbol(helpersModule.exports, ts.escapeLeadingUnderscores(name), 111551 /* Value */); @@ -65832,6 +66980,7 @@ var ts; case 131072 /* MakeTemplateObject */: return "__makeTemplateObject"; case 262144 /* ClassPrivateFieldGet */: return "__classPrivateFieldGet"; case 524288 /* ClassPrivateFieldSet */: return "__classPrivateFieldSet"; + case 1048576 /* CreateBinding */: return "__createBinding"; default: return ts.Debug.fail("Unrecognized helper"); } } @@ -65915,6 +67064,9 @@ var ts; return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract"); } } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + } flags |= ts.modifierToFlag(modifier.kind); break; case 120 /* StaticKeyword */: @@ -65997,6 +67149,9 @@ var ts; else if ((node.parent.flags & 8388608 /* Ambient */) && node.parent.kind === 250 /* ModuleBlock */) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); + } flags |= 2 /* Ambient */; lastDeclare = modifier; break; @@ -66022,7 +67177,7 @@ var ts; } } if (ts.isNamedDeclaration(node) && node.name.kind === 76 /* PrivateIdentifier */) { - return grammarErrorOnNode(node, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); } flags |= 128 /* Abstract */; break; @@ -66065,9 +67220,6 @@ var ts; else if (node.kind === 156 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } - else if (ts.isNamedDeclaration(node) && (flags & 28 /* AccessibilityModifier */) && node.name.kind === 76 /* PrivateIdentifier */) { - return grammarErrorOnNode(node, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); - } if (flags & 256 /* Async */) { return checkGrammarAsyncModifier(node, lastAsync); } @@ -66600,7 +67752,7 @@ var ts; if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } - var parameter = ts.Debug.assertDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); + var parameter = ts.Debug.checkDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); } @@ -67059,10 +68211,10 @@ var ts; // this has already been reported, and don't report if it has. // if (node.parent.kind === 223 /* Block */ || node.parent.kind === 250 /* ModuleBlock */ || node.parent.kind === 290 /* SourceFile */) { - var links_1 = getNodeLinks(node.parent); + var links_2 = getNodeLinks(node.parent); // Check if the containing block ever report this error - if (!links_1.hasReportedStatementInAmbientContext) { - return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); + if (!links_2.hasReportedStatementInAmbientContext) { + return links_2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); } } else { @@ -67498,6 +68650,9 @@ var ts; ts.getGeneratedNameForNode = getGeneratedNameForNode; // Private Identifiers function createPrivateIdentifier(text) { + if (text[0] !== "#") { + ts.Debug.fail("First character of private identifier must be #: " + text); + } var node = createSynthesizedNode(76 /* PrivateIdentifier */); node.escapedText = ts.escapeLeadingUnderscores(text); return node; @@ -68618,7 +69773,7 @@ var ts; } var token = rawTextScanner.scan(); if (token === 23 /* CloseBracketToken */) { - token = rawTextScanner.reScanTemplateToken(); + token = rawTextScanner.reScanTemplateToken(/* isTaggedTemplate */ false); } if (rawTextScanner.isUnterminated()) { rawTextScanner.setText(undefined); @@ -69469,7 +70624,7 @@ var ts; ts.createJSDocTypeExpression = createJSDocTypeExpression; /* @internal */ function createJSDocTypeTag(typeExpression, comment) { - var tag = createJSDocTag(319 /* JSDocTypeTag */, "type"); + var tag = createJSDocTag(320 /* JSDocTypeTag */, "type"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; @@ -69477,7 +70632,7 @@ var ts; ts.createJSDocTypeTag = createJSDocTypeTag; /* @internal */ function createJSDocReturnTag(typeExpression, comment) { - var tag = createJSDocTag(317 /* JSDocReturnTag */, "returns"); + var tag = createJSDocTag(318 /* JSDocReturnTag */, "returns"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; @@ -69485,14 +70640,14 @@ var ts; ts.createJSDocReturnTag = createJSDocReturnTag; /** @internal */ function createJSDocThisTag(typeExpression) { - var tag = createJSDocTag(318 /* JSDocThisTag */, "this"); + var tag = createJSDocTag(319 /* JSDocThisTag */, "this"); tag.typeExpression = typeExpression; return tag; } ts.createJSDocThisTag = createJSDocThisTag; /* @internal */ function createJSDocParamTag(name, isBracketed, typeExpression, comment) { - var tag = createJSDocTag(316 /* JSDocParameterTag */, "param"); + var tag = createJSDocTag(317 /* JSDocParameterTag */, "param"); tag.typeExpression = typeExpression; tag.name = name; tag.isBracketed = isBracketed; @@ -69867,7 +71022,7 @@ var ts; * @param original The original statement. */ function createNotEmittedStatement(original) { - var node = createSynthesizedNode(324 /* NotEmittedStatement */); + var node = createSynthesizedNode(325 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; @@ -69879,7 +71034,7 @@ var ts; */ /* @internal */ function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(328 /* EndOfDeclarationMarker */); + var node = createSynthesizedNode(329 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -69891,7 +71046,7 @@ var ts; */ /* @internal */ function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(327 /* MergeDeclarationMarker */); + var node = createSynthesizedNode(328 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -69906,7 +71061,7 @@ var ts; * @param location The location for the expression. Defaults to the positions from "original" if provided. */ function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(325 /* PartiallyEmittedExpression */); + var node = createSynthesizedNode(326 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; setTextRange(node, original); @@ -69922,7 +71077,7 @@ var ts; ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function flattenCommaElements(node) { if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) { - if (node.kind === 326 /* CommaListExpression */) { + if (node.kind === 327 /* CommaListExpression */) { return node.elements; } if (ts.isBinaryExpression(node) && node.operatorToken.kind === 27 /* CommaToken */) { @@ -69932,7 +71087,7 @@ var ts; return node; } function createCommaList(elements) { - var node = createSynthesizedNode(326 /* CommaListExpression */); + var node = createSynthesizedNode(327 /* CommaListExpression */); node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements)); return node; } @@ -69945,7 +71100,7 @@ var ts; ts.updateCommaList = updateCommaList; /* @internal */ function createSyntheticReferenceExpression(expression, thisArg) { - var node = createSynthesizedNode(329 /* SyntheticReferenceExpression */); + var node = createSynthesizedNode(330 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; return node; @@ -69991,6 +71146,8 @@ var ts; ts.importDefaultHelper, ts.classPrivateFieldGetHelper, ts.classPrivateFieldSetHelper, + ts.createBindingHelper, + ts.setModuleDefaultHelper ], function (helper) { return helper.name; })); } function createUnparsedSource() { @@ -70019,7 +71176,7 @@ var ts; stripInternal = mapTextOrStripInternal; bundleFileInfo = mapPathOrType === "js" ? textOrInputFiles.buildInfo.bundle.js : textOrInputFiles.buildInfo.bundle.dts; if (node.oldFileOfCurrentEmit) { - parseOldFileOfCurrentEmit(node, ts.Debug.assertDefined(bundleFileInfo)); + parseOldFileOfCurrentEmit(node, ts.Debug.checkDefined(bundleFileInfo)); return node; } } @@ -70184,13 +71341,13 @@ var ts; }; node.javascriptPath = declarationTextOrJavascriptPath; node.javascriptMapPath = javascriptMapPath; - node.declarationPath = ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath); + node.declarationPath = ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath); node.declarationMapPath = declarationMapPath; node.buildInfoPath = declarationMapTextOrBuildInfoPath; Object.defineProperties(node, { javascriptText: { get: function () { return definedTextGetter_1(declarationTextOrJavascriptPath); } }, javascriptMapText: { get: function () { return textGetter_1(javascriptMapPath); } }, - declarationText: { get: function () { return definedTextGetter_1(ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath)); } }, + declarationText: { get: function () { return definedTextGetter_1(ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath)); } }, declarationMapText: { get: function () { return textGetter_1(declarationMapPath); } }, buildInfo: { get: function () { return getAndCacheBuildInfo_1(function () { return textGetter_1(declarationMapTextOrBuildInfoPath); }); } } }); @@ -70773,8 +71930,8 @@ var ts; argumentsList.push(ts.createNull()); } if (children.length > 1) { - for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { - var child = children_1[_i]; + for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { + var child = children_2[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -70793,8 +71950,8 @@ var ts; argumentsList.push(ts.createNull()); if (children && children.length > 0) { if (children.length > 1) { - for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { - var child = children_2[_i]; + for (var _i = 0, children_3 = children; _i < children_3.length; _i++) { + var child = children_3[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -70845,10 +72002,10 @@ var ts; name: "typescript:spread", importName: "__spread", scoped: false, + dependencies: [ts.readHelper], text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };" }; function createSpreadHelper(context, argumentList, location) { - context.requestEmitHelper(ts.readHelper); context.requestEmitHelper(ts.spreadHelper); return ts.setTextRange(ts.createCall(getUnscopedHelperName("__spread"), /*typeArguments*/ undefined, argumentList), location); @@ -71708,7 +72865,7 @@ var ts; case 195 /* ElementAccessExpression */: case 194 /* PropertyAccessExpression */: case 218 /* NonNullExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: node = node.expression; continue; } @@ -71725,7 +72882,7 @@ var ts; ts.parenthesizeConciseBody = parenthesizeConciseBody; function isCommaSequence(node) { return node.kind === 209 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || - node.kind === 326 /* CommaListExpression */; + node.kind === 327 /* CommaListExpression */; } ts.isCommaSequence = isCommaSequence; var OuterExpressionKinds; @@ -71744,7 +72901,7 @@ var ts; case 217 /* AsExpression */: case 218 /* NonNullExpression */: return (kinds & 2 /* Assertions */) !== 0; - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return (kinds & 4 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -71781,7 +72938,7 @@ var ts; case 199 /* TypeAssertionExpression */: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression); case 217 /* AsExpression */: return ts.updateAsExpression(outerExpression, expression, outerExpression.type); case 218 /* NonNullExpression */: return ts.updateNonNullExpression(outerExpression, expression); - case 325 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); + case 326 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); } } /** @@ -72654,9 +73811,9 @@ var ts; case 290 /* SourceFile */: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression)); default: // No need to visit nodes with no children. @@ -72713,7 +73870,7 @@ var ts; case 224 /* EmptyStatement */: case 215 /* OmittedExpression */: case 241 /* DebuggerStatement */: - case 324 /* NotEmittedStatement */: + case 325 /* NotEmittedStatement */: // No need to visit nodes with no children. break; // Names @@ -73097,10 +74254,10 @@ var ts; result = reduceNodes(node.statements, cbNodes, result); break; // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: result = reduceNode(node.expression, cbNode, result); break; - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: result = reduceNodes(node.elements, cbNodes, result); break; default: @@ -74101,10 +75258,12 @@ var ts; // list contains nothing but prologue directives (or empty) - exit return index; } - var statement = statements[index]; - if (statement.kind === 226 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { - result.push(ts.visitNode(statement, visitor, ts.isStatement)); - return index + 1; + var superIndex = ts.findIndex(statements, function (s) { return ts.isExpressionStatement(s) && ts.isSuperCall(s.expression); }, index); + if (superIndex > -1) { + for (var i = index; i <= superIndex; i++) { + result.push(ts.visitNode(statements[i], visitor, ts.isStatement)); + } + return superIndex + 1; } return index; } @@ -74437,7 +75596,7 @@ var ts; && !(element.transformFlags & (8192 /* ContainsRestOrSpread */ | 16384 /* ContainsObjectRestOrSpread */)) && !(ts.getTargetOfBindingOrAssignmentElement(element).transformFlags & (8192 /* ContainsRestOrSpread */ | 16384 /* ContainsObjectRestOrSpread */)) && !ts.isComputedPropertyName(propertyName)) { - bindingElements = ts.append(bindingElements, element); + bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor)); } else { if (bindingElements) { @@ -74655,6 +75814,96 @@ var ts; })(ts || (ts = {})); /*@internal*/ var ts; +(function (ts) { + var ProcessLevel; + (function (ProcessLevel) { + ProcessLevel[ProcessLevel["LiftRestriction"] = 0] = "LiftRestriction"; + ProcessLevel[ProcessLevel["All"] = 1] = "All"; + })(ProcessLevel = ts.ProcessLevel || (ts.ProcessLevel = {})); + function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) { + // Visit the tag expression + var tag = ts.visitNode(node.tag, visitor, ts.isExpression); + // Build up the template arguments and the raw and cooked strings for the template. + // We start out with 'undefined' for the first argument and revisit later + // to avoid walking over the template string twice and shifting all our arguments over after the fact. + var templateArguments = [undefined]; + var cookedStrings = []; + var rawStrings = []; + var template = node.template; + if (level === ProcessLevel.LiftRestriction && !ts.hasInvalidEscape(template)) + return node; + if (ts.isNoSubstitutionTemplateLiteral(template)) { + cookedStrings.push(createTemplateCooked(template)); + rawStrings.push(getRawLiteral(template, currentSourceFile)); + } + else { + cookedStrings.push(createTemplateCooked(template.head)); + rawStrings.push(getRawLiteral(template.head, currentSourceFile)); + for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { + var templateSpan = _a[_i]; + cookedStrings.push(createTemplateCooked(templateSpan.literal)); + rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile)); + templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); + } + } + var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); + // Create a variable to cache the template object if we're in a module. + // Do not do this in the global scope, as any variable we currently generate could conflict with + // variables from outside of the current compilation. In the future, we can revisit this behavior. + if (ts.isExternalModule(currentSourceFile)) { + var tempVar = ts.createUniqueName("templateObject"); + recordTaggedTemplateString(tempVar); + templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); + } + else { + templateArguments[0] = helperCall; + } + return ts.createCall(tag, /*typeArguments*/ undefined, templateArguments); + } + ts.processTaggedTemplateExpression = processTaggedTemplateExpression; + function createTemplateCooked(template) { + return template.templateFlags ? ts.createIdentifier("undefined") : ts.createLiteral(template.text); + } + /** + * Creates an ES5 compatible literal from an ES6 template literal. + * + * @param node The ES6 template literal. + */ + function getRawLiteral(node, currentSourceFile) { + // Find original source text, since we need to emit the raw strings of the tagged template. + // The raw strings contain the (escaped) strings of what the user wrote. + // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". + var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), + // thus we need to remove those characters. + // First template piece starts with "`", others with "}" + // Last template piece ends with "`", others with "${" + var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + // Newline normalization: + // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's + // and LineTerminatorSequences are normalized to for both TV and TRV. + text = text.replace(/\r\n?/g, "\n"); + return ts.setTextRange(ts.createLiteral(text), node); + } + function createTemplateObjectHelper(context, cooked, raw) { + context.requestEmitHelper(ts.templateObjectHelper); + return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), + /*typeArguments*/ undefined, [ + cooked, + raw + ]); + } + ts.templateObjectHelper = { + name: "typescript:makeTemplateObject", + importName: "__makeTemplateObject", + scoped: false, + priority: 0, + text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" + }; +})(ts || (ts = {})); +/*@internal*/ +var ts; (function (ts) { /** * Indicates whether to emit type metadata in the new format. @@ -74679,10 +75928,9 @@ var ts; ClassFacts[ClassFacts["IsNamedExternalExport"] = 16] = "IsNamedExternalExport"; ClassFacts[ClassFacts["IsDefaultExternalExport"] = 32] = "IsDefaultExternalExport"; ClassFacts[ClassFacts["IsDerivedClass"] = 64] = "IsDerivedClass"; - ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 128] = "UseImmediatelyInvokedFunctionExpression"; ClassFacts[ClassFacts["HasAnyDecorators"] = 6] = "HasAnyDecorators"; ClassFacts[ClassFacts["NeedsName"] = 5] = "NeedsName"; - ClassFacts[ClassFacts["MayNeedImmediatelyInvokedFunctionExpression"] = 7] = "MayNeedImmediatelyInvokedFunctionExpression"; + ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 7] = "UseImmediatelyInvokedFunctionExpression"; ClassFacts[ClassFacts["IsExported"] = 56] = "IsExported"; })(ClassFacts || (ClassFacts = {})); function transformTypeScript(context) { @@ -75165,8 +76413,6 @@ var ts; facts |= 32 /* IsDefaultExternalExport */; else if (isNamedExternalModuleExport(node)) facts |= 16 /* IsNamedExternalExport */; - if (languageVersion <= 1 /* ES5 */ && (facts & 7 /* MayNeedImmediatelyInvokedFunctionExpression */)) - facts |= 128 /* UseImmediatelyInvokedFunctionExpression */; return facts; } function hasTypeScriptClassSyntax(node) { @@ -75184,7 +76430,7 @@ var ts; } var staticProperties = ts.getProperties(node, /*requireInitializer*/ true, /*isStatic*/ true); var facts = getClassFacts(node, staticProperties); - if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) { + if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */) { context.startLexicalEnvironment(); } var name = node.name || (facts & 5 /* NeedsName */ ? ts.getGeneratedNameForNode(node) : undefined); @@ -75196,7 +76442,7 @@ var ts; addClassElementDecorationStatements(statements, node, /*isStatic*/ false); addClassElementDecorationStatements(statements, node, /*isStatic*/ true); addConstructorDecorationStatement(statements, node); - if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) { + if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */) { // When we emit a TypeScript class down to ES5, we must wrap it in an IIFE so that the // 'es2015' transformer can properly nest static initializers and decorators. The result // looks something like: @@ -75222,11 +76468,16 @@ var ts; ts.insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment()); var iife = ts.createImmediatelyInvokedArrowFunction(statements); ts.setEmitFlags(iife, 33554432 /* TypeScriptClassWrapper */); + // Class comment is already added by the ES2015 transform when targeting ES5 or below. + // Only add if targetting ES2015+ to prevent duplicates + if (languageVersion > 1 /* ES5 */) { + ts.addSyntheticLeadingComment(iife, 3 /* MultiLineCommentTrivia */, "* @class "); + } var varStatement = ts.createVariableStatement( /*modifiers*/ undefined, ts.createVariableDeclarationList([ ts.createVariableDeclaration(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false), /*type*/ undefined, iife) - ])); + ], languageVersion > 1 /* ES5 */ ? 2 /* Const */ : undefined)); ts.setOriginalNode(varStatement, node); ts.setCommentRange(varStatement, node); ts.setSourceMapRange(varStatement, ts.moveRangePastDecorators(node)); @@ -75239,7 +76490,7 @@ var ts; if (facts & 8 /* IsExportOfNamespace */) { addExportMemberAssignment(statements, node); } - else if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) { + else if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) { if (facts & 32 /* IsDefaultExternalExport */) { statements.push(ts.createExportDefault(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))); } @@ -75266,7 +76517,7 @@ var ts; // ${members} // } // we do not emit modifiers on the declaration if we are emitting an IIFE - var modifiers = !(facts & 128 /* UseImmediatelyInvokedFunctionExpression */) + var modifiers = !(facts & 7 /* UseImmediatelyInvokedFunctionExpression */) ? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier) : undefined; var classDeclaration = ts.createClassDeclaration( @@ -76974,7 +78225,7 @@ var ts; return undefined; } // Elide the export declaration if all of its named exports are elided. - var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedImportBindings); + var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedExportBindings); return exportClause ? ts.updateExportDeclaration(node, /*decorators*/ undefined, @@ -77743,7 +78994,7 @@ var ts; /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass)); if (ts.some(staticProperties) || ts.some(pendingExpressions)) { if (isDecoratedClassDeclaration) { - ts.Debug.assertDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); + ts.Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); // Write any pending expressions from elided or moved computed property names if (pendingStatements && pendingExpressions && ts.some(pendingExpressions)) { pendingStatements.push(ts.createExpressionStatement(ts.inlineExpressions(pendingExpressions))); @@ -78831,6 +80082,8 @@ var ts; var enclosingFunctionFlags; var enclosingSuperContainerFlags = 0; var hasLexicalThis; + var currentSourceFile; + var taggedTemplateStringDeclarations; /** Keeps track of property names accessed on super (`super.x`) within async functions. */ var capturedSuperProperties; /** Whether the async function contains an element access on super (`super[x]`). */ @@ -78838,14 +80091,18 @@ var ts; /** A set of node IDs for generated super accessors. */ var substitutedSuperAccessors = []; return ts.chainBundle(transformSourceFile); + function recordTaggedTemplateString(temp) { + taggedTemplateStringDeclarations = ts.append(taggedTemplateStringDeclarations, ts.createVariableDeclaration(temp)); + } function transformSourceFile(node) { if (node.isDeclarationFile) { return node; } - exportedVariableStatement = false; - hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); - var visited = ts.visitEachChild(node, visitor, context); + currentSourceFile = node; + var visited = visitSourceFile(node); ts.addEmitHelpers(visited, context.readEmitHelpers()); + currentSourceFile = undefined; + taggedTemplateStringDeclarations = undefined; return visited; } function visitor(node) { @@ -78921,6 +80178,8 @@ var ts; return visitExpressionStatement(node); case 200 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, noDestructuringValue); + case 198 /* TaggedTemplateExpression */: + return visitTaggedTemplateExpression(node); case 194 /* PropertyAccessExpression */: if (capturedSuperProperties && ts.isPropertyAccessExpression(node) && node.expression.kind === 102 /* SuperKeyword */) { capturedSuperProperties.set(node.name.escapedText, true); @@ -79043,6 +80302,18 @@ var ts; function visitParenthesizedExpression(node, noDestructuringValue) { return ts.visitEachChild(node, noDestructuringValue ? visitorNoDestructuringValue : visitor, context); } + function visitSourceFile(node) { + exportedVariableStatement = false; + hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); + var visited = ts.visitEachChild(node, visitor, context); + var statement = ts.concatenate(visited.statements, taggedTemplateStringDeclarations && [ + ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList(taggedTemplateStringDeclarations)) + ]); + return ts.updateSourceFileNode(visited, ts.setTextRange(ts.createNodeArray(statement), node.statements)); + } + function visitTaggedTemplateExpression(node) { + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.LiftRestriction); + } /** * Visits a BinaryExpression that contains a destructuring assignment. * @@ -79529,10 +80800,10 @@ var ts; name: "typescript:asyncGenerator", importName: "__asyncGenerator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n 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); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };" }; function createAsyncGeneratorHelper(context, generatorFunc, hasLexicalThis) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncGeneratorHelper); // Mark this node as originally an async function (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* AsyncFunctionBody */; @@ -79547,10 +80818,10 @@ var ts; name: "typescript:asyncDelegator", importName: "__asyncDelegator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n };" }; function createAsyncDelegatorHelper(context, expression, location) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncDelegator); return ts.setTextRange(ts.createCall(ts.getUnscopedHelperName("__asyncDelegator"), /*typeArguments*/ undefined, [expression]), location); @@ -81797,10 +83068,15 @@ var ts; } return ts.visitEachChild(node, visitor, context); } + function isVariableStatementOfTypeScriptClassWrapper(node) { + return node.declarationList.declarations.length === 1 + && !!node.declarationList.declarations[0].initializer + && !!(ts.getEmitFlags(node.declarationList.declarations[0].initializer) & 33554432 /* TypeScriptClassWrapper */); + } function visitVariableStatement(node) { var ancestorFacts = enterSubtree(0 /* None */, ts.hasModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); var updated; - if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0) { + if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { // we are inside a converted loop - hoist variable declarations var assignments = void 0; for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { @@ -82952,7 +84228,11 @@ var ts; // The class statements are the statements generated by visiting the first statement with initializer of the // body (1), while all other statements are added to remainingStatements (2) var isVariableStatementWithInitializer = function (stmt) { return ts.isVariableStatement(stmt) && !!ts.first(stmt.declarationList.declarations).initializer; }; + // visit the class body statements outside of any converted loop body. + var savedConvertedLoopState = convertedLoopState; + convertedLoopState = undefined; var bodyStatements = ts.visitNodes(body.statements, visitor, ts.isStatement); + convertedLoopState = savedConvertedLoopState; var classStatements = ts.filter(bodyStatements, isVariableStatementWithInitializer); var remainingStatements = ts.filter(bodyStatements, function (stmt) { return !isVariableStatementWithInitializer(stmt); }); var varStatement = ts.cast(ts.first(classStatements), ts.isVariableStatement); @@ -83209,67 +84489,7 @@ var ts; * @param node A TaggedTemplateExpression node. */ function visitTaggedTemplateExpression(node) { - // Visit the tag expression - var tag = ts.visitNode(node.tag, visitor, ts.isExpression); - // Build up the template arguments and the raw and cooked strings for the template. - // We start out with 'undefined' for the first argument and revisit later - // to avoid walking over the template string twice and shifting all our arguments over after the fact. - var templateArguments = [undefined]; - var cookedStrings = []; - var rawStrings = []; - var template = node.template; - if (ts.isNoSubstitutionTemplateLiteral(template)) { - cookedStrings.push(ts.createLiteral(template.text)); - rawStrings.push(getRawLiteral(template)); - } - else { - cookedStrings.push(ts.createLiteral(template.head.text)); - rawStrings.push(getRawLiteral(template.head)); - for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { - var templateSpan = _a[_i]; - cookedStrings.push(ts.createLiteral(templateSpan.literal.text)); - rawStrings.push(getRawLiteral(templateSpan.literal)); - templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); - } - } - var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); - // Create a variable to cache the template object if we're in a module. - // Do not do this in the global scope, as any variable we currently generate could conflict with - // variables from outside of the current compilation. In the future, we can revisit this behavior. - if (ts.isExternalModule(currentSourceFile)) { - var tempVar = ts.createUniqueName("templateObject"); - recordTaggedTemplateString(tempVar); - templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); - } - else { - templateArguments[0] = helperCall; - } - return ts.createCall(tag, /*typeArguments*/ undefined, templateArguments); - } - /** - * Creates an ES5 compatible literal from an ES6 template literal. - * - * @param node The ES6 template literal. - */ - function getRawLiteral(node) { - // Find original source text, since we need to emit the raw strings of the tagged template. - // The raw strings contain the (escaped) strings of what the user wrote. - // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". - var text = node.rawText; - if (text === undefined) { - text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), - // thus we need to remove those characters. - // First template piece starts with "`", others with "}" - // Last template piece ends with "`", others with "${" - var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; - text = text.substring(1, text.length - (isLast ? 1 : 2)); - } - // Newline normalization: - // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's - // and LineTerminatorSequences are normalized to for both TV and TRV. - text = text.replace(/\r\n?/g, "\n"); - return ts.setTextRange(ts.createLiteral(text), node); + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.All); } /** * Visits a TemplateExpression node. @@ -83562,14 +84782,6 @@ var ts; ts.createFileLevelUniqueName("_super") ]); } - function createTemplateObjectHelper(context, cooked, raw) { - context.requestEmitHelper(ts.templateObjectHelper); - return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), - /*typeArguments*/ undefined, [ - cooked, - raw - ]); - } ts.extendsHelper = { name: "typescript:extends", importName: "__extends", @@ -83577,13 +84789,6 @@ var ts; priority: 0, text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();" }; - ts.templateObjectHelper = { - name: "typescript:makeTemplateObject", - importName: "__makeTemplateObject", - scoped: false, - priority: 0, - text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" - }; })(ts || (ts = {})); /*@internal*/ var ts; @@ -86397,7 +87602,7 @@ var ts; startLexicalEnvironment(); var statements = []; var ensureUseStrict = ts.getStrictOptionValue(compilerOptions, "alwaysStrict") || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile)); - var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor); + var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict && !ts.isJsonSourceFile(node), sourceElementVisitor); if (shouldEmitUnderscoreUnderscoreESModule()) { ts.append(statements, createUnderscoreUnderscoreESModule()); } @@ -86406,11 +87611,6 @@ var ts; addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false); ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements)); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - ts.addEmitHelper(updated, exportStarHelper); - } ts.addEmitHelpers(updated, context.readEmitHelpers()); return updated; } @@ -86632,11 +87832,6 @@ var ts; // and merge any new lexical declarations. ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var body = ts.createBlock(statements, /*multiLine*/ true); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - ts.addEmitHelper(body, exportStarHelper); - } if (needUMDDynamicImportHelper) { ts.addEmitHelper(body, dynamicImportUMDHelper); } @@ -86693,9 +87888,9 @@ var ts; return visitFunctionDeclaration(node); case 245 /* ClassDeclaration */: return visitClassDeclaration(node); - case 327 /* MergeDeclarationMarker */: + case 328 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 328 /* EndOfDeclarationMarker */: + case 329 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return ts.visitEachChild(node, moduleExpressionElementVisitor, context); @@ -87053,8 +88248,13 @@ var ts; } for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) { var specifier = _a[_i]; - var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); - statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue)), specifier), specifier)); + if (languageVersion === 0 /* ES3 */) { + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createCreateBindingHelper(context, generatedName, ts.createLiteral(specifier.propertyName || specifier.name), specifier.propertyName ? ts.createLiteral(specifier.name) : undefined)), specifier), specifier)); + } + else { + var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue, /* location */ undefined, /* liveBinding */ true)), specifier), specifier)); + } } return ts.singleOrMany(statements); } @@ -87157,7 +88357,6 @@ var ts; if (ts.hasModifier(node, 1 /* Export */)) { var modifiers = void 0; // If we're exporting these variables, then these just become assignments to 'exports.x'. - // We only want to emit assignments for variables with initializers. for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var variable = _a[_i]; if (ts.isIdentifier(variable.name) && ts.isLocalName(variable.name)) { @@ -87166,7 +88365,7 @@ var ts; } variables = ts.append(variables, variable); } - else if (variable.initializer) { + else { expressions = ts.append(expressions, transformInitializedVariable(variable)); } } @@ -87218,7 +88417,7 @@ var ts; } else { return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name), - /*location*/ node.name), ts.visitNode(node.initializer, moduleExpressionElementVisitor)); + /*location*/ node.name), node.initializer ? ts.visitNode(node.initializer, moduleExpressionElementVisitor) : ts.createVoidZero()); } } /** @@ -87296,7 +88495,7 @@ var ts; case 257 /* NamedImports */: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; - statements = appendExportsOfDeclaration(statements, importBinding); + statements = appendExportsOfDeclaration(statements, importBinding, /* liveBinding */ true); } break; } @@ -87393,13 +88592,13 @@ var ts; * appended. * @param decl The declaration to export. */ - function appendExportsOfDeclaration(statements, decl) { + function appendExportsOfDeclaration(statements, decl, liveBinding) { var name = ts.getDeclarationName(decl); var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(ts.idText(name)); if (exportSpecifiers) { for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) { var exportSpecifier = exportSpecifiers_1[_i]; - statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name); + statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name, /* allowComments */ undefined, liveBinding); } } return statements; @@ -87416,8 +88615,8 @@ var ts; * @param location The location to use for source maps and comments for the export. * @param allowComments Whether to allow comments on the export. */ - function appendExportStatement(statements, exportName, expression, location, allowComments) { - statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments)); + function appendExportStatement(statements, exportName, expression, location, allowComments, liveBinding) { + statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); return statements; } function createUnderscoreUnderscoreESModule() { @@ -87446,8 +88645,8 @@ var ts; * @param location The location to use for source maps and comments for the export. * @param allowComments An optional value indicating whether to emit comments for the statement. */ - function createExportStatement(name, value, location, allowComments) { - var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value)), location); + function createExportStatement(name, value, location, allowComments, liveBinding) { + var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value, /* location */ undefined, liveBinding)), location); ts.startOnNewLine(statement); if (!allowComments) { ts.setEmitFlags(statement, 1536 /* NoComments */); @@ -87461,8 +88660,22 @@ var ts; * @param value The exported value. * @param location The location to use for source maps and comments for the export. */ - function createExportExpression(name, value, location) { - return ts.setTextRange(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); + function createExportExpression(name, value, location, liveBinding) { + return ts.setTextRange(liveBinding && languageVersion !== 0 /* ES3 */ ? ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ undefined, [ + ts.createIdentifier("exports"), + ts.createLiteral(name), + ts.createObjectLiteral([ + ts.createPropertyAssignment("enumerable", ts.createLiteral(/*value*/ true)), + ts.createPropertyAssignment("get", ts.createFunctionExpression( + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + /*parameters*/ [], + /*type*/ undefined, ts.createBlock([ts.createReturn(value)]))) + ]) + ]) : ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); } // // Modifier Visitors @@ -87687,17 +88900,36 @@ var ts; } } ts.transformModule = transformModule; + ts.createBindingHelper = { + name: "typescript:commonjscreatebinding", + importName: "__createBinding", + scoped: false, + priority: 1, + text: "\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));" + }; + function createCreateBindingHelper(context, module, inputName, outputName) { + context.requestEmitHelper(ts.createBindingHelper); + return ts.createCall(ts.getUnscopedHelperName("__createBinding"), /*typeArguments*/ undefined, __spreadArrays([ts.createIdentifier("exports"), module, inputName], (outputName ? [outputName] : []))); + } + ts.setModuleDefaultHelper = { + name: "typescript:commonjscreatevalue", + importName: "__setModuleDefault", + scoped: false, + priority: 1, + text: "\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});" + }; // emit output for the __export helper function var exportStarHelper = { name: "typescript:export-star", - scoped: true, - text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }" + importName: "__exportStar", + scoped: false, + dependencies: [ts.createBindingHelper], + priority: 2, + text: "\n var __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p);\n }" }; function createExportStarHelper(context, module) { - var compilerOptions = context.getCompilerOptions(); - return compilerOptions.importHelpers - ? ts.createCall(ts.getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]) - : ts.createCall(ts.createIdentifier("__export"), /*typeArguments*/ undefined, [module]); + context.requestEmitHelper(exportStarHelper); + return ts.createCall(ts.getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]); } // emit helper for dynamic import var dynamicImportUMDHelper = { @@ -87710,7 +88942,9 @@ var ts; name: "typescript:commonjsimportstar", importName: "__importStar", scoped: false, - text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};" + dependencies: [ts.createBindingHelper, ts.setModuleDefaultHelper], + priority: 2, + text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};" }; // emit helper for `import Name from "foo"` ts.importDefaultHelper = { @@ -88174,7 +89408,7 @@ var ts; return ts.singleOrMany(statements); } function visitExportDeclaration(node) { - ts.Debug.assertDefined(node); + ts.Debug.assertIsDefined(node); return undefined; } /** @@ -88670,9 +89904,9 @@ var ts; return visitCatchClause(node); case 223 /* Block */: return visitBlock(node); - case 327 /* MergeDeclarationMarker */: + case 328 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 328 /* EndOfDeclarationMarker */: + case 329 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return destructuringAndImportCallVisitor(node); @@ -89283,7 +90517,9 @@ var ts; */ function onEmitNode(hint, node, emitCallback) { if (ts.isSourceFile(node)) { - helperNameSubstitutions = ts.createMap(); + if ((ts.isExternalModule(node) || compilerOptions.isolatedModules) && compilerOptions.importHelpers) { + helperNameSubstitutions = ts.createMap(); + } previousOnEmitNode(hint, node, emitCallback); helperNameSubstitutions = undefined; } @@ -90081,7 +91317,7 @@ var ts; ts.forEach(sourceFile.libReferenceDirectives, function (ref) { var lib = host.getLibFileFromReference(ref); if (lib) { - ret.set(ref.fileName.toLocaleLowerCase(), true); + ret.set(ts.toFileNameLowerCase(ref.fileName), true); } }); return ret; @@ -91164,7 +92400,7 @@ var ts; * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files. */ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(330 /* Count */); + var enabledSyntaxKindFeatures = new Array(331 /* Count */); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -91237,6 +92473,7 @@ var ts; transformed: transformed, substituteNode: substituteNode, emitNodeWithNotification: emitNodeWithNotification, + isEmitNotificationEnabled: isEmitNotificationEnabled, dispose: dispose, diagnostics: diagnostics }; @@ -91293,6 +92530,8 @@ var ts; function emitNodeWithNotification(hint, node, emitCallback) { ts.Debug.assert(state < 3 /* Disposed */, "Cannot invoke TransformationResult callbacks after the result is disposed."); if (node) { + // TODO: Remove check and unconditionally use onEmitNode when API is breakingly changed + // (see https://github.com/microsoft/TypeScript/pull/36248/files/5062623f39120171b98870c71344b3242eb03d23#r369766739) if (isEmitNotificationEnabled(node)) { onEmitNode(hint, node, emitCallback); } @@ -91399,6 +92638,12 @@ var ts; ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the transformation context during initialization."); ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed."); ts.Debug.assert(!helper.scoped, "Cannot request a scoped emit helper."); + if (helper.dependencies) { + for (var _i = 0, _a = helper.dependencies; _i < _a.length; _i++) { + var h = _a[_i]; + requestEmitHelper(h); + } + } emitHelpers = ts.append(emitHelpers, helper); } function readEmitHelpers() { @@ -91562,7 +92807,7 @@ var ts; } ts.getOutputExtension = getOutputExtension; function rootDirOfOptions(configFile) { - return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.assertDefined(configFile.options.configFilePath)); + return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.checkDefined(configFile.options.configFilePath)); } function getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, outputDir) { return outputDir ? @@ -91584,7 +92829,7 @@ var ts; ts.fileExtensionIs(inputFileName, ".tsx" /* Tsx */) && configFile.options.jsx === 1 /* Preserve */ ? ".jsx" /* Jsx */ : ".js" /* Js */); - return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.assertDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? + return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.checkDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? outputFileName : undefined; } @@ -91659,7 +92904,7 @@ var ts; function getFirstProjectOutput(configFile, ignoreCase) { if (configFile.options.outFile || configFile.options.out) { var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath; - return ts.Debug.assertDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); + return ts.Debug.checkDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); } for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) { var inputFileName = _b[_a]; @@ -91783,6 +93028,7 @@ var ts; hasGlobalName: resolver.hasGlobalName, // transform hooks onEmitNode: transform.emitNodeWithNotification, + isEmitNotificationEnabled: transform.isEmitNotificationEnabled, substituteNode: transform.substituteNode, }); ts.Debug.assert(transform.transformed.length === 1, "Should only see one output from the transform"); @@ -91835,6 +93081,7 @@ var ts; hasGlobalName: resolver.hasGlobalName, // transform hooks onEmitNode: declarationTransform.emitNodeWithNotification, + isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled, substituteNode: declarationTransform.substituteNode, }); var declBlocked = (!!declarationTransform.diagnostics && !!declarationTransform.diagnostics.length) || !!host.isEmitBlocked(declarationFilePath) || !!compilerOptions.noEmit; @@ -91945,7 +93192,7 @@ var ts; var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText); return "data:application/json;base64," + base64SourceMapText; } - var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.assertDefined(sourceMapFilePath))); + var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath))); if (mapOptions.mapRoot) { var sourceMapDir = ts.normalizeSlashes(mapOptions.mapRoot); if (sourceFile) { @@ -92029,7 +93276,7 @@ var ts; sourceFile.statements = ts.createNodeArray(); return sourceFile; }); - var jsBundle = ts.Debug.assertDefined(bundle.js); + var jsBundle = ts.Debug.checkDefined(bundle.js); ts.forEach(jsBundle.sources && jsBundle.sources.prologues, function (prologueInfo) { var sourceFile = sourceFiles[prologueInfo.file]; sourceFile.text = prologueInfo.text; @@ -92046,10 +93293,10 @@ var ts; /*@internal*/ function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) { var _a = getOutputPathsForBundle(config.options, /*forceDtsPaths*/ false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath; - var buildInfoText = host.readFile(ts.Debug.assertDefined(buildInfoPath)); + var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath)); if (!buildInfoText) return buildInfoPath; - var jsFileText = host.readFile(ts.Debug.assertDefined(jsFilePath)); + var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath)); if (!jsFileText) return jsFilePath; var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath); @@ -92147,7 +93394,7 @@ var ts; function createPrinter(printerOptions, handlers) { if (printerOptions === void 0) { printerOptions = {}; } if (handlers === void 0) { handlers = {}; } - var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; + var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, isEmitNotificationEnabled = handlers.isEmitNotificationEnabled, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; var extendedDiagnostics = !!printerOptions.extendedDiagnostics; var newLine = ts.getNewLineCharacter(printerOptions); var moduleKind = ts.getEmitModuleKind(printerOptions); @@ -92165,7 +93412,7 @@ var ts; var write = writeBase; var isOwnFileEmit; var bundleFileInfo = printerOptions.writeBundleFileInfo ? { sections: [] } : undefined; - var relativeToBuildInfo = bundleFileInfo ? ts.Debug.assertDefined(printerOptions.relativeToBuildInfo) : undefined; + var relativeToBuildInfo = bundleFileInfo ? ts.Debug.checkDefined(printerOptions.relativeToBuildInfo) : undefined; var recordInternalSection = printerOptions.recordInternalSection; var sourceFileTextPos = 0; var sourceFileTextKind = "text" /* Text */; @@ -92436,12 +93683,15 @@ var ts; return; return pipelineEmit(1 /* Expression */, node); } + function emitJsxAttributeValue(node) { + return pipelineEmit(ts.isStringLiteral(node) ? 6 /* JsxAttributeValue */ : 4 /* Unspecified */, node); + } function pipelineEmit(emitHint, node) { var savedLastNode = lastNode; var savedLastSubstitution = lastSubstitution; lastNode = node; lastSubstitution = undefined; - var pipelinePhase = getPipelinePhase(0 /* Notification */, node); + var pipelinePhase = getPipelinePhase(0 /* Notification */, emitHint, node); pipelinePhase(emitHint, node); ts.Debug.assert(lastNode === node); var substitute = lastSubstitution; @@ -92449,15 +93699,15 @@ var ts; lastSubstitution = savedLastSubstitution; return substitute || node; } - function getPipelinePhase(phase, node) { + function getPipelinePhase(phase, emitHint, node) { switch (phase) { case 0 /* Notification */: - if (onEmitNode !== ts.noEmitNotification) { + if (onEmitNode !== ts.noEmitNotification && (!isEmitNotificationEnabled || isEmitNotificationEnabled(node))) { return pipelineEmitWithNotification; } // falls through case 1 /* Substitution */: - if (substituteNode !== ts.noEmitSubstitution) { + if (substituteNode !== ts.noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node)) !== node) { return pipelineEmitWithSubstitution; } // falls through @@ -92477,12 +93727,12 @@ var ts; return ts.Debug.assertNever(phase); } } - function getNextPipelinePhase(currentPhase, node) { - return getPipelinePhase(currentPhase + 1, node); + function getNextPipelinePhase(currentPhase, emitHint, node) { + return getPipelinePhase(currentPhase + 1, emitHint, node); } function pipelineEmitWithNotification(hint, node) { ts.Debug.assert(lastNode === node); - var pipelinePhase = getNextPipelinePhase(0 /* Notification */, node); + var pipelinePhase = getNextPipelinePhase(0 /* Notification */, hint, node); onEmitNode(hint, node, pipelinePhase); ts.Debug.assert(lastNode === node); } @@ -92492,6 +93742,8 @@ var ts; return emitSourceFile(ts.cast(node, ts.isSourceFile)); if (hint === 2 /* IdentifierName */) return emitIdentifier(ts.cast(node, ts.isIdentifier)); + if (hint === 6 /* JsxAttributeValue */) + return emitLiteral(ts.cast(node, ts.isStringLiteral), /*jsxAttributeEscape*/ true); if (hint === 3 /* MappedTypeParameter */) return emitMappedTypeParameter(ts.cast(node, ts.isTypeParameterDeclaration)); if (hint === 5 /* EmbeddedStatement */) { @@ -92506,7 +93758,7 @@ var ts; case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: case 17 /* TemplateTail */: - return emitLiteral(node); + return emitLiteral(node, /*jsxAttributeEscape*/ false); case 292 /* UnparsedSource */: case 286 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); @@ -92754,27 +94006,28 @@ var ts; case 284 /* EnumMember */: return emitEnumMember(node); // JSDoc nodes (only used in codefixes currently) - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 318 /* JSDocThisTag */: - case 315 /* JSDocEnumTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 319 /* JSDocThisTag */: + case 316 /* JSDocEnumTag */: return emitJSDocSimpleTypedTag(node); + case 308 /* JSDocImplementsTag */: case 307 /* JSDocAugmentsTag */: - return emitJSDocAugmentsTag(node); - case 320 /* JSDocTemplateTag */: + return emitJSDocHeritageTag(node); + case 321 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 314 /* JSDocCallbackTag */: + case 315 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); case 305 /* JSDocSignature */: return emitJSDocSignature(node); case 304 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 309 /* JSDocClassTag */: + case 310 /* JSDocClassTag */: case 306 /* JSDocTag */: return emitJSDocSimpleTag(node); case 303 /* JSDocComment */: @@ -92800,7 +94053,7 @@ var ts; case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - return emitLiteral(node); + return emitLiteral(node, /*jsxAttributeEscape*/ false); // Identifiers case 75 /* Identifier */: return emitIdentifier(node); @@ -92876,9 +94129,9 @@ var ts; case 270 /* JsxFragment */: return emitJsxFragment(node); // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return emitCommaList(node); } } @@ -92892,8 +94145,7 @@ var ts; } function pipelineEmitWithSubstitution(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(1 /* Substitution */, node); - lastSubstitution = substituteNode(hint, node); + var pipelinePhase = getNextPipelinePhase(1 /* Substitution */, hint, node); pipelinePhase(hint, lastSubstitution); ts.Debug.assert(lastNode === node || lastSubstitution === node); } @@ -92980,7 +94232,7 @@ var ts; // SyntaxKind.NumericLiteral // SyntaxKind.BigIntLiteral function emitNumericOrBigIntLiteral(node) { - emitLiteral(node); + emitLiteral(node, /*jsxAttributeEscape*/ false); } // SyntaxKind.StringLiteral // SyntaxKind.RegularExpressionLiteral @@ -92988,8 +94240,8 @@ var ts; // SyntaxKind.TemplateHead // SyntaxKind.TemplateMiddle // SyntaxKind.TemplateTail - function emitLiteral(node) { - var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape); + function emitLiteral(node, jsxAttributeEscape) { + var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape); if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 10 /* StringLiteral */ || ts.isTemplateLiteralKind(node.kind))) { writeLiteral(text); @@ -93452,7 +94704,7 @@ var ts; expression = ts.skipPartiallyEmittedExpressions(expression); if (ts.isNumericLiteral(expression)) { // check if numeric literal is a decimal literal that was originally written with a dot - var text = getLiteralTextOfNode(expression, /*neverAsciiEscape*/ true); + var text = getLiteralTextOfNode(expression, /*neverAsciiEscape*/ true, /*jsxAttributeEscape*/ false); // If he number will be printed verbatim and it doesn't already contain a dot, add one // if the expression doesn't have any comments that will be emitted. return !expression.numericLiteralFlags && !ts.stringContains(text, ts.tokenToString(24 /* DotToken */)); @@ -93567,18 +94819,77 @@ var ts; emitExpression(node.operand); writeTokenText(node.operator, writeOperator); } + var EmitBinaryExpressionState; + (function (EmitBinaryExpressionState) { + EmitBinaryExpressionState[EmitBinaryExpressionState["EmitLeft"] = 0] = "EmitLeft"; + EmitBinaryExpressionState[EmitBinaryExpressionState["EmitRight"] = 1] = "EmitRight"; + EmitBinaryExpressionState[EmitBinaryExpressionState["FinishEmit"] = 2] = "FinishEmit"; + })(EmitBinaryExpressionState || (EmitBinaryExpressionState = {})); + /** + * emitBinaryExpression includes an embedded work stack to attempt to handle as many nested binary expressions + * as possible without creating any additional stack frames. This can only be done when the emit pipeline does + * not require notification/substitution/comment/sourcemap decorations. + */ function emitBinaryExpression(node) { - var isCommaOperator = node.operatorToken.kind !== 27 /* CommaToken */; - var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); - var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); - emitExpression(node.left); - increaseIndentIf(indentBeforeOperator, isCommaOperator); - emitLeadingCommentsOfPosition(node.operatorToken.pos); - writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 /* InKeyword */ ? writeKeyword : writeOperator); - emitTrailingCommentsOfPosition(node.operatorToken.end, /*prefixSpace*/ true); // Binary operators should have a space before the comment starts - increaseIndentIf(indentAfterOperator, /*writeSpaceIfNotIndenting*/ true); - emitExpression(node.right); - decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + var nodeStack = [node]; + var stateStack = [0 /* EmitLeft */]; + var stackIndex = 0; + while (stackIndex >= 0) { + node = nodeStack[stackIndex]; + switch (stateStack[stackIndex]) { + case 0 /* EmitLeft */: { + maybePipelineEmitExpression(node.left); + break; + } + case 1 /* EmitRight */: { + var isCommaOperator = node.operatorToken.kind !== 27 /* CommaToken */; + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + increaseIndentIf(indentBeforeOperator, isCommaOperator); + emitLeadingCommentsOfPosition(node.operatorToken.pos); + writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 /* InKeyword */ ? writeKeyword : writeOperator); + emitTrailingCommentsOfPosition(node.operatorToken.end, /*prefixSpace*/ true); // Binary operators should have a space before the comment starts + increaseIndentIf(indentAfterOperator, /*writeSpaceIfNotIndenting*/ true); + maybePipelineEmitExpression(node.right); + break; + } + case 2 /* FinishEmit */: { + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + stackIndex--; + break; + } + default: return ts.Debug.fail("Invalid state " + stateStack[stackIndex] + " for emitBinaryExpressionWorker"); + } + } + function maybePipelineEmitExpression(next) { + // Advance the state of this unit of work, + stateStack[stackIndex]++; + // Then actually do the work of emitting the node `next` returned by the prior state + // The following section should be identical to `pipelineEmit` save it assumes EmitHint.Expression and offloads + // binary expression handling, where possible, to the contained work queue + // #region trampolinePipelineEmit + var savedLastNode = lastNode; + var savedLastSubstitution = lastSubstitution; + lastNode = next; + lastSubstitution = undefined; + var pipelinePhase = getPipelinePhase(0 /* Notification */, 1 /* Expression */, next); + if (pipelinePhase === pipelineEmitWithHint && ts.isBinaryExpression(next)) { + // If the target pipeline phase is emit directly, and the next node's also a binary expression, + // skip all the intermediate indirection and push the expression directly onto the work stack + stackIndex++; + stateStack[stackIndex] = 0 /* EmitLeft */; + nodeStack[stackIndex] = next; + } + else { + pipelinePhase(1 /* Expression */, next); + } + ts.Debug.assert(lastNode === next); + lastNode = savedLastNode; + lastSubstitution = savedLastSubstitution; + // #endregion trampolinePipelineEmit + } } function emitConditionalExpression(node) { var indentBeforeQuestion = needsIndentation(node, node.condition, node.questionToken); @@ -93781,11 +95092,11 @@ var ts; var node = ts.getParseTreeNode(contextNode); var isSimilarNode = node && node.kind === contextNode.kind; var startPos = pos; - if (isSimilarNode) { + if (isSimilarNode && currentSourceFile) { pos = ts.skipTrivia(currentSourceFile.text, pos); } if (emitLeadingCommentsOfPosition && isSimilarNode && contextNode.pos !== startPos) { - var needsIndent = indentLeading && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); + var needsIndent = indentLeading && currentSourceFile && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); if (needsIndent) { increaseIndent(); } @@ -94260,7 +95571,7 @@ var ts; } function emitJsxAttribute(node) { emit(node.name); - emitNodeWithPrefix("=", writePunctuation, node.initializer, emit); // TODO: GH#18217 + emitNodeWithPrefix("=", writePunctuation, node.initializer, emitJsxAttributeValue); } function emitJsxSpreadAttribute(node) { writePunctuation("{..."); @@ -94391,7 +95702,7 @@ var ts; } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 319 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 320 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } @@ -94407,7 +95718,7 @@ var ts; emitJSDocTypeExpression(tag.typeExpression); emitJSDocComment(tag.comment); } - function emitJSDocAugmentsTag(tag) { + function emitJSDocHeritageTag(tag) { emitJSDocTagName(tag.tagName); writeSpace(); writePunctuation("{"); @@ -95244,19 +96555,19 @@ var ts; } return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node, includeTrivia); } - function getLiteralTextOfNode(node, neverAsciiEscape) { + function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) { if (node.kind === 10 /* StringLiteral */ && node.textSourceNode) { var textSourceNode = node.textSourceNode; if (ts.isIdentifier(textSourceNode)) { - return neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? - "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : - "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; + return jsxAttributeEscape ? "\"" + ts.escapeJsxAttributeString(getTextOfNode(textSourceNode)) + "\"" : + neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : + "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; } else { - return getLiteralTextOfNode(textSourceNode, neverAsciiEscape); + return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape); } } - return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape); + return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape, jsxAttributeEscape); } /** * Push a new name generation scope. @@ -95626,7 +96937,7 @@ var ts; hasWrittenComment = false; var emitFlags = ts.getEmitFlags(node); var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end; - var isEmittedNode = node.kind !== 324 /* NotEmittedStatement */; + var isEmittedNode = node.kind !== 325 /* NotEmittedStatement */; // We have to explicitly check that the node is JsxText because if the compilerOptions.jsx is "preserve" we will not do any transformation. // It is expensive to walk entire tree just to set one kind of node to have no comments. var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0 || node.kind === 11 /* JsxText */; @@ -95657,7 +96968,7 @@ var ts; } ts.forEach(ts.getSyntheticLeadingComments(node), emitLeadingSynthesizedComment); exitComment(); - var pipelinePhase = getNextPipelinePhase(2 /* Comments */, node); + var pipelinePhase = getNextPipelinePhase(2 /* Comments */, hint, node); if (emitFlags & 2048 /* NoNestedComments */) { commentsDisabled = true; pipelinePhase(hint, node); @@ -95895,7 +97206,7 @@ var ts; } function pipelineEmitWithSourceMap(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, node); + var pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, hint, node); if (ts.isUnparsedSource(node) || ts.isUnparsedPrepend(node)) { pipelinePhase(hint, node); } @@ -95909,7 +97220,7 @@ var ts; else { var _a = ts.getSourceMapRange(node), pos = _a.pos, end = _a.end, _b = _a.source, source = _b === void 0 ? sourceMapSource : _b; var emitFlags = ts.getEmitFlags(node); - if (node.kind !== 324 /* NotEmittedStatement */ + if (node.kind !== 325 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && pos >= 0) { emitSourcePos(source, skipSourceTrivia(source, pos)); @@ -95922,7 +97233,7 @@ var ts; else { pipelinePhase(hint, node); } - if (node.kind !== 324 /* NotEmittedStatement */ + if (node.kind !== 325 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && end >= 0) { emitSourcePos(source, end); @@ -96707,12 +98018,6 @@ var ts; return formatStyle + text + resetEscapeSequence; } ts.formatColorAndReset = formatColorAndReset; - function padLeft(s, length) { - while (s.length < length) { - s = " " + s; - } - return s; - } function formatCodeSpan(file, start, length, indent, squiggleColor, host) { var _a = ts.getLineAndCharacterOfPosition(file, start), firstLine = _a.line, firstLineChar = _a.character; var _b = ts.getLineAndCharacterOfPosition(file, start + length), lastLine = _b.line, lastLineChar = _b.character; @@ -96728,7 +98033,7 @@ var ts; // If the error spans over 5 lines, we'll only show the first 2 and last 2 lines, // so we'll skip ahead to the second-to-last line. if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) { - context += indent + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); + context += indent + formatColorAndReset(ts.padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); i = lastLine - 1; } var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0); @@ -96737,10 +98042,10 @@ var ts; lineContent = lineContent.replace(/\s+$/g, ""); // trim from end lineContent = lineContent.replace("\t", " "); // convert tabs to single spaces // Output the gutter and the actual contents of the line. - context += indent + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; context += lineContent + host.getNewLine(); // Output the gutter and the error span for the line using tildes. - context += indent + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; context += squiggleColor; if (i === firstLine) { // If we're on the last line, then limit it to the last character of the last line. @@ -96899,7 +98204,7 @@ var ts; hasInvalidatedResolution(sourceFile.path); } function sourceFileVersionUptoDate(sourceFile) { - return sourceFile.version === getSourceVersion(sourceFile.resolvedPath); + return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName); } function projectReferenceUptoDate(oldRef, newRef, index) { if (!ts.projectReferenceIsEqualTo(oldRef, newRef)) { @@ -97004,10 +98309,10 @@ var ts; var hasEmitBlockingDiagnostics = ts.createMap(); var _compilerOptionsObjectLiteralSyntax; var moduleResolutionCache; - var resolveModuleNamesWorker; + var actualResolveModuleNamesWorker; var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse; if (host.resolveModuleNames) { - resolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.assertEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { + actualResolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.checkEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. if (!resolved || resolved.extension !== undefined) { return resolved; @@ -97020,15 +98325,15 @@ var ts; else { moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); }, options); var loader_1 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache, redirectedReference).resolvedModule; }; // TODO: GH#18217 - resolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; + actualResolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; } - var resolveTypeReferenceDirectiveNamesWorker; + var actualResolveTypeReferenceDirectiveNamesWorker; if (host.resolveTypeReferenceDirectives) { - resolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.assertEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; } else { var loader_2 = function (typesRef, containingFile, redirectedReference) { return ts.resolveTypeReferenceDirective(typesRef, containingFile, options, host, redirectedReference).resolvedTypeReferenceDirective; }; // TODO: GH#18217 - resolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; } // Map from a stringified PackageId to the source file with that id. // Only one source file may have a given packageId. Others become redirects (see createRedirectSourceFile). @@ -97189,6 +98494,7 @@ var ts; getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); }, getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); }, getTypeCount: function () { return getDiagnosticsProducingTypeChecker().getTypeCount(); }, + getInstantiationCount: function () { return getDiagnosticsProducingTypeChecker().getInstantiationCount(); }, getRelationCacheSizes: function () { return getDiagnosticsProducingTypeChecker().getRelationCacheSizes(); }, getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; }, getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; }, @@ -97216,6 +98522,20 @@ var ts; ts.performance.mark("afterProgram"); ts.performance.measure("Program", "beforeProgram", "afterProgram"); return program; + function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference) { + ts.performance.mark("beforeResolveModule"); + var result = actualResolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference); + ts.performance.mark("afterResolveModule"); + ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule"); + return result; + } + function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference) { + ts.performance.mark("beforeResolveTypeReference"); + var result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference); + ts.performance.mark("afterResolveTypeReference"); + ts.performance.measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"); + return result; + } function compareDefaultLibFiles(a, b) { return ts.compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b)); } @@ -97289,13 +98609,13 @@ var ts; // which per above occurred during the current program creation. // Since we assume the filesystem does not change during program creation, // it is safe to reuse resolutions from the earlier call. - var result_8 = []; + var result_9 = []; for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { var moduleName = moduleNames_1[_i]; var resolvedModule = file.resolvedModules.get(moduleName); - result_8.push(resolvedModule); + result_9.push(resolvedModule); } - return result_8; + return result_9; } // At this point, we know at least one of the following hold: // - file has local declarations for ambient modules @@ -97589,7 +98909,7 @@ var ts; } if (resolveTypeReferenceDirectiveNamesWorker) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); var resolutions_1 = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFilePath, getResolvedProjectReferenceToRedirect(newSourceFile.originalFileName)); // ensure that types resolutions are still correct var resolutionsChanged_1 = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions_1, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo); @@ -97895,10 +99215,10 @@ var ts; function getJSSyntacticDiagnosticsForFile(sourceFile) { return runWithCancellationToken(function () { var diagnostics = []; - var parent = sourceFile; - walk(sourceFile); + walk(sourceFile, sourceFile); + ts.forEachChildRecursively(sourceFile, walk, walkArray); return diagnostics; - function walk(node) { + function walk(node, parent) { // Return directly from the case if the given node doesnt want to visit each child // Otherwise break to visit each child switch (parent.kind) { @@ -97907,7 +99227,7 @@ var ts; case 161 /* MethodDeclaration */: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); - return; + return "skip"; } // falls through case 160 /* MethodSignature */: @@ -97921,70 +99241,66 @@ var ts; // type annotation if (parent.type === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } } switch (node.kind) { case 255 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node.parent, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); - return; + return "skip"; } break; case 260 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); - return; + return "skip"; } break; case 253 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 259 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 279 /* HeritageClause */: var heritageClause = node; if (heritageClause.token === 113 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 246 /* InterfaceDeclaration */: var interfaceKeyword = ts.tokenToString(114 /* InterfaceKeyword */); - ts.Debug.assertDefined(interfaceKeyword); + ts.Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); - return; + return "skip"; case 249 /* ModuleDeclaration */: var moduleKeyword = node.flags & 16 /* Namespace */ ? ts.tokenToString(136 /* NamespaceKeyword */) : ts.tokenToString(135 /* ModuleKeyword */); - ts.Debug.assertDefined(moduleKeyword); + ts.Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); - return; + return "skip"; case 247 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 248 /* EnumDeclaration */: - var enumKeyword = ts.Debug.assertDefined(ts.tokenToString(88 /* EnumKeyword */)); + var enumKeyword = ts.Debug.checkDefined(ts.tokenToString(88 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); - return; + return "skip"; case 218 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 217 /* AsExpression */: diagnostics.push(createDiagnosticForNode(node.type, ts.Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 199 /* TypeAssertionExpression */: ts.Debug.fail(); // Won't parse these in a JS file anyway, as they are interpreted as JSX. } - var prevParent = parent; - parent = node; - ts.forEachChild(node, walk, walkArray); - parent = prevParent; } - function walkArray(nodes) { + function walkArray(nodes, parent) { if (parent.decorators === nodes && !options.experimentalDecorators) { diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)); } @@ -98001,13 +99317,14 @@ var ts; // Check type parameters if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } // falls through case 225 /* VariableStatement */: // Check modifiers if (nodes === parent.modifiers) { - return checkModifiers(parent.modifiers, parent.kind === 225 /* VariableStatement */); + checkModifiers(parent.modifiers, parent.kind === 225 /* VariableStatement */); + return "skip"; } break; case 159 /* PropertyDeclaration */: @@ -98019,14 +99336,14 @@ var ts; diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, ts.tokenToString(modifier.kind))); } } - return; + return "skip"; } break; case 156 /* Parameter */: // Check modifiers of parameter declaration if (nodes === parent.modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 196 /* CallExpression */: @@ -98038,14 +99355,10 @@ var ts; // Check type arguments if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; } - for (var _b = 0, nodes_6 = nodes; _b < nodes_6.length; _b++) { - var node = nodes_6[_b]; - walk(node); - } } function checkModifiers(modifiers, isConstValid) { for (var _i = 0, modifiers_1 = modifiers; _i < modifiers_1.length; _i++) { @@ -98257,7 +99570,7 @@ var ts; } } function getLibFileFromReference(ref) { - var libName = ref.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(ref.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { return getSourceFile(ts.combinePaths(defaultLibraryPath, libFileName)); @@ -98466,7 +99779,7 @@ var ts; file.originalFileName = originalFileName; addFileToRefFileMap(fileName, file, refFile); if (host.useCaseSensitiveFileNames()) { - var pathLowerCase = path.toLowerCase(); + var pathLowerCase = ts.toFileNameLowerCase(path); // for case-sensitive file systems check if we've already seen some file with similar filename ignoring case var existingFile = filesByNameIgnoreCase.get(pathLowerCase); if (existingFile) { @@ -98637,7 +99950,7 @@ var ts; } function processTypeReferenceDirectives(file) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); if (!typeDirectives) { return; } @@ -98646,7 +99959,7 @@ var ts; var ref = file.typeReferenceDirectives[i]; var resolvedTypeReferenceDirective = resolutions[i]; // store resolved type directive on the file - var fileName = ref.fileName.toLocaleLowerCase(); + var fileName = ts.toFileNameLowerCase(ref.fileName); ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective); processTypeReferenceDirective(fileName, resolvedTypeReferenceDirective, { kind: ts.RefFileKind.TypeReferenceDirective, @@ -98708,7 +100021,7 @@ var ts; } function processLibReferenceDirectives(file) { ts.forEach(file.libReferenceDirectives, function (libReference) { - var libName = libReference.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(libReference.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { // we ignore any 'no-default-lib' reference set on this file. @@ -98840,7 +100153,7 @@ var ts; projectReferenceRedirects.set(sourceFilePath, false); return undefined; } - sourceFile = ts.Debug.assertDefined(commandLine.options.configFile); + sourceFile = ts.Debug.checkDefined(commandLine.options.configFile); ts.Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath); addFileToFilesByName(sourceFile, sourceFilePath, /*redirectedPath*/ undefined); } @@ -98905,6 +100218,9 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } + if (!options.listFilesOnly && options.noEmit && ts.isIncrementalCompilation(options)) { + createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); + } verifyProjectReferences(); // List of collected files is complete; validate exhautiveness if this is a project with a file list if (options.composite) { @@ -99083,7 +100399,7 @@ var ts; chain = ts.chainDiagnosticMessages(chain, ts.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file, emitFileName); blockEmittingOfFile(emitFileName, ts.createCompilerDiagnosticFromMessageChain(chain)); } - var emitFileKey = !host.useCaseSensitiveFileNames() ? emitFilePath.toLocaleLowerCase() : emitFilePath; + var emitFileKey = !host.useCaseSensitiveFileNames() ? ts.toFileNameLowerCase(emitFilePath) : emitFilePath; // Report error if multiple files write into same file if (emitFilesSeen.has(emitFileKey)) { // Already seen the same emit file - report error @@ -99101,7 +100417,7 @@ var ts; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } - var refFile = ts.Debug.assertDefined(getSourceFileByPath(refPathToReportErrorOn.file)); + var refFile = ts.Debug.checkDefined(getSourceFileByPath(refPathToReportErrorOn.file)); var kind = refPathToReportErrorOn.kind, index = refPathToReportErrorOn.index; var pos, end; switch (kind) { @@ -99326,7 +100642,7 @@ var ts; return { fileExists: function (f) { return directoryStructureHost.fileExists(f); }, readDirectory: function (root, extensions, excludes, includes, depth) { - ts.Debug.assertDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + ts.Debug.assertIsDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: function (f) { return directoryStructureHost.readFile(f); }, @@ -99544,7 +100860,7 @@ var ts; // Create the reference map, and set the file infos for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) { var sourceFile = _a[_i]; - var version_1 = ts.Debug.assertDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); + var version_1 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined; if (referencedMap) { var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName); @@ -100071,7 +101387,7 @@ var ts; } // With --out or --outFile all outputs go into single file // so operations are performed directly on program, return program - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var compilerOptions = program.getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); @@ -100096,10 +101412,10 @@ var ts; if (affectedFilesPendingEmit) { var seenEmittedFiles = state.seenEmittedFiles || (state.seenEmittedFiles = ts.createMap()); for (var i = state.affectedFilesPendingEmitIndex; i < affectedFilesPendingEmit.length; i++) { - var affectedFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); + var affectedFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); if (affectedFile) { var seenKind = seenEmittedFiles.get(affectedFile.resolvedPath); - var emitKind = ts.Debug.assertDefined(ts.Debug.assertDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); + var emitKind = ts.Debug.checkDefined(ts.Debug.checkDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); if (seenKind === undefined || seenKind < emitKind) { // emit this file state.affectedFilesPendingEmitIndex = i; @@ -100123,7 +101439,7 @@ var ts; if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) { if (!state.cleanedDiagnosticsOfLibFiles) { state.cleanedDiagnosticsOfLibFiles = true; - var program_1 = ts.Debug.assertDefined(state.program); + var program_1 = ts.Debug.checkDefined(state.program); var options_2 = program_1.getCompilerOptions(); ts.forEach(program_1.getSourceFiles(), function (f) { return program_1.isSourceFileDefaultLibrary(f) && @@ -100144,14 +101460,14 @@ var ts; function handleDtsMayChangeOf(state, path, cancellationToken, computeHash) { removeSemanticDiagnosticsOf(state, path); if (!state.changedFilesSet.has(path)) { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var sourceFile = program.getSourceFileByPath(path); if (sourceFile) { // Even though the js emit doesnt change and we are already handling dts emit and semantic diagnostics // we need to update the signature to reflect correctness of the signature(which is output d.ts emit) of this file // This ensures that we dont later during incremental builds considering wrong signature. // Eg where this also is needed to ensure that .tsbuildinfo generated by incremental build should be same as if it was first fresh build - ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.assertDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); + ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); // If not dts emit, nothing more to do if (ts.getEmitDeclarations(state.compilerOptions)) { addToAffectedFilesPendingEmit(state, path, 0 /* DtsOnly */); @@ -100173,8 +101489,8 @@ var ts; return !state.semanticDiagnosticsFromOldState.size; } function isChangedSignagure(state, path) { - var newSignature = ts.Debug.assertDefined(state.currentAffectedFilesSignatures).get(path); - var oldSignagure = ts.Debug.assertDefined(state.fileInfos.get(path)).signature; + var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path); + var oldSignagure = ts.Debug.checkDefined(state.fileInfos.get(path)).signature; return newSignature !== oldSignagure; } /** @@ -100200,7 +101516,7 @@ var ts; seenFileNamesMap.set(currentPath, true); var result = fn(state, currentPath); if (result && isChangedSignagure(state, currentPath)) { - var currentSourceFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(currentPath); + var currentSourceFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(currentPath); queue.push.apply(queue, ts.BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath)); } } @@ -100313,7 +101629,7 @@ var ts; * bindAndCheckDiagnostics (from cache) and program diagnostics */ function getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken) { - return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.assertDefined(state.program).getProgramDiagnostics(sourceFile)); + return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.checkDefined(state.program).getProgramDiagnostics(sourceFile)); } /** * Gets the binder and checker diagnostics either from cache if present, or otherwise from program and caches it @@ -100329,7 +101645,7 @@ var ts; } } // Diagnostics werent cached, get them from program, and cache the result - var diagnostics = ts.Debug.assertDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); + var diagnostics = ts.Debug.checkDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); if (state.semanticDiagnosticsPerFile) { state.semanticDiagnosticsPerFile.set(path, diagnostics); } @@ -100341,7 +101657,7 @@ var ts; function getProgramBuildInfo(state, getCanonicalFileName) { if (state.compilerOptions.outFile || state.compilerOptions.out) return undefined; - var currentDirectory = ts.Debug.assertDefined(state.program).getCurrentDirectory(); + var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory(); var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory)); var fileInfos = {}; state.fileInfos.forEach(function (value, key) { @@ -100507,10 +101823,10 @@ var ts; backupState = cloneBuilderProgramState(state); }; builderProgram.restoreState = function () { - state = ts.Debug.assertDefined(backupState); + state = ts.Debug.checkDefined(backupState); backupState = undefined; }; - builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.assertDefined(state.program), sourceFile); }; + builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); }; builderProgram.getSemanticDiagnostics = getSemanticDiagnostics; builderProgram.emit = emit; builderProgram.releaseProgram = function () { @@ -100544,7 +101860,7 @@ var ts; if (state.emittedBuildInfo) { return undefined; } - var affected_1 = ts.Debug.assertDefined(state.program); + var affected_1 = ts.Debug.checkDefined(state.program); return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file @@ -100556,7 +101872,7 @@ var ts; isPendingEmitFile = true; } else { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); if (state.programEmitComplete) return undefined; affected = program; @@ -100565,7 +101881,7 @@ var ts; return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file - ts.Debug.assertDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */, customTransformers), affected, emitKind, isPendingEmitFile); + ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */, customTransformers), affected, emitKind, isPendingEmitFile); } /** * Emits the JavaScript and declaration files. @@ -100605,7 +101921,7 @@ var ts; }; } } - return ts.Debug.assertDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); + return ts.Debug.checkDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); } /** * Return the semantic diagnostics for the next affected file or undefined if iteration is complete @@ -100645,11 +101961,11 @@ var ts; */ function getSemanticDiagnostics(sourceFile, cancellationToken) { assertSourceFileOkWithoutNextAffectedCall(state, sourceFile); - var compilerOptions = ts.Debug.assertDefined(state.program).getCompilerOptions(); + var compilerOptions = ts.Debug.checkDefined(state.program).getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); // We dont need to cache the diagnostics just return them from program - return ts.Debug.assertDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); + return ts.Debug.checkDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); } if (sourceFile) { return getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken); @@ -100660,7 +101976,7 @@ var ts; while (getSemanticDiagnosticsOfNextAffectedFile(cancellationToken)) { } var diagnostics; - for (var _i = 0, _a = ts.Debug.assertDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { + for (var _i = 0, _a = ts.Debug.checkDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { var sourceFile_1 = _a[_i]; diagnostics = ts.addRange(diagnostics, getSemanticDiagnosticsOfFile(state, sourceFile_1, cancellationToken)); } @@ -100768,7 +102084,7 @@ var ts; close: ts.noop, }; function getProgram() { - return ts.Debug.assertDefined(state.program); + return ts.Debug.checkDefined(state.program); } } ts.createRedirectedBuilderProgram = createRedirectedBuilderProgram; @@ -100875,6 +102191,7 @@ var ts; var directoryWatchesOfFailedLookups = ts.createMap(); var rootDir = rootDirForResolution && ts.removeTrailingDirectorySeparator(ts.getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory())); var rootPath = (rootDir && resolutionHost.toPath(rootDir)); // TODO: GH#18217 + var rootSplitLength = rootPath !== undefined ? rootPath.split(ts.directorySeparator).length : 0; // TypeRoot watches for the types that get added as part of getAutomaticTypeDirectiveNames var typeRootsWatches = ts.createMap(); return { @@ -100976,7 +102293,7 @@ var ts; if (globalCache !== undefined && !ts.isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && ts.extensionIsTS(primaryResult.resolvedModule.extension))) { // create different collection of failed lookup locations for second pass // if it will fail and we've already found something during the first pass - we don't want to pollute its results - var _a = ts.loadModuleFromGlobalCache(ts.Debug.assertDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; + var _a = ts.loadModuleFromGlobalCache(ts.Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; if (resolvedModule) { return { resolvedModule: resolvedModule, failedLookupLocations: ts.addRange(primaryResult.failedLookupLocations, failedLookupLocations) }; } @@ -101085,15 +102402,23 @@ var ts; if (isInDirectoryPath(rootPath, failedLookupLocationPath)) { // Ensure failed look up is normalized path failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory()); - ts.Debug.assert(failedLookupLocation.length === failedLookupLocationPath.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); - var subDirectoryInRoot = failedLookupLocationPath.indexOf(ts.directorySeparator, rootPath.length + 1); - if (subDirectoryInRoot !== -1) { + var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator); + var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator); + ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); + if (failedLookupPathSplit.length > rootSplitLength + 1) { // Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution - return { dir: failedLookupLocation.substr(0, subDirectoryInRoot), dirPath: failedLookupLocationPath.substr(0, subDirectoryInRoot) }; + return { + dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator), + dirPath: failedLookupPathSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator) + }; } else { // Always watch root directory non recursively - return { dir: rootDir, dirPath: rootPath, nonRecursive: false }; // TODO: GH#18217 + return { + dir: rootDir, + dirPath: rootPath, + nonRecursive: false + }; } } return getDirectoryToWatchFromFailedLookupLocationDirectory(ts.getDirectoryPath(ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory())), ts.getDirectoryPath(failedLookupLocationPath)); @@ -101297,7 +102622,7 @@ var ts; resolution.isInvalidated = true; (filesWithInvalidatedResolutions || (filesWithInvalidatedResolutions = ts.createMap())).set(containingFilePath, true); // When its a file with inferred types resolution, invalidate type reference directive resolution - if (containingFilePath.endsWith(ts.inferredTypesContainingFile)) { + if (ts.endsWith(containingFilePath, ts.inferredTypesContainingFile)) { resolutionHost.onChangedAutomaticTypeDirectiveNames(); } } @@ -102151,7 +103476,7 @@ var ts; var getDefaultLibLocation = ts.memoize(function () { return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath())); }); var host = system; // TODO: `host` is unused! - // eslint-disable-next-line no-unused-expressions + // eslint-disable-next-line @typescript-eslint/no-unused-expressions host; return { useCaseSensitiveFileNames: function () { return system.useCaseSensitiveFileNames; }, @@ -102691,7 +104016,7 @@ var ts; return watchDirectory(host, directory, function (fileOrDirectory) { ts.Debug.assert(!!configFileName); var fileOrDirectoryPath = toPath(fileOrDirectory); - // Since the file existance changed, update the sourceFiles cache + // Since the file existence changed, update the sourceFiles cache if (cachedDirectoryStructureHost) { cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); } @@ -102877,7 +104202,7 @@ var ts; if (!compilerHost.resolveModuleNames) { var loader_3 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference).resolvedModule; }; compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference) { - return ts.loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_3); + return ts.loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_3); }; } var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchFilePath = _a.watchFilePath, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog; @@ -103263,7 +104588,7 @@ var ts; if (state.options.verbose) reportStatus(state, ts.Diagnostics.Building_project_0, project); if (config.fileNames.length === 0) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); // Nothing to build - must be a solution file, basically buildResult = BuildResultFlags.None; step = Step.QueueReferencingProjects; @@ -103274,7 +104599,7 @@ var ts; // Update module resolution cache if needed updateModuleResolutionCache(state, project, config); // Create program - program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), config.errors, config.projectReferences); + program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences); step++; } function handleDiagnostics(diagnostics, errorFlags, errorType) { @@ -103287,14 +104612,14 @@ var ts; } } function getSyntaxDiagnostics(cancellationToken) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); handleDiagnostics(__spreadArrays(program.getConfigFileParsingDiagnostics(), program.getOptionsDiagnostics(cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken)), BuildResultFlags.SyntaxErrors, "Syntactic"); } function getSemanticDiagnostics(cancellationToken) { - handleDiagnostics(ts.Debug.assertDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); + handleDiagnostics(ts.Debug.checkDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); } function emit(writeFileCallback, cancellationToken, customTransformers) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); ts.Debug.assert(step === Step.Emit); // Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly program.backupState(); @@ -103428,11 +104753,11 @@ var ts; emitBundle(writeFile, customTransformers); break; case Step.BuildInvalidatedProjectOfBundle: - ts.Debug.assertDefined(invalidatedProjectOfBundle).done(cancellationToken); + ts.Debug.checkDefined(invalidatedProjectOfBundle).done(cancellationToken); step = Step.Done; break; case Step.QueueReferencingProjects: - queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.assertDefined(buildResult)); + queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.checkDefined(buildResult)); step++; break; // Should never be done @@ -103449,7 +104774,7 @@ var ts; if (status.type !== ts.UpToDateStatusType.OutOfDateWithPrepend || options.force) return true; return config.fileNames.length === 0 || - !!config.errors.length || + !!ts.getConfigFileParsingDiagnostics(config).length || !ts.isIncrementalCompilation(config.options); } function getNextInvalidatedProject(state, buildOrder, reportQueue) { @@ -103496,7 +104821,7 @@ var ts; verboseReportProjectStatus(state, project, status); if (!options.force) { if (status.type === ts.UpToDateStatusType.UpToDate) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); // Up to date, skip if (options.dry) { @@ -103506,12 +104831,12 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); return createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder); } } if (status.type === ts.UpToDateStatusType.UpstreamBlocked) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); if (options.verbose) { reportStatus(state, status.upstreamProjectBlocked ? @@ -103521,7 +104846,7 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.ContainerOnly) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); // Do nothing continue; @@ -104568,7 +105893,7 @@ var ts; case 247 /* TypeAliasDeclaration */: case 173 /* TypeLiteral */: return 2 /* Type */; - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: // If it has no name node, it shares the name with the value declaration below it. return node.name === undefined ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; case 284 /* EnumMember */: @@ -104600,6 +105925,7 @@ var ts; } ts.getMeaningFromDeclaration = getMeaningFromDeclaration; function getMeaningFromLocation(node) { + node = getAdjustedReferenceLocation(node); if (node.kind === 290 /* SourceFile */) { return 1 /* Value */; } @@ -104884,8 +106210,8 @@ var ts; return "class" /* classElement */; case 246 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; case 247 /* TypeAliasDeclaration */: - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: return "type" /* typeElement */; case 248 /* EnumDeclaration */: return "enum" /* enumElement */; case 242 /* VariableDeclaration */: @@ -104951,6 +106277,10 @@ var ts; } case 75 /* Identifier */: return ts.isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; + case 259 /* ExportAssignment */: + var scriptKind = getNodeKind(node.expression); + // If the expression didn't come back with something (like it does for an identifiers) + return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: return "" /* unknown */; } @@ -105197,6 +106527,339 @@ var ts; return syntaxList; } ts.findContainingList = findContainingList; + function isDefaultModifier(node) { + return node.kind === 84 /* DefaultKeyword */; + } + function isClassKeyword(node) { + return node.kind === 80 /* ClassKeyword */; + } + function isFunctionKeyword(node) { + return node.kind === 94 /* FunctionKeyword */; + } + function getAdjustedLocationForClass(node) { + if (ts.isNamedDeclaration(node)) { + return node.name; + } + if (ts.isClassDeclaration(node)) { + // for class and function declarations, use the `default` modifier + // when the declaration is unnamed. + var defaultModifier = ts.find(node.modifiers, isDefaultModifier); + if (defaultModifier) + return defaultModifier; + } + if (ts.isClassExpression(node)) { + // for class expressions, use the `class` keyword when the class is unnamed + var classKeyword = ts.find(node.getChildren(), isClassKeyword); + if (classKeyword) + return classKeyword; + } + } + function getAdjustedLocationForFunction(node) { + if (ts.isNamedDeclaration(node)) { + return node.name; + } + if (ts.isFunctionDeclaration(node)) { + // for class and function declarations, use the `default` modifier + // when the declaration is unnamed. + var defaultModifier = ts.find(node.modifiers, isDefaultModifier); + if (defaultModifier) + return defaultModifier; + } + if (ts.isFunctionExpression(node)) { + // for function expressions, use the `function` keyword when the function is unnamed + var functionKeyword = ts.find(node.getChildren(), isFunctionKeyword); + if (functionKeyword) + return functionKeyword; + } + } + function getAdjustedLocationForDeclaration(node, forRename) { + if (!forRename) { + switch (node.kind) { + case 245 /* ClassDeclaration */: + case 214 /* ClassExpression */: + return getAdjustedLocationForClass(node); + case 244 /* FunctionDeclaration */: + case 201 /* FunctionExpression */: + return getAdjustedLocationForFunction(node); + } + } + if (ts.isNamedDeclaration(node)) { + return node.name; + } + } + function getAdjustedLocationForImportDeclaration(node, forRename) { + if (node.importClause) { + if (node.importClause.name && node.importClause.namedBindings) { + // do not adjust if we have both a name and named bindings + return; + } + // /**/import [|name|] from ...; + // import /**/type [|name|] from ...; + if (node.importClause.name) { + return node.importClause.name; + } + // /**/import { [|name|] } from ...; + // /**/import { propertyName as [|name|] } from ...; + // /**/import * as [|name|] from ...; + // import /**/type { [|name|] } from ...; + // import /**/type { propertyName as [|name|] } from ...; + // import /**/type * as [|name|] from ...; + if (node.importClause.namedBindings) { + if (ts.isNamedImports(node.importClause.namedBindings)) { + // do nothing if there is more than one binding + var onlyBinding = ts.singleOrUndefined(node.importClause.namedBindings.elements); + if (!onlyBinding) { + return; + } + return onlyBinding.name; + } + else if (ts.isNamespaceImport(node.importClause.namedBindings)) { + return node.importClause.namedBindings.name; + } + } + } + if (!forRename) { + // /**/import "[|module|]"; + // /**/import ... from "[|module|]"; + // import /**/type ... from "[|module|]"; + return node.moduleSpecifier; + } + } + function getAdjustedLocationForExportDeclaration(node, forRename) { + if (node.exportClause) { + // /**/export { [|name|] } ... + // /**/export { propertyName as [|name|] } ... + // /**/export * as [|name|] ... + // export /**/type { [|name|] } from ... + // export /**/type { propertyName as [|name|] } from ... + // export /**/type * as [|name|] ... + if (ts.isNamedExports(node.exportClause)) { + // do nothing if there is more than one binding + var onlyBinding = ts.singleOrUndefined(node.exportClause.elements); + if (!onlyBinding) { + return; + } + return node.exportClause.elements[0].name; + } + else if (ts.isNamespaceExport(node.exportClause)) { + return node.exportClause.name; + } + } + if (!forRename) { + // /**/export * from "[|module|]"; + // export /**/type * from "[|module|]"; + return node.moduleSpecifier; + } + } + function getAdjustedLocationForHeritageClause(node) { + // /**/extends [|name|] + // /**/implements [|name|] + if (node.types.length === 1) { + return node.types[0].expression; + } + // /**/extends name1, name2 ... + // /**/implements name1, name2 ... + } + function getAdjustedLocation(node, forRename) { + var parent = node.parent; + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/import [|name|] = ... + // + // NOTE: If the node is a modifier, we don't adjust its location if it is the `default` modifier as that is handled + // specially by `getSymbolAtLocation`. + if (ts.isModifier(node) && (forRename || node.kind !== 84 /* DefaultKeyword */) ? ts.contains(parent.modifiers, node) : + node.kind === 80 /* ClassKeyword */ ? ts.isClassDeclaration(parent) || ts.isClassExpression(node) : + node.kind === 94 /* FunctionKeyword */ ? ts.isFunctionDeclaration(parent) || ts.isFunctionExpression(node) : + node.kind === 114 /* InterfaceKeyword */ ? ts.isInterfaceDeclaration(parent) : + node.kind === 88 /* EnumKeyword */ ? ts.isEnumDeclaration(parent) : + node.kind === 145 /* TypeKeyword */ ? ts.isTypeAliasDeclaration(parent) : + node.kind === 136 /* NamespaceKeyword */ || node.kind === 135 /* ModuleKeyword */ ? ts.isModuleDeclaration(parent) : + node.kind === 96 /* ImportKeyword */ ? ts.isImportEqualsDeclaration(parent) : + node.kind === 131 /* GetKeyword */ ? ts.isGetAccessorDeclaration(parent) : + node.kind === 142 /* SetKeyword */ && ts.isSetAccessorDeclaration(parent)) { + var location = getAdjustedLocationForDeclaration(parent, forRename); + if (location) { + return location; + } + } + // /**/ [|name|] ... + if ((node.kind === 109 /* VarKeyword */ || node.kind === 81 /* ConstKeyword */ || node.kind === 115 /* LetKeyword */) && + ts.isVariableDeclarationList(parent) && parent.declarations.length === 1) { + var decl = parent.declarations[0]; + if (ts.isIdentifier(decl.name)) { + return decl.name; + } + } + if (node.kind === 145 /* TypeKeyword */) { + // import /**/type [|name|] from ...; + // import /**/type { [|name|] } from ...; + // import /**/type { propertyName as [|name|] } from ...; + // import /**/type ... from "[|module|]"; + if (ts.isImportClause(parent) && parent.isTypeOnly) { + var location = getAdjustedLocationForImportDeclaration(parent.parent, forRename); + if (location) { + return location; + } + } + // export /**/type { [|name|] } from ...; + // export /**/type { propertyName as [|name|] } from ...; + // export /**/type * from "[|module|]"; + // export /**/type * as ... from "[|module|]"; + if (ts.isExportDeclaration(parent) && parent.isTypeOnly) { + var location = getAdjustedLocationForExportDeclaration(parent, forRename); + if (location) { + return location; + } + } + } + // import { propertyName /**/as [|name|] } ... + // import * /**/as [|name|] ... + // export { propertyName /**/as [|name|] } ... + // export * /**/as [|name|] ... + if (node.kind === 123 /* AsKeyword */) { + if (ts.isImportSpecifier(parent) && parent.propertyName || + ts.isExportSpecifier(parent) && parent.propertyName || + ts.isNamespaceImport(parent) || + ts.isNamespaceExport(parent)) { + return parent.name; + } + if (ts.isExportDeclaration(parent) && parent.exportClause && ts.isNamespaceExport(parent.exportClause)) { + return parent.exportClause.name; + } + } + // /**/import [|name|] from ...; + // /**/import { [|name|] } from ...; + // /**/import { propertyName as [|name|] } from ...; + // /**/import ... from "[|module|]"; + // /**/import "[|module|]"; + if (node.kind === 96 /* ImportKeyword */ && ts.isImportDeclaration(parent)) { + var location = getAdjustedLocationForImportDeclaration(parent, forRename); + if (location) { + return location; + } + } + if (node.kind === 89 /* ExportKeyword */) { + // /**/export { [|name|] } ...; + // /**/export { propertyName as [|name|] } ...; + // /**/export * from "[|module|]"; + // /**/export * as ... from "[|module|]"; + if (ts.isExportDeclaration(parent)) { + var location = getAdjustedLocationForExportDeclaration(parent, forRename); + if (location) { + return location; + } + } + // NOTE: We don't adjust the location of the `default` keyword as that is handled specially by `getSymbolAtLocation`. + // /**/export default [|name|]; + // /**/export = [|name|]; + if (ts.isExportAssignment(parent)) { + return ts.skipOuterExpressions(parent.expression); + } + } + // import name = /**/require("[|module|]"); + if (node.kind === 139 /* RequireKeyword */ && ts.isExternalModuleReference(parent)) { + return parent.expression; + } + // import ... /**/from "[|module|]"; + // export ... /**/from "[|module|]"; + if (node.kind === 149 /* FromKeyword */ && (ts.isImportDeclaration(parent) || ts.isExportDeclaration(parent)) && parent.moduleSpecifier) { + return parent.moduleSpecifier; + } + // class ... /**/extends [|name|] ... + // class ... /**/implements [|name|] ... + // class ... /**/implements name1, name2 ... + // interface ... /**/extends [|name|] ... + // interface ... /**/extends name1, name2 ... + if ((node.kind === 90 /* ExtendsKeyword */ || node.kind === 113 /* ImplementsKeyword */) && ts.isHeritageClause(parent) && parent.token === node.kind) { + var location = getAdjustedLocationForHeritageClause(parent); + if (location) { + return location; + } + } + if (node.kind === 90 /* ExtendsKeyword */) { + // ... ... + if (ts.isTypeParameterDeclaration(parent) && parent.constraint && ts.isTypeReferenceNode(parent.constraint)) { + return parent.constraint.typeName; + } + // ... T /**/extends [|U|] ? ... + if (ts.isConditionalTypeNode(parent) && ts.isTypeReferenceNode(parent.extendsType)) { + return parent.extendsType.typeName; + } + } + // ... T extends /**/infer [|U|] ? ... + if (node.kind === 132 /* InferKeyword */ && ts.isInferTypeNode(parent)) { + return parent.typeParameter.name; + } + // { [ [|K|] /**/in keyof T]: ... } + if (node.kind === 97 /* InKeyword */ && ts.isTypeParameterDeclaration(parent) && ts.isMappedTypeNode(parent.parent)) { + return parent.name; + } + // /**/keyof [|T|] + if (node.kind === 134 /* KeyOfKeyword */ && ts.isTypeOperatorNode(parent) && parent.operator === 134 /* KeyOfKeyword */ && + ts.isTypeReferenceNode(parent.type)) { + return parent.type.typeName; + } + // /**/readonly [|name|][] + if (node.kind === 138 /* ReadonlyKeyword */ && ts.isTypeOperatorNode(parent) && parent.operator === 138 /* ReadonlyKeyword */ && + ts.isArrayTypeNode(parent.type) && ts.isTypeReferenceNode(parent.type.elementType)) { + return parent.type.elementType.typeName; + } + if (!forRename) { + // /**/new [|name|] + // /**/void [|name|] + // /**/void obj.[|name|] + // /**/typeof [|name|] + // /**/typeof obj.[|name|] + // /**/await [|name|] + // /**/await obj.[|name|] + // /**/yield [|name|] + // /**/yield obj.[|name|] + // /**/delete obj.[|name|] + if (node.kind === 99 /* NewKeyword */ && ts.isNewExpression(parent) || + node.kind === 110 /* VoidKeyword */ && ts.isVoidExpression(parent) || + node.kind === 108 /* TypeOfKeyword */ && ts.isTypeOfExpression(parent) || + node.kind === 127 /* AwaitKeyword */ && ts.isAwaitExpression(parent) || + node.kind === 121 /* YieldKeyword */ && ts.isYieldExpression(parent) || + node.kind === 85 /* DeleteKeyword */ && ts.isDeleteExpression(parent)) { + if (parent.expression) { + return ts.skipOuterExpressions(parent.expression); + } + } + // left /**/in [|name|] + // left /**/instanceof [|name|] + if ((node.kind === 97 /* InKeyword */ || node.kind === 98 /* InstanceOfKeyword */) && ts.isBinaryExpression(parent) && parent.operatorToken === node) { + return ts.skipOuterExpressions(parent.right); + } + // left /**/as [|name|] + if (node.kind === 123 /* AsKeyword */ && ts.isAsExpression(parent) && ts.isTypeReferenceNode(parent.type)) { + return parent.type.typeName; + } + // for (... /**/in [|name|]) + // for (... /**/of [|name|]) + if (node.kind === 97 /* InKeyword */ && ts.isForInStatement(parent) || + node.kind === 152 /* OfKeyword */ && ts.isForOfStatement(parent)) { + return ts.skipOuterExpressions(parent.expression); + } + } + return node; + } + /** + * Adjusts the location used for "find references" and "go to definition" when the cursor was not + * on a property name. + */ + function getAdjustedReferenceLocation(node) { + return getAdjustedLocation(node, /*forRename*/ false); + } + ts.getAdjustedReferenceLocation = getAdjustedReferenceLocation; + /** + * Adjusts the location used for "rename" when the cursor was not on a property name. + */ + function getAdjustedRenameLocation(node) { + return getAdjustedLocation(node, /*forRename*/ true); + } + ts.getAdjustedRenameLocation = getAdjustedRenameLocation; /** * Gets the token whose text has range [start, end) and * position >= start and (position < end or (position === end && token is literal or keyword or identifier)) @@ -105593,6 +107256,8 @@ var ts; result.push("export" /* exportedModifier */); if (node.flags & 8388608 /* Ambient */) result.push("declare" /* ambientModifier */); + if (node.kind === 259 /* ExportAssignment */) + result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } ts.getNodeModifiers = getNodeModifiers; @@ -105709,6 +107374,7 @@ var ts; ts.createTextChange = createTextChange; ts.typeKeywords = [ 125 /* AnyKeyword */, + 124 /* AssertsKeyword */, 151 /* BigIntKeyword */, 128 /* BooleanKeyword */, 91 /* FalseKeyword */, @@ -105730,6 +107396,10 @@ var ts; return ts.contains(ts.typeKeywords, kind); } ts.isTypeKeyword = isTypeKeyword; + function isTypeKeywordToken(node) { + return node.kind === 145 /* TypeKeyword */; + } + ts.isTypeKeywordToken = isTypeKeywordToken; /** True if the symbol is for an external module, as opposed to a namespace. */ function isExternalModuleSymbol(moduleSymbol) { return !!(moduleSymbol.flags & 1536 /* Module */) && moduleSymbol.name.charCodeAt(0) === 34 /* doubleQuote */; @@ -105902,16 +107572,21 @@ var ts; return node.modifiers && ts.find(node.modifiers, function (m) { return m.kind === kind; }); } ts.findModifier = findModifier; - function insertImport(changes, sourceFile, importDecl) { + function insertImport(changes, sourceFile, importDecl, blankLineBetween) { var lastImportDeclaration = ts.findLast(sourceFile.statements, ts.isAnyImportSyntax); if (lastImportDeclaration) { changes.insertNodeAfter(sourceFile, lastImportDeclaration, importDecl); } else { - changes.insertNodeAtTopOfFile(sourceFile, importDecl, /*blankLineBetween*/ true); + changes.insertNodeAtTopOfFile(sourceFile, importDecl, blankLineBetween); } } ts.insertImport = insertImport; + function getTypeKeywordOfTypeOnlyImport(importClause, sourceFile) { + ts.Debug.assert(importClause.isTypeOnly); + return ts.cast(importClause.getChildAt(0, sourceFile), isTypeKeywordToken); + } + ts.getTypeKeywordOfTypeOnlyImport = getTypeKeywordOfTypeOnlyImport; function textSpansEqual(a, b) { return !!a && !!b && a.start === b.start && a.length === b.length; } @@ -106423,9 +108098,6 @@ var ts; } ts.getContextualTypeFromParent = getContextualTypeFromParent; function quote(text, preferences) { - if (/^\d+$/.test(text)) { - return text; - } // Editors can pass in undefined or empty string - we want to infer the preference in those cases. var quotePreference = preferences.quotePreference || "auto"; var quoted = JSON.stringify(text); @@ -106812,6 +108484,15 @@ var ts; return ts.isArray(valueOrArray) ? ts.first(valueOrArray) : valueOrArray; } ts.firstOrOnly = firstOrOnly; + function getNameForExportedSymbol(symbol, scriptTarget) { + if (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */) { + // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. + return ts.firstDefined(symbol.declarations, function (d) { return ts.isExportAssignment(d) && ts.isIdentifier(d.expression) ? d.expression.text : undefined; }) + || ts.codefix.moduleSymbolToValidIdentifier(ts.Debug.checkDefined(symbol.parent), scriptTarget); + } + return symbol.name; + } + ts.getNameForExportedSymbol = getNameForExportedSymbol; // #endregion })(ts || (ts = {})); var ts; @@ -106942,7 +108623,7 @@ var ts; if (templateStack.length > 0) { var lastTemplateStackToken = ts.lastOrUndefined(templateStack); if (lastTemplateStackToken === 15 /* TemplateHead */) { - token = scanner.reScanTemplateToken(); + token = scanner.reScanTemplateToken(/* isTaggedTemplate */ false); // Only pop on a TemplateTail; a TemplateMiddle indicates there is more for us. if (token === 17 /* TemplateTail */) { templateStack.pop(); @@ -107473,18 +109154,18 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); // e.g. "param" pos = tag.tagName.end; switch (tag.kind) { - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: processJSDocParameterTag(tag); break; - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; break; - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; break; - case 317 /* JSDocReturnTag */: + case 318 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; break; @@ -107785,9 +109466,10 @@ var ts; return entries && convertPathCompletions(entries); } if (ts.isInString(sourceFile, position, contextToken)) { - return !contextToken || !ts.isStringLiteralLike(contextToken) - ? undefined - : convertStringLiteralCompletions(getStringLiteralCompletionEntries(sourceFile, contextToken, position, checker, options, host), sourceFile, checker, log, preferences); + if (!contextToken || !ts.isStringLiteralLike(contextToken)) + return undefined; + var entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, checker, options, host); + return convertStringLiteralCompletions(entries, sourceFile, checker, log, preferences); } } StringCompletions.getStringLiteralCompletions = getStringLiteralCompletions; @@ -107969,7 +109651,11 @@ var ts; return { kind: 2 /* Types */, types: types, isNewIdentifier: isNewIdentifier }; } function stringLiteralCompletionsFromProperties(type) { - return type && { kind: 1 /* Properties */, symbols: type.getApparentProperties(), hasIndexSignature: ts.hasIndexSignature(type) }; + return type && { + kind: 1 /* Properties */, + symbols: type.getApparentProperties().filter(function (prop) { return !ts.isPrivateIdentifierPropertyDeclaration(prop.valueDeclaration); }), + hasIndexSignature: ts.hasIndexSignature(type) + }; } function getStringLiteralTypes(type, uniques) { if (uniques === void 0) { uniques = ts.createMap(); } @@ -108416,7 +110102,7 @@ var ts; return !!(origin.kind & 2 /* SymbolMember */); } function originIsExport(origin) { - return !!(origin.kind & 4 /* Export */); + return !!(origin && origin.kind & 4 /* Export */); } function originIsPromise(origin) { return !!(origin.kind & 8 /* Promise */); @@ -108566,7 +110252,7 @@ var ts; } for (var _b = 0, literals_1 = literals; _b < literals_1.length; _b++) { var literal = literals_1[_b]; - entries.push(createCompletionEntryForLiteral(literal)); + entries.push(createCompletionEntryForLiteral(literal, preferences)); } return { isGlobalCompletion: isInSnippetScope, isMemberCompletion: isMemberCompletionKind(completionKind), isNewIdentifierLocation: isNewIdentifierLocation, entries: entries }; } @@ -108595,16 +110281,18 @@ var ts; name: realName, kind: "warning" /* warning */, kindModifiers: "", - sortText: SortText.JavascriptIdentifiers + sortText: SortText.JavascriptIdentifiers, + isFromUncheckedFile: true }); } }); } - var completionNameForLiteral = function (literal) { - return typeof literal === "object" ? ts.pseudoBigIntToString(literal) + "n" : JSON.stringify(literal); - }; - function createCompletionEntryForLiteral(literal) { - return { name: completionNameForLiteral(literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; + function completionNameForLiteral(literal, preferences) { + return typeof literal === "object" ? ts.pseudoBigIntToString(literal) + "n" : + ts.isString(literal) ? ts.quote(literal, preferences) : JSON.stringify(literal); + } + function createCompletionEntryForLiteral(literal, preferences) { + return { name: completionNameForLiteral(literal, preferences), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; } function createCompletionEntry(symbol, sortText, location, sourceFile, typeChecker, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, preferences) { var insertText; @@ -108613,13 +110301,13 @@ var ts; var useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess; if (origin && originIsThisType(origin)) { insertText = needsConvertPropertyAccess - ? "this" + (insertQuestionDot ? "?." : "") + "[" + ts.quote(name, preferences) + "]" + ? "this" + (insertQuestionDot ? "?." : "") + "[" + quotePropertyName(name, preferences) + "]" : "this" + (insertQuestionDot ? "?." : ".") + name; } // We should only have needsConvertPropertyAccess if there's a property access to convert. But see #21790. // Somehow there was a global with a non-identifier name. Hopefully someone will complain about getting a "foo bar" global completion and provide a repro. else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) { - insertText = useBraces ? needsConvertPropertyAccess ? "[" + ts.quote(name, preferences) + "]" : "[" + name + "]" : name; + insertText = useBraces ? needsConvertPropertyAccess ? "[" + quotePropertyName(name, preferences) + "]" : "[" + name + "]" : name; if (insertQuestionDot || propertyAccessToConvert.questionDotToken) { insertText = "?." + insertText; } @@ -108668,19 +110356,22 @@ var ts; kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol), sortText: sortText, source: getSourceFromOrigin(origin), - hasAction: trueOrUndefined(!!origin && originIsExport(origin)), - isRecommended: trueOrUndefined(isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker)), + hasAction: origin && originIsExport(origin) || undefined, + isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || undefined, insertText: insertText, replacementSpan: replacementSpan, }; } + function quotePropertyName(name, preferences) { + if (/^\d+$/.test(name)) { + return name; + } + return ts.quote(name, preferences); + } function isRecommendedCompletionMatch(localSymbol, recommendedCompletion, checker) { return localSymbol === recommendedCompletion || !!(localSymbol.flags & 1048576 /* ExportValue */) && checker.getExportSymbolOfSymbol(localSymbol) === recommendedCompletion; } - function trueOrUndefined(b) { - return b ? true : undefined; - } function getSourceFromOrigin(origin) { return origin && originIsExport(origin) ? ts.stripQuotes(origin.moduleSymbol.name) : undefined; } @@ -108746,7 +110437,7 @@ var ts; } return entries; } - function getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host) { + function getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences) { var compilerOptions = program.getCompilerOptions(); var completionData = getCompletionData(program, log, sourceFile, isUncheckedFile(sourceFile, compilerOptions), position, { includeCompletionsForModuleExports: true, includeCompletionsWithInsertText: true }, entryId, host); if (!completionData) { @@ -108755,8 +110446,8 @@ var ts; if (completionData.kind !== 0 /* Data */) { return { type: "request", request: completionData }; } - var symbols = completionData.symbols, literals = completionData.literals, location = completionData.location, completionKind = completionData.completionKind, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, previousToken = completionData.previousToken, isJsxInitializer = completionData.isJsxInitializer; - var literal = ts.find(literals, function (l) { return completionNameForLiteral(l) === entryId.name; }); + var symbols = completionData.symbols, literals = completionData.literals, location = completionData.location, completionKind = completionData.completionKind, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, previousToken = completionData.previousToken, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation; + var literal = ts.find(literals, function (l) { return completionNameForLiteral(l, preferences) === entryId.name; }); if (literal !== undefined) return { type: "literal", literal: literal }; // Find the symbol with the matching entry name. @@ -108767,18 +110458,10 @@ var ts; var origin = symbolToOriginInfoMap[ts.getSymbolId(symbol)]; var info = getCompletionEntryDisplayNameForSymbol(symbol, compilerOptions.target, origin, completionKind); return info && info.name === entryId.name && getSourceFromOrigin(origin) === entryId.source - ? { type: "symbol", symbol: symbol, location: location, symbolToOriginInfoMap: symbolToOriginInfoMap, previousToken: previousToken, isJsxInitializer: isJsxInitializer } + ? { type: "symbol", symbol: symbol, location: location, symbolToOriginInfoMap: symbolToOriginInfoMap, previousToken: previousToken, isJsxInitializer: isJsxInitializer, isTypeOnlyLocation: isTypeOnlyLocation } : undefined; }) || { type: "none" }; } - function getSymbolName(symbol, origin, target) { - return origin && originIsExport(origin) && ((origin.isDefaultExport && symbol.escapedName === "default" /* Default */) || - (symbol.escapedName === "export=" /* ExportEquals */)) - // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. - ? ts.firstDefined(symbol.declarations, function (d) { return ts.isExportAssignment(d) && ts.isIdentifier(d.expression) ? d.expression.text : undefined; }) - || ts.codefix.moduleSymbolToValidIdentifier(origin.moduleSymbol, target) - : symbol.name; - } function getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) { var typeChecker = program.getTypeChecker(); var compilerOptions = program.getCompilerOptions(); @@ -108788,7 +110471,7 @@ var ts; return Completions.StringCompletions.getStringLiteralCompletionDetails(name, sourceFile, position, contextToken, typeChecker, compilerOptions, host, cancellationToken); } // Compute all the completion symbols again. - var symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host); + var symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); switch (symbolCompletion.type) { case "request": { var request = symbolCompletion.request; @@ -108810,7 +110493,7 @@ var ts; } case "literal": { var literal = symbolCompletion.literal; - return createSimpleDetails(completionNameForLiteral(literal), "string" /* string */, typeof literal === "string" ? ts.SymbolDisplayPartKind.stringLiteral : ts.SymbolDisplayPartKind.numericLiteral); + return createSimpleDetails(completionNameForLiteral(literal, preferences), "string" /* string */, typeof literal === "string" ? ts.SymbolDisplayPartKind.stringLiteral : ts.SymbolDisplayPartKind.numericLiteral); } case "none": // Didn't find a symbol with this name. See if we can find a keyword instead. @@ -108841,11 +110524,11 @@ var ts; } var moduleSymbol = symbolOriginInfo.moduleSymbol; var exportedSymbol = checker.getMergedSymbol(ts.skipAlias(symbol.exportSymbol || symbol, checker)); - var _a = ts.codefix.getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, getSymbolName(symbol, symbolOriginInfo, compilerOptions.target), host, program, formatContext, previousToken && ts.isIdentifier(previousToken) ? previousToken.getStart(sourceFile) : position, preferences), moduleSpecifier = _a.moduleSpecifier, codeAction = _a.codeAction; + var _a = ts.codefix.getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, ts.getNameForExportedSymbol(symbol, compilerOptions.target), host, program, formatContext, previousToken && ts.isIdentifier(previousToken) ? previousToken.getStart(sourceFile) : position, preferences), moduleSpecifier = _a.moduleSpecifier, codeAction = _a.codeAction; return { sourceDisplay: [ts.textPart(moduleSpecifier)], codeActions: [codeAction] }; } - function getCompletionEntrySymbol(program, log, sourceFile, position, entryId, host) { - var completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host); + function getCompletionEntrySymbol(program, log, sourceFile, position, entryId, host, preferences) { + var completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); return completion.type === "symbol" ? completion.symbol : undefined; } Completions.getCompletionEntrySymbol = getCompletionEntrySymbol; @@ -108970,7 +110653,7 @@ var ts; currentToken = ts.getTokenAtPosition(sourceFile, position); if (!currentToken || (!ts.isDeclarationName(currentToken) && - (currentToken.parent.kind !== 322 /* JSDocPropertyTag */ || + (currentToken.parent.kind !== 323 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken))) { // Use as type location if inside tag's type expression insideJsDocTagTypeExpression = isCurrentlyEditingNode(tag.typeExpression); @@ -109120,11 +110803,13 @@ var ts; var symbolToOriginInfoMap = []; var symbolToSortTextMap = []; var importSuggestionsCache = host.getImportSuggestionsCache && host.getImportSuggestionsCache(); + var isTypeOnly = isTypeOnlyCompletion(); if (isRightOfDot || isRightOfQuestionDot) { getTypeScriptMemberSymbols(); } else if (isRightOfOpenTag) { - var tagSymbols = ts.Debug.assertEachDefined(typeChecker.getJsxIntrinsicTagNamesAt(location), "getJsxIntrinsicTagNames() should all be defined"); + var tagSymbols = typeChecker.getJsxIntrinsicTagNamesAt(location); + ts.Debug.assertEachIsDefined(tagSymbols, "getJsxIntrinsicTagNames() should all be defined"); tryGetGlobalSymbols(); symbols = tagSymbols.concat(symbols); completionKind = 3 /* MemberLike */; @@ -109166,15 +110851,16 @@ var ts; previousToken: previousToken, isJsxInitializer: isJsxInitializer, insideJsDocTagTypeExpression: insideJsDocTagTypeExpression, - symbolToSortTextMap: symbolToSortTextMap + symbolToSortTextMap: symbolToSortTextMap, + isTypeOnlyLocation: isTypeOnly }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 321 /* JSDocTypedefTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 322 /* JSDocTypedefTag */: return true; default: return false; @@ -109199,7 +110885,8 @@ var ts; symbol = ts.skipAlias(symbol, typeChecker); if (symbol.flags & (1536 /* Module */ | 384 /* Enum */)) { // Extract module or enum members - var exportedSymbols = ts.Debug.assertEachDefined(typeChecker.getExportsOfModule(symbol), "getExportsOfModule() should all be defined"); + var exportedSymbols = typeChecker.getExportsOfModule(symbol); + ts.Debug.assertEachIsDefined(exportedSymbols, "getExportsOfModule() should all be defined"); var isValidValueAccess_1 = function (symbol) { return typeChecker.isValidPropertyAccess(isImportType ? node : (node.parent), symbol.name); }; var isValidTypeAccess_1 = function (symbol) { return symbolCanBeReferencedAtTypeLocation(symbol); }; var isValidAccess = isNamespaceName @@ -109365,8 +111052,8 @@ var ts; var attrsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes); if (!attrsType) return 0 /* Continue */; - var baseType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* BaseConstraint */); - symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, baseType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties); + var completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* Completions */); + symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties); setSortTextToOptionalMember(); completionKind = 3 /* MemberLike */; isNewIdentifierLocation = false; @@ -109410,9 +111097,9 @@ var ts; position; var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; isInSnippetScope = isSnippetScope(scopeNode); - var isTypeOnly = isTypeOnlyCompletion(); var symbolMeanings = (isTypeOnly ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */; - symbols = ts.Debug.assertEachDefined(typeChecker.getSymbolsInScope(scopeNode, symbolMeanings), "getSymbolsInScope() should all be defined"); + symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings); + ts.Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined"); for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) { var symbol = symbols_2[_i]; if (!typeChecker.isArgumentsSymbol(symbol) && @@ -109693,7 +111380,7 @@ var ts; var origin = { kind: 4 /* Export */, moduleSymbol: moduleSymbol, isDefaultExport: isDefaultExport }; results.push({ symbol: symbol, - symbolName: getSymbolName(symbol, origin, target), + symbolName: ts.getNameForExportedSymbol(symbol, target), origin: origin, skipFilter: skipFilter, }); @@ -109836,11 +111523,11 @@ var ts; var existingMembers; if (objectLikeContainer.kind === 193 /* ObjectLiteralExpression */) { var instantiatedType = typeChecker.getContextualType(objectLikeContainer); - var baseType = instantiatedType && typeChecker.getContextualType(objectLikeContainer, 4 /* BaseConstraint */); - if (!instantiatedType || !baseType) + var completionsType = instantiatedType && typeChecker.getContextualType(objectLikeContainer, 4 /* Completions */); + if (!instantiatedType || !completionsType) return 2 /* Fail */; - isNewIdentifierLocation = ts.hasIndexSignature(instantiatedType || baseType); - typeMembers = getPropertiesForObjectExpression(instantiatedType, baseType, objectLikeContainer, typeChecker); + isNewIdentifierLocation = ts.hasIndexSignature(instantiatedType || completionsType); + typeMembers = getPropertiesForObjectExpression(instantiatedType, completionsType, objectLikeContainer, typeChecker); existingMembers = objectLikeContainer.properties; } else { @@ -109882,7 +111569,7 @@ var ts; } if (typeMembers && typeMembers.length > 0) { // Add filtered items to the completion list - symbols = filterObjectMembersList(typeMembers, ts.Debug.assertDefined(existingMembers)); + symbols = filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers)); } setSortTextToOptionalMember(); return 1 /* Success */; @@ -110363,7 +112050,7 @@ var ts; } } function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind) { - var name = getSymbolName(symbol, origin, target); + var name = originIsExport(origin) ? ts.getNameForExportedSymbol(symbol, target) : symbol.name; if (name === undefined // If the symbol is external module, don't show it in the completion list // (i.e declare module "http" { const x; } | // <= request completion here, "http" should not be there) @@ -110427,6 +112114,7 @@ var ts; || kind === 135 /* ModuleKeyword */ || kind === 145 /* TypeKeyword */ || kind === 136 /* NamespaceKeyword */ + || kind === 123 /* AsKeyword */ || ts.isTypeKeyword(kind) && kind !== 146 /* UndefinedKeyword */; case 5 /* FunctionLikeBodyKeywords */: return isFunctionLikeBodyKeyword(kind); @@ -110488,6 +112176,7 @@ var ts; case 131 /* GetKeyword */: case 142 /* SetKeyword */: case 126 /* AsyncKeyword */: + case 130 /* DeclareKeyword */: return true; default: return ts.isClassMemberModifier(kind); @@ -110506,10 +112195,10 @@ var ts; var jsdoc = ts.findAncestor(node, ts.isJSDoc); return jsdoc && jsdoc.tags && (ts.rangeContainsPosition(jsdoc, position) ? ts.findLast(jsdoc.tags, function (tag) { return tag.pos < position; }) : undefined); } - function getPropertiesForObjectExpression(contextualType, baseConstrainedType, obj, checker) { - var hasBaseType = baseConstrainedType && baseConstrainedType !== contextualType; - var type = hasBaseType && !(baseConstrainedType.flags & 3 /* AnyOrUnknown */) - ? checker.getUnionType([contextualType, baseConstrainedType]) + function getPropertiesForObjectExpression(contextualType, completionsType, obj, checker) { + var hasCompletionsType = completionsType && completionsType !== contextualType; + var type = hasCompletionsType && !(completionsType.flags & 3 /* AnyOrUnknown */) + ? checker.getUnionType([contextualType, completionsType]) : contextualType; var properties = type.isUnion() ? checker.getAllPossiblePropertiesOfTypes(type.types.filter(function (memberType) { @@ -110520,7 +112209,7 @@ var ts; checker.isTypeInvalidDueToUnionDiscriminant(memberType, obj)); })) : type.getApparentProperties(); - return hasBaseType ? properties.filter(hasDeclarationOtherThanSelf) : properties; + return hasCompletionsType ? properties.filter(hasDeclarationOtherThanSelf) : properties; // Filter out members whose only declaration is the object literal itself to avoid // self-fulfilling completions like: // @@ -110536,8 +112225,8 @@ var ts; */ function getPropertiesForCompletion(type, checker) { return type.isUnion() - ? ts.Debug.assertEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") - : ts.Debug.assertEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); + ? ts.Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") + : ts.Debug.checkEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); } /** * Returns the immediate owning class declaration of a context token, @@ -110546,7 +112235,7 @@ var ts; function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { // class c { method() { } | method2() { } } switch (location.kind) { - case 323 /* SyntaxList */: + case 324 /* SyntaxList */: return ts.tryCast(location.parent, ts.isObjectTypeDeclaration); case 1 /* EndOfFileToken */: var cls = ts.tryCast(ts.lastOrUndefined(ts.cast(location.parent, ts.isSourceFile).statements), ts.isObjectTypeDeclaration); @@ -110600,6 +112289,8 @@ var ts; case "`": // Only automatically bring up completions if this is an opening quote. return !!contextToken && ts.isStringLiteralOrTemplate(contextToken) && position === contextToken.getStart(sourceFile) + 1; + case "#": + return !!contextToken && ts.isPrivateIdentifier(contextToken) && !!ts.getContainingClass(contextToken); case "<": // Opening JSX tag return !!contextToken && contextToken.kind === 29 /* LessThanToken */ && (!ts.isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent)); @@ -111163,7 +112854,7 @@ var ts; return releaseDocumentWithKey(path, key); } function releaseDocumentWithKey(path, key) { - var bucket = ts.Debug.assertDefined(buckets.get(key)); + var bucket = ts.Debug.checkDefined(buckets.get(key)); var entry = bucket.get(path); entry.languageServiceRefCount--; ts.Debug.assert(entry.languageServiceRefCount >= 0); @@ -111629,7 +113320,7 @@ var ts; } function getExportAssignmentExport(ex) { // Get the symbol for the `export =` node; its parent is the module it's the export of. - var exportingModuleSymbol = ts.Debug.assertDefined(ex.symbol.parent, "Expected export symbol to have a parent"); + var exportingModuleSymbol = ts.Debug.checkDefined(ex.symbol.parent, "Expected export symbol to have a parent"); var exportKind = ex.isExportEquals ? 2 /* ExportEquals */ : 1 /* Default */; return { kind: 1 /* Export */, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: exportKind } }; } @@ -111645,11 +113336,7 @@ var ts; default: return undefined; } - var sym = useLhsSymbol ? checker.getSymbolAtLocation(ts.cast(node.left, ts.isPropertyAccessExpression).name) : symbol; - // Better detection for GH#20803 - if (sym && !(checker.getMergedSymbol(sym.parent).flags & 1536 /* Module */)) { - ts.Debug.fail("Special property assignment kind does not have a module as its parent. Assignment is " + ts.Debug.formatSymbol(sym) + ", parent is " + ts.Debug.formatSymbol(sym.parent)); - } + var sym = useLhsSymbol ? checker.getSymbolAtLocation(ts.getNameOfAccessExpression(ts.cast(node.left, ts.isAccessExpression))) : symbol; return sym && exportInfo(sym, kind); } } @@ -111687,17 +113374,17 @@ var ts; FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol; function getExportEqualsLocalSymbol(importedSymbol, checker) { if (importedSymbol.flags & 2097152 /* Alias */) { - return ts.Debug.assertDefined(checker.getImmediateAliasedSymbol(importedSymbol)); + return ts.Debug.checkDefined(checker.getImmediateAliasedSymbol(importedSymbol)); } var decl = importedSymbol.valueDeclaration; if (ts.isExportAssignment(decl)) { // `export = class {}` - return ts.Debug.assertDefined(decl.expression.symbol); + return ts.Debug.checkDefined(decl.expression.symbol); } else if (ts.isBinaryExpression(decl)) { // `module.exports = class {}` - return ts.Debug.assertDefined(decl.right.symbol); + return ts.Debug.checkDefined(decl.right.symbol); } else if (ts.isSourceFile(decl)) { // json module - return ts.Debug.assertDefined(decl.symbol); + return ts.Debug.checkDefined(decl.symbol); } return ts.Debug.fail(); } @@ -111921,9 +113608,26 @@ var ts; undefined; } FindAllReferences.toContextSpan = toContextSpan; + var FindReferencesUse; + (function (FindReferencesUse) { + /** + * When searching for references to a symbol, the location will not be adjusted (this is the default behavior when not specified). + */ + FindReferencesUse[FindReferencesUse["Other"] = 0] = "Other"; + /** + * When searching for references to a symbol, the location will be adjusted if the cursor was on a keyword. + */ + FindReferencesUse[FindReferencesUse["References"] = 1] = "References"; + /** + * When searching for references to a symbol, the location will be adjusted if the cursor was on a keyword. + * Unlike `References`, the location will only be adjusted keyword belonged to a declaration with a valid name. + * If set, we will find fewer references -- if it is referenced by several different names, we still only find references for the original name. + */ + FindReferencesUse[FindReferencesUse["Rename"] = 2] = "Rename"; + })(FindReferencesUse = FindAllReferences.FindReferencesUse || (FindAllReferences.FindReferencesUse = {})); function findReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position) { var node = ts.getTouchingPropertyName(sourceFile, position); - var referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken); + var referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, { use: 1 /* References */ }); var checker = program.getTypeChecker(); return !referencedSymbols || !referencedSymbols.length ? undefined : ts.mapDefined(referencedSymbols, function (_a) { var definition = _a.definition, references = _a.references; @@ -111962,7 +113666,7 @@ var ts; } else { // Perform "Find all References" and retrieve only those that are implementations - return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true }); + return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true, use: 1 /* References */ }); } } function findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, convertEntry) { @@ -112061,7 +113765,7 @@ var ts; var node = entry.node, kind = entry.kind; var name = originalNode.text; var isShorthandAssignment = ts.isShorthandPropertyAssignment(node.parent); - if (isShorthandAssignment || ts.isObjectBindingElementWithoutPropertyName(node.parent)) { + if (isShorthandAssignment || ts.isObjectBindingElementWithoutPropertyName(node.parent) && node.parent.name === node) { var prefixColon = { prefixText: name + ": " }; var suffixColon = { suffixText: ": " + name }; return kind === 3 /* SearchedLocalFoundProperty */ ? prefixColon @@ -112178,12 +113882,13 @@ var ts; case 253 /* ImportEqualsDeclaration */: case 258 /* ImportSpecifier */: case 246 /* InterfaceDeclaration */: - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: case 273 /* JsxAttribute */: case 249 /* ModuleDeclaration */: case 252 /* NamespaceExportDeclaration */: case 256 /* NamespaceImport */: + case 262 /* NamespaceExport */: case 156 /* Parameter */: case 282 /* ShorthandPropertyAssignment */: case 247 /* TypeAliasDeclaration */: @@ -112204,8 +113909,8 @@ var ts; return !!decl.initializer || ts.isCatchClause(decl.parent); case 160 /* MethodSignature */: case 158 /* PropertySignature */: - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: return false; default: return ts.Debug.failBadSyntaxKind(decl); @@ -112218,6 +113923,12 @@ var ts; function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options, sourceFilesSet) { if (options === void 0) { options = {}; } if (sourceFilesSet === void 0) { sourceFilesSet = ts.arrayToSet(sourceFiles, function (f) { return f.fileName; }); } + if (options.use === 1 /* References */) { + node = ts.getAdjustedReferenceLocation(node); + } + else if (options.use === 2 /* Rename */) { + node = ts.getAdjustedRenameLocation(node); + } if (ts.isSourceFile(node)) { var reference = ts.GoToDefinition.getReferenceAtPosition(node, position, program); var moduleSymbol = reference && program.getTypeChecker().getMergedSymbol(reference.file.symbol); @@ -112380,7 +114091,7 @@ var ts; if (sourceFilesSet.has(sourceFile.fileName)) { // At `module.exports = ...`, reference node is `module` var node = ts.isBinaryExpression(decl) && ts.isPropertyAccessExpression(decl.left) ? decl.left.expression : - ts.isExportAssignment(decl) ? ts.Debug.assertDefined(ts.findChildOfKind(decl, 89 /* ExportKeyword */, sourceFile)) : + ts.isExportAssignment(decl) ? ts.Debug.checkDefined(ts.findChildOfKind(decl, 89 /* ExportKeyword */, sourceFile)) : ts.getNameOfDeclaration(decl) || decl; references.push(nodeEntry(node)); } @@ -112397,6 +114108,10 @@ var ts; /** getReferencedSymbols for special node kinds. */ function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) { if (ts.isTypeKeyword(node.kind)) { + // A void expression (i.e., `void foo()`) is not special, but the `void` type is. + if (node.kind === 110 /* VoidKeyword */ && ts.isVoidExpression(node.parent)) { + return undefined; + } // A modifier readonly (like on a property declaration) is not special; // a readonly type keyword (like `readonly string[]`) is. if (node.kind === 138 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { @@ -112439,10 +114154,10 @@ var ts; } else if (node && node.kind === 84 /* DefaultKeyword */) { addReference(node, symbol, state); - searchForImportsOfExport(node, symbol, { exportingModuleSymbol: ts.Debug.assertDefined(symbol.parent, "Expected export symbol to have a parent"), exportKind: 1 /* Default */ }, state); + searchForImportsOfExport(node, symbol, { exportingModuleSymbol: ts.Debug.checkDefined(symbol.parent, "Expected export symbol to have a parent"), exportKind: 1 /* Default */ }, state); } else { - var search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, !!options.isForRename, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] }); + var search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, options.use === 2 /* Rename */, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] }); getReferencesInContainerOrFiles(symbol, state, search); } return result; @@ -112556,7 +114271,7 @@ var ts; State.prototype.getImportSearches = function (exportSymbol, exportInfo) { if (!this.importTracker) this.importTracker = FindAllReferences.createImportTracker(this.sourceFiles, this.sourceFilesSet, this.checker, this.cancellationToken); - return this.importTracker(exportSymbol, exportInfo, !!this.options.isForRename); + return this.importTracker(exportSymbol, exportInfo, this.options.use === 2 /* Rename */); }; /** @param allSearchSymbols set of additional symbols for use by `includes`. */ State.prototype.createSearch = function (location, symbol, comingFrom, searchOptions) { @@ -112628,7 +114343,7 @@ var ts; break; case 1 /* Default */: // Search for a property access to '.default'. This can't be renamed. - indirectSearch = state.options.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" }); + indirectSearch = state.options.use === 2 /* Rename */ ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" }); break; case 2 /* ExportEquals */: break; @@ -112663,7 +114378,7 @@ var ts; function shouldAddSingleReference(singleRef, state) { if (!hasMatchingMeaning(singleRef, state)) return false; - if (!state.options.isForRename) + if (state.options.use !== 2 /* Rename */) return true; // Don't rename an import type `import("./module-name")` when renaming `name` in `export = name;` if (!ts.isIdentifier(singleRef)) @@ -112786,7 +114501,7 @@ var ts; function eachSignatureCall(signature, sourceFiles, checker, cb) { if (!signature.name || !ts.isIdentifier(signature.name)) return; - var symbol = ts.Debug.assertDefined(checker.getSymbolAtLocation(signature.name)); + var symbol = ts.Debug.checkDefined(checker.getSymbolAtLocation(signature.name)); for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) { var sourceFile = sourceFiles_3[_i]; for (var _a = 0, _b = getPossibleSymbolReferenceNodes(sourceFile, symbol.name); _a < _b.length; _a++) { @@ -112962,7 +114677,7 @@ var ts; } if (!propertyName) { // Don't rename at `export { default } from "m";`. (but do continue to search for imports of the re-export) - if (!(state.options.isForRename && (name.escapedText === "default" /* Default */))) { + if (!(state.options.use === 2 /* Rename */ && (name.escapedText === "default" /* Default */))) { addRef(); } } @@ -112972,8 +114687,8 @@ var ts; if (!exportDeclaration.moduleSpecifier) { addRef(); } - if (addReferencesHere && !state.options.isForRename && state.markSeenReExportRHS(name)) { - addReference(name, ts.Debug.assertDefined(exportSpecifier.symbol), state); + if (addReferencesHere && state.options.use !== 2 /* Rename */ && state.markSeenReExportRHS(name)) { + addReference(name, ts.Debug.checkDefined(exportSpecifier.symbol), state); } } else { @@ -112986,7 +114701,7 @@ var ts; var isDefaultExport = referenceLocation.originalKeywordKind === 84 /* DefaultKeyword */ || exportSpecifier.name.originalKeywordKind === 84 /* DefaultKeyword */; var exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */; - var exportSymbol = ts.Debug.assertDefined(exportSpecifier.symbol); + var exportSymbol = ts.Debug.checkDefined(exportSpecifier.symbol); var exportInfo = FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker); if (exportInfo) { searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); @@ -113081,7 +114796,7 @@ var ts; function addClassStaticThisReferences(referenceLocation, search, state) { addReference(referenceLocation, search.symbol, state); var classLike = referenceLocation.parent; - if (state.options.isForRename || !ts.isClassLike(classLike)) + if (state.options.use === 2 /* Rename */ || !ts.isClassLike(classLike)) return; ts.Debug.assert(classLike.name === referenceLocation); var addRef = state.referenceAdder(search.symbol); @@ -113445,11 +115160,13 @@ var ts; return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); } var exportSpecifier = ts.getDeclarationOfKind(symbol, 263 /* ExportSpecifier */); - var localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); - if (localSymbol) { - var res_3 = cbSymbol(localSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, 1 /* Node */); - if (res_3) - return res_3; + if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { + var localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); + if (localSymbol) { + var res_3 = cbSymbol(localSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, 1 /* Node */); + if (res_3) + return res_3; + } } // symbolAtLocation for a binding element is the local symbol. See if the search symbol is the property. // Don't do this when populating search set for a rename when prefix and suffix text will be provided -- just rename the local. @@ -113496,7 +115213,7 @@ var ts; function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) { var checker = state.checker; return forEachRelatedSymbol(referenceSymbol, referenceLocation, checker, /*isForRenamePopulateSearchSymbolSet*/ false, - /*onlyIncludeBindingElementAtReferenceLocation*/ !state.options.isForRename || !!state.options.providePrefixAndSuffixTextForRename, function (sym, rootSymbol, baseSymbol, kind) { return search.includes(baseSymbol || rootSymbol || sym) + /*onlyIncludeBindingElementAtReferenceLocation*/ state.options.use !== 2 /* Rename */ || !!state.options.providePrefixAndSuffixTextForRename, function (sym, rootSymbol, baseSymbol, kind) { return search.includes(baseSymbol || rootSymbol || sym) // For a base type, use the symbol for the derived type. For a synthetic (e.g. union) property, use the union symbol. ? { symbol: rootSymbol && !(ts.getCheckFlags(sym) & 6 /* Synthetic */) ? rootSymbol : sym, kind: kind } : undefined; }, @@ -113582,7 +115299,7 @@ var ts; return res.length === 0 ? undefined : res; } function isForRenameWithPrefixAndSuffixText(options) { - return options.isForRename && options.providePrefixAndSuffixTextForRename; + return options.use === 2 /* Rename */ && options.providePrefixAndSuffixTextForRename; } })(Core = FindAllReferences.Core || (FindAllReferences.Core = {})); })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {})); @@ -113646,7 +115363,7 @@ var ts; return node.name; if (isConstNamedExpression(node)) return node.parent.name; - return ts.Debug.assertDefined(node.modifiers && ts.find(node.modifiers, isDefaultModifier)); + return ts.Debug.checkDefined(node.modifiers && ts.find(node.modifiers, isDefaultModifier)); } function isDefaultModifier(node) { return node.kind === 84 /* DefaultKeyword */; @@ -113668,7 +115385,7 @@ var ts; } } var declName = isConstNamedExpression(node) ? node.parent.name : - ts.Debug.assertDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); + ts.Debug.checkDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); var text = ts.isIdentifier(declName) ? ts.idText(declName) : ts.isStringOrNumericLiteralLike(declName) ? declName.text : ts.isComputedPropertyName(declName) ? @@ -113807,16 +115524,18 @@ var ts; function isDefined(x) { return x !== undefined; } - function convertEntryToCallSite(entry, _originalNode, typeChecker) { + function convertEntryToCallSite(entry) { if (entry.kind === 1 /* Node */) { - if (ts.isCallOrNewExpressionTarget(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isTaggedTemplateTag(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isDecoratorTarget(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isJsxOpeningLikeElementTagName(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isRightSideOfPropertyAccess(entry.node) - || ts.isArgumentExpressionOfElementAccess(entry.node)) { - var ancestor = ts.findAncestor(entry.node, isValidCallHierarchyDeclaration) || entry.node.getSourceFile(); - return { declaration: ts.firstOrOnly(findImplementationOrAllInitialDeclarations(typeChecker, ancestor)), range: ts.createTextRangeFromNode(entry.node, entry.node.getSourceFile()) }; + var node = entry.node; + if (ts.isCallOrNewExpressionTarget(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isTaggedTemplateTag(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isDecoratorTarget(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isJsxOpeningLikeElementTagName(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isRightSideOfPropertyAccess(node) + || ts.isArgumentExpressionOfElementAccess(node)) { + var sourceFile = node.getSourceFile(); + var ancestor = ts.findAncestor(node, isValidCallHierarchyDeclaration) || sourceFile; + return { declaration: ancestor, range: ts.createTextRangeFromNode(node, sourceFile) }; } } } @@ -113836,7 +115555,7 @@ var ts; return []; } var location = getCallHierarchyDeclarationReferenceNode(declaration); - var calls = ts.filter(ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, program.getSourceFiles(), location, /*position*/ 0, /*options*/ undefined, convertEntryToCallSite), isDefined); + var calls = ts.filter(ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, program.getSourceFiles(), location, /*position*/ 0, { use: 1 /* References */ }, convertEntryToCallSite), isDefined); return calls ? ts.group(calls, getCallSiteGroupKey, function (entries) { return convertCallSiteGroupToIncomingCall(program, entries); }) : []; } CallHierarchy.getIncomingCalls = getIncomingCalls; @@ -114073,8 +115792,8 @@ var ts; var includes = ts.mapDefined(property.initializer.elements, function (e) { return ts.isStringLiteral(e) ? e.text : undefined; }); var matchers = ts.getFileMatcherPatterns(configDir, /*excludes*/ [], includes, useCaseSensitiveFileNames, currentDirectory); // If there isn't some include for this, add a new one. - if (ts.getRegexFromPattern(ts.Debug.assertDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && - !ts.getRegexFromPattern(ts.Debug.assertDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { + if (ts.getRegexFromPattern(ts.Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && + !ts.getRegexFromPattern(ts.Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { changeTracker.insertNodeAfter(configFile, ts.last(property.initializer.elements), ts.createStringLiteral(relativePath(newFileOrDirPath))); } } @@ -114436,6 +116155,15 @@ var ts; return aliased; } } + if (symbol && ts.isInJSFile(node)) { + var requireCall = ts.forEach(symbol.declarations, function (d) { return ts.isVariableDeclaration(d) && !!d.initializer && ts.isRequireCall(d.initializer, /*checkArgumentIsStringLiteralLike*/ true) ? d.initializer : undefined; }); + if (requireCall) { + var moduleSymbol = checker.getSymbolAtLocation(requireCall.arguments[0]); + if (moduleSymbol) { + return checker.resolveExternalModuleSymbol(moduleSymbol); + } + } + } return symbol; } // Go to the original declaration for cases: @@ -114662,11 +116390,11 @@ var ts; JsDoc.getJsDocCommentsFromDeclarations = getJsDocCommentsFromDeclarations; function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return [declaration]; - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return ts.getJSDocCommentsAndTags(declaration); @@ -114687,16 +116415,18 @@ var ts; function getCommentText(tag) { var comment = tag.comment; switch (tag.kind) { + case 308 /* JSDocImplementsTag */: + return withNode(tag.class); case 307 /* JSDocAugmentsTag */: return withNode(tag.class); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return withList(tag.typeParameters); - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: return withNode(tag.typeExpression); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: var name = tag.name; return name ? withNode(name) : comment; default: @@ -114904,6 +116634,11 @@ var ts; var parameters_2 = ts.isFunctionLike(be.right) ? be.right.parameters : ts.emptyArray; return { commentOwner: commentOwner, parameters: parameters_2 }; } + case 159 /* PropertyDeclaration */: + var init = commentOwner.initializer; + if (init && (ts.isFunctionExpression(init) || ts.isArrowFunction(init))) { + return { commentOwner: commentOwner, parameters: init.parameters }; + } } } /** @@ -115074,7 +116809,7 @@ var ts; var whiteSpaceRegex = /\s+/g; /** * Maximum amount of characters to return - * The amount was choosen arbitrarily. + * The amount was chosen arbitrarily. */ var maxLength = 150; // Keep sourceFile handy so we don't have to search for it every time we need to call `getText`. @@ -115329,6 +117064,7 @@ var ts; case 249 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; + case 259 /* ExportAssignment */: case 263 /* ExportSpecifier */: case 253 /* ImportEqualsDeclaration */: case 167 /* IndexSignature */: @@ -115666,6 +117402,8 @@ var ts; return ts.isExternalModule(sourceFile) ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\"" : ""; + case 259 /* ExportAssignment */: + return ts.isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; case 202 /* ArrowFunction */: case 244 /* FunctionDeclaration */: case 201 /* FunctionExpression */: @@ -115724,8 +117462,8 @@ var ts; case 249 /* ModuleDeclaration */: case 290 /* SourceFile */: case 247 /* TypeAliasDeclaration */: - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: return true; case 202 /* ArrowFunction */: case 244 /* FunctionDeclaration */: @@ -116043,100 +117781,114 @@ var ts; * @param importGroup a list of ImportDeclarations, all with the same module name. */ function coalesceImports(importGroup) { + var _a; if (importGroup.length === 0) { return importGroup; } - var _a = getCategorizedImports(importGroup), importWithoutClause = _a.importWithoutClause, defaultImports = _a.defaultImports, namespaceImports = _a.namespaceImports, namedImports = _a.namedImports; + var _b = getCategorizedImports(importGroup), importWithoutClause = _b.importWithoutClause, typeOnlyImports = _b.typeOnlyImports, regularImports = _b.regularImports; var coalescedImports = []; if (importWithoutClause) { coalescedImports.push(importWithoutClause); } - // Normally, we don't combine default and namespace imports, but it would be silly to - // produce two import declarations in this special case. - if (defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) { - // Add the namespace import to the existing default ImportDeclaration. - var defaultImport = defaultImports[0]; - coalescedImports.push(updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)); // TODO: GH#18217 - return coalescedImports; - } - var sortedNamespaceImports = ts.stableSort(namespaceImports, function (i1, i2) { - return compareIdentifiers(i1.importClause.namedBindings.name, i2.importClause.namedBindings.name); - }); // TODO: GH#18217 - for (var _i = 0, sortedNamespaceImports_1 = sortedNamespaceImports; _i < sortedNamespaceImports_1.length; _i++) { - var namespaceImport = sortedNamespaceImports_1[_i]; - // Drop the name, if any - coalescedImports.push(updateImportDeclarationAndClause(namespaceImport, /*name*/ undefined, namespaceImport.importClause.namedBindings)); // TODO: GH#18217 - } - if (defaultImports.length === 0 && namedImports.length === 0) { - return coalescedImports; - } - var newDefaultImport; - var newImportSpecifiers = []; - if (defaultImports.length === 1) { - newDefaultImport = defaultImports[0].importClause.name; + for (var _i = 0, _c = [regularImports, typeOnlyImports]; _i < _c.length; _i++) { + var group_2 = _c[_i]; + var isTypeOnly = group_2 === typeOnlyImports; + var defaultImports = group_2.defaultImports, namespaceImports = group_2.namespaceImports, namedImports = group_2.namedImports; + // Normally, we don't combine default and namespace imports, but it would be silly to + // produce two import declarations in this special case. + if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) { + // Add the namespace import to the existing default ImportDeclaration. + var defaultImport = defaultImports[0]; + coalescedImports.push(updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)); // TODO: GH#18217 + continue; + } + var sortedNamespaceImports = ts.stableSort(namespaceImports, function (i1, i2) { + return compareIdentifiers(i1.importClause.namedBindings.name, i2.importClause.namedBindings.name); + }); // TODO: GH#18217 + for (var _d = 0, sortedNamespaceImports_1 = sortedNamespaceImports; _d < sortedNamespaceImports_1.length; _d++) { + var namespaceImport = sortedNamespaceImports_1[_d]; + // Drop the name, if any + coalescedImports.push(updateImportDeclarationAndClause(namespaceImport, /*name*/ undefined, namespaceImport.importClause.namedBindings)); // TODO: GH#18217 + } + if (defaultImports.length === 0 && namedImports.length === 0) { + continue; + } + var newDefaultImport = void 0; + var newImportSpecifiers = []; + if (defaultImports.length === 1) { + newDefaultImport = defaultImports[0].importClause.name; + } + else { + for (var _e = 0, defaultImports_1 = defaultImports; _e < defaultImports_1.length; _e++) { + var defaultImport = defaultImports_1[_e]; + newImportSpecifiers.push(ts.createImportSpecifier(ts.createIdentifier("default"), defaultImport.importClause.name)); // TODO: GH#18217 + } + } + newImportSpecifiers.push.apply(newImportSpecifiers, ts.flatMap(namedImports, function (i) { return i.importClause.namedBindings.elements; })); // TODO: GH#18217 + var sortedImportSpecifiers = sortSpecifiers(newImportSpecifiers); + var importDecl = defaultImports.length > 0 + ? defaultImports[0] + : namedImports[0]; + var newNamedImports = sortedImportSpecifiers.length === 0 + ? newDefaultImport + ? undefined + : ts.createNamedImports(ts.emptyArray) + : namedImports.length === 0 + ? ts.createNamedImports(sortedImportSpecifiers) + : ts.updateNamedImports(namedImports[0].importClause.namedBindings, sortedImportSpecifiers); // TODO: GH#18217 + // Type-only imports are not allowed to mix default, namespace, and named imports in any combination. + // We could rewrite a default import as a named import (`import { default as name }`), but we currently + // choose not to as a stylistic preference. + if (isTypeOnly && newDefaultImport && newNamedImports) { + coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, /*namedBindings*/ undefined)); + coalescedImports.push(updateImportDeclarationAndClause((_a = namedImports[0]) !== null && _a !== void 0 ? _a : importDecl, /*name*/ undefined, newNamedImports)); + } + else { + coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)); + } } - else { - for (var _b = 0, defaultImports_1 = defaultImports; _b < defaultImports_1.length; _b++) { - var defaultImport = defaultImports_1[_b]; - newImportSpecifiers.push(ts.createImportSpecifier(ts.createIdentifier("default"), defaultImport.importClause.name)); // TODO: GH#18217 - } - } - newImportSpecifiers.push.apply(newImportSpecifiers, ts.flatMap(namedImports, function (i) { return i.importClause.namedBindings.elements; })); // TODO: GH#18217 - var sortedImportSpecifiers = sortSpecifiers(newImportSpecifiers); - var importDecl = defaultImports.length > 0 - ? defaultImports[0] - : namedImports[0]; - var newNamedImports = sortedImportSpecifiers.length === 0 - ? newDefaultImport - ? undefined - : ts.createNamedImports(ts.emptyArray) - : namedImports.length === 0 - ? ts.createNamedImports(sortedImportSpecifiers) - : ts.updateNamedImports(namedImports[0].importClause.namedBindings, sortedImportSpecifiers); // TODO: GH#18217 - coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)); return coalescedImports; - /* - * Returns entire import declarations because they may already have been rewritten and - * may lack parent pointers. The desired parts can easily be recovered based on the - * categorization. - * - * NB: There may be overlap between `defaultImports` and `namespaceImports`/`namedImports`. - */ - function getCategorizedImports(importGroup) { - var importWithoutClause; - var defaultImports = []; - var namespaceImports = []; - var namedImports = []; - for (var _i = 0, importGroup_1 = importGroup; _i < importGroup_1.length; _i++) { - var importDeclaration = importGroup_1[_i]; - if (importDeclaration.importClause === undefined) { - // Only the first such import is interesting - the others are redundant. - // Note: Unfortunately, we will lose trivia that was on this node. - importWithoutClause = importWithoutClause || importDeclaration; - continue; - } - var _a = importDeclaration.importClause, name = _a.name, namedBindings = _a.namedBindings; - if (name) { - defaultImports.push(importDeclaration); + } + OrganizeImports.coalesceImports = coalesceImports; + /* + * Returns entire import declarations because they may already have been rewritten and + * may lack parent pointers. The desired parts can easily be recovered based on the + * categorization. + * + * NB: There may be overlap between `defaultImports` and `namespaceImports`/`namedImports`. + */ + function getCategorizedImports(importGroup) { + var importWithoutClause; + var typeOnlyImports = { defaultImports: [], namespaceImports: [], namedImports: [] }; + var regularImports = { defaultImports: [], namespaceImports: [], namedImports: [] }; + for (var _i = 0, importGroup_1 = importGroup; _i < importGroup_1.length; _i++) { + var importDeclaration = importGroup_1[_i]; + if (importDeclaration.importClause === undefined) { + // Only the first such import is interesting - the others are redundant. + // Note: Unfortunately, we will lose trivia that was on this node. + importWithoutClause = importWithoutClause || importDeclaration; + continue; + } + var group_3 = importDeclaration.importClause.isTypeOnly ? typeOnlyImports : regularImports; + var _a = importDeclaration.importClause, name = _a.name, namedBindings = _a.namedBindings; + if (name) { + group_3.defaultImports.push(importDeclaration); + } + if (namedBindings) { + if (ts.isNamespaceImport(namedBindings)) { + group_3.namespaceImports.push(importDeclaration); } - if (namedBindings) { - if (ts.isNamespaceImport(namedBindings)) { - namespaceImports.push(importDeclaration); - } - else { - namedImports.push(importDeclaration); - } + else { + group_3.namedImports.push(importDeclaration); } } - return { - importWithoutClause: importWithoutClause, - defaultImports: defaultImports, - namespaceImports: namespaceImports, - namedImports: namedImports, - }; } + return { + importWithoutClause: importWithoutClause, + typeOnlyImports: typeOnlyImports, + regularImports: regularImports, + }; } - OrganizeImports.coalesceImports = coalesceImports; // Internal for testing /** * @param exportGroup a list of ExportDeclarations, all with the same module name. @@ -116145,21 +117897,24 @@ var ts; if (exportGroup.length === 0) { return exportGroup; } - var _a = getCategorizedExports(exportGroup), exportWithoutClause = _a.exportWithoutClause, namedExports = _a.namedExports; + var _a = getCategorizedExports(exportGroup), exportWithoutClause = _a.exportWithoutClause, namedExports = _a.namedExports, typeOnlyExports = _a.typeOnlyExports; var coalescedExports = []; if (exportWithoutClause) { coalescedExports.push(exportWithoutClause); } - if (namedExports.length === 0) { - return coalescedExports; + for (var _i = 0, _b = [namedExports, typeOnlyExports]; _i < _b.length; _i++) { + var exportGroup_1 = _b[_i]; + if (exportGroup_1.length === 0) { + continue; + } + var newExportSpecifiers = []; + newExportSpecifiers.push.apply(newExportSpecifiers, ts.flatMap(exportGroup_1, function (i) { return i.exportClause && ts.isNamedExports(i.exportClause) ? i.exportClause.elements : ts.emptyArray; })); + var sortedExportSpecifiers = sortSpecifiers(newExportSpecifiers); + var exportDecl = exportGroup_1[0]; + coalescedExports.push(ts.updateExportDeclaration(exportDecl, exportDecl.decorators, exportDecl.modifiers, exportDecl.exportClause && (ts.isNamedExports(exportDecl.exportClause) ? + ts.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : + ts.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), exportDecl.moduleSpecifier, exportDecl.isTypeOnly)); } - var newExportSpecifiers = []; - newExportSpecifiers.push.apply(newExportSpecifiers, ts.flatMap(namedExports, function (i) { return i.exportClause && ts.isNamedExports(i.exportClause) ? i.exportClause.elements : ts.emptyArray; })); - var sortedExportSpecifiers = sortSpecifiers(newExportSpecifiers); - var exportDecl = namedExports[0]; - coalescedExports.push(ts.updateExportDeclaration(exportDecl, exportDecl.decorators, exportDecl.modifiers, exportDecl.exportClause && (ts.isNamedExports(exportDecl.exportClause) ? - ts.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : - ts.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), exportDecl.moduleSpecifier, exportDecl.isTypeOnly)); return coalescedExports; /* * Returns entire export declarations because they may already have been rewritten and @@ -116169,13 +117924,17 @@ var ts; function getCategorizedExports(exportGroup) { var exportWithoutClause; var namedExports = []; - for (var _i = 0, exportGroup_1 = exportGroup; _i < exportGroup_1.length; _i++) { - var exportDeclaration = exportGroup_1[_i]; + var typeOnlyExports = []; + for (var _i = 0, exportGroup_2 = exportGroup; _i < exportGroup_2.length; _i++) { + var exportDeclaration = exportGroup_2[_i]; if (exportDeclaration.exportClause === undefined) { // Only the first such export is interesting - the others are redundant. // Note: Unfortunately, we will lose trivia that was on this node. exportWithoutClause = exportWithoutClause || exportDeclaration; } + else if (exportDeclaration.isTypeOnly) { + typeOnlyExports.push(exportDeclaration); + } else { namedExports.push(exportDeclaration); } @@ -116183,6 +117942,7 @@ var ts; return { exportWithoutClause: exportWithoutClause, namedExports: namedExports, + typeOnlyExports: typeOnlyExports, }; } } @@ -116226,7 +117986,8 @@ var ts; function addNodeOutliningSpans(sourceFile, cancellationToken, out) { var depthRemaining = 40; var current = 0; - var statements = sourceFile.statements; + // Includes the EOF Token so that comments which aren't attached to statements are included + var statements = __spreadArrays(sourceFile.statements, [sourceFile.endOfFileToken]); var n = statements.length; while (current < n) { while (current < n && !ts.isAnyImportSyntax(statements[current])) { @@ -116250,7 +118011,7 @@ var ts; if (depthRemaining === 0) return; cancellationToken.throwIfCancellationRequested(); - if (ts.isDeclaration(n)) { + if (ts.isDeclaration(n) || n.kind === 1 /* EndOfFileToken */) { addOutliningForLeadingCommentsForNode(n, sourceFile, cancellationToken, out); } if (isFunctionExpressionAssignedToVariable(n)) { @@ -116391,7 +118152,9 @@ var ts; return spanForNode(n.parent); } else if (tryStatement.finallyBlock === n) { - return spanForNode(ts.findChildOfKind(tryStatement, 92 /* FinallyKeyword */, sourceFile)); + var node = ts.findChildOfKind(tryStatement, 92 /* FinallyKeyword */, sourceFile); + if (node) + return spanForNode(node); } // falls through default: @@ -117284,11 +119047,14 @@ var ts; var Rename; (function (Rename) { function getRenameInfo(program, sourceFile, position, options) { - var node = ts.getTouchingPropertyName(sourceFile, position); - var renameInfo = node && nodeIsEligibleForRename(node) - ? getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, function (declaration) { return program.isSourceFileDefaultLibrary(declaration.getSourceFile()); }, options) - : undefined; - return renameInfo || getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element); + var node = ts.getAdjustedRenameLocation(ts.getTouchingPropertyName(sourceFile, position)); + if (nodeIsEligibleForRename(node)) { + var renameInfo = getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, function (declaration) { return program.isSourceFileDefaultLibrary(declaration.getSourceFile()); }, options); + if (renameInfo) { + return renameInfo; + } + } + return getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element); } Rename.getRenameInfo = getRenameInfo; function getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile, options) { @@ -117368,6 +119134,7 @@ var ts; function nodeIsEligibleForRename(node) { switch (node.kind) { case 75 /* Identifier */: + case 76 /* PrivateIdentifier */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: case 104 /* ThisKeyword */: @@ -117517,7 +119284,7 @@ var ts; // few keystrokes. if (ts.isMappedTypeNode(node)) { var _a = node.getChildren(), openBraceToken = _a[0], children = _a.slice(1); - var closeBraceToken = ts.Debug.assertDefined(children.pop()); + var closeBraceToken = ts.Debug.checkDefined(children.pop()); ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */); ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */); // Group `-/+readonly` and `-/+?` @@ -117636,7 +119403,7 @@ var ts; } function createSyntaxList(children) { ts.Debug.assertGreaterThanOrEqual(children.length, 1); - var syntaxList = ts.createNode(323 /* SyntaxList */, children[0].pos, ts.last(children).end); + var syntaxList = ts.createNode(324 /* SyntaxList */, children[0].pos, ts.last(children).end); syntaxList._children = children; return syntaxList; } @@ -118329,6 +120096,9 @@ var ts; // obviously invalid map return undefined; } + // Dont support sourcemaps that contain inlined sources + if (map.sourcesContent && map.sourcesContent.some(ts.isString)) + return undefined; return ts.createDocumentPositionMapper(host, map, mapFileName); } function createSourceFileLike(text, lineMap) { @@ -118376,23 +120146,8 @@ var ts; return diags.sort(function (d1, d2) { return d1.start - d2.start; }); function check(node) { if (isJsFile) { - switch (node.kind) { - case 201 /* FunctionExpression */: - var decl = ts.getDeclarationOfExpando(node); - if (decl) { - var symbol_1 = decl.symbol; - if (symbol_1 && (symbol_1.exports && symbol_1.exports.size || symbol_1.members && symbol_1.members.size)) { - diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); - break; - } - } - // falls through if no diagnostic was created - case 244 /* FunctionDeclaration */: - var symbol = node.symbol; - if (symbol.members && (symbol.members.size > 0)) { - diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); - } - break; + if (canBeConvertedToClass(node)) { + diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); } } else { @@ -118519,6 +120274,21 @@ var ts; function getKeyFromNode(exp) { return exp.pos.toString() + ":" + exp.end.toString(); } + function canBeConvertedToClass(node) { + var _a, _b, _c, _d; + if (node.kind === 201 /* FunctionExpression */) { + if (ts.isVariableDeclaration(node.parent) && ((_a = node.symbol.members) === null || _a === void 0 ? void 0 : _a.size)) { + return true; + } + var decl = ts.getDeclarationOfExpando(node); + var symbol = decl === null || decl === void 0 ? void 0 : decl.symbol; + return !!(symbol && (((_b = symbol.exports) === null || _b === void 0 ? void 0 : _b.size) || ((_c = symbol.members) === null || _c === void 0 ? void 0 : _c.size))); + } + if (node.kind === 244 /* FunctionDeclaration */) { + return !!((_d = node.symbol.members) === null || _d === void 0 ? void 0 : _d.size); + } + return false; + } })(ts || (ts = {})); /* @internal */ var ts; @@ -118527,9 +120297,6 @@ var ts; (function (SymbolDisplay) { // TODO(drosen): use contextual SemanticMeaning. function getSymbolKind(typeChecker, symbol, location) { - while (ts.isTypeOnlyAlias(symbol)) { - symbol = symbol.immediateTarget; - } var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location); if (result !== "" /* unknown */) { return result; @@ -118647,9 +120414,6 @@ var ts; // TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning, alias) { if (semanticMeaning === void 0) { semanticMeaning = ts.getMeaningFromLocation(location); } - while (ts.isTypeOnlyAlias(symbol)) { - symbol = symbol.immediateTarget; - } var displayParts = []; var documentation = []; var tags = []; @@ -119291,11 +121055,11 @@ var ts; this.options = options; } FormattingContext.prototype.updateContext = function (currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) { - this.currentTokenSpan = ts.Debug.assertDefined(currentRange); - this.currentTokenParent = ts.Debug.assertDefined(currentTokenParent); - this.nextTokenSpan = ts.Debug.assertDefined(nextRange); - this.nextTokenParent = ts.Debug.assertDefined(nextTokenParent); - this.contextNode = ts.Debug.assertDefined(commonParent); + this.currentTokenSpan = ts.Debug.checkDefined(currentRange); + this.currentTokenParent = ts.Debug.checkDefined(currentTokenParent); + this.nextTokenSpan = ts.Debug.checkDefined(nextRange); + this.nextTokenParent = ts.Debug.checkDefined(nextTokenParent); + this.contextNode = ts.Debug.checkDefined(commonParent); // drop cached results this.contextNodeAllOnSameLine = undefined; this.nextNodeAllOnSameLine = undefined; @@ -119450,7 +121214,14 @@ var ts; return false; } function shouldRescanJsxText(node) { - return node.kind === 11 /* JsxText */; + var isJSXText = ts.isJsxText(node); + if (isJSXText) { + var containingElement = ts.findAncestor(node.parent, function (p) { return ts.isJsxElement(p); }); + if (!containingElement) + return false; // should never happen + return !ts.isParenthesizedExpression(containingElement.parent); + } + return false; } function shouldRescanSlashToken(container) { return container.kind === 13 /* RegularExpressionLiteral */; @@ -119539,7 +121310,7 @@ var ts; case 3 /* RescanTemplateToken */: if (token === 19 /* CloseBraceToken */) { lastScanAction = 3 /* RescanTemplateToken */; - return scanner.reScanTemplateToken(); + return scanner.reScanTemplateToken(/* isTaggedTemplate */ false); } break; case 4 /* RescanJsxIdentifier */: @@ -119814,7 +121585,7 @@ var ts; // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses rule("SpaceAfterConstructor", 129 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), rule("NoSpaceAfterConstructor", 129 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("SpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket], 4 /* InsertSpace */), + rule("SpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket, isNextTokenNotCloseParen], 4 /* InsertSpace */), rule("NoSpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext], 16 /* DeleteSpace */), // Insert space after function keyword for anonymous functions rule("SpaceAfterAnonymousFunctionKeyword", [94 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 4 /* InsertSpace */), @@ -120163,6 +121934,9 @@ var ts; function isNextTokenNotCloseBracket(context) { return context.nextTokenSpan.kind !== 23 /* CloseBracketToken */; } + function isNextTokenNotCloseParen(context) { + return context.nextTokenSpan.kind !== 21 /* CloseParenToken */; + } function isArrowFunctionContext(context) { return context.contextNode.kind === 202 /* ArrowFunction */; } @@ -120663,7 +122437,7 @@ var ts; } var error = sorted[index]; if (r.end <= error.start) { - // specified range ends before the error refered by 'index' - no error in range + // specified range ends before the error referred by 'index' - no error in range return false; } if (ts.startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { @@ -120965,6 +122739,11 @@ var ts; if (tokenInfo.token.end > node.end) { break; } + if (node.kind === 11 /* JsxText */) { + // Intentation rules for jsx text are handled by `indentMultilineCommentOrJsxText` inside `processChildNode`; just fastforward past it here + formattingScanner.advance(); + continue; + } consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node); } if (!node.parent && formattingScanner.isOnEOF()) { @@ -121023,7 +122802,19 @@ var ts; processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); if (child.kind === 11 /* JsxText */) { var range = { pos: child.getStart(), end: child.getEnd() }; - indentMultilineCommentOrJsxText(range, childIndentation.indentation, /*firstLineIsIndented*/ true, /*indentFinalLine*/ false); + if (range.pos !== range.end) { // don't indent zero-width jsx text + var siblings = parent.getChildren(sourceFile); + var currentIndex = ts.findIndex(siblings, function (arg) { return arg.pos === child.pos; }); + var previousNode = siblings[currentIndex - 1]; + if (previousNode) { + // The jsx text needs no indentation whatsoever if it ends on the same line the previous sibling ends on + if (sourceFile.getLineAndCharacterOfPosition(range.end).line !== sourceFile.getLineAndCharacterOfPosition(previousNode.end).line) { + // The first line is (already) "indented" if the text starts on the same line as the previous sibling element ends on + var firstLineIsIndented = sourceFile.getLineAndCharacterOfPosition(range.pos).line === sourceFile.getLineAndCharacterOfPosition(previousNode.end).line; + indentMultilineCommentOrJsxText(range, childIndentation.indentation, firstLineIsIndented, /*indentFinalLine*/ false, /*jsxStyle*/ true); + } + } + } } childContextNode = node; if (isFirstListItem && parent.kind === 192 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { @@ -121077,8 +122868,11 @@ var ts; if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(parent); if (tokenInfo.token.kind === 27 /* CommaToken */ && ts.isCallLikeExpression(parent)) { - formattingScanner.advance(); - tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent) : undefined; + var commaTokenLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; + if (startLine !== commaTokenLine) { + formattingScanner.advance(); + tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent) : undefined; + } } // consume the list end token only if it is still belong to the parent // there might be the case when current token matches end token but does not considered as one @@ -121264,7 +123058,7 @@ var ts; function indentationIsDifferent(indentationString, startLinePosition) { return indentationString !== sourceFile.text.substr(startLinePosition, indentationString.length); } - function indentMultilineCommentOrJsxText(commentRange, indentation, firstLineIsIndented, indentFinalLine) { + function indentMultilineCommentOrJsxText(commentRange, indentation, firstLineIsIndented, indentFinalLine, jsxTextStyleIndent) { if (indentFinalLine === void 0) { indentFinalLine = true; } // split comment in lines var startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; @@ -121290,7 +123084,7 @@ var ts; return; var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); var nonWhitespaceColumnInFirstPart = formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); - if (indentation === nonWhitespaceColumnInFirstPart.column) { + if (indentation === nonWhitespaceColumnInFirstPart.column && !jsxTextStyleIndent) { return; } var startIndex = 0; @@ -121305,6 +123099,13 @@ var ts; var nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); + if (jsxTextStyleIndent) { + // skip adding indentation to blank lines + if (ts.isLineBreak(sourceFile.text.charCodeAt(ts.getStartPositionOfLine(startLine, sourceFile)))) + continue; + // reset delta on every line + delta = indentation - nonWhitespaceCharacterAndColumn.column; + } var newIndentation = nonWhitespaceCharacterAndColumn.column + delta; if (newIndentation > 0) { var indentationString = getIndentationString(newIndentation, options); @@ -121866,7 +123667,7 @@ var ts; case 214 /* ClassExpression */: case 246 /* InterfaceDeclaration */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return getList(node.typeParameters); case 197 /* NewExpression */: case 196 /* CallExpression */: @@ -123085,25 +124886,47 @@ var ts; position = shebang.length; advancePastLineBreak(); } - // For a source file, it is possible there are detached comments we should not skip var ranges = ts.getLeadingCommentRanges(text, position); if (!ranges) return position; - // However we should still skip a pinned comment at the top - if (ranges.length && ranges[0].kind === 3 /* MultiLineCommentTrivia */ && ts.isPinnedComment(text, ranges[0].pos)) { - position = ranges[0].end; - advancePastLineBreak(); - ranges = ranges.slice(1); - } - // As well as any triple slash references + // Find the first attached comment to the first node and add before it + var lastComment; + var firstNodeLine; for (var _b = 0, ranges_1 = ranges; _b < ranges_1.length; _b++) { var range = ranges_1[_b]; - if (range.kind === 2 /* SingleLineCommentTrivia */ && ts.isRecognizedTripleSlashComment(text, range.pos, range.end)) { - position = range.end; - advancePastLineBreak(); + if (range.kind === 3 /* MultiLineCommentTrivia */) { + if (ts.isPinnedComment(text, range.pos)) { + lastComment = { range: range, pinnedOrTripleSlash: true }; + continue; + } + } + else if (ts.isRecognizedTripleSlashComment(text, range.pos, range.end)) { + lastComment = { range: range, pinnedOrTripleSlash: true }; continue; } - break; + if (lastComment) { + // Always insert after pinned or triple slash comments + if (lastComment.pinnedOrTripleSlash) + break; + // There was a blank line between the last comment and this comment. + // This comment is not part of the copyright comments + var commentLine = sourceFile.getLineAndCharacterOfPosition(range.pos).line; + var lastCommentEndLine = sourceFile.getLineAndCharacterOfPosition(lastComment.range.end).line; + if (commentLine >= lastCommentEndLine + 2) + break; + } + if (sourceFile.statements.length) { + if (firstNodeLine === undefined) + firstNodeLine = sourceFile.getLineAndCharacterOfPosition(sourceFile.statements[0].getStart()).line; + var commentEndLine = sourceFile.getLineAndCharacterOfPosition(range.end).line; + if (firstNodeLine < commentEndLine + 2) + break; + } + lastComment = { range: range, pinnedOrTripleSlash: false }; + } + if (lastComment) { + position = lastComment.range.end; + advancePastLineBreak(); } return position; function advancePastLineBreak() { @@ -123146,9 +124969,10 @@ var ts; break; } case 254 /* ImportDeclaration */: + var isFirstImport = sourceFile.imports.length && node === ts.first(sourceFile.imports).parent || node === ts.find(sourceFile.statements, ts.isImportDeclaration); deleteNode(changes, sourceFile, node, // For first import, leave header comment in place - node === sourceFile.imports[0].parent ? { leadingTriviaOption: LeadingTriviaOption.Exclude } : undefined); + isFirstImport ? { leadingTriviaOption: LeadingTriviaOption.Exclude } : undefined); break; case 191 /* BindingElement */: var pattern = node.parent; @@ -123215,7 +125039,7 @@ var ts; // Delete named imports while preserving the default import // import d|, * as ns| from './file' // import d|, { a }| from './file' - var previousToken = ts.Debug.assertDefined(ts.getTokenAtPosition(sourceFile, node.pos - 1)); + var previousToken = ts.Debug.checkDefined(ts.getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { @@ -123264,7 +125088,7 @@ var ts; } textChanges_3.deleteNode = deleteNode; function deleteNodeInList(changes, deletedNodesInLists, sourceFile, node) { - var containingList = ts.Debug.assertDefined(ts.formatting.SmartIndenter.getContainingList(node, sourceFile)); + var containingList = ts.Debug.checkDefined(ts.formatting.SmartIndenter.getContainingList(node, sourceFile)); var index = ts.indexOfNode(containingList, node); ts.Debug.assert(index !== -1); if (containingList.length === 1) { @@ -123423,7 +125247,7 @@ var ts; }); function makeChange(changeTracker, sourceFile, pos) { var token = ts.getTokenAtPosition(sourceFile, pos); - var assertion = ts.Debug.assertDefined(ts.findAncestor(token, function (n) { return ts.isAsExpression(n) || ts.isTypeAssertion(n); }), "Expected to find an assertion expression"); + var assertion = ts.Debug.checkDefined(ts.findAncestor(token, function (n) { return ts.isAsExpression(n) || ts.isTypeAssertion(n); }), "Expected to find an assertion expression"); var replacement = ts.isAsExpression(assertion) ? ts.createAsExpression(assertion.expression, ts.createKeywordTypeNode(148 /* UnknownKeyword */)) : ts.createTypeAssertion(ts.createKeywordTypeNode(148 /* UnknownKeyword */), assertion.expression); @@ -123455,6 +125279,87 @@ var ts; })(ts || (ts = {})); /* @internal */ var ts; +(function (ts) { + var codefix; + (function (codefix) { + var fixId = "addMissingAsync"; + var errorCodes = [ + ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + ts.Diagnostics.Type_0_is_not_assignable_to_type_1.code, + ts.Diagnostics.Type_0_is_not_comparable_to_type_1.code + ]; + codefix.registerCodeFix({ + fixIds: [fixId], + errorCodes: errorCodes, + getCodeActions: function (context) { + var sourceFile = context.sourceFile, errorCode = context.errorCode, cancellationToken = context.cancellationToken, program = context.program, span = context.span; + var diagnostic = ts.find(program.getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile, cancellationToken), getIsMatchingAsyncError(span, errorCode)); + var directSpan = diagnostic && diagnostic.relatedInformation && ts.find(diagnostic.relatedInformation, function (r) { return r.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + var decl = getFixableErrorSpanDeclaration(sourceFile, directSpan); + if (!decl) { + return; + } + var trackChanges = function (cb) { return ts.textChanges.ChangeTracker.with(context, cb); }; + return [getFix(context, decl, trackChanges)]; + }, + getAllCodeActions: function (context) { + var sourceFile = context.sourceFile; + var fixedDeclarations = ts.createMap(); + return codefix.codeFixAll(context, errorCodes, function (t, diagnostic) { + var span = diagnostic.relatedInformation && ts.find(diagnostic.relatedInformation, function (r) { return r.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + var decl = getFixableErrorSpanDeclaration(sourceFile, span); + if (!decl) { + return; + } + var trackChanges = function (cb) { return (cb(t), []); }; + return getFix(context, decl, trackChanges, fixedDeclarations); + }); + }, + }); + function getFix(context, decl, trackChanges, fixedDeclarations) { + var changes = trackChanges(function (t) { return makeChange(t, context.sourceFile, decl, fixedDeclarations); }); + return codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_async_modifier_to_containing_function, fixId, ts.Diagnostics.Add_all_missing_async_modifiers); + } + function makeChange(changeTracker, sourceFile, insertionSite, fixedDeclarations) { + if (fixedDeclarations) { + if (fixedDeclarations.has(ts.getNodeId(insertionSite).toString())) { + return; + } + } + fixedDeclarations === null || fixedDeclarations === void 0 ? void 0 : fixedDeclarations.set(ts.getNodeId(insertionSite).toString(), true); + var cloneWithModifier = ts.getSynthesizedDeepClone(insertionSite, /*includeTrivia*/ true); + cloneWithModifier.modifiers = ts.createNodeArray(ts.createModifiersFromModifierFlags(ts.getModifierFlags(insertionSite) | 256 /* Async */)); + cloneWithModifier.modifierFlagsCache = 0; + changeTracker.replaceNode(sourceFile, insertionSite, cloneWithModifier); + } + function getFixableErrorSpanDeclaration(sourceFile, span) { + if (!span) + return undefined; + var token = ts.getTokenAtPosition(sourceFile, span.start); + // Checker has already done work to determine that async might be possible, and has attached + // related info to the node, so start by finding the signature that exactly matches up + // with the diagnostic range. + var decl = ts.findAncestor(token, function (node) { + if (node.getStart(sourceFile) < span.start || node.getEnd() > ts.textSpanEnd(span)) { + return "quit"; + } + return (ts.isArrowFunction(node) || ts.isMethodDeclaration(node) || ts.isFunctionExpression(node) || ts.isFunctionDeclaration(node)) && ts.textSpansEqual(span, ts.createTextSpanFromNode(node, sourceFile)); + }); + return decl; + } + function getIsMatchingAsyncError(span, errorCode) { + return function (_a) { + var start = _a.start, length = _a.length, relatedInformation = _a.relatedInformation, code = _a.code; + return ts.isNumber(start) && ts.isNumber(length) && ts.textSpansEqual({ start: start, length: length }, span) && + code === errorCode && + !!relatedInformation && + ts.some(relatedInformation, function (related) { return related.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + }; + } + })(codefix = ts.codefix || (ts.codefix = {})); +})(ts || (ts = {})); +/* @internal */ +var ts; (function (ts) { var codefix; (function (codefix) { @@ -123973,7 +125878,7 @@ var ts; } } else { - var jsdocType = ts.Debug.assertDefined(ts.getJSDocType(decl), "A JSDocType for this declaration should exist"); // If not defined, shouldn't have been an error to fix + var jsdocType = ts.Debug.checkDefined(ts.getJSDocType(decl), "A JSDocType for this declaration should exist"); // If not defined, shouldn't have been an error to fix ts.Debug.assert(!decl.type, "The JSDocType decl should have a type"); // If defined, shouldn't have been an error to fix. changes.tryInsertTypeAnnotation(sourceFile, decl, transformJSDocType(jsdocType)); } @@ -124112,20 +126017,20 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; + var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, preferences = context.preferences; var token = ts.getTokenAtPosition(sourceFile, start); var declaration; - var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, formatContext, preferences); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, preferences); }); var name = declaration && ts.getNameOfDeclaration(declaration); return !name || changes.length === 0 ? undefined : [codefix.createCodeFixAction(fixId, changes, [getDiagnostic(errorCode, token), name.getText(sourceFile)], fixId, ts.Diagnostics.Infer_all_types_from_usage)]; }, fixIds: [fixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; + var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, preferences = context.preferences; var markSeen = ts.nodeSeenTracker(); return codefix.codeFixAll(context, errorCodes, function (changes, err) { - doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, formatContext, preferences); + doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, preferences); }); }, }); @@ -124165,18 +126070,20 @@ var ts; } return errorCode; } - function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, formatContext, preferences) { + function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, preferences) { if (!ts.isParameterPropertyModifier(token.kind) && token.kind !== 75 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 104 /* ThisKeyword */) { return undefined; } var parent = token.parent; + var importAdder = codefix.createImportAdder(sourceFile, program, preferences, host); errorCode = mapSuggestionDiagnostic(errorCode); switch (errorCode) { // Variable and Property declarations case ts.Diagnostics.Member_0_implicitly_has_an_1_type.code: case ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: if ((ts.isVariableDeclaration(parent) && markSeen(parent)) || ts.isPropertyDeclaration(parent) || ts.isPropertySignature(parent)) { // handle bad location - annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken, formatContext, preferences); + annotateVariableDeclaration(changes, importAdder, sourceFile, parent, program, host, cancellationToken); + importAdder.writeFixes(changes); return parent; } if (ts.isPropertyAccessExpression(parent)) { @@ -124187,13 +126094,15 @@ var ts; var typeTag = ts.createJSDocTypeTag(ts.createJSDocTypeExpression(typeNode), /*comment*/ ""); addJSDocTags(changes, sourceFile, ts.cast(parent.parent.parent, ts.isExpressionStatement), [typeTag]); } + importAdder.writeFixes(changes); return parent; } return undefined; case ts.Diagnostics.Variable_0_implicitly_has_an_1_type.code: { var symbol = program.getTypeChecker().getSymbolAtLocation(token); if (symbol && symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) { - annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken, formatContext, preferences); + annotateVariableDeclaration(changes, importAdder, sourceFile, symbol.valueDeclaration, program, host, cancellationToken); + importAdder.writeFixes(changes); return symbol.valueDeclaration; } return undefined; @@ -124203,53 +126112,57 @@ var ts; if (containingFunction === undefined) { return undefined; } + var declaration; switch (errorCode) { // Parameter declarations case ts.Diagnostics.Parameter_0_implicitly_has_an_1_type.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); - return containingFunction; + annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); + declaration = containingFunction; + break; } // falls through case ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: if (markSeen(containingFunction)) { var param = ts.cast(parent, ts.isParameter); - annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken, formatContext, preferences); - return param; + annotateParameters(changes, importAdder, sourceFile, param, containingFunction, program, host, cancellationToken); + declaration = param; } - return undefined; + break; // Get Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: case ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: if (ts.isGetAccessorDeclaration(containingFunction) && ts.isIdentifier(containingFunction.name)) { - annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host, formatContext, preferences); - return containingFunction; + annotate(changes, importAdder, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host); + declaration = containingFunction; } - return undefined; + break; // Set Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); - return containingFunction; + annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); + declaration = containingFunction; } - return undefined; + break; // Function 'this' case ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: if (ts.textChanges.isThisTypeAnnotatable(containingFunction) && markSeen(containingFunction)) { annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken); - return containingFunction; + declaration = containingFunction; } - return undefined; + break; default: return ts.Debug.fail(String(errorCode)); } + importAdder.writeFixes(changes); + return declaration; } - function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken, formatContext, preferences) { + function annotateVariableDeclaration(changes, importAdder, sourceFile, declaration, program, host, cancellationToken) { if (ts.isIdentifier(declaration.name)) { - annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host); } } - function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken, formatContext, preferences) { + function annotateParameters(changes, importAdder, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) { if (!ts.isIdentifier(parameterDeclaration.name)) { return; } @@ -124265,7 +126178,7 @@ var ts; for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) { var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type; if (declaration && !declaration.type && !declaration.initializer) { - annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, declaration, type, program, host); } } if (needParens) @@ -124294,7 +126207,7 @@ var ts; ts.createJSDocThisTag(ts.createJSDocTypeExpression(typeNode)), ]); } - function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken, formatContext, preferences) { + function annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclaration, program, host, cancellationToken) { var param = ts.firstOrUndefined(setAccessorDeclaration.parameters); if (param && ts.isIdentifier(setAccessorDeclaration.name) && ts.isIdentifier(param.name)) { var type = inferTypeForVariableFromUsage(setAccessorDeclaration.name, program, cancellationToken); @@ -124305,11 +126218,11 @@ var ts; annotateJSDocParameters(changes, sourceFile, [{ declaration: param, type: type }], program, host); } else { - annotate(changes, sourceFile, param, type, program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, param, type, program, host); } } } - function annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences) { + function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { var typeNode = ts.getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { if (ts.isInJSFile(sourceFile) && declaration.kind !== 158 /* PropertySignature */) { @@ -124321,29 +126234,16 @@ var ts; var typeTag = ts.isGetAccessorDeclaration(declaration) ? ts.createJSDocReturnTag(typeExpression, "") : ts.createJSDocTypeTag(typeExpression, ""); addJSDocTags(changes, sourceFile, parent, [typeTag]); } - else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences)) { + else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, type, sourceFile, changes, importAdder, ts.getEmitScriptTarget(program.getCompilerOptions()))) { changes.tryInsertTypeAnnotation(sourceFile, declaration, typeNode); } } } - function tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences) { - var _a; - if (ts.isLiteralImportTypeNode(typeNode) && typeNode.qualifier && type.symbol) { - // Replace 'import("./a").SomeType' with 'SomeType' and an actual import if possible - var moduleSymbol = (_a = ts.find(type.symbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) === null || _a === void 0 ? void 0 : _a.getSourceFile().symbol; - // Symbol for the left-most thing after the dot - if (moduleSymbol) { - var symbol = ts.getFirstIdentifier(typeNode.qualifier).symbol; - var action = codefix.getImportCompletionAction(symbol, moduleSymbol, sourceFile, symbol.name, host, program, formatContext, declaration.pos, preferences); - if (action.codeAction.changes.length && changes.tryInsertTypeAnnotation(sourceFile, declaration, ts.createTypeReferenceNode(typeNode.qualifier, typeNode.typeArguments))) { - for (var _i = 0, _b = action.codeAction.changes; _i < _b.length; _i++) { - var change = _b[_i]; - var file = sourceFile.fileName === change.fileName ? sourceFile : ts.Debug.assertDefined(program.getSourceFile(change.fileName)); - changes.pushRaw(file, change); - } - return true; - } - } + function tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, type, sourceFile, changes, importAdder, scriptTarget) { + var importableReference = codefix.tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget); + if (importableReference && changes.tryInsertTypeAnnotation(sourceFile, declaration, importableReference.typeReference)) { + ts.forEach(importableReference.symbols, function (s) { return importAdder.addImportFromExportedSymbol(s, /*usageIsTypeOnly*/ true); }); + return true; } return false; } @@ -124390,14 +126290,14 @@ var ts; return undefined; } switch (oldTag.kind) { - case 316 /* JSDocParameterTag */: { + case 317 /* JSDocParameterTag */: { var oldParam = oldTag; var newParam = newTag; return ts.isIdentifier(oldParam.name) && ts.isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? ts.createJSDocParamTag(newParam.name, newParam.isBracketed, newParam.typeExpression, oldParam.comment) : undefined; } - case 317 /* JSDocReturnTag */: + case 318 /* JSDocReturnTag */: return ts.createJSDocReturnTag(newTag.typeExpression, oldTag.comment); } } @@ -124920,7 +126820,7 @@ var ts; var callSignatures = usage.calls ? [getSignatureFromCalls(usage.calls)] : []; var constructSignatures = usage.constructs ? [getSignatureFromCalls(usage.constructs)] : []; var stringIndexInfo = usage.stringIndex && checker.createIndexInfo(combineFromUsage(usage.stringIndex), /*isReadonly*/ false); - return checker.createAnonymousType(/*symbol*/ undefined, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined); // TODO: GH#18217 + return checker.createAnonymousType(/*symbol*/ undefined, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined); } function inferNamedTypesFromProperties(usage) { if (!usage.properties || !usage.properties.size) @@ -125020,7 +126920,7 @@ var ts; return types; } function getFunctionFromCalls(calls) { - return checker.createAnonymousType(undefined, ts.createSymbolTable(), [getSignatureFromCalls(calls)], ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); + return checker.createAnonymousType(/*symbol*/ undefined, ts.createSymbolTable(), [getSignatureFromCalls(calls)], ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); } function getSignatureFromCalls(calls) { var parameters = []; @@ -126327,7 +128227,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile, span = context.span; var classDeclaration = getClass(sourceFile, span.start); - return ts.mapDefined(ts.getClassImplementsHeritageClauseElements(classDeclaration), function (implementedTypeNode) { + return ts.mapDefined(ts.getEffectiveImplementsTypeNodes(classDeclaration), function (implementedTypeNode) { var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, t, context.preferences); }); return changes.length === 0 ? undefined : codefix.createCodeFixAction(fixId, changes, [ts.Diagnostics.Implement_interface_0, implementedTypeNode.getText(sourceFile)], fixId, ts.Diagnostics.Implement_all_unimplemented_interfaces); }); @@ -126338,7 +128238,7 @@ var ts; return codefix.codeFixAll(context, errorCodes, function (changes, diag) { var classDeclaration = getClass(diag.file, diag.start); if (ts.addToSeen(seenClassDeclarations, ts.getNodeId(classDeclaration))) { - for (var _i = 0, _a = ts.getClassImplementsHeritageClauseElements(classDeclaration); _i < _a.length; _i++) { + for (var _i = 0, _a = ts.getEffectiveImplementsTypeNodes(classDeclaration); _i < _a.length; _i++) { var implementedTypeNode = _a[_i]; addMissingDeclarations(context, implementedTypeNode, diag.file, classDeclaration, changes, context.preferences); } @@ -126347,7 +128247,7 @@ var ts; }, }); function getClass(sourceFile, pos) { - return ts.Debug.assertDefined(ts.getContainingClass(ts.getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); + return ts.Debug.checkDefined(ts.getContainingClass(ts.getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); } function symbolPointsToNonPrivateMember(symbol) { return !symbol.valueDeclaration || !(ts.getModifierFlags(symbol.valueDeclaration) & 8 /* Private */); @@ -126368,7 +128268,9 @@ var ts; if (!classType.getStringIndexType()) { createMissingIndexSignatureDeclaration(implementedType, 0 /* String */); } - codefix.createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, function (member) { return insertInterfaceMemberNode(sourceFile, classDeclaration, member); }); + var importAdder = codefix.createImportAdder(sourceFile, context.program, preferences, context.host); + codefix.createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, importAdder, function (member) { return insertInterfaceMemberNode(sourceFile, classDeclaration, member); }); + importAdder.writeFixes(changeTracker); function createMissingIndexSignatureDeclaration(type, kind) { var indexInfoOfKind = checker.getIndexInfoOfType(type, kind); if (indexInfoOfKind) { @@ -126424,111 +128326,115 @@ var ts; }, fixIds: [importFixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, preferences = context.preferences; - // Namespace fixes don't conflict, so just build a list. - var addToNamespace = []; - var importType = []; - // Keys are import clause node IDs. - var addToExisting = ts.createMap(); - var newImports = createNewImportMap(); - codefix.eachDiagnostic(context, errorCodes, function (diag) { - var info = getFixesInfo(context, diag.code, diag.start); - if (!info || !info.fixes.length) - return; - var fixes = info.fixes, symbolName = info.symbolName; - var fix = ts.first(fixes); - switch (fix.kind) { - case 0 /* UseNamespace */: - addToNamespace.push(fix); - break; - case 1 /* ImportType */: - importType.push(fix); - break; - case 2 /* AddToExisting */: { - var importClause = fix.importClause, importKind = fix.importKind; - var key = String(ts.getNodeId(importClause)); - var entry = addToExisting.get(key); - if (!entry) { - addToExisting.set(key, entry = { importClause: importClause, defaultImport: undefined, namedImports: [] }); - } - if (importKind === 0 /* Named */) { - ts.pushIfUnique(entry.namedImports, symbolName); - } - else { - ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add to Existing) Default import should be missing or match symbolName"); - entry.defaultImport = symbolName; - } - break; + var sourceFile = context.sourceFile, program = context.program, preferences = context.preferences, host = context.host; + var importAdder = createImportAdder(sourceFile, program, preferences, host); + codefix.eachDiagnostic(context, errorCodes, function (diag) { return importAdder.addImportFromDiagnostic(diag, context); }); + return codefix.createCombinedCodeActions(ts.textChanges.ChangeTracker.with(context, importAdder.writeFixes)); + }, + }); + function createImportAdder(sourceFile, program, preferences, host) { + var compilerOptions = program.getCompilerOptions(); + // Namespace fixes don't conflict, so just build a list. + var addToNamespace = []; + var importType = []; + // Keys are import clause node IDs. + var addToExisting = ts.createMap(); + var newImports = ts.createMap(); + var lastModuleSpecifier; + return { addImportFromDiagnostic: addImportFromDiagnostic, addImportFromExportedSymbol: addImportFromExportedSymbol, writeFixes: writeFixes }; + function addImportFromDiagnostic(diagnostic, context) { + var info = getFixesInfo(context, diagnostic.code, diagnostic.start); + if (!info || !info.fixes.length) + return; + addImport(info); + } + function addImportFromExportedSymbol(exportedSymbol, usageIsTypeOnly) { + var moduleSymbol = ts.Debug.checkDefined(exportedSymbol.parent); + var symbolName = ts.getNameForExportedSymbol(exportedSymbol, ts.getEmitScriptTarget(compilerOptions)); + var checker = program.getTypeChecker(); + var symbol = checker.getMergedSymbol(ts.skipAlias(exportedSymbol, checker)); + var exportInfos = getAllReExportingModules(sourceFile, symbol, moduleSymbol, symbolName, sourceFile, compilerOptions, checker, program.getSourceFiles()); + var preferTypeOnlyImport = !!usageIsTypeOnly && compilerOptions.importsNotUsedAsValues === 2 /* Error */; + var fix = getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, /*position*/ undefined, preferTypeOnlyImport, host, preferences); + addImport({ fixes: [fix], symbolName: symbolName }); + } + function addImport(info) { + var fixes = info.fixes, symbolName = info.symbolName; + var fix = ts.first(fixes); + switch (fix.kind) { + case 0 /* UseNamespace */: + addToNamespace.push(fix); + break; + case 1 /* ImportType */: + importType.push(fix); + break; + case 2 /* AddToExisting */: { + var importClause = fix.importClause, importKind = fix.importKind, canUseTypeOnlyImport = fix.canUseTypeOnlyImport; + var key = String(ts.getNodeId(importClause)); + var entry = addToExisting.get(key); + if (!entry) { + addToExisting.set(key, entry = { importClause: importClause, defaultImport: undefined, namedImports: [], canUseTypeOnlyImport: canUseTypeOnlyImport }); } - case 3 /* AddNew */: { - var moduleSpecifier = fix.moduleSpecifier, importKind = fix.importKind, typeOnly = fix.typeOnly; - var entry = newImports.get(moduleSpecifier, typeOnly); - if (!entry) { - newImports.set(moduleSpecifier, typeOnly, entry = { defaultImport: undefined, namedImports: [], namespaceLikeImport: undefined }); - } - switch (importKind) { - case 1 /* Default */: - ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add new) Default import should be missing or match symbolName"); - entry.defaultImport = symbolName; - break; - case 0 /* Named */: - ts.pushIfUnique(entry.namedImports, symbolName); - break; - case 3 /* Equals */: - case 2 /* Namespace */: - ts.Debug.assert(entry.namespaceLikeImport === undefined || entry.namespaceLikeImport.name === symbolName, "Namespacelike import shoudl be missing or match symbolName"); - entry.namespaceLikeImport = { importKind: importKind, name: symbolName }; - break; - } - break; + if (importKind === 0 /* Named */) { + ts.pushIfUnique(entry.namedImports, symbolName); } - default: - ts.Debug.assertNever(fix, "fix wasn't never - got kind " + fix.kind); + else { + ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add to Existing) Default import should be missing or match symbolName"); + entry.defaultImport = symbolName; + } + break; } + case 3 /* AddNew */: { + var moduleSpecifier = fix.moduleSpecifier, importKind = fix.importKind, typeOnly = fix.typeOnly; + var entry = newImports.get(moduleSpecifier); + if (!entry) { + newImports.set(moduleSpecifier, entry = { defaultImport: undefined, namedImports: [], namespaceLikeImport: undefined, typeOnly: typeOnly }); + lastModuleSpecifier = moduleSpecifier; + } + else { + // An import clause can only be type-only if every import fix contributing to it can be type-only. + entry.typeOnly = entry.typeOnly && typeOnly; + } + switch (importKind) { + case 1 /* Default */: + ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add new) Default import should be missing or match symbolName"); + entry.defaultImport = symbolName; + break; + case 0 /* Named */: + ts.pushIfUnique(entry.namedImports, symbolName); + break; + case 3 /* Equals */: + case 2 /* Namespace */: + ts.Debug.assert(entry.namespaceLikeImport === undefined || entry.namespaceLikeImport.name === symbolName, "Namespacelike import shoudl be missing or match symbolName"); + entry.namespaceLikeImport = { importKind: importKind, name: symbolName }; + break; + } + break; + } + default: + ts.Debug.assertNever(fix, "fix wasn't never - got kind " + fix.kind); + } + } + function writeFixes(changeTracker) { + var quotePreference = ts.getQuotePreference(sourceFile, preferences); + for (var _i = 0, addToNamespace_1 = addToNamespace; _i < addToNamespace_1.length; _i++) { + var fix = addToNamespace_1[_i]; + addNamespaceQualifier(changeTracker, sourceFile, fix); + } + for (var _a = 0, importType_1 = importType; _a < importType_1.length; _a++) { + var fix = importType_1[_a]; + addImportType(changeTracker, sourceFile, fix, quotePreference); + } + addToExisting.forEach(function (_a) { + var importClause = _a.importClause, defaultImport = _a.defaultImport, namedImports = _a.namedImports, canUseTypeOnlyImport = _a.canUseTypeOnlyImport; + doAddExistingFix(changeTracker, sourceFile, importClause, defaultImport, namedImports, canUseTypeOnlyImport); + }); + newImports.forEach(function (imports, moduleSpecifier) { + addNewImports(changeTracker, sourceFile, moduleSpecifier, quotePreference, imports, /*blankLineBetween*/ lastModuleSpecifier === moduleSpecifier); }); - return codefix.createCombinedCodeActions(ts.textChanges.ChangeTracker.with(context, function (changes) { - var quotePreference = ts.getQuotePreference(sourceFile, preferences); - for (var _i = 0, addToNamespace_1 = addToNamespace; _i < addToNamespace_1.length; _i++) { - var fix = addToNamespace_1[_i]; - addNamespaceQualifier(changes, sourceFile, fix); - } - for (var _a = 0, importType_1 = importType; _a < importType_1.length; _a++) { - var fix = importType_1[_a]; - addImportType(changes, sourceFile, fix, quotePreference); - } - addToExisting.forEach(function (_a) { - var importClause = _a.importClause, defaultImport = _a.defaultImport, namedImports = _a.namedImports; - doAddExistingFix(changes, sourceFile, importClause, defaultImport, namedImports); - }); - newImports.forEach(function (imports, moduleSpecifier, typeOnly) { - addNewImports(changes, sourceFile, typeOnly, moduleSpecifier, quotePreference, imports); - }); - })); - }, - }); - function createNewImportMap() { - // Keys are module specifiers. - var newImports = ts.createMap(); - return { - get: function (moduleSpecifier, typeOnly) { - return newImports.get(key(moduleSpecifier, typeOnly)); - }, - set: function (moduleSpecifier, typeOnly, value) { - return newImports.set(key(moduleSpecifier, typeOnly), value); - }, - forEach: function (action) { - newImports.forEach(function (value, key) { - var typeOnly = !!+key[0]; - var moduleSpecifier = key.slice(1); - action(value, moduleSpecifier, typeOnly); - }); - }, - }; - function key(moduleSpecifier, typeOnly) { - var prefix = typeOnly ? "1" : "0"; - return prefix + moduleSpecifier; } } + codefix.createImportAdder = createImportAdder; // Sorted with the preferred fix coming first. var ImportFixKind; (function (ImportFixKind) { @@ -126546,14 +128452,19 @@ var ts; ImportKind[ImportKind["ConstEquals"] = 4] = "ConstEquals"; })(ImportKind || (ImportKind = {})); function getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, symbolName, host, program, formatContext, position, preferences) { - var exportInfos = getAllReExportingModules(sourceFile, exportedSymbol, moduleSymbol, symbolName, sourceFile, program.getCompilerOptions(), program.getTypeChecker(), program.getSourceFiles()); - ts.Debug.assert(exportInfos.some(function (info) { return info.moduleSymbol === moduleSymbol; }), "Some exportInfo should match the specified moduleSymbol"); - // We sort the best codefixes first, so taking `first` is best for completions. - var moduleSpecifier = ts.first(getNewImportInfos(program, sourceFile, position, exportInfos, host, preferences)).moduleSpecifier; - var fix = ts.first(getFixForImport(exportInfos, symbolName, position, program, sourceFile, host, preferences)); + var compilerOptions = program.getCompilerOptions(); + var exportInfos = getAllReExportingModules(sourceFile, exportedSymbol, moduleSymbol, symbolName, sourceFile, compilerOptions, program.getTypeChecker(), program.getSourceFiles()); + var preferTypeOnlyImport = compilerOptions.importsNotUsedAsValues === 2 /* Error */ && ts.isValidTypeOnlyAliasUseSite(ts.getTokenAtPosition(sourceFile, position)); + var moduleSpecifier = ts.first(getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, exportInfos, host, preferences)).moduleSpecifier; + var fix = getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, preferTypeOnlyImport, host, preferences); return { moduleSpecifier: moduleSpecifier, codeAction: codeFixActionToCodeAction(codeActionForFix({ host: host, formatContext: formatContext, preferences: preferences }, sourceFile, symbolName, fix, ts.getQuotePreference(sourceFile, preferences))) }; } codefix.getImportCompletionAction = getImportCompletionAction; + function getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, preferTypeOnlyImport, host, preferences) { + ts.Debug.assert(exportInfos.some(function (info) { return info.moduleSymbol === moduleSymbol; }), "Some exportInfo should match the specified moduleSymbol"); + // We sort the best codefixes first, so taking `first` is best. + return ts.first(getFixForImport(exportInfos, symbolName, position, preferTypeOnlyImport, program, sourceFile, host, preferences)); + } function codeFixActionToCodeAction(_a) { var description = _a.description, changes = _a.changes, commands = _a.commands; return { description: description, changes: changes, commands: commands }; @@ -126581,13 +128492,18 @@ var ts; function isTypeOnlySymbol(s, checker) { return !(ts.skipAlias(s, checker).flags & 111551 /* Value */); } - function getFixForImport(exportInfos, symbolName, position, program, sourceFile, host, preferences) { + function isTypeOnlyPosition(sourceFile, position) { + return ts.isValidTypeOnlyAliasUseSite(ts.getTokenAtPosition(sourceFile, position)); + } + function getFixForImport(exportInfos, symbolName, + /** undefined only for missing JSX namespace */ + position, preferTypeOnlyImport, program, sourceFile, host, preferences) { var checker = program.getTypeChecker(); var existingImports = ts.flatMap(exportInfos, function (info) { return getExistingImportDeclarations(info, checker, sourceFile); }); var useNamespace = position === undefined ? undefined : tryUseExistingNamespaceImport(existingImports, symbolName, position, checker); - var addToExisting = tryAddToExistingImport(existingImports); + var addToExisting = tryAddToExistingImport(existingImports, position !== undefined && isTypeOnlyPosition(sourceFile, position)); // Don't bother providing an action to add a new import if we can add to an existing one. - var addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, host, preferences); + var addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, preferTypeOnlyImport, host, preferences); return __spreadArrays((useNamespace ? [useNamespace] : ts.emptyArray), addImport); } function tryUseExistingNamespaceImport(existingImports, symbolName, position, checker) { @@ -126614,7 +128530,7 @@ var ts; } }); } - function tryAddToExistingImport(existingImports) { + function tryAddToExistingImport(existingImports, canUseTypeOnlyImport) { return ts.firstDefined(existingImports, function (_a) { var declaration = _a.declaration, importKind = _a.importKind; if (declaration.kind !== 254 /* ImportDeclaration */) @@ -126624,7 +128540,7 @@ var ts; return undefined; var name = importClause.name, namedBindings = importClause.namedBindings; return importKind === 1 /* Default */ && !name || importKind === 0 /* Named */ && (!namedBindings || namedBindings.kind === 257 /* NamedImports */) - ? { kind: 2 /* AddToExisting */, importClause: importClause, importKind: importKind } + ? { kind: 2 /* AddToExisting */, importClause: importClause, importKind: importKind, canUseTypeOnlyImport: canUseTypeOnlyImport } : undefined; }); } @@ -126646,7 +128562,7 @@ var ts; && checker.getSymbolAtLocation(moduleSpecifier) === moduleSymbol ? { declaration: i, importKind: importKind, exportedSymbolIsTypeOnly: exportedSymbolIsTypeOnly } : undefined; }); } - function getNewImportInfos(program, sourceFile, position, moduleSymbols, host, preferences) { + function getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, moduleSymbols, host, preferences) { var isJs = ts.isSourceFileJS(sourceFile); var allowsImportingSpecifier = createAutoImportFilter(sourceFile, program, host).allowsImportingSpecifier; var choicesForEachExportingModule = ts.flatMap(moduleSymbols, function (_a) { @@ -126655,8 +128571,8 @@ var ts; .map(function (moduleSpecifier) { // `position` should only be undefined at a missing jsx namespace, in which case we shouldn't be looking for pure types. return exportedSymbolIsTypeOnly && isJs - ? { kind: 1 /* ImportType */, moduleSpecifier: moduleSpecifier, position: ts.Debug.assertDefined(position, "position should be defined") } - : { kind: 3 /* AddNew */, moduleSpecifier: moduleSpecifier, importKind: importKind, typeOnly: exportedSymbolIsTypeOnly }; + ? { kind: 1 /* ImportType */, moduleSpecifier: moduleSpecifier, position: ts.Debug.checkDefined(position, "position should be defined") } + : { kind: 3 /* AddNew */, moduleSpecifier: moduleSpecifier, importKind: importKind, typeOnly: preferTypeOnlyImport }; }); }); // Sort by presence in package.json, then shortest paths first @@ -126672,19 +128588,19 @@ var ts; return a.moduleSpecifier.length - b.moduleSpecifier.length; }); } - function getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, host, preferences) { - var existingDeclaration = ts.firstDefined(existingImports, newImportInfoFromExistingSpecifier); - return existingDeclaration ? [existingDeclaration] : getNewImportInfos(program, sourceFile, position, exportInfos, host, preferences); + function getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, preferTypeOnlyImport, host, preferences) { + var existingDeclaration = ts.firstDefined(existingImports, function (info) { return newImportInfoFromExistingSpecifier(info, preferTypeOnlyImport); }); + return existingDeclaration ? [existingDeclaration] : getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, exportInfos, host, preferences); } - function newImportInfoFromExistingSpecifier(_a) { - var declaration = _a.declaration, importKind = _a.importKind, exportedSymbolIsTypeOnly = _a.exportedSymbolIsTypeOnly; + function newImportInfoFromExistingSpecifier(_a, preferTypeOnlyImport) { + var declaration = _a.declaration, importKind = _a.importKind; var expression = declaration.kind === 254 /* ImportDeclaration */ ? declaration.moduleSpecifier : declaration.moduleReference.kind === 265 /* ExternalModuleReference */ ? declaration.moduleReference.expression : undefined; return expression && ts.isStringLiteral(expression) - ? { kind: 3 /* AddNew */, moduleSpecifier: expression.text, importKind: importKind, typeOnly: exportedSymbolIsTypeOnly } + ? { kind: 3 /* AddNew */, moduleSpecifier: expression.text, importKind: importKind, typeOnly: preferTypeOnlyImport } : undefined; } function getFixesInfo(context, errorCode, pos) { @@ -126703,7 +128619,7 @@ var ts; var symbol = checker.getAliasedSymbol(umdSymbol); var symbolName = umdSymbol.name; var exportInfos = [{ moduleSymbol: symbol, importKind: getUmdImportKind(sourceFile, program.getCompilerOptions()), exportedSymbolIsTypeOnly: false }]; - var fixes = getFixForImport(exportInfos, symbolName, ts.isIdentifier(token) ? token.getStart(sourceFile) : undefined, program, sourceFile, host, preferences); + var fixes = getFixForImport(exportInfos, symbolName, ts.isIdentifier(token) ? token.getStart(sourceFile) : undefined, /*preferTypeOnlyImport*/ false, program, sourceFile, host, preferences); return { fixes: fixes, symbolName: symbolName }; } function getUmdSymbol(token, checker) { @@ -126754,10 +128670,11 @@ var ts; : symbolToken.text; // "default" is a keyword and not a legal identifier for the import, so we don't expect it here ts.Debug.assert(symbolName !== "default" /* Default */, "'default' isn't a legal identifier and couldn't occur here"); + var preferTypeOnlyImport = program.getCompilerOptions().importsNotUsedAsValues === 2 /* Error */ && ts.isValidTypeOnlyAliasUseSite(symbolToken); var exportInfos = getExportInfos(symbolName, ts.getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, checker, program, host); var fixes = ts.arrayFrom(ts.flatMapIterator(exportInfos.entries(), function (_a) { var _ = _a[0], exportInfos = _a[1]; - return getFixForImport(exportInfos, symbolName, symbolToken.getStart(sourceFile), program, sourceFile, host, preferences); + return getFixForImport(exportInfos, symbolName, symbolToken.getStart(sourceFile), preferTypeOnlyImport, program, sourceFile, host, preferences); })); return { fixes: fixes, symbolName: symbolName }; } @@ -126796,28 +128713,32 @@ var ts; if (defaultExport) return { symbol: defaultExport, kind: 1 /* Default */ }; var exportEquals = checker.resolveExternalModuleSymbol(moduleSymbol); - return exportEquals === moduleSymbol ? undefined : { symbol: exportEquals, kind: getExportEqualsImportKind(importingFile, compilerOptions, checker) }; + return exportEquals === moduleSymbol ? undefined : { symbol: exportEquals, kind: getExportEqualsImportKind(importingFile, compilerOptions) }; } - function getExportEqualsImportKind(importingFile, compilerOptions, checker) { + function getExportEqualsImportKind(importingFile, compilerOptions) { + var allowSyntheticDefaults = ts.getAllowSyntheticDefaultImports(compilerOptions); + // 1. 'import =' will not work in es2015+, so the decision is between a default + // and a namespace import, based on allowSyntheticDefaultImports/esModuleInterop. if (ts.getEmitModuleKind(compilerOptions) >= ts.ModuleKind.ES2015) { - return ts.getAllowSyntheticDefaultImports(compilerOptions) ? 1 /* Default */ : 2 /* Namespace */; + return allowSyntheticDefaults ? 1 /* Default */ : 2 /* Namespace */; } + // 2. 'import =' will not work in JavaScript, so the decision is between a default + // and const/require. if (ts.isInJSFile(importingFile)) { return ts.isExternalModule(importingFile) ? 1 /* Default */ : 4 /* ConstEquals */; } + // 3. At this point the most correct choice is probably 'import =', but people + // really hate that, so look to see if the importing file has any precedent + // on how to handle it. for (var _i = 0, _a = importingFile.statements; _i < _a.length; _i++) { var statement = _a[_i]; if (ts.isImportEqualsDeclaration(statement)) { return 3 /* Equals */; } - if (ts.isImportDeclaration(statement) && statement.importClause && statement.importClause.name) { - var moduleSymbol = checker.getImmediateAliasedSymbol(statement.importClause.symbol); - if (moduleSymbol && moduleSymbol.name !== "default" /* Default */) { - return 1 /* Default */; - } - } } - return 3 /* Equals */; + // 4. We have no precedent to go on, so just use a default import if + // allowSyntheticDefaultImports/esModuleInterop is enabled. + return allowSyntheticDefaults ? 1 /* Default */ : 3 /* Equals */; } function getDefaultExportInfoWorker(defaultExport, moduleSymbol, checker, compilerOptions) { var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport); @@ -126828,7 +128749,7 @@ var ts; return { symbolForMeaning: defaultExport, name: name }; if (defaultExport.flags & 2097152 /* Alias */) { var aliased = checker.getImmediateAliasedSymbol(defaultExport); - return aliased && getDefaultExportInfoWorker(aliased, ts.Debug.assertDefined(aliased.parent, "Alias targets of default exports must have a parent"), checker, compilerOptions); + return aliased && getDefaultExportInfoWorker(aliased, ts.Debug.checkDefined(aliased.parent, "Alias targets of default exports must have a parent"), checker, compilerOptions); } if (defaultExport.escapedName !== "default" /* Default */ && defaultExport.escapedName !== "export=" /* ExportEquals */) { @@ -126865,25 +128786,26 @@ var ts; addImportType(changes, sourceFile, fix, quotePreference); return [ts.Diagnostics.Change_0_to_1, symbolName, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName]; case 2 /* AddToExisting */: { - var importClause = fix.importClause, importKind = fix.importKind; - doAddExistingFix(changes, sourceFile, importClause, importKind === 1 /* Default */ ? symbolName : undefined, importKind === 0 /* Named */ ? [symbolName] : ts.emptyArray); + var importClause = fix.importClause, importKind = fix.importKind, canUseTypeOnlyImport = fix.canUseTypeOnlyImport; + doAddExistingFix(changes, sourceFile, importClause, importKind === 1 /* Default */ ? symbolName : undefined, importKind === 0 /* Named */ ? [symbolName] : ts.emptyArray, canUseTypeOnlyImport); var moduleSpecifierWithoutQuotes = ts.stripQuotes(importClause.parent.moduleSpecifier.getText()); return [importKind === 1 /* Default */ ? ts.Diagnostics.Add_default_import_0_to_existing_import_declaration_from_1 : ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, symbolName, moduleSpecifierWithoutQuotes]; // you too! } case 3 /* AddNew */: { - var importKind = fix.importKind, moduleSpecifier = fix.moduleSpecifier; - addNewImports(changes, sourceFile, fix.typeOnly, moduleSpecifier, quotePreference, importKind === 1 /* Default */ ? { defaultImport: symbolName, namedImports: ts.emptyArray, namespaceLikeImport: undefined } - : importKind === 0 /* Named */ ? { defaultImport: undefined, namedImports: [symbolName], namespaceLikeImport: undefined } - : { defaultImport: undefined, namedImports: ts.emptyArray, namespaceLikeImport: { importKind: importKind, name: symbolName } }); + var importKind = fix.importKind, moduleSpecifier = fix.moduleSpecifier, typeOnly = fix.typeOnly; + addNewImports(changes, sourceFile, moduleSpecifier, quotePreference, importKind === 1 /* Default */ ? { defaultImport: symbolName, namedImports: ts.emptyArray, namespaceLikeImport: undefined, typeOnly: typeOnly } + : importKind === 0 /* Named */ ? { defaultImport: undefined, namedImports: [symbolName], namespaceLikeImport: undefined, typeOnly: typeOnly } + : { defaultImport: undefined, namedImports: ts.emptyArray, namespaceLikeImport: { importKind: importKind, name: symbolName }, typeOnly: typeOnly }, /*blankLineBetween*/ true); return [importKind === 1 /* Default */ ? ts.Diagnostics.Import_default_0_from_module_1 : ts.Diagnostics.Import_0_from_module_1, symbolName, moduleSpecifier]; } default: return ts.Debug.assertNever(fix, "Unexpected fix kind " + fix.kind); } } - function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports) { + function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, canUseTypeOnlyImport) { + var convertTypeOnlyToRegular = !canUseTypeOnlyImport && clause.isTypeOnly; if (defaultImport) { - ts.Debug.assert(!clause.name, "Default imports can't have names"); + ts.Debug.assert(!clause.name, "Cannot add a default import to an import clause that already has one"); changes.insertNodeAt(sourceFile, clause.getStart(sourceFile), ts.createIdentifier(defaultImport), { suffix: ", " }); } if (namedImports.length) { @@ -126901,11 +128823,14 @@ var ts; changes.replaceNode(sourceFile, clause.namedBindings, namedImports_1); } else { - changes.insertNodeAfter(sourceFile, ts.Debug.assertDefined(clause.name, "Named import specifiers must have names"), namedImports_1); + changes.insertNodeAfter(sourceFile, ts.Debug.checkDefined(clause.name, "Import clause must have either named imports or a default import"), namedImports_1); } } } } + if (convertTypeOnlyToRegular) { + changes.delete(sourceFile, ts.getTypeKeywordOfTypeOnlyImport(clause, sourceFile)); + } } function addNamespaceQualifier(changes, sourceFile, _a) { var namespacePrefix = _a.namespacePrefix, position = _a.position; @@ -126919,16 +128844,16 @@ var ts; var quote = ts.getQuoteFromPreference(quotePreference); return "import(" + quote + moduleSpecifier + quote + ")."; } - function addNewImports(changes, sourceFile, typeOnly, moduleSpecifier, quotePreference, _a) { - var defaultImport = _a.defaultImport, namedImports = _a.namedImports, namespaceLikeImport = _a.namespaceLikeImport; + function addNewImports(changes, sourceFile, moduleSpecifier, quotePreference, _a, blankLineBetween) { + var defaultImport = _a.defaultImport, namedImports = _a.namedImports, namespaceLikeImport = _a.namespaceLikeImport, typeOnly = _a.typeOnly; var quotedModuleSpecifier = ts.makeStringLiteral(moduleSpecifier, quotePreference); if (defaultImport !== undefined || namedImports.length) { - ts.insertImport(changes, sourceFile, ts.makeImport(defaultImport === undefined ? undefined : ts.createIdentifier(defaultImport), namedImports.map(function (n) { return ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(n)); }), moduleSpecifier, quotePreference, typeOnly)); + ts.insertImport(changes, sourceFile, ts.makeImport(defaultImport === undefined ? undefined : ts.createIdentifier(defaultImport), namedImports.map(function (n) { return ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(n)); }), moduleSpecifier, quotePreference, typeOnly), /*blankLineBetween*/ blankLineBetween); } if (namespaceLikeImport) { ts.insertImport(changes, sourceFile, namespaceLikeImport.importKind === 3 /* Equals */ ? ts.createImportEqualsDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createIdentifier(namespaceLikeImport.name), ts.createExternalModuleReference(quotedModuleSpecifier)) : namespaceLikeImport.importKind === 4 /* ConstEquals */ ? createConstEqualsRequireDeclaration(namespaceLikeImport.name, quotedModuleSpecifier) : - ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(namespaceLikeImport.name)), typeOnly), quotedModuleSpecifier)); + ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(namespaceLikeImport.name)), typeOnly), quotedModuleSpecifier), /*blankLineBetween*/ blankLineBetween); } } function createConstEqualsRequireDeclaration(name, quotedModuleSpecifier) { @@ -127170,19 +129095,19 @@ var ts; // this.speling = 1; // ^^^^^^^ var node = ts.getTokenAtPosition(sourceFile, pos); + var parent = node.parent; var checker = context.program.getTypeChecker(); var suggestedSymbol; - if (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node) { + if (ts.isPropertyAccessExpression(parent) && parent.name === node) { ts.Debug.assert(ts.isIdentifierOrPrivateIdentifier(node), "Expected an identifier for spelling (property access)"); - var containingType = checker.getTypeAtLocation(node.parent.expression); - if (node.parent.flags & 32 /* OptionalChain */) { + var containingType = checker.getTypeAtLocation(parent.expression); + if (parent.flags & 32 /* OptionalChain */) { containingType = checker.getNonNullableType(containingType); } - var name = node; - suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(name, containingType); + suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); } - else if (ts.isImportSpecifier(node.parent) && node.parent.name === node) { - ts.Debug.assert(node.kind === 75 /* Identifier */, "Expected an identifier for spelling (import)"); + else if (ts.isImportSpecifier(parent) && parent.name === node) { + ts.Debug.assertNode(node, ts.isIdentifier, "Expected an identifier for spelling (import)"); var importDeclaration = ts.findAncestor(node, ts.isImportDeclaration); var resolvedSourceFile = getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration); if (resolvedSourceFile && resolvedSourceFile.symbol) { @@ -127263,7 +129188,7 @@ var ts; var parentDeclaration = info.parentDeclaration, declSourceFile = info.declSourceFile, inJs = info.inJs, makeStatic = info.makeStatic, token = info.token, call = info.call; var methodCodeAction = call && getActionForMethodDeclaration(context, declSourceFile, parentDeclaration, token, call, makeStatic, inJs, context.preferences); var addMember = inJs && !ts.isInterfaceDeclaration(parentDeclaration) ? - ts.singleElementArray(getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, parentDeclaration, token.text, makeStatic)) : + ts.singleElementArray(getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, parentDeclaration, token, makeStatic)) : getActionsForAddMissingMemberInTypeScriptFile(context, declSourceFile, parentDeclaration, token, makeStatic); return ts.concatenate(ts.singleElementArray(methodCodeAction), addMember); }, @@ -127309,7 +129234,7 @@ var ts; } else { if (inJs && !ts.isInterfaceDeclaration(parentDeclaration)) { - addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token.text, makeStatic); + addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token, makeStatic); } else { var typeNode = getTypeNode(program.getTypeChecker(), parentDeclaration, token); @@ -127358,17 +129283,16 @@ var ts; var symbol = leftExpressionType.symbol; if (!symbol || !symbol.declarations) return undefined; - var isClass = ts.find(symbol.declarations, ts.isClassLike); + var classDeclaration = ts.find(symbol.declarations, ts.isClassLike); // Don't suggest adding private identifiers to anything other than a class. - if (!isClass && ts.isPrivateIdentifier(token)) { + if (!classDeclaration && ts.isPrivateIdentifier(token)) { return undefined; } // Prefer to change the class instead of the interface if they are merged - var classOrInterface = isClass || ts.find(symbol.declarations, ts.isInterfaceDeclaration); + var classOrInterface = classDeclaration || ts.find(symbol.declarations, ts.isInterfaceDeclaration); if (classOrInterface && !program.isSourceFileFromExternalLibrary(classOrInterface.getSourceFile())) { var makeStatic = (leftExpressionType.target || leftExpressionType) !== checker.getDeclaredTypeOfSymbol(symbol); - // Static private identifier properties are not supported yet. - if (makeStatic && ts.isPrivateIdentifier(token)) { + if (makeStatic && (ts.isPrivateIdentifier(token) || ts.isInterfaceDeclaration(classOrInterface))) { return undefined; } var declSourceFile = classOrInterface.getSourceFile(); @@ -127382,12 +129306,17 @@ var ts; } return undefined; } - function getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, classDeclaration, tokenName, makeStatic) { - var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingMemberInJs(t, declSourceFile, classDeclaration, tokenName, makeStatic); }); - return changes.length === 0 ? undefined - : codefix.createCodeFixAction(fixName, changes, [makeStatic ? ts.Diagnostics.Initialize_static_property_0 : ts.Diagnostics.Initialize_property_0_in_the_constructor, tokenName], fixId, ts.Diagnostics.Add_all_missing_members); + function getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, classDeclaration, token, makeStatic) { + var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingMemberInJs(t, declSourceFile, classDeclaration, token, makeStatic); }); + if (changes.length === 0) { + return undefined; + } + var diagnostic = makeStatic ? ts.Diagnostics.Initialize_static_property_0 : + ts.isPrivateIdentifier(token) ? ts.Diagnostics.Declare_a_private_field_named_0 : ts.Diagnostics.Initialize_property_0_in_the_constructor; + return codefix.createCodeFixAction(fixName, changes, [diagnostic, token.text], fixId, ts.Diagnostics.Add_all_missing_members); } - function addMissingMemberInJs(changeTracker, declSourceFile, classDeclaration, tokenName, makeStatic) { + function addMissingMemberInJs(changeTracker, declSourceFile, classDeclaration, token, makeStatic) { + var tokenName = token.text; if (makeStatic) { if (classDeclaration.kind === 214 /* ClassExpression */) { return; @@ -127396,6 +129325,21 @@ var ts; var staticInitialization = initializePropertyToUndefined(ts.createIdentifier(className), tokenName); changeTracker.insertNodeAfter(declSourceFile, classDeclaration, staticInitialization); } + else if (ts.isPrivateIdentifier(token)) { + var property = ts.createProperty( + /*decorators*/ undefined, + /*modifiers*/ undefined, tokenName, + /*questionToken*/ undefined, + /*type*/ undefined, + /*initializer*/ undefined); + var lastProp = getNodeToInsertPropertyAfter(classDeclaration); + if (lastProp) { + changeTracker.insertNodeAfter(declSourceFile, lastProp, property); + } + else { + changeTracker.insertNodeAtClassStart(declSourceFile, classDeclaration, property); + } + } else { var classConstructor = ts.getFirstConstructorWithBody(classDeclaration); if (!classConstructor) { @@ -127641,7 +129585,9 @@ var ts; // Note that this is ultimately derived from a map indexed by symbol names, // so duplicates cannot occur. var abstractAndNonPrivateExtendsSymbols = checker.getPropertiesOfType(instantiatedExtendsType).filter(symbolPointsToNonPrivateAndAbstractMember); - codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, context, preferences, function (member) { return changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, member); }); + var importAdder = codefix.createImportAdder(sourceFile, context.program, preferences, context.host); + codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, context, preferences, importAdder, function (member) { return changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, member); }); + importAdder.writeFixes(changeTracker); } function symbolPointsToNonPrivateAndAbstractMember(symbol) { // See `codeFixClassExtendAbstractProtectedProperty.ts` in https://github.com/Microsoft/TypeScript/pull/11547/files @@ -127729,7 +129675,7 @@ var ts; }); function getNode(sourceFile, pos) { var token = ts.getTokenAtPosition(sourceFile, pos); - ts.Debug.assert(token.kind === 129 /* ConstructorKeyword */, "token should be at the constructor keyword"); + ts.Debug.assert(ts.isConstructorDeclaration(token.parent), "token should be at the constructor declaration"); return token.parent; } function doChange(changes, sourceFile, ctr) { @@ -127912,6 +129858,7 @@ var ts; var didYouMeanStaticMemberCode = ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code; var errorCodes = [ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, + ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies.code, didYouMeanStaticMemberCode, ]; codefix.registerCodeFix({ @@ -127934,9 +129881,9 @@ var ts; }); function getInfo(sourceFile, pos, diagCode) { var node = ts.getTokenAtPosition(sourceFile, pos); - if (!ts.isIdentifier(node)) - return undefined; - return { node: node, className: diagCode === didYouMeanStaticMemberCode ? ts.getContainingClass(node).name.text : undefined }; + if (ts.isIdentifier(node)) { + return { node: node, className: diagCode === didYouMeanStaticMemberCode ? ts.getContainingClass(node).name.text : undefined }; + } } function doChange(changes, sourceFile, _a) { var node = _a.node, className = _a.className; @@ -127948,6 +129895,47 @@ var ts; })(ts || (ts = {})); /* @internal */ var ts; +(function (ts) { + var codefix; + (function (codefix) { + var fixIdHtmlEntity = "invalidJsxCharactersConvertToHtmlEntity"; + var fixIdExpression = "invalidJsxCharactersConvertToExpression"; + var errorCodes = [ts.Diagnostics.Unexpected_token_Did_you_mean_or_gt.code, ts.Diagnostics.Unexpected_token_Did_you_mean_or_rbrace.code]; + codefix.registerCodeFix({ + errorCodes: errorCodes, + getCodeActions: function (context) { + var sourceFile = context.sourceFile, span = context.span; + var changeToExpression = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, span.start, /* useHtmlEntity */ false); }); + var changeToHtmlEntity = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, span.start, /* useHtmlEntity */ true); }); + return [ + codefix.createCodeFixActionWithoutFixAll(fixIdExpression, changeToExpression, ts.Diagnostics.Wrap_invalid_character_in_an_expression_container), + codefix.createCodeFixAction(fixIdHtmlEntity, changeToHtmlEntity, ts.Diagnostics.Convert_invalid_character_to_its_html_entity_code, fixIdHtmlEntity, ts.Diagnostics.Convert_invalid_character_to_its_html_entity_code), + ]; + }, + fixIds: [fixIdExpression, fixIdHtmlEntity], + }); + var htmlEntity = { + ">": ">", + "}": "}", + }; + function isValidCharacter(character) { + return ts.hasProperty(htmlEntity, character); + } + function doChange(changes, sourceFile, start, useHtmlEntity) { + var character = sourceFile.getText()[start]; + // sanity check + if (!isValidCharacter(character)) { + return; + } + var replacement = useHtmlEntity + ? htmlEntity[character] + : "{'" + character + "'}"; + changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement); + } + })(codefix = ts.codefix || (ts.codefix = {})); +})(ts || (ts = {})); +/* @internal */ +var ts; (function (ts) { var codefix; (function (codefix) { @@ -128062,7 +130050,7 @@ var ts; return codefix.createCodeFixAction(fixName, changes, diag, fixIdDelete, ts.Diagnostics.Delete_all_unused_declarations); } function deleteTypeParameters(changes, sourceFile, token) { - changes.delete(sourceFile, ts.Debug.assertDefined(ts.cast(token.parent, ts.isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); + changes.delete(sourceFile, ts.Debug.checkDefined(ts.cast(token.parent, ts.isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } // Sometimes the diagnostic span is an entire ImportDeclaration, so we should remove the whole thing. function tryGetFullImport(token) { @@ -128201,16 +130189,25 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, context.span.start, context.span.length); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, context.span.start, context.span.length, context.errorCode); }); return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Remove_unreachable_code, fixId, ts.Diagnostics.Remove_all_unreachable_code)]; }, fixIds: [fixId], - getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return doChange(changes, diag.file, diag.start, diag.length); }); }, + getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return doChange(changes, diag.file, diag.start, diag.length, diag.code); }); }, }); - function doChange(changes, sourceFile, start, length) { + function doChange(changes, sourceFile, start, length, errorCode) { var token = ts.getTokenAtPosition(sourceFile, start); var statement = ts.findAncestor(token, ts.isStatement); - ts.Debug.assert(statement.getStart(sourceFile) === token.getStart(sourceFile), "token and statement should start at the same point"); + if (statement.getStart(sourceFile) !== token.getStart(sourceFile)) { + var logData = JSON.stringify({ + statementKind: ts.Debug.formatSyntaxKind(statement.kind), + tokenKind: ts.Debug.formatSyntaxKind(token.kind), + errorCode: errorCode, + start: start, + length: length + }); + ts.Debug.fail("Token and statement should start at the same point. " + logData); + } var container = (ts.isBlock(statement.parent) ? statement.parent : statement).parent; if (!ts.isBlock(statement.parent) || statement === ts.first(statement.parent.statements)) { switch (container.kind) { @@ -128233,7 +130230,7 @@ var ts; } if (ts.isBlock(statement.parent)) { var end_3 = start + length; - var lastStatement = ts.Debug.assertDefined(lastWhere(ts.sliceAfter(statement.parent.statements, statement), function (s) { return s.pos < end_3; }), "Some statement should be last"); + var lastStatement = ts.Debug.checkDefined(lastWhere(ts.sliceAfter(statement.parent.statements, statement), function (s) { return s.pos < end_3; }), "Some statement should be last"); changes.deleteNodeRange(sourceFile, statement, lastStatement); } else { @@ -128497,14 +130494,15 @@ var ts; * Finds members of the resolved type that are missing in the class pointed to by class decl * and generates source code for the missing members. * @param possiblyMissingSymbols The collection of symbols to filter and then get insertions for. + * @param importAdder If provided, type annotations will use identifier type references instead of ImportTypeNodes, and the missing imports will be added to the importAdder. * @returns Empty string iff there are no member insertions. */ - function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, context, preferences, out) { + function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, context, preferences, importAdder, addClassElement) { var classMembers = classDeclaration.symbol.members; for (var _i = 0, possiblyMissingSymbols_1 = possiblyMissingSymbols; _i < possiblyMissingSymbols_1.length; _i++) { var symbol = possiblyMissingSymbols_1[_i]; if (!classMembers.has(symbol.escapedName)) { - addNewNodeForMemberSymbol(symbol, classDeclaration, context, preferences, out); + addNewNodeForMemberSymbol(symbol, classDeclaration, context, preferences, importAdder, addClassElement); } } } @@ -128530,12 +130528,13 @@ var ts; /** * @returns Empty string iff there we can't figure out a representation for `symbol` in `enclosingDeclaration`. */ - function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, context, preferences, out) { + function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, context, preferences, importAdder, addClassElement) { var declarations = symbol.getDeclarations(); if (!(declarations && declarations.length)) { return undefined; } var checker = context.program.getTypeChecker(); + var scriptTarget = ts.getEmitScriptTarget(context.program.getCompilerOptions()); var declaration = declarations[0]; var name = ts.getSynthesizedDeepClone(ts.getNameOfDeclaration(declaration), /*includeTrivia*/ false); var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration)); @@ -128546,29 +130545,44 @@ var ts; switch (declaration.kind) { case 158 /* PropertySignature */: case 159 /* PropertyDeclaration */: - var typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); - out(ts.createProperty( + var flags = preferences.quotePreference === "single" ? 268435456 /* UseSingleQuotesForStringLiteralType */ : undefined; + var typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); + if (importAdder) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget); + if (importableReference) { + typeNode = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + addClassElement(ts.createProperty( /*decorators*/ undefined, modifiers, name, optional ? ts.createToken(57 /* QuestionToken */) : undefined, typeNode, /*initializer*/ undefined)); break; case 163 /* GetAccessor */: case 164 /* SetAccessor */: { - var allAccessors = ts.getAllAccessorDeclarations(declarations, declaration); var typeNode_1 = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); + var allAccessors = ts.getAllAccessorDeclarations(declarations, declaration); var orderedAccessors = allAccessors.secondAccessor ? [allAccessors.firstAccessor, allAccessors.secondAccessor] : [allAccessors.firstAccessor]; + if (importAdder) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode_1, type, scriptTarget); + if (importableReference) { + typeNode_1 = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } for (var _i = 0, orderedAccessors_1 = orderedAccessors; _i < orderedAccessors_1.length; _i++) { var accessor = orderedAccessors_1[_i]; if (ts.isGetAccessorDeclaration(accessor)) { - out(ts.createGetAccessor( + addClassElement(ts.createGetAccessor( /*decorators*/ undefined, modifiers, name, ts.emptyArray, typeNode_1, ambient ? undefined : createStubbedMethodBody(preferences))); } else { ts.Debug.assertNode(accessor, ts.isSetAccessorDeclaration, "The counterpart to a getter should be a setter"); var parameter = ts.getSetAccessorValueParameter(accessor); var parameterName = parameter && ts.isIdentifier(parameter.name) ? ts.idText(parameter.name) : undefined; - out(ts.createSetAccessor( + addClassElement(ts.createSetAccessor( /*decorators*/ undefined, modifiers, name, createDummyParameters(1, [parameterName], [typeNode_1], 1, /*inJs*/ false), ambient ? undefined : createStubbedMethodBody(preferences))); } } @@ -128605,23 +130619,61 @@ var ts; } else { ts.Debug.assert(declarations.length === signatures.length, "Declarations and signatures should match count"); - out(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); + addClassElement(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); } } break; } function outputMethod(signature, modifiers, name, body) { - var method = signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body); + var method = signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body, importAdder); if (method) - out(method); + addClassElement(method); } } - function signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body) { + function signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body, importAdder) { var program = context.program; - var signatureDeclaration = program.getTypeChecker().signatureToSignatureDeclaration(signature, 161 /* MethodDeclaration */, enclosingDeclaration, 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */, getNoopSymbolTrackerWithResolver(context)); + var checker = program.getTypeChecker(); + var scriptTarget = ts.getEmitScriptTarget(program.getCompilerOptions()); + var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 161 /* MethodDeclaration */, enclosingDeclaration, 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */, getNoopSymbolTrackerWithResolver(context)); if (!signatureDeclaration) { return undefined; } + if (importAdder) { + if (signatureDeclaration.typeParameters) { + ts.forEach(signatureDeclaration.typeParameters, function (typeParameterDecl, i) { + var typeParameter = signature.typeParameters[i]; + if (typeParameterDecl.constraint) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeParameterDecl.constraint, typeParameter.constraint, scriptTarget); + if (importableReference) { + typeParameterDecl.constraint = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + if (typeParameterDecl.default) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeParameterDecl.default, typeParameter.default, scriptTarget); + if (importableReference) { + typeParameterDecl.default = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + }); + } + ts.forEach(signatureDeclaration.parameters, function (parameterDecl, i) { + var parameter = signature.parameters[i]; + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(parameterDecl.type, checker.getTypeAtLocation(parameter.valueDeclaration), scriptTarget); + if (importableReference) { + parameterDecl.type = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + }); + if (signatureDeclaration.type) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(signatureDeclaration.type, signature.resolvedReturnType, scriptTarget); + if (importableReference) { + signatureDeclaration.type = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + } signatureDeclaration.decorators = undefined; signatureDeclaration.modifiers = modifiers; signatureDeclaration.name = name; @@ -128765,6 +130817,49 @@ var ts; return ts.find(obj.properties, function (p) { return ts.isPropertyAssignment(p) && !!p.name && ts.isStringLiteral(p.name) && p.name.text === name; }); } codefix.findJsonProperty = findJsonProperty; + /** + * Given an ImportTypeNode 'import("./a").SomeType>', + * returns an equivalent type reference node with any nested ImportTypeNodes also replaced + * with type references, and a list of symbols that must be imported to use the type reference. + */ + function tryGetAutoImportableReferenceFromImportTypeNode(importTypeNode, type, scriptTarget) { + if (importTypeNode && ts.isLiteralImportTypeNode(importTypeNode) && importTypeNode.qualifier && (!type || type.symbol)) { + // Symbol for the left-most thing after the dot + var firstIdentifier = ts.getFirstIdentifier(importTypeNode.qualifier); + var name = ts.getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget); + var qualifier = name !== firstIdentifier.text + ? replaceFirstIdentifierOfEntityName(importTypeNode.qualifier, ts.createIdentifier(name)) + : importTypeNode.qualifier; + var symbols_4 = [firstIdentifier.symbol]; + var typeArguments_1 = []; + if (importTypeNode.typeArguments) { + importTypeNode.typeArguments.forEach(function (arg) { + var ref = tryGetAutoImportableReferenceFromImportTypeNode(arg, /*undefined*/ type, scriptTarget); + if (ref) { + symbols_4.push.apply(symbols_4, ref.symbols); + typeArguments_1.push(ref.typeReference); + } + else { + typeArguments_1.push(arg); + } + }); + } + return { + symbols: symbols_4, + typeReference: ts.createTypeReferenceNode(qualifier, typeArguments_1) + }; + } + } + codefix.tryGetAutoImportableReferenceFromImportTypeNode = tryGetAutoImportableReferenceFromImportTypeNode; + function replaceFirstIdentifierOfEntityName(name, newIdentifier) { + if (name.kind === 75 /* Identifier */) { + return newIdentifier; + } + return ts.createQualifiedName(replaceFirstIdentifierOfEntityName(name.left, newIdentifier), name.right); + } + function importSymbols(importAdder, symbols) { + symbols.forEach(function (s) { return importAdder.addImportFromExportedSymbol(s, /*usageIsTypeOnly*/ true); }); + } })(codefix = ts.codefix || (ts.codefix = {})); })(ts || (ts = {})); /* @internal */ @@ -129228,7 +131323,7 @@ var ts; if (!importDeclaration) { return; } - var importClause = ts.Debug.assertDefined(importDeclaration.importClause); + var importClause = ts.Debug.checkDefined(importDeclaration.importClause); changes.replaceNode(context.sourceFile, importDeclaration, ts.updateImportDeclaration(importDeclaration, importDeclaration.decorators, importDeclaration.modifiers, ts.updateImportClause(importClause, importClause.name, /*namedBindings*/ undefined, importClause.isTypeOnly), importDeclaration.moduleSpecifier)); changes.insertNodeAfter(context.sourceFile, importDeclaration, ts.createImportDeclaration( /*decorators*/ undefined, @@ -129289,7 +131384,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === actionNameDefaultToNamed || actionName === actionNameNamedToDefault, "Unexpected action name"); - var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, ts.Debug.assertDefined(getInfo(context), "context must have info"), t, context.cancellationToken); }); + var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, ts.Debug.checkDefined(getInfo(context), "context must have info"), t, context.cancellationToken); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; }, }); @@ -129341,10 +131436,10 @@ var ts; function changeExport(exportingSourceFile, _a, changes, checker) { var wasDefault = _a.wasDefault, exportNode = _a.exportNode, exportName = _a.exportName; if (wasDefault) { - changes.delete(exportingSourceFile, ts.Debug.assertDefined(ts.findModifier(exportNode, 84 /* DefaultKeyword */), "Should find a default keyword in modifier list")); + changes.delete(exportingSourceFile, ts.Debug.checkDefined(ts.findModifier(exportNode, 84 /* DefaultKeyword */), "Should find a default keyword in modifier list")); } else { - var exportKeyword = ts.Debug.assertDefined(ts.findModifier(exportNode, 89 /* ExportKeyword */), "Should find an export keyword in modifier list"); + var exportKeyword = ts.Debug.checkDefined(ts.findModifier(exportNode, 89 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { case 244 /* FunctionDeclaration */: case 245 /* ClassDeclaration */: @@ -129355,7 +131450,7 @@ var ts; // If 'x' isn't used in this file, `export const x = 0;` --> `export default 0;` if (!ts.FindAllReferences.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile)) { // We checked in `getInfo` that an initializer exists. - changes.replaceNode(exportingSourceFile, exportNode, ts.createExportDefault(ts.Debug.assertDefined(ts.first(exportNode.declarationList.declarations).initializer, "Initializer was previously known to be present"))); + changes.replaceNode(exportingSourceFile, exportNode, ts.createExportDefault(ts.Debug.checkDefined(ts.first(exportNode.declarationList.declarations).initializer, "Initializer was previously known to be present"))); break; } // falls through @@ -129374,7 +131469,7 @@ var ts; function changeImports(program, _a, changes, cancellationToken) { var wasDefault = _a.wasDefault, exportName = _a.exportName, exportingModuleSymbol = _a.exportingModuleSymbol; var checker = program.getTypeChecker(); - var exportSymbol = ts.Debug.assertDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); + var exportSymbol = ts.Debug.checkDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); ts.FindAllReferences.Core.eachExportReference(program.getSourceFiles(), checker, cancellationToken, exportSymbol, exportingModuleSymbol, exportName.text, wasDefault, function (ref) { var importingSourceFile = ref.getSourceFile(); if (wasDefault) { @@ -129485,7 +131580,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === actionNameNamespaceToNamed || actionName === actionNameNamedToNamespace, "Unexpected action name"); - var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, t, ts.Debug.assertDefined(getImportToConvert(context), "Context must provide an import to convert")); }); + var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, t, ts.Debug.checkDefined(getImportToConvert(context), "Context must provide an import to convert")); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; } }); @@ -129964,6 +132059,7 @@ var ts; permittedJumps = 4 /* Return */; } break; + case 278 /* DefaultClause */: case 277 /* CaseClause */: // allow unlabeled break inside case clauses permittedJumps |= 1 /* Break */; @@ -130742,7 +132838,7 @@ var ts; return curr.parent.parent; } // There must be at least one statement since we started in one. - return ts.Debug.assertDefined(prevStatement, "prevStatement failed to get set"); + return ts.Debug.checkDefined(prevStatement, "prevStatement failed to get set"); } ts.Debug.assert(curr !== scope, "Didn't encounter a block-like before encountering scope"); } @@ -131187,7 +133283,7 @@ var ts; }, getEditsForAction: function (context, actionName) { var file = context.file; - var info = ts.Debug.assertDefined(getRangeToExtract(context), "Expected to find a range to extract"); + var info = ts.Debug.checkDefined(getRangeToExtract(context), "Expected to find a range to extract"); var name = ts.getUniqueName("NewType", file); var edits = ts.textChanges.ChangeTracker.with(context, function (changes) { switch (actionName) { @@ -131218,7 +133314,7 @@ var ts; if (!selection || !ts.isTypeNode(selection)) return undefined; var checker = context.program.getTypeChecker(); - var firstStatement = ts.Debug.assertDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); + var firstStatement = ts.Debug.checkDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); var typeParameters = collectTypeParameters(checker, selection, firstStatement, file); if (!typeParameters) return undefined; @@ -131314,7 +133410,7 @@ var ts; } function doTypedefChange(changes, file, name, info) { var firstStatement = info.firstStatement, selection = info.selection, typeParameters = info.typeParameters; - var node = ts.createNode(321 /* JSDocTypedefTag */); + var node = ts.createNode(322 /* JSDocTypedefTag */); node.tagName = ts.createIdentifier("typedef"); // TODO: jsdoc factory https://github.com/Microsoft/TypeScript/pull/29539 node.fullName = ts.createIdentifier(name); node.name = node.fullName; @@ -131322,7 +133418,7 @@ var ts; var templates = []; ts.forEach(typeParameters, function (typeParameter) { var constraint = ts.getEffectiveConstraintOfTypeParameter(typeParameter); - var template = ts.createNode(320 /* JSDocTemplateTag */); + var template = ts.createNode(321 /* JSDocTemplateTag */); template.tagName = ts.createIdentifier("template"); template.constraint = constraint && ts.cast(constraint, ts.isJSDocTypeExpression); var parameter = ts.createNode(155 /* TypeParameter */); @@ -131526,7 +133622,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === refactorName, "Wrong refactor invoked"); - var statements = ts.Debug.assertDefined(getStatementsToMove(context)); + var statements = ts.Debug.checkDefined(getStatementsToMove(context)); var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, statements, t, context.host, context.preferences); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; } @@ -131616,7 +133712,7 @@ var ts; var quotePreference = ts.getQuotePreference(oldFile, preferences); var importsFromNewFile = createOldFileImportsFromNewFile(usage.oldFileImportsFromNewFile, newModuleName, useEs6ModuleSyntax, quotePreference); if (importsFromNewFile) { - ts.insertImport(changes, oldFile, importsFromNewFile); + ts.insertImport(changes, oldFile, importsFromNewFile, /*blankLineBetween*/ true); } deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker); deleteMovedStatements(oldFile, toMove.ranges, changes); @@ -131783,7 +133879,7 @@ var ts; return ts.flatMap(toMove, function (statement) { if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && - forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.assertDefined(d.symbol)); })) { + forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { var exports = addExport(statement, useEs6Exports); if (exports) return exports; @@ -131920,7 +134016,7 @@ var ts; for (var _i = 0, toMove_1 = toMove; _i < toMove_1.length; _i++) { var statement = toMove_1[_i]; forEachTopLevelDeclaration(statement, function (decl) { - movedSymbols.add(ts.Debug.assertDefined(ts.isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); + movedSymbols.add(ts.Debug.checkDefined(ts.isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); }); } for (var _a = 0, toMove_2 = toMove; _a < toMove_2.length; _a++) { @@ -132750,7 +134846,7 @@ var ts; return [classDeclaration.name]; // If the class declaration doesn't have a name, it should have a default modifier. // We validated this in `isValidFunctionDeclaration` through `hasNameOrDefault` - var defaultModifier = ts.Debug.assertDefined(ts.findModifier(classDeclaration, 84 /* DefaultKeyword */), "Nameless class declaration should be a default export"); + var defaultModifier = ts.Debug.checkDefined(ts.findModifier(classDeclaration, 84 /* DefaultKeyword */), "Nameless class declaration should be a default export"); return [defaultModifier]; case 214 /* ClassExpression */: var classExpression = constructorDeclaration.parent; @@ -132768,12 +134864,12 @@ var ts; return [functionDeclaration.name]; // If the function declaration doesn't have a name, it should have a default modifier. // We validated this in `isValidFunctionDeclaration` through `hasNameOrDefault` - var defaultModifier = ts.Debug.assertDefined(ts.findModifier(functionDeclaration, 84 /* DefaultKeyword */), "Nameless function declaration should be a default export"); + var defaultModifier = ts.Debug.checkDefined(ts.findModifier(functionDeclaration, 84 /* DefaultKeyword */), "Nameless function declaration should be a default export"); return [defaultModifier]; case 161 /* MethodDeclaration */: return [functionDeclaration.name]; case 162 /* Constructor */: - var ctrKeyword = ts.Debug.assertDefined(ts.findChildOfKind(functionDeclaration, 129 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword"); + var ctrKeyword = ts.Debug.checkDefined(ts.findChildOfKind(functionDeclaration, 129 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword"); if (functionDeclaration.parent.kind === 214 /* ClassExpression */) { var variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; @@ -132807,7 +134903,7 @@ var ts; var node = getNodeOrParentOfParentheses(file, startPosition); var maybeBinary = getParentBinaryExpression(node); var refactorInfo = { name: refactorName, description: refactorDescription, actions: [] }; - if ((ts.isBinaryExpression(maybeBinary) || ts.isStringLiteral(maybeBinary)) && isStringConcatenationValid(maybeBinary)) { + if (ts.isBinaryExpression(maybeBinary) && isStringConcatenationValid(maybeBinary)) { refactorInfo.actions.push({ name: refactorName, description: refactorDescription }); return [refactorInfo]; } @@ -133032,7 +135128,7 @@ var ts; if (!children.length) { return undefined; } - var child = ts.find(children, function (kid) { return kid.kind < 294 /* FirstJSDocNode */ || kid.kind > 322 /* LastJSDocNode */; }); + var child = ts.find(children, function (kid) { return kid.kind < 294 /* FirstJSDocNode */ || kid.kind > 323 /* LastJSDocNode */; }); return child.kind < 153 /* FirstNode */ ? child : child.getFirstToken(sourceFile); @@ -133102,7 +135198,7 @@ var ts; } } function createSyntaxList(nodes, parent) { - var list = createNode(323 /* SyntaxList */, nodes.pos, nodes.end, parent); + var list = createNode(324 /* SyntaxList */, nodes.pos, nodes.end, parent); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { @@ -133715,10 +135811,6 @@ var ts; }); return names; }; - HostCache.prototype.getVersion = function (path) { - var file = this.getHostFileInformation(path); - return (file && file.version); // TODO: GH#18217 - }; HostCache.prototype.getScriptSnapshot = function (path) { var file = this.getHostFileInformation(path); return (file && file.scriptSnapshot); // TODO: GH#18217 @@ -133925,7 +136017,7 @@ var ts; var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse; var projectReferences = hostCache.getProjectReferences(); // If the program is already up-to-date, we can reuse it - if (ts.isProgramUptoDate(program, rootFileNames, hostCache.compilationSettings(), function (path) { return hostCache.getVersion(path); }, fileExists, hasInvalidatedResolution, !!host.hasChangedAutomaticTypeDirectiveNames, projectReferences)) { + if (ts.isProgramUptoDate(program, rootFileNames, hostCache.compilationSettings(), function (_path, fileName) { return host.getScriptVersion(fileName); }, fileExists, hasInvalidatedResolution, !!host.hasChangedAutomaticTypeDirectiveNames, projectReferences)) { return; } // IMPORTANT - It is critical from this moment onward that we do not check @@ -133955,7 +136047,7 @@ var ts; return host.getDirectories ? host.getDirectories(path) : []; }, readDirectory: function (path, extensions, exclude, include, depth) { - ts.Debug.assertDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + ts.Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return host.readDirectory(path, extensions, exclude, include, depth); }, onReleaseOldSourceFile: onReleaseOldSourceFile, @@ -134147,9 +136239,10 @@ var ts; return ts.Completions.getCompletionEntryDetails(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host, (formattingOptions && ts.formatting.getFormatContext(formattingOptions)), // TODO: GH#18217 preferences, cancellationToken); } - function getCompletionEntrySymbol(fileName, position, name, source) { + function getCompletionEntrySymbol(fileName, position, name, source, preferences) { + if (preferences === void 0) { preferences = ts.emptyOptions; } synchronizeHostData(); - return ts.Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host); + return ts.Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host, preferences); } function getQuickInfoAtPosition(fileName, position) { synchronizeHostData(); @@ -134240,7 +136333,7 @@ var ts; function findRenameLocations(fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); + var node = ts.getAdjustedRenameLocation(ts.getTouchingPropertyName(sourceFile, position)); if (ts.isIdentifier(node) && (ts.isJsxOpeningElement(node.parent) || ts.isJsxClosingElement(node.parent)) && ts.isIntrinsicJsxName(node.escapedText)) { var _a = node.parent.parent, openingElement = _a.openingElement, closingElement = _a.closingElement; return [openingElement, closingElement].map(function (node) { @@ -134249,17 +136342,17 @@ var ts; }); } else { - return getReferencesWorker(node, position, { findInStrings: findInStrings, findInComments: findInComments, providePrefixAndSuffixTextForRename: providePrefixAndSuffixTextForRename, isForRename: true }, function (entry, originalNode, checker) { return ts.FindAllReferences.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false); }); + return getReferencesWorker(node, position, { findInStrings: findInStrings, findInComments: findInComments, providePrefixAndSuffixTextForRename: providePrefixAndSuffixTextForRename, use: 2 /* Rename */ }, function (entry, originalNode, checker) { return ts.FindAllReferences.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false); }); } } function getReferencesAtPosition(fileName, position) { synchronizeHostData(); - return getReferencesWorker(ts.getTouchingPropertyName(getValidSourceFile(fileName), position), position, {}, ts.FindAllReferences.toReferenceEntry); + return getReferencesWorker(ts.getTouchingPropertyName(getValidSourceFile(fileName), position), position, { use: 1 /* References */ }, ts.FindAllReferences.toReferenceEntry); } function getReferencesWorker(node, position, options, cb) { synchronizeHostData(); // Exclude default library when renaming as commonly user don't want to change that file. - var sourceFiles = options && options.isForRename + var sourceFiles = options && options.use === 2 /* Rename */ ? program.getSourceFiles().filter(function (sourceFile) { return !program.isSourceFileDefaultLibrary(sourceFile); }) : program.getSourceFiles(); return ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, cb); @@ -134760,6 +136853,7 @@ var ts; getEditsForRefactor: getEditsForRefactor, toLineColumnOffset: sourceMapper.toLineColumnOffset, getSourceMapper: function () { return sourceMapper; }, + clearSourceMapperCache: function () { return sourceMapper.clearCache(); }, prepareCallHierarchy: prepareCallHierarchy, provideCallHierarchyIncomingCalls: provideCallHierarchyIncomingCalls, provideCallHierarchyOutgoingCalls: provideCallHierarchyOutgoingCalls @@ -136001,8 +138095,8 @@ var ts; return this.forwardJSONCall("getDocumentHighlights('" + fileName + "', " + position + ")", function () { var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch)); // workaround for VS document highlighting issue - keep only items from the initial file - var normalizedName = ts.normalizeSlashes(fileName).toLowerCase(); - return ts.filter(results, function (r) { return ts.normalizeSlashes(r.fileName).toLowerCase() === normalizedName; }); + var normalizedName = ts.toFileNameLowerCase(ts.normalizeSlashes(fileName)); + return ts.filter(results, function (r) { return ts.toFileNameLowerCase(ts.normalizeSlashes(r.fileName)) === normalizedName; }); }); }; /// COMPLETION LISTS @@ -136298,7 +138392,7 @@ var ts; }()); ts.TypeScriptServicesFactory = TypeScriptServicesFactory; })(ts || (ts = {})); -/* eslint-enable no-in-operator */ +/* eslint-enable no-in-operator */ // We polyfill `globalThis` here so re can reliably patch the global scope // in the contexts we want to in the same way across script and module formats /* eslint-enable no-var */ @@ -137374,6 +139468,8 @@ var ts; /*@internal*/ function isDynamicFileName(fileName) { return fileName[0] === "^" || + ((ts.stringContains(fileName, "walkThroughSnippet:/") || ts.stringContains(fileName, "untitled:/")) && + ts.getBaseFileName(fileName)[0] === "^") || (ts.stringContains(fileName, ":^") && !ts.stringContains(fileName, ts.directorySeparator)); } server.isDynamicFileName = isDynamicFileName; @@ -137595,6 +139691,8 @@ var ts; } }; ScriptInfo.prototype.getLatestVersion = function () { + // Ensure we have updated snapshot to give back latest version + this.textStorage.getSnapshot(); return this.textStorage.getVersion(); }; ScriptInfo.prototype.saveTo = function (fileName) { @@ -138051,7 +140149,8 @@ var ts; return (info && info.scriptKind); // TODO: GH#18217 }; Project.prototype.getScriptVersion = function (filename) { - var info = this.getOrCreateScriptInfoAndAttachToProject(filename); + // Don't attach to the project if version is asked + var info = this.projectService.getOrCreateScriptInfoNotOpenedByClient(filename, this.currentDirectory, this.directoryStructureHost); return (info && info.getLatestVersion()); // TODO: GH#18217 }; Project.prototype.getScriptSnapshot = function (filename) { @@ -138175,6 +140274,10 @@ var ts; Project.prototype.getSourceMapper = function () { return this.getLanguageService().getSourceMapper(); }; + /** @internal */ + Project.prototype.clearSourceMapperCache = function () { + this.languageService.clearSourceMapperCache(); + }; /*@internal*/ Project.prototype.getDocumentPositionMapper = function (generatedFileName, sourceFileName) { return this.projectService.getDocumentPositionMapper(this, generatedFileName, sourceFileName); @@ -138402,6 +140505,14 @@ var ts; } return result; }; + /* @internal */ + Project.prototype.getFileNamesWithRedirectInfo = function (includeProjectReferenceRedirectInfo) { + var _this = this; + return this.getFileNames().map(function (fileName) { return ({ + fileName: fileName, + isSourceOfProjectReferenceRedirect: includeProjectReferenceRedirectInfo && _this.isSourceOfProjectReferenceRedirect(fileName) + }); }); + }; Project.prototype.hasConfigFile = function (configFilePath) { if (this.program && this.languageServiceEnabled) { var configFile = this.program.getCompilerOptions().configFile; @@ -138762,7 +140873,10 @@ var ts; var _this = this; return { generatedFilePath: this.toPath(generatedFile), - watcher: this.projectService.watchFactory.watchFile(this.projectService.host, generatedFile, function () { return _this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(_this); }, ts.PollingInterval.High, this.projectService.getWatchOptions(this), ts.WatchType.MissingGeneratedFile, this) + watcher: this.projectService.watchFactory.watchFile(this.projectService.host, generatedFile, function () { + _this.clearSourceMapperCache(); + _this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(_this); + }, ts.PollingInterval.High, this.projectService.getWatchOptions(this), ts.WatchType.MissingGeneratedFile, this) }; }; Project.prototype.isValidGeneratedFileWatcher = function (generateFile, watcher) { @@ -138834,7 +140948,17 @@ var ts; return this.watchOptions; }; /* @internal */ - Project.prototype.getChangesSinceVersion = function (lastKnownVersion) { + Project.prototype.getChangesSinceVersion = function (lastKnownVersion, includeProjectReferenceRedirectInfo) { + var _this = this; + var includeProjectReferenceRedirectInfoIfRequested = includeProjectReferenceRedirectInfo + ? function (files) { return ts.arrayFrom(files.entries(), function (_a) { + var fileName = _a[0], isSourceOfProjectReferenceRedirect = _a[1]; + return ({ + fileName: fileName, + isSourceOfProjectReferenceRedirect: isSourceOfProjectReferenceRedirect + }); + }); } + : function (files) { return ts.arrayFrom(files.keys()); }; // Update the graph only if initial configured project load is not pending if (!this.isInitialLoadPending()) { server.updateProjectIfDirty(this); @@ -138857,33 +140981,64 @@ var ts; } // compute and return the difference var lastReportedFileNames_1 = this.lastReportedFileNames; - var externalFiles = this.getExternalFiles().map(function (f) { return server.toNormalizedPath(f); }); - var currentFiles_1 = ts.arrayToSet(this.getFileNames().concat(externalFiles)); - var added_1 = []; - var removed_1 = []; + var externalFiles = this.getExternalFiles().map(function (f) { return ({ + fileName: server.toNormalizedPath(f), + isSourceOfProjectReferenceRedirect: false + }); }); + var currentFiles_1 = ts.arrayToMap(this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo).concat(externalFiles), function (info) { return info.fileName; }, function (info) { return info.isSourceOfProjectReferenceRedirect; }); + var added_1 = new ts.Map(); + var removed_1 = new ts.Map(); var updated = updatedFileNames ? ts.arrayFrom(updatedFileNames.keys()) : []; - ts.forEachKey(currentFiles_1, function (id) { - if (!lastReportedFileNames_1.has(id)) { - added_1.push(id); + var updatedRedirects_1 = []; + ts.forEachEntry(currentFiles_1, function (isSourceOfProjectReferenceRedirect, fileName) { + if (!lastReportedFileNames_1.has(fileName)) { + added_1.set(fileName, isSourceOfProjectReferenceRedirect); + } + else if (includeProjectReferenceRedirectInfo && isSourceOfProjectReferenceRedirect !== lastReportedFileNames_1.get(fileName)) { + updatedRedirects_1.push({ + fileName: fileName, + isSourceOfProjectReferenceRedirect: isSourceOfProjectReferenceRedirect + }); } }); - ts.forEachKey(lastReportedFileNames_1, function (id) { - if (!currentFiles_1.has(id)) { - removed_1.push(id); + ts.forEachEntry(lastReportedFileNames_1, function (isSourceOfProjectReferenceRedirect, fileName) { + if (!currentFiles_1.has(fileName)) { + removed_1.set(fileName, isSourceOfProjectReferenceRedirect); } }); this.lastReportedFileNames = currentFiles_1; this.lastReportedVersion = this.projectProgramVersion; - return { info: info, changes: { added: added_1, removed: removed_1, updated: updated }, projectErrors: this.getGlobalProjectErrors() }; + return { + info: info, + changes: { + added: includeProjectReferenceRedirectInfoIfRequested(added_1), + removed: includeProjectReferenceRedirectInfoIfRequested(removed_1), + updated: includeProjectReferenceRedirectInfo + ? updated.map(function (fileName) { return ({ + fileName: fileName, + isSourceOfProjectReferenceRedirect: _this.isSourceOfProjectReferenceRedirect(fileName) + }); }) + : updated, + updatedRedirects: includeProjectReferenceRedirectInfo ? updatedRedirects_1 : undefined + }, + projectErrors: this.getGlobalProjectErrors() + }; } else { // unknown version - return everything - var projectFileNames = this.getFileNames(); - var externalFiles = this.getExternalFiles().map(function (f) { return server.toNormalizedPath(f); }); + var projectFileNames = this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo); + var externalFiles = this.getExternalFiles().map(function (f) { return ({ + fileName: server.toNormalizedPath(f), + isSourceOfProjectReferenceRedirect: false + }); }); var allFiles = projectFileNames.concat(externalFiles); - this.lastReportedFileNames = ts.arrayToSet(allFiles); + this.lastReportedFileNames = ts.arrayToMap(allFiles, function (info) { return info.fileName; }, function (info) { return info.isSourceOfProjectReferenceRedirect; }); this.lastReportedVersion = this.projectProgramVersion; - return { info: info, files: allFiles, projectErrors: this.getGlobalProjectErrors() }; + return { + info: info, + files: includeProjectReferenceRedirectInfo ? allFiles : allFiles.map(function (f) { return f.fileName; }), + projectErrors: this.getGlobalProjectErrors() + }; } }; // remove a root file from project @@ -139170,7 +141325,7 @@ var ts; server.InferredProject = InferredProject; /** * If a file is opened, the server will look for a tsconfig (or jsconfig) - * and if successfull create a ConfiguredProject for it. + * and if successful create a ConfiguredProject for it. * Otherwise it will create an InferredProject. */ var ConfiguredProject = /** @class */ (function (_super) { @@ -139376,7 +141531,7 @@ var ts; break; case ts.ConfigFileProgramReloadLevel.Full: this.openFileWatchTriggered.clear(); - var reason = ts.Debug.assertDefined(this.pendingReloadReason); + var reason = ts.Debug.checkDefined(this.pendingReloadReason); this.pendingReloadReason = undefined; this.projectService.reloadConfiguredProject(this, reason); result = true; @@ -139860,7 +142015,7 @@ var ts; */ this.projectToSizeMap = ts.createMap(); /** - * This is a map of config file paths existance that doesnt need query to disk + * This is a map of config file paths existence that doesnt need query to disk * - The entry can be present because there is inferred project that needs to watch addition of config file to directory * In this case the exists could be true/false based on config file is present or not * - Or it is present if we have configured project open with config file at that location @@ -139931,7 +142086,7 @@ var ts; }; /*@internal*/ ProjectService.prototype.setDocument = function (key, path, sourceFile) { - var info = ts.Debug.assertDefined(this.getScriptInfoForPath(path)); + var info = ts.Debug.checkDefined(this.getScriptInfoForPath(path)); info.cacheSourceFile = { key: key, sourceFile: sourceFile }; }; /*@internal*/ @@ -140094,10 +142249,13 @@ var ts; this.delayUpdateProjectGraph(project); this.delayEnsureProjectForOpenFiles(); }; - ProjectService.prototype.delayUpdateProjectGraphs = function (projects) { + ProjectService.prototype.delayUpdateProjectGraphs = function (projects, clearSourceMapperCache) { if (projects.length) { for (var _i = 0, projects_2 = projects; _i < projects_2.length; _i++) { var project = projects_2[_i]; + // Even if program doesnt change, clear the source mapper cache + if (clearSourceMapperCache) + project.clearSourceMapperCache(); this.delayUpdateProjectGraph(project); } this.delayEnsureProjectForOpenFiles(); @@ -140236,7 +142394,7 @@ var ts; // file has been changed which might affect the set of referenced files in projects that include // this file and set of inferred projects info.delayReloadNonMixedContentFile(); - this.delayUpdateProjectGraphs(info.containingProjects); + this.delayUpdateProjectGraphs(info.containingProjects, /*clearSourceMapperCache*/ false); this.handleSourceMapProjects(info); } } @@ -140267,7 +142425,7 @@ var ts; ProjectService.prototype.delayUpdateProjectsOfScriptInfoPath = function (path) { var info = this.getScriptInfoForPath(path); if (info) { - this.delayUpdateProjectGraphs(info.containingProjects); + this.delayUpdateProjectGraphs(info.containingProjects, /*clearSourceMapperCache*/ true); } }; ProjectService.prototype.handleDeletedFile = function (info) { @@ -140278,7 +142436,7 @@ var ts; var containingProjects = info.containingProjects.slice(); info.detachAllProjects(); // update projects to make sure that set of referenced files is correct - this.delayUpdateProjectGraphs(containingProjects); + this.delayUpdateProjectGraphs(containingProjects, /*clearSourceMapperCache*/ false); this.handleSourceMapProjects(info); info.closeSourceMapFileWatcher(); // need to recalculate source map from declaration file @@ -140302,7 +142460,14 @@ var ts; // don't trigger callback on open, existing files if (project.fileIsOpen(fileOrDirectoryPath)) { if (project.pendingReload !== ts.ConfigFileProgramReloadLevel.Full) { - project.openFileWatchTriggered.set(fileOrDirectoryPath, true); + var info = ts.Debug.checkDefined(_this.getScriptInfoForPath(fileOrDirectoryPath)); + if (info.isAttached(project)) { + project.openFileWatchTriggered.set(fileOrDirectoryPath, true); + } + else { + project.pendingReload = ts.ConfigFileProgramReloadLevel.Partial; + _this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); + } } return; } @@ -140413,7 +142578,13 @@ var ts; ts.Debug.assert(info.isOrphan()); var project = this.getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) || this.getOrCreateSingleInferredProjectIfEnabled() || - this.getOrCreateSingleInferredWithoutProjectRoot(info.isDynamic ? projectRootPath || this.currentDirectory : ts.getDirectoryPath(info.path)); + this.getOrCreateSingleInferredWithoutProjectRoot(info.isDynamic ? + projectRootPath || this.currentDirectory : + ts.getDirectoryPath(ts.isRootedDiskPath(info.fileName) ? + info.fileName : + ts.getNormalizedAbsolutePath(info.fileName, projectRootPath ? + this.getNormalizedAbsolutePath(projectRootPath) : + this.currentDirectory))); project.addRoot(info); if (info.containingProjects[0] !== project) { // Ensure this is first project, we could be in this scenario because info could be part of orphan project @@ -140567,7 +142738,7 @@ var ts; ProjectService.prototype.setConfigFileExistenceByNewConfiguredProject = function (project) { var configFileExistenceInfo = this.getConfigFileExistenceInfo(project); if (configFileExistenceInfo) { - // The existance might not be set if the file watcher is not invoked by the time config project is created by external project + // The existence might not be set if the file watcher is not invoked by the time config project is created by external project configFileExistenceInfo.exists = true; // close existing watcher if (configFileExistenceInfo.configFileWatcherForRootOfInferredProject) { @@ -140745,7 +142916,7 @@ var ts; } ts.Debug.assert(!isOpenScriptInfo(info) || this.openFiles.has(info.path)); var projectRootPath = this.openFiles.get(info.path); - var scriptInfo = ts.Debug.assertDefined(this.getScriptInfo(info.path)); + var scriptInfo = ts.Debug.checkDefined(this.getScriptInfo(info.path)); if (scriptInfo.isDynamic) return undefined; var searchPath = server.asNormalizedPath(ts.getDirectoryPath(info.fileName)); @@ -141047,7 +143218,7 @@ var ts; else { var scriptKind = propertyReader.getScriptKind(f, this.hostConfiguration.extraFileExtensions); var hasMixedContent = propertyReader.hasMixedContent(f, this.hostConfiguration.extraFileExtensions); - var scriptInfo = ts.Debug.assertDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(fileName, project.currentDirectory, scriptKind, hasMixedContent, project.directoryStructureHost)); + var scriptInfo = ts.Debug.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(fileName, project.currentDirectory, scriptKind, hasMixedContent, project.directoryStructureHost)); path = scriptInfo.path; var existingValue = projectRootFilesMap.get(path); // If this script info is not already a root add it @@ -141418,7 +143589,7 @@ var ts; this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(fileName), info); } } - if (openedByClient && !info.isScriptOpen()) { + if (openedByClient) { // Opening closed script info // either it was created just now, or was part of projects but was closed this.stopWatchingScriptInfo(info); @@ -141427,9 +143598,6 @@ var ts; info.registerFileUpdate(); } } - else { - ts.Debug.assert(fileContent === undefined); - } return info; }; /** @@ -141527,7 +143695,7 @@ var ts; var declarationInfo = _this.getScriptInfoForPath(declarationInfoPath); if (declarationInfo && declarationInfo.sourceMapFilePath && !ts.isString(declarationInfo.sourceMapFilePath)) { // Update declaration and source projects - _this.delayUpdateProjectGraphs(declarationInfo.containingProjects); + _this.delayUpdateProjectGraphs(declarationInfo.containingProjects, /*clearSourceMapperCache*/ true); _this.delayUpdateSourceInfoProjects(declarationInfo.sourceMapFilePath.sourceInfos); declarationInfo.closeSourceMapFileWatcher(); } @@ -141702,7 +143870,7 @@ var ts; // since info is added as root to the inferred project only when there are no other projects containing it // So when it is root of the inferred project and after project structure updates its now part // of multiple project it needs to be removed from that inferred project because: - // - references in inferred project supercede the root part + // - references in inferred project supersede the root part // - root / reference in non - inferred project beats root in inferred project // eg. say this is structure /a/b/a.ts /a/b/c.ts where c.ts references a.ts // When a.ts is opened, since there is no configured project/external project a.ts can be part of @@ -142046,8 +144214,9 @@ var ts; if (!project.languageServiceEnabled) { return; } - var info = { checkJs: !!project.getSourceFile(scriptInfo.path).checkJsDirective }; - this.eventHandler({ eventName: server.OpenFileInfoTelemetryEvent, data: { info: info } }); + var sourceFile = project.getSourceFile(scriptInfo.path); + var checkJs = !!sourceFile && !!sourceFile.checkJsDirective; + this.eventHandler({ eventName: server.OpenFileInfoTelemetryEvent, data: { info: { checkJs: checkJs } } }); }; ProjectService.prototype.closeClientFile = function (uncheckedFileName, skipAssignOrphanScriptInfosToInferredProject) { var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(uncheckedFileName)); @@ -142057,10 +144226,10 @@ var ts; } return result; }; - ProjectService.prototype.collectChanges = function (lastKnownProjectVersions, currentProjects, result) { + ProjectService.prototype.collectChanges = function (lastKnownProjectVersions, currentProjects, includeProjectReferenceRedirectInfo, result) { var _loop_5 = function (proj) { var knownProject = ts.find(lastKnownProjectVersions, function (p) { return p.projectName === proj.getProjectName(); }); - result.push(proj.getChangesSinceVersion(knownProject && knownProject.version)); + result.push(proj.getChangesSinceVersion(knownProject && knownProject.version, includeProjectReferenceRedirectInfo)); }; for (var _i = 0, currentProjects_1 = currentProjects; _i < currentProjects_1.length; _i++) { var proj = currentProjects_1[_i]; @@ -142068,11 +144237,11 @@ var ts; } }; /* @internal */ - ProjectService.prototype.synchronizeProjectList = function (knownProjects) { + ProjectService.prototype.synchronizeProjectList = function (knownProjects, includeProjectReferenceRedirectInfo) { var files = []; - this.collectChanges(knownProjects, this.externalProjects, files); - this.collectChanges(knownProjects, ts.arrayFrom(this.configuredProjects.values()), files); - this.collectChanges(knownProjects, this.inferredProjects, files); + this.collectChanges(knownProjects, this.externalProjects, includeProjectReferenceRedirectInfo, files); + this.collectChanges(knownProjects, ts.arrayFrom(this.configuredProjects.values()), includeProjectReferenceRedirectInfo, files); + this.collectChanges(knownProjects, this.inferredProjects, includeProjectReferenceRedirectInfo, files); return files; }; /* @internal */ @@ -142086,10 +144255,8 @@ var ts; if (iterResult.done) break; var file = iterResult.value; - var scriptInfo = this.getScriptInfo(file.fileName); - ts.Debug.assert(!scriptInfo || !scriptInfo.isScriptOpen(), "Script should not exist and not be open already"); // Create script infos so we have the new content for all the open files before we do any updates to projects - var info = this.getOrCreateOpenScriptInfo(scriptInfo ? scriptInfo.fileName : server.toNormalizedPath(file.fileName), file.content, tryConvertScriptKindName(file.scriptKind), file.hasMixedContent, file.projectRootPath ? server.toNormalizedPath(file.projectRootPath) : undefined); + var info = this.getOrCreateOpenScriptInfo(server.toNormalizedPath(file.fileName), file.content, tryConvertScriptKindName(file.scriptKind), file.hasMixedContent, file.projectRootPath ? server.toNormalizedPath(file.projectRootPath) : undefined); (openScriptInfos || (openScriptInfos = [])).push(info); } } @@ -142279,7 +144446,7 @@ var ts; else { var exclude = false; if (typeAcquisition.enable || typeAcquisition.enableAutoDiscovery) { - var baseName = ts.getBaseFileName(normalizedNames[i].toLowerCase()); + var baseName = ts.getBaseFileName(ts.toFileNameLowerCase(normalizedNames[i])); if (ts.fileExtensionIs(baseName, "js")) { var inferredTypingName = ts.removeFileExtension(baseName); var cleanedTypingName = ts.removeMinAndVersionNumbers(inferredTypingName); @@ -142831,7 +144998,7 @@ var ts; } } while (toDo && toDo.length) { - toDo = callbackProjectAndLocation(ts.Debug.assertDefined(toDo.pop()), projectService, toDo, seenProjects, cb); + toDo = callbackProjectAndLocation(ts.Debug.checkDefined(toDo.pop()), projectService, toDo, seenProjects, cb); } } function mapDefinitionInProject(definition, definingProject, project) { @@ -142960,7 +145127,7 @@ var ts; return _this.requiredResponse(/*response*/ true); }, _a[server.CommandNames.SynchronizeProjectList] = function (request) { - var result = _this.projectService.synchronizeProjectList(request.arguments.knownProjects); + var result = _this.projectService.synchronizeProjectList(request.arguments.knownProjects, request.arguments.includeProjectReferenceRedirectInfo); if (!result.some(function (p) { return p.projectErrors && p.projectErrors.length !== 0; })) { return _this.requiredResponse(result); } @@ -142987,7 +145154,7 @@ var ts; }); }), request.arguments.changedFiles && ts.mapIterator(ts.arrayIterator(request.arguments.changedFiles), function (file) { return ({ fileName: file.fileName, changes: ts.mapDefinedIterator(ts.arrayReverseIterator(file.textChanges), function (change) { - var scriptInfo = ts.Debug.assertDefined(_this.projectService.getScriptInfo(file.fileName)); + var scriptInfo = ts.Debug.checkDefined(_this.projectService.getScriptInfo(file.fileName)); var start = scriptInfo.lineOffsetToPosition(change.start.line, change.start.offset); var end = scriptInfo.lineOffsetToPosition(change.end.line, change.end.offset); return start >= 0 ? { span: { start: start, length: end - start }, newText: change.newText } : undefined; @@ -143391,9 +145558,8 @@ var ts; this.projectService.logger.info("got projects updated in background, updating diagnostics for " + openFiles); if (openFiles.length) { if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) { - var checkList_1 = this.createCheckList(openFiles); // For now only queue error checking for open files. We can change this to include non open files as well - this.errorCheck.startNew(function (next) { return _this.updateErrorCheck(next, checkList_1, 100, /*requireOpen*/ true); }); + this.errorCheck.startNew(function (next) { return _this.updateErrorCheck(next, openFiles, 100, /*requireOpen*/ true); }); } // Send project changed event this.event({ @@ -143532,12 +145698,27 @@ var ts; var seq = this.changeSeq; var followMs = Math.min(ms, 200); var index = 0; + var goNext = function () { + index++; + if (checkList.length > index) { + next.delay(followMs, checkOne); + } + }; var checkOne = function () { if (_this.changeSeq !== seq) { return; } - var _a = checkList[index], fileName = _a.fileName, project = _a.project; - index++; + var item = checkList[index]; + if (ts.isString(item)) { + // Find out project for the file name + item = _this.toPendingErrorCheck(item); + if (!item) { + // Ignore file if there is no project for the file + goNext(); + return; + } + } + var fileName = item.fileName, project = item.project; // Ensure the project is upto date before checking if this file is present in the project server.updateProjectIfDirty(project); if (!project.containsFile(fileName, requireOpen)) { @@ -143552,11 +145733,6 @@ var ts; if (_this.changeSeq !== seq) { return; } - var goNext = function () { - if (checkList.length > index) { - next.delay(followMs, checkOne); - } - }; if (_this.getPreferences(fileName).disableSuggestions) { goNext(); } @@ -143680,7 +145856,7 @@ var ts; Session.prototype.getDefinitionAndBoundSpan = function (args, simplifiedResult) { var _a = this.getFileAndProject(args), file = _a.file, project = _a.project; var position = this.getPositionInFile(args, file); - var scriptInfo = ts.Debug.assertDefined(project.getScriptInfo(file)); + var scriptInfo = ts.Debug.checkDefined(project.getScriptInfo(file)); var unmappedDefinitionAndBoundSpan = project.getLanguageService().getDefinitionAndBoundSpan(file, position); if (!unmappedDefinitionAndBoundSpan || !unmappedDefinitionAndBoundSpan.definitions) { return { @@ -143896,7 +146072,7 @@ var ts; if (!simplifiedResult) return locations; var defaultProject = this.getDefaultProject(args); - var renameInfo = this.mapRenameInfo(defaultProject.getLanguageService().getRenameInfo(file, position, { allowRenameOfImportPath: this.getPreferences(file).allowRenameOfImportPath }), ts.Debug.assertDefined(this.projectService.getScriptInfo(file))); + var renameInfo = this.mapRenameInfo(defaultProject.getLanguageService().getRenameInfo(file, position, { allowRenameOfImportPath: this.getPreferences(file).allowRenameOfImportPath }), ts.Debug.checkDefined(this.projectService.getScriptInfo(file))); return { info: renameInfo, locs: this.toSpanGroups(locations) }; }; Session.prototype.mapRenameInfo = function (info, scriptInfo) { @@ -143916,7 +146092,7 @@ var ts; var group_1 = map.get(fileName); if (!group_1) map.set(fileName, group_1 = { file: fileName, locs: [] }); - var scriptInfo = ts.Debug.assertDefined(this.projectService.getScriptInfo(fileName)); + var scriptInfo = ts.Debug.checkDefined(this.projectService.getScriptInfo(fileName)); group_1.locs.push(__assign(__assign({}, toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo)), prefixSuffixText)); } return ts.arrayFrom(map.values()); @@ -143939,7 +146115,7 @@ var ts; var refs = ts.flatMap(references, function (referencedSymbol) { return referencedSymbol.references.map(function (_a) { var fileName = _a.fileName, textSpan = _a.textSpan, contextSpan = _a.contextSpan, isWriteAccess = _a.isWriteAccess, isDefinition = _a.isDefinition; - var scriptInfo = ts.Debug.assertDefined(_this.projectService.getScriptInfo(fileName)); + var scriptInfo = ts.Debug.checkDefined(_this.projectService.getScriptInfo(fileName)); var span = toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo); var lineSpan = scriptInfo.lineToTextSpan(span.start.line - 1); var lineText = scriptInfo.getSnapshot().getText(lineSpan.start, ts.textSpanEnd(lineSpan)).replace(/\r|\n/g, ""); @@ -144241,21 +146417,17 @@ var ts; return helpItems; } }; - Session.prototype.createCheckList = function (fileNames) { - var _this = this; - return ts.mapDefined(fileNames, function (uncheckedFileName) { - var fileName = server.toNormalizedPath(uncheckedFileName); - var project = _this.projectService.tryGetDefaultProjectForFile(fileName); - return project && { fileName: fileName, project: project }; - }); + Session.prototype.toPendingErrorCheck = function (uncheckedFileName) { + var fileName = server.toNormalizedPath(uncheckedFileName); + var project = this.projectService.tryGetDefaultProjectForFile(fileName); + return project && { fileName: fileName, project: project }; }; Session.prototype.getDiagnostics = function (next, delay, fileNames) { if (this.suppressDiagnosticEvents) { return; } - var checkList = this.createCheckList(fileNames); - if (checkList.length > 0) { - this.updateErrorCheck(next, checkList, delay); + if (fileNames.length > 0) { + this.updateErrorCheck(next, fileNames, delay); } }; Session.prototype.change = function (args) { @@ -144386,7 +146558,7 @@ var ts; a.fileName === b.fileName && a.isCaseSensitive === b.isCaseSensitive && a.kind === b.kind && - a.kindModifiers === b.containerName && + a.kindModifiers === b.kindModifiers && a.matchKind === b.matchKind && a.name === b.name && a.textSpan.start === b.textSpan.start && @@ -144409,7 +146581,7 @@ var ts; var _a = this.getStartAndEndPosition(args, scriptInfo), startPosition = _a.startPosition, endPosition = _a.endPosition; textRange = { pos: startPosition, end: endPosition }; } - return ts.Debug.assertDefined(position === undefined ? textRange : position); + return ts.Debug.checkDefined(position === undefined ? textRange : position); function getPosition(loc) { return loc.position !== undefined ? loc.position : scriptInfo.lineOffsetToPosition(loc.line, loc.offset); } @@ -144605,7 +146777,7 @@ var ts; var _this = this; var locations = args.locations; var _a = this.getFileAndLanguageServiceForSyntacticOperation(args), file = _a.file, languageService = _a.languageService; - var scriptInfo = ts.Debug.assertDefined(this.projectService.getScriptInfo(file)); + var scriptInfo = ts.Debug.checkDefined(this.projectService.getScriptInfo(file)); return ts.map(locations, function (location) { var pos = _this.getPosition(location, scriptInfo); var selectionRange = languageService.getSmartSelectionRange(file, pos); @@ -144621,15 +146793,17 @@ var ts; } return result; }; - Session.prototype.toProtocolCallHierarchyItem = function (item, scriptInfo) { + Session.prototype.getScriptInfoFromProjectService = function (file) { + var normalizedFile = server.toNormalizedPath(file); + var scriptInfo = this.projectService.getScriptInfoForNormalizedPath(normalizedFile); if (!scriptInfo) { - var file = server.toNormalizedPath(item.file); - scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - if (!scriptInfo) { - this.projectService.logErrorForScriptInfoNotFound(file); - return server.Errors.ThrowNoProject(); - } + this.projectService.logErrorForScriptInfoNotFound(normalizedFile); + return server.Errors.ThrowNoProject(); } + return scriptInfo; + }; + Session.prototype.toProtocolCallHierarchyItem = function (item) { + var scriptInfo = this.getScriptInfoFromProjectService(item.file); return { name: item.name, kind: item.kind, @@ -144638,7 +146812,8 @@ var ts; selectionSpan: toProtocolTextSpan(item.selectionSpan, scriptInfo) }; }; - Session.prototype.toProtocolCallHierarchyIncomingCall = function (incomingCall, scriptInfo) { + Session.prototype.toProtocolCallHierarchyIncomingCall = function (incomingCall) { + var scriptInfo = this.getScriptInfoFromProjectService(incomingCall.from.file); return { from: this.toProtocolCallHierarchyItem(incomingCall.from), fromSpans: incomingCall.fromSpans.map(function (fromSpan) { return toProtocolTextSpan(fromSpan, scriptInfo); }) @@ -144657,34 +146832,26 @@ var ts; if (scriptInfo) { var position = this.getPosition(args, scriptInfo); var result = project.getLanguageService().prepareCallHierarchy(file, position); - return result && ts.mapOneOrMany(result, function (item) { return _this.toProtocolCallHierarchyItem(item, scriptInfo); }); + return result && ts.mapOneOrMany(result, function (item) { return _this.toProtocolCallHierarchyItem(item); }); } return undefined; }; Session.prototype.provideCallHierarchyIncomingCalls = function (args) { var _this = this; var _a = this.getFileAndProject(args), file = _a.file, project = _a.project; - var scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - if (!scriptInfo) { - this.projectService.logErrorForScriptInfoNotFound(file); - return server.Errors.ThrowNoProject(); - } + var scriptInfo = this.getScriptInfoFromProjectService(file); var incomingCalls = project.getLanguageService().provideCallHierarchyIncomingCalls(file, this.getPosition(args, scriptInfo)); - return incomingCalls.map(function (call) { return _this.toProtocolCallHierarchyIncomingCall(call, scriptInfo); }); + return incomingCalls.map(function (call) { return _this.toProtocolCallHierarchyIncomingCall(call); }); }; Session.prototype.provideCallHierarchyOutgoingCalls = function (args) { var _this = this; var _a = this.getFileAndProject(args), file = _a.file, project = _a.project; - var scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - if (!scriptInfo) { - this.projectService.logErrorForScriptInfoNotFound(file); - return server.Errors.ThrowNoProject(); - } + var scriptInfo = this.getScriptInfoFromProjectService(file); var outgoingCalls = project.getLanguageService().provideCallHierarchyOutgoingCalls(file, this.getPosition(args, scriptInfo)); return outgoingCalls.map(function (call) { return _this.toProtocolCallHierarchyOutgoingCall(call, scriptInfo); }); }; Session.prototype.getCanonicalFileName = function (fileName) { - var name = this.host.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); + var name = this.host.useCaseSensitiveFileNames ? fileName : ts.toFileNameLowerCase(fileName); return ts.normalizePath(name); }; Session.prototype.exit = function () { }; @@ -146256,7 +148423,7 @@ var ts; // //server/location // ^ <- from 0 to this position var firstSlash = path.indexOf(ts.directorySeparator, 2); - return firstSlash !== -1 ? path.substring(0, firstSlash).toLowerCase() : path; + return firstSlash !== -1 ? ts.toFileNameLowerCase(path.substring(0, firstSlash)) : path; } var rootLength = ts.getRootLength(path); if (rootLength === 0) { @@ -146265,7 +148432,7 @@ var ts; } if (path.charCodeAt(1) === 58 /* colon */ && path.charCodeAt(2) === 47 /* slash */) { // rooted path that starts with c:/... - extract drive letter - return path.charAt(0).toLowerCase(); + return ts.toFileNameLowerCase(path.charAt(0)); } if (path.charCodeAt(0) === 47 /* slash */ && path.charCodeAt(1) !== 47 /* slash */) { // rooted path that starts with slash - /somename - use key for current drive diff --git a/lib/tsserverlibrary.d.ts b/lib/tsserverlibrary.d.ts index 1855fae39b672..0cb0c0fa0dc49 100644 --- a/lib/tsserverlibrary.d.ts +++ b/lib/tsserverlibrary.d.ts @@ -1,20 +1,20 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "3.8"; + const versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -383,29 +383,30 @@ declare namespace ts { JSDocSignature = 305, JSDocTag = 306, JSDocAugmentsTag = 307, - JSDocAuthorTag = 308, - JSDocClassTag = 309, - JSDocPublicTag = 310, - JSDocPrivateTag = 311, - JSDocProtectedTag = 312, - JSDocReadonlyTag = 313, - JSDocCallbackTag = 314, - JSDocEnumTag = 315, - JSDocParameterTag = 316, - JSDocReturnTag = 317, - JSDocThisTag = 318, - JSDocTypeTag = 319, - JSDocTemplateTag = 320, - JSDocTypedefTag = 321, - JSDocPropertyTag = 322, - SyntaxList = 323, - NotEmittedStatement = 324, - PartiallyEmittedExpression = 325, - CommaListExpression = 326, - MergeDeclarationMarker = 327, - EndOfDeclarationMarker = 328, - SyntheticReferenceExpression = 329, - Count = 330, + JSDocImplementsTag = 308, + JSDocAuthorTag = 309, + JSDocClassTag = 310, + JSDocPublicTag = 311, + JSDocPrivateTag = 312, + JSDocProtectedTag = 313, + JSDocReadonlyTag = 314, + JSDocCallbackTag = 315, + JSDocEnumTag = 316, + JSDocParameterTag = 317, + JSDocReturnTag = 318, + JSDocThisTag = 319, + JSDocTypeTag = 320, + JSDocTemplateTag = 321, + JSDocTypedefTag = 322, + JSDocPropertyTag = 323, + SyntaxList = 324, + NotEmittedStatement = 325, + PartiallyEmittedExpression = 326, + CommaListExpression = 327, + MergeDeclarationMarker = 328, + EndOfDeclarationMarker = 329, + SyntheticReferenceExpression = 330, + Count = 331, FirstAssignment = 62, LastAssignment = 74, FirstCompoundAssignment = 63, @@ -434,9 +435,9 @@ declare namespace ts { LastStatement = 241, FirstNode = 153, FirstJSDocNode = 294, - LastJSDocNode = 322, + LastJSDocNode = 323, FirstJSDocTagNode = 306, - LastJSDocTagNode = 322, + LastJSDocTagNode = 323, } export enum NodeFlags { None = 0, @@ -1145,7 +1146,7 @@ declare namespace ts { } export interface ExpressionWithTypeArguments extends NodeWithTypeArguments { kind: SyntaxKind.ExpressionWithTypeArguments; - parent: HeritageClause | JSDocAugmentsTag; + parent: HeritageClause | JSDocAugmentsTag | JSDocImplementsTag; expression: LeftHandSideExpression; } export interface NewExpression extends PrimaryExpression, Declaration { @@ -1547,6 +1548,7 @@ declare namespace ts { name: Identifier; } export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; + export type TypeOnlyCompatibleAliasDeclaration = ImportClause | NamespaceImport | ImportOrExportSpecifier; /** * This is either an `export =` or an `export default` declaration. * Unless `isExportEquals` is set, this node was parsed as an `export default`. @@ -1634,6 +1636,12 @@ declare namespace ts { expression: Identifier | PropertyAccessEntityNameExpression; }; } + export interface JSDocImplementsTag extends JSDocTag { + kind: SyntaxKind.JSDocImplementsTag; + class: ExpressionWithTypeArguments & { + expression: Identifier | PropertyAccessEntityNameExpression; + }; + } export interface JSDocAuthorTag extends JSDocTag { kind: SyntaxKind.JSDocAuthorTag; } @@ -1725,10 +1733,9 @@ declare namespace ts { SwitchClause = 128, ArrayMutation = 256, Call = 512, - Referenced = 1024, - Shared = 2048, - PreFinally = 4096, - AfterFinally = 8192, + ReduceLabel = 1024, + Referenced = 2048, + Shared = 4096, Label = 12, Condition = 96 } @@ -1775,6 +1782,11 @@ declare namespace ts { node: CallExpression | BinaryExpression; antecedent: FlowNode; } + export interface FlowReduceLabel extends FlowNodeBase { + target: FlowLabel; + antecedents: FlowNode[]; + antecedent: FlowNode; + } export type FlowType = Type | IncompleteType; export interface IncompleteType { flags: TypeFlags; @@ -1947,6 +1959,7 @@ declare namespace ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; + getInstantiationCount(): number; getRelationCacheSizes(): { assignable: number; identity: number; @@ -2117,6 +2130,7 @@ declare namespace ts { UseTypeOfFunction = 4096, OmitParameterModifiers = 8192, UseAliasDefinedOutsideCurrentScope = 16384, + UseSingleQuotesForStringLiteralType = 268435456, AllowThisInObjectLiteral = 32768, AllowQualifedNameInPlaceOfIdentifier = 65536, AllowAnonymousIdentifier = 131072, @@ -2144,6 +2158,7 @@ declare namespace ts { UseTypeOfFunction = 4096, OmitParameterModifiers = 8192, UseAliasDefinedOutsideCurrentScope = 16384, + UseSingleQuotesForStringLiteralType = 268435456, AllowUniqueESSymbolType = 1048576, AddUndefined = 131072, WriteArrowStyleSignature = 262144, @@ -2152,7 +2167,7 @@ declare namespace ts { InFirstTypeArgument = 4194304, InTypeAlias = 8388608, /** @deprecated */ WriteOwnNameForAnyLike = 0, - NodeBuilderFlagsMask = 9469291 + NodeBuilderFlagsMask = 277904747 } export enum SymbolFormatFlags { None = 0, @@ -2651,7 +2666,7 @@ declare namespace ts { experimentalDecorators?: boolean; forceConsistentCasingInFileNames?: boolean; importHelpers?: boolean; - importsNotUsedAsValues?: importsNotUsedAsValues; + importsNotUsedAsValues?: ImportsNotUsedAsValues; inlineSourceMap?: boolean; inlineSources?: boolean; isolatedModules?: boolean; @@ -2750,7 +2765,7 @@ declare namespace ts { React = 2, ReactNative = 3 } - export enum importsNotUsedAsValues { + export enum ImportsNotUsedAsValues { Remove = 0, Preserve = 1, Error = 2 @@ -2969,6 +2984,7 @@ declare namespace ts { readonly scoped: boolean; readonly text: string | ((node: EmitHelperUniqueNameCallback) => string); readonly priority?: number; + readonly dependencies?: EmitHelper[]; } export interface UnscopedEmitHelper extends EmitHelper { readonly scoped: false; @@ -2981,7 +2997,8 @@ declare namespace ts { IdentifierName = 2, MappedTypeParameter = 3, Unspecified = 4, - EmbeddedStatement = 5 + EmbeddedStatement = 5, + JsxAttributeValue = 6 } export interface TransformationContext { /** Gets the compiler options supplied to the transformer. */ @@ -3053,6 +3070,12 @@ declare namespace ts { * @param emitCallback A callback used to emit the node. */ emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; + /** + * Indicates if a given node needs an emit notification + * + * @param node The node to emit. + */ + isEmitNotificationEnabled?(node: Node): boolean; /** * Clean up EmitNode entries on any parse-tree nodes. */ @@ -3125,6 +3148,11 @@ declare namespace ts { * ``` */ onEmitNode?(hint: EmitHint, node: Node | undefined, emitCallback: (hint: EmitHint, node: Node | undefined) => void): void; + /** + * A hook used to check if an emit notification is required for a node. + * @param node The node to emit. + */ + isEmitNotificationEnabled?(node: Node | undefined): boolean; /** * A hook used by the Printer to perform just-in-time substitution of a node. This is * primarily used by node transformations that need to substitute one node for another, @@ -3244,7 +3272,7 @@ declare namespace ts { readonly includeCompletionsWithInsertText?: boolean; readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ - readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; + readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; } @@ -3330,7 +3358,8 @@ declare namespace ts { isUnterminated(): boolean; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; + reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; + reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; scanJsxIdentifier(): SyntaxKind; scanJsxAttributeValue(): SyntaxKind; reScanJsxAttributeValue(): SyntaxKind; @@ -3494,6 +3523,8 @@ declare namespace ts { function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean; /** Gets the JSDoc augments tag for the node if present */ function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined; + /** Gets the JSDoc implements tags for the node if present */ + function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[]; /** Gets the JSDoc class tag for the node if present */ function getJSDocClassTag(node: Node): JSDocClassTag | undefined; /** Gets the JSDoc public tag for the node if present */ @@ -3535,7 +3566,9 @@ 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): readonly JSDocTag[]; - /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + /** Gets all JSDoc tags that match a specified predicate */ + function getAllJSDocTags(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]; + /** Gets all JSDoc tags of a specified kind */ function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[]; /** * Gets the effective type parameters. If the node was parsed in a @@ -3711,6 +3744,7 @@ declare namespace ts { function isJSDoc(node: Node): node is JSDoc; function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag; function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; + function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; function isJSDocClassTag(node: Node): node is JSDocClassTag; function isJSDocPublicTag(node: Node): node is JSDocPublicTag; function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag; @@ -3739,7 +3773,7 @@ declare namespace ts { function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken; function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail; function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier; - function isTypeOnlyImportOrExportName(node: Node): boolean; + function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyCompatibleAliasDeclaration; function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken; function isModifier(node: Node): node is Modifier; function isEntityName(node: Node): node is EntityName; @@ -3772,6 +3806,8 @@ declare namespace ts { function isJSDocCommentContainingNode(node: Node): boolean; function isSetAccessor(node: Node): node is SetAccessorDeclaration; function isGetAccessor(node: Node): node is GetAccessorDeclaration; + /** True if has initializer node attached to it. */ + function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer; function isObjectLiteralElement(node: Node): node is ObjectLiteralElement; function isStringLiteralLike(node: Node): node is StringLiteralLike; } @@ -5184,7 +5220,7 @@ declare namespace ts { fileName: string; } type OrganizeImportsScope = CombinedCodeFixScope; - type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<"; + type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#"; interface GetCompletionsAtPositionOptions extends UserPreferences { /** * If the editor is asking for completions because a certain character was typed @@ -5652,6 +5688,7 @@ declare namespace ts { hasAction?: true; source?: string; isRecommended?: true; + isFromUncheckedFile?: true; } interface CompletionEntryDetails { name: string; @@ -6237,6 +6274,16 @@ declare namespace ts.server.protocol { * Contains extra information that plugin can include to be passed on */ metadata?: unknown; + /** + * Exposes information about the performance of this request-response pair. + */ + performanceData?: PerformanceData; + } + interface PerformanceData { + /** + * Time spent updating the program graph, in milliseconds. + */ + updateGraphDurationMs?: number; } /** * Arguments for FileRequest messages. @@ -7052,6 +7099,16 @@ declare namespace ts.server.protocol { * compiler settings. */ type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions; + interface FileWithProjectReferenceRedirectInfo { + /** + * Name of file + */ + fileName: string; + /** + * True if the file is primarily included in a referenced project + */ + isSourceOfProjectReferenceRedirect: boolean; + } /** * Represents a set of changes that happen in project */ @@ -7059,15 +7116,20 @@ declare namespace ts.server.protocol { /** * List of added files */ - added: string[]; + added: string[] | FileWithProjectReferenceRedirectInfo[]; /** * List of removed files */ - removed: string[]; + removed: string[] | FileWithProjectReferenceRedirectInfo[]; /** * List of updated files */ - updated: string[]; + updated: string[] | FileWithProjectReferenceRedirectInfo[]; + /** + * List of files that have had their project reference redirect status updated + * Only provided when the synchronizeProjectList request has includeProjectReferenceRedirectInfo set to true + */ + updatedRedirects?: FileWithProjectReferenceRedirectInfo[]; } /** * Information found in a configure request. @@ -7527,7 +7589,7 @@ declare namespace ts.server.protocol { command: CommandTypes.Formatonkey; arguments: FormatOnKeyRequestArgs; } - type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<"; + type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#"; /** * Arguments for completions messages. */ @@ -7644,6 +7706,11 @@ declare namespace ts.server.protocol { * Then either that enum/class or a namespace containing it will be the recommended symbol. */ isRecommended?: true; + /** + * If true, this completion was generated from traversing the name table of an unchecked JS file, + * and therefore may not be accurate. + */ + isFromUncheckedFile?: true; } /** * Additional completion entry details, available on demand @@ -8478,6 +8545,8 @@ declare namespace ts.server.protocol { */ readonly includeAutomaticOptionalChainCompletions?: boolean; readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; + /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ + readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly lazyConfiguredProjectsFromExternalProject?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; @@ -8845,7 +8914,7 @@ declare namespace ts.server { } /** * If a file is opened, the server will look for a tsconfig (or jsconfig) - * and if successfull create a ConfiguredProject for it. + * and if successful create a ConfiguredProject for it. * Otherwise it will create an InferredProject. */ class ConfiguredProject extends Project { @@ -9122,7 +9191,7 @@ declare namespace ts.server { */ private readonly projectToSizeMap; /** - * This is a map of config file paths existance that doesnt need query to disk + * This is a map of config file paths existence that doesnt need query to disk * - The entry can be present because there is inferred project that needs to watch addition of config file to directory * In this case the exists could be true/false based on config file is present or not * - Or it is present if we have configured project open with config file at that location @@ -9482,7 +9551,7 @@ declare namespace ts.server { private getCompileOnSaveAffectedFileList; private emitFile; private getSignatureHelpItems; - private createCheckList; + private toPendingErrorCheck; private getDiagnostics; private change; private reload; @@ -9515,6 +9584,7 @@ declare namespace ts.server { private configurePlugin; private getSmartSelectionRange; private mapSelectionRange; + private getScriptInfoFromProjectService; private toProtocolCallHierarchyItem; private toProtocolCallHierarchyIncomingCall; private toProtocolCallHierarchyOutgoingCall; diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index 31d6a57649771..5da03d7d11ba1 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ @@ -242,7 +242,7 @@ var ts; (function (ts) { // WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configurePrerelease` too. - ts.versionMajorMinor = "3.8"; + ts.versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ ts.version = ts.versionMajorMinor + ".0-dev"; /** @@ -1539,6 +1539,46 @@ var ts; /** Returns lower case string */ function toLowerCase(x) { return x.toLowerCase(); } ts.toLowerCase = toLowerCase; + // We convert the file names to lower case as key for file name on case insensitive file system + // While doing so we need to handle special characters (eg \u0130) to ensure that we dont convert + // it to lower case, fileName with its lowercase form can exist along side it. + // Handle special characters and make those case sensitive instead + // + // |-#--|-Unicode--|-Char code-|-Desc-------------------------------------------------------------------| + // | 1. | i | 105 | Ascii i | + // | 2. | I | 73 | Ascii I | + // |-------- Special characters ------------------------------------------------------------------------| + // | 3. | \u0130 | 304 | Uppper case I with dot above | + // | 4. | i,\u0307 | 105,775 | i, followed by 775: Lower case of (3rd item) | + // | 5. | I,\u0307 | 73,775 | I, followed by 775: Upper case of (4th item), lower case is (4th item) | + // | 6. | \u0131 | 305 | Lower case i without dot, upper case is I (2nd item) | + // | 7. | \u00DF | 223 | Lower case sharp s | + // + // Because item 3 is special where in its lowercase character has its own + // upper case form we cant convert its case. + // Rest special characters are either already in lower case format or + // they have corresponding upper case character so they dont need special handling + // + // But to avoid having to do string building for most common cases, also ignore + // a-z, 0-9, \u0131, \u00DF, \, /, ., : and space + var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; + /** + * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - \u0130) + * This function is used in places where we want to make file name as a key on these systems + * It is possible on mac to be able to refer to file name with I with dot on top as a fileName with its lower case form + * But on windows we cannot. Windows can have fileName with I with dot on top next to its lower case and they can not each be referred with the lowercase forms + * Technically we would want this function to be platform sepcific as well but + * our api has till now only taken caseSensitive as the only input and just for some characters we dont want to update API and ensure all customers use those api + * We could use upper case and we would still need to deal with the descripencies but + * we want to continue using lower case since in most cases filenames are lowercasewe and wont need any case changes and avoid having to store another string for the key + * So for this function purpose, we go ahead and assume character I with dot on top it as case sensitive since its very unlikely to use lower case form of that special character + */ + function toFileNameLowerCase(x) { + return fileNameLowerCaseRegExp.test(x) ? + x.replace(fileNameLowerCaseRegExp, toLowerCase) : + x; + } + ts.toFileNameLowerCase = toFileNameLowerCase; /** Throws an error because a function is not implemented. */ function notImplemented() { throw new Error("Not implemented"); @@ -1967,7 +2007,7 @@ var ts; return false; } function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toLowerCase; + return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; } ts.createGetCanonicalFileName = createGetCanonicalFileName; function patternText(_a) { @@ -2124,84 +2164,192 @@ var ts; } } } + function padLeft(s, length) { + while (s.length < length) { + s = " " + s; + } + return s; + } + ts.padLeft = padLeft; + function padRight(s, length) { + while (s.length < length) { + s = s + " "; + } + return s; + } + ts.padRight = padRight; })(ts || (ts = {})); /* @internal */ var ts; (function (ts) { var Debug; (function (Debug) { - /* eslint-disable prefer-const */ - Debug.currentAssertionLevel = 0 /* None */; + var currentAssertionLevel = 0 /* None */; + // eslint-disable-next-line prefer-const Debug.isDebugging = false; - /* eslint-enable prefer-const */ + var assertionCache = {}; + function getAssertionLevel() { + return currentAssertionLevel; + } + Debug.getAssertionLevel = getAssertionLevel; + function setAssertionLevel(level) { + var prevAssertionLevel = currentAssertionLevel; + currentAssertionLevel = level; + if (level > prevAssertionLevel) { + // restore assertion functions for the current assertion level (see `shouldAssertFunction`). + for (var _i = 0, _a = ts.getOwnKeys(assertionCache); _i < _a.length; _i++) { + var key = _a[_i]; + var cachedFunc = assertionCache[key]; + if (cachedFunc !== undefined && Debug[key] !== cachedFunc.assertion && level >= cachedFunc.level) { + Debug[key] = cachedFunc; + assertionCache[key] = undefined; + } + } + } + } + Debug.setAssertionLevel = setAssertionLevel; function shouldAssert(level) { - return Debug.currentAssertionLevel >= level; + return currentAssertionLevel >= level; } Debug.shouldAssert = shouldAssert; + /** + * Tests whether an assertion function should be executed. If it shouldn't, it is cached and replaced with `ts.noop`. + * Replaced assertion functions are restored when `Debug.setAssertionLevel` is set to a high enough level. + * @param level The minimum assertion level required. + * @param name The name of the current assertion function. + */ + function shouldAssertFunction(level, name) { + if (!shouldAssert(level)) { + assertionCache[name] = { level: level, assertion: Debug[name] }; + Debug[name] = ts.noop; + return false; + } + return true; + } + function fail(message, stackCrawlMark) { + debugger; + var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); + if (Error.captureStackTrace) { + Error.captureStackTrace(e, stackCrawlMark || fail); + } + throw e; + } + Debug.fail = fail; + function failBadSyntaxKind(node, message, stackCrawlMark) { + return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", stackCrawlMark || failBadSyntaxKind); + } + Debug.failBadSyntaxKind = failBadSyntaxKind; function assert(expression, message, verboseDebugInfo, stackCrawlMark) { if (!expression) { + message = message ? "False expression: " + message : "False expression."; if (verboseDebugInfo) { message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); } - fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert); + fail(message, stackCrawlMark || assert); } } Debug.assert = assert; - function assertEqual(a, b, msg, msg2) { + function assertEqual(a, b, msg, msg2, stackCrawlMark) { if (a !== b) { var message = msg ? msg2 ? msg + " " + msg2 : msg : ""; - fail("Expected " + a + " === " + b + ". " + message); + fail("Expected " + a + " === " + b + ". " + message, stackCrawlMark || assertEqual); } } Debug.assertEqual = assertEqual; - function assertLessThan(a, b, msg) { + function assertLessThan(a, b, msg, stackCrawlMark) { if (a >= b) { - fail("Expected " + a + " < " + b + ". " + (msg || "")); + fail("Expected " + a + " < " + b + ". " + (msg || ""), stackCrawlMark || assertLessThan); } } Debug.assertLessThan = assertLessThan; - function assertLessThanOrEqual(a, b) { + function assertLessThanOrEqual(a, b, stackCrawlMark) { if (a > b) { - fail("Expected " + a + " <= " + b); + fail("Expected " + a + " <= " + b, stackCrawlMark || assertLessThanOrEqual); } } Debug.assertLessThanOrEqual = assertLessThanOrEqual; - function assertGreaterThanOrEqual(a, b) { + function assertGreaterThanOrEqual(a, b, stackCrawlMark) { if (a < b) { - fail("Expected " + a + " >= " + b); + fail("Expected " + a + " >= " + b, stackCrawlMark || assertGreaterThanOrEqual); } } Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual; - function fail(message, stackCrawlMark) { - debugger; - var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); - if (Error.captureStackTrace) { - Error.captureStackTrace(e, stackCrawlMark || fail); + function assertIsDefined(value, message, stackCrawlMark) { + // eslint-disable-next-line no-null/no-null + if (value === undefined || value === null) { + fail(message, stackCrawlMark || assertIsDefined); } - throw e; } - Debug.fail = fail; - function assertDefined(value, message) { - // eslint-disable-next-line no-null/no-null - if (value === undefined || value === null) - return fail(message); + Debug.assertIsDefined = assertIsDefined; + function checkDefined(value, message, stackCrawlMark) { + assertIsDefined(value, message, stackCrawlMark || checkDefined); return value; } - Debug.assertDefined = assertDefined; - function assertEachDefined(value, message) { + Debug.checkDefined = checkDefined; + /** + * @deprecated Use `checkDefined` to check whether a value is defined inline. Use `assertIsDefined` to check whether + * a value is defined at the statement level. + */ + Debug.assertDefined = checkDefined; + function assertEachIsDefined(value, message, stackCrawlMark) { for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { var v = value_1[_i]; - assertDefined(v, message); + assertIsDefined(v, message, stackCrawlMark || assertEachIsDefined); } + } + Debug.assertEachIsDefined = assertEachIsDefined; + function checkEachDefined(value, message, stackCrawlMark) { + assertEachIsDefined(value, message, stackCrawlMark || checkEachDefined); return value; } - Debug.assertEachDefined = assertEachDefined; + Debug.checkEachDefined = checkEachDefined; + /** + * @deprecated Use `checkEachDefined` to check whether the elements of an array are defined inline. Use `assertEachIsDefined` to check whether + * the elements of an array are defined at the statement level. + */ + Debug.assertEachDefined = checkEachDefined; function assertNever(member, message, stackCrawlMark) { if (message === void 0) { message = "Illegal value:"; } var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member); return fail(message + " " + detail, stackCrawlMark || assertNever); } Debug.assertNever = assertNever; + function assertEachNode(nodes, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) { + assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertEachNode); + } + } + Debug.assertEachNode = assertEachNode; + function assertNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertNode")) { + assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNode); + } + } + Debug.assertNode = assertNode; + function assertNotNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) { + assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNotNode); + } + } + Debug.assertNotNode = assertNotNode; + function assertOptionalNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) { + assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertOptionalNode); + } + } + Debug.assertOptionalNode = assertOptionalNode; + function assertOptionalToken(node, kind, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) { + assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, stackCrawlMark || assertOptionalToken); + } + } + Debug.assertOptionalToken = assertOptionalToken; + function assertMissingNode(node, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) { + assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, stackCrawlMark || assertMissingNode); + } + } + Debug.assertMissingNode = assertMissingNode; function getFunctionName(func) { if (typeof func !== "function") { return ""; @@ -2299,28 +2447,6 @@ var ts; return formatEnum(flags, ts.ObjectFlags, /*isFlags*/ true); } Debug.formatObjectFlags = formatObjectFlags; - function failBadSyntaxKind(node, message) { - return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", failBadSyntaxKind); - } - Debug.failBadSyntaxKind = failBadSyntaxKind; - Debug.assertEachNode = shouldAssert(1 /* Normal */) - ? function (nodes, test, message) { return assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertEachNode); } - : ts.noop; - Debug.assertNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertNotNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertOptionalNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertOptionalNode); } - : ts.noop; - Debug.assertOptionalToken = shouldAssert(1 /* Normal */) - ? function (node, kind, message) { return assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, Debug.assertOptionalToken); } - : ts.noop; - Debug.assertMissingNode = shouldAssert(1 /* Normal */) - ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } - : ts.noop; var isDebugInfoEnabled = false; var extendedDebugModule; function extendedDebug() { @@ -2606,7 +2732,7 @@ var ts; if (prerelease === void 0) { prerelease = ""; } if (build === void 0) { build = ""; } if (typeof major === "string") { - var result = ts.Debug.assertDefined(tryParseComponents(major), "Invalid version"); + var result = ts.Debug.checkDefined(tryParseComponents(major), "Invalid version"); (major = result.major, minor = result.minor, patch = result.patch, prerelease = result.prerelease, build = result.build); } ts.Debug.assert(major >= 0, "Invalid argument: major"); @@ -2737,7 +2863,7 @@ var ts; */ var VersionRange = /** @class */ (function () { function VersionRange(spec) { - this._alternatives = spec ? ts.Debug.assertDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; + this._alternatives = spec ? ts.Debug.checkDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; } VersionRange.tryParse = function (text) { var sets = parseRange(text); @@ -3277,32 +3403,33 @@ var ts; SyntaxKind[SyntaxKind["JSDocSignature"] = 305] = "JSDocSignature"; SyntaxKind[SyntaxKind["JSDocTag"] = 306] = "JSDocTag"; SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 307] = "JSDocAugmentsTag"; - SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 308] = "JSDocAuthorTag"; - SyntaxKind[SyntaxKind["JSDocClassTag"] = 309] = "JSDocClassTag"; - SyntaxKind[SyntaxKind["JSDocPublicTag"] = 310] = "JSDocPublicTag"; - SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 311] = "JSDocPrivateTag"; - SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 312] = "JSDocProtectedTag"; - SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 313] = "JSDocReadonlyTag"; - SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 314] = "JSDocCallbackTag"; - SyntaxKind[SyntaxKind["JSDocEnumTag"] = 315] = "JSDocEnumTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 316] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 317] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocThisTag"] = 318] = "JSDocThisTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 319] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 320] = "JSDocTemplateTag"; - SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 321] = "JSDocTypedefTag"; - SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 322] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 308] = "JSDocImplementsTag"; + SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 309] = "JSDocAuthorTag"; + SyntaxKind[SyntaxKind["JSDocClassTag"] = 310] = "JSDocClassTag"; + SyntaxKind[SyntaxKind["JSDocPublicTag"] = 311] = "JSDocPublicTag"; + SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 312] = "JSDocPrivateTag"; + SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 313] = "JSDocProtectedTag"; + SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 314] = "JSDocReadonlyTag"; + SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 315] = "JSDocCallbackTag"; + SyntaxKind[SyntaxKind["JSDocEnumTag"] = 316] = "JSDocEnumTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 317] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 318] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocThisTag"] = 319] = "JSDocThisTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 320] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 321] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 322] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 323] = "JSDocPropertyTag"; // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 323] = "SyntaxList"; + SyntaxKind[SyntaxKind["SyntaxList"] = 324] = "SyntaxList"; // Transformation nodes - SyntaxKind[SyntaxKind["NotEmittedStatement"] = 324] = "NotEmittedStatement"; - SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 325] = "PartiallyEmittedExpression"; - SyntaxKind[SyntaxKind["CommaListExpression"] = 326] = "CommaListExpression"; - SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 327] = "MergeDeclarationMarker"; - SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 328] = "EndOfDeclarationMarker"; - SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 329] = "SyntheticReferenceExpression"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 325] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 326] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["CommaListExpression"] = 327] = "CommaListExpression"; + SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 328] = "MergeDeclarationMarker"; + SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 329] = "EndOfDeclarationMarker"; + SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 330] = "SyntheticReferenceExpression"; // Enum value count - SyntaxKind[SyntaxKind["Count"] = 330] = "Count"; + SyntaxKind[SyntaxKind["Count"] = 331] = "Count"; // Markers SyntaxKind[SyntaxKind["FirstAssignment"] = 62] = "FirstAssignment"; SyntaxKind[SyntaxKind["LastAssignment"] = 74] = "LastAssignment"; @@ -3332,9 +3459,9 @@ var ts; SyntaxKind[SyntaxKind["LastStatement"] = 241] = "LastStatement"; SyntaxKind[SyntaxKind["FirstNode"] = 153] = "FirstNode"; SyntaxKind[SyntaxKind["FirstJSDocNode"] = 294] = "FirstJSDocNode"; - SyntaxKind[SyntaxKind["LastJSDocNode"] = 322] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 323] = "LastJSDocNode"; SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 306] = "FirstJSDocTagNode"; - SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 322] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 323] = "LastJSDocTagNode"; /* @internal */ SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 122] = "FirstContextualKeyword"; /* @internal */ SyntaxKind[SyntaxKind["LastContextualKeyword"] = 152] = "LastContextualKeyword"; })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {})); @@ -3467,6 +3594,8 @@ var ts; /* @internal */ TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape"; /* @internal */ + TokenFlags[TokenFlags["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape"; + /* @internal */ TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; /* @internal */ TokenFlags[TokenFlags["NumericLiteralFlags"] = 1008] = "NumericLiteralFlags"; @@ -3484,10 +3613,9 @@ var ts; FlowFlags[FlowFlags["SwitchClause"] = 128] = "SwitchClause"; FlowFlags[FlowFlags["ArrayMutation"] = 256] = "ArrayMutation"; FlowFlags[FlowFlags["Call"] = 512] = "Call"; - FlowFlags[FlowFlags["Referenced"] = 1024] = "Referenced"; - FlowFlags[FlowFlags["Shared"] = 2048] = "Shared"; - FlowFlags[FlowFlags["PreFinally"] = 4096] = "PreFinally"; - FlowFlags[FlowFlags["AfterFinally"] = 8192] = "AfterFinally"; + FlowFlags[FlowFlags["ReduceLabel"] = 1024] = "ReduceLabel"; + FlowFlags[FlowFlags["Referenced"] = 2048] = "Referenced"; + FlowFlags[FlowFlags["Shared"] = 4096] = "Shared"; FlowFlags[FlowFlags["Label"] = 12] = "Label"; FlowFlags[FlowFlags["Condition"] = 96] = "Condition"; })(FlowFlags = ts.FlowFlags || (ts.FlowFlags = {})); @@ -3542,7 +3670,7 @@ var ts; ContextFlags[ContextFlags["None"] = 0] = "None"; ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; - ContextFlags[ContextFlags["BaseConstraint"] = 4] = "BaseConstraint"; + ContextFlags[ContextFlags["Completions"] = 4] = "Completions"; })(ContextFlags = ts.ContextFlags || (ts.ContextFlags = {})); // NOTE: If modifying this enum, must modify `TypeFormatFlags` too! var NodeBuilderFlags; @@ -3564,6 +3692,7 @@ var ts; NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; // Error handling NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; NodeBuilderFlags[NodeBuilderFlags["AllowQualifedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifedNameInPlaceOfIdentifier"; @@ -3601,6 +3730,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; TypeFormatFlags[TypeFormatFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; TypeFormatFlags[TypeFormatFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + TypeFormatFlags[TypeFormatFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; // Error Handling TypeFormatFlags[TypeFormatFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; // TypeFormatFlags exclusive @@ -3612,7 +3742,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 4194304] = "InFirstTypeArgument"; TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 8388608] = "InTypeAlias"; /** @deprecated */ TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 0] = "WriteOwnNameForAnyLike"; - TypeFormatFlags[TypeFormatFlags["NodeBuilderFlagsMask"] = 9469291] = "NodeBuilderFlagsMask"; + TypeFormatFlags[TypeFormatFlags["NodeBuilderFlagsMask"] = 277904747] = "NodeBuilderFlagsMask"; })(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {})); var SymbolFormatFlags; (function (SymbolFormatFlags) { @@ -3906,6 +4036,8 @@ var ts; TypeFlags[TypeFlags["ObjectFlagsType"] = 3899393] = "ObjectFlagsType"; /* @internal */ TypeFlags[TypeFlags["Simplifiable"] = 25165824] = "Simplifiable"; + /* @internal */ + TypeFlags[TypeFlags["Substructure"] = 66584576] = "Substructure"; // 'Narrowable' types are types where narrowing actually narrows. // This *should* be every type other than null, undefined, void, and never TypeFlags[TypeFlags["Narrowable"] = 133970943] = "Narrowable"; @@ -3924,9 +4056,6 @@ var ts; TypeFlags[TypeFlags["IncludesWildcard"] = 4194304] = "IncludesWildcard"; /* @internal */ TypeFlags[TypeFlags["IncludesEmptyObject"] = 8388608] = "IncludesEmptyObject"; - // The following flag is used for different purposes by maybeTypeOfKind - /* @internal */ - TypeFlags[TypeFlags["GenericMappedType"] = 131072] = "GenericMappedType"; })(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {})); var ObjectFlags; (function (ObjectFlags) { @@ -3956,6 +4085,18 @@ var ts; ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 1048576] = "ContainsObjectOrArrayLiteral"; /* @internal */ ObjectFlags[ObjectFlags["NonInferrableType"] = 2097152] = "NonInferrableType"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericObjectTypeComputed"] = 4194304] = "IsGenericObjectTypeComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericIndexTypeComputed"] = 16777216] = "IsGenericIndexTypeComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericIndexType"] = 33554432] = "IsGenericIndexType"; + /* @internal */ + ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 67108864] = "CouldContainTypeVariablesComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 134217728] = "CouldContainTypeVariables"; ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; /* @internal */ ObjectFlags[ObjectFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; @@ -4131,12 +4272,12 @@ var ts; JsxEmit[JsxEmit["React"] = 2] = "React"; JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative"; })(JsxEmit = ts.JsxEmit || (ts.JsxEmit = {})); - var importsNotUsedAsValues; - (function (importsNotUsedAsValues) { - importsNotUsedAsValues[importsNotUsedAsValues["Remove"] = 0] = "Remove"; - importsNotUsedAsValues[importsNotUsedAsValues["Preserve"] = 1] = "Preserve"; - importsNotUsedAsValues[importsNotUsedAsValues["Error"] = 2] = "Error"; - })(importsNotUsedAsValues = ts.importsNotUsedAsValues || (ts.importsNotUsedAsValues = {})); + var ImportsNotUsedAsValues; + (function (ImportsNotUsedAsValues) { + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Remove"] = 0] = "Remove"; + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Preserve"] = 1] = "Preserve"; + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Error"] = 2] = "Error"; + })(ImportsNotUsedAsValues = ts.ImportsNotUsedAsValues || (ts.ImportsNotUsedAsValues = {})); var NewLineKind; (function (NewLineKind) { NewLineKind[NewLineKind["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed"; @@ -4455,8 +4596,9 @@ var ts; ExternalEmitHelpers[ExternalEmitHelpers["MakeTemplateObject"] = 131072] = "MakeTemplateObject"; ExternalEmitHelpers[ExternalEmitHelpers["ClassPrivateFieldGet"] = 262144] = "ClassPrivateFieldGet"; ExternalEmitHelpers[ExternalEmitHelpers["ClassPrivateFieldSet"] = 524288] = "ClassPrivateFieldSet"; + ExternalEmitHelpers[ExternalEmitHelpers["CreateBinding"] = 1048576] = "CreateBinding"; ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper"; - ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 524288] = "LastEmitHelper"; + ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 1048576] = "LastEmitHelper"; // Helpers included by ES2015 for..of ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes"; // Helpers included by ES2017 for..await..of @@ -4476,6 +4618,7 @@ var ts; EmitHint[EmitHint["MappedTypeParameter"] = 3] = "MappedTypeParameter"; EmitHint[EmitHint["Unspecified"] = 4] = "Unspecified"; EmitHint[EmitHint["EmbeddedStatement"] = 5] = "EmbeddedStatement"; + EmitHint[EmitHint["JsxAttributeValue"] = 6] = "JsxAttributeValue"; })(EmitHint = ts.EmitHint || (ts.EmitHint = {})); /*@internal*/ var BundleFileSectionKind; @@ -4938,7 +5081,7 @@ var ts; callbacksCache.add(path, callback); return { close: function () { - var watcher = ts.Debug.assertDefined(cache.get(path)); + var watcher = ts.Debug.checkDefined(cache.get(path)); callbacksCache.remove(path, callback); watcher.refCount--; if (watcher.refCount) @@ -5036,7 +5179,7 @@ var ts; return { dirName: dirName, close: function () { - var directoryWatcher = ts.Debug.assertDefined(cache.get(dirPath)); + var directoryWatcher = ts.Debug.checkDefined(cache.get(dirPath)); if (callbackToAdd) callbackCache.remove(dirPath, callbackToAdd); directoryWatcher.refCount--; @@ -5223,7 +5366,7 @@ var ts; }; function watchFile(fileName, callback, pollingInterval, options) { options = updateOptionsForWatchFile(options, useNonPollingWatchers); - var watchFileKind = ts.Debug.assertDefined(options.watchFile); + var watchFileKind = ts.Debug.checkDefined(options.watchFile); switch (watchFileKind) { case ts.WatchFileKind.FixedPollingInterval: return pollingWatchFile(fileName, callback, PollingInterval.Low, /*options*/ undefined); @@ -5303,7 +5446,7 @@ var ts; function nonRecursiveWatchDirectory(directoryName, callback, recursive, options) { ts.Debug.assert(!recursive); options = updateOptionsForWatchDirectory(options); - var watchDirectoryKind = ts.Debug.assertDefined(options.watchDirectory); + var watchDirectoryKind = ts.Debug.checkDefined(options.watchDirectory); switch (watchDirectoryKind) { case ts.WatchDirectoryKind.FixedPollingInterval: return pollingWatchFile(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium, @@ -5909,48 +6052,8 @@ var ts; return hash.digest("hex"); } } - function getChakraSystem() { - var realpath = ChakraHost.realpath && (function (path) { return ChakraHost.realpath(path); }); - return { - newLine: ChakraHost.newLine || "\r\n", - args: ChakraHost.args, - useCaseSensitiveFileNames: !!ChakraHost.useCaseSensitiveFileNames, - write: ChakraHost.echo, - readFile: function (path, _encoding) { - // encoding is automatically handled by the implementation in ChakraHost - return ChakraHost.readFile(path); - }, - writeFile: function (path, data, writeByteOrderMark) { - // If a BOM is required, emit one - if (writeByteOrderMark) { - data = byteOrderMarkIndicator + data; - } - ChakraHost.writeFile(path, data); - }, - resolvePath: ChakraHost.resolvePath, - fileExists: ChakraHost.fileExists, - deleteFile: ChakraHost.deleteFile, - getModifiedTime: ChakraHost.getModifiedTime, - setModifiedTime: ChakraHost.setModifiedTime, - directoryExists: ChakraHost.directoryExists, - createDirectory: ChakraHost.createDirectory, - getExecutingFilePath: function () { return ChakraHost.executingFile; }, - getCurrentDirectory: function () { return ChakraHost.currentDirectory; }, - getDirectories: ChakraHost.getDirectories, - getEnvironmentVariable: ChakraHost.getEnvironmentVariable || (function () { return ""; }), - readDirectory: function (path, extensions, excludes, includes, _depth) { - var pattern = ts.getFileMatcherPatterns(path, excludes, includes, !!ChakraHost.useCaseSensitiveFileNames, ChakraHost.currentDirectory); - return ChakraHost.readDirectory(path, extensions, pattern.basePaths, pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern); - }, - exit: ChakraHost.quit, - realpath: realpath - }; - } var sys; - if (typeof ChakraHost !== "undefined") { - sys = getChakraSystem(); - } - else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { + if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { // process and process.nextTick checks if current environment is node-like // process.browser check excludes webpack and browserify sys = getNodeSystem(); @@ -5963,9 +6066,9 @@ var ts; })(); if (ts.sys && ts.sys.getEnvironmentVariable) { setCustomPollingValues(ts.sys); - ts.Debug.currentAssertionLevel = /^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) + ts.Debug.setAssertionLevel(/^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ - : 0 /* None */; + : 0 /* None */); } if (ts.sys && ts.sys.debugMode) { ts.Debug.isDebugging = true; @@ -6911,8 +7014,9 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), - Type_only_0_must_reference_a_type_but_1_is_a_value: diag(1361, ts.DiagnosticCategory.Error, "Type_only_0_must_reference_a_type_but_1_is_a_value_1361", "Type-only {0} must reference a type, but '{1}' is a value."), - Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported: diag(1362, ts.DiagnosticCategory.Error, "Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported_1362", "Enum '{0}' cannot be used as a value because only its type has been imported."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), + _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), + _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, ts.DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), Convert_to_type_only_export: diag(1364, ts.DiagnosticCategory.Message, "Convert_to_type_only_export_1364", "Convert to type-only export"), Convert_all_re_exported_types_to_type_only_exports: diag(1365, ts.DiagnosticCategory.Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), @@ -6922,11 +7026,16 @@ var ts; Did_you_mean_0: diag(1369, ts.DiagnosticCategory.Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"), Only_ECMAScript_imports_may_use_import_type: diag(1370, ts.DiagnosticCategory.Error, "Only_ECMAScript_imports_may_use_import_type_1370", "Only ECMAScript imports may use 'import type'."), This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error: diag(1371, ts.DiagnosticCategory.Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371", "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'."), - This_import_may_be_converted_to_a_type_only_import: diag(1372, ts.DiagnosticCategory.Suggestion, "This_import_may_be_converted_to_a_type_only_import_1372", "This import may be converted to a type-only import."), Convert_to_type_only_import: diag(1373, ts.DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"), Convert_all_imports_not_used_as_a_value_to_type_only_imports: diag(1374, ts.DiagnosticCategory.Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"), await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1376, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1376", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + _0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."), + _0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."), + Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), + An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), + Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), + Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), @@ -7087,6 +7196,8 @@ var ts; Type_alias_0_circularly_references_itself: diag(2456, ts.DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), Type_alias_name_cannot_be_0: diag(2457, ts.DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, ts.DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Module_0_declares_1_locally_but_it_is_not_exported: diag(2459, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), + Module_0_declares_1_locally_but_it_is_exported_as_2: diag(2460, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), Type_0_is_not_an_array_type: diag(2461, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, ts.DiagnosticCategory.Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, ts.DiagnosticCategory.Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), @@ -7310,7 +7421,7 @@ var ts; Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, ts.DiagnosticCategory.Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, ts.DiagnosticCategory.Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension"), Property_0_was_also_declared_here: diag(2733, ts.DiagnosticCategory.Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), - It_is_highly_likely_that_you_are_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "It_is_highly_likely_that_you_are_missing_a_semicolon_2734", "It is highly likely that you are missing a semicolon."), + Are_you_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, ts.DiagnosticCategory.Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), Operator_0_cannot_be_applied_to_type_1: diag(2736, ts.DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: diag(2737, ts.DiagnosticCategory.Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), @@ -7359,6 +7470,7 @@ var ts; The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: diag(2780, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: diag(2781, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), _0_needs_an_explicit_type_annotation: diag(2782, ts.DiagnosticCategory.Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), + _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: diag(2783, ts.DiagnosticCategory.Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), @@ -7546,7 +7658,7 @@ var ts; File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, ts.DiagnosticCategory.Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, ts.DiagnosticCategory.Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), NEWLINE: diag(6061, ts.DiagnosticCategory.Message, "NEWLINE_6061", "NEWLINE"), - Option_0_can_only_be_specified_in_tsconfig_json_file: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_6064", "Option '{0}' can only be specified in 'tsconfig.json' file."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), Enables_experimental_support_for_ES7_decorators: diag(6065, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), Enables_experimental_support_for_ES7_async_functions: diag(6068, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_async_functions_6068", "Enables experimental support for ES7 async functions."), @@ -7707,6 +7819,8 @@ var ts; Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling: diag(6226, ts.DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'."), Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority: diag(6227, ts.DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'."), Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6228, ts.DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228", "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively."), + Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, ts.DiagnosticCategory.Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), Projects_to_reference: diag(6300, ts.DiagnosticCategory.Message, "Projects_to_reference_6300", "Projects to reference"), Enable_project_compilation: diag(6302, ts.DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"), Composite_projects_may_not_disable_declaration_emit: diag(6304, ts.DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), @@ -7903,6 +8017,7 @@ var ts; Import_default_0_from_module_1: diag(90032, ts.DiagnosticCategory.Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""), Add_default_import_0_to_existing_import_declaration_from_1: diag(90033, ts.DiagnosticCategory.Message, "Add_default_import_0_to_existing_import_declaration_from_1_90033", "Add default import '{0}' to existing import declaration from \"{1}\""), Add_parameter_name: diag(90034, ts.DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"), + Declare_a_private_field_named_0: diag(90053, ts.DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), Convert_function_to_an_ES2015_class: diag(95001, ts.DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), Convert_function_0_to_class: diag(95002, ts.DiagnosticCategory.Message, "Convert_function_0_to_class_95002", "Convert function '{0}' to class"), Extract_to_0_in_1: diag(95004, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), @@ -7998,6 +8113,8 @@ var ts; Add_export_to_make_this_file_into_a_module: diag(95097, ts.DiagnosticCategory.Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), Set_the_target_option_in_your_configuration_file_to_0: diag(95098, ts.DiagnosticCategory.Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), Set_the_module_option_in_your_configuration_file_to_0: diag(95099, ts.DiagnosticCategory.Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), + Convert_invalid_character_to_its_html_entity_code: diag(95100, ts.DiagnosticCategory.Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), + Wrap_invalid_character_in_an_expression_container: diag(95101, ts.DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95101", "Wrap invalid character in an expression container"), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), @@ -8362,6 +8479,12 @@ var ts; function isDigit(ch) { return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; } + function isHexDigit(ch) { + return isDigit(ch) || ch >= 65 /* A */ && ch <= 70 /* F */ || ch >= 97 /* a */ && ch <= 102 /* f */; + } + function isCodePoint(code) { + return code <= 0x10FFFF; + } /* @internal */ function isOctalDigit(ch) { return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; @@ -8749,6 +8872,7 @@ var ts; reScanGreaterToken: reScanGreaterToken, reScanSlashToken: reScanSlashToken, reScanTemplateToken: reScanTemplateToken, + reScanTemplateHeadOrNoSubstitutionTemplate: reScanTemplateHeadOrNoSubstitutionTemplate, scanJsxIdentifier: scanJsxIdentifier, scanJsxAttributeValue: scanJsxAttributeValue, reScanJsxAttributeValue: reScanJsxAttributeValue, @@ -8997,7 +9121,7 @@ var ts; * Sets the current 'tokenValue' and returns a NoSubstitutionTemplateLiteral or * a literal component of a TemplateExpression. */ - function scanTemplateAndSetTokenValue() { + function scanTemplateAndSetTokenValue(isTaggedTemplate) { var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; pos++; var start = pos; @@ -9029,7 +9153,7 @@ var ts; // Escape character if (currChar === 92 /* backslash */) { contents += text.substring(start, pos); - contents += scanEscapeSequence(); + contents += scanEscapeSequence(isTaggedTemplate); start = pos; continue; } @@ -9051,7 +9175,8 @@ var ts; tokenValue = contents; return resultingToken; } - function scanEscapeSequence() { + function scanEscapeSequence(isTaggedTemplate) { + var start = pos; pos++; if (pos >= end) { error(ts.Diagnostics.Unexpected_end_of_text); @@ -9061,6 +9186,12 @@ var ts; pos++; switch (ch) { case 48 /* _0 */: + // '\01' + if (isTaggedTemplate && pos < end && isDigit(text.charCodeAt(pos))) { + pos++; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } return "\0"; case 98 /* b */: return "\b"; @@ -9079,16 +9210,55 @@ var ts; case 34 /* doubleQuote */: return "\""; case 117 /* u */: + if (isTaggedTemplate) { + // '\u' or '\u0' or '\u00' or '\u000' + for (var escapePos = pos; escapePos < pos + 4; escapePos++) { + if (escapePos < end && !isHexDigit(text.charCodeAt(escapePos)) && text.charCodeAt(escapePos) !== 123 /* openBrace */) { + pos = escapePos; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + } + } // '\u{DDDDDDDD}' if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) { - tokenFlags |= 8 /* ExtendedUnicodeEscape */; pos++; + // '\u{' + if (isTaggedTemplate && !isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + if (isTaggedTemplate) { + var savePos = pos; + var escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false); + var escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + // '\u{Not Code Point' or '\u{CodePoint' + if (!isCodePoint(escapedValue) || text.charCodeAt(pos) !== 125 /* closeBrace */) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + else { + pos = savePos; + } + } + tokenFlags |= 8 /* ExtendedUnicodeEscape */; return scanExtendedUnicodeEscape(); } tokenFlags |= 1024 /* UnicodeEscape */; // '\uDDDD' return scanHexadecimalEscape(/*numDigits*/ 4); case 120 /* x */: + if (isTaggedTemplate) { + if (!isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + else if (!isHexDigit(text.charCodeAt(pos + 1))) { + pos++; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + } // '\xDD' return scanHexadecimalEscape(/*numDigits*/ 2); // when encountering a LineContinuation (i.e. a backslash and a line terminator sequence), @@ -9362,7 +9532,7 @@ var ts; tokenValue = scanString(); return token = 10 /* StringLiteral */; case 96 /* backtick */: - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ false); case 37 /* percent */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { return pos += 2, token = 68 /* PercentEqualsToken */; @@ -9692,11 +9862,12 @@ var ts; if (ch === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } - return token = 76 /* PrivateIdentifier */; } - error(ts.Diagnostics.Invalid_character); - // no `pos++` because already advanced past the '#' - return token = 0 /* Unknown */; + else { + tokenValue = "#"; + error(ts.Diagnostics.Invalid_character); + } + return token = 76 /* PrivateIdentifier */; default: if (isIdentifierStart(ch, languageVersion)) { pos += charSize(ch); @@ -9798,10 +9969,14 @@ var ts; /** * Unconditionally back up and scan a template expression portion. */ - function reScanTemplateToken() { + function reScanTemplateToken(isTaggedTemplate) { ts.Debug.assert(token === 19 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + pos = tokenPos; + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ true); } function reScanJsxToken() { pos = tokenPos = startPos; @@ -9839,9 +10014,15 @@ var ts; } // First non-whitespace character on this line. var firstNonWhitespace = 0; + var lastNonWhitespace = -1; // These initial values are special because the first line is: // firstNonWhitespace = 0 to indicate that we want leading whitespace, while (pos < end) { + // We want to keep track of the last non-whitespace (but including + // newlines character for hitting the end of the JSX Text region) + if (!isWhiteSpaceSingleLine(char)) { + lastNonWhitespace = pos; + } char = text.charCodeAt(pos); if (char === 123 /* openBrace */) { break; @@ -9853,6 +10034,14 @@ var ts; } break; } + if (char === 62 /* greaterThan */) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); + } + if (char === 125 /* closeBrace */) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); + } + if (lastNonWhitespace > 0) + lastNonWhitespace++; // FirstNonWhitespace is 0, then we only see whitespaces so far. If we see a linebreak, we want to ignore that whitespaces. // i.e (- : whitespace) //
---- @@ -9867,7 +10056,8 @@ var ts; } pos++; } - tokenValue = text.substring(startPos, pos); + var endPosition = lastNonWhitespace === -1 ? pos : lastNonWhitespace; + tokenValue = text.substring(startPos, endPosition); return firstNonWhitespace === -1 ? 12 /* JsxTextAllWhiteSpaces */ : 11 /* JsxText */; } // Scans a JSX identifier; these differ from normal identifiers in that @@ -10598,8 +10788,8 @@ var ts; switch (declaration.kind) { case 75 /* Identifier */: return declaration; - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: { + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: { var name = declaration.name; if (name.kind === 153 /* QualifiedName */) { return name.right; @@ -10623,9 +10813,9 @@ var ts; return undefined; } } - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 315 /* JSDocEnumTag */: + case 316 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); case 259 /* ExportAssignment */: { var expression = declaration.expression; @@ -10729,6 +10919,11 @@ var ts; return getFirstJSDocTag(node, isJSDocAugmentsTag); } ts.getJSDocAugmentsTag = getJSDocAugmentsTag; + /** Gets the JSDoc implements tags for the node if present */ + function getJSDocImplementsTags(node) { + return getAllJSDocTags(node, isJSDocImplementsTag); + } + ts.getJSDocImplementsTags = getJSDocImplementsTags; /** Gets the JSDoc class tag for the node if present */ function getJSDocClassTag(node) { return getFirstJSDocTag(node, isJSDocClassTag); @@ -10843,7 +11038,12 @@ var ts; function getFirstJSDocTag(node, predicate) { return ts.find(getJSDocTags(node), predicate); } - /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + /** Gets all JSDoc tags that match a specified predicate */ + function getAllJSDocTags(node, predicate) { + return getJSDocTags(node).filter(predicate); + } + ts.getAllJSDocTags = getAllJSDocTags; + /** Gets all JSDoc tags of a specified kind */ function getAllJSDocTagsOfKind(node, kind) { return getJSDocTags(node).filter(function (doc) { return doc.kind === kind; }); } @@ -11189,7 +11389,7 @@ var ts; } ts.isParenthesizedExpression = isParenthesizedExpression; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 325 /* PartiallyEmittedExpression */) { + while (node.kind === 326 /* PartiallyEmittedExpression */) { node = node.expression; } return node; @@ -11613,67 +11813,71 @@ var ts; } ts.isJSDoc = isJSDoc; function isJSDocAuthorTag(node) { - return node.kind === 308 /* JSDocAuthorTag */; + return node.kind === 309 /* JSDocAuthorTag */; } ts.isJSDocAuthorTag = isJSDocAuthorTag; function isJSDocAugmentsTag(node) { return node.kind === 307 /* JSDocAugmentsTag */; } ts.isJSDocAugmentsTag = isJSDocAugmentsTag; + function isJSDocImplementsTag(node) { + return node.kind === 308 /* JSDocImplementsTag */; + } + ts.isJSDocImplementsTag = isJSDocImplementsTag; function isJSDocClassTag(node) { - return node.kind === 309 /* JSDocClassTag */; + return node.kind === 310 /* JSDocClassTag */; } ts.isJSDocClassTag = isJSDocClassTag; function isJSDocPublicTag(node) { - return node.kind === 310 /* JSDocPublicTag */; + return node.kind === 311 /* JSDocPublicTag */; } ts.isJSDocPublicTag = isJSDocPublicTag; function isJSDocPrivateTag(node) { - return node.kind === 311 /* JSDocPrivateTag */; + return node.kind === 312 /* JSDocPrivateTag */; } ts.isJSDocPrivateTag = isJSDocPrivateTag; function isJSDocProtectedTag(node) { - return node.kind === 312 /* JSDocProtectedTag */; + return node.kind === 313 /* JSDocProtectedTag */; } ts.isJSDocProtectedTag = isJSDocProtectedTag; function isJSDocReadonlyTag(node) { - return node.kind === 313 /* JSDocReadonlyTag */; + return node.kind === 314 /* JSDocReadonlyTag */; } ts.isJSDocReadonlyTag = isJSDocReadonlyTag; function isJSDocEnumTag(node) { - return node.kind === 315 /* JSDocEnumTag */; + return node.kind === 316 /* JSDocEnumTag */; } ts.isJSDocEnumTag = isJSDocEnumTag; function isJSDocThisTag(node) { - return node.kind === 318 /* JSDocThisTag */; + return node.kind === 319 /* JSDocThisTag */; } ts.isJSDocThisTag = isJSDocThisTag; function isJSDocParameterTag(node) { - return node.kind === 316 /* JSDocParameterTag */; + return node.kind === 317 /* JSDocParameterTag */; } ts.isJSDocParameterTag = isJSDocParameterTag; function isJSDocReturnTag(node) { - return node.kind === 317 /* JSDocReturnTag */; + return node.kind === 318 /* JSDocReturnTag */; } ts.isJSDocReturnTag = isJSDocReturnTag; function isJSDocTypeTag(node) { - return node.kind === 319 /* JSDocTypeTag */; + return node.kind === 320 /* JSDocTypeTag */; } ts.isJSDocTypeTag = isJSDocTypeTag; function isJSDocTemplateTag(node) { - return node.kind === 320 /* JSDocTemplateTag */; + return node.kind === 321 /* JSDocTemplateTag */; } ts.isJSDocTemplateTag = isJSDocTemplateTag; function isJSDocTypedefTag(node) { - return node.kind === 321 /* JSDocTypedefTag */; + return node.kind === 322 /* JSDocTypedefTag */; } ts.isJSDocTypedefTag = isJSDocTypedefTag; function isJSDocPropertyTag(node) { - return node.kind === 322 /* JSDocPropertyTag */; + return node.kind === 323 /* JSDocPropertyTag */; } ts.isJSDocPropertyTag = isJSDocPropertyTag; function isJSDocPropertyLikeTag(node) { - return node.kind === 322 /* JSDocPropertyTag */ || node.kind === 316 /* JSDocParameterTag */; + return node.kind === 323 /* JSDocPropertyTag */ || node.kind === 317 /* JSDocParameterTag */; } ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag; function isJSDocTypeLiteral(node) { @@ -11681,7 +11885,7 @@ var ts; } ts.isJSDocTypeLiteral = isJSDocTypeLiteral; function isJSDocCallbackTag(node) { - return node.kind === 314 /* JSDocCallbackTag */; + return node.kind === 315 /* JSDocCallbackTag */; } ts.isJSDocCallbackTag = isJSDocCallbackTag; function isJSDocSignature(node) { @@ -11696,7 +11900,7 @@ var ts; // they may be used with transformations. /* @internal */ function isSyntaxList(n) { - return n.kind === 323 /* SyntaxList */; + return n.kind === 324 /* SyntaxList */; } ts.isSyntaxList = isSyntaxList; /* @internal */ @@ -11754,21 +11958,20 @@ var ts; return isImportSpecifier(node) || isExportSpecifier(node); } ts.isImportOrExportSpecifier = isImportOrExportSpecifier; - function isTypeOnlyImportOrExportName(node) { - if (node.kind !== 75 /* Identifier */) { - return false; - } - switch (node.parent.kind) { + function isTypeOnlyImportOrExportDeclaration(node) { + switch (node.kind) { case 258 /* ImportSpecifier */: case 263 /* ExportSpecifier */: - return node.parent.parent.parent.isTypeOnly; - case 255 /* ImportClause */: + return node.parent.parent.isTypeOnly; + case 256 /* NamespaceImport */: return node.parent.isTypeOnly; + case 255 /* ImportClause */: + return node.isTypeOnly; default: return false; } } - ts.isTypeOnlyImportOrExportName = isTypeOnlyImportOrExportName; + ts.isTypeOnlyImportOrExportDeclaration = isTypeOnlyImportOrExportDeclaration; function isStringTextContainingNode(node) { return node.kind === 10 /* StringLiteral */ || isTemplateLiteralKind(node.kind); } @@ -12169,8 +12372,8 @@ var ts; case 213 /* SpreadElement */: case 217 /* AsExpression */: case 215 /* OmittedExpression */: - case 326 /* CommaListExpression */: - case 325 /* PartiallyEmittedExpression */: + case 327 /* CommaListExpression */: + case 326 /* PartiallyEmittedExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -12184,17 +12387,17 @@ var ts; ts.isAssertionExpression = isAssertionExpression; /* @internal */ function isPartiallyEmittedExpression(node) { - return node.kind === 325 /* PartiallyEmittedExpression */; + return node.kind === 326 /* PartiallyEmittedExpression */; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; /* @internal */ function isNotEmittedStatement(node) { - return node.kind === 324 /* NotEmittedStatement */; + return node.kind === 325 /* NotEmittedStatement */; } ts.isNotEmittedStatement = isNotEmittedStatement; /* @internal */ function isSyntheticReference(node) { - return node.kind === 329 /* SyntheticReferenceExpression */; + return node.kind === 330 /* SyntheticReferenceExpression */; } ts.isSyntheticReference = isSyntheticReference; /* @internal */ @@ -12327,9 +12530,9 @@ var ts; || kind === 247 /* TypeAliasDeclaration */ || kind === 155 /* TypeParameter */ || kind === 242 /* VariableDeclaration */ - || kind === 321 /* JSDocTypedefTag */ - || kind === 314 /* JSDocCallbackTag */ - || kind === 322 /* JSDocPropertyTag */; + || kind === 322 /* JSDocTypedefTag */ + || kind === 315 /* JSDocCallbackTag */ + || kind === 323 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { return kind === 244 /* FunctionDeclaration */ @@ -12364,14 +12567,14 @@ var ts; || kind === 225 /* VariableStatement */ || kind === 229 /* WhileStatement */ || kind === 236 /* WithStatement */ - || kind === 324 /* NotEmittedStatement */ - || kind === 328 /* EndOfDeclarationMarker */ - || kind === 327 /* MergeDeclarationMarker */; + || kind === 325 /* NotEmittedStatement */ + || kind === 329 /* EndOfDeclarationMarker */ + || kind === 328 /* MergeDeclarationMarker */; } /* @internal */ function isDeclaration(node) { if (node.kind === 155 /* TypeParameter */) { - return (node.parent && node.parent.kind !== 320 /* JSDocTemplateTag */) || ts.isInJSFile(node); + return (node.parent && node.parent.kind !== 321 /* JSDocTemplateTag */) || ts.isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -12466,18 +12669,18 @@ var ts; /** True if node is of some JSDoc syntax kind. */ /* @internal */ function isJSDocNode(node) { - return node.kind >= 294 /* FirstJSDocNode */ && node.kind <= 322 /* LastJSDocNode */; + return node.kind >= 294 /* FirstJSDocNode */ && node.kind <= 323 /* LastJSDocNode */; } ts.isJSDocNode = isJSDocNode; /** True if node is of a kind that may contain comment text. */ function isJSDocCommentContainingNode(node) { - return node.kind === 303 /* JSDocComment */ || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 303 /* JSDocComment */ || node.kind === 302 /* JSDocNamepathType */ || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode; // TODO: determine what this does before making it public. /* @internal */ function isJSDocTag(node) { - return node.kind >= 306 /* FirstJSDocTagNode */ && node.kind <= 322 /* LastJSDocTagNode */; + return node.kind >= 306 /* FirstJSDocTagNode */ && node.kind <= 323 /* LastJSDocTagNode */; } ts.isJSDocTag = isJSDocTag; function isSetAccessor(node) { @@ -12509,9 +12712,19 @@ var ts; } ts.hasInitializer = hasInitializer; /** True if has initializer node attached to it. */ - /* @internal */ function hasOnlyExpressionInitializer(node) { - return hasInitializer(node) && !isForStatement(node) && !isForInStatement(node) && !isForOfStatement(node) && !isJsxAttribute(node); + switch (node.kind) { + case 242 /* VariableDeclaration */: + case 156 /* Parameter */: + case 191 /* BindingElement */: + case 158 /* PropertySignature */: + case 159 /* PropertyDeclaration */: + case 281 /* PropertyAssignment */: + case 284 /* EnumMember */: + return true; + default: + return false; + } } ts.hasOnlyExpressionInitializer = hasOnlyExpressionInitializer; function isObjectLiteralElement(node) { @@ -12599,14 +12812,6 @@ var ts; return (symbol.flags & 33554432 /* Transient */) !== 0; } ts.isTransientSymbol = isTransientSymbol; - function isTypeOnlyAlias(symbol) { - return isTransientSymbol(symbol) && !!symbol.immediateTarget; - } - ts.isTypeOnlyAlias = isTypeOnlyAlias; - function isTypeOnlyEnumAlias(symbol) { - return isTypeOnlyAlias(symbol) && !!(symbol.immediateTarget.flags & 384 /* Enum */); - } - ts.isTypeOnlyEnumAlias = isTypeOnlyEnumAlias; var stringWriter = createSingleLineStringWriter(); function createSingleLineStringWriter() { var str = ""; @@ -13002,7 +13207,7 @@ var ts; // the syntax list itself considers them as normal trivia. Therefore if we simply skip // trivia for the list, we may have skipped the JSDocComment as well. So we should process its // first child to determine the actual position of its first token. - if (node.kind === 323 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 324 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); @@ -13021,7 +13226,7 @@ var ts; } ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; function isJSDocTypeExpressionOrChild(node) { - return node.kind === 294 /* JSDocTypeExpression */ || (node.parent && isJSDocTypeExpressionOrChild(node.parent)); + return !!findAncestor(node, ts.isJSDocTypeExpression); } function getTextOfNodeFromSourceText(sourceText, node, includeTrivia) { if (includeTrivia === void 0) { includeTrivia = false; } @@ -13060,30 +13265,35 @@ var ts; return emitNode && emitNode.flags || 0; } ts.getEmitFlags = getEmitFlags; - function getLiteralText(node, sourceFile, neverAsciiEscape) { + function getLiteralText(node, sourceFile, neverAsciiEscape, jsxAttributeEscape) { // If we don't need to downlevel and we can reach the original source text using // the node's parent reference, then simply get the text as it was originally written. if (!nodeIsSynthesized(node) && node.parent && !((ts.isNumericLiteral(node) && node.numericLiteralFlags & 512 /* ContainsSeparator */) || ts.isBigIntLiteral(node))) { return getSourceTextOfNodeFromSourceFile(sourceFile, node); } - // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text - // had to include a backslash: `not \${a} substitution`. - var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : escapeNonAsciiString; // If we can't reach the original source text, use the canonical form if it's a number, // or a (possibly escaped) quoted form of the original text if it's string-like. switch (node.kind) { - case 10 /* StringLiteral */: + case 10 /* StringLiteral */: { + var escapeText = jsxAttributeEscape ? escapeJsxAttributeString : + neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : + escapeNonAsciiString; if (node.singleQuote) { return "'" + escapeText(node.text, 39 /* singleQuote */) + "'"; } else { return '"' + escapeText(node.text, 34 /* doubleQuote */) + '"'; } + } case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: - case 17 /* TemplateTail */: + case 17 /* TemplateTail */: { + // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text + // had to include a backslash: `not \${a} substitution`. + var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : + escapeNonAsciiString; var rawText = node.rawText || escapeTemplateSubstitution(escapeText(node.text, 96 /* backtick */)); switch (node.kind) { case 14 /* NoSubstitutionTemplateLiteral */: @@ -13096,6 +13306,7 @@ var ts; return "}" + rawText + "`"; } break; + } case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 13 /* RegularExpressionLiteral */: @@ -13254,8 +13465,8 @@ var ts; ts.isBlockScope = isBlockScope; function isDeclarationWithTypeParameters(node) { switch (node.kind) { - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: case 305 /* JSDocSignature */: return true; default: @@ -13277,7 +13488,7 @@ var ts; case 214 /* ClassExpression */: case 246 /* InterfaceDeclaration */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: case 244 /* FunctionDeclaration */: case 161 /* MethodDeclaration */: case 162 /* Constructor */: @@ -13360,12 +13571,15 @@ var ts; ts.getTextOfPropertyName = getTextOfPropertyName; function entityNameToString(name) { switch (name.kind) { + case 104 /* ThisKeyword */: + return "this"; + case 76 /* PrivateIdentifier */: case 75 /* Identifier */: return getFullWidth(name) === 0 ? ts.idText(name) : getTextOfNode(name); case 153 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); case 194 /* PropertyAccessExpression */: - if (ts.isIdentifier(name.name)) { + if (ts.isIdentifier(name.name) || ts.isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { @@ -13615,7 +13829,7 @@ var ts; return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); case 155 /* TypeParameter */: return node === parent.constraint; - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return node === parent.constraint; case 159 /* PropertyDeclaration */: case 158 /* PropertySignature */: @@ -14234,6 +14448,13 @@ var ts; } } ts.isInExpressionContext = isInExpressionContext; + function isPartOfTypeQuery(node) { + while (node.kind === 153 /* QualifiedName */ || node.kind === 75 /* Identifier */) { + node = node.parent; + } + return node.kind === 172 /* TypeQuery */; + } + ts.isPartOfTypeQuery = isPartOfTypeQuery; function isExternalModuleImportEqualsDeclaration(node) { return node.kind === 253 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 265 /* ExternalModuleReference */; } @@ -14719,6 +14940,21 @@ var ts; return node.kind === 254 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } ts.isDefaultImport = isDefaultImport; + function forEachImportClauseDeclaration(node, action) { + if (node.name) { + var result = action(node); + if (result) + return result; + } + if (node.namedBindings) { + var result = ts.isNamespaceImport(node.namedBindings) + ? action(node.namedBindings) + : ts.forEach(node.namedBindings.elements, action); + if (result) + return result; + } + } + ts.forEachImportClauseDeclaration = forEachImportClauseDeclaration; function hasQuestionToken(node) { if (node) { switch (node.kind) { @@ -14742,7 +14978,7 @@ var ts; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function isJSDocTypeAlias(node) { - return node.kind === 321 /* JSDocTypedefTag */ || node.kind === 314 /* JSDocCallbackTag */ || node.kind === 315 /* JSDocEnumTag */; + return node.kind === 322 /* JSDocTypedefTag */ || node.kind === 315 /* JSDocCallbackTag */ || node.kind === 316 /* JSDocEnumTag */; } ts.isJSDocTypeAlias = isJSDocTypeAlias; function isTypeAlias(node) { @@ -14871,7 +15107,7 @@ var ts; } ts.getHostSignatureFromJSDocHost = getHostSignatureFromJSDocHost; function getJSDocHost(node) { - return ts.Debug.assertDefined(findAncestor(node.parent, ts.isJSDoc)).parent; + return ts.Debug.checkDefined(findAncestor(node.parent, ts.isJSDoc)).parent; } ts.getJSDocHost = getJSDocHost; function getTypeParameterFromJsDoc(node) { @@ -15133,9 +15369,27 @@ var ts; node.kind === 281 /* PropertyAssignment */ && isAliasableExpression(node.initializer); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; + function getAliasDeclarationFromName(node) { + switch (node.parent.kind) { + case 255 /* ImportClause */: + case 258 /* ImportSpecifier */: + case 256 /* NamespaceImport */: + case 263 /* ExportSpecifier */: + case 259 /* ExportAssignment */: + case 253 /* ImportEqualsDeclaration */: + return node.parent; + case 153 /* QualifiedName */: + do { + node = node.parent; + } while (node.parent.kind === 153 /* QualifiedName */); + return getAliasDeclarationFromName(node); + } + } + ts.getAliasDeclarationFromName = getAliasDeclarationFromName; function isAliasableExpression(e) { return isEntityNameExpression(e) || ts.isClassExpression(e); } + ts.isAliasableExpression = isAliasableExpression; function exportAssignmentIsAlias(node) { var e = getExportAssignmentExpression(node); return isAliasableExpression(e); @@ -15167,15 +15421,20 @@ var ts; return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassExtendsHeritageElement = getClassExtendsHeritageElement; - function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 113 /* ImplementsKeyword */); - return heritageClause ? heritageClause.types : undefined; + function getEffectiveImplementsTypeNodes(node) { + if (isInJSFile(node)) { + return ts.getJSDocImplementsTags(node).map(function (n) { return n.class; }); + } + else { + var heritageClause = getHeritageClause(node.heritageClauses, 113 /* ImplementsKeyword */); + return heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.types; + } } - ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; + ts.getEffectiveImplementsTypeNodes = getEffectiveImplementsTypeNodes; /** Returns the node in an `extends` or `implements` clause of a class or interface. */ function getAllSuperTypeNodes(node) { return ts.isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || ts.emptyArray : - ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getClassImplementsHeritageClauseElements(node)) || ts.emptyArray : + ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || ts.emptyArray : ts.emptyArray; } ts.getAllSuperTypeNodes = getAllSuperTypeNodes; @@ -15498,7 +15757,7 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return 0; case 213 /* SpreadElement */: return 1; @@ -15690,6 +15949,13 @@ var ts; function escapeTemplateSubstitution(str) { return str.replace(templateSubstitutionRegExp, "\\${"); } + /** @internal */ + function hasInvalidEscape(template) { + return template && !!(ts.isNoSubstitutionTemplateLiteral(template) + ? template.templateFlags + : (template.head.templateFlags || ts.some(template.templateSpans, function (span) { return !!span.literal.templateFlags; }))); + } + ts.hasInvalidEscape = hasInvalidEscape; // This consists of the first 19 unprintable ASCII characters, canonical escapes, lineSeparator, // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in // the language service. These characters should be escaped when printing, and if any characters are added, @@ -15714,6 +15980,23 @@ var ts; "\u2029": "\\u2029", "\u0085": "\\u0085" // nextLine }); + function encodeUtf16EscapeSequence(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + var paddedHexCode = ("0000" + hexCharCode).slice(-4); + return "\\u" + paddedHexCode; + } + function getReplacement(c, offset, input) { + if (c.charCodeAt(0) === 0 /* nullCharacter */) { + var lookAhead = input.charCodeAt(offset + c.length); + if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) { + // If the null character is followed by digits, print as a hex escape to prevent the result from parsing as an octal (which is forbidden in strict mode) + return "\\x00"; + } + // Otherwise, keep printing a literal \0 for the null character + return "\\0"; + } + return escapedCharsMap.get(c) || encodeUtf16EscapeSequence(c.charCodeAt(0)); + } /** * Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), * but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) @@ -15726,6 +16009,42 @@ var ts; return s.replace(escapedCharsRegExp, getReplacement); } ts.escapeString = escapeString; + var nonAsciiCharacters = /[^\u0000-\u007F]/g; + function escapeNonAsciiString(s, quoteChar) { + s = escapeString(s, quoteChar); + // Replace non-ASCII characters with '\uNNNN' escapes if any exist. + // Otherwise just return the original string. + return nonAsciiCharacters.test(s) ? + s.replace(nonAsciiCharacters, function (c) { return encodeUtf16EscapeSequence(c.charCodeAt(0)); }) : + s; + } + ts.escapeNonAsciiString = escapeNonAsciiString; + // This consists of the first 19 unprintable ASCII characters, JSX canonical escapes, lineSeparator, + // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in + // the language service. These characters should be escaped when printing, and if any characters are added, + // the map below must be updated. + var jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxEscapedCharsMap = ts.createMapFromTemplate({ + "\"": """, + "\'": "'" + }); + function encodeJsxCharacterEntity(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + return "&#x" + hexCharCode + ";"; + } + function getJsxAttributeStringReplacement(c) { + if (c.charCodeAt(0) === 0 /* nullCharacter */) { + return "�"; + } + return jsxEscapedCharsMap.get(c) || encodeJsxCharacterEntity(c.charCodeAt(0)); + } + function escapeJsxAttributeString(s, quoteChar) { + var escapedCharsRegExp = quoteChar === 39 /* singleQuote */ ? jsxSingleQuoteEscapedCharsRegExp : + jsxDoubleQuoteEscapedCharsRegExp; + return s.replace(escapedCharsRegExp, getJsxAttributeStringReplacement); + } + ts.escapeJsxAttributeString = escapeJsxAttributeString; /** * Strip off existed surrounding single quotes, double quotes, or backticks from a given string * @@ -15744,38 +16063,11 @@ var ts; charCode === 34 /* doubleQuote */ || charCode === 96 /* backtick */; } - function getReplacement(c, offset, input) { - if (c.charCodeAt(0) === 0 /* nullCharacter */) { - var lookAhead = input.charCodeAt(offset + c.length); - if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) { - // If the null character is followed by digits, print as a hex escape to prevent the result from parsing as an octal (which is forbidden in strict mode) - return "\\x00"; - } - // Otherwise, keep printing a literal \0 for the null character - return "\\0"; - } - return escapedCharsMap.get(c) || get16BitUnicodeEscapeSequence(c.charCodeAt(0)); - } function isIntrinsicJsxName(name) { var ch = name.charCodeAt(0); return (ch >= 97 /* a */ && ch <= 122 /* z */) || ts.stringContains(name, "-"); } ts.isIntrinsicJsxName = isIntrinsicJsxName; - function get16BitUnicodeEscapeSequence(charCode) { - var hexCharCode = charCode.toString(16).toUpperCase(); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - var nonAsciiCharacters = /[^\u0000-\u007F]/g; - function escapeNonAsciiString(s, quoteChar) { - s = escapeString(s, quoteChar); - // Replace non-ASCII characters with '\uNNNN' escapes if any exist. - // Otherwise just return the original string. - return nonAsciiCharacters.test(s) ? - s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) : - s; - } - ts.escapeNonAsciiString = escapeNonAsciiString; var indentStrings = ["", " "]; function getIndentString(level) { if (indentStrings[level] === undefined) { @@ -16432,6 +16724,9 @@ var ts; } ts.getSelectedModifierFlags = getSelectedModifierFlags; function getModifierFlags(node) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 152 /* LastToken */) { + return 0 /* None */; + } if (node.modifierFlagsCache & 536870912 /* HasComputedFlags */) { return node.modifierFlagsCache & ~536870912 /* HasComputedFlags */; } @@ -16547,7 +16842,7 @@ var ts; } ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { - return node.kind === 75 /* Identifier */ || node.kind === 104 /* ThisKeyword */ || + return node.kind === 75 /* Identifier */ || node.kind === 104 /* ThisKeyword */ || node.kind === 102 /* SuperKeyword */ || node.kind === 194 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 200 /* ParenthesizedExpression */ && isDottedName(node.expression); } @@ -17165,6 +17460,14 @@ var ts; return node.kind === 194 /* PropertyAccessExpression */ || node.kind === 195 /* ElementAccessExpression */; } ts.isAccessExpression = isAccessExpression; + function getNameOfAccessExpression(node) { + if (node.kind === 194 /* PropertyAccessExpression */) { + return node.name; + } + ts.Debug.assert(node.kind === 195 /* ElementAccessExpression */); + return node.argumentExpression; + } + ts.getNameOfAccessExpression = getNameOfAccessExpression; function isBundleFileTextLike(section) { switch (section.kind) { case "text" /* Text */: @@ -17215,6 +17518,26 @@ var ts; this.parent = undefined; this.original = undefined; } + function Token(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0 /* None */; + this.transformFlags = 0 /* None */; + this.parent = undefined; + } + function Identifier(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0 /* None */; + this.transformFlags = 0 /* None */; + this.parent = undefined; + this.original = undefined; + this.flowNode = undefined; + } function SourceMapSource(fileName, text, skipTrivia) { this.fileName = fileName; this.text = text; @@ -17223,8 +17546,8 @@ var ts; // eslint-disable-next-line prefer-const ts.objectAllocator = { getNodeConstructor: function () { return Node; }, - getTokenConstructor: function () { return Node; }, - getIdentifierConstructor: function () { return Node; }, + getTokenConstructor: function () { return Token; }, + getIdentifierConstructor: function () { return Identifier; }, getPrivateIdentifierConstructor: function () { return Node; }, getSourceFileConstructor: function () { return Node; }, getSymbolConstructor: function () { return Symbol; }, @@ -17238,7 +17561,7 @@ var ts; ts.setObjectAllocator = setObjectAllocator; function formatStringFromArgs(text, args, baseIndex) { if (baseIndex === void 0) { baseIndex = 0; } - return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.assertDefined(args[+index + baseIndex]); }); + return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.checkDefined(args[+index + baseIndex]); }); } ts.formatStringFromArgs = formatStringFromArgs; /* @internal */ @@ -18235,6 +18558,34 @@ var ts; return (negative && base10Value !== "0" ? "-" : "") + base10Value; } ts.pseudoBigIntToString = pseudoBigIntToString; + function isValidTypeOnlyAliasUseSite(useSite) { + return !!(useSite.flags & 8388608 /* Ambient */) + || isPartOfTypeQuery(useSite) + || isFirstIdentifierOfNonEmittingHeritageClause(useSite) + || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) + || !isExpressionNode(useSite); + } + ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite; + function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { + while (node.kind === 75 /* Identifier */ || node.kind === 194 /* PropertyAccessExpression */) { + node = node.parent; + } + if (node.kind !== 154 /* ComputedPropertyName */) { + return false; + } + if (hasModifier(node.parent, 128 /* Abstract */)) { + return true; + } + var containerKind = node.parent.parent.kind; + return containerKind === 246 /* InterfaceDeclaration */ || containerKind === 173 /* TypeLiteral */; + } + /** Returns true for the first identifier of 1) an `implements` clause, and 2) an `extends` clause of an interface. */ + function isFirstIdentifierOfNonEmittingHeritageClause(node) { + var _a, _b; + // Number of parents to climb from identifier is 2 for `implements I`, 3 for `implements x.I` + var heritageClause = (_a = ts.tryCast(node.parent.parent, ts.isHeritageClause)) !== null && _a !== void 0 ? _a : ts.tryCast((_b = node.parent.parent) === null || _b === void 0 ? void 0 : _b.parent, ts.isHeritageClause); + return (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.token) === 113 /* ImplementsKeyword */ || (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.parent.kind) === 246 /* InterfaceDeclaration */; + } })(ts || (ts = {})); var ts; (function (ts) { @@ -18663,7 +19014,7 @@ var ts; return visitNode(cbNode, node.expression); case 264 /* MissingDeclaration */: return visitNodes(cbNode, cbNodes, node.decorators); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return visitNodes(cbNode, cbNodes, node.elements); case 266 /* JsxElement */: return visitNode(cbNode, node.openingElement) || @@ -18703,24 +19054,27 @@ var ts; visitNode(cbNode, node.type); case 303 /* JSDocComment */: return visitNodes(cbNode, cbNodes, node.tags); - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return visitNode(cbNode, node.tagName) || (node.isNameFirst ? visitNode(cbNode, node.name) || visitNode(cbNode, node.typeExpression) : visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name)); - case 308 /* JSDocAuthorTag */: + case 309 /* JSDocAuthorTag */: return visitNode(cbNode, node.tagName); + case 308 /* JSDocImplementsTag */: + return visitNode(cbNode, node.tagName) || + visitNode(cbNode, node.class); case 307 /* JSDocAugmentsTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.class); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters); - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return visitNode(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 294 /* JSDocTypeExpression */ @@ -18728,14 +19082,14 @@ var ts; visitNode(cbNode, node.fullName) : visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression)); - case 314 /* JSDocCallbackTag */: + case 315 /* JSDocCallbackTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression); - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 318 /* JSDocThisTag */: - case 315 /* JSDocEnumTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 319 /* JSDocThisTag */: + case 316 /* JSDocEnumTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.typeExpression); case 305 /* JSDocSignature */: @@ -18745,17 +19099,85 @@ var ts; case 304 /* JSDocTypeLiteral */: return ts.forEach(node.jsDocPropertyTags, cbNode); case 306 /* JSDocTag */: - case 309 /* JSDocClassTag */: - case 310 /* JSDocPublicTag */: - case 311 /* JSDocPrivateTag */: - case 312 /* JSDocProtectedTag */: - case 313 /* JSDocReadonlyTag */: + case 310 /* JSDocClassTag */: + case 311 /* JSDocPublicTag */: + case 312 /* JSDocPrivateTag */: + case 313 /* JSDocProtectedTag */: + case 314 /* JSDocReadonlyTag */: return visitNode(cbNode, node.tagName); - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return visitNode(cbNode, node.expression); } } ts.forEachChild = forEachChild; + /** @internal */ + /** + * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes + * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; additionally, + * unlike `forEachChild`, embedded arrays are flattened and the 'cbNode' callback is invoked for each element. + * If a callback returns a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. + * + * @param node a given node to visit its children + * @param cbNode a callback to be invoked for all child nodes + * @param cbNodes a callback to be invoked for embedded array + * + * @remarks Unlike `forEachChild`, `forEachChildRecursively` handles recursively invoking the traversal on each child node found, + * and while doing so, handles traversing the structure without relying on the callstack to encode the tree structure. + */ + function forEachChildRecursively(rootNode, cbNode, cbNodes) { + var stack = [rootNode]; + while (stack.length) { + var parent = stack.pop(); + var res = visitAllPossibleChildren(parent, gatherPossibleChildren(parent)); + if (res) { + return res; + } + } + return; + function gatherPossibleChildren(node) { + var children = []; + forEachChild(node, addWorkItem, addWorkItem); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal + return children; + function addWorkItem(n) { + children.unshift(n); + } + } + function visitAllPossibleChildren(parent, children) { + for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { + var child = children_1[_i]; + if (ts.isArray(child)) { + if (cbNodes) { + var res = cbNodes(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + for (var i = child.length - 1; i >= 0; i--) { + var realChild = child[i]; + var res = cbNode(realChild, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + stack.push(realChild); + } + } + else { + stack.push(child); + var res = cbNode(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + } + } + } + ts.forEachChildRecursively = forEachChildRecursively; function createSourceFile(fileName, sourceText, languageVersion, setParentNodes, scriptKind) { if (setParentNodes === void 0) { setParentNodes = false; } ts.performance.mark("beforeParse"); @@ -19106,27 +19528,15 @@ var ts; // a syntax tree, and no semantic features, then the binding process is an unnecessary // overhead. This functions allows us to set all the parents, without all the expense of // binding. - var parent = rootNode; - forEachChild(rootNode, visitNode); - return; - function visitNode(n) { - // walk down setting parents that differ from the parent we think it should be. This - // allows us to quickly bail out of setting parents for subtrees during incremental - // parsing - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; - forEachChild(n, visitNode); - if (ts.hasJSDocNodes(n)) { - for (var _i = 0, _a = n.jsDoc; _i < _a.length; _i++) { - var jsDoc = _a[_i]; - jsDoc.parent = n; - parent = jsDoc; - forEachChild(jsDoc, visitNode); - } + forEachChildRecursively(rootNode, bindParentToChild); + function bindParentToChild(child, parent) { + child.parent = parent; + if (ts.hasJSDocNodes(child)) { + for (var _i = 0, _a = child.jsDoc; _i < _a.length; _i++) { + var doc = _a[_i]; + bindParentToChild(doc, child); + forEachChildRecursively(doc, bindParentToChild); } - parent = saveParent; } } } @@ -19297,8 +19707,11 @@ var ts; function reScanSlashToken() { return currentToken = scanner.reScanSlashToken(); } - function reScanTemplateToken() { - return currentToken = scanner.reScanTemplateToken(); + function reScanTemplateToken(isTaggedTemplate) { + return currentToken = scanner.reScanTemplateToken(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + return currentToken = scanner.reScanTemplateHeadOrNoSubstitutionTemplate(); } function reScanLessThanToken() { return currentToken = scanner.reScanLessThanToken(); @@ -19518,7 +19931,7 @@ var ts; // An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues // with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for // each identifier in order to reduce memory consumption. - function createIdentifier(isIdentifier, diagnosticMessage) { + function createIdentifier(isIdentifier, diagnosticMessage, privateIdentifierDiagnosticMessage) { identifierCount++; if (isIdentifier) { var node = createNode(75 /* Identifier */); @@ -19530,6 +19943,10 @@ var ts; nextTokenWithoutCheck(); return finishNode(node); } + if (token() === 76 /* PrivateIdentifier */) { + parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + return createIdentifier(/*isIdentifier*/ true); + } // Only for end of file because the error gets reported incorrectly on embedded script tags. var reportAtCurrentPosition = token() === 1 /* EndOfFileToken */; var isReservedWord = scanner.isReservedWord(); @@ -19539,8 +19956,8 @@ var ts; ts.Diagnostics.Identifier_expected; return createMissingNode(75 /* Identifier */, reportAtCurrentPosition, diagnosticMessage || defaultMessage, msgArg); } - function parseIdentifier(diagnosticMessage) { - return createIdentifier(isIdentifier(), diagnosticMessage); + function parseIdentifier(diagnosticMessage, privateIdentifierDiagnosticMessage) { + return createIdentifier(isIdentifier(), diagnosticMessage, privateIdentifierDiagnosticMessage); } function parseIdentifierName(diagnosticMessage) { return createIdentifier(ts.tokenIsIdentifierOrKeyword(token()), diagnosticMessage); @@ -19716,9 +20133,9 @@ var ts; return isIdentifier() && !isHeritageClauseExtendsOrImplementsKeyword(); } case 8 /* VariableDeclarations */: - return isIdentifierOrPattern(); + return isIdentifierOrPrivateIdentifierOrPattern(); case 10 /* ArrayBindingElements */: - return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isIdentifierOrPattern(); + return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isIdentifierOrPrivateIdentifierOrPattern(); case 19 /* TypeParameters */: return isIdentifier(); case 15 /* ArrayLiteralMembers */: @@ -20314,24 +20731,24 @@ var ts; } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } - function parseTemplateExpression() { + function parseTemplateExpression(isTaggedTemplate) { var template = createNode(211 /* TemplateExpression */); - template.head = parseTemplateHead(); + template.head = parseTemplateHead(isTaggedTemplate); ts.Debug.assert(template.head.kind === 15 /* TemplateHead */, "Template head has wrong token kind"); var list = []; var listPos = getNodePos(); do { - list.push(parseTemplateSpan()); + list.push(parseTemplateSpan(isTaggedTemplate)); } while (ts.last(list).literal.kind === 16 /* TemplateMiddle */); template.templateSpans = createNodeArray(list, listPos); return finishNode(template); } - function parseTemplateSpan() { + function parseTemplateSpan(isTaggedTemplate) { var span = createNode(221 /* TemplateSpan */); span.expression = allowInAnd(parseExpression); var literal; if (token() === 19 /* CloseBraceToken */) { - reScanTemplateToken(); + reScanTemplateToken(isTaggedTemplate); literal = parseTemplateMiddleOrTemplateTail(); } else { @@ -20343,7 +20760,10 @@ var ts; function parseLiteralNode() { return parseLiteralLikeNode(token()); } - function parseTemplateHead() { + function parseTemplateHead(isTaggedTemplate) { + if (isTaggedTemplate) { + reScanTemplateHeadOrNoSubstitutionTemplate(); + } var fragment = parseLiteralLikeNode(token()); ts.Debug.assert(fragment.kind === 15 /* TemplateHead */, "Template head has wrong token kind"); return fragment; @@ -20381,6 +20801,9 @@ var ts; if (node.kind === 8 /* NumericLiteral */) { node.numericLiteralFlags = scanner.getTokenFlags() & 1008 /* NumericLiteralFlags */; } + if (ts.isTemplateLiteralKind(node.kind)) { + node.templateFlags = scanner.getTokenFlags() & 2048 /* ContainsInvalidEscape */; + } nextToken(); finishNode(node); return node; @@ -20564,7 +20987,7 @@ var ts; } function isStartOfParameter(isJSDocParameter) { return token() === 25 /* DotDotDotToken */ || - isIdentifierOrPattern() || + isIdentifierOrPrivateIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 59 /* AtToken */ || isStartOfType(/*inStartOfParameter*/ !isJSDocParameter); @@ -20581,7 +21004,7 @@ var ts; node.dotDotDotToken = parseOptionalToken(25 /* DotDotDotToken */); // FormalParameter [Yield,Await]: // BindingElement[?Yield,?Await] - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_cannot_be_used_as_parameters); if (ts.getFullWidth(node.name) === 0 && !node.modifiers && ts.isModifierKind(token())) { // in cases like // 'use strict' @@ -21318,6 +21741,7 @@ var ts; case 29 /* LessThanToken */: case 127 /* AwaitKeyword */: case 121 /* YieldKeyword */: + case 76 /* PrivateIdentifier */: // Yield/await always starts an expression. Either it is an identifier (in which case // it is definitely an expression). Or it's a keyword (either because we're in // a generator or async function, or in strict mode (or both)) and it started a yield or await expression. @@ -22501,8 +22925,8 @@ var ts; tagExpression.questionDotToken = questionDotToken; tagExpression.typeArguments = typeArguments; tagExpression.template = token() === 14 /* NoSubstitutionTemplateLiteral */ - ? parseLiteralNode() - : parseTemplateExpression(); + ? (reScanTemplateHeadOrNoSubstitutionTemplate(), parseLiteralNode()) + : parseTemplateExpression(/*isTaggedTemplate*/ true); if (questionDotToken || tag.flags & 32 /* OptionalChain */) { tagExpression.flags |= 32 /* OptionalChain */; } @@ -22663,7 +23087,7 @@ var ts; } break; case 15 /* TemplateHead */: - return parseTemplateExpression(); + return parseTemplateExpression(/* isTaggedTemplate */ false); } return parseIdentifier(ts.Diagnostics.Expression_expected); } @@ -23427,24 +23851,27 @@ var ts; parseExpected(23 /* CloseBracketToken */); return finishNode(node); } - function isIdentifierOrPattern() { - return token() === 18 /* OpenBraceToken */ || token() === 22 /* OpenBracketToken */ || isIdentifier(); + function isIdentifierOrPrivateIdentifierOrPattern() { + return token() === 18 /* OpenBraceToken */ + || token() === 22 /* OpenBracketToken */ + || token() === 76 /* PrivateIdentifier */ + || isIdentifier(); } - function parseIdentifierOrPattern() { + function parseIdentifierOrPattern(privateIdentifierDiagnosticMessage) { if (token() === 22 /* OpenBracketToken */) { return parseArrayBindingPattern(); } if (token() === 18 /* OpenBraceToken */) { return parseObjectBindingPattern(); } - return parseIdentifier(); + return parseIdentifier(/*diagnosticMessage*/ undefined, privateIdentifierDiagnosticMessage); } function parseVariableDeclarationAllowExclamation() { return parseVariableDeclaration(/*allowExclamation*/ true); } function parseVariableDeclaration(allowExclamation) { var node = createNode(242 /* VariableDeclaration */); - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_are_not_allowed_in_variable_declarations); if (allowExclamation && node.name.kind === 75 /* Identifier */ && token() === 53 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) { node.exclamationToken = parseTokenNode(); @@ -24078,17 +24505,18 @@ var ts; } return finishNode(node); } - function parseNamespaceExport() { - var node = createNode(262 /* NamespaceExport */); + function parseNamespaceExport(pos) { + var node = createNode(262 /* NamespaceExport */, pos); node.name = parseIdentifier(); return finishNode(node); } function parseExportDeclaration(node) { node.kind = 260 /* ExportDeclaration */; node.isTypeOnly = parseOptional(145 /* TypeKeyword */); + var namespaceExportPos = scanner.getStartPos(); if (parseOptional(41 /* AsteriskToken */)) { if (parseOptional(123 /* AsKeyword */)) { - node.exportClause = parseNamespaceExport(); + node.exportClause = parseNamespaceExport(namespaceExportPos); } parseExpected(149 /* FromKeyword */); node.moduleSpecifier = parseModuleSpecifier(); @@ -24420,25 +24848,28 @@ var ts; case "author": tag = parseAuthorTag(start, tagName, margin); break; + case "implements": + tag = parseImplementsTag(start, tagName); + break; case "augments": case "extends": tag = parseAugmentsTag(start, tagName); break; case "class": case "constructor": - tag = parseSimpleTag(start, 309 /* JSDocClassTag */, tagName); + tag = parseSimpleTag(start, 310 /* JSDocClassTag */, tagName); break; case "public": - tag = parseSimpleTag(start, 310 /* JSDocPublicTag */, tagName); + tag = parseSimpleTag(start, 311 /* JSDocPublicTag */, tagName); break; case "private": - tag = parseSimpleTag(start, 311 /* JSDocPrivateTag */, tagName); + tag = parseSimpleTag(start, 312 /* JSDocPrivateTag */, tagName); break; case "protected": - tag = parseSimpleTag(start, 312 /* JSDocProtectedTag */, tagName); + tag = parseSimpleTag(start, 313 /* JSDocProtectedTag */, tagName); break; case "readonly": - tag = parseSimpleTag(start, 313 /* JSDocReadonlyTag */, tagName); + tag = parseSimpleTag(start, 314 /* JSDocReadonlyTag */, tagName); break; case "this": tag = parseThisTag(start, tagName); @@ -24490,10 +24921,12 @@ var ts; comments.push(text); indent += text.length; } - if (initialMargin) { + if (initialMargin !== undefined) { // jump straight to saving comments if there is some initial indentation - pushComment(initialMargin); - state = 2 /* SavingComments */; + if (initialMargin !== "") { + pushComment(initialMargin); + } + state = 1 /* SawAsterisk */; } var tok = token(); loop: while (true) { @@ -24621,7 +25054,7 @@ var ts; case 174 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: - return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object"; + return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; } } function parseParameterOrPropertyTag(start, tagName, target, indent) { @@ -24634,8 +25067,8 @@ var ts; typeExpression = tryParseTypeExpression(); } var result = target === 1 /* Property */ ? - createNode(322 /* JSDocPropertyTag */, start) : - createNode(316 /* JSDocParameterTag */, start); + createNode(323 /* JSDocPropertyTag */, start) : + createNode(317 /* JSDocParameterTag */, start); var comment = parseTagComments(indent + scanner.getStartPos() - start); var nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent); if (nestedTypeLiteral) { @@ -24658,7 +25091,7 @@ var ts; var start_3 = scanner.getStartPos(); var children = void 0; while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) { - if (child.kind === 316 /* JSDocParameterTag */ || child.kind === 322 /* JSDocPropertyTag */) { + if (child.kind === 317 /* JSDocParameterTag */ || child.kind === 323 /* JSDocPropertyTag */) { children = ts.append(children, child); } } @@ -24677,7 +25110,7 @@ var ts; if (ts.some(tags, ts.isJSDocReturnTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(317 /* JSDocReturnTag */, start); + var result = createNode(318 /* JSDocReturnTag */, start); result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); @@ -24686,13 +25119,13 @@ var ts; if (ts.some(tags, ts.isJSDocTypeTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(319 /* JSDocTypeTag */, start); + var result = createNode(320 /* JSDocTypeTag */, start); result.tagName = tagName; result.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); return finishNode(result); } function parseAuthorTag(start, tagName, indent) { - var result = createNode(308 /* JSDocAuthorTag */, start); + var result = createNode(309 /* JSDocAuthorTag */, start); result.tagName = tagName; var authorInfoWithEmail = tryParse(function () { return tryParseAuthorNameAndEmail(); }); if (!authorInfoWithEmail) { @@ -24745,6 +25178,12 @@ var ts; return comments.length === 0 ? undefined : comments.join(""); } } + function parseImplementsTag(start, tagName) { + var result = createNode(308 /* JSDocImplementsTag */, start); + result.tagName = tagName; + result.class = parseExpressionWithTypeArgumentsForAugments(); + return finishNode(result); + } function parseAugmentsTag(start, tagName) { var result = createNode(307 /* JSDocAugmentsTag */, start); result.tagName = tagName; @@ -24778,14 +25217,14 @@ var ts; return finishNode(tag); } function parseThisTag(start, tagName) { - var tag = createNode(318 /* JSDocThisTag */, start); + var tag = createNode(319 /* JSDocThisTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); return finishNode(tag); } function parseEnumTag(start, tagName) { - var tag = createNode(315 /* JSDocEnumTag */, start); + var tag = createNode(316 /* JSDocEnumTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); @@ -24794,7 +25233,7 @@ var ts; function parseTypedefTag(start, tagName, indent) { var typeExpression = tryParseTypeExpression(); skipWhitespaceOrAsterisk(); - var typedefTag = createNode(321 /* JSDocTypedefTag */, start); + var typedefTag = createNode(322 /* JSDocTypedefTag */, start); typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(); typedefTag.name = getJSDocTypeAliasName(typedefTag.fullName); @@ -24810,7 +25249,7 @@ var ts; if (!jsdocTypeLiteral) { jsdocTypeLiteral = createNode(304 /* JSDocTypeLiteral */, start); } - if (child.kind === 319 /* JSDocTypeTag */) { + if (child.kind === 320 /* JSDocTypeTag */) { if (childTypeTag) { break; } @@ -24856,7 +25295,7 @@ var ts; return typeNameOrNamespaceName; } function parseCallbackTag(start, tagName, indent) { - var callbackTag = createNode(314 /* JSDocCallbackTag */, start); + var callbackTag = createNode(315 /* JSDocCallbackTag */, start); callbackTag.tagName = tagName; callbackTag.fullName = parseJSDocTypeNameWithNamespace(); callbackTag.name = getJSDocTypeAliasName(callbackTag.fullName); @@ -24871,7 +25310,7 @@ var ts; var returnTag = tryParse(function () { if (parseOptionalJsdoc(59 /* AtToken */)) { var tag = parseTag(indent); - if (tag && tag.kind === 317 /* JSDocReturnTag */) { + if (tag && tag.kind === 318 /* JSDocReturnTag */) { return tag; } } @@ -24916,7 +25355,7 @@ var ts; case 59 /* AtToken */: if (canParseTag) { var child = tryParseChildTag(target, indent); - if (child && (child.kind === 316 /* JSDocParameterTag */ || child.kind === 322 /* JSDocPropertyTag */) && + if (child && (child.kind === 317 /* JSDocParameterTag */ || child.kind === 323 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; @@ -24983,10 +25422,10 @@ var ts; var typeParameter = createNode(155 /* TypeParameter */); typeParameter.name = parseJSDocIdentifierName(ts.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces); finishNode(typeParameter); - skipWhitespace(); + skipWhitespaceOrAsterisk(); typeParameters.push(typeParameter); } while (parseOptionalJsdoc(27 /* CommaToken */)); - var result = createNode(320 /* JSDocTemplateTag */, start); + var result = createNode(321 /* JSDocTemplateTag */, start); result.tagName = tagName; result.constraint = constraint; result.typeParameters = createNodeArray(typeParameters, typeParametersPos); @@ -26542,6 +26981,7 @@ var ts; { name: "noErrorTruncation", type: "boolean", + affectsSemanticDiagnostics: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Do_not_truncate_error_messages }, @@ -26671,6 +27111,7 @@ var ts; { name: "forceConsistentCasingInFileNames", type: "boolean", + affectsModuleResolution: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file }, @@ -26872,6 +27313,7 @@ var ts; createDiagnostics(diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnostics(diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption); } + /*@internal*/ function parseCommandLineWorker(diagnostics, commandLine, readFile) { var options = {}; var watchOptions; @@ -26948,50 +27390,78 @@ var ts; parseStrings(args); } } + ts.parseCommandLineWorker = parseCommandLineWorker; function parseOptionValue(args, i, diagnostics, opt, options, errors) { if (opt.isTSConfigOnly) { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name)); + var optValue = args[i]; + if (optValue === "null") { + options[opt.name] = undefined; + i++; + } + else if (opt.type === "boolean") { + if (optValue === "false") { + options[opt.name] = false; + i++; + } + else { + if (optValue === "true") + i++; + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, opt.name)); + } + } + else { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, opt.name)); + if (optValue && !ts.startsWith(optValue, "-")) + i++; + } } else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). if (!args[i] && opt.type !== "boolean") { errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name, getCompilerOptionValueTypeString(opt))); } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i]); - i++; - break; - case "boolean": - // boolean flag has optional value true, false, others - var optValue = args[i]; - options[opt.name] = optValue !== "false"; - // consume next argument as boolean flag value - if (optValue === "false" || optValue === "true") { + if (args[i] !== "null") { + switch (opt.type) { + case "number": + options[opt.name] = parseInt(args[i]); i++; - } - break; - case "string": - options[opt.name] = args[i] || ""; - i++; - break; - case "list": - var result = parseListTypeOption(opt, args[i], errors); - options[opt.name] = result || []; - if (result) { + break; + case "boolean": + // boolean flag has optional value true, false, others + var optValue = args[i]; + options[opt.name] = optValue !== "false"; + // consume next argument as boolean flag value + if (optValue === "false" || optValue === "true") { + i++; + } + break; + case "string": + options[opt.name] = args[i] || ""; i++; - } - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - options[opt.name] = parseCustomTypeOption(opt, args[i], errors); - i++; - break; + break; + case "list": + var result = parseListTypeOption(opt, args[i], errors); + options[opt.name] = result || []; + if (result) { + i++; + } + break; + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + options[opt.name] = parseCustomTypeOption(opt, args[i], errors); + i++; + break; + } + } + else { + options[opt.name] = undefined; + i++; } } return i; } - var compilerOptionsDidYouMeanDiagnostics = { + /*@internal*/ + ts.compilerOptionsDidYouMeanDiagnostics = { getOptionsNameMap: getOptionsNameMap, optionDeclarations: ts.optionDeclarations, unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, @@ -26999,7 +27469,7 @@ var ts; optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); + return parseCommandLineWorker(ts.compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; /** @internal */ @@ -27176,7 +27646,7 @@ var ts; name: "compilerOptions", type: "object", elementOptions: getCommandLineCompilerOptionsMap(), - extraKeyDiagnostics: compilerOptionsDidYouMeanDiagnostics, + extraKeyDiagnostics: ts.compilerOptionsDidYouMeanDiagnostics, }, { name: "watchOptions", @@ -27654,7 +28124,7 @@ var ts; } ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { - if (option) { + if (option && !isNullOrUndefined(value)) { if (option.type === "list") { var values = value; if (option.element.isFilePath && values.length) { @@ -28005,7 +28475,7 @@ var ts; } function getExtendedConfig(sourceFile, extendedConfigPath, host, basePath, resolutionStack, errors, extendedConfigCache) { var _a; - var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toLowerCase(extendedConfigPath); + var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toFileNameLowerCase(extendedConfigPath); var value; var extendedResult; var extendedConfig; @@ -28075,7 +28545,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, compilerOptionsDidYouMeanDiagnostics, errors); + convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, ts.compilerOptionsDidYouMeanDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -28262,7 +28732,7 @@ var ts; function getFileNamesFromConfigSpecs(spec, basePath, options, host, extraFileExtensions) { if (extraFileExtensions === void 0) { extraFileExtensions = []; } basePath = ts.normalizePath(basePath); - var keyMapper = host.useCaseSensitiveFileNames ? ts.identity : ts.toLowerCase; + var keyMapper = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); // Literal file names (provided via the "files" array in tsconfig.json) are stored in a // file map with a possibly case insensitive key. We use this map later when when including // wildcard paths. @@ -28421,7 +28891,7 @@ var ts; var match = wildcardDirectoryPattern.exec(spec); if (match) { return { - key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(), + key: useCaseSensitiveFileNames ? match[0] : ts.toFileNameLowerCase(match[0]), flags: watchRecursivePattern.test(spec) ? 1 /* Recursive */ : 0 /* None */ }; } @@ -30141,7 +30611,7 @@ var ts; } } function getDisplayName(node) { - return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.assertDefined(getDeclarationName(node))); + return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.checkDefined(getDeclarationName(node))); } /** * Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. @@ -30542,9 +31012,9 @@ var ts; case 196 /* CallExpression */: bindCallExpressionFlow(node); break; - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime @@ -30651,9 +31121,12 @@ var ts; function createLoopLabel() { return initFlowNode({ flags: 8 /* LoopLabel */, antecedents: undefined }); } + function createReduceLabel(target, antecedents, antecedent) { + return initFlowNode({ flags: 1024 /* ReduceLabel */, target: target, antecedents: antecedents, antecedent: antecedent }); + } function setFlowNodeReferenced(flow) { // On first reference we set the Referenced flag, thereafter we set the Shared flag - flow.flags |= flow.flags & 1024 /* Referenced */ ? 2048 /* Shared */ : 1024 /* Referenced */; + flow.flags |= flow.flags & 2048 /* Referenced */ ? 4096 /* Shared */ : 2048 /* Referenced */; } function addAntecedent(label, antecedent) { if (!(antecedent.flags & 1 /* Unreachable */) && !ts.contains(label.antecedents, antecedent)) { @@ -30884,35 +31357,36 @@ var ts; } } function bindTryStatement(node) { - var preFinallyLabel = createBranchLabel(); // We conservatively assume that *any* code in the try block can cause an exception, but we only need // to track code that causes mutations (because only mutations widen the possible control flow type of - // a variable). The currentExceptionTarget is the target label for control flows that result from - // exceptions. We add all mutation flow nodes as antecedents of this label such that we can analyze them - // as possible antecedents of the start of catch or finally blocks. Furthermore, we add the current - // control flow to represent exceptions that occur before any mutations. + // a variable). The exceptionLabel is the target label for control flows that result from exceptions. + // We add all mutation flow nodes as antecedents of this label such that we can analyze them as possible + // antecedents of the start of catch or finally blocks. Furthermore, we add the current control flow to + // represent exceptions that occur before any mutations. var saveReturnTarget = currentReturnTarget; var saveExceptionTarget = currentExceptionTarget; - currentReturnTarget = createBranchLabel(); - currentExceptionTarget = node.catchClause ? createBranchLabel() : currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + var normalExitLabel = createBranchLabel(); + var returnLabel = createBranchLabel(); + var exceptionLabel = createBranchLabel(); + if (node.finallyBlock) { + currentReturnTarget = returnLabel; + } + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.tryBlock); - addAntecedent(preFinallyLabel, currentFlow); - var flowAfterTry = currentFlow; - var flowAfterCatch = unreachableFlow; + addAntecedent(normalExitLabel, currentFlow); if (node.catchClause) { // Start of catch clause is the target of exceptions from try block. - currentFlow = finishFlowLabel(currentExceptionTarget); + currentFlow = finishFlowLabel(exceptionLabel); // The currentExceptionTarget now represents control flows from exceptions in the catch clause. // Effectively, in a try-catch-finally, if an exception occurs in the try block, the catch block // acts like a second try block. - currentExceptionTarget = currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + exceptionLabel = createBranchLabel(); + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.catchClause); - addAntecedent(preFinallyLabel, currentFlow); - flowAfterCatch = currentFlow; + addAntecedent(normalExitLabel, currentFlow); } - var exceptionTarget = finishFlowLabel(currentExceptionTarget); currentReturnTarget = saveReturnTarget; currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { @@ -30925,35 +31399,33 @@ var ts; // When analyzing a control flow graph that starts inside a finally block we want to consider all // five possibilities above. However, when analyzing a control flow graph that starts outside (past) // the finally block, we only want to consider the first two (if we're past a finally block then it - // must have completed normally). To make this possible, we inject two extra nodes into the control - // flow graph: An after-finally with an antecedent of the control flow at the end of the finally - // block, and a pre-finally with an antecedent that represents all exceptional control flows. The - // 'lock' property of the pre-finally references the after-finally, and the after-finally has a - // boolean 'locked' property that we set to true when analyzing a control flow that contained the - // the after-finally node. When the lock associated with a pre-finally is locked, the antecedent of - // the pre-finally (i.e. the exceptional control flows) are skipped. - var preFinallyFlow = initFlowNode({ flags: 4096 /* PreFinally */, antecedent: exceptionTarget, lock: {} }); - addAntecedent(preFinallyLabel, preFinallyFlow); - currentFlow = finishFlowLabel(preFinallyLabel); + // must have completed normally). Likewise, when analyzing a control flow graph from return statements + // in try or catch blocks in an IIFE, we only want to consider the third. To make this possible, we + // inject a ReduceLabel node into the control flow graph. This node contains an alternate reduced + // set of antecedents for the pre-finally label. As control flow analysis passes by a ReduceLabel + // node, the pre-finally label is temporarily switched to the reduced antecedent set. + var finallyLabel = createBranchLabel(); + finallyLabel.antecedents = ts.concatenate(ts.concatenate(normalExitLabel.antecedents, exceptionLabel.antecedents), returnLabel.antecedents); + currentFlow = finallyLabel; bind(node.finallyBlock); - // If the end of the finally block is reachable, but the end of the try and catch blocks are not, - // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should - // result in an unreachable current control flow. - if (!(currentFlow.flags & 1 /* Unreachable */)) { - if ((flowAfterTry.flags & 1 /* Unreachable */) && (flowAfterCatch.flags & 1 /* Unreachable */)) { - currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow - ? reportedUnreachableFlow - : unreachableFlow; - } + if (currentFlow.flags & 1 /* Unreachable */) { + // If the end of the finally block is unreachable, the end of the entire try statement is unreachable. + currentFlow = unreachableFlow; } - if (!(currentFlow.flags & 1 /* Unreachable */)) { - var afterFinallyFlow = initFlowNode({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); - preFinallyFlow.lock = afterFinallyFlow; - currentFlow = afterFinallyFlow; + else { + // If we have an IIFE return target and return statements in the try or catch blocks, add a control + // flow that goes back through the finally block and back through only the return statements. + if (currentReturnTarget && returnLabel.antecedents) { + addAntecedent(currentReturnTarget, createReduceLabel(finallyLabel, returnLabel.antecedents, currentFlow)); + } + // If the end of the finally block is reachable, but the end of the try and catch blocks are not, + // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should + // result in an unreachable current control flow. + currentFlow = normalExitLabel.antecedents ? createReduceLabel(finallyLabel, normalExitLabel.antecedents, currentFlow) : unreachableFlow; } } else { - currentFlow = finishFlowLabel(preFinallyLabel); + currentFlow = finishFlowLabel(normalExitLabel); } } function bindSwitchStatement(node) { @@ -31111,28 +31583,145 @@ var ts; bindAssignmentTargetFlow(node.operand); } } + var BindBinaryExpressionFlowState; + (function (BindBinaryExpressionFlowState) { + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindThenBindChildren"] = 0] = "BindThenBindChildren"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["MaybeBindLeft"] = 1] = "MaybeBindLeft"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindToken"] = 2] = "BindToken"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindRight"] = 3] = "BindRight"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["FinishBind"] = 4] = "FinishBind"; + })(BindBinaryExpressionFlowState || (BindBinaryExpressionFlowState = {})); function bindBinaryExpressionFlow(node) { - var operator = node.operatorToken.kind; - if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { - if (isTopLevelLogicalExpression(node)) { - var postExpressionLabel = createBranchLabel(); - bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); - currentFlow = finishFlowLabel(postExpressionLabel); + var workStacks = { + expr: [node], + state: [1 /* MaybeBindLeft */], + inStrictMode: [undefined], + parent: [undefined], + subtreeFlags: [undefined] + }; + var stackIndex = 0; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0 /* BindThenBindChildren */: { + // This state is used only when recuring, to emulate the work that `bind` does before + // reaching `bindChildren`. A normal call to `bindBinaryExpressionFlow` will already have done this work. + node.parent = parent; + var saveInStrictMode = inStrictMode; + bindWorker(node); + var saveParent = parent; + parent = node; + var subtreeFlagsState = void 0; + // While this next part does the work of `bindChildren` before it descends into `bindChildrenWorker` + // and uses `subtreeFlagsState` to queue up the work that needs to be done once the node is bound. + if (skipTransformFlagAggregation) { + // do nothing extra + } + else if (node.transformFlags & 536870912 /* HasComputedFlags */) { + skipTransformFlagAggregation = true; + subtreeFlagsState = -1; + } + else { + var savedSubtreeTransformFlags = subtreeTransformFlags; + subtreeTransformFlags = 0; + subtreeFlagsState = savedSubtreeTransformFlags; + } + advanceState(1 /* MaybeBindLeft */, saveInStrictMode, saveParent, subtreeFlagsState); + break; + } + case 1 /* MaybeBindLeft */: { + var operator = node.operatorToken.kind; + // TODO: bindLogicalExpression is recursive - if we want to handle deeply nested `&&` expressions + // we'll need to handle the `bindLogicalExpression` scenarios in this state machine, too + // For now, though, since the common cases are chained `+`, leaving it recursive is fine + if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { + if (isTopLevelLogicalExpression(node)) { + var postExpressionLabel = createBranchLabel(); + bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); + currentFlow = finishFlowLabel(postExpressionLabel); + } + else { + bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + completeNode(); + } + else { + advanceState(2 /* BindToken */); + maybeBind(node.left); + } + break; + } + case 2 /* BindToken */: { + advanceState(3 /* BindRight */); + maybeBind(node.operatorToken); + break; + } + case 3 /* BindRight */: { + advanceState(4 /* FinishBind */); + maybeBind(node.right); + break; + } + case 4 /* FinishBind */: { + var operator = node.operatorToken.kind; + if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { + bindAssignmentTargetFlow(node.left); + if (operator === 62 /* EqualsToken */ && node.left.kind === 195 /* ElementAccessExpression */) { + var elementAccess = node.left; + if (isNarrowableOperand(elementAccess.expression)) { + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); + } + } + } + completeNode(); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for bindBinaryExpressionFlow"); } - else { - bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + /** + * Note that `advanceState` sets the _current_ head state, and that `maybeBind` potentially pushes on a new + * head state; so `advanceState` must be called before any `maybeBind` during a state's execution. + */ + function advanceState(state, isInStrictMode, parent, subtreeFlags) { + workStacks.state[stackIndex] = state; + if (isInStrictMode !== undefined) { + workStacks.inStrictMode[stackIndex] = isInStrictMode; + } + if (parent !== undefined) { + workStacks.parent[stackIndex] = parent; + } + if (subtreeFlags !== undefined) { + workStacks.subtreeFlags[stackIndex] = subtreeFlags; } } - else { - bindEachChild(node); - if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { - bindAssignmentTargetFlow(node.left); - if (operator === 62 /* EqualsToken */ && node.left.kind === 195 /* ElementAccessExpression */) { - var elementAccess = node.left; - if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); - } + function completeNode() { + if (workStacks.inStrictMode[stackIndex] !== undefined) { + if (workStacks.subtreeFlags[stackIndex] === -1) { + skipTransformFlagAggregation = false; + subtreeTransformFlags |= node.transformFlags & ~getTransformFlagsSubtreeExclusions(node.kind); + } + else if (workStacks.subtreeFlags[stackIndex] !== undefined) { + subtreeTransformFlags = workStacks.subtreeFlags[stackIndex] | computeTransformFlagsForNode(node, subtreeTransformFlags); } + inStrictMode = workStacks.inStrictMode[stackIndex]; + parent = workStacks.parent[stackIndex]; + } + stackIndex--; + } + /** + * If `node` is a BinaryExpression, adds it to the local work stack, otherwise recursively binds it + */ + function maybeBind(node) { + if (node && ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0 /* BindThenBindChildren */; + workStacks.inStrictMode[stackIndex] = undefined; + workStacks.parent[stackIndex] = undefined; + workStacks.subtreeFlags[stackIndex] = undefined; + } + else { + bind(node); } } } @@ -31177,7 +31766,7 @@ var ts; } function bindJSDocTypeAlias(node) { node.tagName.parent = node; - if (node.kind !== 315 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 316 /* JSDocEnumTag */ && node.fullName) { setParentPointers(node, node.fullName); } } @@ -31393,8 +31982,8 @@ var ts; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 300 /* JSDocFunctionType */: - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: case 247 /* TypeAliasDeclaration */: case 186 /* MappedType */: // All the children of these container types are never visible through another @@ -31599,7 +32188,9 @@ var ts; container = declName.parent.expression.name; break; case 5 /* Property */: - container = ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression; + container = isExportsOrModuleExportsOrAlias(file, declName.parent.expression) ? file + : ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name + : declName.parent.expression; break; case 0 /* None */: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); @@ -32014,7 +32605,7 @@ var ts; case 304 /* JSDocTypeLiteral */: case 186 /* MappedType */: return bindAnonymousTypeWorker(node); - case 309 /* JSDocClassTag */: + case 310 /* JSDocClassTag */: return bindJSDocClassTag(node); case 193 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); @@ -32082,7 +32673,7 @@ var ts; // falls through case 250 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: if (node.parent.kind === 305 /* JSDocSignature */) { return bindParameter(node); } @@ -32090,15 +32681,15 @@ var ts; break; } // falls through - case 322 /* JSDocPropertyTag */: + case 323 /* JSDocPropertyTag */: var propTag = node; var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 299 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -32170,6 +32761,9 @@ var ts; declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* ExportStar */, 0 /* None */); } else if (ts.isNamespaceExport(node.exportClause)) { + // declareSymbol walks up parents to find name text, parent _must_ be set + // but won't be set by the normal binder walk until `bindChildren` later on. + node.exportClause.parent = node; declareSymbol(container.symbol.exports, container.symbol, node.exportClause, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } } @@ -32605,7 +33199,7 @@ var ts; } } function bindParameter(node) { - if (node.kind === 316 /* JSDocParameterTag */ && container.kind !== 305 /* JSDocSignature */) { + if (node.kind === 317 /* JSDocParameterTag */ && container.kind !== 305 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 8388608 /* Ambient */)) { @@ -33322,7 +33916,7 @@ var ts; break; case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: // These nodes are TypeScript syntax. transformFlags |= 1 /* AssertTypeScript */; excludeFlags = 536870912 /* OuterExpressionExcludes */; @@ -33359,8 +33953,18 @@ var ts; case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: case 17 /* TemplateTail */: - case 211 /* TemplateExpression */: + if (node.templateFlags) { + transformFlags |= 32 /* AssertES2018 */; + break; + } + // falls through case 198 /* TaggedTemplateExpression */: + if (ts.hasInvalidEscape(node.template)) { + transformFlags |= 32 /* AssertES2018 */; + break; + } + // falls through + case 211 /* TemplateExpression */: case 282 /* ShorthandPropertyAssignment */: case 120 /* StaticKeyword */: case 219 /* MetaProperty */: @@ -33587,7 +34191,7 @@ var ts; return 536879104 /* BindingPatternExcludes */; case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: case 200 /* ParenthesizedExpression */: case 102 /* SuperKeyword */: return 536870912 /* OuterExpressionExcludes */; @@ -33921,8 +34525,7 @@ var ts; TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType"; TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; - TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; - TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 7] = "ResolvedTypeArguments"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 6] = "ResolvedTypeArguments"; })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); var CheckMode; (function (CheckMode) { @@ -34049,6 +34652,7 @@ var ts; var typeCount = 0; var symbolCount = 0; var enumCount = 0; + var totalInstantiationCount = 0; var instantiationCount = 0; var instantiationDepth = 0; var constraintDepth = 0; @@ -34091,6 +34695,7 @@ var ts; getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount") + symbolCount; }, getTypeCount: function () { return typeCount; }, + getInstantiationCount: function () { return totalInstantiationCount; }, getRelationCacheSizes: function () { return ({ assignable: assignableRelation.size, identity: identityRelation.size, @@ -34158,7 +34763,8 @@ var ts; }, getSymbolAtLocation: function (node) { node = ts.getParseTreeNode(node); - return node ? getSymbolAtLocation(node) : undefined; + // set ignoreErrors: true because any lookups invoked by the API shouldn't cause any new errors + return node ? getSymbolAtLocation(node, /*ignoreErrors*/ true) : undefined; }, getShorthandAssignmentValueSymbol: function (node) { node = ts.getParseTreeNode(node); @@ -34211,7 +34817,29 @@ var ts; getRootSymbols: getRootSymbols, getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node, contextFlags) : undefined; + if (!node) { + return undefined; + } + var containingCall = ts.findAncestor(node, ts.isCallLikeExpression); + var containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; + if (contextFlags & 4 /* Completions */ && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = true; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = undefined; + } + var result = getContextualType(node, contextFlags); + if (contextFlags & 4 /* Completions */ && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = undefined; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + } + return result; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -34451,9 +35079,9 @@ var ts; var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); var iterationTypesCache = ts.createMap(); // cache for common IterationTypes instances var noIterationTypes = { - get yieldType() { throw new Error("Not supported"); }, - get returnType() { throw new Error("Not supported"); }, - get nextType() { throw new Error("Not supported"); }, + get yieldType() { return ts.Debug.fail("Not supported"); }, + get returnType() { return ts.Debug.fail("Not supported"); }, + get nextType() { return ts.Debug.fail("Not supported"); }, }; var anyIterationTypes = createIterationTypes(anyType, anyType, anyType); var anyIterationTypesExceptNext = createIterationTypes(anyType, anyType, unknownType); @@ -34601,6 +35229,7 @@ var ts; if (jsxPragma) { var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); + ts.visitNode(file.localJsxFactory, markAsSynthetic); if (file.localJsxFactory) { return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } @@ -34611,6 +35240,7 @@ var ts; _jsxNamespace = "React"; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); + ts.visitNode(_jsxFactoryEntity, markAsSynthetic); if (_jsxFactoryEntity) { _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } @@ -34619,7 +35249,15 @@ var ts; _jsxNamespace = ts.escapeLeadingUnderscores(compilerOptions.reactNamespace); } } + if (!_jsxFactoryEntity) { + _jsxFactoryEntity = ts.createQualifiedName(ts.createIdentifier(ts.unescapeLeadingUnderscores(_jsxNamespace)), "createElement"); + } return _jsxNamespace; + function markAsSynthetic(node) { + node.pos = -1; + node.end = -1; + return ts.visitEachChild(node, markAsSynthetic, ts.nullTransformationContext); + } } function getEmitResolver(sourceFile, cancellationToken) { // Ensure we have all the type information in place for this file so that all the @@ -35008,7 +35646,14 @@ var ts; } else if (ts.isPropertyDeclaration(declaration)) { // still might be illegal if a self-referencing property initializer (eg private x = this.x) - return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage); + return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, /*stopAtAnyPropertyDeclaration*/ false); + } + else if (ts.isParameterPropertyDeclaration(declaration, declaration.parent)) { + var container_3 = ts.getEnclosingBlockScopeContainer(declaration.parent); + // foo = this.bar is illegal in esnext+useDefineForClassFields when bar is a parameter property + return !(compilerOptions.target === 99 /* ESNext */ && !!compilerOptions.useDefineForClassFields + && ts.getContainingClass(declaration) === ts.getContainingClass(usage) + && isUsedInFunctionOrInstanceProperty(usage, declaration, container_3)); } return true; } @@ -35016,6 +35661,7 @@ var ts; // 1. inside an export specifier // 2. inside a function // 3. inside an instance property initializer, a reference to a non-instance property + // (except when target: "esnext" and useDefineForClassFields: true and the reference is to a parameter property) // 4. inside a static property initializer, a reference to a static method in the same class // 5. inside a TS export= declaration (since we will move the export statement during emit to avoid TDZ) // or if usage is in a type context: @@ -35030,7 +35676,19 @@ var ts; return true; } var container = ts.getEnclosingBlockScopeContainer(declaration); - return !!(usage.flags & 4194304 /* JSDoc */) || isInTypeQuery(usage) || isUsedInFunctionOrInstanceProperty(usage, declaration, container); + if (!!(usage.flags & 4194304 /* JSDoc */) || isInTypeQuery(usage)) { + return true; + } + if (isUsedInFunctionOrInstanceProperty(usage, declaration, container)) { + if (compilerOptions.target === 99 /* ESNext */ && !!compilerOptions.useDefineForClassFields) { + return (ts.isPropertyDeclaration(declaration) || ts.isParameterPropertyDeclaration(declaration, declaration.parent)) && + !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, /*stopAtAnyPropertyDeclaration*/ true); + } + else { + return true; + } + } + return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); switch (declaration.parent.parent.kind) { @@ -35075,7 +35733,8 @@ var ts; return false; }); } - function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage) { + /** stopAtAnyPropertyDeclaration is used for detecting ES-standard class field use-before-def errors */ + function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, stopAtAnyPropertyDeclaration) { // always legal if usage is after declaration if (usage.end > declaration.end) { return false; @@ -35088,8 +35747,13 @@ var ts; } switch (node.kind) { case 202 /* ArrowFunction */: - case 159 /* PropertyDeclaration */: return true; + case 159 /* PropertyDeclaration */: + // even when stopping at any property declaration, they need to come from the same class + return stopAtAnyPropertyDeclaration && + (ts.isPropertyDeclaration(declaration) && node.parent === declaration.parent + || ts.isParameterPropertyDeclaration(declaration, declaration.parent) && node.parent === declaration.parent.parent) + ? "quit" : true; case 223 /* Block */: switch (node.parent.kind) { case 163 /* GetAccessor */: @@ -35367,9 +36031,9 @@ var ts; location = location.parent; } break; - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: // js type aliases do not resolve names from their host, so skip past it location = ts.getJSDocHost(location); break; @@ -35423,6 +36087,7 @@ var ts; !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && + !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { @@ -35447,9 +36112,10 @@ var ts; } // Perform extra checks only if error reporting was requested if (nameNotFoundMessage) { - if (propertyWithInvalidInitializer) { + if (propertyWithInvalidInitializer && !(compilerOptions.target === 99 /* ESNext */ && compilerOptions.useDefineForClassFields)) { // We have a match, but the reference occurred within a property initializer and the identifier also binds - // to a local variable in the constructor where the code will be emitted. + // to a local variable in the constructor where the code will be emitted. Note that this is actually allowed + // with ESNext+useDefineForClassFields because the scope semantics are different. var propertyName = propertyWithInvalidInitializer.name; error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), diagnosticName(nameArg)); return undefined; @@ -35493,9 +36159,27 @@ var ts; error(errorLocation, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(associatedDeclarationForContainingInitializer.name), ts.declarationNameToString(errorLocation)); } } + if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */) { + checkSymbolUsageInExpressionContext(result, name, errorLocation); + } } return result; } + function checkSymbolUsageInExpressionContext(symbol, name, useSite) { + if (!ts.isValidTypeOnlyAliasUseSite(useSite)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol); + if (typeOnlyDeclaration) { + var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type + : ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + var unescapedName = ts.unescapeLeadingUnderscores(name); + ts.addRelatedInfo(error(useSite, message, unescapedName), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, unescapedName)); + } + } + } function getIsDeferredContext(location, lastLocation) { if (location.kind !== 202 /* ArrowFunction */ && location.kind !== 201 /* FunctionExpression */) { // initializers in instance property declaration of class like entities are executed in constructor and thus deferred @@ -35628,9 +36312,19 @@ var ts; } return false; } + function isPrimitiveTypeName(name) { + return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; + } + function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 263 /* ExportSpecifier */) { + error(errorLocation, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); + return true; + } + return false; + } function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) { if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */)) { - if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") { + if (isPrimitiveTypeName(name)) { error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name)); return true; } @@ -35661,9 +36355,7 @@ var ts; if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */ & ~788968 /* Type */)) { var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 /* NamespaceModule */ & ~111551 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); if (symbol) { - error(errorLocation, ts.isTypeOnlyEnumAlias(symbol) - ? ts.Diagnostics.Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported - : ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); + error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); return true; } } @@ -35731,19 +36423,78 @@ var ts; } } function getDeclarationOfAliasSymbol(symbol) { - return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration); + return ts.find(symbol.declarations, isAliasSymbolDeclaration); + } + /** + * An alias symbol is created by one of the following declarations: + * import = ... + * import from ... + * import * as from ... + * import { x as } from ... + * export { x as } from ... + * export * as ns from ... + * export = + * export default + * module.exports = + * {} + * {name: } + */ + function isAliasSymbolDeclaration(node) { + return node.kind === 253 /* ImportEqualsDeclaration */ || + node.kind === 252 /* NamespaceExportDeclaration */ || + node.kind === 255 /* ImportClause */ && !!node.name || + node.kind === 256 /* NamespaceImport */ || + node.kind === 262 /* NamespaceExport */ || + node.kind === 258 /* ImportSpecifier */ || + node.kind === 263 /* ExportSpecifier */ || + node.kind === 259 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node) || + ts.isBinaryExpression(node) && ts.getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && ts.exportAssignmentIsAlias(node) || + ts.isPropertyAccessExpression(node) + && ts.isBinaryExpression(node.parent) + && node.parent.left === node + && node.parent.operatorToken.kind === 62 /* EqualsToken */ + && isAliasableOrJsExpression(node.parent.right) || + node.kind === 282 /* ShorthandPropertyAssignment */ || + node.kind === 281 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer); + } + function isAliasableOrJsExpression(e) { + return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { if (node.moduleReference.kind === 265 /* ExternalModuleReference */) { - return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); + var immediate = resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)); + var resolved_4 = resolveExternalModuleSymbol(immediate); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved_4, /*overwriteEmpty*/ false); + return resolved_4; } - return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); + var resolved = getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); + checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved); + return resolved; } - function resolveExportByName(moduleSymbol, name, dontResolveAlias) { + function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) { + if (markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node)); + var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type + : ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + // Non-null assertion is safe because the optionality comes from ImportClause, + // but if an ImportClause was the typeOnlyDeclaration, it had to have a `name`. + var name = ts.unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + ts.addRelatedInfo(error(node.moduleReference, message), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); + } + } + function resolveExportByName(moduleSymbol, name, sourceNode, dontResolveAlias) { var exportValue = moduleSymbol.exports.get("export=" /* ExportEquals */); - return exportValue - ? getPropertyOfType(getTypeOfSymbol(exportValue), name) - : resolveSymbol(moduleSymbol.exports.get(name), dontResolveAlias); + if (exportValue) { + return getPropertyOfType(getTypeOfSymbol(exportValue), name); + } + var exportSymbol = moduleSymbol.exports.get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(sourceNode, exportSymbol, resolved, /*overwriteEmpty*/ false); + return resolved; } function isSyntacticDefault(node) { return ((ts.isExportAssignment(node) && !node.isExportEquals) || ts.hasModifier(node, 512 /* Default */) || ts.isExportSpecifier(node)); @@ -35755,13 +36506,13 @@ var ts; // Declaration files (and ambient modules) if (!file || file.isDeclarationFile) { // Definitely cannot have a synthetic default if they have a syntactic default member specified - var defaultExportSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, /*dontResolveAlias*/ true); // Dont resolve alias because we want the immediately exported symbol's declaration + var defaultExportSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, /*sourceNode*/ undefined, /*dontResolveAlias*/ true); // Dont resolve alias because we want the immediately exported symbol's declaration if (defaultExportSymbol && ts.some(defaultExportSymbol.declarations, isSyntacticDefault)) { return false; } // It _might_ still be incorrect to assume there is no __esModule marker on the import at runtime, even if there is no `default` member // So we check a bit more, - if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias)) { + if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), /*sourceNode*/ undefined, dontResolveAlias)) { // If there is an `__esModule` specified in the declaration (meaning someone explicitly added it or wrote it in their code), // it definitely is a module and does not have a synthetic default return false; @@ -35776,7 +36527,7 @@ var ts; return hasExportAssignmentSymbol(moduleSymbol); } // JS files have a synthetic default if they do not contain ES2015+ module syntax (export = is not valid in js) _and_ do not have an __esModule marker - return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias); + return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), /*sourceNode*/ undefined, dontResolveAlias); } function getTargetOfImportClause(node, dontResolveAlias) { var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier); @@ -35786,7 +36537,7 @@ var ts; exportDefaultSymbol = moduleSymbol; } else { - exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, dontResolveAlias); + exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, node, dontResolveAlias); } var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); var hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias); @@ -35809,26 +36560,27 @@ var ts; } else if (hasSyntheticDefault) { // per emit behavior, a synthetic default overrides a "real" .default member if `__esModule` is not present - return maybeTypeOnly(resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || - resolveSymbol(moduleSymbol, dontResolveAlias)); - } - return maybeTypeOnly(exportDefaultSymbol); - } - function maybeTypeOnly(symbol) { - if (symbol && node.isTypeOnly && node.name) { - return createTypeOnlyImportOrExport(node.name, symbol); + var resolved = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, moduleSymbol, resolved, /*overwriteTypeOnly*/ false); + return resolved; } - return symbol; + markSymbolOfAliasDeclarationIfTypeOnly(node, exportDefaultSymbol, /*finalTarget*/ undefined, /*overwriteTypeOnly*/ false); + return exportDefaultSymbol; } } function getTargetOfNamespaceImport(node, dontResolveAlias) { var moduleSpecifier = node.parent.parent.moduleSpecifier; - var moduleSymbol = resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); - return moduleSymbol && node.parent.isTypeOnly ? createTypeOnlySymbol(moduleSymbol) : moduleSymbol; + var immediate = resolveExternalModuleName(node, moduleSpecifier); + var resolved = resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfNamespaceExport(node, dontResolveAlias) { var moduleSpecifier = node.parent.moduleSpecifier; - return moduleSpecifier && resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + var immediate = moduleSpecifier && resolveExternalModuleName(node, moduleSpecifier); + var resolved = moduleSpecifier && resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); + return resolved; } // This function creates a synthetic symbol that combines the value side of one symbol with the // type/namespace side of another symbol. Consider this example: @@ -35861,14 +36613,19 @@ var ts; if (valueSymbol.valueDeclaration) result.valueDeclaration = valueSymbol.valueDeclaration; if (typeSymbol.members) - result.members = typeSymbol.members; + result.members = ts.cloneMap(typeSymbol.members); if (valueSymbol.exports) - result.exports = valueSymbol.exports; + result.exports = ts.cloneMap(valueSymbol.exports); return result; } - function getExportOfModule(symbol, name, dontResolveAlias) { + function getExportOfModule(symbol, specifier, dontResolveAlias) { + var _a; if (symbol.flags & 1536 /* Module */) { - return resolveSymbol(getExportsOfSymbol(symbol).get(name), dontResolveAlias); + var name = ((_a = specifier.propertyName) !== null && _a !== void 0 ? _a : specifier.name).escapedText; + var exportSymbol = getExportsOfSymbol(symbol).get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(specifier, exportSymbol, resolved, /*overwriteEmpty*/ false); + return resolved; } } function getPropertyOfVariable(symbol, name) { @@ -35881,6 +36638,7 @@ var ts; } function getExternalModuleMember(node, specifier, dontResolveAlias) { if (dontResolveAlias === void 0) { dontResolveAlias = false; } + var _a; var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); // TODO: GH#18217 var name = specifier.propertyName || specifier.name; var suppressInteropError = name.escapedText === "default" /* Default */ && !!(compilerOptions.allowSyntheticDefaultImports || compilerOptions.esModuleInterop); @@ -35900,7 +36658,7 @@ var ts; } // if symbolFromVariable is export - get its final target symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias); - var symbolFromModule = getExportOfModule(targetSymbol, name.escapedText, dontResolveAlias); + var symbolFromModule = getExportOfModule(targetSymbol, specifier, dontResolveAlias); if (symbolFromModule === undefined && name.escapedText === "default" /* Default */) { var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); if (canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias)) { @@ -35922,11 +36680,11 @@ var ts; } } else { - if (moduleSymbol.exports && moduleSymbol.exports.has("default" /* Default */)) { + if ((_a = moduleSymbol.exports) === null || _a === void 0 ? void 0 : _a.has("default" /* Default */)) { error(name, ts.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, declarationName); } else { - error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + reportNonExportedMember(name, declarationName, moduleSymbol, moduleName); } } } @@ -35934,90 +36692,47 @@ var ts; } } } + function reportNonExportedMember(name, declarationName, moduleSymbol, moduleName) { + var _a; + var localSymbol = (_a = moduleSymbol.valueDeclaration.locals) === null || _a === void 0 ? void 0 : _a.get(name.escapedText); + var exports = moduleSymbol.exports; + if (localSymbol) { + var exportedSymbol = exports && !exports.has("export=" /* ExportEquals */) + ? ts.find(symbolsToArray(exports), function (symbol) { return !!getSymbolIfSameReference(symbol, localSymbol); }) + : undefined; + var diagnostic = exportedSymbol + ? error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) + : error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); + ts.addRelatedInfo.apply(void 0, __spreadArrays([diagnostic], ts.map(localSymbol.declarations, function (decl, index) { + return ts.createDiagnosticForNode(decl, index === 0 ? ts.Diagnostics._0_is_declared_here : ts.Diagnostics.and_here, declarationName); + }))); + } + else { + error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + } + } function getTargetOfImportSpecifier(node, dontResolveAlias) { var resolved = getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias); - if (resolved && node.parent.parent.isTypeOnly) { - return createTypeOnlyImportOrExport(node.name, resolved); - } + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); return resolved; } function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) { - return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); - } - /** - * Creates a type alias symbol with a target symbol for type-only imports and exports. - * The symbol for `A` in `export type { A }` or `export type { A } from "./mod"` has - * `TypeFlags.Alias` so that alias resolution works as usual, but once the target `A` - * has been resolved, we essentially want to pretend we have a type alias to that target. - */ - function createTypeOnlyImportOrExport(sourceNode, target) { - var _a, _b; - var symbol = createTypeOnlySymbol(target); - if (!symbol && target !== unknownSymbol) { - var identifier = ts.isExportSpecifier(sourceNode) ? sourceNode.name : sourceNode; - var nameText = ts.idText(identifier); - var diagnostic = error(identifier, ts.Diagnostics.Type_only_0_must_reference_a_type_but_1_is_a_value, ts.isExportSpecifier(sourceNode) ? "export" : "import", nameText); - var targetDeclaration = (_a = target.valueDeclaration) !== null && _a !== void 0 ? _a : (_b = target.declarations) === null || _b === void 0 ? void 0 : _b[0]; - if (targetDeclaration) { - ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(targetDeclaration, ts.Diagnostics._0_is_declared_here, nameText)); - } - } - return symbol; - } - function createTypeOnlySymbol(target) { - if (target.flags & 512 /* ValueModule */) { - return createNamespaceModuleForModule(target); - } - if (target.flags & 384 /* Enum */) { - return createNamespaceModuleForEnum(target); - } - if (!(target.flags & 111551 /* Value */)) { - return target; - } - if (target.flags & 788968 /* Type */) { - var alias = createSymbol(524288 /* TypeAlias */, target.escapedName); - alias.declarations = ts.emptyArray; - alias.immediateTarget = target; - return alias; - } - } - function createNamespaceModuleForEnum(enumSymbol) { - ts.Debug.assert(!!(enumSymbol.flags & 384 /* Enum */)); - var symbol = createSymbol(1024 /* NamespaceModule */ | 524288 /* TypeAlias */, enumSymbol.escapedName); - symbol.immediateTarget = enumSymbol; - symbol.declarations = enumSymbol.declarations; - if (enumSymbol.exports) { - symbol.exports = ts.createSymbolTable(); - enumSymbol.exports.forEach(function (exportSymbol, key) { - symbol.exports.set(key, ts.Debug.assertDefined(createTypeOnlySymbol(exportSymbol))); - }); - } - return symbol; - } - function createNamespaceModuleForModule(moduleSymbol) { - ts.Debug.assert(!!(moduleSymbol.flags & 512 /* ValueModule */)); - var filtered = createSymbol(1024 /* NamespaceModule */, moduleSymbol.escapedName); - filtered.declarations = moduleSymbol.declarations; - if (moduleSymbol.exports) { - filtered.exports = ts.createSymbolTable(); - moduleSymbol.exports.forEach(function (exportSymbol, key) { - var typeOnlyExport = createTypeOnlySymbol(exportSymbol); - if (typeOnlyExport) { - filtered.exports.set(key, typeOnlyExport); - } - }); - } - return filtered; + var resolved = resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) { - var target = node.parent.parent.moduleSpecifier ? + var resolved = node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node, dontResolveAlias) : resolveEntityName(node.propertyName || node.name, meaning, /*ignoreErrors*/ false, dontResolveAlias); - return target && node.parent.parent.isTypeOnly ? createTypeOnlyImportOrExport(node, target) : target; + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfExportAssignment(node, dontResolveAlias) { var expression = (ts.isExportAssignment(node) ? node.expression : node.right); - return getTargetOfAliasLikeExpression(expression, dontResolveAlias); + var resolved = getTargetOfAliasLikeExpression(expression, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfAliasLikeExpression(expression, dontResolveAlias) { if (ts.isClassExpression(expression)) { @@ -36107,12 +36822,64 @@ var ts; } return links.target; } + /** + * Marks a symbol as type-only if its declaration is syntactically type-only. + * If it is not itself marked type-only, but resolves to a type-only alias + * somewhere in its resolution chain, save a reference to the type-only alias declaration + * so the alias _not_ marked type-only can be identified as _transitively_ type-only. + * + * This function is called on each alias declaration that could be type-only or resolve to + * another type-only alias during `resolveAlias`, so that later, when an alias is used in a + * JS-emitting expression, we can quickly determine if that symbol is effectively type-only + * and issue an error if so. + * + * @param aliasDeclaration The alias declaration not marked as type-only + * has already been marked as not resolving to a type-only alias. Used when recursively resolving qualified + * names of import aliases, e.g. `import C = a.b.C`. If namespace `a` is not found to be type-only, the + * import declaration will initially be marked as not resolving to a type-only symbol. But, namespace `b` + * must still be checked for a type-only marker, overwriting the previous negative result if found. + * @param immediateTarget The symbol to which the alias declaration immediately resolves + * @param finalTarget The symbol to which the alias declaration ultimately resolves + * @param overwriteEmpty Checks `resolvesToSymbol` for type-only declarations even if `aliasDeclaration` + */ + function markSymbolOfAliasDeclarationIfTypeOnly(aliasDeclaration, immediateTarget, finalTarget, overwriteEmpty) { + if (!aliasDeclaration) + return false; + // If the declaration itself is type-only, mark it and return. + // No need to check what it resolves to. + var sourceSymbol = getSymbolOfNode(aliasDeclaration); + if (ts.isTypeOnlyImportOrExportDeclaration(aliasDeclaration)) { + var links_1 = getSymbolLinks(sourceSymbol); + links_1.typeOnlyDeclaration = aliasDeclaration; + return true; + } + var links = getSymbolLinks(sourceSymbol); + return markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, immediateTarget, overwriteEmpty) + || markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, finalTarget, overwriteEmpty); + } + function markSymbolOfAliasDeclarationIfTypeOnlyWorker(aliasDeclarationLinks, target, overwriteEmpty) { + var _a, _b, _c; + if (target && (aliasDeclarationLinks.typeOnlyDeclaration === undefined || overwriteEmpty && aliasDeclarationLinks.typeOnlyDeclaration === false)) { + var exportSymbol = (_b = (_a = target.exports) === null || _a === void 0 ? void 0 : _a.get("export=" /* ExportEquals */)) !== null && _b !== void 0 ? _b : target; + var typeOnly = exportSymbol.declarations && ts.find(exportSymbol.declarations, ts.isTypeOnlyImportOrExportDeclaration); + aliasDeclarationLinks.typeOnlyDeclaration = (_c = typeOnly !== null && typeOnly !== void 0 ? typeOnly : getSymbolLinks(exportSymbol).typeOnlyDeclaration) !== null && _c !== void 0 ? _c : false; + } + return !!aliasDeclarationLinks.typeOnlyDeclaration; + } + /** Indicates that a symbol directly or indirectly resolves to a type-only import or export. */ + function getTypeOnlyAliasDeclaration(symbol) { + if (!(symbol.flags & 2097152 /* Alias */)) { + return undefined; + } + var links = getSymbolLinks(symbol); + return links.typeOnlyDeclaration || undefined; + } function markExportAsReferenced(node) { var symbol = getSymbolOfNode(node); var target = resolveAlias(symbol); if (target) { var markAlias = target === unknownSymbol || - ((target.flags & 111551 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target)); + ((target.flags & 111551 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol)); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -36140,6 +36907,14 @@ var ts; } } } + // Aliases that resolve to const enums are not marked as referenced because they are not emitted, + // but their usage in value positions must be tracked to determine if the import can be type-only. + function markConstEnumAliasAsReferenced(symbol) { + var links = getSymbolLinks(symbol); + if (!links.constEnumReferenced) { + links.constEnumReferenced = true; + } + } // This function is only for imports with entity names function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) { // There are three things we might try to look for. In the following examples, @@ -36175,8 +36950,8 @@ var ts; var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 111551 /* Value */ : 0); var symbol; if (name.kind === 75 /* Identifier */) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); - var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; + var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); + var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true); if (!symbol) { return symbolFromJSPrototype; @@ -36219,6 +36994,9 @@ var ts; throw ts.Debug.assertNever(name, "Unknown entity name kind."); } ts.Debug.assert((ts.getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); + if (!ts.nodeIsSynthesized(name) && ts.isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 259 /* ExportAssignment */)) { + markSymbolOfAliasDeclarationIfTypeOnly(ts.getAliasDeclarationFromName(name), symbol, /*finalTarget*/ undefined, /*overwriteEmpty*/ true); + } return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol); } /** @@ -36283,7 +37061,7 @@ var ts; */ function getExpandoSymbol(symbol) { var decl = symbol.valueDeclaration; - if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */) { + if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */ || ts.getExpandoInitializer(decl, /*isPrototypeAssignment*/ false)) { return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); @@ -36719,7 +37497,7 @@ var ts; return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 ? symbol.exportSymbol : symbol); } function symbolIsValue(symbol) { - return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */); + return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */ && !getTypeOnlyAliasDeclaration(symbol)); } function findConstructorDeclaration(node) { var members = node.members; @@ -36822,7 +37600,7 @@ var ts; // `sym` may not have exports if this module declaration is backed by the symbol for a `const` that's being rewritten // into a namespace - in such cases, it's best to just let the namespace appear empty (the const members couldn't have referred // to one another anyway) - if (result = callback(sym.exports || emptySymbols)) { + if (result = callback((sym === null || sym === void 0 ? void 0 : sym.exports) || emptySymbols)) { return { value: result }; } break; @@ -36995,6 +37773,7 @@ var ts; if (!ts.length(symbols)) return; var hadAccessibleChain; + var earlyModuleBail = false; for (var _i = 0, _a = symbols; _i < _a.length; _i++) { var symbol = _a[_i]; // Symbol is accessible if it by itself is accessible @@ -37008,6 +37787,14 @@ var ts; } else { if (ts.some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { + if (shouldComputeAliasesToMakeVisible) { + earlyModuleBail = true; + // Generally speaking, we want to use the aliases that already exist to refer to a module, if present + // In order to do so, we need to find those aliases in order to retain them in declaration emit; so + // if we are in declaration emit, we cannot use the fast path for module visibility until we've exhausted + // all other visibility options (in order to capture the possible aliases used to reference the module) + continue; + } // Any meaning of a module symbol is always accessible via an `import` type return { accessibility: 0 /* Accessible */ @@ -37041,6 +37828,11 @@ var ts; return parentResult; } } + if (earlyModuleBail) { + return { + accessibility: 0 /* Accessible */ + }; + } if (hadAccessibleChain) { return { accessibility: 1 /* NotAccessible */, @@ -37240,7 +38032,7 @@ var ts; } function toNodeBuilderFlags(flags) { if (flags === void 0) { flags = 0 /* None */; } - return flags & 9469291 /* NodeBuilderFlagsMask */; + return flags & 277904747 /* NodeBuilderFlagsMask */; } function createNodeBuilder() { return { @@ -37344,7 +38136,7 @@ var ts; } if (type.flags & 128 /* StringLiteral */) { context.approximateLength += (type.value.length + 2); - return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value), 16777216 /* NoAsciiEscaping */)); + return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value, !!(context.flags & 268435456 /* UseSingleQuotesForStringLiteralType */)), 16777216 /* NoAsciiEscaping */)); } if (type.flags & 256 /* NumberLiteral */) { var value = type.value; @@ -37842,8 +38634,8 @@ var ts; typeElements.push(preserveCommentsOn(propertySignature)); } function preserveCommentsOn(node) { - if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 322 /* JSDocPropertyTag */; })) { - var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 322 /* JSDocPropertyTag */; }); + if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 323 /* JSDocPropertyTag */; })) { + var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 323 /* JSDocPropertyTag */; }); var commentText = d.comment; if (commentText) { ts.setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -37967,7 +38759,7 @@ var ts; function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags) { var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 156 /* Parameter */); if (!parameterDeclaration && !ts.isTransientSymbol(parameterSymbol)) { - parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 316 /* JSDocParameterTag */); + parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 317 /* JSDocParameterTag */); } var parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -38024,7 +38816,7 @@ var ts; var chain; var isTypeParameter = symbol.flags & 262144 /* TypeParameter */; if (!isTypeParameter && (context.enclosingDeclaration || context.flags & 64 /* UseFullyQualifiedType */) && !(context.flags & 134217728 /* DoNotIncludeSymbolChain */)) { - chain = ts.Debug.assertDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); + chain = ts.Debug.checkDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); ts.Debug.assert(chain && chain.length > 0); } else { @@ -38399,7 +39191,7 @@ var ts; } // See getNameForSymbolFromNameType for a stringy equivalent function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; @@ -38674,7 +39466,7 @@ var ts; symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */; var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); - if (symbol.flags & 16 /* Function */ || isConstMergedWithNSPrintableAsSignatureMerge) { + if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288 /* TypeAlias */) { @@ -38733,7 +39525,7 @@ var ts; function includePrivateSymbol(symbol) { if (ts.some(symbol.declarations, ts.isParameterDeclaration)) return; - ts.Debug.assertDefined(deferredPrivates); + ts.Debug.assertIsDefined(deferredPrivates); getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol deferredPrivates.set("" + getSymbolId(symbol), symbol); } @@ -38874,7 +39666,7 @@ var ts; // function g() {} // module.exports.g = g // ``` - // In such a situation, we have a local variable named `g`, and a seperate exported variable named `g`. + // In such a situation, we have a local variable named `g`, and a separate exported variable named `g`. // Naively, we would emit // ``` // function g() {} @@ -38965,18 +39757,19 @@ var ts; var typeParamDecls = ts.map(localParams, function (p) { return typeParameterToDeclaration(p, context); }); var classType = getDeclaredTypeOfClassOrInterface(symbol); var baseTypes = getBaseTypes(classType); + var implementsTypes = getImplementsTypes(classType); var staticType = getTypeOfSymbol(symbol); var staticBaseType = getBaseConstructorTypeOfClass(staticType); - var heritageClauses = !ts.length(baseTypes) ? undefined : [ts.createHeritageClause(90 /* ExtendsKeyword */, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]; + var heritageClauses = __spreadArrays(!ts.length(baseTypes) ? [] : [ts.createHeritageClause(90 /* ExtendsKeyword */, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))], !ts.length(implementsTypes) ? [] : [ts.createHeritageClause(113 /* ImplementsKeyword */, ts.map(implementsTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]); var symbolProps = getPropertiesOfType(classType); var publicSymbolProps = ts.filter(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return !(ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name)); }); var hasPrivateIdentifier = ts.some(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name); }); // Boil down all private properties into a single one. @@ -39008,8 +39801,8 @@ var ts; } function serializeAsAlias(symbol, localName, modifierFlags) { // synthesize an alias, eg `export { symbolName as Name }` - // need to mark the alias `symbol` points - // at as something we need to serialize as a private declaration as well + // need to mark the alias `symbol` points at + // as something we need to serialize as a private declaration as well var node = getDeclarationOfAliasSymbol(symbol); if (!node) return ts.Debug.fail(); @@ -39212,7 +40005,7 @@ var ts; && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName)))) { return []; } - var flag = modifierFlags | (isStatic ? 32 /* Static */ : 0); + var flag = (modifierFlags & ~256 /* Async */) | (isStatic ? 32 /* Static */ : 0); var name = getPropertyNameNodeForSymbol(p, context); var firstPropertyLikeDecl = ts.find(p.declarations, ts.or(ts.isPropertyDeclaration, ts.isAccessor, ts.isVariableDeclaration, ts.isPropertySignature, ts.isBinaryExpression, ts.isPropertyAccessExpression)); if (p.flags & 98304 /* Accessor */ && useAccessors) { @@ -39276,7 +40069,7 @@ var ts; return serializePropertySymbolForInterfaceWorker(p, /*isStatic*/ false, baseType); } function getDeclarationWithTypeAnnotation(symbol) { - return ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); + return symbol.declarations && ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); } /** * Unlike `typeToTypeNodeHelper`, this handles setting up the `AllowUniqueESSymbolType` flag @@ -39594,7 +40387,7 @@ var ts; return location.kind === 290 /* SourceFile */ || ts.isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; @@ -39635,11 +40428,14 @@ var ts; if (ts.isCallExpression(declaration) && ts.isBindableObjectDefinePropertyCall(declaration)) { return ts.symbolName(symbol); } - if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096 /* Late */) && symbol.nameType && symbol.nameType.flags & 384 /* StringOrNumberLiteral */) { - // Computed property name isn't late bound, but has a well-known name type - use name type to generate a symbol name - var result = getNameOfSymbolFromNameType(symbol, context); - if (result !== undefined) { - return result; + if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096 /* Late */)) { + var nameType = getSymbolLinks(symbol).nameType; + if (nameType && nameType.flags & 384 /* StringOrNumberLiteral */) { + // Computed property name isn't late bound, but has a well-known name type - use name type to generate a symbol name + var result = getNameOfSymbolFromNameType(symbol, context); + if (result !== undefined) { + return result; + } } } return ts.declarationNameToString(name_2); @@ -39674,9 +40470,9 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: - case 315 /* JSDocEnumTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 316 /* JSDocEnumTag */: // Top-level jsdoc type aliases are considered exported // First parent is comment node, second is hosting declaration or token; we only care about those tokens or declarations whose parent is a source file return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent)); @@ -39848,9 +40644,7 @@ var ts; return !!target.resolvedReturnType; case 4 /* ImmediateBaseConstraint */: return !!target.immediateBaseConstraint; - case 6 /* JSDocTypeReference */: - return !!getSymbolLinks(target).resolvedJSDocType; - case 7 /* ResolvedTypeArguments */: + case 6 /* ResolvedTypeArguments */: return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); @@ -40090,11 +40884,6 @@ var ts; if (optional === void 0) { optional = true; } return strictNullChecks && optional ? getOptionalType(type) : type; } - function isParameterOfContextuallyTypedFunction(node) { - return node.kind === 156 /* Parameter */ && - (node.parent.kind === 201 /* FunctionExpression */ || node.parent.kind === 202 /* ArrowFunction */) && - !!getContextualType(node.parent); - } // Return the inferred type for a variable, parameter, or property declaration function getTypeForVariableLikeDeclaration(declaration, includeOptionality) { // A variable declared in a for..in statement is of type string, or of type keyof T when the @@ -40159,7 +40948,7 @@ var ts; } } // Use contextual parameter type if one is available - var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration, /*forCache*/ true); + var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration); if (type) { return addOptionality(type, isOptional); } @@ -40172,7 +40961,7 @@ var ts; } // Use the type of the initializer expression if one is present and the declaration is // not a parameter of a contextually typed function - if (declaration.initializer && !isParameterOfContextuallyTypedFunction(declaration)) { + if (declaration.initializer) { var type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration)); return addOptionality(type, isOptional); } @@ -40183,7 +40972,7 @@ var ts; } // If the declaration specifies a binding pattern and is not a parameter of a contextually // typed function, use the type implied by the binding pattern - if (ts.isBindingPattern(declaration.name) && !isParameterOfContextuallyTypedFunction(declaration)) { + if (ts.isBindingPattern(declaration.name)) { return getTypeFromBindingPattern(declaration.name, /*includePatternInType*/ false, /*reportErrors*/ true); } // No type specified and nothing can be inferred @@ -40823,8 +41612,8 @@ var ts; function getTypeOfSymbolWithDeferredType(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); links.type = links.deferralParent.flags & 1048576 /* Union */ ? getUnionType(links.deferralConstituents) : getIntersectionType(links.deferralConstituents); } return links.type; @@ -40921,10 +41710,10 @@ var ts; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: - case 321 /* JSDocTypedefTag */: - case 315 /* JSDocEnumTag */: - case 314 /* JSDocCallbackTag */: + case 321 /* JSDocTemplateTag */: + case 322 /* JSDocTypedefTag */: + case 316 /* JSDocEnumTag */: + case 315 /* JSDocCallbackTag */: case 186 /* MappedType */: case 180 /* ConditionalType */: var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); @@ -41055,6 +41844,28 @@ var ts; } return type.resolvedBaseConstructorType; } + function getImplementsTypes(type) { + var resolvedImplementsTypes = ts.emptyArray; + for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + var implementsTypeNodes = ts.getEffectiveImplementsTypeNodes(declaration); + if (!implementsTypeNodes) + continue; + for (var _b = 0, implementsTypeNodes_1 = implementsTypeNodes; _b < implementsTypeNodes_1.length; _b++) { + var node = implementsTypeNodes_1[_b]; + var implementsType = getTypeFromTypeNode(node); + if (implementsType !== errorType) { + if (resolvedImplementsTypes === ts.emptyArray) { + resolvedImplementsTypes = [implementsType]; + } + else { + resolvedImplementsTypes.push(implementsType); + } + } + } + } + return resolvedImplementsTypes; + } function getBaseTypes(type) { if (!type.resolvedBaseTypes) { if (type.objectFlags & 8 /* Tuple */) { @@ -41250,20 +42061,10 @@ var ts; if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { return errorType; } - var type = void 0; - var declaration = void 0; - if (ts.isTypeOnlyAlias(symbol)) { - // Symbol is synthetic type alias for type-only import or export. - // See `createSyntheticTypeAlias`. - type = getDeclaredTypeOfSymbol(symbol.immediateTarget); - declaration = symbol.valueDeclaration; - } - else { - declaration = ts.Debug.assertDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); - var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; - // If typeNode is missing, we will error in checkJSDocTypedefTag. - type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; - } + var declaration = ts.Debug.checkDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); + var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; + // If typeNode is missing, we will error in checkJSDocTypedefTag. + var type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; if (popTypeResolution()) { var typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); if (typeParameters) { @@ -42256,7 +43057,7 @@ var ts; var checkFlags = 8192 /* ReverseMapped */ | (readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0); var inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.escapedName, checkFlags); inferredProp.declarations = prop.declarations; - inferredProp.nameType = prop.nameType; + inferredProp.nameType = getSymbolLinks(prop).nameType; inferredProp.propertyType = getTypeOfSymbol(prop); inferredProp.mappedType = type.mappedType; inferredProp.constraintType = type.constraintType; @@ -42344,7 +43145,7 @@ var ts; // When creating an optional property in strictNullChecks mode, if 'undefined' isn't assignable to the // type, we include 'undefined' in the type. Similarly, when creating a non-optional property in strictNullChecks // mode, if the underlying property is optional we remove 'undefined' from the type. - prop.type = strictNullChecks && isOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + prop.type = strictNullChecks && isOptional && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType) : strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */ ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType; if (modifiersProp) { @@ -42907,7 +43708,7 @@ var ts; var type = getTypeOfSymbol(prop); if (!firstType) { firstType = type; - nameType = prop.nameType; + nameType = getSymbolLinks(prop).nameType; } else if (type !== firstType) { checkFlags |= 64 /* HasNonUniformType */; @@ -43671,7 +44472,7 @@ var ts; function getTypeArguments(type) { var _a, _b; if (!type.resolvedTypeArguments) { - if (!pushTypeResolution(type, 7 /* ResolvedTypeArguments */)) { + if (!pushTypeResolution(type, 6 /* ResolvedTypeArguments */)) { return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; } var node = type.node; @@ -43721,7 +44522,7 @@ var ts; return errorType; } } - if (node.kind === 169 /* TypeReference */ && isAliasedType(node)) { + if (node.kind === 169 /* TypeReference */ && isDeferredTypeReferenceNode(node, ts.length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference(type, node, /*mapper*/ undefined); } // In a type reference, the outer type parameters of the referenced class or interface are automatically @@ -43793,9 +44594,6 @@ var ts; if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) { return getTypeFromClassOrInterfaceReference(node, symbol); } - if (ts.isTypeOnlyAlias(symbol)) { - return getTypeReferenceType(node, symbol.immediateTarget); - } if (symbol.flags & 524288 /* TypeAlias */) { return getTypeFromTypeAliasReference(node, symbol); } @@ -43825,26 +44623,30 @@ var ts; * but this function's special-case code fakes alias resolution as well. */ function getTypeFromJSDocValueReference(node, symbol) { - var valueType = getTypeOfSymbol(symbol); - var typeType = valueType; - if (symbol.valueDeclaration) { - var decl = ts.getRootDeclaration(symbol.valueDeclaration); - var isRequireAlias = false; - if (ts.isVariableDeclaration(decl) && decl.initializer) { - var expr = decl.initializer; - // skip past entity names, eg `require("x").a.b.c` - while (ts.isPropertyAccessExpression(expr)) { - expr = expr.expression; + var links = getNodeLinks(node); + if (!links.resolvedJSDocType) { + var valueType = getTypeOfSymbol(symbol); + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + // skip past entity names, eg `require("x").a.b.c` + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 188 /* ImportType */ && node.qualifier; + // valueType might not have a symbol, eg, {import('./b').STRING_LITERAL} + if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { + typeType = getTypeReferenceType(node, valueType.symbol); } - isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; - } - var isImportTypeWithQualifier = node.kind === 188 /* ImportType */ && node.qualifier; - // valueType might not have a symbol, eg, {import('./b').STRING_LITERAL} - if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { - typeType = getTypeReferenceType(node, valueType.symbol); } + links.resolvedJSDocType = typeType; } - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + return links.resolvedJSDocType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === typeVariable) { @@ -43945,6 +44747,11 @@ var ts; function getTypeFromTypeReference(node) { var links = getNodeLinks(node); if (!links.resolvedType) { + // handle LS queries on the `const` in `x as const` by resolving to the type of `x` + if (ts.isConstTypeReference(node) && ts.isAssertionExpression(node.parent)) { + links.resolvedSymbol = unknownSymbol; + return links.resolvedType = checkExpressionCached(node.parent.expression); + } var symbol = void 0; var type = void 0; var meaning = 788968 /* Type */; @@ -44123,10 +44930,17 @@ var ts; var minLength = ts.findLastIndex(node.elementTypes, function (n) { return n.kind !== 176 /* OptionalType */ && n !== restElement; }) + 1; return getTupleTypeOfArity(node.elementTypes.length, minLength, !!restElement, readonly, /*associatedNames*/ undefined); } + // Return true if the given type reference node is directly aliased or if it needs to be deferred + // because it is possibly contained in a circular chain of eagerly resolved types. + function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 174 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : + node.kind === 175 /* TupleType */ ? ts.some(node.elementTypes, mayResolveTypeAlias) : + hasDefaultTypeArguments || ts.some(node.typeArguments, mayResolveTypeAlias)); + } // Return true when the given node is transitively contained in type constructs that eagerly // resolve their constituent types. We include SyntaxKind.TypeReference because type arguments // of type aliases are eagerly resolved. - function isAliasedType(node) { + function isResolvedByTypeAlias(node) { var parent = node.parent; switch (parent.kind) { case 182 /* ParenthesizedType */: @@ -44136,12 +44950,42 @@ var ts; case 185 /* IndexedAccessType */: case 180 /* ConditionalType */: case 184 /* TypeOperator */: - return isAliasedType(parent); + return isResolvedByTypeAlias(parent); case 247 /* TypeAliasDeclaration */: return true; } return false; } + // Return true if resolving the given node (i.e. getTypeFromTypeNode) possibly causes resolution + // of a type alias. + function mayResolveTypeAlias(node) { + switch (node.kind) { + case 169 /* TypeReference */: + return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node.typeName, 788968 /* Type */).flags & 524288 /* TypeAlias */); + case 172 /* TypeQuery */: + return true; + case 184 /* TypeOperator */: + return node.operator !== 147 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); + case 182 /* ParenthesizedType */: + case 176 /* OptionalType */: + case 299 /* JSDocOptionalType */: + case 297 /* JSDocNullableType */: + case 298 /* JSDocNonNullableType */: + case 294 /* JSDocTypeExpression */: + return mayResolveTypeAlias(node.type); + case 177 /* RestType */: + return node.type.kind !== 174 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 178 /* UnionType */: + case 179 /* IntersectionType */: + return ts.some(node.types, mayResolveTypeAlias); + case 185 /* IndexedAccessType */: + return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); + case 180 /* ConditionalType */: + return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || + mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); + } + return false; + } function getTypeFromArrayOrTupleTypeNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { @@ -44149,7 +44993,7 @@ var ts; if (target === emptyGenericType) { links.resolvedType = emptyObjectType; } - else if (isAliasedType(node)) { + else if (isDeferredTypeReferenceNode(node)) { links.resolvedType = node.kind === 175 /* TupleType */ && node.elementTypes.length === 0 ? target : createDeferredTypeReference(target, node, /*mapper*/ undefined); } @@ -44722,7 +45566,7 @@ var ts; } function getLiteralTypeFromProperty(prop, include) { if (!(ts.getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */)) { - var type = getLateBoundSymbol(prop).nameType; + var type = getSymbolLinks(getLateBoundSymbol(prop)).nameType; if (!type && !ts.isKnownSymbol(prop)) { if (prop.escapedName === "default" /* Default */) { type = getLiteralType("default"); @@ -44979,10 +45823,24 @@ var ts; accessNode; } function isGenericObjectType(type) { - return maybeTypeOfKind(type, 58982400 /* InstantiableNonPrimitive */ | 131072 /* GenericMappedType */); + if (type.flags & 3145728 /* UnionOrIntersection */) { + if (!(type.objectFlags & 4194304 /* IsGenericObjectTypeComputed */)) { + type.objectFlags |= 4194304 /* IsGenericObjectTypeComputed */ | + (ts.some(type.types, isGenericObjectType) ? 8388608 /* IsGenericObjectType */ : 0); + } + return !!(type.objectFlags & 8388608 /* IsGenericObjectType */); + } + return !!(type.flags & 58982400 /* InstantiableNonPrimitive */) || isGenericMappedType(type); } function isGenericIndexType(type) { - return maybeTypeOfKind(type, 58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */); + if (type.flags & 3145728 /* UnionOrIntersection */) { + if (!(type.objectFlags & 16777216 /* IsGenericIndexTypeComputed */)) { + type.objectFlags |= 16777216 /* IsGenericIndexTypeComputed */ | + (ts.some(type.types, isGenericIndexType) ? 33554432 /* IsGenericIndexType */ : 0); + } + return !!(type.objectFlags & 33554432 /* IsGenericIndexType */); + } + return !!(type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */)); } function isThisTypeParameter(type) { return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType); @@ -45009,6 +45867,12 @@ var ts; return writing ? getIntersectionType(types) : getUnionType(types); } } + function unwrapSubstitution(type) { + if (type.flags & 33554432 /* Substitution */) { + return type.substitute; + } + return type; + } // Transform an indexed access to a simpler form, if possible. Return the simpler form, or return // the type itself if no transformation is possible. The writing flag indicates that the type is // the target of an assignment. @@ -45020,7 +45884,7 @@ var ts; type[cache] = circularConstraintType; // We recursively simplify the object type as it may in turn be an indexed access type. For example, with // '{ [P in T]: { [Q in U]: number } }[T][U]' we want to first simplify the inner indexed access type. - var objectType = getSimplifiedType(type.objectType, writing); + var objectType = unwrapSubstitution(getSimplifiedType(type.objectType, writing)); var indexType = getSimplifiedType(type.indexType, writing); // T[A | B] -> T[A] | T[B] (reading) // T[A | B] -> T[A] & T[B] (writing) @@ -45185,11 +46049,15 @@ var ts; if (checkType === wildcardType || extendsType === wildcardType) { return wildcardType; } - var checkTypeInstantiable = maybeTypeOfKind(checkType, 63176704 /* Instantiable */ | 131072 /* GenericMappedType */); + var checkTypeInstantiable = isGenericObjectType(checkType) || isGenericIndexType(checkType); var combinedMapper; if (root.inferTypeParameters) { var context = createInferenceContext(root.inferTypeParameters, /*signature*/ undefined, 0 /* None */); - if (!checkTypeInstantiable) { + // We skip inference of the possible `infer` types unles the `extendsType` _is_ an infer type + // if it was, it's trivial to say that extendsType = checkType, however such a pattern is used to + // "reset" the type being build up during constraint calculation and avoid making an apparently "infinite" constraint + // so in those cases we refain from performing inference and retain the uninfered type parameter + if (!checkTypeInstantiable || !ts.some(root.inferTypeParameters, function (t) { return t === extendsType; })) { // We don't want inferences from constraints as they may cause us to eagerly resolve the // conditional type instead of deferring resolution. Also, we always want strict function // types rules (i.e. proper contravariance) for inferences. @@ -45200,7 +46068,7 @@ var ts; // Instantiate the extends type including inferences for 'infer T' type parameters var inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType; // We attempt to resolve the conditional type only when the check and extends types are non-generic - if (!checkTypeInstantiable && !maybeTypeOfKind(inferredExtendsType, 63176704 /* Instantiable */ | 131072 /* GenericMappedType */)) { + if (!checkTypeInstantiable && !isGenericObjectType(inferredExtendsType) && !isGenericIndexType(inferredExtendsType)) { if (inferredExtendsType.flags & 3 /* AnyOrUnknown */) { return instantiateType(root.trueType, combinedMapper || mapper); } @@ -45433,7 +46301,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 /* Readonly */ : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; members.set(prop.escapedName, result); } @@ -45448,7 +46316,7 @@ var 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, right, symbol, objectFlags, readonly) { + function getSpreadType(left, right, symbol, objectFlags, readonly, isParentTypeNullable) { if (left.flags & 1 /* Any */ || right.flags & 1 /* Any */) { return anyType; } @@ -45464,16 +46332,16 @@ var ts; if (left.flags & 1048576 /* Union */) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(left, readonly); if (merged) { - return getSpreadType(merged, right, symbol, objectFlags, readonly); + return getSpreadType(merged, right, symbol, objectFlags, readonly, isParentTypeNullable); } - return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly); }); + return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly, isParentTypeNullable); }); } if (right.flags & 1048576 /* Union */) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(right, readonly); if (merged) { - return getSpreadType(left, merged, symbol, objectFlags, readonly); + return getSpreadType(left, merged, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304 /* Nullable */)); } - return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly); }); + return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304 /* Nullable */)); }); } if (right.flags & (528 /* BooleanLike */ | 296 /* NumberLike */ | 2112 /* BigIntLike */ | 132 /* StringLike */ | 1056 /* EnumLike */ | 67108864 /* NonPrimitive */ | 4194304 /* Index */)) { return left; @@ -45532,9 +46400,17 @@ var ts; result.leftSpread = leftProp; result.rightSpread = rightProp; result.declarations = declarations; - result.nameType = leftProp.nameType; + result.nameType = getSymbolLinks(leftProp).nameType; members.set(leftProp.escapedName, result); } + else if (strictNullChecks && + !isParentTypeNullable && + symbol && + !isFromSpreadAssignment(leftProp, symbol) && + isFromSpreadAssignment(rightProp, symbol) && + !maybeTypeOfKind(rightType, 98304 /* Nullable */)) { + error(leftProp.valueDeclaration, ts.Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, ts.unescapeLeadingUnderscores(leftProp.escapedName)); + } } else { members.set(leftProp.escapedName, getSpreadSymbol(leftProp, readonly)); @@ -45559,7 +46435,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 /* Readonly */ : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; return result; } @@ -45885,8 +46761,8 @@ var ts; if (symbol.valueDeclaration) { result.valueDeclaration = symbol.valueDeclaration; } - if (symbol.nameType) { - result.nameType = symbol.nameType; + if (links.nameType) { + result.nameType = links.nameType; } return result; } @@ -46038,7 +46914,7 @@ var ts; var templateMapper = combineTypeMappers(mapper, createTypeMapper([getTypeParameterFromMappedType(type)], [key])); var propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper); var modifiers = getMappedTypeModifiers(type); - return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType) : strictNullChecks && modifiers & 8 /* ExcludeOptional */ && isOptional ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType; } @@ -46101,6 +46977,7 @@ var ts; error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } + totalInstantiationCount++; instantiationCount++; instantiationDepth++; var result = instantiateTypeWorker(type, mapper); @@ -46134,15 +47011,17 @@ var ts; } return type; } - if (flags & 1048576 /* Union */ && !(flags & 131068 /* Primitive */)) { - var types = type.types; - var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getUnionType(newTypes, 1 /* Literal */, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; - } - if (flags & 2097152 /* Intersection */) { + if ((flags & 2097152 /* Intersection */) || (flags & 1048576 /* Union */ && !(flags & 131068 /* Primitive */))) { + if (!couldContainTypeVariables(type)) { + return type; + } var types = type.types; var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; + return newTypes === types + ? type + : (flags & 2097152 /* Intersection */) + ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) + : getUnionType(newTypes, 1 /* Literal */, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)); } if (flags & 4194304 /* Index */) { return getIndexType(instantiateType(type.type, mapper)); @@ -46231,30 +47110,30 @@ var ts; return false; } function isContextSensitiveFunctionLikeDeclaration(node) { - if (ts.isFunctionDeclaration(node) && (!ts.isInJSFile(node) || !getTypeForDeclarationFromJSDocComment(node))) { - return false; - } + return (!ts.isFunctionDeclaration(node) || ts.isInJSFile(node) && !!getTypeForDeclarationFromJSDocComment(node)) && + (hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node)); + } + function hasContextSensitiveParameters(node) { // Functions with type parameters are not context sensitive. - if (node.typeParameters) { - return false; - } - // Functions with any parameters that lack type annotations are context sensitive. - if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { - return true; - } - if (node.kind !== 202 /* ArrowFunction */) { - // If the first parameter is not an explicit 'this' parameter, then the function has - // an implicit 'this' parameter which is subject to contextual typing. - var parameter = ts.firstOrUndefined(node.parameters); - if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + if (!node.typeParameters) { + // Functions with any parameters that lack type annotations are context sensitive. + if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { return true; } + if (node.kind !== 202 /* ArrowFunction */) { + // If the first parameter is not an explicit 'this' parameter, then the function has + // an implicit 'this' parameter which is subject to contextual typing. + var parameter = ts.firstOrUndefined(node.parameters); + if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + return true; + } + } } - return hasContextSensitiveReturnExpression(node); + return false; } function hasContextSensitiveReturnExpression(node) { // TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value. - return !!node.body && node.body.kind !== 223 /* Block */ && isContextSensitive(node.body); + return !ts.getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 223 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (ts.isInJSFile(func) && ts.isFunctionDeclaration(func) || isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) && @@ -46427,6 +47306,13 @@ var ts; if (target.symbol && ts.length(target.symbol.declarations)) { ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(target.symbol.declarations[0], ts.Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature)); } + if ((ts.getFunctionFlags(node) & 2 /* Async */) === 0 + // exclude cases where source itself is promisy - this way we don't make a suggestion when relating + // an IPromise and a Promise that are slightly different + && !getTypeOfPropertyOfType(sourceReturn, "then") + && checkTypeRelatedTo(createPromiseType(sourceReturn), targetReturn, relation, /*errorNode*/ undefined)) { + ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async)); + } return true; } } @@ -46684,11 +47570,20 @@ var ts; return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); } // recreate a tuple from the elements, if possible - var tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, /*forceTuple*/ true); - if (isTupleLikeType(tupleizedType)) { - return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + // Since we're re-doing the expression type, we need to reapply the contextual type + var oldContext = node.contextualType; + node.contextualType = target; + try { + var tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, /*forceTuple*/ true); + node.contextualType = oldContext; + if (isTupleLikeType(tupleizedType)) { + return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + } + return false; + } + finally { + node.contextualType = oldContext; } - return false; } function generateObjectLiteralElements(node) { var _i, _a, prop, type, _b; @@ -47034,11 +47929,18 @@ var ts; if (isFreshLiteralType(target)) { target = target.regularType; } - if (source === target || - relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || - relation !== identityRelation && isSimpleTypeRelatedTo(source, target, relation)) { + if (source === target) { return true; } + if (relation !== identityRelation) { + if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation)) { + return true; + } + } + else { + if (!(source.flags === target.flags && source.flags & 66584576 /* Substructure */)) + return false; + } if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) { var related = relation.get(getRelationKey(source, target, 0 /* None */, relation)); if (related !== undefined) { @@ -47054,11 +47956,17 @@ var ts; return ts.getObjectFlags(source) & 4096 /* JsxAttributes */ && !isUnhyphenatedJsxName(sourceProp.escapedName); } function getNormalizedType(type, writing) { - return isFreshLiteralType(type) ? type.regularType : - ts.getObjectFlags(type) & 4 /* Reference */ && type.node ? createTypeReference(type.target, getTypeArguments(type)) : - type.flags & 33554432 /* Substitution */ ? writing ? type.typeVariable : type.substitute : - type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : - type; + do { + var t = isFreshLiteralType(type) ? type.regularType : + ts.getObjectFlags(type) & 4 /* Reference */ && type.node ? createTypeReference(type.target, getTypeArguments(type)) : + type.flags & 33554432 /* Substitution */ ? writing ? type.typeVariable : type.substitute : + type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : + type; + if (t === type) + break; + type = t; + } while (true); + return type; } /** * Checks if 'source' is related to 'target' (e.g.: is a assignable to). @@ -47346,6 +48254,11 @@ var ts; // side) or the type variable (on the target side). var source = getNormalizedType(originalSource, /*writing*/ false); var target = getNormalizedType(originalTarget, /*writing*/ true); + if (source === target) + return -1 /* True */; + if (relation === identityRelation) { + return isIdenticalTo(source, target); + } // Try to see if we're relating something like `Foo` -> `Bar | null | undefined`. // If so, reporting the `null` and `undefined` in the type is hardly useful. // First, see if we're even relating an object type to a union. @@ -47359,15 +48272,11 @@ var ts; target.types.length <= 3 && maybeTypeOfKind(target, 98304 /* Nullable */)) { var nullStrippedTarget = extractTypesOfKind(target, ~98304 /* Nullable */); if (!(nullStrippedTarget.flags & (1048576 /* Union */ | 131072 /* Never */))) { + if (source === nullStrippedTarget) + return -1 /* True */; target = nullStrippedTarget; } } - // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases - if (source === target) - return -1 /* True */; - if (relation === identityRelation) { - return isIdenticalTo(source, target); - } if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation, reportErrors ? reportError : undefined)) return -1 /* True */; @@ -47508,19 +48417,18 @@ var ts; return result; } function isIdenticalTo(source, target) { - var result; var flags = source.flags & target.flags; - if (flags & 524288 /* Object */ || flags & 8388608 /* IndexedAccess */ || flags & 16777216 /* Conditional */ || flags & 4194304 /* Index */ || flags & 33554432 /* Substitution */) { - return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, 0 /* None */); + if (!(flags & 66584576 /* Substructure */)) { + return 0 /* False */; } - if (flags & (1048576 /* Union */ | 2097152 /* Intersection */)) { - if (result = eachTypeRelatedToSomeType(source, target)) { - if (result &= eachTypeRelatedToSomeType(target, source)) { - return result; - } + if (flags & 3145728 /* UnionOrIntersection */) { + var result_3 = eachTypeRelatedToSomeType(source, target); + if (result_3) { + result_3 &= eachTypeRelatedToSomeType(target, source); } + return result_3; } - return 0 /* False */; + return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, 0 /* None */); } function getTypeOfPropertyInTypes(types, name) { var appendPropType = function (propTypes, type) { @@ -47547,7 +48455,7 @@ var ts; checkTypes = reducedTarget.flags & 1048576 /* Union */ ? reducedTarget.types : [reducedTarget]; } var _loop_11 = function (prop) { - if (shouldCheckAsExcessProperty(prop, source.symbol)) { + if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) { if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) { if (reportErrors) { // Report error in terms of object types in the target as those are the only ones @@ -47837,21 +48745,21 @@ var ts; if (flags & 4194304 /* Index */) { return isRelatedTo(source.type, target.type, /*reportErrors*/ false); } - var result_3 = 0 /* False */; + var result_4 = 0 /* False */; if (flags & 8388608 /* IndexedAccess */) { - if (result_3 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { + return result_4; } } } if (flags & 16777216 /* Conditional */) { if (source.root.isDistributive === target.root.isDistributive) { - if (result_3 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { + return result_4; } } } @@ -48130,11 +49038,11 @@ var ts; // with respect to T. We do not report errors here, as we will use the existing // error result from checking each constituent of the union. if (source.flags & (524288 /* Object */ | 2097152 /* Intersection */) && target.flags & 1048576 /* Union */) { - var objectOnlyTarget = extractTypesOfKind(target, 524288 /* Object */); + var objectOnlyTarget = extractTypesOfKind(target, 524288 /* Object */ | 2097152 /* Intersection */ | 33554432 /* Substitution */); if (objectOnlyTarget.flags & 1048576 /* Union */) { - var result_4 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); - if (result_4) { - return result_4; + var result_5 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); + if (result_5) { + return result_5; } } } @@ -48201,12 +49109,12 @@ var ts; var modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source) === getMappedTypeModifiers(target) : getCombinedMappedTypeOptionality(source) <= getCombinedMappedTypeOptionality(target)); if (modifiersRelated) { - var result_5; + var result_6; var targetConstraint = getConstraintTypeFromMappedType(target); var sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMarkers : reportUnreliableMarkers); - if (result_5 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { + if (result_6 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]); - return result_5 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); + return result_6 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); } } return 0 /* False */; @@ -48221,7 +49129,7 @@ var ts; // // NOTE: See ~/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts // for examples. - var sourceProperties = getPropertiesOfObjectType(source); + var sourceProperties = getPropertiesOfType(source); var sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target); if (!sourcePropertiesFiltered) return 0 /* False */; @@ -48260,7 +49168,7 @@ var ts; var type = _a[_i]; var _loop_13 = function (i) { var sourceProperty = sourcePropertiesFiltered[i]; - var targetProperty = getPropertyOfObjectType(type, sourceProperty.escapedName); + var targetProperty = getPropertyOfType(type, sourceProperty.escapedName); if (!targetProperty) return "continue-outer"; if (sourceProperty === targetProperty) @@ -48337,10 +49245,10 @@ var ts; if (ts.getCheckFlags(targetProp) & 65536 /* DeferredType */ && !getSymbolLinks(targetProp).type) { // Rather than resolving (and normalizing) the type, relate constituent-by-constituent without performing normalization or seconadary passes var links = getSymbolLinks(targetProp); - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); var unionParent = !!(links.deferralParent.flags & 1048576 /* Union */); - var result_6 = unionParent ? 0 /* False */ : -1 /* True */; + var result_7 = unionParent ? 0 /* False */ : -1 /* True */; var targetTypes = links.deferralConstituents; for (var _i = 0, targetTypes_3 = targetTypes; _i < targetTypes_3.length; _i++) { var targetType = targetTypes_3[_i]; @@ -48350,7 +49258,7 @@ var ts; // Can't assign to a target individually - have to fallback to assigning to the _whole_ intersection (which forces normalization) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - result_6 &= related; + result_7 &= related; } else { if (related) { @@ -48358,17 +49266,17 @@ var ts; } } } - if (unionParent && !result_6 && targetIsOptional) { - result_6 = isRelatedTo(source, undefinedType); + if (unionParent && !result_7 && targetIsOptional) { + result_7 = isRelatedTo(source, undefinedType); } - if (unionParent && !result_6 && reportErrors) { + if (unionParent && !result_7 && reportErrors) { // The easiest way to get the right errors here is to un-defer (which may be costly) // If it turns out this is too costly too often, we can replicate the error handling logic within // typeRelatedToSomeType without the discriminatable type branch (as that requires a manifest union // type on which to hand discriminable properties, which we are expressly trying to avoid here) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - return result_6; + return result_7; } else { return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors, /*headMessage*/ undefined, intersectionState); @@ -48441,13 +49349,14 @@ var ts; if (unmatchedProperty.valueDeclaration && ts.isNamedDeclaration(unmatchedProperty.valueDeclaration) && ts.isPrivateIdentifier(unmatchedProperty.valueDeclaration.name) - && ts.isClassDeclaration(source.symbol.valueDeclaration)) { + && source.symbol + && source.symbol.flags & 32 /* Class */) { var privateIdentifierDescription = unmatchedProperty.valueDeclaration.name.escapedText; var symbolTableKey = ts.getSymbolNameForPrivateIdentifier(source.symbol, privateIdentifierDescription); - if (symbolTableKey && !!getPropertyOfType(source, symbolTableKey)) { - var sourceName = source.symbol.valueDeclaration.name; - var targetName = ts.isClassDeclaration(target.symbol.valueDeclaration) ? target.symbol.valueDeclaration.name : undefined; - reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName || anon), diagnosticName(targetName || anon)); + if (symbolTableKey && getPropertyOfType(source, symbolTableKey)) { + var sourceName = ts.getDeclarationName(source.symbol.valueDeclaration); + var targetName = ts.getDeclarationName(target.symbol.valueDeclaration); + reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName.escapedText === "" ? anon : sourceName), diagnosticName(targetName.escapedText === "" ? anon : targetName)); return; } } @@ -48694,7 +49603,11 @@ var ts; for (var _i = 0, props_2 = props; _i < props_2.length; _i++) { var prop = props_2[_i]; // Skip over ignored JSX and symbol-named members - if (isIgnoredJsxProperty(source, prop) || prop.nameType && prop.nameType.flags & 8192 /* UniqueESSymbol */) { + if (isIgnoredJsxProperty(source, prop)) { + continue; + } + var nameType = getSymbolLinks(prop).nameType; + if (nameType && nameType.flags & 8192 /* UniqueESSymbol */) { continue; } if (kind === 0 /* String */ || isNumericLiteralName(prop.escapedName)) { @@ -48817,6 +49730,10 @@ var ts; // make sure exactly 1 matches before returning it return match === -1 || discriminable.indexOf(/*searchElement*/ true, match + 1) !== -1 ? defaultValue : target.types[match]; } + function isFromSpreadAssignment(prop, container) { + var _a; + return ((_a = prop.valueDeclaration) === null || _a === void 0 ? void 0 : _a.parent) !== container.valueDeclaration; + } /** * A type is 'weak' if it is an object type with at least one optional property * and no required properties, call/construct signatures or index signatures @@ -49314,7 +50231,7 @@ var ts; } /** * Check if a Type was written as a tuple type literal. - * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. + * Prefer using isTupleLikeType() unless the use of `elementTypes`/`getTypeArguments` is required. */ function isTupleType(type) { return !!(ts.getObjectFlags(type) & 4 /* Reference */ && type.target.objectFlags & 8 /* Tuple */); @@ -49460,8 +50377,9 @@ var ts; if (source.valueDeclaration) { symbol.valueDeclaration = source.valueDeclaration; } - if (source.nameType) { - symbol.nameType = source.nameType; + var nameType = getSymbolLinks(source).nameType; + if (nameType) { + symbol.nameType = nameType; } return symbol; } @@ -49843,17 +50761,18 @@ var ts; // results for union and intersection types for performance reasons. function couldContainTypeVariables(type) { var objectFlags = ts.getObjectFlags(type); - return !!(type.flags & 63176704 /* Instantiable */ || + if (objectFlags & 67108864 /* CouldContainTypeVariablesComputed */) { + return !!(objectFlags & 134217728 /* CouldContainTypeVariables */); + } + var result = !!(type.flags & 63176704 /* Instantiable */ || objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 131072 /* ObjectRestType */) || - type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && couldUnionOrIntersectionContainTypeVariables(type)); - } - function couldUnionOrIntersectionContainTypeVariables(type) { - if (type.couldContainTypeVariables === undefined) { - type.couldContainTypeVariables = ts.some(type.types, couldContainTypeVariables); + type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && ts.some(type.types, couldContainTypeVariables)); + if (type.flags & 3899393 /* ObjectFlagsType */) { + type.objectFlags |= 67108864 /* CouldContainTypeVariablesComputed */ | (result ? 134217728 /* CouldContainTypeVariables */ : 0); } - return type.couldContainTypeVariables; + return result; } function isTypeParameterAtTopLevel(type, typeParameter) { return !!(type === typeParameter || @@ -49999,6 +50918,12 @@ var ts; inference.contraCandidates ? getIntersectionType(inference.contraCandidates) : undefined; } + function hasSkipDirectInferenceFlag(node) { + return !!getNodeLinks(node).skipDirectInference; + } + function isFromInferenceBlockedSource(type) { + return !!(type.symbol && ts.some(type.symbol.declarations, hasSkipDirectInferenceFlag)); + } function inferTypes(inferences, originalSource, originalTarget, priority, contravariant) { if (priority === void 0) { priority = 0; } if (contravariant === void 0) { contravariant = false; } @@ -50090,7 +51015,7 @@ var ts; // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). if (ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ || source === nonInferrableAnyType || source === silentNeverType || - (priority & 32 /* ReturnType */ && (source === autoType || source === autoArrayType))) { + (priority & 32 /* ReturnType */ && (source === autoType || source === autoArrayType)) || isFromInferenceBlockedSource(source)) { return; } var inference = getInferenceInfoForType(target); @@ -50211,6 +51136,12 @@ var ts; invokeOnce(source, target, inferFromObjectTypes); } } + if (source.flags & 25165824 /* Simplifiable */) { + var simplified = getSimplifiedType(source, contravariant); + if (simplified !== source) { + inferFromTypes(simplified, target); + } + } } function inferWithPriority(source, target, newPriority) { var savePriority = priority; @@ -50388,7 +51319,7 @@ var ts; // type and then make a secondary inference from that type to T. We make a secondary inference // such that direct inferences to T get priority over inferences to Partial, for example. var inference = getInferenceInfoForType(constraintType.type); - if (inference && !inference.isFixed) { + if (inference && !inference.isFixed && !isFromInferenceBlockedSource(source)) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { // We assign a lower priority to inferences made from types containing non-inferrable @@ -50550,7 +51481,7 @@ var ts; } } function isTypeOrBaseIdenticalTo(s, t) { - return isTypeIdenticalTo(s, t) || !!(s.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) && isTypeIdenticalTo(getBaseTypeOfLiteralType(s), t); + return isTypeIdenticalTo(s, t) || !!(t.flags & 4 /* String */ && s.flags & 128 /* StringLiteral */ || t.flags & 8 /* Number */ && s.flags & 256 /* NumberLiteral */); } function isTypeCloselyMatchedBy(s, t) { return !!(s.flags & 524288 /* Object */ && t.flags & 524288 /* Object */ && s.symbol && s.symbol === t.symbol || @@ -51320,6 +52251,8 @@ var ts; return getExplicitTypeOfSymbol(symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol, diagnostic); case 104 /* ThisKeyword */: return getExplicitThisType(node); + case 102 /* SuperKeyword */: + return checkSuperExpression(node); case 194 /* PropertyAccessExpression */: var type = getTypeOfDottedName(node.expression, diagnostic); var prop = type && getPropertyOfType(type, node.name.escapedText); @@ -51375,14 +52308,11 @@ var ts; diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis)); } function isReachableFlowNode(flow) { - var result = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); + var result = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ false); lastFlowNode = flow; lastFlowNodeReachable = result; return result; } - function isUnlockedReachableFlowNode(flow) { - return !(flow.flags & 4096 /* PreFinally */ && flow.lock.locked) && isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); - } function isFalseExpression(expr) { var node = ts.skipParentheses(expr); return node.kind === 91 /* FalseKeyword */ || node.kind === 209 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || @@ -51394,15 +52324,15 @@ var ts; return lastFlowNodeReachable; } var flags = flow.flags; - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { if (!noCacheCheck) { var id = getFlowNodeId(flow); var reachable = flowNodeReachable[id]; - return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ true)); + return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ true)); } noCacheCheck = false; } - if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */ | 4096 /* PreFinally */)) { + if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */)) { flow = flow.antecedent; } else if (flags & 512 /* Call */) { @@ -51423,7 +52353,7 @@ var ts; } else if (flags & 4 /* BranchLabel */) { // A branching point is reachable if any branch is reachable. - return ts.some(flow.antecedents, isUnlockedReachableFlowNode); + return ts.some(flow.antecedents, function (f) { return isReachableFlowNodeWorker(f, /*noCacheCheck*/ false); }); } else if (flags & 8 /* LoopLabel */) { // A loop is reachable if the control flow path that leads to the top is reachable. @@ -51437,12 +52367,14 @@ var ts; } flow = flow.antecedent; } - else if (flags & 8192 /* AfterFinally */) { - // Cache is unreliable once we start locking nodes + else if (flags & 1024 /* ReduceLabel */) { + // Cache is unreliable once we start adjusting labels lastFlowNode = undefined; - flow.locked = true; - var result = isReachableFlowNodeWorker(flow.antecedent, /*skipCacheCheck*/ false); - flow.locked = false; + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; + var result = isReachableFlowNodeWorker(flow.antecedent, /*noCacheCheck*/ false); + target.antecedents = saveAntecedents; return result; } else { @@ -51492,7 +52424,7 @@ var ts; flowDepth++; while (true) { var flags = flow.flags; - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { // We cache results of flow type resolution for shared nodes that were previously visited in // the same getFlowTypeOfReference invocation. A node is considered shared when it is the // antecedent of more than one node. @@ -51504,19 +52436,7 @@ var ts; } } var type = void 0; - if (flags & 8192 /* AfterFinally */) { - // block flow edge: finally -> pre-try (for larger explanation check comment in binder.ts - bindTryStatement - flow.locked = true; - type = getTypeAtFlowNode(flow.antecedent); - flow.locked = false; - } - else if (flags & 4096 /* PreFinally */) { - // locked pre-finally flows are filtered out in getTypeAtFlowBranchLabel - // so here just redirect to antecedent - flow = flow.antecedent; - continue; - } - else if (flags & 16 /* Assignment */) { + if (flags & 16 /* Assignment */) { type = getTypeAtFlowAssignment(flow); if (!type) { flow = flow.antecedent; @@ -51552,6 +52472,13 @@ var ts; continue; } } + else if (flags & 1024 /* ReduceLabel */) { + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; + type = getTypeAtFlowNode(flow.antecedent); + target.antecedents = saveAntecedents; + } else if (flags & 2 /* Start */) { // Check if we should continue with the control flow of the containing function. var container = flow.node; @@ -51570,7 +52497,7 @@ var ts; // simply return the non-auto declared type to reduce follow-on errors. type = convertAutoToAny(declaredType); } - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { // Record visited node and the associated type in the cache. sharedFlowNodes[sharedFlowCount] = flow; sharedFlowTypes[sharedFlowCount] = type; @@ -51754,12 +52681,6 @@ var ts; var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; - if (antecedent.flags & 4096 /* PreFinally */ && antecedent.lock.locked) { - // if flow correspond to branch from pre-try to finally and this branch is locked - this means that - // we initially have started following the flow outside the finally block. - // in this case we should ignore this branch. - continue; - } if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.clauseStart === antecedent.clauseEnd) { // The antecedent is the bypass branch of a potentially exhaustive switch statement. bypassFlow = antecedent; @@ -52439,12 +53360,19 @@ var ts; } /** remove undefined from the annotated type of a parameter when there is an initializer (that doesn't include undefined) */ function removeOptionalityFromDeclaredType(declaredType, declaration) { - var annotationIncludesUndefined = strictNullChecks && - declaration.kind === 156 /* Parameter */ && - declaration.initializer && - getFalsyFlags(declaredType) & 32768 /* Undefined */ && - !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768 /* Undefined */); - return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; + if (pushTypeResolution(declaration.symbol, 2 /* DeclaredType */)) { + var annotationIncludesUndefined = strictNullChecks && + declaration.kind === 156 /* Parameter */ && + declaration.initializer && + getFalsyFlags(declaredType) & 32768 /* Undefined */ && + !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768 /* Undefined */); + popTypeResolution(); + return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; + } + else { + reportCircularityError(declaration.symbol); + return declaredType; + } } function isConstraintPosition(node) { var parent = node.parent; @@ -52470,8 +53398,13 @@ var ts; return !!ts.findAncestor(location, function (e) { return e.parent && ts.isExportAssignment(e.parent) && e.parent.expression === e && ts.isEntityNameExpression(e); }); } function markAliasReferenced(symbol, location) { - if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && ((compilerOptions.preserveConstEnums && isExportOrExportExpression(location)) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol)))) { - markAliasSymbolAsReferenced(symbol); + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol)) { + if (compilerOptions.preserveConstEnums && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + markAliasSymbolAsReferenced(symbol); + } + else { + markConstEnumAliasAsReferenced(symbol); + } } } function checkIdentifier(node) { @@ -52810,7 +53743,7 @@ var ts; break; case 159 /* PropertyDeclaration */: case 158 /* PropertySignature */: - if (ts.hasModifier(container, 32 /* Static */)) { + if (ts.hasModifier(container, 32 /* Static */) && !(compilerOptions.target === 99 /* ESNext */ && compilerOptions.useDefineForClassFields)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks } @@ -53216,7 +54149,7 @@ var ts; } // In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the // contextual type for 'this' is 'obj'. - var parent = func.parent; + var parent = ts.walkUpParenthesizedExpressions(func.parent); if (parent.kind === 209 /* BinaryExpression */ && parent.operatorToken.kind === 62 /* EqualsToken */) { var target = parent.left; if (ts.isAccessExpression(target)) { @@ -53235,7 +54168,7 @@ var ts; return undefined; } // Return contextual type of parameter or undefined if no contextual type is available - function getContextuallyTypedParameterType(parameter, forCache) { + function getContextuallyTypedParameterType(parameter) { var func = parameter.parent; if (!isContextSensitiveFunctionOrObjectLiteralMethod(func)) { return undefined; @@ -53258,19 +54191,6 @@ var ts; } var contextualSignature = getContextualSignature(func); if (contextualSignature) { - if (forCache) { - // Calling the below guarantees the types are primed and assigned in the same way - // as when the parameter is reached via `checkFunctionExpressionOrObjectLiteralMethod`. - // This should prevent any uninstantiated inference variables in the contextual signature - // from leaking, and should lock in cached parameter types via `assignContextualParameterTypes` - // which we will then immediately use the results of below. - contextuallyCheckFunctionExpressionOrObjectLiteralMethod(func); - var type = getTypeOfSymbol(getMergedSymbol(func.symbol)); - if (isTypeAny(type)) { - return type; - } - contextualSignature = getSignaturesOfType(type, 0 /* Call */)[0]; - } var index = func.parameters.indexOf(parameter) - (ts.getThisParameter(func) ? 1 : 0); return parameter.dotDotDotToken && ts.lastOrUndefined(func.parameters) === parameter ? getRestTypeAtPosition(contextualSignature, index) : @@ -53284,7 +54204,7 @@ var ts; } switch (declaration.kind) { case 156 /* Parameter */: - return getContextuallyTypedParameterType(declaration, /*forCache*/ false); + return getContextuallyTypedParameterType(declaration); case 191 /* BindingElement */: return getContextualTypeForBindingElement(declaration); // By default, do nothing and return undefined - only parameters and binding elements have context implied by a parent @@ -53401,18 +54321,15 @@ var ts; return undefined; } // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg, contextFlags) { + function getContextualTypeForArgument(callTarget, arg) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); // -1 for e.g. the expression of a CallExpression, or the tag of a TaggedTemplateExpression - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { // If we're already in the process of resolving the given signature, don't resolve again as // that could cause infinite recursion. Instead, return anySignature. var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); - if (contextFlags && contextFlags & 4 /* BaseConstraint */ && signature.target && !ts.hasTypeArguments(callTarget)) { - signature = getBaseSignature(signature.target); - } if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } @@ -53774,7 +54691,7 @@ var ts; } /* falls through */ case 197 /* NewExpression */: - return getContextualTypeForArgument(parent, node, contextFlags); + return getContextualTypeForArgument(parent, node); case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -53816,13 +54733,13 @@ var ts; return ancestor && ancestor.inferenceContext; } function getContextualJsxElementAttributesType(node, contextFlags) { - if (ts.isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== 4 /* BaseConstraint */) { + if (ts.isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== 4 /* Completions */) { // Contextually applied type is moved from attributes up to the outer jsx attributes so when walking up from the children they get hit // _However_ to hit them from the _attributes_ we must look for them here; otherwise we'll used the declared type // (as below) instead! return node.parent.contextualType; } - return getContextualTypeForArgumentAtIndex(node, 0, contextFlags); + return getContextualTypeForArgumentAtIndex(node, 0); } function getEffectiveFirstArgumentForJsxSignature(signature, node) { return getJsxReferenceKind(node) !== 0 /* Component */ @@ -54028,58 +54945,73 @@ var ts; function checkArrayLiteral(node, checkMode, forceTuple) { var elements = node.elements; var elementCount = elements.length; - var hasNonEndingSpreadElement = false; var elementTypes = []; - var inDestructuringPattern = ts.isAssignmentTarget(node); + var hasEndingSpreadElement = false; + var hasNonEndingSpreadElement = false; var contextualType = getApparentTypeOfContextualType(node); + var inDestructuringPattern = ts.isAssignmentTarget(node); var inConstContext = isConstContext(node); - for (var index = 0; index < elementCount; index++) { - var e = elements[index]; - if (inDestructuringPattern && e.kind === 213 /* SpreadElement */) { - // Given the following situation: - // var c: {}; - // [...c] = ["", 0]; - // - // c is represented in the tree as a spread element in an array literal. - // But c really functions as a rest element, and its purpose is to provide - // a contextual type for the right hand side of the assignment. Therefore, - // instead of calling checkExpression on "...c", which will give an error - // if c is not iterable/array-like, we need to act as if we are trying to - // get the contextual element type from it. So we do something similar to - // getContextualTypeForElementExpression, which will crucially not error - // if there is no index type / iterated type. - var restArrayType = checkExpression(e.expression, checkMode, forceTuple); - var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) || - getIteratedTypeOrElementType(65 /* Destructuring */, restArrayType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); - if (restElementType) { - elementTypes.push(restElementType); + for (var i = 0; i < elementCount; i++) { + var e = elements[i]; + var spread = e.kind === 213 /* SpreadElement */ && e.expression; + var spreadType = spread && checkExpression(spread, checkMode, forceTuple); + if (spreadType && isTupleType(spreadType)) { + elementTypes.push.apply(elementTypes, getTypeArguments(spreadType)); + if (spreadType.target.hasRestElement) { + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; } } else { - var elementContextualType = getContextualTypeForElementExpression(contextualType, index); - var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); - elementTypes.push(type); - } - if (index < elementCount - 1 && e.kind === 213 /* SpreadElement */) { - hasNonEndingSpreadElement = true; + if (inDestructuringPattern && spreadType) { + // Given the following situation: + // var c: {}; + // [...c] = ["", 0]; + // + // c is represented in the tree as a spread element in an array literal. + // But c really functions as a rest element, and its purpose is to provide + // a contextual type for the right hand side of the assignment. Therefore, + // instead of calling checkExpression on "...c", which will give an error + // if c is not iterable/array-like, we need to act as if we are trying to + // get the contextual element type from it. So we do something similar to + // getContextualTypeForElementExpression, which will crucially not error + // if there is no index type / iterated type. + var restElementType = getIndexTypeOfType(spreadType, 1 /* Number */) || + getIteratedTypeOrElementType(65 /* Destructuring */, spreadType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); + if (restElementType) { + elementTypes.push(restElementType); + } + } + else { + var elementContextualType = getContextualTypeForElementExpression(contextualType, elementTypes.length); + var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); + elementTypes.push(type); + } + if (spread) { // tuples are done above, so these are only arrays + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; + } } } if (!hasNonEndingSpreadElement) { - var hasRestElement = elementCount > 0 && elements[elementCount - 1].kind === 213 /* SpreadElement */; - var minLength = elementCount - (hasRestElement ? 1 : 0); + var minLength = elementTypes.length - (hasEndingSpreadElement ? 1 : 0); // If array literal is actually a destructuring pattern, mark it as an implied type. We do this such // that we get the same behavior for "var [x, y] = []" and "[x, y] = []". var tupleResult = void 0; if (inDestructuringPattern && minLength > 0) { - var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasRestElement)); + var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); type.pattern = node; return type; } - else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasRestElement, elementCount, inConstContext)) { + else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasEndingSpreadElement, elementTypes.length, inConstContext)) { return createArrayLiteralType(tupleResult); } else if (forceTuple) { - return createArrayLiteralType(createTupleType(elementTypes, minLength, hasRestElement)); + return createArrayLiteralType(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); } } return createArrayLiteralType(createArrayType(elementTypes.length ? @@ -54316,10 +55248,12 @@ var ts; } // If object literal is contextually typed by the implied type of a binding pattern, augment the result // type with those properties for which the binding pattern specifies a default value. - if (contextualTypeHasPattern) { + // If the object literal is spread into another object literal, skip this step and let the top-level object + // literal handle it instead. + if (contextualTypeHasPattern && node.parent.kind !== 283 /* SpreadAssignment */) { for (var _i = 0, _a = getPropertiesOfType(contextualType); _i < _a.length; _i++) { var prop = _a[_i]; - if (!propertiesTable.get(prop.escapedName) && !(spread && getPropertyOfType(spread, prop.escapedName))) { + if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } @@ -54370,6 +55304,7 @@ var ts; } function checkJsxSelfClosingElementDeferred(node) { checkJsxOpeningLikeElementOrOpeningFragment(node); + resolveUntypedCall(node); // ensure type arguments and parameters are typechecked, even if there is an arity error } function checkJsxSelfClosingElement(node, _checkMode) { checkNodeDeferred(node); @@ -54811,7 +55746,7 @@ var ts; // if jsx emit was not react as there wont be error being emitted reactSym.isReferenced = 67108863 /* All */; // If react symbol is alias, mark it as refereced - if (reactSym.flags & 2097152 /* Alias */) { + if (reactSym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(reactSym)) { markAliasSymbolAsReferenced(reactSym); } } @@ -54979,7 +55914,7 @@ var ts; return false; } var thisType = getTypeFromTypeNode(thisParameter.type); - enclosingClass = ((thisType.flags & 262144 /* TypeParameter */) ? getConstraintOfTypeParameter(thisType) : thisType); + enclosingClass = ((thisType.flags & 262144 /* TypeParameter */) ? getConstraintOfTypeParameter(thisType) : thisType).target; } // No further restrictions for static properties if (flags & 32 /* Static */) { @@ -55937,8 +56872,83 @@ var ts; // can be specified by users through attributes property. var paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); var attributesType = checkExpressionWithContextualType(node.attributes, paramType, /*inferenceContext*/ undefined, checkMode); - return checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, + return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, /*headMessage*/ undefined, containingMessageChain, errorOutputContainer); + function checkTagNameDoesNotExpectTooManyArguments() { + var _a; + var tagType = ts.isJsxOpeningElement(node) || ts.isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : undefined; + if (!tagType) { + return true; + } + var tagCallSignatures = getSignaturesOfType(tagType, 0 /* Call */); + if (!ts.length(tagCallSignatures)) { + return true; + } + var factory = getJsxFactoryEntity(node); + if (!factory) { + return true; + } + var factorySymbol = resolveEntityName(factory, 111551 /* Value */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, node); + if (!factorySymbol) { + return true; + } + var factoryType = getTypeOfSymbol(factorySymbol); + var callSignatures = getSignaturesOfType(factoryType, 0 /* Call */); + if (!ts.length(callSignatures)) { + return true; + } + var hasFirstParamSignatures = false; + var maxParamCount = 0; + // Check that _some_ first parameter expects a FC-like thing, and that some overload of the SFC expects an acceptable number of arguments + for (var _i = 0, callSignatures_1 = callSignatures; _i < callSignatures_1.length; _i++) { + var sig = callSignatures_1[_i]; + var firstparam = getTypeAtPosition(sig, 0); + var signaturesOfParam = getSignaturesOfType(firstparam, 0 /* Call */); + if (!ts.length(signaturesOfParam)) + continue; + for (var _b = 0, signaturesOfParam_1 = signaturesOfParam; _b < signaturesOfParam_1.length; _b++) { + var paramSig = signaturesOfParam_1[_b]; + hasFirstParamSignatures = true; + if (hasEffectiveRestParameter(paramSig)) { + return true; // some signature has a rest param, so function components can have an arbitrary number of arguments + } + var paramCount = getParameterCount(paramSig); + if (paramCount > maxParamCount) { + maxParamCount = paramCount; + } + } + } + if (!hasFirstParamSignatures) { + // Not a single signature had a first parameter which expected a signature - for back compat, and + // to guard against generic factories which won't have signatures directly, do not error + return true; + } + var absoluteMinArgCount = Infinity; + for (var _c = 0, tagCallSignatures_1 = tagCallSignatures; _c < tagCallSignatures_1.length; _c++) { + var tagSig = tagCallSignatures_1[_c]; + var tagRequiredArgCount = getMinArgumentCount(tagSig); + if (tagRequiredArgCount < absoluteMinArgCount) { + absoluteMinArgCount = tagRequiredArgCount; + } + } + if (absoluteMinArgCount <= maxParamCount) { + return true; // some signature accepts the number of arguments the function component provides + } + if (reportErrors) { + var diag = ts.createDiagnosticForNode(node.tagName, ts.Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, ts.entityNameToString(node.tagName), absoluteMinArgCount, ts.entityNameToString(factory), maxParamCount); + var tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) === null || _a === void 0 ? void 0 : _a.valueDeclaration; + if (tagNameDeclaration) { + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(tagNameDeclaration, ts.Diagnostics._0_is_declared_here, ts.entityNameToString(node.tagName))); + } + if (errorOutputContainer && errorOutputContainer.skipLogging) { + (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); + } + if (!errorOutputContainer.skipLogging) { + diagnostics.add(diag); + } + } + return false; + } } function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors, containingMessageChain) { var errorOutputContainer = { errors: undefined, skipLogging: true }; @@ -56419,7 +57429,7 @@ var ts; } } } - return produceDiagnostics || !args ? resolveErrorCall(node) : getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); + return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); function chooseOverload(candidates, relation, signatureHelpTrailingComma) { if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; } candidatesForArgumentError = undefined; @@ -56501,9 +57511,9 @@ var ts; } } // No signature was applicable. We have already reported the errors for the invalid signature. - // If this is a type resolution session, e.g. Language Service, try to get better information than anySignature. function getCandidateForOverloadFailure(node, candidates, args, hasCandidatesOutArray) { ts.Debug.assert(candidates.length > 0); // Else should not have called this. + checkNodeDeferred(node); // Normally we will combine overloads. Skip this if they have type parameters since that's hard to combine. // Don't do this if there is a `candidatesOutArray`, // because then we want the chosen best candidate to be one of the overloads, not a combination. @@ -56678,7 +57688,7 @@ var ts; if (node.arguments.length === 1) { var text = ts.getSourceFileOfNode(node).text; if (ts.isLineBreak(text.charCodeAt(ts.skipTrivia(text, node.expression.end, /* stopAfterLineBreak */ true) - 1))) { - relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.It_is_highly_likely_that_you_are_missing_a_semicolon); + relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.Are_you_missing_a_semicolon); } } invocationError(node.expression, apparentType, 0 /* Call */, relatedInformation); @@ -57567,15 +58577,15 @@ var ts; if (!parameter) { signature.thisParameter = createSymbolWithType(context.thisParameter, /*type*/ undefined); } - assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); + assignParameterType(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { - var contextualParameterType = getTypeAtPosition(context, i); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + var contextualParameterType = tryGetTypeAtPosition(context, i); + assignParameterType(parameter, contextualParameterType); } } if (signatureHasRestParameter(signature)) { @@ -57583,7 +58593,30 @@ var ts; var parameter = ts.last(signature.parameters); if (ts.isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { var contextualParameterType = getRestTypeAtPosition(context, len); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + assignParameterType(parameter, contextualParameterType); + } + } + } + function assignNonContextualParameterTypes(signature) { + if (signature.thisParameter) { + assignParameterType(signature.thisParameter); + } + for (var _i = 0, _a = signature.parameters; _i < _a.length; _i++) { + var parameter = _a[_i]; + assignParameterType(parameter); + } + } + function assignParameterType(parameter, type) { + var links = getSymbolLinks(parameter); + if (!links.type) { + var declaration = parameter.valueDeclaration; + links.type = type || getWidenedTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true); + if (declaration.name.kind !== 75 /* Identifier */) { + // if inference didn't come up with anything but unknown, fall back to the binding pattern if present. + if (links.type === unknownType) { + links.type = getTypeFromBindingPattern(declaration.name); + } + assignBindingElementTypes(declaration.name); } } } @@ -57602,20 +58635,6 @@ var ts; } } } - function assignTypeToParameterAndFixTypeParameters(parameter, contextualType) { - var links = getSymbolLinks(parameter); - if (!links.type) { - links.type = contextualType; - var decl = parameter.valueDeclaration; - if (decl.name.kind !== 75 /* Identifier */) { - // if inference didn't come up with anything but unknown, fall back to the binding pattern if present. - if (links.type === unknownType) { - links.type = getTypeFromBindingPattern(decl.name); - } - assignBindingElementTypes(decl.name); - } - } - } function createPromiseType(promisedType) { // creates a `Promise` type where `T` is the promisedType argument var globalPromiseType = getGlobalPromiseType(/*reportErrors*/ true); @@ -57977,7 +58996,7 @@ var ts; // The identityMapper object is used to indicate that function expressions are wildcards if (checkMode && checkMode & 4 /* SkipContextSensitive */ && isContextSensitive(node)) { // Skip parameters, return signature with return type that retains noncontextual parts so inferences can still be drawn in an early stage - if (!ts.getEffectiveReturnTypeNode(node) && hasContextSensitiveReturnExpression(node)) { + if (!ts.getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) { // Return plain anyFunctionType if there is no possibility we'll make inferences from the return type var contextualSignature = getContextualSignature(node); if (contextualSignature && couldContainTypeVariables(getReturnTypeOfSignature(contextualSignature))) { @@ -57999,12 +59018,8 @@ var ts; if (!hasGrammarError && node.kind === 201 /* FunctionExpression */) { checkGrammarForGenerator(node); } - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return type; - } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); - return type; + return getTypeOfSymbol(getSymbolOfNode(node)); } function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) { var links = getNodeLinks(node); @@ -58016,13 +59031,12 @@ var ts; // already assigned contextual types. if (!(links.flags & 1024 /* ContextChecked */)) { links.flags |= 1024 /* ContextChecked */; - if (contextualSignature) { - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return; - } - var signature = getSignaturesOfType(type, 0 /* Call */)[0]; - if (isContextSensitive(node)) { + var signature = ts.firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfNode(node)), 0 /* Call */)); + if (!signature) { + return; + } + if (isContextSensitive(node)) { + if (contextualSignature) { var inferenceContext = getInferenceContext(node); if (checkMode && checkMode & 2 /* Inferential */) { inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext); @@ -58031,11 +59045,15 @@ var ts; instantiateSignature(contextualSignature, inferenceContext.mapper) : contextualSignature; assignContextualParameterTypes(signature, instantiatedContextualSignature); } - if (!getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { - var returnType = getReturnTypeFromBody(node, checkMode); - if (!signature.resolvedReturnType) { - signature.resolvedReturnType = returnType; - } + else { + // Force resolution of all parameter types such that the absence of a contextual type is consistently reflected. + assignNonContextualParameterTypes(signature); + } + } + if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { + var returnType = getReturnTypeFromBody(node, checkMode); + if (!signature.resolvedReturnType) { + signature.resolvedReturnType = returnType; } } checkSignatureDeclaration(node); @@ -58351,7 +59369,7 @@ var ts; // Return true if type might be of the given kind. A union or intersection type might be of a given // kind if at least one constituent type is of the given kind. function maybeTypeOfKind(type, kind) { - if (type.flags & kind & ~131072 /* GenericMappedType */ || kind & 131072 /* GenericMappedType */ && isGenericMappedType(type)) { + if (type.flags & kind) { return true; } if (type.flags & 3145728 /* UnionOrIntersection */) { @@ -58648,12 +59666,81 @@ var ts; function isTypeEqualityComparableTo(source, target) { return (target.flags & 98304 /* Nullable */) !== 0 || isTypeComparableTo(source, target); } + var CheckBinaryExpressionState; + (function (CheckBinaryExpressionState) { + CheckBinaryExpressionState[CheckBinaryExpressionState["MaybeCheckLeft"] = 0] = "MaybeCheckLeft"; + CheckBinaryExpressionState[CheckBinaryExpressionState["CheckRight"] = 1] = "CheckRight"; + CheckBinaryExpressionState[CheckBinaryExpressionState["FinishCheck"] = 2] = "FinishCheck"; + })(CheckBinaryExpressionState || (CheckBinaryExpressionState = {})); function checkBinaryExpression(node, checkMode) { - if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { - return checkExpression(node.right, checkMode); + var workStacks = { + expr: [node], + state: [0 /* MaybeCheckLeft */], + leftType: [undefined] + }; + var stackIndex = 0; + var lastResult; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0 /* MaybeCheckLeft */: { + if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { + finishInvocation(checkExpression(node.right, checkMode)); + break; + } + checkGrammarNullishCoalesceWithLogicalExpression(node); + var operator = node.operatorToken.kind; + if (operator === 62 /* EqualsToken */ && (node.left.kind === 193 /* ObjectLiteralExpression */ || node.left.kind === 192 /* ArrayLiteralExpression */)) { + finishInvocation(checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 104 /* ThisKeyword */)); + break; + } + advanceState(1 /* CheckRight */); + maybeCheckExpression(node.left); + break; + } + case 1 /* CheckRight */: { + var leftType = lastResult; + workStacks.leftType[stackIndex] = leftType; + var operator = node.operatorToken.kind; + if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { + checkTruthinessOfType(leftType, node.left); + } + advanceState(2 /* FinishCheck */); + maybeCheckExpression(node.right); + break; + } + case 2 /* FinishCheck */: { + var leftType = workStacks.leftType[stackIndex]; + var rightType = lastResult; + finishInvocation(checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node)); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for checkBinaryExpression"); + } + } + return lastResult; + function finishInvocation(result) { + lastResult = result; + stackIndex--; + } + /** + * Note that `advanceState` sets the _current_ head state, and that `maybeCheckExpression` potentially pushes on a new + * head state; so `advanceState` must be called before any `maybeCheckExpression` during a state's execution. + */ + function advanceState(nextState) { + workStacks.state[stackIndex] = nextState; + } + function maybeCheckExpression(node) { + if (ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0 /* MaybeCheckLeft */; + workStacks.leftType[stackIndex] = undefined; + } + else { + lastResult = checkExpression(node, checkMode); + } } - checkGrammarNullishCoalesceWithLogicalExpression(node); - return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, checkMode, node); } function checkGrammarNullishCoalesceWithLogicalExpression(node) { var left = node.left, operatorToken = node.operatorToken, right = node.right; @@ -58666,6 +59753,8 @@ var ts; } } } + // Note that this and `checkBinaryExpression` above should behave mostly the same, except this elides some + // expression-wide checks and does not use a work stack to fold nested binary expressions into the same callstack frame function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { var operator = operatorToken.kind; if (operator === 62 /* EqualsToken */ && (left.kind === 193 /* ObjectLiteralExpression */ || left.kind === 192 /* ArrayLiteralExpression */)) { @@ -58679,6 +59768,10 @@ var ts; leftType = checkExpression(left, checkMode); } var rightType = checkExpression(right, checkMode); + return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode); + } + function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode) { + var operator = operatorToken.kind; switch (operator) { case 41 /* AsteriskToken */: case 42 /* AsteriskAsteriskToken */: @@ -59049,7 +60142,8 @@ var ts; return getContextualIterationType(2 /* Next */, func) || anyType; } function checkConditionalExpression(node, checkMode) { - checkTruthinessExpression(node.condition); + var type = checkTruthinessExpression(node.condition); + checkTestingKnownTruthyCallableType(node.condition, node.whenTrue, type); var type1 = checkExpression(node.whenTrue, checkMode); var type2 = checkExpression(node.whenFalse, checkMode); return getUnionType([type1, type2], 2 /* Subtype */); @@ -59077,17 +60171,24 @@ var ts; var context = getContextNode(node); var saveContextualType = context.contextualType; var saveInferenceContext = context.inferenceContext; - context.contextualType = contextualType; - context.inferenceContext = inferenceContext; - var type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0)); - // We strip literal freshness when an appropriate contextual type is present such that contextually typed - // literals always preserve their literal types (otherwise they might widen during type inference). An alternative - // here would be to not mark contextually typed literals as fresh in the first place. - var result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? - getRegularTypeOfLiteralType(type) : type; - context.contextualType = saveContextualType; - context.inferenceContext = saveInferenceContext; - return result; + try { + context.contextualType = contextualType; + context.inferenceContext = inferenceContext; + var type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0)); + // We strip literal freshness when an appropriate contextual type is present such that contextually typed + // literals always preserve their literal types (otherwise they might widen during type inference). An alternative + // here would be to not mark contextually typed literals as fresh in the first place. + var result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? + getRegularTypeOfLiteralType(type) : type; + return result; + } + finally { + // In the event our operation is canceled or some other exception occurs, reset the contextual type + // so that we do not accidentally hold onto an instance of the checker, as a Type created in the services layer + // may hold onto the checker that created it. + context.contextualType = saveContextualType; + context.inferenceContext = saveInferenceContext; + } } function checkExpressionCached(node, checkMode) { var links = getNodeLinks(node); @@ -59409,9 +60510,16 @@ var ts; } var saveContextualType = node.contextualType; node.contextualType = anyType; - var type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */); - node.contextualType = saveContextualType; - return type; + try { + var type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */); + return type; + } + finally { + // In the event our operation is canceled or some other exception occurs, reset the contextual type + // so that we do not accidentally hold onto an instance of the checker, as a Type created in the services layer + // may hold onto the checker that created it. + node.contextualType = saveContextualType; + } } function checkExpression(node, checkMode, forceTuple) { var saveCurrentNode = currentNode; @@ -60273,7 +61381,7 @@ var ts; getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return ts.hasModifier(node, 8 /* Private */) && !!(node.flags & 8388608 /* Ambient */); + return (ts.hasModifier(node, 8 /* Private */) || ts.isPrivateIdentifierPropertyDeclaration(node)) && !!(node.flags & 8388608 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedModifierFlags(n); @@ -60566,9 +61674,9 @@ var ts; case 247 /* TypeAliasDeclaration */: // A jsdoc typedef and callback are, by definition, type aliases. // falls through - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return 2 /* ExportType */; case 249 /* ModuleDeclaration */: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ @@ -60576,6 +61684,7 @@ var ts; : 4 /* ExportNamespace */; case 245 /* ClassDeclaration */: case 248 /* EnumDeclaration */: + case 284 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; case 290 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; @@ -60590,10 +61699,10 @@ var ts; case 253 /* ImportEqualsDeclaration */: case 256 /* NamespaceImport */: case 255 /* ImportClause */: - var result_7 = 0 /* None */; + var result_8 = 0 /* None */; var target = resolveAlias(getSymbolOfNode(d)); - ts.forEach(target.declarations, function (d) { result_7 |= getDeclarationSpaces(d); }); - return result_7; + ts.forEach(target.declarations, function (d) { result_8 |= getDeclarationSpaces(d); }); + return result_8; case 242 /* VariableDeclaration */: case 191 /* BindingElement */: case 244 /* FunctionDeclaration */: @@ -60916,7 +62025,8 @@ var ts; if (rootSymbol && rootSymbol.flags & 2097152 /* Alias */ && symbolIsValue(rootSymbol) - && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol))) { + && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol)) + && !getTypeOnlyAliasDeclaration(rootSymbol)) { markAliasSymbolAsReferenced(rootSymbol); } } @@ -61110,6 +62220,13 @@ var ts; } checkSignatureDeclaration(node); } + function checkJSDocImplementsTag(node) { + var classLike = ts.getJSDocHost(node); + if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { + error(classLike, ts.Diagnostics.JSDoc_0_is_not_attached_to_a_class, ts.idText(node.tagName)); + return; + } + } function checkJSDocAugmentsTag(node) { var classLike = ts.getJSDocHost(node); if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { @@ -61282,7 +62399,9 @@ var ts; break; } var symbol = getSymbolOfNode(member); - if (!symbol.isReferenced && (ts.hasModifier(member, 8 /* Private */) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name))) { + if (!symbol.isReferenced + && (ts.hasModifier(member, 8 /* Private */) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name)) + && !(member.flags & 8388608 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, ts.createDiagnosticForNode(member.name, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; @@ -61847,21 +62966,21 @@ var ts; // Grammar checking checkGrammarStatementInAmbientContext(node); var type = checkTruthinessExpression(node.expression); - checkTestingKnownTruthyCallableType(node, type); + checkTestingKnownTruthyCallableType(node.expression, node.thenStatement, type); checkSourceElement(node.thenStatement); if (node.thenStatement.kind === 224 /* EmptyStatement */) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); } - function checkTestingKnownTruthyCallableType(ifStatement, type) { + function checkTestingKnownTruthyCallableType(condExpr, body, type) { if (!strictNullChecks) { return; } - var testedNode = ts.isIdentifier(ifStatement.expression) - ? ifStatement.expression - : ts.isPropertyAccessExpression(ifStatement.expression) - ? ifStatement.expression.name + var testedNode = ts.isIdentifier(condExpr) + ? condExpr + : ts.isPropertyAccessExpression(condExpr) + ? condExpr.name : undefined; if (!testedNode) { return; @@ -61883,7 +63002,7 @@ var ts; if (!testedFunctionSymbol) { return; } - var functionIsUsedInBody = ts.forEachChild(ifStatement.thenStatement, function check(childNode) { + var functionIsUsedInBody = ts.forEachChild(body, function check(childNode) { if (ts.isIdentifier(childNode)) { var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol.id === testedFunctionSymbol.id) { @@ -61893,7 +63012,7 @@ var ts; return ts.forEachChild(childNode, check); }); if (!functionIsUsedInBody) { - error(ifStatement.expression, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); + error(condExpr, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); } } function checkDoStatement(node) { @@ -61908,13 +63027,15 @@ var ts; checkTruthinessExpression(node.expression); checkSourceElement(node.statement); } - function checkTruthinessExpression(node, checkMode) { - var type = checkExpression(node, checkMode); + function checkTruthinessOfType(type, node) { if (type.flags & 16384 /* Void */) { error(node, ts.Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); } return type; } + function checkTruthinessExpression(node, checkMode) { + return checkTruthinessOfType(checkExpression(node, checkMode), node); + } function checkForStatement(node) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { @@ -62214,6 +63335,12 @@ var ts; } return noIterationTypes; } + function getCachedIterationTypes(type, cacheKey) { + return type[cacheKey]; + } + function setCachedIterationTypes(type, cacheKey, cachedTypes) { + return type[cacheKey] = cachedTypes; + } /** * Gets the *yield*, *return*, and *next* types from an `Iterable`-like or `AsyncIterable`-like type. * @@ -62250,7 +63377,7 @@ var ts; return iterationTypes_1; } var cacheKey = use & 2 /* AllowsAsyncIterablesFlag */ ? "iterationTypesOfAsyncIterable" : "iterationTypesOfIterable"; - var cachedTypes = type[cacheKey]; + var cachedTypes = getCachedIterationTypes(type, cacheKey); if (cachedTypes) return cachedTypes === noIterationTypes ? undefined : cachedTypes; var allIterationTypes; @@ -62268,7 +63395,7 @@ var ts; } } var iterationTypes = allIterationTypes ? combineIterationTypes(allIterationTypes) : noIterationTypes; - type[cacheKey] = iterationTypes; + setCachedIterationTypes(type, cacheKey, iterationTypes); return iterationTypes === noIterationTypes ? undefined : iterationTypes; } function getAsyncFromSyncIterationTypes(iterationTypes, errorNode) { @@ -62307,7 +63434,7 @@ var ts; if (use & 2 /* AllowsAsyncIterablesFlag */) { // for a sync iterable in an async context, only use the cached types if they are valid. if (iterationTypes !== noIterationTypes) { - return type.iterationTypesOfAsyncIterable = getAsyncFromSyncIterationTypes(iterationTypes, errorNode); + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", getAsyncFromSyncIterationTypes(iterationTypes, errorNode)); } } else { @@ -62325,9 +63452,9 @@ var ts; var iterationTypes = getIterationTypesOfIterableSlow(type, syncIterationTypesResolver, errorNode); if (iterationTypes !== noIterationTypes) { if (use & 2 /* AllowsAsyncIterablesFlag */) { - return type.iterationTypesOfAsyncIterable = iterationTypes + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", iterationTypes ? getAsyncFromSyncIterationTypes(iterationTypes, errorNode) - : noIterationTypes; + : noIterationTypes); } else { return iterationTypes; @@ -62344,7 +63471,7 @@ var ts; * `getIterationTypesOfIterable` instead. */ function getIterationTypesOfIterableCached(type, resolver) { - return type[resolver.iterableCacheKey]; + return getCachedIterationTypes(type, resolver.iterableCacheKey); } function getIterationTypesOfGlobalIterableType(globalType, resolver) { var globalIterationTypes = getIterationTypesOfIterableCached(globalType, resolver) || @@ -62377,14 +63504,14 @@ var ts; // While we define these as `any` and `undefined` in our libs by default, a custom lib *could* use // different definitions. var _a = getIterationTypesOfGlobalIterableType(globalType, resolver), returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } // As an optimization, if the type is an instantiation of the following global type, then // just grab its related type arguments: // - `Generator` or `AsyncGenerator` if (isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } /** @@ -62398,18 +63525,19 @@ var ts; * `getIterationTypesOfIterable` instead. */ function getIterationTypesOfIterableSlow(type, resolver, errorNode) { + var _a; var method = getPropertyOfType(type, ts.getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName)); var methodType = method && !(method.flags & 16777216 /* Optional */) ? getTypeOfSymbol(method) : undefined; if (isTypeAny(methodType)) { - return type[resolver.iterableCacheKey] = anyIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes); } var signatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : undefined; if (!ts.some(signatures)) { - return type[resolver.iterableCacheKey] = noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes); } var iteratorType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), 2 /* Subtype */); - var iterationTypes = getIterationTypesOfIterator(iteratorType, resolver, errorNode) || noIterationTypes; - return type[resolver.iterableCacheKey] = iterationTypes; + var iterationTypes = (_a = getIterationTypesOfIterator(iteratorType, resolver, errorNode)) !== null && _a !== void 0 ? _a : noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes); } function reportTypeNotIterableError(errorNode, type, allowAsyncIterables) { var message = allowAsyncIterables @@ -62440,7 +63568,7 @@ var ts; * `getIterationTypesOfIterator` instead. */ function getIterationTypesOfIteratorCached(type, resolver) { - return type[resolver.iteratorCacheKey]; + return getCachedIterationTypes(type, resolver.iteratorCacheKey); } /** * Gets the iteration types of an `Iterator`-like or `AsyncIterator`-like type from the @@ -62469,12 +63597,12 @@ var ts; var globalIterationTypes = getIterationTypesOfIteratorCached(globalType, resolver) || getIterationTypesOfIteratorSlow(globalType, resolver, /*errorNode*/ undefined); var _a = globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes, returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } if (isReferenceToType(type, resolver.getGlobalIteratorType(/*reportErrors*/ false)) || isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } function isIteratorResult(type, kind) { @@ -62502,7 +63630,7 @@ var ts; if (isTypeAny(type)) { return anyIterationTypes; } - var cachedTypes = type.iterationTypesOfIteratorResult; + var cachedTypes = getCachedIterationTypes(type, "iterationTypesOfIteratorResult"); if (cachedTypes) { return cachedTypes; } @@ -62510,11 +63638,11 @@ var ts; // or `IteratorReturnResult` types, then just grab its type argument. if (isReferenceToType(type, getGlobalIteratorYieldResultType(/*reportErrors*/ false))) { var yieldType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType_1, /*returnType*/ undefined, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType_1, /*returnType*/ undefined, /*nextType*/ undefined)); } if (isReferenceToType(type, getGlobalIteratorReturnResultType(/*reportErrors*/ false))) { var returnType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(/*yieldType*/ undefined, returnType_1, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(/*yieldType*/ undefined, returnType_1, /*nextType*/ undefined)); } // Choose any constituents that can produce the requested iteration type. var yieldIteratorResult = filterType(type, isYieldIteratorResult); @@ -62522,13 +63650,13 @@ var ts; var returnIteratorResult = filterType(type, isReturnIteratorResult); var returnType = returnIteratorResult !== neverType ? getTypeOfPropertyOfType(returnIteratorResult, "value") : undefined; if (!yieldType && !returnType) { - return type.iterationTypesOfIteratorResult = noIterationTypes; + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", noIterationTypes); } // From https://tc39.github.io/ecma262/#sec-iteratorresult-interface // > ... If the iterator does not have a return value, `value` is `undefined`. In that case, the // > `value` property may be absent from the conforming object if it does not inherit an explicit // > `value` property. - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType, returnType || voidType, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType, returnType || voidType, /*nextType*/ undefined)); } /** * Gets the *yield*, *return*, and *next* types of a the `next()`, `return()`, or @@ -62621,7 +63749,7 @@ var ts; getIterationTypesOfMethod(type, resolver, "return", errorNode), getIterationTypesOfMethod(type, resolver, "throw", errorNode), ]); - return type[resolver.iteratorCacheKey] = iterationTypes; + return setCachedIterationTypes(type, resolver.iteratorCacheKey, iterationTypes); } /** * Gets the requested "iteration type" from a type that is either `Iterable`-like, `Iterator`-like, @@ -63015,7 +64143,7 @@ var ts; var sourceConstraint = constraint && getTypeFromTypeNode(constraint); var targetConstraint = getConstraintOfTypeParameter(target); // relax check if later interface augmentation has no constraint, it's more broad and is OK to merge with - // a more constrained interface (this could be generalized to a full heirarchy check, but that's maybe overkill) + // a more constrained interface (this could be generalized to a full hierarchy check, but that's maybe overkill) if (sourceConstraint && targetConstraint && !isTypeIdenticalTo(sourceConstraint, targetConstraint)) { return false; } @@ -63119,7 +64247,7 @@ var ts; checkKindsOfPropertyMemberOverrides(type, baseType_1); } } - var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(node); + var implementedTypeNodes = ts.getEffectiveImplementsTypeNodes(node); if (implementedTypeNodes) { for (var _b = 0, implementedTypeNodes_1 = implementedTypeNodes; _b < implementedTypeNodes_1.length; _b++) { var typeRefNode = implementedTypeNodes_1[_b]; @@ -63444,6 +64572,7 @@ var ts; // Grammar checking checkGrammarDecoratorsAndModifiers(node); checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_alias_name_cannot_be_0); + checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); checkSourceElement(node.type); registerForUnusedIdentifiersCheck(node); @@ -63988,6 +65117,9 @@ var ts; if (!checkGrammarDecoratorsAndModifiers(node) && ts.hasModifiers(node)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); } + if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0 /* ES3 */) { + checkExternalEmitHelpers(node, 1048576 /* CreateBinding */); + } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { // export { x, y } @@ -64025,16 +65157,14 @@ var ts; return !isInAppropriateContext; } function importClauseContainsReferencedImport(importClause) { - return importClause.name && isReferenced(importClause) - || importClause.namedBindings && namedBindingsContainsReferencedImport(importClause.namedBindings); - function isReferenced(declaration) { - return !!getMergedSymbol(getSymbolOfNode(declaration)).isReferenced; - } - function namedBindingsContainsReferencedImport(namedBindings) { - return ts.isNamespaceImport(namedBindings) - ? isReferenced(namedBindings) - : ts.some(namedBindings.elements, isReferenced); - } + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolOfNode(declaration).isReferenced; + }); + } + function importClauseContainsConstEnumUsedAsValue(importClause) { + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolLinks(getSymbolOfNode(declaration)).constEnumReferenced; + }); } function checkImportsForTypeOnlyConversion(sourceFile) { for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { @@ -64043,11 +65173,9 @@ var ts; statement.importClause && !statement.importClause.isTypeOnly && importClauseContainsReferencedImport(statement.importClause) && - !isReferencedAliasDeclaration(statement.importClause, /*checkChildren*/ true)) { - var isError = compilerOptions.importsNotUsedAsValues === 2 /* Error */; - errorOrSuggestion(isError, statement, isError - ? ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error - : ts.Diagnostics.This_import_may_be_converted_to_a_type_only_import); + !isReferencedAliasDeclaration(statement.importClause, /*checkChildren*/ true) && + !importClauseContainsConstEnumUsedAsValue(statement.importClause)) { + error(statement, ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error); } } } @@ -64257,15 +65385,17 @@ var ts; return checkImportType(node); case 307 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 308 /* JSDocImplementsTag */: + return checkJSDocImplementsTag(node); + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: return checkJSDocParameterTag(node); case 300 /* JSDocFunctionType */: checkJSDocFunctionType(node); @@ -64444,6 +65574,16 @@ var ts; currentNode = node; instantiationCount = 0; switch (node.kind) { + case 196 /* CallExpression */: + case 197 /* NewExpression */: + case 198 /* TaggedTemplateExpression */: + case 157 /* Decorator */: + case 268 /* JsxOpeningElement */: + // These node kinds are deferred checked when overload resolution fails + // To save on work, we ensure the arguments are checked just once, in + // a deferred way + resolveUntypedCall(node); + break; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 161 /* MethodDeclaration */: @@ -64513,7 +65653,9 @@ var ts; } }); } - if (!node.isDeclarationFile && ts.isExternalModule(node)) { + if (compilerOptions.importsNotUsedAsValues === 2 /* Error */ && + !node.isDeclarationFile && + ts.isExternalModule(node)) { checkImportsForTypeOnlyConversion(node); } if (ts.isExternalOrCommonJsModule(node)) { @@ -64827,10 +65969,10 @@ var ts; return entityNameSymbol; } } - if (name.parent.kind === 316 /* JSDocParameterTag */) { + if (name.parent.kind === 317 /* JSDocParameterTag */) { return ts.getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 155 /* TypeParameter */ && name.parent.parent.kind === 320 /* JSDocTemplateTag */) { + if (name.parent.kind === 155 /* TypeParameter */ && name.parent.parent.kind === 321 /* JSDocTemplateTag */) { ts.Debug.assert(!ts.isInJSFile(name)); // Otherwise `isDeclarationName` would have been true. var typeParameter = ts.getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -64871,7 +66013,7 @@ var ts; // Do we want to return undefined here? return undefined; } - function getSymbolAtLocation(node) { + function getSymbolAtLocation(node, ignoreErrors) { if (node.kind === 290 /* SourceFile */) { return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } @@ -64944,7 +66086,7 @@ var ts; ((node.parent.kind === 254 /* ImportDeclaration */ || node.parent.kind === 260 /* ExportDeclaration */) && node.parent.moduleSpecifier === node) || ((ts.isInJSFile(node) && ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteralLike*/ false)) || ts.isImportCall(node.parent)) || (ts.isLiteralTypeNode(node.parent) && ts.isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent)) { - return resolveExternalModuleName(node, node); + return resolveExternalModuleName(node, node, ignoreErrors); } if (ts.isCallExpression(parent) && ts.isBindableObjectDefinePropertyCall(parent) && parent.arguments[1] === node) { return getSymbolOfNode(parent); @@ -64964,9 +66106,9 @@ var ts; case 80 /* ClassKeyword */: return getSymbolOfNode(node.parent); case 188 /* ImportType */: - return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal) : undefined; + return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : undefined; case 89 /* ExportKeyword */: - return ts.isExportAssignment(node.parent) ? ts.Debug.assertDefined(node.parent.symbol) : undefined; + return ts.isExportAssignment(node.parent) ? ts.Debug.checkDefined(node.parent.symbol) : undefined; default: return undefined; } @@ -65020,7 +66162,7 @@ var ts; if (isDeclarationNameOrImportPropertyName(node)) { var symbol = getSymbolAtLocation(node); if (symbol) { - return ts.isTypeOnlyImportOrExportName(node) ? getDeclaredTypeOfSymbol(symbol) : getTypeOfSymbol(symbol); + return getTypeOfSymbol(symbol); } return errorType; } @@ -65239,7 +66381,7 @@ var ts; var symbol = getReferencedValueSymbol(node); // We should only get the declaration of an alias if there isn't a local value // declaration for the symbol - if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */)) { + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !getTypeOnlyAliasDeclaration(symbol)) { return getDeclarationOfAliasSymbol(symbol); } } @@ -65320,11 +66462,13 @@ var ts; function isValueAliasDeclaration(node) { switch (node.kind) { case 253 /* ImportEqualsDeclaration */: + return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); case 255 /* ImportClause */: case 256 /* NamespaceImport */: case 258 /* ImportSpecifier */: case 263 /* ExportSpecifier */: - return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); + var symbol = getSymbolOfNode(node) || unknownSymbol; + return isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol); case 260 /* ExportDeclaration */: var exportClause = node.exportClause; return !!exportClause && (ts.isNamespaceExport(exportClause) || @@ -65359,14 +66503,15 @@ var ts; return isConstEnumSymbol(s) || !!s.constEnumOnlyModule; } function isReferencedAliasDeclaration(node, checkChildren) { - if (ts.isAliasSymbolDeclaration(node)) { + if (isAliasSymbolDeclaration(node)) { var symbol = getSymbolOfNode(node); if (symbol && getSymbolLinks(symbol).referenced) { return true; } var target = getSymbolLinks(symbol).target; // TODO: GH#18217 if (target && ts.getModifierFlags(node) & 1 /* Export */ && - target.flags & 111551 /* Value */ && (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { + target.flags & 111551 /* Value */ && + (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { // An `export import ... =` of a value symbol is always considered referenced return true; } @@ -65610,6 +66755,9 @@ var ts; var type = getTypeOfSymbol(getSymbolOfNode(node)); return literalTypeToNode(type, node, tracker); } + function getJsxFactoryEntity(location) { + return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; + } function createResolver() { // this variable and functions that use it are deliberately moved here from the outer scope // to avoid scope pollution @@ -65680,7 +66828,7 @@ var ts; var symbol = node && getSymbolOfNode(node); return !!(symbol && ts.getCheckFlags(symbol) & 4096 /* Late */); }, - getJsxFactoryEntity: function (location) { return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; }, + getJsxFactoryEntity: getJsxFactoryEntity, getAllAccessorDeclarations: function (accessor) { accessor = ts.getParseTreeNode(accessor, ts.isGetOrSetAccessorDeclaration); // TODO: GH#18217 var otherKind = accessor.kind === 164 /* SetAccessor */ ? 163 /* GetAccessor */ : 164 /* SetAccessor */; @@ -65946,7 +67094,7 @@ var ts; var helpersModule = resolveHelpersModule(sourceFile, location); if (helpersModule !== unknownSymbol) { var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (var helper = 1 /* FirstEmitHelper */; helper <= 524288 /* LastEmitHelper */; helper <<= 1) { + for (var helper = 1 /* FirstEmitHelper */; helper <= 1048576 /* LastEmitHelper */; helper <<= 1) { if (uncheckedHelpers & helper) { var name = getHelperName(helper); var symbol = getSymbol(helpersModule.exports, ts.escapeLeadingUnderscores(name), 111551 /* Value */); @@ -65982,6 +67130,7 @@ var ts; case 131072 /* MakeTemplateObject */: return "__makeTemplateObject"; case 262144 /* ClassPrivateFieldGet */: return "__classPrivateFieldGet"; case 524288 /* ClassPrivateFieldSet */: return "__classPrivateFieldSet"; + case 1048576 /* CreateBinding */: return "__createBinding"; default: return ts.Debug.fail("Unrecognized helper"); } } @@ -66065,6 +67214,9 @@ var ts; return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract"); } } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + } flags |= ts.modifierToFlag(modifier.kind); break; case 120 /* StaticKeyword */: @@ -66147,6 +67299,9 @@ var ts; else if ((node.parent.flags & 8388608 /* Ambient */) && node.parent.kind === 250 /* ModuleBlock */) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); + } flags |= 2 /* Ambient */; lastDeclare = modifier; break; @@ -66172,7 +67327,7 @@ var ts; } } if (ts.isNamedDeclaration(node) && node.name.kind === 76 /* PrivateIdentifier */) { - return grammarErrorOnNode(node, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); } flags |= 128 /* Abstract */; break; @@ -66215,9 +67370,6 @@ var ts; else if (node.kind === 156 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } - else if (ts.isNamedDeclaration(node) && (flags & 28 /* AccessibilityModifier */) && node.name.kind === 76 /* PrivateIdentifier */) { - return grammarErrorOnNode(node, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); - } if (flags & 256 /* Async */) { return checkGrammarAsyncModifier(node, lastAsync); } @@ -66750,7 +67902,7 @@ var ts; if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } - var parameter = ts.Debug.assertDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); + var parameter = ts.Debug.checkDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); } @@ -67209,10 +68361,10 @@ var ts; // this has already been reported, and don't report if it has. // if (node.parent.kind === 223 /* Block */ || node.parent.kind === 250 /* ModuleBlock */ || node.parent.kind === 290 /* SourceFile */) { - var links_1 = getNodeLinks(node.parent); + var links_2 = getNodeLinks(node.parent); // Check if the containing block ever report this error - if (!links_1.hasReportedStatementInAmbientContext) { - return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); + if (!links_2.hasReportedStatementInAmbientContext) { + return links_2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); } } else { @@ -67648,6 +68800,9 @@ var ts; ts.getGeneratedNameForNode = getGeneratedNameForNode; // Private Identifiers function createPrivateIdentifier(text) { + if (text[0] !== "#") { + ts.Debug.fail("First character of private identifier must be #: " + text); + } var node = createSynthesizedNode(76 /* PrivateIdentifier */); node.escapedText = ts.escapeLeadingUnderscores(text); return node; @@ -68768,7 +69923,7 @@ var ts; } var token = rawTextScanner.scan(); if (token === 23 /* CloseBracketToken */) { - token = rawTextScanner.reScanTemplateToken(); + token = rawTextScanner.reScanTemplateToken(/* isTaggedTemplate */ false); } if (rawTextScanner.isUnterminated()) { rawTextScanner.setText(undefined); @@ -69619,7 +70774,7 @@ var ts; ts.createJSDocTypeExpression = createJSDocTypeExpression; /* @internal */ function createJSDocTypeTag(typeExpression, comment) { - var tag = createJSDocTag(319 /* JSDocTypeTag */, "type"); + var tag = createJSDocTag(320 /* JSDocTypeTag */, "type"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; @@ -69627,7 +70782,7 @@ var ts; ts.createJSDocTypeTag = createJSDocTypeTag; /* @internal */ function createJSDocReturnTag(typeExpression, comment) { - var tag = createJSDocTag(317 /* JSDocReturnTag */, "returns"); + var tag = createJSDocTag(318 /* JSDocReturnTag */, "returns"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; @@ -69635,14 +70790,14 @@ var ts; ts.createJSDocReturnTag = createJSDocReturnTag; /** @internal */ function createJSDocThisTag(typeExpression) { - var tag = createJSDocTag(318 /* JSDocThisTag */, "this"); + var tag = createJSDocTag(319 /* JSDocThisTag */, "this"); tag.typeExpression = typeExpression; return tag; } ts.createJSDocThisTag = createJSDocThisTag; /* @internal */ function createJSDocParamTag(name, isBracketed, typeExpression, comment) { - var tag = createJSDocTag(316 /* JSDocParameterTag */, "param"); + var tag = createJSDocTag(317 /* JSDocParameterTag */, "param"); tag.typeExpression = typeExpression; tag.name = name; tag.isBracketed = isBracketed; @@ -70017,7 +71172,7 @@ var ts; * @param original The original statement. */ function createNotEmittedStatement(original) { - var node = createSynthesizedNode(324 /* NotEmittedStatement */); + var node = createSynthesizedNode(325 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; @@ -70029,7 +71184,7 @@ var ts; */ /* @internal */ function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(328 /* EndOfDeclarationMarker */); + var node = createSynthesizedNode(329 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -70041,7 +71196,7 @@ var ts; */ /* @internal */ function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(327 /* MergeDeclarationMarker */); + var node = createSynthesizedNode(328 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -70056,7 +71211,7 @@ var ts; * @param location The location for the expression. Defaults to the positions from "original" if provided. */ function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(325 /* PartiallyEmittedExpression */); + var node = createSynthesizedNode(326 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; setTextRange(node, original); @@ -70072,7 +71227,7 @@ var ts; ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function flattenCommaElements(node) { if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) { - if (node.kind === 326 /* CommaListExpression */) { + if (node.kind === 327 /* CommaListExpression */) { return node.elements; } if (ts.isBinaryExpression(node) && node.operatorToken.kind === 27 /* CommaToken */) { @@ -70082,7 +71237,7 @@ var ts; return node; } function createCommaList(elements) { - var node = createSynthesizedNode(326 /* CommaListExpression */); + var node = createSynthesizedNode(327 /* CommaListExpression */); node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements)); return node; } @@ -70095,7 +71250,7 @@ var ts; ts.updateCommaList = updateCommaList; /* @internal */ function createSyntheticReferenceExpression(expression, thisArg) { - var node = createSynthesizedNode(329 /* SyntheticReferenceExpression */); + var node = createSynthesizedNode(330 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; return node; @@ -70141,6 +71296,8 @@ var ts; ts.importDefaultHelper, ts.classPrivateFieldGetHelper, ts.classPrivateFieldSetHelper, + ts.createBindingHelper, + ts.setModuleDefaultHelper ], function (helper) { return helper.name; })); } function createUnparsedSource() { @@ -70169,7 +71326,7 @@ var ts; stripInternal = mapTextOrStripInternal; bundleFileInfo = mapPathOrType === "js" ? textOrInputFiles.buildInfo.bundle.js : textOrInputFiles.buildInfo.bundle.dts; if (node.oldFileOfCurrentEmit) { - parseOldFileOfCurrentEmit(node, ts.Debug.assertDefined(bundleFileInfo)); + parseOldFileOfCurrentEmit(node, ts.Debug.checkDefined(bundleFileInfo)); return node; } } @@ -70334,13 +71491,13 @@ var ts; }; node.javascriptPath = declarationTextOrJavascriptPath; node.javascriptMapPath = javascriptMapPath; - node.declarationPath = ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath); + node.declarationPath = ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath); node.declarationMapPath = declarationMapPath; node.buildInfoPath = declarationMapTextOrBuildInfoPath; Object.defineProperties(node, { javascriptText: { get: function () { return definedTextGetter_1(declarationTextOrJavascriptPath); } }, javascriptMapText: { get: function () { return textGetter_1(javascriptMapPath); } }, - declarationText: { get: function () { return definedTextGetter_1(ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath)); } }, + declarationText: { get: function () { return definedTextGetter_1(ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath)); } }, declarationMapText: { get: function () { return textGetter_1(declarationMapPath); } }, buildInfo: { get: function () { return getAndCacheBuildInfo_1(function () { return textGetter_1(declarationMapTextOrBuildInfoPath); }); } } }); @@ -70923,8 +72080,8 @@ var ts; argumentsList.push(ts.createNull()); } if (children.length > 1) { - for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { - var child = children_1[_i]; + for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { + var child = children_2[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -70943,8 +72100,8 @@ var ts; argumentsList.push(ts.createNull()); if (children && children.length > 0) { if (children.length > 1) { - for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { - var child = children_2[_i]; + for (var _i = 0, children_3 = children; _i < children_3.length; _i++) { + var child = children_3[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -70995,10 +72152,10 @@ var ts; name: "typescript:spread", importName: "__spread", scoped: false, + dependencies: [ts.readHelper], text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };" }; function createSpreadHelper(context, argumentList, location) { - context.requestEmitHelper(ts.readHelper); context.requestEmitHelper(ts.spreadHelper); return ts.setTextRange(ts.createCall(getUnscopedHelperName("__spread"), /*typeArguments*/ undefined, argumentList), location); @@ -71858,7 +73015,7 @@ var ts; case 195 /* ElementAccessExpression */: case 194 /* PropertyAccessExpression */: case 218 /* NonNullExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: node = node.expression; continue; } @@ -71875,7 +73032,7 @@ var ts; ts.parenthesizeConciseBody = parenthesizeConciseBody; function isCommaSequence(node) { return node.kind === 209 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || - node.kind === 326 /* CommaListExpression */; + node.kind === 327 /* CommaListExpression */; } ts.isCommaSequence = isCommaSequence; var OuterExpressionKinds; @@ -71894,7 +73051,7 @@ var ts; case 217 /* AsExpression */: case 218 /* NonNullExpression */: return (kinds & 2 /* Assertions */) !== 0; - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return (kinds & 4 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -71931,7 +73088,7 @@ var ts; case 199 /* TypeAssertionExpression */: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression); case 217 /* AsExpression */: return ts.updateAsExpression(outerExpression, expression, outerExpression.type); case 218 /* NonNullExpression */: return ts.updateNonNullExpression(outerExpression, expression); - case 325 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); + case 326 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); } } /** @@ -72804,9 +73961,9 @@ var ts; case 290 /* SourceFile */: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression)); default: // No need to visit nodes with no children. @@ -72863,7 +74020,7 @@ var ts; case 224 /* EmptyStatement */: case 215 /* OmittedExpression */: case 241 /* DebuggerStatement */: - case 324 /* NotEmittedStatement */: + case 325 /* NotEmittedStatement */: // No need to visit nodes with no children. break; // Names @@ -73247,10 +74404,10 @@ var ts; result = reduceNodes(node.statements, cbNodes, result); break; // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: result = reduceNode(node.expression, cbNode, result); break; - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: result = reduceNodes(node.elements, cbNodes, result); break; default: @@ -74251,10 +75408,12 @@ var ts; // list contains nothing but prologue directives (or empty) - exit return index; } - var statement = statements[index]; - if (statement.kind === 226 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { - result.push(ts.visitNode(statement, visitor, ts.isStatement)); - return index + 1; + var superIndex = ts.findIndex(statements, function (s) { return ts.isExpressionStatement(s) && ts.isSuperCall(s.expression); }, index); + if (superIndex > -1) { + for (var i = index; i <= superIndex; i++) { + result.push(ts.visitNode(statements[i], visitor, ts.isStatement)); + } + return superIndex + 1; } return index; } @@ -74587,7 +75746,7 @@ var ts; && !(element.transformFlags & (8192 /* ContainsRestOrSpread */ | 16384 /* ContainsObjectRestOrSpread */)) && !(ts.getTargetOfBindingOrAssignmentElement(element).transformFlags & (8192 /* ContainsRestOrSpread */ | 16384 /* ContainsObjectRestOrSpread */)) && !ts.isComputedPropertyName(propertyName)) { - bindingElements = ts.append(bindingElements, element); + bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor)); } else { if (bindingElements) { @@ -74805,6 +75964,96 @@ var ts; })(ts || (ts = {})); /*@internal*/ var ts; +(function (ts) { + var ProcessLevel; + (function (ProcessLevel) { + ProcessLevel[ProcessLevel["LiftRestriction"] = 0] = "LiftRestriction"; + ProcessLevel[ProcessLevel["All"] = 1] = "All"; + })(ProcessLevel = ts.ProcessLevel || (ts.ProcessLevel = {})); + function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) { + // Visit the tag expression + var tag = ts.visitNode(node.tag, visitor, ts.isExpression); + // Build up the template arguments and the raw and cooked strings for the template. + // We start out with 'undefined' for the first argument and revisit later + // to avoid walking over the template string twice and shifting all our arguments over after the fact. + var templateArguments = [undefined]; + var cookedStrings = []; + var rawStrings = []; + var template = node.template; + if (level === ProcessLevel.LiftRestriction && !ts.hasInvalidEscape(template)) + return node; + if (ts.isNoSubstitutionTemplateLiteral(template)) { + cookedStrings.push(createTemplateCooked(template)); + rawStrings.push(getRawLiteral(template, currentSourceFile)); + } + else { + cookedStrings.push(createTemplateCooked(template.head)); + rawStrings.push(getRawLiteral(template.head, currentSourceFile)); + for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { + var templateSpan = _a[_i]; + cookedStrings.push(createTemplateCooked(templateSpan.literal)); + rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile)); + templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); + } + } + var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); + // Create a variable to cache the template object if we're in a module. + // Do not do this in the global scope, as any variable we currently generate could conflict with + // variables from outside of the current compilation. In the future, we can revisit this behavior. + if (ts.isExternalModule(currentSourceFile)) { + var tempVar = ts.createUniqueName("templateObject"); + recordTaggedTemplateString(tempVar); + templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); + } + else { + templateArguments[0] = helperCall; + } + return ts.createCall(tag, /*typeArguments*/ undefined, templateArguments); + } + ts.processTaggedTemplateExpression = processTaggedTemplateExpression; + function createTemplateCooked(template) { + return template.templateFlags ? ts.createIdentifier("undefined") : ts.createLiteral(template.text); + } + /** + * Creates an ES5 compatible literal from an ES6 template literal. + * + * @param node The ES6 template literal. + */ + function getRawLiteral(node, currentSourceFile) { + // Find original source text, since we need to emit the raw strings of the tagged template. + // The raw strings contain the (escaped) strings of what the user wrote. + // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". + var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), + // thus we need to remove those characters. + // First template piece starts with "`", others with "}" + // Last template piece ends with "`", others with "${" + var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + // Newline normalization: + // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's + // and LineTerminatorSequences are normalized to for both TV and TRV. + text = text.replace(/\r\n?/g, "\n"); + return ts.setTextRange(ts.createLiteral(text), node); + } + function createTemplateObjectHelper(context, cooked, raw) { + context.requestEmitHelper(ts.templateObjectHelper); + return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), + /*typeArguments*/ undefined, [ + cooked, + raw + ]); + } + ts.templateObjectHelper = { + name: "typescript:makeTemplateObject", + importName: "__makeTemplateObject", + scoped: false, + priority: 0, + text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" + }; +})(ts || (ts = {})); +/*@internal*/ +var ts; (function (ts) { /** * Indicates whether to emit type metadata in the new format. @@ -74829,10 +76078,9 @@ var ts; ClassFacts[ClassFacts["IsNamedExternalExport"] = 16] = "IsNamedExternalExport"; ClassFacts[ClassFacts["IsDefaultExternalExport"] = 32] = "IsDefaultExternalExport"; ClassFacts[ClassFacts["IsDerivedClass"] = 64] = "IsDerivedClass"; - ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 128] = "UseImmediatelyInvokedFunctionExpression"; ClassFacts[ClassFacts["HasAnyDecorators"] = 6] = "HasAnyDecorators"; ClassFacts[ClassFacts["NeedsName"] = 5] = "NeedsName"; - ClassFacts[ClassFacts["MayNeedImmediatelyInvokedFunctionExpression"] = 7] = "MayNeedImmediatelyInvokedFunctionExpression"; + ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 7] = "UseImmediatelyInvokedFunctionExpression"; ClassFacts[ClassFacts["IsExported"] = 56] = "IsExported"; })(ClassFacts || (ClassFacts = {})); function transformTypeScript(context) { @@ -75315,8 +76563,6 @@ var ts; facts |= 32 /* IsDefaultExternalExport */; else if (isNamedExternalModuleExport(node)) facts |= 16 /* IsNamedExternalExport */; - if (languageVersion <= 1 /* ES5 */ && (facts & 7 /* MayNeedImmediatelyInvokedFunctionExpression */)) - facts |= 128 /* UseImmediatelyInvokedFunctionExpression */; return facts; } function hasTypeScriptClassSyntax(node) { @@ -75334,7 +76580,7 @@ var ts; } var staticProperties = ts.getProperties(node, /*requireInitializer*/ true, /*isStatic*/ true); var facts = getClassFacts(node, staticProperties); - if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) { + if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */) { context.startLexicalEnvironment(); } var name = node.name || (facts & 5 /* NeedsName */ ? ts.getGeneratedNameForNode(node) : undefined); @@ -75346,7 +76592,7 @@ var ts; addClassElementDecorationStatements(statements, node, /*isStatic*/ false); addClassElementDecorationStatements(statements, node, /*isStatic*/ true); addConstructorDecorationStatement(statements, node); - if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) { + if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */) { // When we emit a TypeScript class down to ES5, we must wrap it in an IIFE so that the // 'es2015' transformer can properly nest static initializers and decorators. The result // looks something like: @@ -75372,11 +76618,16 @@ var ts; ts.insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment()); var iife = ts.createImmediatelyInvokedArrowFunction(statements); ts.setEmitFlags(iife, 33554432 /* TypeScriptClassWrapper */); + // Class comment is already added by the ES2015 transform when targeting ES5 or below. + // Only add if targetting ES2015+ to prevent duplicates + if (languageVersion > 1 /* ES5 */) { + ts.addSyntheticLeadingComment(iife, 3 /* MultiLineCommentTrivia */, "* @class "); + } var varStatement = ts.createVariableStatement( /*modifiers*/ undefined, ts.createVariableDeclarationList([ ts.createVariableDeclaration(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false), /*type*/ undefined, iife) - ])); + ], languageVersion > 1 /* ES5 */ ? 2 /* Const */ : undefined)); ts.setOriginalNode(varStatement, node); ts.setCommentRange(varStatement, node); ts.setSourceMapRange(varStatement, ts.moveRangePastDecorators(node)); @@ -75389,7 +76640,7 @@ var ts; if (facts & 8 /* IsExportOfNamespace */) { addExportMemberAssignment(statements, node); } - else if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) { + else if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) { if (facts & 32 /* IsDefaultExternalExport */) { statements.push(ts.createExportDefault(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))); } @@ -75416,7 +76667,7 @@ var ts; // ${members} // } // we do not emit modifiers on the declaration if we are emitting an IIFE - var modifiers = !(facts & 128 /* UseImmediatelyInvokedFunctionExpression */) + var modifiers = !(facts & 7 /* UseImmediatelyInvokedFunctionExpression */) ? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier) : undefined; var classDeclaration = ts.createClassDeclaration( @@ -77124,7 +78375,7 @@ var ts; return undefined; } // Elide the export declaration if all of its named exports are elided. - var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedImportBindings); + var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedExportBindings); return exportClause ? ts.updateExportDeclaration(node, /*decorators*/ undefined, @@ -77893,7 +79144,7 @@ var ts; /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass)); if (ts.some(staticProperties) || ts.some(pendingExpressions)) { if (isDecoratedClassDeclaration) { - ts.Debug.assertDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); + ts.Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); // Write any pending expressions from elided or moved computed property names if (pendingStatements && pendingExpressions && ts.some(pendingExpressions)) { pendingStatements.push(ts.createExpressionStatement(ts.inlineExpressions(pendingExpressions))); @@ -78981,6 +80232,8 @@ var ts; var enclosingFunctionFlags; var enclosingSuperContainerFlags = 0; var hasLexicalThis; + var currentSourceFile; + var taggedTemplateStringDeclarations; /** Keeps track of property names accessed on super (`super.x`) within async functions. */ var capturedSuperProperties; /** Whether the async function contains an element access on super (`super[x]`). */ @@ -78988,14 +80241,18 @@ var ts; /** A set of node IDs for generated super accessors. */ var substitutedSuperAccessors = []; return ts.chainBundle(transformSourceFile); + function recordTaggedTemplateString(temp) { + taggedTemplateStringDeclarations = ts.append(taggedTemplateStringDeclarations, ts.createVariableDeclaration(temp)); + } function transformSourceFile(node) { if (node.isDeclarationFile) { return node; } - exportedVariableStatement = false; - hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); - var visited = ts.visitEachChild(node, visitor, context); + currentSourceFile = node; + var visited = visitSourceFile(node); ts.addEmitHelpers(visited, context.readEmitHelpers()); + currentSourceFile = undefined; + taggedTemplateStringDeclarations = undefined; return visited; } function visitor(node) { @@ -79071,6 +80328,8 @@ var ts; return visitExpressionStatement(node); case 200 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, noDestructuringValue); + case 198 /* TaggedTemplateExpression */: + return visitTaggedTemplateExpression(node); case 194 /* PropertyAccessExpression */: if (capturedSuperProperties && ts.isPropertyAccessExpression(node) && node.expression.kind === 102 /* SuperKeyword */) { capturedSuperProperties.set(node.name.escapedText, true); @@ -79193,6 +80452,18 @@ var ts; function visitParenthesizedExpression(node, noDestructuringValue) { return ts.visitEachChild(node, noDestructuringValue ? visitorNoDestructuringValue : visitor, context); } + function visitSourceFile(node) { + exportedVariableStatement = false; + hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); + var visited = ts.visitEachChild(node, visitor, context); + var statement = ts.concatenate(visited.statements, taggedTemplateStringDeclarations && [ + ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList(taggedTemplateStringDeclarations)) + ]); + return ts.updateSourceFileNode(visited, ts.setTextRange(ts.createNodeArray(statement), node.statements)); + } + function visitTaggedTemplateExpression(node) { + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.LiftRestriction); + } /** * Visits a BinaryExpression that contains a destructuring assignment. * @@ -79679,10 +80950,10 @@ var ts; name: "typescript:asyncGenerator", importName: "__asyncGenerator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n 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); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };" }; function createAsyncGeneratorHelper(context, generatorFunc, hasLexicalThis) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncGeneratorHelper); // Mark this node as originally an async function (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* AsyncFunctionBody */; @@ -79697,10 +80968,10 @@ var ts; name: "typescript:asyncDelegator", importName: "__asyncDelegator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n };" }; function createAsyncDelegatorHelper(context, expression, location) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncDelegator); return ts.setTextRange(ts.createCall(ts.getUnscopedHelperName("__asyncDelegator"), /*typeArguments*/ undefined, [expression]), location); @@ -81947,10 +83218,15 @@ var ts; } return ts.visitEachChild(node, visitor, context); } + function isVariableStatementOfTypeScriptClassWrapper(node) { + return node.declarationList.declarations.length === 1 + && !!node.declarationList.declarations[0].initializer + && !!(ts.getEmitFlags(node.declarationList.declarations[0].initializer) & 33554432 /* TypeScriptClassWrapper */); + } function visitVariableStatement(node) { var ancestorFacts = enterSubtree(0 /* None */, ts.hasModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); var updated; - if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0) { + if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { // we are inside a converted loop - hoist variable declarations var assignments = void 0; for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { @@ -83102,7 +84378,11 @@ var ts; // The class statements are the statements generated by visiting the first statement with initializer of the // body (1), while all other statements are added to remainingStatements (2) var isVariableStatementWithInitializer = function (stmt) { return ts.isVariableStatement(stmt) && !!ts.first(stmt.declarationList.declarations).initializer; }; + // visit the class body statements outside of any converted loop body. + var savedConvertedLoopState = convertedLoopState; + convertedLoopState = undefined; var bodyStatements = ts.visitNodes(body.statements, visitor, ts.isStatement); + convertedLoopState = savedConvertedLoopState; var classStatements = ts.filter(bodyStatements, isVariableStatementWithInitializer); var remainingStatements = ts.filter(bodyStatements, function (stmt) { return !isVariableStatementWithInitializer(stmt); }); var varStatement = ts.cast(ts.first(classStatements), ts.isVariableStatement); @@ -83359,67 +84639,7 @@ var ts; * @param node A TaggedTemplateExpression node. */ function visitTaggedTemplateExpression(node) { - // Visit the tag expression - var tag = ts.visitNode(node.tag, visitor, ts.isExpression); - // Build up the template arguments and the raw and cooked strings for the template. - // We start out with 'undefined' for the first argument and revisit later - // to avoid walking over the template string twice and shifting all our arguments over after the fact. - var templateArguments = [undefined]; - var cookedStrings = []; - var rawStrings = []; - var template = node.template; - if (ts.isNoSubstitutionTemplateLiteral(template)) { - cookedStrings.push(ts.createLiteral(template.text)); - rawStrings.push(getRawLiteral(template)); - } - else { - cookedStrings.push(ts.createLiteral(template.head.text)); - rawStrings.push(getRawLiteral(template.head)); - for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { - var templateSpan = _a[_i]; - cookedStrings.push(ts.createLiteral(templateSpan.literal.text)); - rawStrings.push(getRawLiteral(templateSpan.literal)); - templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); - } - } - var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); - // Create a variable to cache the template object if we're in a module. - // Do not do this in the global scope, as any variable we currently generate could conflict with - // variables from outside of the current compilation. In the future, we can revisit this behavior. - if (ts.isExternalModule(currentSourceFile)) { - var tempVar = ts.createUniqueName("templateObject"); - recordTaggedTemplateString(tempVar); - templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); - } - else { - templateArguments[0] = helperCall; - } - return ts.createCall(tag, /*typeArguments*/ undefined, templateArguments); - } - /** - * Creates an ES5 compatible literal from an ES6 template literal. - * - * @param node The ES6 template literal. - */ - function getRawLiteral(node) { - // Find original source text, since we need to emit the raw strings of the tagged template. - // The raw strings contain the (escaped) strings of what the user wrote. - // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". - var text = node.rawText; - if (text === undefined) { - text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), - // thus we need to remove those characters. - // First template piece starts with "`", others with "}" - // Last template piece ends with "`", others with "${" - var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; - text = text.substring(1, text.length - (isLast ? 1 : 2)); - } - // Newline normalization: - // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's - // and LineTerminatorSequences are normalized to for both TV and TRV. - text = text.replace(/\r\n?/g, "\n"); - return ts.setTextRange(ts.createLiteral(text), node); + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.All); } /** * Visits a TemplateExpression node. @@ -83712,14 +84932,6 @@ var ts; ts.createFileLevelUniqueName("_super") ]); } - function createTemplateObjectHelper(context, cooked, raw) { - context.requestEmitHelper(ts.templateObjectHelper); - return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), - /*typeArguments*/ undefined, [ - cooked, - raw - ]); - } ts.extendsHelper = { name: "typescript:extends", importName: "__extends", @@ -83727,13 +84939,6 @@ var ts; priority: 0, text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();" }; - ts.templateObjectHelper = { - name: "typescript:makeTemplateObject", - importName: "__makeTemplateObject", - scoped: false, - priority: 0, - text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" - }; })(ts || (ts = {})); /*@internal*/ var ts; @@ -86547,7 +87752,7 @@ var ts; startLexicalEnvironment(); var statements = []; var ensureUseStrict = ts.getStrictOptionValue(compilerOptions, "alwaysStrict") || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile)); - var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor); + var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict && !ts.isJsonSourceFile(node), sourceElementVisitor); if (shouldEmitUnderscoreUnderscoreESModule()) { ts.append(statements, createUnderscoreUnderscoreESModule()); } @@ -86556,11 +87761,6 @@ var ts; addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false); ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements)); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - ts.addEmitHelper(updated, exportStarHelper); - } ts.addEmitHelpers(updated, context.readEmitHelpers()); return updated; } @@ -86782,11 +87982,6 @@ var ts; // and merge any new lexical declarations. ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var body = ts.createBlock(statements, /*multiLine*/ true); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - ts.addEmitHelper(body, exportStarHelper); - } if (needUMDDynamicImportHelper) { ts.addEmitHelper(body, dynamicImportUMDHelper); } @@ -86843,9 +88038,9 @@ var ts; return visitFunctionDeclaration(node); case 245 /* ClassDeclaration */: return visitClassDeclaration(node); - case 327 /* MergeDeclarationMarker */: + case 328 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 328 /* EndOfDeclarationMarker */: + case 329 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return ts.visitEachChild(node, moduleExpressionElementVisitor, context); @@ -87203,8 +88398,13 @@ var ts; } for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) { var specifier = _a[_i]; - var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); - statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue)), specifier), specifier)); + if (languageVersion === 0 /* ES3 */) { + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createCreateBindingHelper(context, generatedName, ts.createLiteral(specifier.propertyName || specifier.name), specifier.propertyName ? ts.createLiteral(specifier.name) : undefined)), specifier), specifier)); + } + else { + var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue, /* location */ undefined, /* liveBinding */ true)), specifier), specifier)); + } } return ts.singleOrMany(statements); } @@ -87307,7 +88507,6 @@ var ts; if (ts.hasModifier(node, 1 /* Export */)) { var modifiers = void 0; // If we're exporting these variables, then these just become assignments to 'exports.x'. - // We only want to emit assignments for variables with initializers. for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var variable = _a[_i]; if (ts.isIdentifier(variable.name) && ts.isLocalName(variable.name)) { @@ -87316,7 +88515,7 @@ var ts; } variables = ts.append(variables, variable); } - else if (variable.initializer) { + else { expressions = ts.append(expressions, transformInitializedVariable(variable)); } } @@ -87368,7 +88567,7 @@ var ts; } else { return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name), - /*location*/ node.name), ts.visitNode(node.initializer, moduleExpressionElementVisitor)); + /*location*/ node.name), node.initializer ? ts.visitNode(node.initializer, moduleExpressionElementVisitor) : ts.createVoidZero()); } } /** @@ -87446,7 +88645,7 @@ var ts; case 257 /* NamedImports */: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; - statements = appendExportsOfDeclaration(statements, importBinding); + statements = appendExportsOfDeclaration(statements, importBinding, /* liveBinding */ true); } break; } @@ -87543,13 +88742,13 @@ var ts; * appended. * @param decl The declaration to export. */ - function appendExportsOfDeclaration(statements, decl) { + function appendExportsOfDeclaration(statements, decl, liveBinding) { var name = ts.getDeclarationName(decl); var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(ts.idText(name)); if (exportSpecifiers) { for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) { var exportSpecifier = exportSpecifiers_1[_i]; - statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name); + statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name, /* allowComments */ undefined, liveBinding); } } return statements; @@ -87566,8 +88765,8 @@ var ts; * @param location The location to use for source maps and comments for the export. * @param allowComments Whether to allow comments on the export. */ - function appendExportStatement(statements, exportName, expression, location, allowComments) { - statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments)); + function appendExportStatement(statements, exportName, expression, location, allowComments, liveBinding) { + statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); return statements; } function createUnderscoreUnderscoreESModule() { @@ -87596,8 +88795,8 @@ var ts; * @param location The location to use for source maps and comments for the export. * @param allowComments An optional value indicating whether to emit comments for the statement. */ - function createExportStatement(name, value, location, allowComments) { - var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value)), location); + function createExportStatement(name, value, location, allowComments, liveBinding) { + var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value, /* location */ undefined, liveBinding)), location); ts.startOnNewLine(statement); if (!allowComments) { ts.setEmitFlags(statement, 1536 /* NoComments */); @@ -87611,8 +88810,22 @@ var ts; * @param value The exported value. * @param location The location to use for source maps and comments for the export. */ - function createExportExpression(name, value, location) { - return ts.setTextRange(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); + function createExportExpression(name, value, location, liveBinding) { + return ts.setTextRange(liveBinding && languageVersion !== 0 /* ES3 */ ? ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ undefined, [ + ts.createIdentifier("exports"), + ts.createLiteral(name), + ts.createObjectLiteral([ + ts.createPropertyAssignment("enumerable", ts.createLiteral(/*value*/ true)), + ts.createPropertyAssignment("get", ts.createFunctionExpression( + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + /*parameters*/ [], + /*type*/ undefined, ts.createBlock([ts.createReturn(value)]))) + ]) + ]) : ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); } // // Modifier Visitors @@ -87837,17 +89050,36 @@ var ts; } } ts.transformModule = transformModule; + ts.createBindingHelper = { + name: "typescript:commonjscreatebinding", + importName: "__createBinding", + scoped: false, + priority: 1, + text: "\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));" + }; + function createCreateBindingHelper(context, module, inputName, outputName) { + context.requestEmitHelper(ts.createBindingHelper); + return ts.createCall(ts.getUnscopedHelperName("__createBinding"), /*typeArguments*/ undefined, __spreadArrays([ts.createIdentifier("exports"), module, inputName], (outputName ? [outputName] : []))); + } + ts.setModuleDefaultHelper = { + name: "typescript:commonjscreatevalue", + importName: "__setModuleDefault", + scoped: false, + priority: 1, + text: "\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});" + }; // emit output for the __export helper function var exportStarHelper = { name: "typescript:export-star", - scoped: true, - text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }" + importName: "__exportStar", + scoped: false, + dependencies: [ts.createBindingHelper], + priority: 2, + text: "\n var __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p);\n }" }; function createExportStarHelper(context, module) { - var compilerOptions = context.getCompilerOptions(); - return compilerOptions.importHelpers - ? ts.createCall(ts.getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]) - : ts.createCall(ts.createIdentifier("__export"), /*typeArguments*/ undefined, [module]); + context.requestEmitHelper(exportStarHelper); + return ts.createCall(ts.getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]); } // emit helper for dynamic import var dynamicImportUMDHelper = { @@ -87860,7 +89092,9 @@ var ts; name: "typescript:commonjsimportstar", importName: "__importStar", scoped: false, - text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};" + dependencies: [ts.createBindingHelper, ts.setModuleDefaultHelper], + priority: 2, + text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};" }; // emit helper for `import Name from "foo"` ts.importDefaultHelper = { @@ -88324,7 +89558,7 @@ var ts; return ts.singleOrMany(statements); } function visitExportDeclaration(node) { - ts.Debug.assertDefined(node); + ts.Debug.assertIsDefined(node); return undefined; } /** @@ -88820,9 +90054,9 @@ var ts; return visitCatchClause(node); case 223 /* Block */: return visitBlock(node); - case 327 /* MergeDeclarationMarker */: + case 328 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 328 /* EndOfDeclarationMarker */: + case 329 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return destructuringAndImportCallVisitor(node); @@ -89433,7 +90667,9 @@ var ts; */ function onEmitNode(hint, node, emitCallback) { if (ts.isSourceFile(node)) { - helperNameSubstitutions = ts.createMap(); + if ((ts.isExternalModule(node) || compilerOptions.isolatedModules) && compilerOptions.importHelpers) { + helperNameSubstitutions = ts.createMap(); + } previousOnEmitNode(hint, node, emitCallback); helperNameSubstitutions = undefined; } @@ -90231,7 +91467,7 @@ var ts; ts.forEach(sourceFile.libReferenceDirectives, function (ref) { var lib = host.getLibFileFromReference(ref); if (lib) { - ret.set(ref.fileName.toLocaleLowerCase(), true); + ret.set(ts.toFileNameLowerCase(ref.fileName), true); } }); return ret; @@ -91314,7 +92550,7 @@ var ts; * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files. */ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(330 /* Count */); + var enabledSyntaxKindFeatures = new Array(331 /* Count */); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -91387,6 +92623,7 @@ var ts; transformed: transformed, substituteNode: substituteNode, emitNodeWithNotification: emitNodeWithNotification, + isEmitNotificationEnabled: isEmitNotificationEnabled, dispose: dispose, diagnostics: diagnostics }; @@ -91443,6 +92680,8 @@ var ts; function emitNodeWithNotification(hint, node, emitCallback) { ts.Debug.assert(state < 3 /* Disposed */, "Cannot invoke TransformationResult callbacks after the result is disposed."); if (node) { + // TODO: Remove check and unconditionally use onEmitNode when API is breakingly changed + // (see https://github.com/microsoft/TypeScript/pull/36248/files/5062623f39120171b98870c71344b3242eb03d23#r369766739) if (isEmitNotificationEnabled(node)) { onEmitNode(hint, node, emitCallback); } @@ -91549,6 +92788,12 @@ var ts; ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the transformation context during initialization."); ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed."); ts.Debug.assert(!helper.scoped, "Cannot request a scoped emit helper."); + if (helper.dependencies) { + for (var _i = 0, _a = helper.dependencies; _i < _a.length; _i++) { + var h = _a[_i]; + requestEmitHelper(h); + } + } emitHelpers = ts.append(emitHelpers, helper); } function readEmitHelpers() { @@ -91712,7 +92957,7 @@ var ts; } ts.getOutputExtension = getOutputExtension; function rootDirOfOptions(configFile) { - return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.assertDefined(configFile.options.configFilePath)); + return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.checkDefined(configFile.options.configFilePath)); } function getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, outputDir) { return outputDir ? @@ -91734,7 +92979,7 @@ var ts; ts.fileExtensionIs(inputFileName, ".tsx" /* Tsx */) && configFile.options.jsx === 1 /* Preserve */ ? ".jsx" /* Jsx */ : ".js" /* Js */); - return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.assertDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? + return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.checkDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? outputFileName : undefined; } @@ -91809,7 +93054,7 @@ var ts; function getFirstProjectOutput(configFile, ignoreCase) { if (configFile.options.outFile || configFile.options.out) { var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath; - return ts.Debug.assertDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); + return ts.Debug.checkDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); } for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) { var inputFileName = _b[_a]; @@ -91933,6 +93178,7 @@ var ts; hasGlobalName: resolver.hasGlobalName, // transform hooks onEmitNode: transform.emitNodeWithNotification, + isEmitNotificationEnabled: transform.isEmitNotificationEnabled, substituteNode: transform.substituteNode, }); ts.Debug.assert(transform.transformed.length === 1, "Should only see one output from the transform"); @@ -91985,6 +93231,7 @@ var ts; hasGlobalName: resolver.hasGlobalName, // transform hooks onEmitNode: declarationTransform.emitNodeWithNotification, + isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled, substituteNode: declarationTransform.substituteNode, }); var declBlocked = (!!declarationTransform.diagnostics && !!declarationTransform.diagnostics.length) || !!host.isEmitBlocked(declarationFilePath) || !!compilerOptions.noEmit; @@ -92095,7 +93342,7 @@ var ts; var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText); return "data:application/json;base64," + base64SourceMapText; } - var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.assertDefined(sourceMapFilePath))); + var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath))); if (mapOptions.mapRoot) { var sourceMapDir = ts.normalizeSlashes(mapOptions.mapRoot); if (sourceFile) { @@ -92179,7 +93426,7 @@ var ts; sourceFile.statements = ts.createNodeArray(); return sourceFile; }); - var jsBundle = ts.Debug.assertDefined(bundle.js); + var jsBundle = ts.Debug.checkDefined(bundle.js); ts.forEach(jsBundle.sources && jsBundle.sources.prologues, function (prologueInfo) { var sourceFile = sourceFiles[prologueInfo.file]; sourceFile.text = prologueInfo.text; @@ -92196,10 +93443,10 @@ var ts; /*@internal*/ function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) { var _a = getOutputPathsForBundle(config.options, /*forceDtsPaths*/ false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath; - var buildInfoText = host.readFile(ts.Debug.assertDefined(buildInfoPath)); + var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath)); if (!buildInfoText) return buildInfoPath; - var jsFileText = host.readFile(ts.Debug.assertDefined(jsFilePath)); + var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath)); if (!jsFileText) return jsFilePath; var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath); @@ -92297,7 +93544,7 @@ var ts; function createPrinter(printerOptions, handlers) { if (printerOptions === void 0) { printerOptions = {}; } if (handlers === void 0) { handlers = {}; } - var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; + var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, isEmitNotificationEnabled = handlers.isEmitNotificationEnabled, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; var extendedDiagnostics = !!printerOptions.extendedDiagnostics; var newLine = ts.getNewLineCharacter(printerOptions); var moduleKind = ts.getEmitModuleKind(printerOptions); @@ -92315,7 +93562,7 @@ var ts; var write = writeBase; var isOwnFileEmit; var bundleFileInfo = printerOptions.writeBundleFileInfo ? { sections: [] } : undefined; - var relativeToBuildInfo = bundleFileInfo ? ts.Debug.assertDefined(printerOptions.relativeToBuildInfo) : undefined; + var relativeToBuildInfo = bundleFileInfo ? ts.Debug.checkDefined(printerOptions.relativeToBuildInfo) : undefined; var recordInternalSection = printerOptions.recordInternalSection; var sourceFileTextPos = 0; var sourceFileTextKind = "text" /* Text */; @@ -92586,12 +93833,15 @@ var ts; return; return pipelineEmit(1 /* Expression */, node); } + function emitJsxAttributeValue(node) { + return pipelineEmit(ts.isStringLiteral(node) ? 6 /* JsxAttributeValue */ : 4 /* Unspecified */, node); + } function pipelineEmit(emitHint, node) { var savedLastNode = lastNode; var savedLastSubstitution = lastSubstitution; lastNode = node; lastSubstitution = undefined; - var pipelinePhase = getPipelinePhase(0 /* Notification */, node); + var pipelinePhase = getPipelinePhase(0 /* Notification */, emitHint, node); pipelinePhase(emitHint, node); ts.Debug.assert(lastNode === node); var substitute = lastSubstitution; @@ -92599,15 +93849,15 @@ var ts; lastSubstitution = savedLastSubstitution; return substitute || node; } - function getPipelinePhase(phase, node) { + function getPipelinePhase(phase, emitHint, node) { switch (phase) { case 0 /* Notification */: - if (onEmitNode !== ts.noEmitNotification) { + if (onEmitNode !== ts.noEmitNotification && (!isEmitNotificationEnabled || isEmitNotificationEnabled(node))) { return pipelineEmitWithNotification; } // falls through case 1 /* Substitution */: - if (substituteNode !== ts.noEmitSubstitution) { + if (substituteNode !== ts.noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node)) !== node) { return pipelineEmitWithSubstitution; } // falls through @@ -92627,12 +93877,12 @@ var ts; return ts.Debug.assertNever(phase); } } - function getNextPipelinePhase(currentPhase, node) { - return getPipelinePhase(currentPhase + 1, node); + function getNextPipelinePhase(currentPhase, emitHint, node) { + return getPipelinePhase(currentPhase + 1, emitHint, node); } function pipelineEmitWithNotification(hint, node) { ts.Debug.assert(lastNode === node); - var pipelinePhase = getNextPipelinePhase(0 /* Notification */, node); + var pipelinePhase = getNextPipelinePhase(0 /* Notification */, hint, node); onEmitNode(hint, node, pipelinePhase); ts.Debug.assert(lastNode === node); } @@ -92642,6 +93892,8 @@ var ts; return emitSourceFile(ts.cast(node, ts.isSourceFile)); if (hint === 2 /* IdentifierName */) return emitIdentifier(ts.cast(node, ts.isIdentifier)); + if (hint === 6 /* JsxAttributeValue */) + return emitLiteral(ts.cast(node, ts.isStringLiteral), /*jsxAttributeEscape*/ true); if (hint === 3 /* MappedTypeParameter */) return emitMappedTypeParameter(ts.cast(node, ts.isTypeParameterDeclaration)); if (hint === 5 /* EmbeddedStatement */) { @@ -92656,7 +93908,7 @@ var ts; case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: case 17 /* TemplateTail */: - return emitLiteral(node); + return emitLiteral(node, /*jsxAttributeEscape*/ false); case 292 /* UnparsedSource */: case 286 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); @@ -92904,27 +94156,28 @@ var ts; case 284 /* EnumMember */: return emitEnumMember(node); // JSDoc nodes (only used in codefixes currently) - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 318 /* JSDocThisTag */: - case 315 /* JSDocEnumTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 319 /* JSDocThisTag */: + case 316 /* JSDocEnumTag */: return emitJSDocSimpleTypedTag(node); + case 308 /* JSDocImplementsTag */: case 307 /* JSDocAugmentsTag */: - return emitJSDocAugmentsTag(node); - case 320 /* JSDocTemplateTag */: + return emitJSDocHeritageTag(node); + case 321 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 314 /* JSDocCallbackTag */: + case 315 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); case 305 /* JSDocSignature */: return emitJSDocSignature(node); case 304 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 309 /* JSDocClassTag */: + case 310 /* JSDocClassTag */: case 306 /* JSDocTag */: return emitJSDocSimpleTag(node); case 303 /* JSDocComment */: @@ -92950,7 +94203,7 @@ var ts; case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - return emitLiteral(node); + return emitLiteral(node, /*jsxAttributeEscape*/ false); // Identifiers case 75 /* Identifier */: return emitIdentifier(node); @@ -93026,9 +94279,9 @@ var ts; case 270 /* JsxFragment */: return emitJsxFragment(node); // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return emitCommaList(node); } } @@ -93042,8 +94295,7 @@ var ts; } function pipelineEmitWithSubstitution(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(1 /* Substitution */, node); - lastSubstitution = substituteNode(hint, node); + var pipelinePhase = getNextPipelinePhase(1 /* Substitution */, hint, node); pipelinePhase(hint, lastSubstitution); ts.Debug.assert(lastNode === node || lastSubstitution === node); } @@ -93130,7 +94382,7 @@ var ts; // SyntaxKind.NumericLiteral // SyntaxKind.BigIntLiteral function emitNumericOrBigIntLiteral(node) { - emitLiteral(node); + emitLiteral(node, /*jsxAttributeEscape*/ false); } // SyntaxKind.StringLiteral // SyntaxKind.RegularExpressionLiteral @@ -93138,8 +94390,8 @@ var ts; // SyntaxKind.TemplateHead // SyntaxKind.TemplateMiddle // SyntaxKind.TemplateTail - function emitLiteral(node) { - var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape); + function emitLiteral(node, jsxAttributeEscape) { + var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape); if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 10 /* StringLiteral */ || ts.isTemplateLiteralKind(node.kind))) { writeLiteral(text); @@ -93602,7 +94854,7 @@ var ts; expression = ts.skipPartiallyEmittedExpressions(expression); if (ts.isNumericLiteral(expression)) { // check if numeric literal is a decimal literal that was originally written with a dot - var text = getLiteralTextOfNode(expression, /*neverAsciiEscape*/ true); + var text = getLiteralTextOfNode(expression, /*neverAsciiEscape*/ true, /*jsxAttributeEscape*/ false); // If he number will be printed verbatim and it doesn't already contain a dot, add one // if the expression doesn't have any comments that will be emitted. return !expression.numericLiteralFlags && !ts.stringContains(text, ts.tokenToString(24 /* DotToken */)); @@ -93717,18 +94969,77 @@ var ts; emitExpression(node.operand); writeTokenText(node.operator, writeOperator); } + var EmitBinaryExpressionState; + (function (EmitBinaryExpressionState) { + EmitBinaryExpressionState[EmitBinaryExpressionState["EmitLeft"] = 0] = "EmitLeft"; + EmitBinaryExpressionState[EmitBinaryExpressionState["EmitRight"] = 1] = "EmitRight"; + EmitBinaryExpressionState[EmitBinaryExpressionState["FinishEmit"] = 2] = "FinishEmit"; + })(EmitBinaryExpressionState || (EmitBinaryExpressionState = {})); + /** + * emitBinaryExpression includes an embedded work stack to attempt to handle as many nested binary expressions + * as possible without creating any additional stack frames. This can only be done when the emit pipeline does + * not require notification/substitution/comment/sourcemap decorations. + */ function emitBinaryExpression(node) { - var isCommaOperator = node.operatorToken.kind !== 27 /* CommaToken */; - var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); - var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); - emitExpression(node.left); - increaseIndentIf(indentBeforeOperator, isCommaOperator); - emitLeadingCommentsOfPosition(node.operatorToken.pos); - writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 /* InKeyword */ ? writeKeyword : writeOperator); - emitTrailingCommentsOfPosition(node.operatorToken.end, /*prefixSpace*/ true); // Binary operators should have a space before the comment starts - increaseIndentIf(indentAfterOperator, /*writeSpaceIfNotIndenting*/ true); - emitExpression(node.right); - decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + var nodeStack = [node]; + var stateStack = [0 /* EmitLeft */]; + var stackIndex = 0; + while (stackIndex >= 0) { + node = nodeStack[stackIndex]; + switch (stateStack[stackIndex]) { + case 0 /* EmitLeft */: { + maybePipelineEmitExpression(node.left); + break; + } + case 1 /* EmitRight */: { + var isCommaOperator = node.operatorToken.kind !== 27 /* CommaToken */; + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + increaseIndentIf(indentBeforeOperator, isCommaOperator); + emitLeadingCommentsOfPosition(node.operatorToken.pos); + writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 /* InKeyword */ ? writeKeyword : writeOperator); + emitTrailingCommentsOfPosition(node.operatorToken.end, /*prefixSpace*/ true); // Binary operators should have a space before the comment starts + increaseIndentIf(indentAfterOperator, /*writeSpaceIfNotIndenting*/ true); + maybePipelineEmitExpression(node.right); + break; + } + case 2 /* FinishEmit */: { + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + stackIndex--; + break; + } + default: return ts.Debug.fail("Invalid state " + stateStack[stackIndex] + " for emitBinaryExpressionWorker"); + } + } + function maybePipelineEmitExpression(next) { + // Advance the state of this unit of work, + stateStack[stackIndex]++; + // Then actually do the work of emitting the node `next` returned by the prior state + // The following section should be identical to `pipelineEmit` save it assumes EmitHint.Expression and offloads + // binary expression handling, where possible, to the contained work queue + // #region trampolinePipelineEmit + var savedLastNode = lastNode; + var savedLastSubstitution = lastSubstitution; + lastNode = next; + lastSubstitution = undefined; + var pipelinePhase = getPipelinePhase(0 /* Notification */, 1 /* Expression */, next); + if (pipelinePhase === pipelineEmitWithHint && ts.isBinaryExpression(next)) { + // If the target pipeline phase is emit directly, and the next node's also a binary expression, + // skip all the intermediate indirection and push the expression directly onto the work stack + stackIndex++; + stateStack[stackIndex] = 0 /* EmitLeft */; + nodeStack[stackIndex] = next; + } + else { + pipelinePhase(1 /* Expression */, next); + } + ts.Debug.assert(lastNode === next); + lastNode = savedLastNode; + lastSubstitution = savedLastSubstitution; + // #endregion trampolinePipelineEmit + } } function emitConditionalExpression(node) { var indentBeforeQuestion = needsIndentation(node, node.condition, node.questionToken); @@ -93931,11 +95242,11 @@ var ts; var node = ts.getParseTreeNode(contextNode); var isSimilarNode = node && node.kind === contextNode.kind; var startPos = pos; - if (isSimilarNode) { + if (isSimilarNode && currentSourceFile) { pos = ts.skipTrivia(currentSourceFile.text, pos); } if (emitLeadingCommentsOfPosition && isSimilarNode && contextNode.pos !== startPos) { - var needsIndent = indentLeading && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); + var needsIndent = indentLeading && currentSourceFile && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); if (needsIndent) { increaseIndent(); } @@ -94410,7 +95721,7 @@ var ts; } function emitJsxAttribute(node) { emit(node.name); - emitNodeWithPrefix("=", writePunctuation, node.initializer, emit); // TODO: GH#18217 + emitNodeWithPrefix("=", writePunctuation, node.initializer, emitJsxAttributeValue); } function emitJsxSpreadAttribute(node) { writePunctuation("{..."); @@ -94541,7 +95852,7 @@ var ts; } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 319 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 320 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } @@ -94557,7 +95868,7 @@ var ts; emitJSDocTypeExpression(tag.typeExpression); emitJSDocComment(tag.comment); } - function emitJSDocAugmentsTag(tag) { + function emitJSDocHeritageTag(tag) { emitJSDocTagName(tag.tagName); writeSpace(); writePunctuation("{"); @@ -95394,19 +96705,19 @@ var ts; } return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node, includeTrivia); } - function getLiteralTextOfNode(node, neverAsciiEscape) { + function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) { if (node.kind === 10 /* StringLiteral */ && node.textSourceNode) { var textSourceNode = node.textSourceNode; if (ts.isIdentifier(textSourceNode)) { - return neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? - "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : - "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; + return jsxAttributeEscape ? "\"" + ts.escapeJsxAttributeString(getTextOfNode(textSourceNode)) + "\"" : + neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : + "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; } else { - return getLiteralTextOfNode(textSourceNode, neverAsciiEscape); + return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape); } } - return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape); + return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape, jsxAttributeEscape); } /** * Push a new name generation scope. @@ -95776,7 +97087,7 @@ var ts; hasWrittenComment = false; var emitFlags = ts.getEmitFlags(node); var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end; - var isEmittedNode = node.kind !== 324 /* NotEmittedStatement */; + var isEmittedNode = node.kind !== 325 /* NotEmittedStatement */; // We have to explicitly check that the node is JsxText because if the compilerOptions.jsx is "preserve" we will not do any transformation. // It is expensive to walk entire tree just to set one kind of node to have no comments. var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0 || node.kind === 11 /* JsxText */; @@ -95807,7 +97118,7 @@ var ts; } ts.forEach(ts.getSyntheticLeadingComments(node), emitLeadingSynthesizedComment); exitComment(); - var pipelinePhase = getNextPipelinePhase(2 /* Comments */, node); + var pipelinePhase = getNextPipelinePhase(2 /* Comments */, hint, node); if (emitFlags & 2048 /* NoNestedComments */) { commentsDisabled = true; pipelinePhase(hint, node); @@ -96045,7 +97356,7 @@ var ts; } function pipelineEmitWithSourceMap(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, node); + var pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, hint, node); if (ts.isUnparsedSource(node) || ts.isUnparsedPrepend(node)) { pipelinePhase(hint, node); } @@ -96059,7 +97370,7 @@ var ts; else { var _a = ts.getSourceMapRange(node), pos = _a.pos, end = _a.end, _b = _a.source, source = _b === void 0 ? sourceMapSource : _b; var emitFlags = ts.getEmitFlags(node); - if (node.kind !== 324 /* NotEmittedStatement */ + if (node.kind !== 325 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && pos >= 0) { emitSourcePos(source, skipSourceTrivia(source, pos)); @@ -96072,7 +97383,7 @@ var ts; else { pipelinePhase(hint, node); } - if (node.kind !== 324 /* NotEmittedStatement */ + if (node.kind !== 325 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && end >= 0) { emitSourcePos(source, end); @@ -96857,12 +98168,6 @@ var ts; return formatStyle + text + resetEscapeSequence; } ts.formatColorAndReset = formatColorAndReset; - function padLeft(s, length) { - while (s.length < length) { - s = " " + s; - } - return s; - } function formatCodeSpan(file, start, length, indent, squiggleColor, host) { var _a = ts.getLineAndCharacterOfPosition(file, start), firstLine = _a.line, firstLineChar = _a.character; var _b = ts.getLineAndCharacterOfPosition(file, start + length), lastLine = _b.line, lastLineChar = _b.character; @@ -96878,7 +98183,7 @@ var ts; // If the error spans over 5 lines, we'll only show the first 2 and last 2 lines, // so we'll skip ahead to the second-to-last line. if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) { - context += indent + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); + context += indent + formatColorAndReset(ts.padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); i = lastLine - 1; } var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0); @@ -96887,10 +98192,10 @@ var ts; lineContent = lineContent.replace(/\s+$/g, ""); // trim from end lineContent = lineContent.replace("\t", " "); // convert tabs to single spaces // Output the gutter and the actual contents of the line. - context += indent + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; context += lineContent + host.getNewLine(); // Output the gutter and the error span for the line using tildes. - context += indent + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; context += squiggleColor; if (i === firstLine) { // If we're on the last line, then limit it to the last character of the last line. @@ -97049,7 +98354,7 @@ var ts; hasInvalidatedResolution(sourceFile.path); } function sourceFileVersionUptoDate(sourceFile) { - return sourceFile.version === getSourceVersion(sourceFile.resolvedPath); + return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName); } function projectReferenceUptoDate(oldRef, newRef, index) { if (!ts.projectReferenceIsEqualTo(oldRef, newRef)) { @@ -97154,10 +98459,10 @@ var ts; var hasEmitBlockingDiagnostics = ts.createMap(); var _compilerOptionsObjectLiteralSyntax; var moduleResolutionCache; - var resolveModuleNamesWorker; + var actualResolveModuleNamesWorker; var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse; if (host.resolveModuleNames) { - resolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.assertEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { + actualResolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.checkEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. if (!resolved || resolved.extension !== undefined) { return resolved; @@ -97170,15 +98475,15 @@ var ts; else { moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); }, options); var loader_1 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache, redirectedReference).resolvedModule; }; // TODO: GH#18217 - resolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; + actualResolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; } - var resolveTypeReferenceDirectiveNamesWorker; + var actualResolveTypeReferenceDirectiveNamesWorker; if (host.resolveTypeReferenceDirectives) { - resolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.assertEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; } else { var loader_2 = function (typesRef, containingFile, redirectedReference) { return ts.resolveTypeReferenceDirective(typesRef, containingFile, options, host, redirectedReference).resolvedTypeReferenceDirective; }; // TODO: GH#18217 - resolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; } // Map from a stringified PackageId to the source file with that id. // Only one source file may have a given packageId. Others become redirects (see createRedirectSourceFile). @@ -97339,6 +98644,7 @@ var ts; getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); }, getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); }, getTypeCount: function () { return getDiagnosticsProducingTypeChecker().getTypeCount(); }, + getInstantiationCount: function () { return getDiagnosticsProducingTypeChecker().getInstantiationCount(); }, getRelationCacheSizes: function () { return getDiagnosticsProducingTypeChecker().getRelationCacheSizes(); }, getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; }, getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; }, @@ -97366,6 +98672,20 @@ var ts; ts.performance.mark("afterProgram"); ts.performance.measure("Program", "beforeProgram", "afterProgram"); return program; + function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference) { + ts.performance.mark("beforeResolveModule"); + var result = actualResolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference); + ts.performance.mark("afterResolveModule"); + ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule"); + return result; + } + function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference) { + ts.performance.mark("beforeResolveTypeReference"); + var result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference); + ts.performance.mark("afterResolveTypeReference"); + ts.performance.measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"); + return result; + } function compareDefaultLibFiles(a, b) { return ts.compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b)); } @@ -97439,13 +98759,13 @@ var ts; // which per above occurred during the current program creation. // Since we assume the filesystem does not change during program creation, // it is safe to reuse resolutions from the earlier call. - var result_8 = []; + var result_9 = []; for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { var moduleName = moduleNames_1[_i]; var resolvedModule = file.resolvedModules.get(moduleName); - result_8.push(resolvedModule); + result_9.push(resolvedModule); } - return result_8; + return result_9; } // At this point, we know at least one of the following hold: // - file has local declarations for ambient modules @@ -97739,7 +99059,7 @@ var ts; } if (resolveTypeReferenceDirectiveNamesWorker) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); var resolutions_1 = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFilePath, getResolvedProjectReferenceToRedirect(newSourceFile.originalFileName)); // ensure that types resolutions are still correct var resolutionsChanged_1 = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions_1, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo); @@ -98045,10 +99365,10 @@ var ts; function getJSSyntacticDiagnosticsForFile(sourceFile) { return runWithCancellationToken(function () { var diagnostics = []; - var parent = sourceFile; - walk(sourceFile); + walk(sourceFile, sourceFile); + ts.forEachChildRecursively(sourceFile, walk, walkArray); return diagnostics; - function walk(node) { + function walk(node, parent) { // Return directly from the case if the given node doesnt want to visit each child // Otherwise break to visit each child switch (parent.kind) { @@ -98057,7 +99377,7 @@ var ts; case 161 /* MethodDeclaration */: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); - return; + return "skip"; } // falls through case 160 /* MethodSignature */: @@ -98071,70 +99391,66 @@ var ts; // type annotation if (parent.type === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } } switch (node.kind) { case 255 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node.parent, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); - return; + return "skip"; } break; case 260 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); - return; + return "skip"; } break; case 253 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 259 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 279 /* HeritageClause */: var heritageClause = node; if (heritageClause.token === 113 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 246 /* InterfaceDeclaration */: var interfaceKeyword = ts.tokenToString(114 /* InterfaceKeyword */); - ts.Debug.assertDefined(interfaceKeyword); + ts.Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); - return; + return "skip"; case 249 /* ModuleDeclaration */: var moduleKeyword = node.flags & 16 /* Namespace */ ? ts.tokenToString(136 /* NamespaceKeyword */) : ts.tokenToString(135 /* ModuleKeyword */); - ts.Debug.assertDefined(moduleKeyword); + ts.Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); - return; + return "skip"; case 247 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 248 /* EnumDeclaration */: - var enumKeyword = ts.Debug.assertDefined(ts.tokenToString(88 /* EnumKeyword */)); + var enumKeyword = ts.Debug.checkDefined(ts.tokenToString(88 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); - return; + return "skip"; case 218 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 217 /* AsExpression */: diagnostics.push(createDiagnosticForNode(node.type, ts.Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 199 /* TypeAssertionExpression */: ts.Debug.fail(); // Won't parse these in a JS file anyway, as they are interpreted as JSX. } - var prevParent = parent; - parent = node; - ts.forEachChild(node, walk, walkArray); - parent = prevParent; } - function walkArray(nodes) { + function walkArray(nodes, parent) { if (parent.decorators === nodes && !options.experimentalDecorators) { diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)); } @@ -98151,13 +99467,14 @@ var ts; // Check type parameters if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } // falls through case 225 /* VariableStatement */: // Check modifiers if (nodes === parent.modifiers) { - return checkModifiers(parent.modifiers, parent.kind === 225 /* VariableStatement */); + checkModifiers(parent.modifiers, parent.kind === 225 /* VariableStatement */); + return "skip"; } break; case 159 /* PropertyDeclaration */: @@ -98169,14 +99486,14 @@ var ts; diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, ts.tokenToString(modifier.kind))); } } - return; + return "skip"; } break; case 156 /* Parameter */: // Check modifiers of parameter declaration if (nodes === parent.modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 196 /* CallExpression */: @@ -98188,14 +99505,10 @@ var ts; // Check type arguments if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; } - for (var _b = 0, nodes_6 = nodes; _b < nodes_6.length; _b++) { - var node = nodes_6[_b]; - walk(node); - } } function checkModifiers(modifiers, isConstValid) { for (var _i = 0, modifiers_1 = modifiers; _i < modifiers_1.length; _i++) { @@ -98407,7 +99720,7 @@ var ts; } } function getLibFileFromReference(ref) { - var libName = ref.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(ref.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { return getSourceFile(ts.combinePaths(defaultLibraryPath, libFileName)); @@ -98616,7 +99929,7 @@ var ts; file.originalFileName = originalFileName; addFileToRefFileMap(fileName, file, refFile); if (host.useCaseSensitiveFileNames()) { - var pathLowerCase = path.toLowerCase(); + var pathLowerCase = ts.toFileNameLowerCase(path); // for case-sensitive file systems check if we've already seen some file with similar filename ignoring case var existingFile = filesByNameIgnoreCase.get(pathLowerCase); if (existingFile) { @@ -98787,7 +100100,7 @@ var ts; } function processTypeReferenceDirectives(file) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); if (!typeDirectives) { return; } @@ -98796,7 +100109,7 @@ var ts; var ref = file.typeReferenceDirectives[i]; var resolvedTypeReferenceDirective = resolutions[i]; // store resolved type directive on the file - var fileName = ref.fileName.toLocaleLowerCase(); + var fileName = ts.toFileNameLowerCase(ref.fileName); ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective); processTypeReferenceDirective(fileName, resolvedTypeReferenceDirective, { kind: ts.RefFileKind.TypeReferenceDirective, @@ -98858,7 +100171,7 @@ var ts; } function processLibReferenceDirectives(file) { ts.forEach(file.libReferenceDirectives, function (libReference) { - var libName = libReference.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(libReference.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { // we ignore any 'no-default-lib' reference set on this file. @@ -98990,7 +100303,7 @@ var ts; projectReferenceRedirects.set(sourceFilePath, false); return undefined; } - sourceFile = ts.Debug.assertDefined(commandLine.options.configFile); + sourceFile = ts.Debug.checkDefined(commandLine.options.configFile); ts.Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath); addFileToFilesByName(sourceFile, sourceFilePath, /*redirectedPath*/ undefined); } @@ -99055,6 +100368,9 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } + if (!options.listFilesOnly && options.noEmit && ts.isIncrementalCompilation(options)) { + createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); + } verifyProjectReferences(); // List of collected files is complete; validate exhautiveness if this is a project with a file list if (options.composite) { @@ -99233,7 +100549,7 @@ var ts; chain = ts.chainDiagnosticMessages(chain, ts.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file, emitFileName); blockEmittingOfFile(emitFileName, ts.createCompilerDiagnosticFromMessageChain(chain)); } - var emitFileKey = !host.useCaseSensitiveFileNames() ? emitFilePath.toLocaleLowerCase() : emitFilePath; + var emitFileKey = !host.useCaseSensitiveFileNames() ? ts.toFileNameLowerCase(emitFilePath) : emitFilePath; // Report error if multiple files write into same file if (emitFilesSeen.has(emitFileKey)) { // Already seen the same emit file - report error @@ -99251,7 +100567,7 @@ var ts; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } - var refFile = ts.Debug.assertDefined(getSourceFileByPath(refPathToReportErrorOn.file)); + var refFile = ts.Debug.checkDefined(getSourceFileByPath(refPathToReportErrorOn.file)); var kind = refPathToReportErrorOn.kind, index = refPathToReportErrorOn.index; var pos, end; switch (kind) { @@ -99476,7 +100792,7 @@ var ts; return { fileExists: function (f) { return directoryStructureHost.fileExists(f); }, readDirectory: function (root, extensions, excludes, includes, depth) { - ts.Debug.assertDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + ts.Debug.assertIsDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: function (f) { return directoryStructureHost.readFile(f); }, @@ -99694,7 +101010,7 @@ var ts; // Create the reference map, and set the file infos for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) { var sourceFile = _a[_i]; - var version_1 = ts.Debug.assertDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); + var version_1 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined; if (referencedMap) { var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName); @@ -100221,7 +101537,7 @@ var ts; } // With --out or --outFile all outputs go into single file // so operations are performed directly on program, return program - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var compilerOptions = program.getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); @@ -100246,10 +101562,10 @@ var ts; if (affectedFilesPendingEmit) { var seenEmittedFiles = state.seenEmittedFiles || (state.seenEmittedFiles = ts.createMap()); for (var i = state.affectedFilesPendingEmitIndex; i < affectedFilesPendingEmit.length; i++) { - var affectedFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); + var affectedFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); if (affectedFile) { var seenKind = seenEmittedFiles.get(affectedFile.resolvedPath); - var emitKind = ts.Debug.assertDefined(ts.Debug.assertDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); + var emitKind = ts.Debug.checkDefined(ts.Debug.checkDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); if (seenKind === undefined || seenKind < emitKind) { // emit this file state.affectedFilesPendingEmitIndex = i; @@ -100273,7 +101589,7 @@ var ts; if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) { if (!state.cleanedDiagnosticsOfLibFiles) { state.cleanedDiagnosticsOfLibFiles = true; - var program_1 = ts.Debug.assertDefined(state.program); + var program_1 = ts.Debug.checkDefined(state.program); var options_2 = program_1.getCompilerOptions(); ts.forEach(program_1.getSourceFiles(), function (f) { return program_1.isSourceFileDefaultLibrary(f) && @@ -100294,14 +101610,14 @@ var ts; function handleDtsMayChangeOf(state, path, cancellationToken, computeHash) { removeSemanticDiagnosticsOf(state, path); if (!state.changedFilesSet.has(path)) { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var sourceFile = program.getSourceFileByPath(path); if (sourceFile) { // Even though the js emit doesnt change and we are already handling dts emit and semantic diagnostics // we need to update the signature to reflect correctness of the signature(which is output d.ts emit) of this file // This ensures that we dont later during incremental builds considering wrong signature. // Eg where this also is needed to ensure that .tsbuildinfo generated by incremental build should be same as if it was first fresh build - ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.assertDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); + ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); // If not dts emit, nothing more to do if (ts.getEmitDeclarations(state.compilerOptions)) { addToAffectedFilesPendingEmit(state, path, 0 /* DtsOnly */); @@ -100323,8 +101639,8 @@ var ts; return !state.semanticDiagnosticsFromOldState.size; } function isChangedSignagure(state, path) { - var newSignature = ts.Debug.assertDefined(state.currentAffectedFilesSignatures).get(path); - var oldSignagure = ts.Debug.assertDefined(state.fileInfos.get(path)).signature; + var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path); + var oldSignagure = ts.Debug.checkDefined(state.fileInfos.get(path)).signature; return newSignature !== oldSignagure; } /** @@ -100350,7 +101666,7 @@ var ts; seenFileNamesMap.set(currentPath, true); var result = fn(state, currentPath); if (result && isChangedSignagure(state, currentPath)) { - var currentSourceFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(currentPath); + var currentSourceFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(currentPath); queue.push.apply(queue, ts.BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath)); } } @@ -100463,7 +101779,7 @@ var ts; * bindAndCheckDiagnostics (from cache) and program diagnostics */ function getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken) { - return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.assertDefined(state.program).getProgramDiagnostics(sourceFile)); + return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.checkDefined(state.program).getProgramDiagnostics(sourceFile)); } /** * Gets the binder and checker diagnostics either from cache if present, or otherwise from program and caches it @@ -100479,7 +101795,7 @@ var ts; } } // Diagnostics werent cached, get them from program, and cache the result - var diagnostics = ts.Debug.assertDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); + var diagnostics = ts.Debug.checkDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); if (state.semanticDiagnosticsPerFile) { state.semanticDiagnosticsPerFile.set(path, diagnostics); } @@ -100491,7 +101807,7 @@ var ts; function getProgramBuildInfo(state, getCanonicalFileName) { if (state.compilerOptions.outFile || state.compilerOptions.out) return undefined; - var currentDirectory = ts.Debug.assertDefined(state.program).getCurrentDirectory(); + var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory(); var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory)); var fileInfos = {}; state.fileInfos.forEach(function (value, key) { @@ -100657,10 +101973,10 @@ var ts; backupState = cloneBuilderProgramState(state); }; builderProgram.restoreState = function () { - state = ts.Debug.assertDefined(backupState); + state = ts.Debug.checkDefined(backupState); backupState = undefined; }; - builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.assertDefined(state.program), sourceFile); }; + builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); }; builderProgram.getSemanticDiagnostics = getSemanticDiagnostics; builderProgram.emit = emit; builderProgram.releaseProgram = function () { @@ -100694,7 +102010,7 @@ var ts; if (state.emittedBuildInfo) { return undefined; } - var affected_1 = ts.Debug.assertDefined(state.program); + var affected_1 = ts.Debug.checkDefined(state.program); return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file @@ -100706,7 +102022,7 @@ var ts; isPendingEmitFile = true; } else { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); if (state.programEmitComplete) return undefined; affected = program; @@ -100715,7 +102031,7 @@ var ts; return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file - ts.Debug.assertDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */, customTransformers), affected, emitKind, isPendingEmitFile); + ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */, customTransformers), affected, emitKind, isPendingEmitFile); } /** * Emits the JavaScript and declaration files. @@ -100755,7 +102071,7 @@ var ts; }; } } - return ts.Debug.assertDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); + return ts.Debug.checkDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); } /** * Return the semantic diagnostics for the next affected file or undefined if iteration is complete @@ -100795,11 +102111,11 @@ var ts; */ function getSemanticDiagnostics(sourceFile, cancellationToken) { assertSourceFileOkWithoutNextAffectedCall(state, sourceFile); - var compilerOptions = ts.Debug.assertDefined(state.program).getCompilerOptions(); + var compilerOptions = ts.Debug.checkDefined(state.program).getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); // We dont need to cache the diagnostics just return them from program - return ts.Debug.assertDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); + return ts.Debug.checkDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); } if (sourceFile) { return getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken); @@ -100810,7 +102126,7 @@ var ts; while (getSemanticDiagnosticsOfNextAffectedFile(cancellationToken)) { } var diagnostics; - for (var _i = 0, _a = ts.Debug.assertDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { + for (var _i = 0, _a = ts.Debug.checkDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { var sourceFile_1 = _a[_i]; diagnostics = ts.addRange(diagnostics, getSemanticDiagnosticsOfFile(state, sourceFile_1, cancellationToken)); } @@ -100918,7 +102234,7 @@ var ts; close: ts.noop, }; function getProgram() { - return ts.Debug.assertDefined(state.program); + return ts.Debug.checkDefined(state.program); } } ts.createRedirectedBuilderProgram = createRedirectedBuilderProgram; @@ -101025,6 +102341,7 @@ var ts; var directoryWatchesOfFailedLookups = ts.createMap(); var rootDir = rootDirForResolution && ts.removeTrailingDirectorySeparator(ts.getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory())); var rootPath = (rootDir && resolutionHost.toPath(rootDir)); // TODO: GH#18217 + var rootSplitLength = rootPath !== undefined ? rootPath.split(ts.directorySeparator).length : 0; // TypeRoot watches for the types that get added as part of getAutomaticTypeDirectiveNames var typeRootsWatches = ts.createMap(); return { @@ -101126,7 +102443,7 @@ var ts; if (globalCache !== undefined && !ts.isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && ts.extensionIsTS(primaryResult.resolvedModule.extension))) { // create different collection of failed lookup locations for second pass // if it will fail and we've already found something during the first pass - we don't want to pollute its results - var _a = ts.loadModuleFromGlobalCache(ts.Debug.assertDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; + var _a = ts.loadModuleFromGlobalCache(ts.Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; if (resolvedModule) { return { resolvedModule: resolvedModule, failedLookupLocations: ts.addRange(primaryResult.failedLookupLocations, failedLookupLocations) }; } @@ -101235,15 +102552,23 @@ var ts; if (isInDirectoryPath(rootPath, failedLookupLocationPath)) { // Ensure failed look up is normalized path failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory()); - ts.Debug.assert(failedLookupLocation.length === failedLookupLocationPath.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); - var subDirectoryInRoot = failedLookupLocationPath.indexOf(ts.directorySeparator, rootPath.length + 1); - if (subDirectoryInRoot !== -1) { + var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator); + var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator); + ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); + if (failedLookupPathSplit.length > rootSplitLength + 1) { // Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution - return { dir: failedLookupLocation.substr(0, subDirectoryInRoot), dirPath: failedLookupLocationPath.substr(0, subDirectoryInRoot) }; + return { + dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator), + dirPath: failedLookupPathSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator) + }; } else { // Always watch root directory non recursively - return { dir: rootDir, dirPath: rootPath, nonRecursive: false }; // TODO: GH#18217 + return { + dir: rootDir, + dirPath: rootPath, + nonRecursive: false + }; } } return getDirectoryToWatchFromFailedLookupLocationDirectory(ts.getDirectoryPath(ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory())), ts.getDirectoryPath(failedLookupLocationPath)); @@ -101447,7 +102772,7 @@ var ts; resolution.isInvalidated = true; (filesWithInvalidatedResolutions || (filesWithInvalidatedResolutions = ts.createMap())).set(containingFilePath, true); // When its a file with inferred types resolution, invalidate type reference directive resolution - if (containingFilePath.endsWith(ts.inferredTypesContainingFile)) { + if (ts.endsWith(containingFilePath, ts.inferredTypesContainingFile)) { resolutionHost.onChangedAutomaticTypeDirectiveNames(); } } @@ -102301,7 +103626,7 @@ var ts; var getDefaultLibLocation = ts.memoize(function () { return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath())); }); var host = system; // TODO: `host` is unused! - // eslint-disable-next-line no-unused-expressions + // eslint-disable-next-line @typescript-eslint/no-unused-expressions host; return { useCaseSensitiveFileNames: function () { return system.useCaseSensitiveFileNames; }, @@ -102841,7 +104166,7 @@ var ts; return watchDirectory(host, directory, function (fileOrDirectory) { ts.Debug.assert(!!configFileName); var fileOrDirectoryPath = toPath(fileOrDirectory); - // Since the file existance changed, update the sourceFiles cache + // Since the file existence changed, update the sourceFiles cache if (cachedDirectoryStructureHost) { cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); } @@ -103027,7 +104352,7 @@ var ts; if (!compilerHost.resolveModuleNames) { var loader_3 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference).resolvedModule; }; compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference) { - return ts.loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_3); + return ts.loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_3); }; } var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchFilePath = _a.watchFilePath, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog; @@ -103413,7 +104738,7 @@ var ts; if (state.options.verbose) reportStatus(state, ts.Diagnostics.Building_project_0, project); if (config.fileNames.length === 0) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); // Nothing to build - must be a solution file, basically buildResult = BuildResultFlags.None; step = Step.QueueReferencingProjects; @@ -103424,7 +104749,7 @@ var ts; // Update module resolution cache if needed updateModuleResolutionCache(state, project, config); // Create program - program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), config.errors, config.projectReferences); + program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences); step++; } function handleDiagnostics(diagnostics, errorFlags, errorType) { @@ -103437,14 +104762,14 @@ var ts; } } function getSyntaxDiagnostics(cancellationToken) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); handleDiagnostics(__spreadArrays(program.getConfigFileParsingDiagnostics(), program.getOptionsDiagnostics(cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken)), BuildResultFlags.SyntaxErrors, "Syntactic"); } function getSemanticDiagnostics(cancellationToken) { - handleDiagnostics(ts.Debug.assertDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); + handleDiagnostics(ts.Debug.checkDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); } function emit(writeFileCallback, cancellationToken, customTransformers) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); ts.Debug.assert(step === Step.Emit); // Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly program.backupState(); @@ -103578,11 +104903,11 @@ var ts; emitBundle(writeFile, customTransformers); break; case Step.BuildInvalidatedProjectOfBundle: - ts.Debug.assertDefined(invalidatedProjectOfBundle).done(cancellationToken); + ts.Debug.checkDefined(invalidatedProjectOfBundle).done(cancellationToken); step = Step.Done; break; case Step.QueueReferencingProjects: - queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.assertDefined(buildResult)); + queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.checkDefined(buildResult)); step++; break; // Should never be done @@ -103599,7 +104924,7 @@ var ts; if (status.type !== ts.UpToDateStatusType.OutOfDateWithPrepend || options.force) return true; return config.fileNames.length === 0 || - !!config.errors.length || + !!ts.getConfigFileParsingDiagnostics(config).length || !ts.isIncrementalCompilation(config.options); } function getNextInvalidatedProject(state, buildOrder, reportQueue) { @@ -103646,7 +104971,7 @@ var ts; verboseReportProjectStatus(state, project, status); if (!options.force) { if (status.type === ts.UpToDateStatusType.UpToDate) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); // Up to date, skip if (options.dry) { @@ -103656,12 +104981,12 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); return createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder); } } if (status.type === ts.UpToDateStatusType.UpstreamBlocked) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); if (options.verbose) { reportStatus(state, status.upstreamProjectBlocked ? @@ -103671,7 +104996,7 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.ContainerOnly) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); // Do nothing continue; @@ -105091,7 +106416,7 @@ var ts; case 247 /* TypeAliasDeclaration */: case 173 /* TypeLiteral */: return 2 /* Type */; - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: // If it has no name node, it shares the name with the value declaration below it. return node.name === undefined ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; case 284 /* EnumMember */: @@ -105123,6 +106448,7 @@ var ts; } ts.getMeaningFromDeclaration = getMeaningFromDeclaration; function getMeaningFromLocation(node) { + node = getAdjustedReferenceLocation(node); if (node.kind === 290 /* SourceFile */) { return 1 /* Value */; } @@ -105407,8 +106733,8 @@ var ts; return "class" /* classElement */; case 246 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; case 247 /* TypeAliasDeclaration */: - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: return "type" /* typeElement */; case 248 /* EnumDeclaration */: return "enum" /* enumElement */; case 242 /* VariableDeclaration */: @@ -105474,6 +106800,10 @@ var ts; } case 75 /* Identifier */: return ts.isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; + case 259 /* ExportAssignment */: + var scriptKind = getNodeKind(node.expression); + // If the expression didn't come back with something (like it does for an identifiers) + return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: return "" /* unknown */; } @@ -105720,6 +107050,339 @@ var ts; return syntaxList; } ts.findContainingList = findContainingList; + function isDefaultModifier(node) { + return node.kind === 84 /* DefaultKeyword */; + } + function isClassKeyword(node) { + return node.kind === 80 /* ClassKeyword */; + } + function isFunctionKeyword(node) { + return node.kind === 94 /* FunctionKeyword */; + } + function getAdjustedLocationForClass(node) { + if (ts.isNamedDeclaration(node)) { + return node.name; + } + if (ts.isClassDeclaration(node)) { + // for class and function declarations, use the `default` modifier + // when the declaration is unnamed. + var defaultModifier = ts.find(node.modifiers, isDefaultModifier); + if (defaultModifier) + return defaultModifier; + } + if (ts.isClassExpression(node)) { + // for class expressions, use the `class` keyword when the class is unnamed + var classKeyword = ts.find(node.getChildren(), isClassKeyword); + if (classKeyword) + return classKeyword; + } + } + function getAdjustedLocationForFunction(node) { + if (ts.isNamedDeclaration(node)) { + return node.name; + } + if (ts.isFunctionDeclaration(node)) { + // for class and function declarations, use the `default` modifier + // when the declaration is unnamed. + var defaultModifier = ts.find(node.modifiers, isDefaultModifier); + if (defaultModifier) + return defaultModifier; + } + if (ts.isFunctionExpression(node)) { + // for function expressions, use the `function` keyword when the function is unnamed + var functionKeyword = ts.find(node.getChildren(), isFunctionKeyword); + if (functionKeyword) + return functionKeyword; + } + } + function getAdjustedLocationForDeclaration(node, forRename) { + if (!forRename) { + switch (node.kind) { + case 245 /* ClassDeclaration */: + case 214 /* ClassExpression */: + return getAdjustedLocationForClass(node); + case 244 /* FunctionDeclaration */: + case 201 /* FunctionExpression */: + return getAdjustedLocationForFunction(node); + } + } + if (ts.isNamedDeclaration(node)) { + return node.name; + } + } + function getAdjustedLocationForImportDeclaration(node, forRename) { + if (node.importClause) { + if (node.importClause.name && node.importClause.namedBindings) { + // do not adjust if we have both a name and named bindings + return; + } + // /**/import [|name|] from ...; + // import /**/type [|name|] from ...; + if (node.importClause.name) { + return node.importClause.name; + } + // /**/import { [|name|] } from ...; + // /**/import { propertyName as [|name|] } from ...; + // /**/import * as [|name|] from ...; + // import /**/type { [|name|] } from ...; + // import /**/type { propertyName as [|name|] } from ...; + // import /**/type * as [|name|] from ...; + if (node.importClause.namedBindings) { + if (ts.isNamedImports(node.importClause.namedBindings)) { + // do nothing if there is more than one binding + var onlyBinding = ts.singleOrUndefined(node.importClause.namedBindings.elements); + if (!onlyBinding) { + return; + } + return onlyBinding.name; + } + else if (ts.isNamespaceImport(node.importClause.namedBindings)) { + return node.importClause.namedBindings.name; + } + } + } + if (!forRename) { + // /**/import "[|module|]"; + // /**/import ... from "[|module|]"; + // import /**/type ... from "[|module|]"; + return node.moduleSpecifier; + } + } + function getAdjustedLocationForExportDeclaration(node, forRename) { + if (node.exportClause) { + // /**/export { [|name|] } ... + // /**/export { propertyName as [|name|] } ... + // /**/export * as [|name|] ... + // export /**/type { [|name|] } from ... + // export /**/type { propertyName as [|name|] } from ... + // export /**/type * as [|name|] ... + if (ts.isNamedExports(node.exportClause)) { + // do nothing if there is more than one binding + var onlyBinding = ts.singleOrUndefined(node.exportClause.elements); + if (!onlyBinding) { + return; + } + return node.exportClause.elements[0].name; + } + else if (ts.isNamespaceExport(node.exportClause)) { + return node.exportClause.name; + } + } + if (!forRename) { + // /**/export * from "[|module|]"; + // export /**/type * from "[|module|]"; + return node.moduleSpecifier; + } + } + function getAdjustedLocationForHeritageClause(node) { + // /**/extends [|name|] + // /**/implements [|name|] + if (node.types.length === 1) { + return node.types[0].expression; + } + // /**/extends name1, name2 ... + // /**/implements name1, name2 ... + } + function getAdjustedLocation(node, forRename) { + var parent = node.parent; + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/import [|name|] = ... + // + // NOTE: If the node is a modifier, we don't adjust its location if it is the `default` modifier as that is handled + // specially by `getSymbolAtLocation`. + if (ts.isModifier(node) && (forRename || node.kind !== 84 /* DefaultKeyword */) ? ts.contains(parent.modifiers, node) : + node.kind === 80 /* ClassKeyword */ ? ts.isClassDeclaration(parent) || ts.isClassExpression(node) : + node.kind === 94 /* FunctionKeyword */ ? ts.isFunctionDeclaration(parent) || ts.isFunctionExpression(node) : + node.kind === 114 /* InterfaceKeyword */ ? ts.isInterfaceDeclaration(parent) : + node.kind === 88 /* EnumKeyword */ ? ts.isEnumDeclaration(parent) : + node.kind === 145 /* TypeKeyword */ ? ts.isTypeAliasDeclaration(parent) : + node.kind === 136 /* NamespaceKeyword */ || node.kind === 135 /* ModuleKeyword */ ? ts.isModuleDeclaration(parent) : + node.kind === 96 /* ImportKeyword */ ? ts.isImportEqualsDeclaration(parent) : + node.kind === 131 /* GetKeyword */ ? ts.isGetAccessorDeclaration(parent) : + node.kind === 142 /* SetKeyword */ && ts.isSetAccessorDeclaration(parent)) { + var location = getAdjustedLocationForDeclaration(parent, forRename); + if (location) { + return location; + } + } + // /**/ [|name|] ... + if ((node.kind === 109 /* VarKeyword */ || node.kind === 81 /* ConstKeyword */ || node.kind === 115 /* LetKeyword */) && + ts.isVariableDeclarationList(parent) && parent.declarations.length === 1) { + var decl = parent.declarations[0]; + if (ts.isIdentifier(decl.name)) { + return decl.name; + } + } + if (node.kind === 145 /* TypeKeyword */) { + // import /**/type [|name|] from ...; + // import /**/type { [|name|] } from ...; + // import /**/type { propertyName as [|name|] } from ...; + // import /**/type ... from "[|module|]"; + if (ts.isImportClause(parent) && parent.isTypeOnly) { + var location = getAdjustedLocationForImportDeclaration(parent.parent, forRename); + if (location) { + return location; + } + } + // export /**/type { [|name|] } from ...; + // export /**/type { propertyName as [|name|] } from ...; + // export /**/type * from "[|module|]"; + // export /**/type * as ... from "[|module|]"; + if (ts.isExportDeclaration(parent) && parent.isTypeOnly) { + var location = getAdjustedLocationForExportDeclaration(parent, forRename); + if (location) { + return location; + } + } + } + // import { propertyName /**/as [|name|] } ... + // import * /**/as [|name|] ... + // export { propertyName /**/as [|name|] } ... + // export * /**/as [|name|] ... + if (node.kind === 123 /* AsKeyword */) { + if (ts.isImportSpecifier(parent) && parent.propertyName || + ts.isExportSpecifier(parent) && parent.propertyName || + ts.isNamespaceImport(parent) || + ts.isNamespaceExport(parent)) { + return parent.name; + } + if (ts.isExportDeclaration(parent) && parent.exportClause && ts.isNamespaceExport(parent.exportClause)) { + return parent.exportClause.name; + } + } + // /**/import [|name|] from ...; + // /**/import { [|name|] } from ...; + // /**/import { propertyName as [|name|] } from ...; + // /**/import ... from "[|module|]"; + // /**/import "[|module|]"; + if (node.kind === 96 /* ImportKeyword */ && ts.isImportDeclaration(parent)) { + var location = getAdjustedLocationForImportDeclaration(parent, forRename); + if (location) { + return location; + } + } + if (node.kind === 89 /* ExportKeyword */) { + // /**/export { [|name|] } ...; + // /**/export { propertyName as [|name|] } ...; + // /**/export * from "[|module|]"; + // /**/export * as ... from "[|module|]"; + if (ts.isExportDeclaration(parent)) { + var location = getAdjustedLocationForExportDeclaration(parent, forRename); + if (location) { + return location; + } + } + // NOTE: We don't adjust the location of the `default` keyword as that is handled specially by `getSymbolAtLocation`. + // /**/export default [|name|]; + // /**/export = [|name|]; + if (ts.isExportAssignment(parent)) { + return ts.skipOuterExpressions(parent.expression); + } + } + // import name = /**/require("[|module|]"); + if (node.kind === 139 /* RequireKeyword */ && ts.isExternalModuleReference(parent)) { + return parent.expression; + } + // import ... /**/from "[|module|]"; + // export ... /**/from "[|module|]"; + if (node.kind === 149 /* FromKeyword */ && (ts.isImportDeclaration(parent) || ts.isExportDeclaration(parent)) && parent.moduleSpecifier) { + return parent.moduleSpecifier; + } + // class ... /**/extends [|name|] ... + // class ... /**/implements [|name|] ... + // class ... /**/implements name1, name2 ... + // interface ... /**/extends [|name|] ... + // interface ... /**/extends name1, name2 ... + if ((node.kind === 90 /* ExtendsKeyword */ || node.kind === 113 /* ImplementsKeyword */) && ts.isHeritageClause(parent) && parent.token === node.kind) { + var location = getAdjustedLocationForHeritageClause(parent); + if (location) { + return location; + } + } + if (node.kind === 90 /* ExtendsKeyword */) { + // ... ... + if (ts.isTypeParameterDeclaration(parent) && parent.constraint && ts.isTypeReferenceNode(parent.constraint)) { + return parent.constraint.typeName; + } + // ... T /**/extends [|U|] ? ... + if (ts.isConditionalTypeNode(parent) && ts.isTypeReferenceNode(parent.extendsType)) { + return parent.extendsType.typeName; + } + } + // ... T extends /**/infer [|U|] ? ... + if (node.kind === 132 /* InferKeyword */ && ts.isInferTypeNode(parent)) { + return parent.typeParameter.name; + } + // { [ [|K|] /**/in keyof T]: ... } + if (node.kind === 97 /* InKeyword */ && ts.isTypeParameterDeclaration(parent) && ts.isMappedTypeNode(parent.parent)) { + return parent.name; + } + // /**/keyof [|T|] + if (node.kind === 134 /* KeyOfKeyword */ && ts.isTypeOperatorNode(parent) && parent.operator === 134 /* KeyOfKeyword */ && + ts.isTypeReferenceNode(parent.type)) { + return parent.type.typeName; + } + // /**/readonly [|name|][] + if (node.kind === 138 /* ReadonlyKeyword */ && ts.isTypeOperatorNode(parent) && parent.operator === 138 /* ReadonlyKeyword */ && + ts.isArrayTypeNode(parent.type) && ts.isTypeReferenceNode(parent.type.elementType)) { + return parent.type.elementType.typeName; + } + if (!forRename) { + // /**/new [|name|] + // /**/void [|name|] + // /**/void obj.[|name|] + // /**/typeof [|name|] + // /**/typeof obj.[|name|] + // /**/await [|name|] + // /**/await obj.[|name|] + // /**/yield [|name|] + // /**/yield obj.[|name|] + // /**/delete obj.[|name|] + if (node.kind === 99 /* NewKeyword */ && ts.isNewExpression(parent) || + node.kind === 110 /* VoidKeyword */ && ts.isVoidExpression(parent) || + node.kind === 108 /* TypeOfKeyword */ && ts.isTypeOfExpression(parent) || + node.kind === 127 /* AwaitKeyword */ && ts.isAwaitExpression(parent) || + node.kind === 121 /* YieldKeyword */ && ts.isYieldExpression(parent) || + node.kind === 85 /* DeleteKeyword */ && ts.isDeleteExpression(parent)) { + if (parent.expression) { + return ts.skipOuterExpressions(parent.expression); + } + } + // left /**/in [|name|] + // left /**/instanceof [|name|] + if ((node.kind === 97 /* InKeyword */ || node.kind === 98 /* InstanceOfKeyword */) && ts.isBinaryExpression(parent) && parent.operatorToken === node) { + return ts.skipOuterExpressions(parent.right); + } + // left /**/as [|name|] + if (node.kind === 123 /* AsKeyword */ && ts.isAsExpression(parent) && ts.isTypeReferenceNode(parent.type)) { + return parent.type.typeName; + } + // for (... /**/in [|name|]) + // for (... /**/of [|name|]) + if (node.kind === 97 /* InKeyword */ && ts.isForInStatement(parent) || + node.kind === 152 /* OfKeyword */ && ts.isForOfStatement(parent)) { + return ts.skipOuterExpressions(parent.expression); + } + } + return node; + } + /** + * Adjusts the location used for "find references" and "go to definition" when the cursor was not + * on a property name. + */ + function getAdjustedReferenceLocation(node) { + return getAdjustedLocation(node, /*forRename*/ false); + } + ts.getAdjustedReferenceLocation = getAdjustedReferenceLocation; + /** + * Adjusts the location used for "rename" when the cursor was not on a property name. + */ + function getAdjustedRenameLocation(node) { + return getAdjustedLocation(node, /*forRename*/ true); + } + ts.getAdjustedRenameLocation = getAdjustedRenameLocation; /** * Gets the token whose text has range [start, end) and * position >= start and (position < end or (position === end && token is literal or keyword or identifier)) @@ -106116,6 +107779,8 @@ var ts; result.push("export" /* exportedModifier */); if (node.flags & 8388608 /* Ambient */) result.push("declare" /* ambientModifier */); + if (node.kind === 259 /* ExportAssignment */) + result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } ts.getNodeModifiers = getNodeModifiers; @@ -106232,6 +107897,7 @@ var ts; ts.createTextChange = createTextChange; ts.typeKeywords = [ 125 /* AnyKeyword */, + 124 /* AssertsKeyword */, 151 /* BigIntKeyword */, 128 /* BooleanKeyword */, 91 /* FalseKeyword */, @@ -106253,6 +107919,10 @@ var ts; return ts.contains(ts.typeKeywords, kind); } ts.isTypeKeyword = isTypeKeyword; + function isTypeKeywordToken(node) { + return node.kind === 145 /* TypeKeyword */; + } + ts.isTypeKeywordToken = isTypeKeywordToken; /** True if the symbol is for an external module, as opposed to a namespace. */ function isExternalModuleSymbol(moduleSymbol) { return !!(moduleSymbol.flags & 1536 /* Module */) && moduleSymbol.name.charCodeAt(0) === 34 /* doubleQuote */; @@ -106425,16 +108095,21 @@ var ts; return node.modifiers && ts.find(node.modifiers, function (m) { return m.kind === kind; }); } ts.findModifier = findModifier; - function insertImport(changes, sourceFile, importDecl) { + function insertImport(changes, sourceFile, importDecl, blankLineBetween) { var lastImportDeclaration = ts.findLast(sourceFile.statements, ts.isAnyImportSyntax); if (lastImportDeclaration) { changes.insertNodeAfter(sourceFile, lastImportDeclaration, importDecl); } else { - changes.insertNodeAtTopOfFile(sourceFile, importDecl, /*blankLineBetween*/ true); + changes.insertNodeAtTopOfFile(sourceFile, importDecl, blankLineBetween); } } ts.insertImport = insertImport; + function getTypeKeywordOfTypeOnlyImport(importClause, sourceFile) { + ts.Debug.assert(importClause.isTypeOnly); + return ts.cast(importClause.getChildAt(0, sourceFile), isTypeKeywordToken); + } + ts.getTypeKeywordOfTypeOnlyImport = getTypeKeywordOfTypeOnlyImport; function textSpansEqual(a, b) { return !!a && !!b && a.start === b.start && a.length === b.length; } @@ -106946,9 +108621,6 @@ var ts; } ts.getContextualTypeFromParent = getContextualTypeFromParent; function quote(text, preferences) { - if (/^\d+$/.test(text)) { - return text; - } // Editors can pass in undefined or empty string - we want to infer the preference in those cases. var quotePreference = preferences.quotePreference || "auto"; var quoted = JSON.stringify(text); @@ -107335,6 +109007,15 @@ var ts; return ts.isArray(valueOrArray) ? ts.first(valueOrArray) : valueOrArray; } ts.firstOrOnly = firstOrOnly; + function getNameForExportedSymbol(symbol, scriptTarget) { + if (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */) { + // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. + return ts.firstDefined(symbol.declarations, function (d) { return ts.isExportAssignment(d) && ts.isIdentifier(d.expression) ? d.expression.text : undefined; }) + || ts.codefix.moduleSymbolToValidIdentifier(ts.Debug.checkDefined(symbol.parent), scriptTarget); + } + return symbol.name; + } + ts.getNameForExportedSymbol = getNameForExportedSymbol; // #endregion })(ts || (ts = {})); var ts; @@ -107465,7 +109146,7 @@ var ts; if (templateStack.length > 0) { var lastTemplateStackToken = ts.lastOrUndefined(templateStack); if (lastTemplateStackToken === 15 /* TemplateHead */) { - token = scanner.reScanTemplateToken(); + token = scanner.reScanTemplateToken(/* isTaggedTemplate */ false); // Only pop on a TemplateTail; a TemplateMiddle indicates there is more for us. if (token === 17 /* TemplateTail */) { templateStack.pop(); @@ -107996,18 +109677,18 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); // e.g. "param" pos = tag.tagName.end; switch (tag.kind) { - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: processJSDocParameterTag(tag); break; - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; break; - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; break; - case 317 /* JSDocReturnTag */: + case 318 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; break; @@ -108308,9 +109989,10 @@ var ts; return entries && convertPathCompletions(entries); } if (ts.isInString(sourceFile, position, contextToken)) { - return !contextToken || !ts.isStringLiteralLike(contextToken) - ? undefined - : convertStringLiteralCompletions(getStringLiteralCompletionEntries(sourceFile, contextToken, position, checker, options, host), sourceFile, checker, log, preferences); + if (!contextToken || !ts.isStringLiteralLike(contextToken)) + return undefined; + var entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, checker, options, host); + return convertStringLiteralCompletions(entries, sourceFile, checker, log, preferences); } } StringCompletions.getStringLiteralCompletions = getStringLiteralCompletions; @@ -108492,7 +110174,11 @@ var ts; return { kind: 2 /* Types */, types: types, isNewIdentifier: isNewIdentifier }; } function stringLiteralCompletionsFromProperties(type) { - return type && { kind: 1 /* Properties */, symbols: type.getApparentProperties(), hasIndexSignature: ts.hasIndexSignature(type) }; + return type && { + kind: 1 /* Properties */, + symbols: type.getApparentProperties().filter(function (prop) { return !ts.isPrivateIdentifierPropertyDeclaration(prop.valueDeclaration); }), + hasIndexSignature: ts.hasIndexSignature(type) + }; } function getStringLiteralTypes(type, uniques) { if (uniques === void 0) { uniques = ts.createMap(); } @@ -108939,7 +110625,7 @@ var ts; return !!(origin.kind & 2 /* SymbolMember */); } function originIsExport(origin) { - return !!(origin.kind & 4 /* Export */); + return !!(origin && origin.kind & 4 /* Export */); } function originIsPromise(origin) { return !!(origin.kind & 8 /* Promise */); @@ -109089,7 +110775,7 @@ var ts; } for (var _b = 0, literals_1 = literals; _b < literals_1.length; _b++) { var literal = literals_1[_b]; - entries.push(createCompletionEntryForLiteral(literal)); + entries.push(createCompletionEntryForLiteral(literal, preferences)); } return { isGlobalCompletion: isInSnippetScope, isMemberCompletion: isMemberCompletionKind(completionKind), isNewIdentifierLocation: isNewIdentifierLocation, entries: entries }; } @@ -109118,16 +110804,18 @@ var ts; name: realName, kind: "warning" /* warning */, kindModifiers: "", - sortText: SortText.JavascriptIdentifiers + sortText: SortText.JavascriptIdentifiers, + isFromUncheckedFile: true }); } }); } - var completionNameForLiteral = function (literal) { - return typeof literal === "object" ? ts.pseudoBigIntToString(literal) + "n" : JSON.stringify(literal); - }; - function createCompletionEntryForLiteral(literal) { - return { name: completionNameForLiteral(literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; + function completionNameForLiteral(literal, preferences) { + return typeof literal === "object" ? ts.pseudoBigIntToString(literal) + "n" : + ts.isString(literal) ? ts.quote(literal, preferences) : JSON.stringify(literal); + } + function createCompletionEntryForLiteral(literal, preferences) { + return { name: completionNameForLiteral(literal, preferences), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; } function createCompletionEntry(symbol, sortText, location, sourceFile, typeChecker, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, preferences) { var insertText; @@ -109136,13 +110824,13 @@ var ts; var useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess; if (origin && originIsThisType(origin)) { insertText = needsConvertPropertyAccess - ? "this" + (insertQuestionDot ? "?." : "") + "[" + ts.quote(name, preferences) + "]" + ? "this" + (insertQuestionDot ? "?." : "") + "[" + quotePropertyName(name, preferences) + "]" : "this" + (insertQuestionDot ? "?." : ".") + name; } // We should only have needsConvertPropertyAccess if there's a property access to convert. But see #21790. // Somehow there was a global with a non-identifier name. Hopefully someone will complain about getting a "foo bar" global completion and provide a repro. else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) { - insertText = useBraces ? needsConvertPropertyAccess ? "[" + ts.quote(name, preferences) + "]" : "[" + name + "]" : name; + insertText = useBraces ? needsConvertPropertyAccess ? "[" + quotePropertyName(name, preferences) + "]" : "[" + name + "]" : name; if (insertQuestionDot || propertyAccessToConvert.questionDotToken) { insertText = "?." + insertText; } @@ -109191,19 +110879,22 @@ var ts; kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol), sortText: sortText, source: getSourceFromOrigin(origin), - hasAction: trueOrUndefined(!!origin && originIsExport(origin)), - isRecommended: trueOrUndefined(isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker)), + hasAction: origin && originIsExport(origin) || undefined, + isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || undefined, insertText: insertText, replacementSpan: replacementSpan, }; } + function quotePropertyName(name, preferences) { + if (/^\d+$/.test(name)) { + return name; + } + return ts.quote(name, preferences); + } function isRecommendedCompletionMatch(localSymbol, recommendedCompletion, checker) { return localSymbol === recommendedCompletion || !!(localSymbol.flags & 1048576 /* ExportValue */) && checker.getExportSymbolOfSymbol(localSymbol) === recommendedCompletion; } - function trueOrUndefined(b) { - return b ? true : undefined; - } function getSourceFromOrigin(origin) { return origin && originIsExport(origin) ? ts.stripQuotes(origin.moduleSymbol.name) : undefined; } @@ -109269,7 +110960,7 @@ var ts; } return entries; } - function getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host) { + function getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences) { var compilerOptions = program.getCompilerOptions(); var completionData = getCompletionData(program, log, sourceFile, isUncheckedFile(sourceFile, compilerOptions), position, { includeCompletionsForModuleExports: true, includeCompletionsWithInsertText: true }, entryId, host); if (!completionData) { @@ -109278,8 +110969,8 @@ var ts; if (completionData.kind !== 0 /* Data */) { return { type: "request", request: completionData }; } - var symbols = completionData.symbols, literals = completionData.literals, location = completionData.location, completionKind = completionData.completionKind, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, previousToken = completionData.previousToken, isJsxInitializer = completionData.isJsxInitializer; - var literal = ts.find(literals, function (l) { return completionNameForLiteral(l) === entryId.name; }); + var symbols = completionData.symbols, literals = completionData.literals, location = completionData.location, completionKind = completionData.completionKind, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, previousToken = completionData.previousToken, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation; + var literal = ts.find(literals, function (l) { return completionNameForLiteral(l, preferences) === entryId.name; }); if (literal !== undefined) return { type: "literal", literal: literal }; // Find the symbol with the matching entry name. @@ -109290,18 +110981,10 @@ var ts; var origin = symbolToOriginInfoMap[ts.getSymbolId(symbol)]; var info = getCompletionEntryDisplayNameForSymbol(symbol, compilerOptions.target, origin, completionKind); return info && info.name === entryId.name && getSourceFromOrigin(origin) === entryId.source - ? { type: "symbol", symbol: symbol, location: location, symbolToOriginInfoMap: symbolToOriginInfoMap, previousToken: previousToken, isJsxInitializer: isJsxInitializer } + ? { type: "symbol", symbol: symbol, location: location, symbolToOriginInfoMap: symbolToOriginInfoMap, previousToken: previousToken, isJsxInitializer: isJsxInitializer, isTypeOnlyLocation: isTypeOnlyLocation } : undefined; }) || { type: "none" }; } - function getSymbolName(symbol, origin, target) { - return origin && originIsExport(origin) && ((origin.isDefaultExport && symbol.escapedName === "default" /* Default */) || - (symbol.escapedName === "export=" /* ExportEquals */)) - // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. - ? ts.firstDefined(symbol.declarations, function (d) { return ts.isExportAssignment(d) && ts.isIdentifier(d.expression) ? d.expression.text : undefined; }) - || ts.codefix.moduleSymbolToValidIdentifier(origin.moduleSymbol, target) - : symbol.name; - } function getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) { var typeChecker = program.getTypeChecker(); var compilerOptions = program.getCompilerOptions(); @@ -109311,7 +110994,7 @@ var ts; return Completions.StringCompletions.getStringLiteralCompletionDetails(name, sourceFile, position, contextToken, typeChecker, compilerOptions, host, cancellationToken); } // Compute all the completion symbols again. - var symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host); + var symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); switch (symbolCompletion.type) { case "request": { var request = symbolCompletion.request; @@ -109333,7 +111016,7 @@ var ts; } case "literal": { var literal = symbolCompletion.literal; - return createSimpleDetails(completionNameForLiteral(literal), "string" /* string */, typeof literal === "string" ? ts.SymbolDisplayPartKind.stringLiteral : ts.SymbolDisplayPartKind.numericLiteral); + return createSimpleDetails(completionNameForLiteral(literal, preferences), "string" /* string */, typeof literal === "string" ? ts.SymbolDisplayPartKind.stringLiteral : ts.SymbolDisplayPartKind.numericLiteral); } case "none": // Didn't find a symbol with this name. See if we can find a keyword instead. @@ -109364,11 +111047,11 @@ var ts; } var moduleSymbol = symbolOriginInfo.moduleSymbol; var exportedSymbol = checker.getMergedSymbol(ts.skipAlias(symbol.exportSymbol || symbol, checker)); - var _a = ts.codefix.getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, getSymbolName(symbol, symbolOriginInfo, compilerOptions.target), host, program, formatContext, previousToken && ts.isIdentifier(previousToken) ? previousToken.getStart(sourceFile) : position, preferences), moduleSpecifier = _a.moduleSpecifier, codeAction = _a.codeAction; + var _a = ts.codefix.getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, ts.getNameForExportedSymbol(symbol, compilerOptions.target), host, program, formatContext, previousToken && ts.isIdentifier(previousToken) ? previousToken.getStart(sourceFile) : position, preferences), moduleSpecifier = _a.moduleSpecifier, codeAction = _a.codeAction; return { sourceDisplay: [ts.textPart(moduleSpecifier)], codeActions: [codeAction] }; } - function getCompletionEntrySymbol(program, log, sourceFile, position, entryId, host) { - var completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host); + function getCompletionEntrySymbol(program, log, sourceFile, position, entryId, host, preferences) { + var completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); return completion.type === "symbol" ? completion.symbol : undefined; } Completions.getCompletionEntrySymbol = getCompletionEntrySymbol; @@ -109493,7 +111176,7 @@ var ts; currentToken = ts.getTokenAtPosition(sourceFile, position); if (!currentToken || (!ts.isDeclarationName(currentToken) && - (currentToken.parent.kind !== 322 /* JSDocPropertyTag */ || + (currentToken.parent.kind !== 323 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken))) { // Use as type location if inside tag's type expression insideJsDocTagTypeExpression = isCurrentlyEditingNode(tag.typeExpression); @@ -109643,11 +111326,13 @@ var ts; var symbolToOriginInfoMap = []; var symbolToSortTextMap = []; var importSuggestionsCache = host.getImportSuggestionsCache && host.getImportSuggestionsCache(); + var isTypeOnly = isTypeOnlyCompletion(); if (isRightOfDot || isRightOfQuestionDot) { getTypeScriptMemberSymbols(); } else if (isRightOfOpenTag) { - var tagSymbols = ts.Debug.assertEachDefined(typeChecker.getJsxIntrinsicTagNamesAt(location), "getJsxIntrinsicTagNames() should all be defined"); + var tagSymbols = typeChecker.getJsxIntrinsicTagNamesAt(location); + ts.Debug.assertEachIsDefined(tagSymbols, "getJsxIntrinsicTagNames() should all be defined"); tryGetGlobalSymbols(); symbols = tagSymbols.concat(symbols); completionKind = 3 /* MemberLike */; @@ -109689,15 +111374,16 @@ var ts; previousToken: previousToken, isJsxInitializer: isJsxInitializer, insideJsDocTagTypeExpression: insideJsDocTagTypeExpression, - symbolToSortTextMap: symbolToSortTextMap + symbolToSortTextMap: symbolToSortTextMap, + isTypeOnlyLocation: isTypeOnly }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 321 /* JSDocTypedefTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 322 /* JSDocTypedefTag */: return true; default: return false; @@ -109722,7 +111408,8 @@ var ts; symbol = ts.skipAlias(symbol, typeChecker); if (symbol.flags & (1536 /* Module */ | 384 /* Enum */)) { // Extract module or enum members - var exportedSymbols = ts.Debug.assertEachDefined(typeChecker.getExportsOfModule(symbol), "getExportsOfModule() should all be defined"); + var exportedSymbols = typeChecker.getExportsOfModule(symbol); + ts.Debug.assertEachIsDefined(exportedSymbols, "getExportsOfModule() should all be defined"); var isValidValueAccess_1 = function (symbol) { return typeChecker.isValidPropertyAccess(isImportType ? node : (node.parent), symbol.name); }; var isValidTypeAccess_1 = function (symbol) { return symbolCanBeReferencedAtTypeLocation(symbol); }; var isValidAccess = isNamespaceName @@ -109888,8 +111575,8 @@ var ts; var attrsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes); if (!attrsType) return 0 /* Continue */; - var baseType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* BaseConstraint */); - symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, baseType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties); + var completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* Completions */); + symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties); setSortTextToOptionalMember(); completionKind = 3 /* MemberLike */; isNewIdentifierLocation = false; @@ -109933,9 +111620,9 @@ var ts; position; var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; isInSnippetScope = isSnippetScope(scopeNode); - var isTypeOnly = isTypeOnlyCompletion(); var symbolMeanings = (isTypeOnly ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */; - symbols = ts.Debug.assertEachDefined(typeChecker.getSymbolsInScope(scopeNode, symbolMeanings), "getSymbolsInScope() should all be defined"); + symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings); + ts.Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined"); for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) { var symbol = symbols_2[_i]; if (!typeChecker.isArgumentsSymbol(symbol) && @@ -110216,7 +111903,7 @@ var ts; var origin = { kind: 4 /* Export */, moduleSymbol: moduleSymbol, isDefaultExport: isDefaultExport }; results.push({ symbol: symbol, - symbolName: getSymbolName(symbol, origin, target), + symbolName: ts.getNameForExportedSymbol(symbol, target), origin: origin, skipFilter: skipFilter, }); @@ -110359,11 +112046,11 @@ var ts; var existingMembers; if (objectLikeContainer.kind === 193 /* ObjectLiteralExpression */) { var instantiatedType = typeChecker.getContextualType(objectLikeContainer); - var baseType = instantiatedType && typeChecker.getContextualType(objectLikeContainer, 4 /* BaseConstraint */); - if (!instantiatedType || !baseType) + var completionsType = instantiatedType && typeChecker.getContextualType(objectLikeContainer, 4 /* Completions */); + if (!instantiatedType || !completionsType) return 2 /* Fail */; - isNewIdentifierLocation = ts.hasIndexSignature(instantiatedType || baseType); - typeMembers = getPropertiesForObjectExpression(instantiatedType, baseType, objectLikeContainer, typeChecker); + isNewIdentifierLocation = ts.hasIndexSignature(instantiatedType || completionsType); + typeMembers = getPropertiesForObjectExpression(instantiatedType, completionsType, objectLikeContainer, typeChecker); existingMembers = objectLikeContainer.properties; } else { @@ -110405,7 +112092,7 @@ var ts; } if (typeMembers && typeMembers.length > 0) { // Add filtered items to the completion list - symbols = filterObjectMembersList(typeMembers, ts.Debug.assertDefined(existingMembers)); + symbols = filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers)); } setSortTextToOptionalMember(); return 1 /* Success */; @@ -110886,7 +112573,7 @@ var ts; } } function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind) { - var name = getSymbolName(symbol, origin, target); + var name = originIsExport(origin) ? ts.getNameForExportedSymbol(symbol, target) : symbol.name; if (name === undefined // If the symbol is external module, don't show it in the completion list // (i.e declare module "http" { const x; } | // <= request completion here, "http" should not be there) @@ -110950,6 +112637,7 @@ var ts; || kind === 135 /* ModuleKeyword */ || kind === 145 /* TypeKeyword */ || kind === 136 /* NamespaceKeyword */ + || kind === 123 /* AsKeyword */ || ts.isTypeKeyword(kind) && kind !== 146 /* UndefinedKeyword */; case 5 /* FunctionLikeBodyKeywords */: return isFunctionLikeBodyKeyword(kind); @@ -111011,6 +112699,7 @@ var ts; case 131 /* GetKeyword */: case 142 /* SetKeyword */: case 126 /* AsyncKeyword */: + case 130 /* DeclareKeyword */: return true; default: return ts.isClassMemberModifier(kind); @@ -111029,10 +112718,10 @@ var ts; var jsdoc = ts.findAncestor(node, ts.isJSDoc); return jsdoc && jsdoc.tags && (ts.rangeContainsPosition(jsdoc, position) ? ts.findLast(jsdoc.tags, function (tag) { return tag.pos < position; }) : undefined); } - function getPropertiesForObjectExpression(contextualType, baseConstrainedType, obj, checker) { - var hasBaseType = baseConstrainedType && baseConstrainedType !== contextualType; - var type = hasBaseType && !(baseConstrainedType.flags & 3 /* AnyOrUnknown */) - ? checker.getUnionType([contextualType, baseConstrainedType]) + function getPropertiesForObjectExpression(contextualType, completionsType, obj, checker) { + var hasCompletionsType = completionsType && completionsType !== contextualType; + var type = hasCompletionsType && !(completionsType.flags & 3 /* AnyOrUnknown */) + ? checker.getUnionType([contextualType, completionsType]) : contextualType; var properties = type.isUnion() ? checker.getAllPossiblePropertiesOfTypes(type.types.filter(function (memberType) { @@ -111043,7 +112732,7 @@ var ts; checker.isTypeInvalidDueToUnionDiscriminant(memberType, obj)); })) : type.getApparentProperties(); - return hasBaseType ? properties.filter(hasDeclarationOtherThanSelf) : properties; + return hasCompletionsType ? properties.filter(hasDeclarationOtherThanSelf) : properties; // Filter out members whose only declaration is the object literal itself to avoid // self-fulfilling completions like: // @@ -111059,8 +112748,8 @@ var ts; */ function getPropertiesForCompletion(type, checker) { return type.isUnion() - ? ts.Debug.assertEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") - : ts.Debug.assertEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); + ? ts.Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") + : ts.Debug.checkEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); } /** * Returns the immediate owning class declaration of a context token, @@ -111069,7 +112758,7 @@ var ts; function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { // class c { method() { } | method2() { } } switch (location.kind) { - case 323 /* SyntaxList */: + case 324 /* SyntaxList */: return ts.tryCast(location.parent, ts.isObjectTypeDeclaration); case 1 /* EndOfFileToken */: var cls = ts.tryCast(ts.lastOrUndefined(ts.cast(location.parent, ts.isSourceFile).statements), ts.isObjectTypeDeclaration); @@ -111123,6 +112812,8 @@ var ts; case "`": // Only automatically bring up completions if this is an opening quote. return !!contextToken && ts.isStringLiteralOrTemplate(contextToken) && position === contextToken.getStart(sourceFile) + 1; + case "#": + return !!contextToken && ts.isPrivateIdentifier(contextToken) && !!ts.getContainingClass(contextToken); case "<": // Opening JSX tag return !!contextToken && contextToken.kind === 29 /* LessThanToken */ && (!ts.isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent)); @@ -111686,7 +113377,7 @@ var ts; return releaseDocumentWithKey(path, key); } function releaseDocumentWithKey(path, key) { - var bucket = ts.Debug.assertDefined(buckets.get(key)); + var bucket = ts.Debug.checkDefined(buckets.get(key)); var entry = bucket.get(path); entry.languageServiceRefCount--; ts.Debug.assert(entry.languageServiceRefCount >= 0); @@ -112152,7 +113843,7 @@ var ts; } function getExportAssignmentExport(ex) { // Get the symbol for the `export =` node; its parent is the module it's the export of. - var exportingModuleSymbol = ts.Debug.assertDefined(ex.symbol.parent, "Expected export symbol to have a parent"); + var exportingModuleSymbol = ts.Debug.checkDefined(ex.symbol.parent, "Expected export symbol to have a parent"); var exportKind = ex.isExportEquals ? 2 /* ExportEquals */ : 1 /* Default */; return { kind: 1 /* Export */, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: exportKind } }; } @@ -112168,11 +113859,7 @@ var ts; default: return undefined; } - var sym = useLhsSymbol ? checker.getSymbolAtLocation(ts.cast(node.left, ts.isPropertyAccessExpression).name) : symbol; - // Better detection for GH#20803 - if (sym && !(checker.getMergedSymbol(sym.parent).flags & 1536 /* Module */)) { - ts.Debug.fail("Special property assignment kind does not have a module as its parent. Assignment is " + ts.Debug.formatSymbol(sym) + ", parent is " + ts.Debug.formatSymbol(sym.parent)); - } + var sym = useLhsSymbol ? checker.getSymbolAtLocation(ts.getNameOfAccessExpression(ts.cast(node.left, ts.isAccessExpression))) : symbol; return sym && exportInfo(sym, kind); } } @@ -112210,17 +113897,17 @@ var ts; FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol; function getExportEqualsLocalSymbol(importedSymbol, checker) { if (importedSymbol.flags & 2097152 /* Alias */) { - return ts.Debug.assertDefined(checker.getImmediateAliasedSymbol(importedSymbol)); + return ts.Debug.checkDefined(checker.getImmediateAliasedSymbol(importedSymbol)); } var decl = importedSymbol.valueDeclaration; if (ts.isExportAssignment(decl)) { // `export = class {}` - return ts.Debug.assertDefined(decl.expression.symbol); + return ts.Debug.checkDefined(decl.expression.symbol); } else if (ts.isBinaryExpression(decl)) { // `module.exports = class {}` - return ts.Debug.assertDefined(decl.right.symbol); + return ts.Debug.checkDefined(decl.right.symbol); } else if (ts.isSourceFile(decl)) { // json module - return ts.Debug.assertDefined(decl.symbol); + return ts.Debug.checkDefined(decl.symbol); } return ts.Debug.fail(); } @@ -112444,9 +114131,26 @@ var ts; undefined; } FindAllReferences.toContextSpan = toContextSpan; + var FindReferencesUse; + (function (FindReferencesUse) { + /** + * When searching for references to a symbol, the location will not be adjusted (this is the default behavior when not specified). + */ + FindReferencesUse[FindReferencesUse["Other"] = 0] = "Other"; + /** + * When searching for references to a symbol, the location will be adjusted if the cursor was on a keyword. + */ + FindReferencesUse[FindReferencesUse["References"] = 1] = "References"; + /** + * When searching for references to a symbol, the location will be adjusted if the cursor was on a keyword. + * Unlike `References`, the location will only be adjusted keyword belonged to a declaration with a valid name. + * If set, we will find fewer references -- if it is referenced by several different names, we still only find references for the original name. + */ + FindReferencesUse[FindReferencesUse["Rename"] = 2] = "Rename"; + })(FindReferencesUse = FindAllReferences.FindReferencesUse || (FindAllReferences.FindReferencesUse = {})); function findReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position) { var node = ts.getTouchingPropertyName(sourceFile, position); - var referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken); + var referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, { use: 1 /* References */ }); var checker = program.getTypeChecker(); return !referencedSymbols || !referencedSymbols.length ? undefined : ts.mapDefined(referencedSymbols, function (_a) { var definition = _a.definition, references = _a.references; @@ -112485,7 +114189,7 @@ var ts; } else { // Perform "Find all References" and retrieve only those that are implementations - return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true }); + return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true, use: 1 /* References */ }); } } function findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, convertEntry) { @@ -112584,7 +114288,7 @@ var ts; var node = entry.node, kind = entry.kind; var name = originalNode.text; var isShorthandAssignment = ts.isShorthandPropertyAssignment(node.parent); - if (isShorthandAssignment || ts.isObjectBindingElementWithoutPropertyName(node.parent)) { + if (isShorthandAssignment || ts.isObjectBindingElementWithoutPropertyName(node.parent) && node.parent.name === node) { var prefixColon = { prefixText: name + ": " }; var suffixColon = { suffixText: ": " + name }; return kind === 3 /* SearchedLocalFoundProperty */ ? prefixColon @@ -112701,12 +114405,13 @@ var ts; case 253 /* ImportEqualsDeclaration */: case 258 /* ImportSpecifier */: case 246 /* InterfaceDeclaration */: - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: case 273 /* JsxAttribute */: case 249 /* ModuleDeclaration */: case 252 /* NamespaceExportDeclaration */: case 256 /* NamespaceImport */: + case 262 /* NamespaceExport */: case 156 /* Parameter */: case 282 /* ShorthandPropertyAssignment */: case 247 /* TypeAliasDeclaration */: @@ -112727,8 +114432,8 @@ var ts; return !!decl.initializer || ts.isCatchClause(decl.parent); case 160 /* MethodSignature */: case 158 /* PropertySignature */: - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: return false; default: return ts.Debug.failBadSyntaxKind(decl); @@ -112741,6 +114446,12 @@ var ts; function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options, sourceFilesSet) { if (options === void 0) { options = {}; } if (sourceFilesSet === void 0) { sourceFilesSet = ts.arrayToSet(sourceFiles, function (f) { return f.fileName; }); } + if (options.use === 1 /* References */) { + node = ts.getAdjustedReferenceLocation(node); + } + else if (options.use === 2 /* Rename */) { + node = ts.getAdjustedRenameLocation(node); + } if (ts.isSourceFile(node)) { var reference = ts.GoToDefinition.getReferenceAtPosition(node, position, program); var moduleSymbol = reference && program.getTypeChecker().getMergedSymbol(reference.file.symbol); @@ -112903,7 +114614,7 @@ var ts; if (sourceFilesSet.has(sourceFile.fileName)) { // At `module.exports = ...`, reference node is `module` var node = ts.isBinaryExpression(decl) && ts.isPropertyAccessExpression(decl.left) ? decl.left.expression : - ts.isExportAssignment(decl) ? ts.Debug.assertDefined(ts.findChildOfKind(decl, 89 /* ExportKeyword */, sourceFile)) : + ts.isExportAssignment(decl) ? ts.Debug.checkDefined(ts.findChildOfKind(decl, 89 /* ExportKeyword */, sourceFile)) : ts.getNameOfDeclaration(decl) || decl; references.push(nodeEntry(node)); } @@ -112920,6 +114631,10 @@ var ts; /** getReferencedSymbols for special node kinds. */ function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) { if (ts.isTypeKeyword(node.kind)) { + // A void expression (i.e., `void foo()`) is not special, but the `void` type is. + if (node.kind === 110 /* VoidKeyword */ && ts.isVoidExpression(node.parent)) { + return undefined; + } // A modifier readonly (like on a property declaration) is not special; // a readonly type keyword (like `readonly string[]`) is. if (node.kind === 138 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { @@ -112962,10 +114677,10 @@ var ts; } else if (node && node.kind === 84 /* DefaultKeyword */) { addReference(node, symbol, state); - searchForImportsOfExport(node, symbol, { exportingModuleSymbol: ts.Debug.assertDefined(symbol.parent, "Expected export symbol to have a parent"), exportKind: 1 /* Default */ }, state); + searchForImportsOfExport(node, symbol, { exportingModuleSymbol: ts.Debug.checkDefined(symbol.parent, "Expected export symbol to have a parent"), exportKind: 1 /* Default */ }, state); } else { - var search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, !!options.isForRename, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] }); + var search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, options.use === 2 /* Rename */, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] }); getReferencesInContainerOrFiles(symbol, state, search); } return result; @@ -113079,7 +114794,7 @@ var ts; State.prototype.getImportSearches = function (exportSymbol, exportInfo) { if (!this.importTracker) this.importTracker = FindAllReferences.createImportTracker(this.sourceFiles, this.sourceFilesSet, this.checker, this.cancellationToken); - return this.importTracker(exportSymbol, exportInfo, !!this.options.isForRename); + return this.importTracker(exportSymbol, exportInfo, this.options.use === 2 /* Rename */); }; /** @param allSearchSymbols set of additional symbols for use by `includes`. */ State.prototype.createSearch = function (location, symbol, comingFrom, searchOptions) { @@ -113151,7 +114866,7 @@ var ts; break; case 1 /* Default */: // Search for a property access to '.default'. This can't be renamed. - indirectSearch = state.options.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" }); + indirectSearch = state.options.use === 2 /* Rename */ ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" }); break; case 2 /* ExportEquals */: break; @@ -113186,7 +114901,7 @@ var ts; function shouldAddSingleReference(singleRef, state) { if (!hasMatchingMeaning(singleRef, state)) return false; - if (!state.options.isForRename) + if (state.options.use !== 2 /* Rename */) return true; // Don't rename an import type `import("./module-name")` when renaming `name` in `export = name;` if (!ts.isIdentifier(singleRef)) @@ -113309,7 +115024,7 @@ var ts; function eachSignatureCall(signature, sourceFiles, checker, cb) { if (!signature.name || !ts.isIdentifier(signature.name)) return; - var symbol = ts.Debug.assertDefined(checker.getSymbolAtLocation(signature.name)); + var symbol = ts.Debug.checkDefined(checker.getSymbolAtLocation(signature.name)); for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) { var sourceFile = sourceFiles_3[_i]; for (var _a = 0, _b = getPossibleSymbolReferenceNodes(sourceFile, symbol.name); _a < _b.length; _a++) { @@ -113485,7 +115200,7 @@ var ts; } if (!propertyName) { // Don't rename at `export { default } from "m";`. (but do continue to search for imports of the re-export) - if (!(state.options.isForRename && (name.escapedText === "default" /* Default */))) { + if (!(state.options.use === 2 /* Rename */ && (name.escapedText === "default" /* Default */))) { addRef(); } } @@ -113495,8 +115210,8 @@ var ts; if (!exportDeclaration.moduleSpecifier) { addRef(); } - if (addReferencesHere && !state.options.isForRename && state.markSeenReExportRHS(name)) { - addReference(name, ts.Debug.assertDefined(exportSpecifier.symbol), state); + if (addReferencesHere && state.options.use !== 2 /* Rename */ && state.markSeenReExportRHS(name)) { + addReference(name, ts.Debug.checkDefined(exportSpecifier.symbol), state); } } else { @@ -113509,7 +115224,7 @@ var ts; var isDefaultExport = referenceLocation.originalKeywordKind === 84 /* DefaultKeyword */ || exportSpecifier.name.originalKeywordKind === 84 /* DefaultKeyword */; var exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */; - var exportSymbol = ts.Debug.assertDefined(exportSpecifier.symbol); + var exportSymbol = ts.Debug.checkDefined(exportSpecifier.symbol); var exportInfo = FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker); if (exportInfo) { searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); @@ -113604,7 +115319,7 @@ var ts; function addClassStaticThisReferences(referenceLocation, search, state) { addReference(referenceLocation, search.symbol, state); var classLike = referenceLocation.parent; - if (state.options.isForRename || !ts.isClassLike(classLike)) + if (state.options.use === 2 /* Rename */ || !ts.isClassLike(classLike)) return; ts.Debug.assert(classLike.name === referenceLocation); var addRef = state.referenceAdder(search.symbol); @@ -113968,11 +115683,13 @@ var ts; return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); } var exportSpecifier = ts.getDeclarationOfKind(symbol, 263 /* ExportSpecifier */); - var localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); - if (localSymbol) { - var res_3 = cbSymbol(localSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, 1 /* Node */); - if (res_3) - return res_3; + if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { + var localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); + if (localSymbol) { + var res_3 = cbSymbol(localSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, 1 /* Node */); + if (res_3) + return res_3; + } } // symbolAtLocation for a binding element is the local symbol. See if the search symbol is the property. // Don't do this when populating search set for a rename when prefix and suffix text will be provided -- just rename the local. @@ -114019,7 +115736,7 @@ var ts; function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) { var checker = state.checker; return forEachRelatedSymbol(referenceSymbol, referenceLocation, checker, /*isForRenamePopulateSearchSymbolSet*/ false, - /*onlyIncludeBindingElementAtReferenceLocation*/ !state.options.isForRename || !!state.options.providePrefixAndSuffixTextForRename, function (sym, rootSymbol, baseSymbol, kind) { return search.includes(baseSymbol || rootSymbol || sym) + /*onlyIncludeBindingElementAtReferenceLocation*/ state.options.use !== 2 /* Rename */ || !!state.options.providePrefixAndSuffixTextForRename, function (sym, rootSymbol, baseSymbol, kind) { return search.includes(baseSymbol || rootSymbol || sym) // For a base type, use the symbol for the derived type. For a synthetic (e.g. union) property, use the union symbol. ? { symbol: rootSymbol && !(ts.getCheckFlags(sym) & 6 /* Synthetic */) ? rootSymbol : sym, kind: kind } : undefined; }, @@ -114105,7 +115822,7 @@ var ts; return res.length === 0 ? undefined : res; } function isForRenameWithPrefixAndSuffixText(options) { - return options.isForRename && options.providePrefixAndSuffixTextForRename; + return options.use === 2 /* Rename */ && options.providePrefixAndSuffixTextForRename; } })(Core = FindAllReferences.Core || (FindAllReferences.Core = {})); })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {})); @@ -114169,7 +115886,7 @@ var ts; return node.name; if (isConstNamedExpression(node)) return node.parent.name; - return ts.Debug.assertDefined(node.modifiers && ts.find(node.modifiers, isDefaultModifier)); + return ts.Debug.checkDefined(node.modifiers && ts.find(node.modifiers, isDefaultModifier)); } function isDefaultModifier(node) { return node.kind === 84 /* DefaultKeyword */; @@ -114191,7 +115908,7 @@ var ts; } } var declName = isConstNamedExpression(node) ? node.parent.name : - ts.Debug.assertDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); + ts.Debug.checkDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); var text = ts.isIdentifier(declName) ? ts.idText(declName) : ts.isStringOrNumericLiteralLike(declName) ? declName.text : ts.isComputedPropertyName(declName) ? @@ -114330,16 +116047,18 @@ var ts; function isDefined(x) { return x !== undefined; } - function convertEntryToCallSite(entry, _originalNode, typeChecker) { + function convertEntryToCallSite(entry) { if (entry.kind === 1 /* Node */) { - if (ts.isCallOrNewExpressionTarget(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isTaggedTemplateTag(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isDecoratorTarget(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isJsxOpeningLikeElementTagName(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isRightSideOfPropertyAccess(entry.node) - || ts.isArgumentExpressionOfElementAccess(entry.node)) { - var ancestor = ts.findAncestor(entry.node, isValidCallHierarchyDeclaration) || entry.node.getSourceFile(); - return { declaration: ts.firstOrOnly(findImplementationOrAllInitialDeclarations(typeChecker, ancestor)), range: ts.createTextRangeFromNode(entry.node, entry.node.getSourceFile()) }; + var node = entry.node; + if (ts.isCallOrNewExpressionTarget(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isTaggedTemplateTag(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isDecoratorTarget(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isJsxOpeningLikeElementTagName(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isRightSideOfPropertyAccess(node) + || ts.isArgumentExpressionOfElementAccess(node)) { + var sourceFile = node.getSourceFile(); + var ancestor = ts.findAncestor(node, isValidCallHierarchyDeclaration) || sourceFile; + return { declaration: ancestor, range: ts.createTextRangeFromNode(node, sourceFile) }; } } } @@ -114359,7 +116078,7 @@ var ts; return []; } var location = getCallHierarchyDeclarationReferenceNode(declaration); - var calls = ts.filter(ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, program.getSourceFiles(), location, /*position*/ 0, /*options*/ undefined, convertEntryToCallSite), isDefined); + var calls = ts.filter(ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, program.getSourceFiles(), location, /*position*/ 0, { use: 1 /* References */ }, convertEntryToCallSite), isDefined); return calls ? ts.group(calls, getCallSiteGroupKey, function (entries) { return convertCallSiteGroupToIncomingCall(program, entries); }) : []; } CallHierarchy.getIncomingCalls = getIncomingCalls; @@ -114596,8 +116315,8 @@ var ts; var includes = ts.mapDefined(property.initializer.elements, function (e) { return ts.isStringLiteral(e) ? e.text : undefined; }); var matchers = ts.getFileMatcherPatterns(configDir, /*excludes*/ [], includes, useCaseSensitiveFileNames, currentDirectory); // If there isn't some include for this, add a new one. - if (ts.getRegexFromPattern(ts.Debug.assertDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && - !ts.getRegexFromPattern(ts.Debug.assertDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { + if (ts.getRegexFromPattern(ts.Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && + !ts.getRegexFromPattern(ts.Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { changeTracker.insertNodeAfter(configFile, ts.last(property.initializer.elements), ts.createStringLiteral(relativePath(newFileOrDirPath))); } } @@ -114959,6 +116678,15 @@ var ts; return aliased; } } + if (symbol && ts.isInJSFile(node)) { + var requireCall = ts.forEach(symbol.declarations, function (d) { return ts.isVariableDeclaration(d) && !!d.initializer && ts.isRequireCall(d.initializer, /*checkArgumentIsStringLiteralLike*/ true) ? d.initializer : undefined; }); + if (requireCall) { + var moduleSymbol = checker.getSymbolAtLocation(requireCall.arguments[0]); + if (moduleSymbol) { + return checker.resolveExternalModuleSymbol(moduleSymbol); + } + } + } return symbol; } // Go to the original declaration for cases: @@ -115185,11 +116913,11 @@ var ts; JsDoc.getJsDocCommentsFromDeclarations = getJsDocCommentsFromDeclarations; function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return [declaration]; - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return ts.getJSDocCommentsAndTags(declaration); @@ -115210,16 +116938,18 @@ var ts; function getCommentText(tag) { var comment = tag.comment; switch (tag.kind) { + case 308 /* JSDocImplementsTag */: + return withNode(tag.class); case 307 /* JSDocAugmentsTag */: return withNode(tag.class); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return withList(tag.typeParameters); - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: return withNode(tag.typeExpression); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: var name = tag.name; return name ? withNode(name) : comment; default: @@ -115427,6 +117157,11 @@ var ts; var parameters_2 = ts.isFunctionLike(be.right) ? be.right.parameters : ts.emptyArray; return { commentOwner: commentOwner, parameters: parameters_2 }; } + case 159 /* PropertyDeclaration */: + var init = commentOwner.initializer; + if (init && (ts.isFunctionExpression(init) || ts.isArrowFunction(init))) { + return { commentOwner: commentOwner, parameters: init.parameters }; + } } } /** @@ -115597,7 +117332,7 @@ var ts; var whiteSpaceRegex = /\s+/g; /** * Maximum amount of characters to return - * The amount was choosen arbitrarily. + * The amount was chosen arbitrarily. */ var maxLength = 150; // Keep sourceFile handy so we don't have to search for it every time we need to call `getText`. @@ -115852,6 +117587,7 @@ var ts; case 249 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; + case 259 /* ExportAssignment */: case 263 /* ExportSpecifier */: case 253 /* ImportEqualsDeclaration */: case 167 /* IndexSignature */: @@ -116189,6 +117925,8 @@ var ts; return ts.isExternalModule(sourceFile) ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\"" : ""; + case 259 /* ExportAssignment */: + return ts.isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; case 202 /* ArrowFunction */: case 244 /* FunctionDeclaration */: case 201 /* FunctionExpression */: @@ -116247,8 +117985,8 @@ var ts; case 249 /* ModuleDeclaration */: case 290 /* SourceFile */: case 247 /* TypeAliasDeclaration */: - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: return true; case 202 /* ArrowFunction */: case 244 /* FunctionDeclaration */: @@ -116566,100 +118304,114 @@ var ts; * @param importGroup a list of ImportDeclarations, all with the same module name. */ function coalesceImports(importGroup) { + var _a; if (importGroup.length === 0) { return importGroup; } - var _a = getCategorizedImports(importGroup), importWithoutClause = _a.importWithoutClause, defaultImports = _a.defaultImports, namespaceImports = _a.namespaceImports, namedImports = _a.namedImports; + var _b = getCategorizedImports(importGroup), importWithoutClause = _b.importWithoutClause, typeOnlyImports = _b.typeOnlyImports, regularImports = _b.regularImports; var coalescedImports = []; if (importWithoutClause) { coalescedImports.push(importWithoutClause); } - // Normally, we don't combine default and namespace imports, but it would be silly to - // produce two import declarations in this special case. - if (defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) { - // Add the namespace import to the existing default ImportDeclaration. - var defaultImport = defaultImports[0]; - coalescedImports.push(updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)); // TODO: GH#18217 - return coalescedImports; - } - var sortedNamespaceImports = ts.stableSort(namespaceImports, function (i1, i2) { - return compareIdentifiers(i1.importClause.namedBindings.name, i2.importClause.namedBindings.name); - }); // TODO: GH#18217 - for (var _i = 0, sortedNamespaceImports_1 = sortedNamespaceImports; _i < sortedNamespaceImports_1.length; _i++) { - var namespaceImport = sortedNamespaceImports_1[_i]; - // Drop the name, if any - coalescedImports.push(updateImportDeclarationAndClause(namespaceImport, /*name*/ undefined, namespaceImport.importClause.namedBindings)); // TODO: GH#18217 - } - if (defaultImports.length === 0 && namedImports.length === 0) { - return coalescedImports; - } - var newDefaultImport; - var newImportSpecifiers = []; - if (defaultImports.length === 1) { - newDefaultImport = defaultImports[0].importClause.name; + for (var _i = 0, _c = [regularImports, typeOnlyImports]; _i < _c.length; _i++) { + var group_2 = _c[_i]; + var isTypeOnly = group_2 === typeOnlyImports; + var defaultImports = group_2.defaultImports, namespaceImports = group_2.namespaceImports, namedImports = group_2.namedImports; + // Normally, we don't combine default and namespace imports, but it would be silly to + // produce two import declarations in this special case. + if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) { + // Add the namespace import to the existing default ImportDeclaration. + var defaultImport = defaultImports[0]; + coalescedImports.push(updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)); // TODO: GH#18217 + continue; + } + var sortedNamespaceImports = ts.stableSort(namespaceImports, function (i1, i2) { + return compareIdentifiers(i1.importClause.namedBindings.name, i2.importClause.namedBindings.name); + }); // TODO: GH#18217 + for (var _d = 0, sortedNamespaceImports_1 = sortedNamespaceImports; _d < sortedNamespaceImports_1.length; _d++) { + var namespaceImport = sortedNamespaceImports_1[_d]; + // Drop the name, if any + coalescedImports.push(updateImportDeclarationAndClause(namespaceImport, /*name*/ undefined, namespaceImport.importClause.namedBindings)); // TODO: GH#18217 + } + if (defaultImports.length === 0 && namedImports.length === 0) { + continue; + } + var newDefaultImport = void 0; + var newImportSpecifiers = []; + if (defaultImports.length === 1) { + newDefaultImport = defaultImports[0].importClause.name; + } + else { + for (var _e = 0, defaultImports_1 = defaultImports; _e < defaultImports_1.length; _e++) { + var defaultImport = defaultImports_1[_e]; + newImportSpecifiers.push(ts.createImportSpecifier(ts.createIdentifier("default"), defaultImport.importClause.name)); // TODO: GH#18217 + } + } + newImportSpecifiers.push.apply(newImportSpecifiers, ts.flatMap(namedImports, function (i) { return i.importClause.namedBindings.elements; })); // TODO: GH#18217 + var sortedImportSpecifiers = sortSpecifiers(newImportSpecifiers); + var importDecl = defaultImports.length > 0 + ? defaultImports[0] + : namedImports[0]; + var newNamedImports = sortedImportSpecifiers.length === 0 + ? newDefaultImport + ? undefined + : ts.createNamedImports(ts.emptyArray) + : namedImports.length === 0 + ? ts.createNamedImports(sortedImportSpecifiers) + : ts.updateNamedImports(namedImports[0].importClause.namedBindings, sortedImportSpecifiers); // TODO: GH#18217 + // Type-only imports are not allowed to mix default, namespace, and named imports in any combination. + // We could rewrite a default import as a named import (`import { default as name }`), but we currently + // choose not to as a stylistic preference. + if (isTypeOnly && newDefaultImport && newNamedImports) { + coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, /*namedBindings*/ undefined)); + coalescedImports.push(updateImportDeclarationAndClause((_a = namedImports[0]) !== null && _a !== void 0 ? _a : importDecl, /*name*/ undefined, newNamedImports)); + } + else { + coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)); + } } - else { - for (var _b = 0, defaultImports_1 = defaultImports; _b < defaultImports_1.length; _b++) { - var defaultImport = defaultImports_1[_b]; - newImportSpecifiers.push(ts.createImportSpecifier(ts.createIdentifier("default"), defaultImport.importClause.name)); // TODO: GH#18217 - } - } - newImportSpecifiers.push.apply(newImportSpecifiers, ts.flatMap(namedImports, function (i) { return i.importClause.namedBindings.elements; })); // TODO: GH#18217 - var sortedImportSpecifiers = sortSpecifiers(newImportSpecifiers); - var importDecl = defaultImports.length > 0 - ? defaultImports[0] - : namedImports[0]; - var newNamedImports = sortedImportSpecifiers.length === 0 - ? newDefaultImport - ? undefined - : ts.createNamedImports(ts.emptyArray) - : namedImports.length === 0 - ? ts.createNamedImports(sortedImportSpecifiers) - : ts.updateNamedImports(namedImports[0].importClause.namedBindings, sortedImportSpecifiers); // TODO: GH#18217 - coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)); return coalescedImports; - /* - * Returns entire import declarations because they may already have been rewritten and - * may lack parent pointers. The desired parts can easily be recovered based on the - * categorization. - * - * NB: There may be overlap between `defaultImports` and `namespaceImports`/`namedImports`. - */ - function getCategorizedImports(importGroup) { - var importWithoutClause; - var defaultImports = []; - var namespaceImports = []; - var namedImports = []; - for (var _i = 0, importGroup_1 = importGroup; _i < importGroup_1.length; _i++) { - var importDeclaration = importGroup_1[_i]; - if (importDeclaration.importClause === undefined) { - // Only the first such import is interesting - the others are redundant. - // Note: Unfortunately, we will lose trivia that was on this node. - importWithoutClause = importWithoutClause || importDeclaration; - continue; - } - var _a = importDeclaration.importClause, name = _a.name, namedBindings = _a.namedBindings; - if (name) { - defaultImports.push(importDeclaration); + } + OrganizeImports.coalesceImports = coalesceImports; + /* + * Returns entire import declarations because they may already have been rewritten and + * may lack parent pointers. The desired parts can easily be recovered based on the + * categorization. + * + * NB: There may be overlap between `defaultImports` and `namespaceImports`/`namedImports`. + */ + function getCategorizedImports(importGroup) { + var importWithoutClause; + var typeOnlyImports = { defaultImports: [], namespaceImports: [], namedImports: [] }; + var regularImports = { defaultImports: [], namespaceImports: [], namedImports: [] }; + for (var _i = 0, importGroup_1 = importGroup; _i < importGroup_1.length; _i++) { + var importDeclaration = importGroup_1[_i]; + if (importDeclaration.importClause === undefined) { + // Only the first such import is interesting - the others are redundant. + // Note: Unfortunately, we will lose trivia that was on this node. + importWithoutClause = importWithoutClause || importDeclaration; + continue; + } + var group_3 = importDeclaration.importClause.isTypeOnly ? typeOnlyImports : regularImports; + var _a = importDeclaration.importClause, name = _a.name, namedBindings = _a.namedBindings; + if (name) { + group_3.defaultImports.push(importDeclaration); + } + if (namedBindings) { + if (ts.isNamespaceImport(namedBindings)) { + group_3.namespaceImports.push(importDeclaration); } - if (namedBindings) { - if (ts.isNamespaceImport(namedBindings)) { - namespaceImports.push(importDeclaration); - } - else { - namedImports.push(importDeclaration); - } + else { + group_3.namedImports.push(importDeclaration); } } - return { - importWithoutClause: importWithoutClause, - defaultImports: defaultImports, - namespaceImports: namespaceImports, - namedImports: namedImports, - }; } + return { + importWithoutClause: importWithoutClause, + typeOnlyImports: typeOnlyImports, + regularImports: regularImports, + }; } - OrganizeImports.coalesceImports = coalesceImports; // Internal for testing /** * @param exportGroup a list of ExportDeclarations, all with the same module name. @@ -116668,21 +118420,24 @@ var ts; if (exportGroup.length === 0) { return exportGroup; } - var _a = getCategorizedExports(exportGroup), exportWithoutClause = _a.exportWithoutClause, namedExports = _a.namedExports; + var _a = getCategorizedExports(exportGroup), exportWithoutClause = _a.exportWithoutClause, namedExports = _a.namedExports, typeOnlyExports = _a.typeOnlyExports; var coalescedExports = []; if (exportWithoutClause) { coalescedExports.push(exportWithoutClause); } - if (namedExports.length === 0) { - return coalescedExports; + for (var _i = 0, _b = [namedExports, typeOnlyExports]; _i < _b.length; _i++) { + var exportGroup_1 = _b[_i]; + if (exportGroup_1.length === 0) { + continue; + } + var newExportSpecifiers = []; + newExportSpecifiers.push.apply(newExportSpecifiers, ts.flatMap(exportGroup_1, function (i) { return i.exportClause && ts.isNamedExports(i.exportClause) ? i.exportClause.elements : ts.emptyArray; })); + var sortedExportSpecifiers = sortSpecifiers(newExportSpecifiers); + var exportDecl = exportGroup_1[0]; + coalescedExports.push(ts.updateExportDeclaration(exportDecl, exportDecl.decorators, exportDecl.modifiers, exportDecl.exportClause && (ts.isNamedExports(exportDecl.exportClause) ? + ts.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : + ts.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), exportDecl.moduleSpecifier, exportDecl.isTypeOnly)); } - var newExportSpecifiers = []; - newExportSpecifiers.push.apply(newExportSpecifiers, ts.flatMap(namedExports, function (i) { return i.exportClause && ts.isNamedExports(i.exportClause) ? i.exportClause.elements : ts.emptyArray; })); - var sortedExportSpecifiers = sortSpecifiers(newExportSpecifiers); - var exportDecl = namedExports[0]; - coalescedExports.push(ts.updateExportDeclaration(exportDecl, exportDecl.decorators, exportDecl.modifiers, exportDecl.exportClause && (ts.isNamedExports(exportDecl.exportClause) ? - ts.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : - ts.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), exportDecl.moduleSpecifier, exportDecl.isTypeOnly)); return coalescedExports; /* * Returns entire export declarations because they may already have been rewritten and @@ -116692,13 +118447,17 @@ var ts; function getCategorizedExports(exportGroup) { var exportWithoutClause; var namedExports = []; - for (var _i = 0, exportGroup_1 = exportGroup; _i < exportGroup_1.length; _i++) { - var exportDeclaration = exportGroup_1[_i]; + var typeOnlyExports = []; + for (var _i = 0, exportGroup_2 = exportGroup; _i < exportGroup_2.length; _i++) { + var exportDeclaration = exportGroup_2[_i]; if (exportDeclaration.exportClause === undefined) { // Only the first such export is interesting - the others are redundant. // Note: Unfortunately, we will lose trivia that was on this node. exportWithoutClause = exportWithoutClause || exportDeclaration; } + else if (exportDeclaration.isTypeOnly) { + typeOnlyExports.push(exportDeclaration); + } else { namedExports.push(exportDeclaration); } @@ -116706,6 +118465,7 @@ var ts; return { exportWithoutClause: exportWithoutClause, namedExports: namedExports, + typeOnlyExports: typeOnlyExports, }; } } @@ -116749,7 +118509,8 @@ var ts; function addNodeOutliningSpans(sourceFile, cancellationToken, out) { var depthRemaining = 40; var current = 0; - var statements = sourceFile.statements; + // Includes the EOF Token so that comments which aren't attached to statements are included + var statements = __spreadArrays(sourceFile.statements, [sourceFile.endOfFileToken]); var n = statements.length; while (current < n) { while (current < n && !ts.isAnyImportSyntax(statements[current])) { @@ -116773,7 +118534,7 @@ var ts; if (depthRemaining === 0) return; cancellationToken.throwIfCancellationRequested(); - if (ts.isDeclaration(n)) { + if (ts.isDeclaration(n) || n.kind === 1 /* EndOfFileToken */) { addOutliningForLeadingCommentsForNode(n, sourceFile, cancellationToken, out); } if (isFunctionExpressionAssignedToVariable(n)) { @@ -116914,7 +118675,9 @@ var ts; return spanForNode(n.parent); } else if (tryStatement.finallyBlock === n) { - return spanForNode(ts.findChildOfKind(tryStatement, 92 /* FinallyKeyword */, sourceFile)); + var node = ts.findChildOfKind(tryStatement, 92 /* FinallyKeyword */, sourceFile); + if (node) + return spanForNode(node); } // falls through default: @@ -117807,11 +119570,14 @@ var ts; var Rename; (function (Rename) { function getRenameInfo(program, sourceFile, position, options) { - var node = ts.getTouchingPropertyName(sourceFile, position); - var renameInfo = node && nodeIsEligibleForRename(node) - ? getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, function (declaration) { return program.isSourceFileDefaultLibrary(declaration.getSourceFile()); }, options) - : undefined; - return renameInfo || getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element); + var node = ts.getAdjustedRenameLocation(ts.getTouchingPropertyName(sourceFile, position)); + if (nodeIsEligibleForRename(node)) { + var renameInfo = getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, function (declaration) { return program.isSourceFileDefaultLibrary(declaration.getSourceFile()); }, options); + if (renameInfo) { + return renameInfo; + } + } + return getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element); } Rename.getRenameInfo = getRenameInfo; function getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile, options) { @@ -117891,6 +119657,7 @@ var ts; function nodeIsEligibleForRename(node) { switch (node.kind) { case 75 /* Identifier */: + case 76 /* PrivateIdentifier */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: case 104 /* ThisKeyword */: @@ -118040,7 +119807,7 @@ var ts; // few keystrokes. if (ts.isMappedTypeNode(node)) { var _a = node.getChildren(), openBraceToken = _a[0], children = _a.slice(1); - var closeBraceToken = ts.Debug.assertDefined(children.pop()); + var closeBraceToken = ts.Debug.checkDefined(children.pop()); ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */); ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */); // Group `-/+readonly` and `-/+?` @@ -118159,7 +119926,7 @@ var ts; } function createSyntaxList(children) { ts.Debug.assertGreaterThanOrEqual(children.length, 1); - var syntaxList = ts.createNode(323 /* SyntaxList */, children[0].pos, ts.last(children).end); + var syntaxList = ts.createNode(324 /* SyntaxList */, children[0].pos, ts.last(children).end); syntaxList._children = children; return syntaxList; } @@ -118852,6 +120619,9 @@ var ts; // obviously invalid map return undefined; } + // Dont support sourcemaps that contain inlined sources + if (map.sourcesContent && map.sourcesContent.some(ts.isString)) + return undefined; return ts.createDocumentPositionMapper(host, map, mapFileName); } function createSourceFileLike(text, lineMap) { @@ -118899,23 +120669,8 @@ var ts; return diags.sort(function (d1, d2) { return d1.start - d2.start; }); function check(node) { if (isJsFile) { - switch (node.kind) { - case 201 /* FunctionExpression */: - var decl = ts.getDeclarationOfExpando(node); - if (decl) { - var symbol_1 = decl.symbol; - if (symbol_1 && (symbol_1.exports && symbol_1.exports.size || symbol_1.members && symbol_1.members.size)) { - diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); - break; - } - } - // falls through if no diagnostic was created - case 244 /* FunctionDeclaration */: - var symbol = node.symbol; - if (symbol.members && (symbol.members.size > 0)) { - diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); - } - break; + if (canBeConvertedToClass(node)) { + diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); } } else { @@ -119042,6 +120797,21 @@ var ts; function getKeyFromNode(exp) { return exp.pos.toString() + ":" + exp.end.toString(); } + function canBeConvertedToClass(node) { + var _a, _b, _c, _d; + if (node.kind === 201 /* FunctionExpression */) { + if (ts.isVariableDeclaration(node.parent) && ((_a = node.symbol.members) === null || _a === void 0 ? void 0 : _a.size)) { + return true; + } + var decl = ts.getDeclarationOfExpando(node); + var symbol = decl === null || decl === void 0 ? void 0 : decl.symbol; + return !!(symbol && (((_b = symbol.exports) === null || _b === void 0 ? void 0 : _b.size) || ((_c = symbol.members) === null || _c === void 0 ? void 0 : _c.size))); + } + if (node.kind === 244 /* FunctionDeclaration */) { + return !!((_d = node.symbol.members) === null || _d === void 0 ? void 0 : _d.size); + } + return false; + } })(ts || (ts = {})); /* @internal */ var ts; @@ -119050,9 +120820,6 @@ var ts; (function (SymbolDisplay) { // TODO(drosen): use contextual SemanticMeaning. function getSymbolKind(typeChecker, symbol, location) { - while (ts.isTypeOnlyAlias(symbol)) { - symbol = symbol.immediateTarget; - } var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location); if (result !== "" /* unknown */) { return result; @@ -119170,9 +120937,6 @@ var ts; // TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning, alias) { if (semanticMeaning === void 0) { semanticMeaning = ts.getMeaningFromLocation(location); } - while (ts.isTypeOnlyAlias(symbol)) { - symbol = symbol.immediateTarget; - } var displayParts = []; var documentation = []; var tags = []; @@ -119814,11 +121578,11 @@ var ts; this.options = options; } FormattingContext.prototype.updateContext = function (currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) { - this.currentTokenSpan = ts.Debug.assertDefined(currentRange); - this.currentTokenParent = ts.Debug.assertDefined(currentTokenParent); - this.nextTokenSpan = ts.Debug.assertDefined(nextRange); - this.nextTokenParent = ts.Debug.assertDefined(nextTokenParent); - this.contextNode = ts.Debug.assertDefined(commonParent); + this.currentTokenSpan = ts.Debug.checkDefined(currentRange); + this.currentTokenParent = ts.Debug.checkDefined(currentTokenParent); + this.nextTokenSpan = ts.Debug.checkDefined(nextRange); + this.nextTokenParent = ts.Debug.checkDefined(nextTokenParent); + this.contextNode = ts.Debug.checkDefined(commonParent); // drop cached results this.contextNodeAllOnSameLine = undefined; this.nextNodeAllOnSameLine = undefined; @@ -119973,7 +121737,14 @@ var ts; return false; } function shouldRescanJsxText(node) { - return node.kind === 11 /* JsxText */; + var isJSXText = ts.isJsxText(node); + if (isJSXText) { + var containingElement = ts.findAncestor(node.parent, function (p) { return ts.isJsxElement(p); }); + if (!containingElement) + return false; // should never happen + return !ts.isParenthesizedExpression(containingElement.parent); + } + return false; } function shouldRescanSlashToken(container) { return container.kind === 13 /* RegularExpressionLiteral */; @@ -120062,7 +121833,7 @@ var ts; case 3 /* RescanTemplateToken */: if (token === 19 /* CloseBraceToken */) { lastScanAction = 3 /* RescanTemplateToken */; - return scanner.reScanTemplateToken(); + return scanner.reScanTemplateToken(/* isTaggedTemplate */ false); } break; case 4 /* RescanJsxIdentifier */: @@ -120337,7 +122108,7 @@ var ts; // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses rule("SpaceAfterConstructor", 129 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), rule("NoSpaceAfterConstructor", 129 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("SpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket], 4 /* InsertSpace */), + rule("SpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket, isNextTokenNotCloseParen], 4 /* InsertSpace */), rule("NoSpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext], 16 /* DeleteSpace */), // Insert space after function keyword for anonymous functions rule("SpaceAfterAnonymousFunctionKeyword", [94 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 4 /* InsertSpace */), @@ -120686,6 +122457,9 @@ var ts; function isNextTokenNotCloseBracket(context) { return context.nextTokenSpan.kind !== 23 /* CloseBracketToken */; } + function isNextTokenNotCloseParen(context) { + return context.nextTokenSpan.kind !== 21 /* CloseParenToken */; + } function isArrowFunctionContext(context) { return context.contextNode.kind === 202 /* ArrowFunction */; } @@ -121186,7 +122960,7 @@ var ts; } var error = sorted[index]; if (r.end <= error.start) { - // specified range ends before the error refered by 'index' - no error in range + // specified range ends before the error referred by 'index' - no error in range return false; } if (ts.startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { @@ -121488,6 +123262,11 @@ var ts; if (tokenInfo.token.end > node.end) { break; } + if (node.kind === 11 /* JsxText */) { + // Intentation rules for jsx text are handled by `indentMultilineCommentOrJsxText` inside `processChildNode`; just fastforward past it here + formattingScanner.advance(); + continue; + } consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node); } if (!node.parent && formattingScanner.isOnEOF()) { @@ -121546,7 +123325,19 @@ var ts; processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); if (child.kind === 11 /* JsxText */) { var range = { pos: child.getStart(), end: child.getEnd() }; - indentMultilineCommentOrJsxText(range, childIndentation.indentation, /*firstLineIsIndented*/ true, /*indentFinalLine*/ false); + if (range.pos !== range.end) { // don't indent zero-width jsx text + var siblings = parent.getChildren(sourceFile); + var currentIndex = ts.findIndex(siblings, function (arg) { return arg.pos === child.pos; }); + var previousNode = siblings[currentIndex - 1]; + if (previousNode) { + // The jsx text needs no indentation whatsoever if it ends on the same line the previous sibling ends on + if (sourceFile.getLineAndCharacterOfPosition(range.end).line !== sourceFile.getLineAndCharacterOfPosition(previousNode.end).line) { + // The first line is (already) "indented" if the text starts on the same line as the previous sibling element ends on + var firstLineIsIndented = sourceFile.getLineAndCharacterOfPosition(range.pos).line === sourceFile.getLineAndCharacterOfPosition(previousNode.end).line; + indentMultilineCommentOrJsxText(range, childIndentation.indentation, firstLineIsIndented, /*indentFinalLine*/ false, /*jsxStyle*/ true); + } + } + } } childContextNode = node; if (isFirstListItem && parent.kind === 192 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { @@ -121600,8 +123391,11 @@ var ts; if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(parent); if (tokenInfo.token.kind === 27 /* CommaToken */ && ts.isCallLikeExpression(parent)) { - formattingScanner.advance(); - tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent) : undefined; + var commaTokenLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; + if (startLine !== commaTokenLine) { + formattingScanner.advance(); + tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent) : undefined; + } } // consume the list end token only if it is still belong to the parent // there might be the case when current token matches end token but does not considered as one @@ -121787,7 +123581,7 @@ var ts; function indentationIsDifferent(indentationString, startLinePosition) { return indentationString !== sourceFile.text.substr(startLinePosition, indentationString.length); } - function indentMultilineCommentOrJsxText(commentRange, indentation, firstLineIsIndented, indentFinalLine) { + function indentMultilineCommentOrJsxText(commentRange, indentation, firstLineIsIndented, indentFinalLine, jsxTextStyleIndent) { if (indentFinalLine === void 0) { indentFinalLine = true; } // split comment in lines var startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; @@ -121813,7 +123607,7 @@ var ts; return; var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); var nonWhitespaceColumnInFirstPart = formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); - if (indentation === nonWhitespaceColumnInFirstPart.column) { + if (indentation === nonWhitespaceColumnInFirstPart.column && !jsxTextStyleIndent) { return; } var startIndex = 0; @@ -121828,6 +123622,13 @@ var ts; var nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); + if (jsxTextStyleIndent) { + // skip adding indentation to blank lines + if (ts.isLineBreak(sourceFile.text.charCodeAt(ts.getStartPositionOfLine(startLine, sourceFile)))) + continue; + // reset delta on every line + delta = indentation - nonWhitespaceCharacterAndColumn.column; + } var newIndentation = nonWhitespaceCharacterAndColumn.column + delta; if (newIndentation > 0) { var indentationString = getIndentationString(newIndentation, options); @@ -122389,7 +124190,7 @@ var ts; case 214 /* ClassExpression */: case 246 /* InterfaceDeclaration */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return getList(node.typeParameters); case 197 /* NewExpression */: case 196 /* CallExpression */: @@ -123608,25 +125409,47 @@ var ts; position = shebang.length; advancePastLineBreak(); } - // For a source file, it is possible there are detached comments we should not skip var ranges = ts.getLeadingCommentRanges(text, position); if (!ranges) return position; - // However we should still skip a pinned comment at the top - if (ranges.length && ranges[0].kind === 3 /* MultiLineCommentTrivia */ && ts.isPinnedComment(text, ranges[0].pos)) { - position = ranges[0].end; - advancePastLineBreak(); - ranges = ranges.slice(1); - } - // As well as any triple slash references + // Find the first attached comment to the first node and add before it + var lastComment; + var firstNodeLine; for (var _b = 0, ranges_1 = ranges; _b < ranges_1.length; _b++) { var range = ranges_1[_b]; - if (range.kind === 2 /* SingleLineCommentTrivia */ && ts.isRecognizedTripleSlashComment(text, range.pos, range.end)) { - position = range.end; - advancePastLineBreak(); + if (range.kind === 3 /* MultiLineCommentTrivia */) { + if (ts.isPinnedComment(text, range.pos)) { + lastComment = { range: range, pinnedOrTripleSlash: true }; + continue; + } + } + else if (ts.isRecognizedTripleSlashComment(text, range.pos, range.end)) { + lastComment = { range: range, pinnedOrTripleSlash: true }; continue; } - break; + if (lastComment) { + // Always insert after pinned or triple slash comments + if (lastComment.pinnedOrTripleSlash) + break; + // There was a blank line between the last comment and this comment. + // This comment is not part of the copyright comments + var commentLine = sourceFile.getLineAndCharacterOfPosition(range.pos).line; + var lastCommentEndLine = sourceFile.getLineAndCharacterOfPosition(lastComment.range.end).line; + if (commentLine >= lastCommentEndLine + 2) + break; + } + if (sourceFile.statements.length) { + if (firstNodeLine === undefined) + firstNodeLine = sourceFile.getLineAndCharacterOfPosition(sourceFile.statements[0].getStart()).line; + var commentEndLine = sourceFile.getLineAndCharacterOfPosition(range.end).line; + if (firstNodeLine < commentEndLine + 2) + break; + } + lastComment = { range: range, pinnedOrTripleSlash: false }; + } + if (lastComment) { + position = lastComment.range.end; + advancePastLineBreak(); } return position; function advancePastLineBreak() { @@ -123669,9 +125492,10 @@ var ts; break; } case 254 /* ImportDeclaration */: + var isFirstImport = sourceFile.imports.length && node === ts.first(sourceFile.imports).parent || node === ts.find(sourceFile.statements, ts.isImportDeclaration); deleteNode(changes, sourceFile, node, // For first import, leave header comment in place - node === sourceFile.imports[0].parent ? { leadingTriviaOption: LeadingTriviaOption.Exclude } : undefined); + isFirstImport ? { leadingTriviaOption: LeadingTriviaOption.Exclude } : undefined); break; case 191 /* BindingElement */: var pattern = node.parent; @@ -123738,7 +125562,7 @@ var ts; // Delete named imports while preserving the default import // import d|, * as ns| from './file' // import d|, { a }| from './file' - var previousToken = ts.Debug.assertDefined(ts.getTokenAtPosition(sourceFile, node.pos - 1)); + var previousToken = ts.Debug.checkDefined(ts.getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { @@ -123787,7 +125611,7 @@ var ts; } textChanges_3.deleteNode = deleteNode; function deleteNodeInList(changes, deletedNodesInLists, sourceFile, node) { - var containingList = ts.Debug.assertDefined(ts.formatting.SmartIndenter.getContainingList(node, sourceFile)); + var containingList = ts.Debug.checkDefined(ts.formatting.SmartIndenter.getContainingList(node, sourceFile)); var index = ts.indexOfNode(containingList, node); ts.Debug.assert(index !== -1); if (containingList.length === 1) { @@ -123946,7 +125770,7 @@ var ts; }); function makeChange(changeTracker, sourceFile, pos) { var token = ts.getTokenAtPosition(sourceFile, pos); - var assertion = ts.Debug.assertDefined(ts.findAncestor(token, function (n) { return ts.isAsExpression(n) || ts.isTypeAssertion(n); }), "Expected to find an assertion expression"); + var assertion = ts.Debug.checkDefined(ts.findAncestor(token, function (n) { return ts.isAsExpression(n) || ts.isTypeAssertion(n); }), "Expected to find an assertion expression"); var replacement = ts.isAsExpression(assertion) ? ts.createAsExpression(assertion.expression, ts.createKeywordTypeNode(148 /* UnknownKeyword */)) : ts.createTypeAssertion(ts.createKeywordTypeNode(148 /* UnknownKeyword */), assertion.expression); @@ -123978,6 +125802,87 @@ var ts; })(ts || (ts = {})); /* @internal */ var ts; +(function (ts) { + var codefix; + (function (codefix) { + var fixId = "addMissingAsync"; + var errorCodes = [ + ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + ts.Diagnostics.Type_0_is_not_assignable_to_type_1.code, + ts.Diagnostics.Type_0_is_not_comparable_to_type_1.code + ]; + codefix.registerCodeFix({ + fixIds: [fixId], + errorCodes: errorCodes, + getCodeActions: function (context) { + var sourceFile = context.sourceFile, errorCode = context.errorCode, cancellationToken = context.cancellationToken, program = context.program, span = context.span; + var diagnostic = ts.find(program.getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile, cancellationToken), getIsMatchingAsyncError(span, errorCode)); + var directSpan = diagnostic && diagnostic.relatedInformation && ts.find(diagnostic.relatedInformation, function (r) { return r.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + var decl = getFixableErrorSpanDeclaration(sourceFile, directSpan); + if (!decl) { + return; + } + var trackChanges = function (cb) { return ts.textChanges.ChangeTracker.with(context, cb); }; + return [getFix(context, decl, trackChanges)]; + }, + getAllCodeActions: function (context) { + var sourceFile = context.sourceFile; + var fixedDeclarations = ts.createMap(); + return codefix.codeFixAll(context, errorCodes, function (t, diagnostic) { + var span = diagnostic.relatedInformation && ts.find(diagnostic.relatedInformation, function (r) { return r.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + var decl = getFixableErrorSpanDeclaration(sourceFile, span); + if (!decl) { + return; + } + var trackChanges = function (cb) { return (cb(t), []); }; + return getFix(context, decl, trackChanges, fixedDeclarations); + }); + }, + }); + function getFix(context, decl, trackChanges, fixedDeclarations) { + var changes = trackChanges(function (t) { return makeChange(t, context.sourceFile, decl, fixedDeclarations); }); + return codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_async_modifier_to_containing_function, fixId, ts.Diagnostics.Add_all_missing_async_modifiers); + } + function makeChange(changeTracker, sourceFile, insertionSite, fixedDeclarations) { + if (fixedDeclarations) { + if (fixedDeclarations.has(ts.getNodeId(insertionSite).toString())) { + return; + } + } + fixedDeclarations === null || fixedDeclarations === void 0 ? void 0 : fixedDeclarations.set(ts.getNodeId(insertionSite).toString(), true); + var cloneWithModifier = ts.getSynthesizedDeepClone(insertionSite, /*includeTrivia*/ true); + cloneWithModifier.modifiers = ts.createNodeArray(ts.createModifiersFromModifierFlags(ts.getModifierFlags(insertionSite) | 256 /* Async */)); + cloneWithModifier.modifierFlagsCache = 0; + changeTracker.replaceNode(sourceFile, insertionSite, cloneWithModifier); + } + function getFixableErrorSpanDeclaration(sourceFile, span) { + if (!span) + return undefined; + var token = ts.getTokenAtPosition(sourceFile, span.start); + // Checker has already done work to determine that async might be possible, and has attached + // related info to the node, so start by finding the signature that exactly matches up + // with the diagnostic range. + var decl = ts.findAncestor(token, function (node) { + if (node.getStart(sourceFile) < span.start || node.getEnd() > ts.textSpanEnd(span)) { + return "quit"; + } + return (ts.isArrowFunction(node) || ts.isMethodDeclaration(node) || ts.isFunctionExpression(node) || ts.isFunctionDeclaration(node)) && ts.textSpansEqual(span, ts.createTextSpanFromNode(node, sourceFile)); + }); + return decl; + } + function getIsMatchingAsyncError(span, errorCode) { + return function (_a) { + var start = _a.start, length = _a.length, relatedInformation = _a.relatedInformation, code = _a.code; + return ts.isNumber(start) && ts.isNumber(length) && ts.textSpansEqual({ start: start, length: length }, span) && + code === errorCode && + !!relatedInformation && + ts.some(relatedInformation, function (related) { return related.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + }; + } + })(codefix = ts.codefix || (ts.codefix = {})); +})(ts || (ts = {})); +/* @internal */ +var ts; (function (ts) { var codefix; (function (codefix) { @@ -124496,7 +126401,7 @@ var ts; } } else { - var jsdocType = ts.Debug.assertDefined(ts.getJSDocType(decl), "A JSDocType for this declaration should exist"); // If not defined, shouldn't have been an error to fix + var jsdocType = ts.Debug.checkDefined(ts.getJSDocType(decl), "A JSDocType for this declaration should exist"); // If not defined, shouldn't have been an error to fix ts.Debug.assert(!decl.type, "The JSDocType decl should have a type"); // If defined, shouldn't have been an error to fix. changes.tryInsertTypeAnnotation(sourceFile, decl, transformJSDocType(jsdocType)); } @@ -124635,20 +126540,20 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; + var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, preferences = context.preferences; var token = ts.getTokenAtPosition(sourceFile, start); var declaration; - var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, formatContext, preferences); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, preferences); }); var name = declaration && ts.getNameOfDeclaration(declaration); return !name || changes.length === 0 ? undefined : [codefix.createCodeFixAction(fixId, changes, [getDiagnostic(errorCode, token), name.getText(sourceFile)], fixId, ts.Diagnostics.Infer_all_types_from_usage)]; }, fixIds: [fixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; + var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, preferences = context.preferences; var markSeen = ts.nodeSeenTracker(); return codefix.codeFixAll(context, errorCodes, function (changes, err) { - doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, formatContext, preferences); + doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, preferences); }); }, }); @@ -124688,18 +126593,20 @@ var ts; } return errorCode; } - function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, formatContext, preferences) { + function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, preferences) { if (!ts.isParameterPropertyModifier(token.kind) && token.kind !== 75 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 104 /* ThisKeyword */) { return undefined; } var parent = token.parent; + var importAdder = codefix.createImportAdder(sourceFile, program, preferences, host); errorCode = mapSuggestionDiagnostic(errorCode); switch (errorCode) { // Variable and Property declarations case ts.Diagnostics.Member_0_implicitly_has_an_1_type.code: case ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: if ((ts.isVariableDeclaration(parent) && markSeen(parent)) || ts.isPropertyDeclaration(parent) || ts.isPropertySignature(parent)) { // handle bad location - annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken, formatContext, preferences); + annotateVariableDeclaration(changes, importAdder, sourceFile, parent, program, host, cancellationToken); + importAdder.writeFixes(changes); return parent; } if (ts.isPropertyAccessExpression(parent)) { @@ -124710,13 +126617,15 @@ var ts; var typeTag = ts.createJSDocTypeTag(ts.createJSDocTypeExpression(typeNode), /*comment*/ ""); addJSDocTags(changes, sourceFile, ts.cast(parent.parent.parent, ts.isExpressionStatement), [typeTag]); } + importAdder.writeFixes(changes); return parent; } return undefined; case ts.Diagnostics.Variable_0_implicitly_has_an_1_type.code: { var symbol = program.getTypeChecker().getSymbolAtLocation(token); if (symbol && symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) { - annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken, formatContext, preferences); + annotateVariableDeclaration(changes, importAdder, sourceFile, symbol.valueDeclaration, program, host, cancellationToken); + importAdder.writeFixes(changes); return symbol.valueDeclaration; } return undefined; @@ -124726,53 +126635,57 @@ var ts; if (containingFunction === undefined) { return undefined; } + var declaration; switch (errorCode) { // Parameter declarations case ts.Diagnostics.Parameter_0_implicitly_has_an_1_type.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); - return containingFunction; + annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); + declaration = containingFunction; + break; } // falls through case ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: if (markSeen(containingFunction)) { var param = ts.cast(parent, ts.isParameter); - annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken, formatContext, preferences); - return param; + annotateParameters(changes, importAdder, sourceFile, param, containingFunction, program, host, cancellationToken); + declaration = param; } - return undefined; + break; // Get Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: case ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: if (ts.isGetAccessorDeclaration(containingFunction) && ts.isIdentifier(containingFunction.name)) { - annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host, formatContext, preferences); - return containingFunction; + annotate(changes, importAdder, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host); + declaration = containingFunction; } - return undefined; + break; // Set Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); - return containingFunction; + annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); + declaration = containingFunction; } - return undefined; + break; // Function 'this' case ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: if (ts.textChanges.isThisTypeAnnotatable(containingFunction) && markSeen(containingFunction)) { annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken); - return containingFunction; + declaration = containingFunction; } - return undefined; + break; default: return ts.Debug.fail(String(errorCode)); } + importAdder.writeFixes(changes); + return declaration; } - function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken, formatContext, preferences) { + function annotateVariableDeclaration(changes, importAdder, sourceFile, declaration, program, host, cancellationToken) { if (ts.isIdentifier(declaration.name)) { - annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host); } } - function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken, formatContext, preferences) { + function annotateParameters(changes, importAdder, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) { if (!ts.isIdentifier(parameterDeclaration.name)) { return; } @@ -124788,7 +126701,7 @@ var ts; for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) { var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type; if (declaration && !declaration.type && !declaration.initializer) { - annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, declaration, type, program, host); } } if (needParens) @@ -124817,7 +126730,7 @@ var ts; ts.createJSDocThisTag(ts.createJSDocTypeExpression(typeNode)), ]); } - function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken, formatContext, preferences) { + function annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclaration, program, host, cancellationToken) { var param = ts.firstOrUndefined(setAccessorDeclaration.parameters); if (param && ts.isIdentifier(setAccessorDeclaration.name) && ts.isIdentifier(param.name)) { var type = inferTypeForVariableFromUsage(setAccessorDeclaration.name, program, cancellationToken); @@ -124828,11 +126741,11 @@ var ts; annotateJSDocParameters(changes, sourceFile, [{ declaration: param, type: type }], program, host); } else { - annotate(changes, sourceFile, param, type, program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, param, type, program, host); } } } - function annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences) { + function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { var typeNode = ts.getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { if (ts.isInJSFile(sourceFile) && declaration.kind !== 158 /* PropertySignature */) { @@ -124844,29 +126757,16 @@ var ts; var typeTag = ts.isGetAccessorDeclaration(declaration) ? ts.createJSDocReturnTag(typeExpression, "") : ts.createJSDocTypeTag(typeExpression, ""); addJSDocTags(changes, sourceFile, parent, [typeTag]); } - else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences)) { + else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, type, sourceFile, changes, importAdder, ts.getEmitScriptTarget(program.getCompilerOptions()))) { changes.tryInsertTypeAnnotation(sourceFile, declaration, typeNode); } } } - function tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences) { - var _a; - if (ts.isLiteralImportTypeNode(typeNode) && typeNode.qualifier && type.symbol) { - // Replace 'import("./a").SomeType' with 'SomeType' and an actual import if possible - var moduleSymbol = (_a = ts.find(type.symbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) === null || _a === void 0 ? void 0 : _a.getSourceFile().symbol; - // Symbol for the left-most thing after the dot - if (moduleSymbol) { - var symbol = ts.getFirstIdentifier(typeNode.qualifier).symbol; - var action = codefix.getImportCompletionAction(symbol, moduleSymbol, sourceFile, symbol.name, host, program, formatContext, declaration.pos, preferences); - if (action.codeAction.changes.length && changes.tryInsertTypeAnnotation(sourceFile, declaration, ts.createTypeReferenceNode(typeNode.qualifier, typeNode.typeArguments))) { - for (var _i = 0, _b = action.codeAction.changes; _i < _b.length; _i++) { - var change = _b[_i]; - var file = sourceFile.fileName === change.fileName ? sourceFile : ts.Debug.assertDefined(program.getSourceFile(change.fileName)); - changes.pushRaw(file, change); - } - return true; - } - } + function tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, type, sourceFile, changes, importAdder, scriptTarget) { + var importableReference = codefix.tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget); + if (importableReference && changes.tryInsertTypeAnnotation(sourceFile, declaration, importableReference.typeReference)) { + ts.forEach(importableReference.symbols, function (s) { return importAdder.addImportFromExportedSymbol(s, /*usageIsTypeOnly*/ true); }); + return true; } return false; } @@ -124913,14 +126813,14 @@ var ts; return undefined; } switch (oldTag.kind) { - case 316 /* JSDocParameterTag */: { + case 317 /* JSDocParameterTag */: { var oldParam = oldTag; var newParam = newTag; return ts.isIdentifier(oldParam.name) && ts.isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? ts.createJSDocParamTag(newParam.name, newParam.isBracketed, newParam.typeExpression, oldParam.comment) : undefined; } - case 317 /* JSDocReturnTag */: + case 318 /* JSDocReturnTag */: return ts.createJSDocReturnTag(newTag.typeExpression, oldTag.comment); } } @@ -125443,7 +127343,7 @@ var ts; var callSignatures = usage.calls ? [getSignatureFromCalls(usage.calls)] : []; var constructSignatures = usage.constructs ? [getSignatureFromCalls(usage.constructs)] : []; var stringIndexInfo = usage.stringIndex && checker.createIndexInfo(combineFromUsage(usage.stringIndex), /*isReadonly*/ false); - return checker.createAnonymousType(/*symbol*/ undefined, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined); // TODO: GH#18217 + return checker.createAnonymousType(/*symbol*/ undefined, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined); } function inferNamedTypesFromProperties(usage) { if (!usage.properties || !usage.properties.size) @@ -125543,7 +127443,7 @@ var ts; return types; } function getFunctionFromCalls(calls) { - return checker.createAnonymousType(undefined, ts.createSymbolTable(), [getSignatureFromCalls(calls)], ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); + return checker.createAnonymousType(/*symbol*/ undefined, ts.createSymbolTable(), [getSignatureFromCalls(calls)], ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); } function getSignatureFromCalls(calls) { var parameters = []; @@ -126850,7 +128750,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile, span = context.span; var classDeclaration = getClass(sourceFile, span.start); - return ts.mapDefined(ts.getClassImplementsHeritageClauseElements(classDeclaration), function (implementedTypeNode) { + return ts.mapDefined(ts.getEffectiveImplementsTypeNodes(classDeclaration), function (implementedTypeNode) { var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, t, context.preferences); }); return changes.length === 0 ? undefined : codefix.createCodeFixAction(fixId, changes, [ts.Diagnostics.Implement_interface_0, implementedTypeNode.getText(sourceFile)], fixId, ts.Diagnostics.Implement_all_unimplemented_interfaces); }); @@ -126861,7 +128761,7 @@ var ts; return codefix.codeFixAll(context, errorCodes, function (changes, diag) { var classDeclaration = getClass(diag.file, diag.start); if (ts.addToSeen(seenClassDeclarations, ts.getNodeId(classDeclaration))) { - for (var _i = 0, _a = ts.getClassImplementsHeritageClauseElements(classDeclaration); _i < _a.length; _i++) { + for (var _i = 0, _a = ts.getEffectiveImplementsTypeNodes(classDeclaration); _i < _a.length; _i++) { var implementedTypeNode = _a[_i]; addMissingDeclarations(context, implementedTypeNode, diag.file, classDeclaration, changes, context.preferences); } @@ -126870,7 +128770,7 @@ var ts; }, }); function getClass(sourceFile, pos) { - return ts.Debug.assertDefined(ts.getContainingClass(ts.getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); + return ts.Debug.checkDefined(ts.getContainingClass(ts.getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); } function symbolPointsToNonPrivateMember(symbol) { return !symbol.valueDeclaration || !(ts.getModifierFlags(symbol.valueDeclaration) & 8 /* Private */); @@ -126891,7 +128791,9 @@ var ts; if (!classType.getStringIndexType()) { createMissingIndexSignatureDeclaration(implementedType, 0 /* String */); } - codefix.createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, function (member) { return insertInterfaceMemberNode(sourceFile, classDeclaration, member); }); + var importAdder = codefix.createImportAdder(sourceFile, context.program, preferences, context.host); + codefix.createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, importAdder, function (member) { return insertInterfaceMemberNode(sourceFile, classDeclaration, member); }); + importAdder.writeFixes(changeTracker); function createMissingIndexSignatureDeclaration(type, kind) { var indexInfoOfKind = checker.getIndexInfoOfType(type, kind); if (indexInfoOfKind) { @@ -126947,111 +128849,115 @@ var ts; }, fixIds: [importFixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, preferences = context.preferences; - // Namespace fixes don't conflict, so just build a list. - var addToNamespace = []; - var importType = []; - // Keys are import clause node IDs. - var addToExisting = ts.createMap(); - var newImports = createNewImportMap(); - codefix.eachDiagnostic(context, errorCodes, function (diag) { - var info = getFixesInfo(context, diag.code, diag.start); - if (!info || !info.fixes.length) - return; - var fixes = info.fixes, symbolName = info.symbolName; - var fix = ts.first(fixes); - switch (fix.kind) { - case 0 /* UseNamespace */: - addToNamespace.push(fix); - break; - case 1 /* ImportType */: - importType.push(fix); - break; - case 2 /* AddToExisting */: { - var importClause = fix.importClause, importKind = fix.importKind; - var key = String(ts.getNodeId(importClause)); - var entry = addToExisting.get(key); - if (!entry) { - addToExisting.set(key, entry = { importClause: importClause, defaultImport: undefined, namedImports: [] }); - } - if (importKind === 0 /* Named */) { - ts.pushIfUnique(entry.namedImports, symbolName); - } - else { - ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add to Existing) Default import should be missing or match symbolName"); - entry.defaultImport = symbolName; - } - break; + var sourceFile = context.sourceFile, program = context.program, preferences = context.preferences, host = context.host; + var importAdder = createImportAdder(sourceFile, program, preferences, host); + codefix.eachDiagnostic(context, errorCodes, function (diag) { return importAdder.addImportFromDiagnostic(diag, context); }); + return codefix.createCombinedCodeActions(ts.textChanges.ChangeTracker.with(context, importAdder.writeFixes)); + }, + }); + function createImportAdder(sourceFile, program, preferences, host) { + var compilerOptions = program.getCompilerOptions(); + // Namespace fixes don't conflict, so just build a list. + var addToNamespace = []; + var importType = []; + // Keys are import clause node IDs. + var addToExisting = ts.createMap(); + var newImports = ts.createMap(); + var lastModuleSpecifier; + return { addImportFromDiagnostic: addImportFromDiagnostic, addImportFromExportedSymbol: addImportFromExportedSymbol, writeFixes: writeFixes }; + function addImportFromDiagnostic(diagnostic, context) { + var info = getFixesInfo(context, diagnostic.code, diagnostic.start); + if (!info || !info.fixes.length) + return; + addImport(info); + } + function addImportFromExportedSymbol(exportedSymbol, usageIsTypeOnly) { + var moduleSymbol = ts.Debug.checkDefined(exportedSymbol.parent); + var symbolName = ts.getNameForExportedSymbol(exportedSymbol, ts.getEmitScriptTarget(compilerOptions)); + var checker = program.getTypeChecker(); + var symbol = checker.getMergedSymbol(ts.skipAlias(exportedSymbol, checker)); + var exportInfos = getAllReExportingModules(sourceFile, symbol, moduleSymbol, symbolName, sourceFile, compilerOptions, checker, program.getSourceFiles()); + var preferTypeOnlyImport = !!usageIsTypeOnly && compilerOptions.importsNotUsedAsValues === 2 /* Error */; + var fix = getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, /*position*/ undefined, preferTypeOnlyImport, host, preferences); + addImport({ fixes: [fix], symbolName: symbolName }); + } + function addImport(info) { + var fixes = info.fixes, symbolName = info.symbolName; + var fix = ts.first(fixes); + switch (fix.kind) { + case 0 /* UseNamespace */: + addToNamespace.push(fix); + break; + case 1 /* ImportType */: + importType.push(fix); + break; + case 2 /* AddToExisting */: { + var importClause = fix.importClause, importKind = fix.importKind, canUseTypeOnlyImport = fix.canUseTypeOnlyImport; + var key = String(ts.getNodeId(importClause)); + var entry = addToExisting.get(key); + if (!entry) { + addToExisting.set(key, entry = { importClause: importClause, defaultImport: undefined, namedImports: [], canUseTypeOnlyImport: canUseTypeOnlyImport }); } - case 3 /* AddNew */: { - var moduleSpecifier = fix.moduleSpecifier, importKind = fix.importKind, typeOnly = fix.typeOnly; - var entry = newImports.get(moduleSpecifier, typeOnly); - if (!entry) { - newImports.set(moduleSpecifier, typeOnly, entry = { defaultImport: undefined, namedImports: [], namespaceLikeImport: undefined }); - } - switch (importKind) { - case 1 /* Default */: - ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add new) Default import should be missing or match symbolName"); - entry.defaultImport = symbolName; - break; - case 0 /* Named */: - ts.pushIfUnique(entry.namedImports, symbolName); - break; - case 3 /* Equals */: - case 2 /* Namespace */: - ts.Debug.assert(entry.namespaceLikeImport === undefined || entry.namespaceLikeImport.name === symbolName, "Namespacelike import shoudl be missing or match symbolName"); - entry.namespaceLikeImport = { importKind: importKind, name: symbolName }; - break; - } - break; + if (importKind === 0 /* Named */) { + ts.pushIfUnique(entry.namedImports, symbolName); } - default: - ts.Debug.assertNever(fix, "fix wasn't never - got kind " + fix.kind); + else { + ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add to Existing) Default import should be missing or match symbolName"); + entry.defaultImport = symbolName; + } + break; + } + case 3 /* AddNew */: { + var moduleSpecifier = fix.moduleSpecifier, importKind = fix.importKind, typeOnly = fix.typeOnly; + var entry = newImports.get(moduleSpecifier); + if (!entry) { + newImports.set(moduleSpecifier, entry = { defaultImport: undefined, namedImports: [], namespaceLikeImport: undefined, typeOnly: typeOnly }); + lastModuleSpecifier = moduleSpecifier; + } + else { + // An import clause can only be type-only if every import fix contributing to it can be type-only. + entry.typeOnly = entry.typeOnly && typeOnly; + } + switch (importKind) { + case 1 /* Default */: + ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add new) Default import should be missing or match symbolName"); + entry.defaultImport = symbolName; + break; + case 0 /* Named */: + ts.pushIfUnique(entry.namedImports, symbolName); + break; + case 3 /* Equals */: + case 2 /* Namespace */: + ts.Debug.assert(entry.namespaceLikeImport === undefined || entry.namespaceLikeImport.name === symbolName, "Namespacelike import shoudl be missing or match symbolName"); + entry.namespaceLikeImport = { importKind: importKind, name: symbolName }; + break; + } + break; } + default: + ts.Debug.assertNever(fix, "fix wasn't never - got kind " + fix.kind); + } + } + function writeFixes(changeTracker) { + var quotePreference = ts.getQuotePreference(sourceFile, preferences); + for (var _i = 0, addToNamespace_1 = addToNamespace; _i < addToNamespace_1.length; _i++) { + var fix = addToNamespace_1[_i]; + addNamespaceQualifier(changeTracker, sourceFile, fix); + } + for (var _a = 0, importType_1 = importType; _a < importType_1.length; _a++) { + var fix = importType_1[_a]; + addImportType(changeTracker, sourceFile, fix, quotePreference); + } + addToExisting.forEach(function (_a) { + var importClause = _a.importClause, defaultImport = _a.defaultImport, namedImports = _a.namedImports, canUseTypeOnlyImport = _a.canUseTypeOnlyImport; + doAddExistingFix(changeTracker, sourceFile, importClause, defaultImport, namedImports, canUseTypeOnlyImport); + }); + newImports.forEach(function (imports, moduleSpecifier) { + addNewImports(changeTracker, sourceFile, moduleSpecifier, quotePreference, imports, /*blankLineBetween*/ lastModuleSpecifier === moduleSpecifier); }); - return codefix.createCombinedCodeActions(ts.textChanges.ChangeTracker.with(context, function (changes) { - var quotePreference = ts.getQuotePreference(sourceFile, preferences); - for (var _i = 0, addToNamespace_1 = addToNamespace; _i < addToNamespace_1.length; _i++) { - var fix = addToNamespace_1[_i]; - addNamespaceQualifier(changes, sourceFile, fix); - } - for (var _a = 0, importType_1 = importType; _a < importType_1.length; _a++) { - var fix = importType_1[_a]; - addImportType(changes, sourceFile, fix, quotePreference); - } - addToExisting.forEach(function (_a) { - var importClause = _a.importClause, defaultImport = _a.defaultImport, namedImports = _a.namedImports; - doAddExistingFix(changes, sourceFile, importClause, defaultImport, namedImports); - }); - newImports.forEach(function (imports, moduleSpecifier, typeOnly) { - addNewImports(changes, sourceFile, typeOnly, moduleSpecifier, quotePreference, imports); - }); - })); - }, - }); - function createNewImportMap() { - // Keys are module specifiers. - var newImports = ts.createMap(); - return { - get: function (moduleSpecifier, typeOnly) { - return newImports.get(key(moduleSpecifier, typeOnly)); - }, - set: function (moduleSpecifier, typeOnly, value) { - return newImports.set(key(moduleSpecifier, typeOnly), value); - }, - forEach: function (action) { - newImports.forEach(function (value, key) { - var typeOnly = !!+key[0]; - var moduleSpecifier = key.slice(1); - action(value, moduleSpecifier, typeOnly); - }); - }, - }; - function key(moduleSpecifier, typeOnly) { - var prefix = typeOnly ? "1" : "0"; - return prefix + moduleSpecifier; } } + codefix.createImportAdder = createImportAdder; // Sorted with the preferred fix coming first. var ImportFixKind; (function (ImportFixKind) { @@ -127069,14 +128975,19 @@ var ts; ImportKind[ImportKind["ConstEquals"] = 4] = "ConstEquals"; })(ImportKind || (ImportKind = {})); function getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, symbolName, host, program, formatContext, position, preferences) { - var exportInfos = getAllReExportingModules(sourceFile, exportedSymbol, moduleSymbol, symbolName, sourceFile, program.getCompilerOptions(), program.getTypeChecker(), program.getSourceFiles()); - ts.Debug.assert(exportInfos.some(function (info) { return info.moduleSymbol === moduleSymbol; }), "Some exportInfo should match the specified moduleSymbol"); - // We sort the best codefixes first, so taking `first` is best for completions. - var moduleSpecifier = ts.first(getNewImportInfos(program, sourceFile, position, exportInfos, host, preferences)).moduleSpecifier; - var fix = ts.first(getFixForImport(exportInfos, symbolName, position, program, sourceFile, host, preferences)); + var compilerOptions = program.getCompilerOptions(); + var exportInfos = getAllReExportingModules(sourceFile, exportedSymbol, moduleSymbol, symbolName, sourceFile, compilerOptions, program.getTypeChecker(), program.getSourceFiles()); + var preferTypeOnlyImport = compilerOptions.importsNotUsedAsValues === 2 /* Error */ && ts.isValidTypeOnlyAliasUseSite(ts.getTokenAtPosition(sourceFile, position)); + var moduleSpecifier = ts.first(getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, exportInfos, host, preferences)).moduleSpecifier; + var fix = getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, preferTypeOnlyImport, host, preferences); return { moduleSpecifier: moduleSpecifier, codeAction: codeFixActionToCodeAction(codeActionForFix({ host: host, formatContext: formatContext, preferences: preferences }, sourceFile, symbolName, fix, ts.getQuotePreference(sourceFile, preferences))) }; } codefix.getImportCompletionAction = getImportCompletionAction; + function getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, preferTypeOnlyImport, host, preferences) { + ts.Debug.assert(exportInfos.some(function (info) { return info.moduleSymbol === moduleSymbol; }), "Some exportInfo should match the specified moduleSymbol"); + // We sort the best codefixes first, so taking `first` is best. + return ts.first(getFixForImport(exportInfos, symbolName, position, preferTypeOnlyImport, program, sourceFile, host, preferences)); + } function codeFixActionToCodeAction(_a) { var description = _a.description, changes = _a.changes, commands = _a.commands; return { description: description, changes: changes, commands: commands }; @@ -127104,13 +129015,18 @@ var ts; function isTypeOnlySymbol(s, checker) { return !(ts.skipAlias(s, checker).flags & 111551 /* Value */); } - function getFixForImport(exportInfos, symbolName, position, program, sourceFile, host, preferences) { + function isTypeOnlyPosition(sourceFile, position) { + return ts.isValidTypeOnlyAliasUseSite(ts.getTokenAtPosition(sourceFile, position)); + } + function getFixForImport(exportInfos, symbolName, + /** undefined only for missing JSX namespace */ + position, preferTypeOnlyImport, program, sourceFile, host, preferences) { var checker = program.getTypeChecker(); var existingImports = ts.flatMap(exportInfos, function (info) { return getExistingImportDeclarations(info, checker, sourceFile); }); var useNamespace = position === undefined ? undefined : tryUseExistingNamespaceImport(existingImports, symbolName, position, checker); - var addToExisting = tryAddToExistingImport(existingImports); + var addToExisting = tryAddToExistingImport(existingImports, position !== undefined && isTypeOnlyPosition(sourceFile, position)); // Don't bother providing an action to add a new import if we can add to an existing one. - var addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, host, preferences); + var addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, preferTypeOnlyImport, host, preferences); return __spreadArrays((useNamespace ? [useNamespace] : ts.emptyArray), addImport); } function tryUseExistingNamespaceImport(existingImports, symbolName, position, checker) { @@ -127137,7 +129053,7 @@ var ts; } }); } - function tryAddToExistingImport(existingImports) { + function tryAddToExistingImport(existingImports, canUseTypeOnlyImport) { return ts.firstDefined(existingImports, function (_a) { var declaration = _a.declaration, importKind = _a.importKind; if (declaration.kind !== 254 /* ImportDeclaration */) @@ -127147,7 +129063,7 @@ var ts; return undefined; var name = importClause.name, namedBindings = importClause.namedBindings; return importKind === 1 /* Default */ && !name || importKind === 0 /* Named */ && (!namedBindings || namedBindings.kind === 257 /* NamedImports */) - ? { kind: 2 /* AddToExisting */, importClause: importClause, importKind: importKind } + ? { kind: 2 /* AddToExisting */, importClause: importClause, importKind: importKind, canUseTypeOnlyImport: canUseTypeOnlyImport } : undefined; }); } @@ -127169,7 +129085,7 @@ var ts; && checker.getSymbolAtLocation(moduleSpecifier) === moduleSymbol ? { declaration: i, importKind: importKind, exportedSymbolIsTypeOnly: exportedSymbolIsTypeOnly } : undefined; }); } - function getNewImportInfos(program, sourceFile, position, moduleSymbols, host, preferences) { + function getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, moduleSymbols, host, preferences) { var isJs = ts.isSourceFileJS(sourceFile); var allowsImportingSpecifier = createAutoImportFilter(sourceFile, program, host).allowsImportingSpecifier; var choicesForEachExportingModule = ts.flatMap(moduleSymbols, function (_a) { @@ -127178,8 +129094,8 @@ var ts; .map(function (moduleSpecifier) { // `position` should only be undefined at a missing jsx namespace, in which case we shouldn't be looking for pure types. return exportedSymbolIsTypeOnly && isJs - ? { kind: 1 /* ImportType */, moduleSpecifier: moduleSpecifier, position: ts.Debug.assertDefined(position, "position should be defined") } - : { kind: 3 /* AddNew */, moduleSpecifier: moduleSpecifier, importKind: importKind, typeOnly: exportedSymbolIsTypeOnly }; + ? { kind: 1 /* ImportType */, moduleSpecifier: moduleSpecifier, position: ts.Debug.checkDefined(position, "position should be defined") } + : { kind: 3 /* AddNew */, moduleSpecifier: moduleSpecifier, importKind: importKind, typeOnly: preferTypeOnlyImport }; }); }); // Sort by presence in package.json, then shortest paths first @@ -127195,19 +129111,19 @@ var ts; return a.moduleSpecifier.length - b.moduleSpecifier.length; }); } - function getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, host, preferences) { - var existingDeclaration = ts.firstDefined(existingImports, newImportInfoFromExistingSpecifier); - return existingDeclaration ? [existingDeclaration] : getNewImportInfos(program, sourceFile, position, exportInfos, host, preferences); + function getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, preferTypeOnlyImport, host, preferences) { + var existingDeclaration = ts.firstDefined(existingImports, function (info) { return newImportInfoFromExistingSpecifier(info, preferTypeOnlyImport); }); + return existingDeclaration ? [existingDeclaration] : getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, exportInfos, host, preferences); } - function newImportInfoFromExistingSpecifier(_a) { - var declaration = _a.declaration, importKind = _a.importKind, exportedSymbolIsTypeOnly = _a.exportedSymbolIsTypeOnly; + function newImportInfoFromExistingSpecifier(_a, preferTypeOnlyImport) { + var declaration = _a.declaration, importKind = _a.importKind; var expression = declaration.kind === 254 /* ImportDeclaration */ ? declaration.moduleSpecifier : declaration.moduleReference.kind === 265 /* ExternalModuleReference */ ? declaration.moduleReference.expression : undefined; return expression && ts.isStringLiteral(expression) - ? { kind: 3 /* AddNew */, moduleSpecifier: expression.text, importKind: importKind, typeOnly: exportedSymbolIsTypeOnly } + ? { kind: 3 /* AddNew */, moduleSpecifier: expression.text, importKind: importKind, typeOnly: preferTypeOnlyImport } : undefined; } function getFixesInfo(context, errorCode, pos) { @@ -127226,7 +129142,7 @@ var ts; var symbol = checker.getAliasedSymbol(umdSymbol); var symbolName = umdSymbol.name; var exportInfos = [{ moduleSymbol: symbol, importKind: getUmdImportKind(sourceFile, program.getCompilerOptions()), exportedSymbolIsTypeOnly: false }]; - var fixes = getFixForImport(exportInfos, symbolName, ts.isIdentifier(token) ? token.getStart(sourceFile) : undefined, program, sourceFile, host, preferences); + var fixes = getFixForImport(exportInfos, symbolName, ts.isIdentifier(token) ? token.getStart(sourceFile) : undefined, /*preferTypeOnlyImport*/ false, program, sourceFile, host, preferences); return { fixes: fixes, symbolName: symbolName }; } function getUmdSymbol(token, checker) { @@ -127277,10 +129193,11 @@ var ts; : symbolToken.text; // "default" is a keyword and not a legal identifier for the import, so we don't expect it here ts.Debug.assert(symbolName !== "default" /* Default */, "'default' isn't a legal identifier and couldn't occur here"); + var preferTypeOnlyImport = program.getCompilerOptions().importsNotUsedAsValues === 2 /* Error */ && ts.isValidTypeOnlyAliasUseSite(symbolToken); var exportInfos = getExportInfos(symbolName, ts.getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, checker, program, host); var fixes = ts.arrayFrom(ts.flatMapIterator(exportInfos.entries(), function (_a) { var _ = _a[0], exportInfos = _a[1]; - return getFixForImport(exportInfos, symbolName, symbolToken.getStart(sourceFile), program, sourceFile, host, preferences); + return getFixForImport(exportInfos, symbolName, symbolToken.getStart(sourceFile), preferTypeOnlyImport, program, sourceFile, host, preferences); })); return { fixes: fixes, symbolName: symbolName }; } @@ -127319,28 +129236,32 @@ var ts; if (defaultExport) return { symbol: defaultExport, kind: 1 /* Default */ }; var exportEquals = checker.resolveExternalModuleSymbol(moduleSymbol); - return exportEquals === moduleSymbol ? undefined : { symbol: exportEquals, kind: getExportEqualsImportKind(importingFile, compilerOptions, checker) }; + return exportEquals === moduleSymbol ? undefined : { symbol: exportEquals, kind: getExportEqualsImportKind(importingFile, compilerOptions) }; } - function getExportEqualsImportKind(importingFile, compilerOptions, checker) { + function getExportEqualsImportKind(importingFile, compilerOptions) { + var allowSyntheticDefaults = ts.getAllowSyntheticDefaultImports(compilerOptions); + // 1. 'import =' will not work in es2015+, so the decision is between a default + // and a namespace import, based on allowSyntheticDefaultImports/esModuleInterop. if (ts.getEmitModuleKind(compilerOptions) >= ts.ModuleKind.ES2015) { - return ts.getAllowSyntheticDefaultImports(compilerOptions) ? 1 /* Default */ : 2 /* Namespace */; + return allowSyntheticDefaults ? 1 /* Default */ : 2 /* Namespace */; } + // 2. 'import =' will not work in JavaScript, so the decision is between a default + // and const/require. if (ts.isInJSFile(importingFile)) { return ts.isExternalModule(importingFile) ? 1 /* Default */ : 4 /* ConstEquals */; } + // 3. At this point the most correct choice is probably 'import =', but people + // really hate that, so look to see if the importing file has any precedent + // on how to handle it. for (var _i = 0, _a = importingFile.statements; _i < _a.length; _i++) { var statement = _a[_i]; if (ts.isImportEqualsDeclaration(statement)) { return 3 /* Equals */; } - if (ts.isImportDeclaration(statement) && statement.importClause && statement.importClause.name) { - var moduleSymbol = checker.getImmediateAliasedSymbol(statement.importClause.symbol); - if (moduleSymbol && moduleSymbol.name !== "default" /* Default */) { - return 1 /* Default */; - } - } } - return 3 /* Equals */; + // 4. We have no precedent to go on, so just use a default import if + // allowSyntheticDefaultImports/esModuleInterop is enabled. + return allowSyntheticDefaults ? 1 /* Default */ : 3 /* Equals */; } function getDefaultExportInfoWorker(defaultExport, moduleSymbol, checker, compilerOptions) { var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport); @@ -127351,7 +129272,7 @@ var ts; return { symbolForMeaning: defaultExport, name: name }; if (defaultExport.flags & 2097152 /* Alias */) { var aliased = checker.getImmediateAliasedSymbol(defaultExport); - return aliased && getDefaultExportInfoWorker(aliased, ts.Debug.assertDefined(aliased.parent, "Alias targets of default exports must have a parent"), checker, compilerOptions); + return aliased && getDefaultExportInfoWorker(aliased, ts.Debug.checkDefined(aliased.parent, "Alias targets of default exports must have a parent"), checker, compilerOptions); } if (defaultExport.escapedName !== "default" /* Default */ && defaultExport.escapedName !== "export=" /* ExportEquals */) { @@ -127388,25 +129309,26 @@ var ts; addImportType(changes, sourceFile, fix, quotePreference); return [ts.Diagnostics.Change_0_to_1, symbolName, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName]; case 2 /* AddToExisting */: { - var importClause = fix.importClause, importKind = fix.importKind; - doAddExistingFix(changes, sourceFile, importClause, importKind === 1 /* Default */ ? symbolName : undefined, importKind === 0 /* Named */ ? [symbolName] : ts.emptyArray); + var importClause = fix.importClause, importKind = fix.importKind, canUseTypeOnlyImport = fix.canUseTypeOnlyImport; + doAddExistingFix(changes, sourceFile, importClause, importKind === 1 /* Default */ ? symbolName : undefined, importKind === 0 /* Named */ ? [symbolName] : ts.emptyArray, canUseTypeOnlyImport); var moduleSpecifierWithoutQuotes = ts.stripQuotes(importClause.parent.moduleSpecifier.getText()); return [importKind === 1 /* Default */ ? ts.Diagnostics.Add_default_import_0_to_existing_import_declaration_from_1 : ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, symbolName, moduleSpecifierWithoutQuotes]; // you too! } case 3 /* AddNew */: { - var importKind = fix.importKind, moduleSpecifier = fix.moduleSpecifier; - addNewImports(changes, sourceFile, fix.typeOnly, moduleSpecifier, quotePreference, importKind === 1 /* Default */ ? { defaultImport: symbolName, namedImports: ts.emptyArray, namespaceLikeImport: undefined } - : importKind === 0 /* Named */ ? { defaultImport: undefined, namedImports: [symbolName], namespaceLikeImport: undefined } - : { defaultImport: undefined, namedImports: ts.emptyArray, namespaceLikeImport: { importKind: importKind, name: symbolName } }); + var importKind = fix.importKind, moduleSpecifier = fix.moduleSpecifier, typeOnly = fix.typeOnly; + addNewImports(changes, sourceFile, moduleSpecifier, quotePreference, importKind === 1 /* Default */ ? { defaultImport: symbolName, namedImports: ts.emptyArray, namespaceLikeImport: undefined, typeOnly: typeOnly } + : importKind === 0 /* Named */ ? { defaultImport: undefined, namedImports: [symbolName], namespaceLikeImport: undefined, typeOnly: typeOnly } + : { defaultImport: undefined, namedImports: ts.emptyArray, namespaceLikeImport: { importKind: importKind, name: symbolName }, typeOnly: typeOnly }, /*blankLineBetween*/ true); return [importKind === 1 /* Default */ ? ts.Diagnostics.Import_default_0_from_module_1 : ts.Diagnostics.Import_0_from_module_1, symbolName, moduleSpecifier]; } default: return ts.Debug.assertNever(fix, "Unexpected fix kind " + fix.kind); } } - function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports) { + function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, canUseTypeOnlyImport) { + var convertTypeOnlyToRegular = !canUseTypeOnlyImport && clause.isTypeOnly; if (defaultImport) { - ts.Debug.assert(!clause.name, "Default imports can't have names"); + ts.Debug.assert(!clause.name, "Cannot add a default import to an import clause that already has one"); changes.insertNodeAt(sourceFile, clause.getStart(sourceFile), ts.createIdentifier(defaultImport), { suffix: ", " }); } if (namedImports.length) { @@ -127424,11 +129346,14 @@ var ts; changes.replaceNode(sourceFile, clause.namedBindings, namedImports_1); } else { - changes.insertNodeAfter(sourceFile, ts.Debug.assertDefined(clause.name, "Named import specifiers must have names"), namedImports_1); + changes.insertNodeAfter(sourceFile, ts.Debug.checkDefined(clause.name, "Import clause must have either named imports or a default import"), namedImports_1); } } } } + if (convertTypeOnlyToRegular) { + changes.delete(sourceFile, ts.getTypeKeywordOfTypeOnlyImport(clause, sourceFile)); + } } function addNamespaceQualifier(changes, sourceFile, _a) { var namespacePrefix = _a.namespacePrefix, position = _a.position; @@ -127442,16 +129367,16 @@ var ts; var quote = ts.getQuoteFromPreference(quotePreference); return "import(" + quote + moduleSpecifier + quote + ")."; } - function addNewImports(changes, sourceFile, typeOnly, moduleSpecifier, quotePreference, _a) { - var defaultImport = _a.defaultImport, namedImports = _a.namedImports, namespaceLikeImport = _a.namespaceLikeImport; + function addNewImports(changes, sourceFile, moduleSpecifier, quotePreference, _a, blankLineBetween) { + var defaultImport = _a.defaultImport, namedImports = _a.namedImports, namespaceLikeImport = _a.namespaceLikeImport, typeOnly = _a.typeOnly; var quotedModuleSpecifier = ts.makeStringLiteral(moduleSpecifier, quotePreference); if (defaultImport !== undefined || namedImports.length) { - ts.insertImport(changes, sourceFile, ts.makeImport(defaultImport === undefined ? undefined : ts.createIdentifier(defaultImport), namedImports.map(function (n) { return ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(n)); }), moduleSpecifier, quotePreference, typeOnly)); + ts.insertImport(changes, sourceFile, ts.makeImport(defaultImport === undefined ? undefined : ts.createIdentifier(defaultImport), namedImports.map(function (n) { return ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(n)); }), moduleSpecifier, quotePreference, typeOnly), /*blankLineBetween*/ blankLineBetween); } if (namespaceLikeImport) { ts.insertImport(changes, sourceFile, namespaceLikeImport.importKind === 3 /* Equals */ ? ts.createImportEqualsDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createIdentifier(namespaceLikeImport.name), ts.createExternalModuleReference(quotedModuleSpecifier)) : namespaceLikeImport.importKind === 4 /* ConstEquals */ ? createConstEqualsRequireDeclaration(namespaceLikeImport.name, quotedModuleSpecifier) : - ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(namespaceLikeImport.name)), typeOnly), quotedModuleSpecifier)); + ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(namespaceLikeImport.name)), typeOnly), quotedModuleSpecifier), /*blankLineBetween*/ blankLineBetween); } } function createConstEqualsRequireDeclaration(name, quotedModuleSpecifier) { @@ -127693,19 +129618,19 @@ var ts; // this.speling = 1; // ^^^^^^^ var node = ts.getTokenAtPosition(sourceFile, pos); + var parent = node.parent; var checker = context.program.getTypeChecker(); var suggestedSymbol; - if (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node) { + if (ts.isPropertyAccessExpression(parent) && parent.name === node) { ts.Debug.assert(ts.isIdentifierOrPrivateIdentifier(node), "Expected an identifier for spelling (property access)"); - var containingType = checker.getTypeAtLocation(node.parent.expression); - if (node.parent.flags & 32 /* OptionalChain */) { + var containingType = checker.getTypeAtLocation(parent.expression); + if (parent.flags & 32 /* OptionalChain */) { containingType = checker.getNonNullableType(containingType); } - var name = node; - suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(name, containingType); + suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); } - else if (ts.isImportSpecifier(node.parent) && node.parent.name === node) { - ts.Debug.assert(node.kind === 75 /* Identifier */, "Expected an identifier for spelling (import)"); + else if (ts.isImportSpecifier(parent) && parent.name === node) { + ts.Debug.assertNode(node, ts.isIdentifier, "Expected an identifier for spelling (import)"); var importDeclaration = ts.findAncestor(node, ts.isImportDeclaration); var resolvedSourceFile = getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration); if (resolvedSourceFile && resolvedSourceFile.symbol) { @@ -127786,7 +129711,7 @@ var ts; var parentDeclaration = info.parentDeclaration, declSourceFile = info.declSourceFile, inJs = info.inJs, makeStatic = info.makeStatic, token = info.token, call = info.call; var methodCodeAction = call && getActionForMethodDeclaration(context, declSourceFile, parentDeclaration, token, call, makeStatic, inJs, context.preferences); var addMember = inJs && !ts.isInterfaceDeclaration(parentDeclaration) ? - ts.singleElementArray(getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, parentDeclaration, token.text, makeStatic)) : + ts.singleElementArray(getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, parentDeclaration, token, makeStatic)) : getActionsForAddMissingMemberInTypeScriptFile(context, declSourceFile, parentDeclaration, token, makeStatic); return ts.concatenate(ts.singleElementArray(methodCodeAction), addMember); }, @@ -127832,7 +129757,7 @@ var ts; } else { if (inJs && !ts.isInterfaceDeclaration(parentDeclaration)) { - addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token.text, makeStatic); + addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token, makeStatic); } else { var typeNode = getTypeNode(program.getTypeChecker(), parentDeclaration, token); @@ -127881,17 +129806,16 @@ var ts; var symbol = leftExpressionType.symbol; if (!symbol || !symbol.declarations) return undefined; - var isClass = ts.find(symbol.declarations, ts.isClassLike); + var classDeclaration = ts.find(symbol.declarations, ts.isClassLike); // Don't suggest adding private identifiers to anything other than a class. - if (!isClass && ts.isPrivateIdentifier(token)) { + if (!classDeclaration && ts.isPrivateIdentifier(token)) { return undefined; } // Prefer to change the class instead of the interface if they are merged - var classOrInterface = isClass || ts.find(symbol.declarations, ts.isInterfaceDeclaration); + var classOrInterface = classDeclaration || ts.find(symbol.declarations, ts.isInterfaceDeclaration); if (classOrInterface && !program.isSourceFileFromExternalLibrary(classOrInterface.getSourceFile())) { var makeStatic = (leftExpressionType.target || leftExpressionType) !== checker.getDeclaredTypeOfSymbol(symbol); - // Static private identifier properties are not supported yet. - if (makeStatic && ts.isPrivateIdentifier(token)) { + if (makeStatic && (ts.isPrivateIdentifier(token) || ts.isInterfaceDeclaration(classOrInterface))) { return undefined; } var declSourceFile = classOrInterface.getSourceFile(); @@ -127905,12 +129829,17 @@ var ts; } return undefined; } - function getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, classDeclaration, tokenName, makeStatic) { - var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingMemberInJs(t, declSourceFile, classDeclaration, tokenName, makeStatic); }); - return changes.length === 0 ? undefined - : codefix.createCodeFixAction(fixName, changes, [makeStatic ? ts.Diagnostics.Initialize_static_property_0 : ts.Diagnostics.Initialize_property_0_in_the_constructor, tokenName], fixId, ts.Diagnostics.Add_all_missing_members); + function getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, classDeclaration, token, makeStatic) { + var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingMemberInJs(t, declSourceFile, classDeclaration, token, makeStatic); }); + if (changes.length === 0) { + return undefined; + } + var diagnostic = makeStatic ? ts.Diagnostics.Initialize_static_property_0 : + ts.isPrivateIdentifier(token) ? ts.Diagnostics.Declare_a_private_field_named_0 : ts.Diagnostics.Initialize_property_0_in_the_constructor; + return codefix.createCodeFixAction(fixName, changes, [diagnostic, token.text], fixId, ts.Diagnostics.Add_all_missing_members); } - function addMissingMemberInJs(changeTracker, declSourceFile, classDeclaration, tokenName, makeStatic) { + function addMissingMemberInJs(changeTracker, declSourceFile, classDeclaration, token, makeStatic) { + var tokenName = token.text; if (makeStatic) { if (classDeclaration.kind === 214 /* ClassExpression */) { return; @@ -127919,6 +129848,21 @@ var ts; var staticInitialization = initializePropertyToUndefined(ts.createIdentifier(className), tokenName); changeTracker.insertNodeAfter(declSourceFile, classDeclaration, staticInitialization); } + else if (ts.isPrivateIdentifier(token)) { + var property = ts.createProperty( + /*decorators*/ undefined, + /*modifiers*/ undefined, tokenName, + /*questionToken*/ undefined, + /*type*/ undefined, + /*initializer*/ undefined); + var lastProp = getNodeToInsertPropertyAfter(classDeclaration); + if (lastProp) { + changeTracker.insertNodeAfter(declSourceFile, lastProp, property); + } + else { + changeTracker.insertNodeAtClassStart(declSourceFile, classDeclaration, property); + } + } else { var classConstructor = ts.getFirstConstructorWithBody(classDeclaration); if (!classConstructor) { @@ -128164,7 +130108,9 @@ var ts; // Note that this is ultimately derived from a map indexed by symbol names, // so duplicates cannot occur. var abstractAndNonPrivateExtendsSymbols = checker.getPropertiesOfType(instantiatedExtendsType).filter(symbolPointsToNonPrivateAndAbstractMember); - codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, context, preferences, function (member) { return changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, member); }); + var importAdder = codefix.createImportAdder(sourceFile, context.program, preferences, context.host); + codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, context, preferences, importAdder, function (member) { return changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, member); }); + importAdder.writeFixes(changeTracker); } function symbolPointsToNonPrivateAndAbstractMember(symbol) { // See `codeFixClassExtendAbstractProtectedProperty.ts` in https://github.com/Microsoft/TypeScript/pull/11547/files @@ -128252,7 +130198,7 @@ var ts; }); function getNode(sourceFile, pos) { var token = ts.getTokenAtPosition(sourceFile, pos); - ts.Debug.assert(token.kind === 129 /* ConstructorKeyword */, "token should be at the constructor keyword"); + ts.Debug.assert(ts.isConstructorDeclaration(token.parent), "token should be at the constructor declaration"); return token.parent; } function doChange(changes, sourceFile, ctr) { @@ -128435,6 +130381,7 @@ var ts; var didYouMeanStaticMemberCode = ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code; var errorCodes = [ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, + ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies.code, didYouMeanStaticMemberCode, ]; codefix.registerCodeFix({ @@ -128457,9 +130404,9 @@ var ts; }); function getInfo(sourceFile, pos, diagCode) { var node = ts.getTokenAtPosition(sourceFile, pos); - if (!ts.isIdentifier(node)) - return undefined; - return { node: node, className: diagCode === didYouMeanStaticMemberCode ? ts.getContainingClass(node).name.text : undefined }; + if (ts.isIdentifier(node)) { + return { node: node, className: diagCode === didYouMeanStaticMemberCode ? ts.getContainingClass(node).name.text : undefined }; + } } function doChange(changes, sourceFile, _a) { var node = _a.node, className = _a.className; @@ -128471,6 +130418,47 @@ var ts; })(ts || (ts = {})); /* @internal */ var ts; +(function (ts) { + var codefix; + (function (codefix) { + var fixIdHtmlEntity = "invalidJsxCharactersConvertToHtmlEntity"; + var fixIdExpression = "invalidJsxCharactersConvertToExpression"; + var errorCodes = [ts.Diagnostics.Unexpected_token_Did_you_mean_or_gt.code, ts.Diagnostics.Unexpected_token_Did_you_mean_or_rbrace.code]; + codefix.registerCodeFix({ + errorCodes: errorCodes, + getCodeActions: function (context) { + var sourceFile = context.sourceFile, span = context.span; + var changeToExpression = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, span.start, /* useHtmlEntity */ false); }); + var changeToHtmlEntity = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, span.start, /* useHtmlEntity */ true); }); + return [ + codefix.createCodeFixActionWithoutFixAll(fixIdExpression, changeToExpression, ts.Diagnostics.Wrap_invalid_character_in_an_expression_container), + codefix.createCodeFixAction(fixIdHtmlEntity, changeToHtmlEntity, ts.Diagnostics.Convert_invalid_character_to_its_html_entity_code, fixIdHtmlEntity, ts.Diagnostics.Convert_invalid_character_to_its_html_entity_code), + ]; + }, + fixIds: [fixIdExpression, fixIdHtmlEntity], + }); + var htmlEntity = { + ">": ">", + "}": "}", + }; + function isValidCharacter(character) { + return ts.hasProperty(htmlEntity, character); + } + function doChange(changes, sourceFile, start, useHtmlEntity) { + var character = sourceFile.getText()[start]; + // sanity check + if (!isValidCharacter(character)) { + return; + } + var replacement = useHtmlEntity + ? htmlEntity[character] + : "{'" + character + "'}"; + changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement); + } + })(codefix = ts.codefix || (ts.codefix = {})); +})(ts || (ts = {})); +/* @internal */ +var ts; (function (ts) { var codefix; (function (codefix) { @@ -128585,7 +130573,7 @@ var ts; return codefix.createCodeFixAction(fixName, changes, diag, fixIdDelete, ts.Diagnostics.Delete_all_unused_declarations); } function deleteTypeParameters(changes, sourceFile, token) { - changes.delete(sourceFile, ts.Debug.assertDefined(ts.cast(token.parent, ts.isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); + changes.delete(sourceFile, ts.Debug.checkDefined(ts.cast(token.parent, ts.isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } // Sometimes the diagnostic span is an entire ImportDeclaration, so we should remove the whole thing. function tryGetFullImport(token) { @@ -128724,16 +130712,25 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, context.span.start, context.span.length); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, context.span.start, context.span.length, context.errorCode); }); return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Remove_unreachable_code, fixId, ts.Diagnostics.Remove_all_unreachable_code)]; }, fixIds: [fixId], - getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return doChange(changes, diag.file, diag.start, diag.length); }); }, + getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return doChange(changes, diag.file, diag.start, diag.length, diag.code); }); }, }); - function doChange(changes, sourceFile, start, length) { + function doChange(changes, sourceFile, start, length, errorCode) { var token = ts.getTokenAtPosition(sourceFile, start); var statement = ts.findAncestor(token, ts.isStatement); - ts.Debug.assert(statement.getStart(sourceFile) === token.getStart(sourceFile), "token and statement should start at the same point"); + if (statement.getStart(sourceFile) !== token.getStart(sourceFile)) { + var logData = JSON.stringify({ + statementKind: ts.Debug.formatSyntaxKind(statement.kind), + tokenKind: ts.Debug.formatSyntaxKind(token.kind), + errorCode: errorCode, + start: start, + length: length + }); + ts.Debug.fail("Token and statement should start at the same point. " + logData); + } var container = (ts.isBlock(statement.parent) ? statement.parent : statement).parent; if (!ts.isBlock(statement.parent) || statement === ts.first(statement.parent.statements)) { switch (container.kind) { @@ -128756,7 +130753,7 @@ var ts; } if (ts.isBlock(statement.parent)) { var end_3 = start + length; - var lastStatement = ts.Debug.assertDefined(lastWhere(ts.sliceAfter(statement.parent.statements, statement), function (s) { return s.pos < end_3; }), "Some statement should be last"); + var lastStatement = ts.Debug.checkDefined(lastWhere(ts.sliceAfter(statement.parent.statements, statement), function (s) { return s.pos < end_3; }), "Some statement should be last"); changes.deleteNodeRange(sourceFile, statement, lastStatement); } else { @@ -129020,14 +131017,15 @@ var ts; * Finds members of the resolved type that are missing in the class pointed to by class decl * and generates source code for the missing members. * @param possiblyMissingSymbols The collection of symbols to filter and then get insertions for. + * @param importAdder If provided, type annotations will use identifier type references instead of ImportTypeNodes, and the missing imports will be added to the importAdder. * @returns Empty string iff there are no member insertions. */ - function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, context, preferences, out) { + function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, context, preferences, importAdder, addClassElement) { var classMembers = classDeclaration.symbol.members; for (var _i = 0, possiblyMissingSymbols_1 = possiblyMissingSymbols; _i < possiblyMissingSymbols_1.length; _i++) { var symbol = possiblyMissingSymbols_1[_i]; if (!classMembers.has(symbol.escapedName)) { - addNewNodeForMemberSymbol(symbol, classDeclaration, context, preferences, out); + addNewNodeForMemberSymbol(symbol, classDeclaration, context, preferences, importAdder, addClassElement); } } } @@ -129053,12 +131051,13 @@ var ts; /** * @returns Empty string iff there we can't figure out a representation for `symbol` in `enclosingDeclaration`. */ - function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, context, preferences, out) { + function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, context, preferences, importAdder, addClassElement) { var declarations = symbol.getDeclarations(); if (!(declarations && declarations.length)) { return undefined; } var checker = context.program.getTypeChecker(); + var scriptTarget = ts.getEmitScriptTarget(context.program.getCompilerOptions()); var declaration = declarations[0]; var name = ts.getSynthesizedDeepClone(ts.getNameOfDeclaration(declaration), /*includeTrivia*/ false); var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration)); @@ -129069,29 +131068,44 @@ var ts; switch (declaration.kind) { case 158 /* PropertySignature */: case 159 /* PropertyDeclaration */: - var typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); - out(ts.createProperty( + var flags = preferences.quotePreference === "single" ? 268435456 /* UseSingleQuotesForStringLiteralType */ : undefined; + var typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); + if (importAdder) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget); + if (importableReference) { + typeNode = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + addClassElement(ts.createProperty( /*decorators*/ undefined, modifiers, name, optional ? ts.createToken(57 /* QuestionToken */) : undefined, typeNode, /*initializer*/ undefined)); break; case 163 /* GetAccessor */: case 164 /* SetAccessor */: { - var allAccessors = ts.getAllAccessorDeclarations(declarations, declaration); var typeNode_1 = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); + var allAccessors = ts.getAllAccessorDeclarations(declarations, declaration); var orderedAccessors = allAccessors.secondAccessor ? [allAccessors.firstAccessor, allAccessors.secondAccessor] : [allAccessors.firstAccessor]; + if (importAdder) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode_1, type, scriptTarget); + if (importableReference) { + typeNode_1 = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } for (var _i = 0, orderedAccessors_1 = orderedAccessors; _i < orderedAccessors_1.length; _i++) { var accessor = orderedAccessors_1[_i]; if (ts.isGetAccessorDeclaration(accessor)) { - out(ts.createGetAccessor( + addClassElement(ts.createGetAccessor( /*decorators*/ undefined, modifiers, name, ts.emptyArray, typeNode_1, ambient ? undefined : createStubbedMethodBody(preferences))); } else { ts.Debug.assertNode(accessor, ts.isSetAccessorDeclaration, "The counterpart to a getter should be a setter"); var parameter = ts.getSetAccessorValueParameter(accessor); var parameterName = parameter && ts.isIdentifier(parameter.name) ? ts.idText(parameter.name) : undefined; - out(ts.createSetAccessor( + addClassElement(ts.createSetAccessor( /*decorators*/ undefined, modifiers, name, createDummyParameters(1, [parameterName], [typeNode_1], 1, /*inJs*/ false), ambient ? undefined : createStubbedMethodBody(preferences))); } } @@ -129128,23 +131142,61 @@ var ts; } else { ts.Debug.assert(declarations.length === signatures.length, "Declarations and signatures should match count"); - out(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); + addClassElement(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); } } break; } function outputMethod(signature, modifiers, name, body) { - var method = signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body); + var method = signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body, importAdder); if (method) - out(method); + addClassElement(method); } } - function signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body) { + function signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body, importAdder) { var program = context.program; - var signatureDeclaration = program.getTypeChecker().signatureToSignatureDeclaration(signature, 161 /* MethodDeclaration */, enclosingDeclaration, 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */, getNoopSymbolTrackerWithResolver(context)); + var checker = program.getTypeChecker(); + var scriptTarget = ts.getEmitScriptTarget(program.getCompilerOptions()); + var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 161 /* MethodDeclaration */, enclosingDeclaration, 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */, getNoopSymbolTrackerWithResolver(context)); if (!signatureDeclaration) { return undefined; } + if (importAdder) { + if (signatureDeclaration.typeParameters) { + ts.forEach(signatureDeclaration.typeParameters, function (typeParameterDecl, i) { + var typeParameter = signature.typeParameters[i]; + if (typeParameterDecl.constraint) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeParameterDecl.constraint, typeParameter.constraint, scriptTarget); + if (importableReference) { + typeParameterDecl.constraint = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + if (typeParameterDecl.default) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeParameterDecl.default, typeParameter.default, scriptTarget); + if (importableReference) { + typeParameterDecl.default = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + }); + } + ts.forEach(signatureDeclaration.parameters, function (parameterDecl, i) { + var parameter = signature.parameters[i]; + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(parameterDecl.type, checker.getTypeAtLocation(parameter.valueDeclaration), scriptTarget); + if (importableReference) { + parameterDecl.type = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + }); + if (signatureDeclaration.type) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(signatureDeclaration.type, signature.resolvedReturnType, scriptTarget); + if (importableReference) { + signatureDeclaration.type = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + } signatureDeclaration.decorators = undefined; signatureDeclaration.modifiers = modifiers; signatureDeclaration.name = name; @@ -129288,6 +131340,49 @@ var ts; return ts.find(obj.properties, function (p) { return ts.isPropertyAssignment(p) && !!p.name && ts.isStringLiteral(p.name) && p.name.text === name; }); } codefix.findJsonProperty = findJsonProperty; + /** + * Given an ImportTypeNode 'import("./a").SomeType>', + * returns an equivalent type reference node with any nested ImportTypeNodes also replaced + * with type references, and a list of symbols that must be imported to use the type reference. + */ + function tryGetAutoImportableReferenceFromImportTypeNode(importTypeNode, type, scriptTarget) { + if (importTypeNode && ts.isLiteralImportTypeNode(importTypeNode) && importTypeNode.qualifier && (!type || type.symbol)) { + // Symbol for the left-most thing after the dot + var firstIdentifier = ts.getFirstIdentifier(importTypeNode.qualifier); + var name = ts.getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget); + var qualifier = name !== firstIdentifier.text + ? replaceFirstIdentifierOfEntityName(importTypeNode.qualifier, ts.createIdentifier(name)) + : importTypeNode.qualifier; + var symbols_4 = [firstIdentifier.symbol]; + var typeArguments_1 = []; + if (importTypeNode.typeArguments) { + importTypeNode.typeArguments.forEach(function (arg) { + var ref = tryGetAutoImportableReferenceFromImportTypeNode(arg, /*undefined*/ type, scriptTarget); + if (ref) { + symbols_4.push.apply(symbols_4, ref.symbols); + typeArguments_1.push(ref.typeReference); + } + else { + typeArguments_1.push(arg); + } + }); + } + return { + symbols: symbols_4, + typeReference: ts.createTypeReferenceNode(qualifier, typeArguments_1) + }; + } + } + codefix.tryGetAutoImportableReferenceFromImportTypeNode = tryGetAutoImportableReferenceFromImportTypeNode; + function replaceFirstIdentifierOfEntityName(name, newIdentifier) { + if (name.kind === 75 /* Identifier */) { + return newIdentifier; + } + return ts.createQualifiedName(replaceFirstIdentifierOfEntityName(name.left, newIdentifier), name.right); + } + function importSymbols(importAdder, symbols) { + symbols.forEach(function (s) { return importAdder.addImportFromExportedSymbol(s, /*usageIsTypeOnly*/ true); }); + } })(codefix = ts.codefix || (ts.codefix = {})); })(ts || (ts = {})); /* @internal */ @@ -129751,7 +131846,7 @@ var ts; if (!importDeclaration) { return; } - var importClause = ts.Debug.assertDefined(importDeclaration.importClause); + var importClause = ts.Debug.checkDefined(importDeclaration.importClause); changes.replaceNode(context.sourceFile, importDeclaration, ts.updateImportDeclaration(importDeclaration, importDeclaration.decorators, importDeclaration.modifiers, ts.updateImportClause(importClause, importClause.name, /*namedBindings*/ undefined, importClause.isTypeOnly), importDeclaration.moduleSpecifier)); changes.insertNodeAfter(context.sourceFile, importDeclaration, ts.createImportDeclaration( /*decorators*/ undefined, @@ -129812,7 +131907,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === actionNameDefaultToNamed || actionName === actionNameNamedToDefault, "Unexpected action name"); - var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, ts.Debug.assertDefined(getInfo(context), "context must have info"), t, context.cancellationToken); }); + var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, ts.Debug.checkDefined(getInfo(context), "context must have info"), t, context.cancellationToken); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; }, }); @@ -129864,10 +131959,10 @@ var ts; function changeExport(exportingSourceFile, _a, changes, checker) { var wasDefault = _a.wasDefault, exportNode = _a.exportNode, exportName = _a.exportName; if (wasDefault) { - changes.delete(exportingSourceFile, ts.Debug.assertDefined(ts.findModifier(exportNode, 84 /* DefaultKeyword */), "Should find a default keyword in modifier list")); + changes.delete(exportingSourceFile, ts.Debug.checkDefined(ts.findModifier(exportNode, 84 /* DefaultKeyword */), "Should find a default keyword in modifier list")); } else { - var exportKeyword = ts.Debug.assertDefined(ts.findModifier(exportNode, 89 /* ExportKeyword */), "Should find an export keyword in modifier list"); + var exportKeyword = ts.Debug.checkDefined(ts.findModifier(exportNode, 89 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { case 244 /* FunctionDeclaration */: case 245 /* ClassDeclaration */: @@ -129878,7 +131973,7 @@ var ts; // If 'x' isn't used in this file, `export const x = 0;` --> `export default 0;` if (!ts.FindAllReferences.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile)) { // We checked in `getInfo` that an initializer exists. - changes.replaceNode(exportingSourceFile, exportNode, ts.createExportDefault(ts.Debug.assertDefined(ts.first(exportNode.declarationList.declarations).initializer, "Initializer was previously known to be present"))); + changes.replaceNode(exportingSourceFile, exportNode, ts.createExportDefault(ts.Debug.checkDefined(ts.first(exportNode.declarationList.declarations).initializer, "Initializer was previously known to be present"))); break; } // falls through @@ -129897,7 +131992,7 @@ var ts; function changeImports(program, _a, changes, cancellationToken) { var wasDefault = _a.wasDefault, exportName = _a.exportName, exportingModuleSymbol = _a.exportingModuleSymbol; var checker = program.getTypeChecker(); - var exportSymbol = ts.Debug.assertDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); + var exportSymbol = ts.Debug.checkDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); ts.FindAllReferences.Core.eachExportReference(program.getSourceFiles(), checker, cancellationToken, exportSymbol, exportingModuleSymbol, exportName.text, wasDefault, function (ref) { var importingSourceFile = ref.getSourceFile(); if (wasDefault) { @@ -130008,7 +132103,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === actionNameNamespaceToNamed || actionName === actionNameNamedToNamespace, "Unexpected action name"); - var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, t, ts.Debug.assertDefined(getImportToConvert(context), "Context must provide an import to convert")); }); + var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, t, ts.Debug.checkDefined(getImportToConvert(context), "Context must provide an import to convert")); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; } }); @@ -130487,6 +132582,7 @@ var ts; permittedJumps = 4 /* Return */; } break; + case 278 /* DefaultClause */: case 277 /* CaseClause */: // allow unlabeled break inside case clauses permittedJumps |= 1 /* Break */; @@ -131265,7 +133361,7 @@ var ts; return curr.parent.parent; } // There must be at least one statement since we started in one. - return ts.Debug.assertDefined(prevStatement, "prevStatement failed to get set"); + return ts.Debug.checkDefined(prevStatement, "prevStatement failed to get set"); } ts.Debug.assert(curr !== scope, "Didn't encounter a block-like before encountering scope"); } @@ -131710,7 +133806,7 @@ var ts; }, getEditsForAction: function (context, actionName) { var file = context.file; - var info = ts.Debug.assertDefined(getRangeToExtract(context), "Expected to find a range to extract"); + var info = ts.Debug.checkDefined(getRangeToExtract(context), "Expected to find a range to extract"); var name = ts.getUniqueName("NewType", file); var edits = ts.textChanges.ChangeTracker.with(context, function (changes) { switch (actionName) { @@ -131741,7 +133837,7 @@ var ts; if (!selection || !ts.isTypeNode(selection)) return undefined; var checker = context.program.getTypeChecker(); - var firstStatement = ts.Debug.assertDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); + var firstStatement = ts.Debug.checkDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); var typeParameters = collectTypeParameters(checker, selection, firstStatement, file); if (!typeParameters) return undefined; @@ -131837,7 +133933,7 @@ var ts; } function doTypedefChange(changes, file, name, info) { var firstStatement = info.firstStatement, selection = info.selection, typeParameters = info.typeParameters; - var node = ts.createNode(321 /* JSDocTypedefTag */); + var node = ts.createNode(322 /* JSDocTypedefTag */); node.tagName = ts.createIdentifier("typedef"); // TODO: jsdoc factory https://github.com/Microsoft/TypeScript/pull/29539 node.fullName = ts.createIdentifier(name); node.name = node.fullName; @@ -131845,7 +133941,7 @@ var ts; var templates = []; ts.forEach(typeParameters, function (typeParameter) { var constraint = ts.getEffectiveConstraintOfTypeParameter(typeParameter); - var template = ts.createNode(320 /* JSDocTemplateTag */); + var template = ts.createNode(321 /* JSDocTemplateTag */); template.tagName = ts.createIdentifier("template"); template.constraint = constraint && ts.cast(constraint, ts.isJSDocTypeExpression); var parameter = ts.createNode(155 /* TypeParameter */); @@ -132049,7 +134145,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === refactorName, "Wrong refactor invoked"); - var statements = ts.Debug.assertDefined(getStatementsToMove(context)); + var statements = ts.Debug.checkDefined(getStatementsToMove(context)); var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, statements, t, context.host, context.preferences); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; } @@ -132139,7 +134235,7 @@ var ts; var quotePreference = ts.getQuotePreference(oldFile, preferences); var importsFromNewFile = createOldFileImportsFromNewFile(usage.oldFileImportsFromNewFile, newModuleName, useEs6ModuleSyntax, quotePreference); if (importsFromNewFile) { - ts.insertImport(changes, oldFile, importsFromNewFile); + ts.insertImport(changes, oldFile, importsFromNewFile, /*blankLineBetween*/ true); } deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker); deleteMovedStatements(oldFile, toMove.ranges, changes); @@ -132306,7 +134402,7 @@ var ts; return ts.flatMap(toMove, function (statement) { if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && - forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.assertDefined(d.symbol)); })) { + forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { var exports = addExport(statement, useEs6Exports); if (exports) return exports; @@ -132443,7 +134539,7 @@ var ts; for (var _i = 0, toMove_1 = toMove; _i < toMove_1.length; _i++) { var statement = toMove_1[_i]; forEachTopLevelDeclaration(statement, function (decl) { - movedSymbols.add(ts.Debug.assertDefined(ts.isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); + movedSymbols.add(ts.Debug.checkDefined(ts.isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); }); } for (var _a = 0, toMove_2 = toMove; _a < toMove_2.length; _a++) { @@ -133273,7 +135369,7 @@ var ts; return [classDeclaration.name]; // If the class declaration doesn't have a name, it should have a default modifier. // We validated this in `isValidFunctionDeclaration` through `hasNameOrDefault` - var defaultModifier = ts.Debug.assertDefined(ts.findModifier(classDeclaration, 84 /* DefaultKeyword */), "Nameless class declaration should be a default export"); + var defaultModifier = ts.Debug.checkDefined(ts.findModifier(classDeclaration, 84 /* DefaultKeyword */), "Nameless class declaration should be a default export"); return [defaultModifier]; case 214 /* ClassExpression */: var classExpression = constructorDeclaration.parent; @@ -133291,12 +135387,12 @@ var ts; return [functionDeclaration.name]; // If the function declaration doesn't have a name, it should have a default modifier. // We validated this in `isValidFunctionDeclaration` through `hasNameOrDefault` - var defaultModifier = ts.Debug.assertDefined(ts.findModifier(functionDeclaration, 84 /* DefaultKeyword */), "Nameless function declaration should be a default export"); + var defaultModifier = ts.Debug.checkDefined(ts.findModifier(functionDeclaration, 84 /* DefaultKeyword */), "Nameless function declaration should be a default export"); return [defaultModifier]; case 161 /* MethodDeclaration */: return [functionDeclaration.name]; case 162 /* Constructor */: - var ctrKeyword = ts.Debug.assertDefined(ts.findChildOfKind(functionDeclaration, 129 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword"); + var ctrKeyword = ts.Debug.checkDefined(ts.findChildOfKind(functionDeclaration, 129 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword"); if (functionDeclaration.parent.kind === 214 /* ClassExpression */) { var variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; @@ -133330,7 +135426,7 @@ var ts; var node = getNodeOrParentOfParentheses(file, startPosition); var maybeBinary = getParentBinaryExpression(node); var refactorInfo = { name: refactorName, description: refactorDescription, actions: [] }; - if ((ts.isBinaryExpression(maybeBinary) || ts.isStringLiteral(maybeBinary)) && isStringConcatenationValid(maybeBinary)) { + if (ts.isBinaryExpression(maybeBinary) && isStringConcatenationValid(maybeBinary)) { refactorInfo.actions.push({ name: refactorName, description: refactorDescription }); return [refactorInfo]; } @@ -133555,7 +135651,7 @@ var ts; if (!children.length) { return undefined; } - var child = ts.find(children, function (kid) { return kid.kind < 294 /* FirstJSDocNode */ || kid.kind > 322 /* LastJSDocNode */; }); + var child = ts.find(children, function (kid) { return kid.kind < 294 /* FirstJSDocNode */ || kid.kind > 323 /* LastJSDocNode */; }); return child.kind < 153 /* FirstNode */ ? child : child.getFirstToken(sourceFile); @@ -133625,7 +135721,7 @@ var ts; } } function createSyntaxList(nodes, parent) { - var list = createNode(323 /* SyntaxList */, nodes.pos, nodes.end, parent); + var list = createNode(324 /* SyntaxList */, nodes.pos, nodes.end, parent); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { @@ -134238,10 +136334,6 @@ var ts; }); return names; }; - HostCache.prototype.getVersion = function (path) { - var file = this.getHostFileInformation(path); - return (file && file.version); // TODO: GH#18217 - }; HostCache.prototype.getScriptSnapshot = function (path) { var file = this.getHostFileInformation(path); return (file && file.scriptSnapshot); // TODO: GH#18217 @@ -134448,7 +136540,7 @@ var ts; var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse; var projectReferences = hostCache.getProjectReferences(); // If the program is already up-to-date, we can reuse it - if (ts.isProgramUptoDate(program, rootFileNames, hostCache.compilationSettings(), function (path) { return hostCache.getVersion(path); }, fileExists, hasInvalidatedResolution, !!host.hasChangedAutomaticTypeDirectiveNames, projectReferences)) { + if (ts.isProgramUptoDate(program, rootFileNames, hostCache.compilationSettings(), function (_path, fileName) { return host.getScriptVersion(fileName); }, fileExists, hasInvalidatedResolution, !!host.hasChangedAutomaticTypeDirectiveNames, projectReferences)) { return; } // IMPORTANT - It is critical from this moment onward that we do not check @@ -134478,7 +136570,7 @@ var ts; return host.getDirectories ? host.getDirectories(path) : []; }, readDirectory: function (path, extensions, exclude, include, depth) { - ts.Debug.assertDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + ts.Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return host.readDirectory(path, extensions, exclude, include, depth); }, onReleaseOldSourceFile: onReleaseOldSourceFile, @@ -134670,9 +136762,10 @@ var ts; return ts.Completions.getCompletionEntryDetails(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host, (formattingOptions && ts.formatting.getFormatContext(formattingOptions)), // TODO: GH#18217 preferences, cancellationToken); } - function getCompletionEntrySymbol(fileName, position, name, source) { + function getCompletionEntrySymbol(fileName, position, name, source, preferences) { + if (preferences === void 0) { preferences = ts.emptyOptions; } synchronizeHostData(); - return ts.Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host); + return ts.Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host, preferences); } function getQuickInfoAtPosition(fileName, position) { synchronizeHostData(); @@ -134763,7 +136856,7 @@ var ts; function findRenameLocations(fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); + var node = ts.getAdjustedRenameLocation(ts.getTouchingPropertyName(sourceFile, position)); if (ts.isIdentifier(node) && (ts.isJsxOpeningElement(node.parent) || ts.isJsxClosingElement(node.parent)) && ts.isIntrinsicJsxName(node.escapedText)) { var _a = node.parent.parent, openingElement = _a.openingElement, closingElement = _a.closingElement; return [openingElement, closingElement].map(function (node) { @@ -134772,17 +136865,17 @@ var ts; }); } else { - return getReferencesWorker(node, position, { findInStrings: findInStrings, findInComments: findInComments, providePrefixAndSuffixTextForRename: providePrefixAndSuffixTextForRename, isForRename: true }, function (entry, originalNode, checker) { return ts.FindAllReferences.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false); }); + return getReferencesWorker(node, position, { findInStrings: findInStrings, findInComments: findInComments, providePrefixAndSuffixTextForRename: providePrefixAndSuffixTextForRename, use: 2 /* Rename */ }, function (entry, originalNode, checker) { return ts.FindAllReferences.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false); }); } } function getReferencesAtPosition(fileName, position) { synchronizeHostData(); - return getReferencesWorker(ts.getTouchingPropertyName(getValidSourceFile(fileName), position), position, {}, ts.FindAllReferences.toReferenceEntry); + return getReferencesWorker(ts.getTouchingPropertyName(getValidSourceFile(fileName), position), position, { use: 1 /* References */ }, ts.FindAllReferences.toReferenceEntry); } function getReferencesWorker(node, position, options, cb) { synchronizeHostData(); // Exclude default library when renaming as commonly user don't want to change that file. - var sourceFiles = options && options.isForRename + var sourceFiles = options && options.use === 2 /* Rename */ ? program.getSourceFiles().filter(function (sourceFile) { return !program.isSourceFileDefaultLibrary(sourceFile); }) : program.getSourceFiles(); return ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, cb); @@ -135283,6 +137376,7 @@ var ts; getEditsForRefactor: getEditsForRefactor, toLineColumnOffset: sourceMapper.toLineColumnOffset, getSourceMapper: function () { return sourceMapper; }, + clearSourceMapperCache: function () { return sourceMapper.clearCache(); }, prepareCallHierarchy: prepareCallHierarchy, provideCallHierarchyIncomingCalls: provideCallHierarchyIncomingCalls, provideCallHierarchyOutgoingCalls: provideCallHierarchyOutgoingCalls @@ -136524,8 +138618,8 @@ var ts; return this.forwardJSONCall("getDocumentHighlights('" + fileName + "', " + position + ")", function () { var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch)); // workaround for VS document highlighting issue - keep only items from the initial file - var normalizedName = ts.normalizeSlashes(fileName).toLowerCase(); - return ts.filter(results, function (r) { return ts.normalizeSlashes(r.fileName).toLowerCase() === normalizedName; }); + var normalizedName = ts.toFileNameLowerCase(ts.normalizeSlashes(fileName)); + return ts.filter(results, function (r) { return ts.toFileNameLowerCase(ts.normalizeSlashes(r.fileName)) === normalizedName; }); }); }; /// COMPLETION LISTS @@ -136821,7 +138915,7 @@ var ts; }()); ts.TypeScriptServicesFactory = TypeScriptServicesFactory; })(ts || (ts = {})); -/* eslint-enable no-in-operator */ +/* eslint-enable no-in-operator */ // We polyfill `globalThis` here so re can reliably patch the global scope // in the contexts we want to in the same way across script and module formats /* eslint-enable no-var */ @@ -137524,6 +139618,8 @@ var ts; /*@internal*/ function isDynamicFileName(fileName) { return fileName[0] === "^" || + ((ts.stringContains(fileName, "walkThroughSnippet:/") || ts.stringContains(fileName, "untitled:/")) && + ts.getBaseFileName(fileName)[0] === "^") || (ts.stringContains(fileName, ":^") && !ts.stringContains(fileName, ts.directorySeparator)); } server.isDynamicFileName = isDynamicFileName; @@ -137745,6 +139841,8 @@ var ts; } }; ScriptInfo.prototype.getLatestVersion = function () { + // Ensure we have updated snapshot to give back latest version + this.textStorage.getSnapshot(); return this.textStorage.getVersion(); }; ScriptInfo.prototype.saveTo = function (fileName) { @@ -138201,7 +140299,8 @@ var ts; return (info && info.scriptKind); // TODO: GH#18217 }; Project.prototype.getScriptVersion = function (filename) { - var info = this.getOrCreateScriptInfoAndAttachToProject(filename); + // Don't attach to the project if version is asked + var info = this.projectService.getOrCreateScriptInfoNotOpenedByClient(filename, this.currentDirectory, this.directoryStructureHost); return (info && info.getLatestVersion()); // TODO: GH#18217 }; Project.prototype.getScriptSnapshot = function (filename) { @@ -138325,6 +140424,10 @@ var ts; Project.prototype.getSourceMapper = function () { return this.getLanguageService().getSourceMapper(); }; + /** @internal */ + Project.prototype.clearSourceMapperCache = function () { + this.languageService.clearSourceMapperCache(); + }; /*@internal*/ Project.prototype.getDocumentPositionMapper = function (generatedFileName, sourceFileName) { return this.projectService.getDocumentPositionMapper(this, generatedFileName, sourceFileName); @@ -138552,6 +140655,14 @@ var ts; } return result; }; + /* @internal */ + Project.prototype.getFileNamesWithRedirectInfo = function (includeProjectReferenceRedirectInfo) { + var _this = this; + return this.getFileNames().map(function (fileName) { return ({ + fileName: fileName, + isSourceOfProjectReferenceRedirect: includeProjectReferenceRedirectInfo && _this.isSourceOfProjectReferenceRedirect(fileName) + }); }); + }; Project.prototype.hasConfigFile = function (configFilePath) { if (this.program && this.languageServiceEnabled) { var configFile = this.program.getCompilerOptions().configFile; @@ -138912,7 +141023,10 @@ var ts; var _this = this; return { generatedFilePath: this.toPath(generatedFile), - watcher: this.projectService.watchFactory.watchFile(this.projectService.host, generatedFile, function () { return _this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(_this); }, ts.PollingInterval.High, this.projectService.getWatchOptions(this), ts.WatchType.MissingGeneratedFile, this) + watcher: this.projectService.watchFactory.watchFile(this.projectService.host, generatedFile, function () { + _this.clearSourceMapperCache(); + _this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(_this); + }, ts.PollingInterval.High, this.projectService.getWatchOptions(this), ts.WatchType.MissingGeneratedFile, this) }; }; Project.prototype.isValidGeneratedFileWatcher = function (generateFile, watcher) { @@ -138984,7 +141098,17 @@ var ts; return this.watchOptions; }; /* @internal */ - Project.prototype.getChangesSinceVersion = function (lastKnownVersion) { + Project.prototype.getChangesSinceVersion = function (lastKnownVersion, includeProjectReferenceRedirectInfo) { + var _this = this; + var includeProjectReferenceRedirectInfoIfRequested = includeProjectReferenceRedirectInfo + ? function (files) { return ts.arrayFrom(files.entries(), function (_a) { + var fileName = _a[0], isSourceOfProjectReferenceRedirect = _a[1]; + return ({ + fileName: fileName, + isSourceOfProjectReferenceRedirect: isSourceOfProjectReferenceRedirect + }); + }); } + : function (files) { return ts.arrayFrom(files.keys()); }; // Update the graph only if initial configured project load is not pending if (!this.isInitialLoadPending()) { server.updateProjectIfDirty(this); @@ -139007,33 +141131,64 @@ var ts; } // compute and return the difference var lastReportedFileNames_1 = this.lastReportedFileNames; - var externalFiles = this.getExternalFiles().map(function (f) { return server.toNormalizedPath(f); }); - var currentFiles_1 = ts.arrayToSet(this.getFileNames().concat(externalFiles)); - var added_1 = []; - var removed_1 = []; + var externalFiles = this.getExternalFiles().map(function (f) { return ({ + fileName: server.toNormalizedPath(f), + isSourceOfProjectReferenceRedirect: false + }); }); + var currentFiles_1 = ts.arrayToMap(this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo).concat(externalFiles), function (info) { return info.fileName; }, function (info) { return info.isSourceOfProjectReferenceRedirect; }); + var added_1 = new ts.Map(); + var removed_1 = new ts.Map(); var updated = updatedFileNames ? ts.arrayFrom(updatedFileNames.keys()) : []; - ts.forEachKey(currentFiles_1, function (id) { - if (!lastReportedFileNames_1.has(id)) { - added_1.push(id); + var updatedRedirects_1 = []; + ts.forEachEntry(currentFiles_1, function (isSourceOfProjectReferenceRedirect, fileName) { + if (!lastReportedFileNames_1.has(fileName)) { + added_1.set(fileName, isSourceOfProjectReferenceRedirect); + } + else if (includeProjectReferenceRedirectInfo && isSourceOfProjectReferenceRedirect !== lastReportedFileNames_1.get(fileName)) { + updatedRedirects_1.push({ + fileName: fileName, + isSourceOfProjectReferenceRedirect: isSourceOfProjectReferenceRedirect + }); } }); - ts.forEachKey(lastReportedFileNames_1, function (id) { - if (!currentFiles_1.has(id)) { - removed_1.push(id); + ts.forEachEntry(lastReportedFileNames_1, function (isSourceOfProjectReferenceRedirect, fileName) { + if (!currentFiles_1.has(fileName)) { + removed_1.set(fileName, isSourceOfProjectReferenceRedirect); } }); this.lastReportedFileNames = currentFiles_1; this.lastReportedVersion = this.projectProgramVersion; - return { info: info, changes: { added: added_1, removed: removed_1, updated: updated }, projectErrors: this.getGlobalProjectErrors() }; + return { + info: info, + changes: { + added: includeProjectReferenceRedirectInfoIfRequested(added_1), + removed: includeProjectReferenceRedirectInfoIfRequested(removed_1), + updated: includeProjectReferenceRedirectInfo + ? updated.map(function (fileName) { return ({ + fileName: fileName, + isSourceOfProjectReferenceRedirect: _this.isSourceOfProjectReferenceRedirect(fileName) + }); }) + : updated, + updatedRedirects: includeProjectReferenceRedirectInfo ? updatedRedirects_1 : undefined + }, + projectErrors: this.getGlobalProjectErrors() + }; } else { // unknown version - return everything - var projectFileNames = this.getFileNames(); - var externalFiles = this.getExternalFiles().map(function (f) { return server.toNormalizedPath(f); }); + var projectFileNames = this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo); + var externalFiles = this.getExternalFiles().map(function (f) { return ({ + fileName: server.toNormalizedPath(f), + isSourceOfProjectReferenceRedirect: false + }); }); var allFiles = projectFileNames.concat(externalFiles); - this.lastReportedFileNames = ts.arrayToSet(allFiles); + this.lastReportedFileNames = ts.arrayToMap(allFiles, function (info) { return info.fileName; }, function (info) { return info.isSourceOfProjectReferenceRedirect; }); this.lastReportedVersion = this.projectProgramVersion; - return { info: info, files: allFiles, projectErrors: this.getGlobalProjectErrors() }; + return { + info: info, + files: includeProjectReferenceRedirectInfo ? allFiles : allFiles.map(function (f) { return f.fileName; }), + projectErrors: this.getGlobalProjectErrors() + }; } }; // remove a root file from project @@ -139320,7 +141475,7 @@ var ts; server.InferredProject = InferredProject; /** * If a file is opened, the server will look for a tsconfig (or jsconfig) - * and if successfull create a ConfiguredProject for it. + * and if successful create a ConfiguredProject for it. * Otherwise it will create an InferredProject. */ var ConfiguredProject = /** @class */ (function (_super) { @@ -139526,7 +141681,7 @@ var ts; break; case ts.ConfigFileProgramReloadLevel.Full: this.openFileWatchTriggered.clear(); - var reason = ts.Debug.assertDefined(this.pendingReloadReason); + var reason = ts.Debug.checkDefined(this.pendingReloadReason); this.pendingReloadReason = undefined; this.projectService.reloadConfiguredProject(this, reason); result = true; @@ -140010,7 +142165,7 @@ var ts; */ this.projectToSizeMap = ts.createMap(); /** - * This is a map of config file paths existance that doesnt need query to disk + * This is a map of config file paths existence that doesnt need query to disk * - The entry can be present because there is inferred project that needs to watch addition of config file to directory * In this case the exists could be true/false based on config file is present or not * - Or it is present if we have configured project open with config file at that location @@ -140081,7 +142236,7 @@ var ts; }; /*@internal*/ ProjectService.prototype.setDocument = function (key, path, sourceFile) { - var info = ts.Debug.assertDefined(this.getScriptInfoForPath(path)); + var info = ts.Debug.checkDefined(this.getScriptInfoForPath(path)); info.cacheSourceFile = { key: key, sourceFile: sourceFile }; }; /*@internal*/ @@ -140244,10 +142399,13 @@ var ts; this.delayUpdateProjectGraph(project); this.delayEnsureProjectForOpenFiles(); }; - ProjectService.prototype.delayUpdateProjectGraphs = function (projects) { + ProjectService.prototype.delayUpdateProjectGraphs = function (projects, clearSourceMapperCache) { if (projects.length) { for (var _i = 0, projects_2 = projects; _i < projects_2.length; _i++) { var project = projects_2[_i]; + // Even if program doesnt change, clear the source mapper cache + if (clearSourceMapperCache) + project.clearSourceMapperCache(); this.delayUpdateProjectGraph(project); } this.delayEnsureProjectForOpenFiles(); @@ -140386,7 +142544,7 @@ var ts; // file has been changed which might affect the set of referenced files in projects that include // this file and set of inferred projects info.delayReloadNonMixedContentFile(); - this.delayUpdateProjectGraphs(info.containingProjects); + this.delayUpdateProjectGraphs(info.containingProjects, /*clearSourceMapperCache*/ false); this.handleSourceMapProjects(info); } } @@ -140417,7 +142575,7 @@ var ts; ProjectService.prototype.delayUpdateProjectsOfScriptInfoPath = function (path) { var info = this.getScriptInfoForPath(path); if (info) { - this.delayUpdateProjectGraphs(info.containingProjects); + this.delayUpdateProjectGraphs(info.containingProjects, /*clearSourceMapperCache*/ true); } }; ProjectService.prototype.handleDeletedFile = function (info) { @@ -140428,7 +142586,7 @@ var ts; var containingProjects = info.containingProjects.slice(); info.detachAllProjects(); // update projects to make sure that set of referenced files is correct - this.delayUpdateProjectGraphs(containingProjects); + this.delayUpdateProjectGraphs(containingProjects, /*clearSourceMapperCache*/ false); this.handleSourceMapProjects(info); info.closeSourceMapFileWatcher(); // need to recalculate source map from declaration file @@ -140452,7 +142610,14 @@ var ts; // don't trigger callback on open, existing files if (project.fileIsOpen(fileOrDirectoryPath)) { if (project.pendingReload !== ts.ConfigFileProgramReloadLevel.Full) { - project.openFileWatchTriggered.set(fileOrDirectoryPath, true); + var info = ts.Debug.checkDefined(_this.getScriptInfoForPath(fileOrDirectoryPath)); + if (info.isAttached(project)) { + project.openFileWatchTriggered.set(fileOrDirectoryPath, true); + } + else { + project.pendingReload = ts.ConfigFileProgramReloadLevel.Partial; + _this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); + } } return; } @@ -140563,7 +142728,13 @@ var ts; ts.Debug.assert(info.isOrphan()); var project = this.getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) || this.getOrCreateSingleInferredProjectIfEnabled() || - this.getOrCreateSingleInferredWithoutProjectRoot(info.isDynamic ? projectRootPath || this.currentDirectory : ts.getDirectoryPath(info.path)); + this.getOrCreateSingleInferredWithoutProjectRoot(info.isDynamic ? + projectRootPath || this.currentDirectory : + ts.getDirectoryPath(ts.isRootedDiskPath(info.fileName) ? + info.fileName : + ts.getNormalizedAbsolutePath(info.fileName, projectRootPath ? + this.getNormalizedAbsolutePath(projectRootPath) : + this.currentDirectory))); project.addRoot(info); if (info.containingProjects[0] !== project) { // Ensure this is first project, we could be in this scenario because info could be part of orphan project @@ -140717,7 +142888,7 @@ var ts; ProjectService.prototype.setConfigFileExistenceByNewConfiguredProject = function (project) { var configFileExistenceInfo = this.getConfigFileExistenceInfo(project); if (configFileExistenceInfo) { - // The existance might not be set if the file watcher is not invoked by the time config project is created by external project + // The existence might not be set if the file watcher is not invoked by the time config project is created by external project configFileExistenceInfo.exists = true; // close existing watcher if (configFileExistenceInfo.configFileWatcherForRootOfInferredProject) { @@ -140895,7 +143066,7 @@ var ts; } ts.Debug.assert(!isOpenScriptInfo(info) || this.openFiles.has(info.path)); var projectRootPath = this.openFiles.get(info.path); - var scriptInfo = ts.Debug.assertDefined(this.getScriptInfo(info.path)); + var scriptInfo = ts.Debug.checkDefined(this.getScriptInfo(info.path)); if (scriptInfo.isDynamic) return undefined; var searchPath = server.asNormalizedPath(ts.getDirectoryPath(info.fileName)); @@ -141197,7 +143368,7 @@ var ts; else { var scriptKind = propertyReader.getScriptKind(f, this.hostConfiguration.extraFileExtensions); var hasMixedContent = propertyReader.hasMixedContent(f, this.hostConfiguration.extraFileExtensions); - var scriptInfo = ts.Debug.assertDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(fileName, project.currentDirectory, scriptKind, hasMixedContent, project.directoryStructureHost)); + var scriptInfo = ts.Debug.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(fileName, project.currentDirectory, scriptKind, hasMixedContent, project.directoryStructureHost)); path = scriptInfo.path; var existingValue = projectRootFilesMap.get(path); // If this script info is not already a root add it @@ -141568,7 +143739,7 @@ var ts; this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(fileName), info); } } - if (openedByClient && !info.isScriptOpen()) { + if (openedByClient) { // Opening closed script info // either it was created just now, or was part of projects but was closed this.stopWatchingScriptInfo(info); @@ -141577,9 +143748,6 @@ var ts; info.registerFileUpdate(); } } - else { - ts.Debug.assert(fileContent === undefined); - } return info; }; /** @@ -141677,7 +143845,7 @@ var ts; var declarationInfo = _this.getScriptInfoForPath(declarationInfoPath); if (declarationInfo && declarationInfo.sourceMapFilePath && !ts.isString(declarationInfo.sourceMapFilePath)) { // Update declaration and source projects - _this.delayUpdateProjectGraphs(declarationInfo.containingProjects); + _this.delayUpdateProjectGraphs(declarationInfo.containingProjects, /*clearSourceMapperCache*/ true); _this.delayUpdateSourceInfoProjects(declarationInfo.sourceMapFilePath.sourceInfos); declarationInfo.closeSourceMapFileWatcher(); } @@ -141852,7 +144020,7 @@ var ts; // since info is added as root to the inferred project only when there are no other projects containing it // So when it is root of the inferred project and after project structure updates its now part // of multiple project it needs to be removed from that inferred project because: - // - references in inferred project supercede the root part + // - references in inferred project supersede the root part // - root / reference in non - inferred project beats root in inferred project // eg. say this is structure /a/b/a.ts /a/b/c.ts where c.ts references a.ts // When a.ts is opened, since there is no configured project/external project a.ts can be part of @@ -142196,8 +144364,9 @@ var ts; if (!project.languageServiceEnabled) { return; } - var info = { checkJs: !!project.getSourceFile(scriptInfo.path).checkJsDirective }; - this.eventHandler({ eventName: server.OpenFileInfoTelemetryEvent, data: { info: info } }); + var sourceFile = project.getSourceFile(scriptInfo.path); + var checkJs = !!sourceFile && !!sourceFile.checkJsDirective; + this.eventHandler({ eventName: server.OpenFileInfoTelemetryEvent, data: { info: { checkJs: checkJs } } }); }; ProjectService.prototype.closeClientFile = function (uncheckedFileName, skipAssignOrphanScriptInfosToInferredProject) { var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(uncheckedFileName)); @@ -142207,10 +144376,10 @@ var ts; } return result; }; - ProjectService.prototype.collectChanges = function (lastKnownProjectVersions, currentProjects, result) { + ProjectService.prototype.collectChanges = function (lastKnownProjectVersions, currentProjects, includeProjectReferenceRedirectInfo, result) { var _loop_5 = function (proj) { var knownProject = ts.find(lastKnownProjectVersions, function (p) { return p.projectName === proj.getProjectName(); }); - result.push(proj.getChangesSinceVersion(knownProject && knownProject.version)); + result.push(proj.getChangesSinceVersion(knownProject && knownProject.version, includeProjectReferenceRedirectInfo)); }; for (var _i = 0, currentProjects_1 = currentProjects; _i < currentProjects_1.length; _i++) { var proj = currentProjects_1[_i]; @@ -142218,11 +144387,11 @@ var ts; } }; /* @internal */ - ProjectService.prototype.synchronizeProjectList = function (knownProjects) { + ProjectService.prototype.synchronizeProjectList = function (knownProjects, includeProjectReferenceRedirectInfo) { var files = []; - this.collectChanges(knownProjects, this.externalProjects, files); - this.collectChanges(knownProjects, ts.arrayFrom(this.configuredProjects.values()), files); - this.collectChanges(knownProjects, this.inferredProjects, files); + this.collectChanges(knownProjects, this.externalProjects, includeProjectReferenceRedirectInfo, files); + this.collectChanges(knownProjects, ts.arrayFrom(this.configuredProjects.values()), includeProjectReferenceRedirectInfo, files); + this.collectChanges(knownProjects, this.inferredProjects, includeProjectReferenceRedirectInfo, files); return files; }; /* @internal */ @@ -142236,10 +144405,8 @@ var ts; if (iterResult.done) break; var file = iterResult.value; - var scriptInfo = this.getScriptInfo(file.fileName); - ts.Debug.assert(!scriptInfo || !scriptInfo.isScriptOpen(), "Script should not exist and not be open already"); // Create script infos so we have the new content for all the open files before we do any updates to projects - var info = this.getOrCreateOpenScriptInfo(scriptInfo ? scriptInfo.fileName : server.toNormalizedPath(file.fileName), file.content, tryConvertScriptKindName(file.scriptKind), file.hasMixedContent, file.projectRootPath ? server.toNormalizedPath(file.projectRootPath) : undefined); + var info = this.getOrCreateOpenScriptInfo(server.toNormalizedPath(file.fileName), file.content, tryConvertScriptKindName(file.scriptKind), file.hasMixedContent, file.projectRootPath ? server.toNormalizedPath(file.projectRootPath) : undefined); (openScriptInfos || (openScriptInfos = [])).push(info); } } @@ -142429,7 +144596,7 @@ var ts; else { var exclude = false; if (typeAcquisition.enable || typeAcquisition.enableAutoDiscovery) { - var baseName = ts.getBaseFileName(normalizedNames[i].toLowerCase()); + var baseName = ts.getBaseFileName(ts.toFileNameLowerCase(normalizedNames[i])); if (ts.fileExtensionIs(baseName, "js")) { var inferredTypingName = ts.removeFileExtension(baseName); var cleanedTypingName = ts.removeMinAndVersionNumbers(inferredTypingName); @@ -142981,7 +145148,7 @@ var ts; } } while (toDo && toDo.length) { - toDo = callbackProjectAndLocation(ts.Debug.assertDefined(toDo.pop()), projectService, toDo, seenProjects, cb); + toDo = callbackProjectAndLocation(ts.Debug.checkDefined(toDo.pop()), projectService, toDo, seenProjects, cb); } } function mapDefinitionInProject(definition, definingProject, project) { @@ -143110,7 +145277,7 @@ var ts; return _this.requiredResponse(/*response*/ true); }, _a[server.CommandNames.SynchronizeProjectList] = function (request) { - var result = _this.projectService.synchronizeProjectList(request.arguments.knownProjects); + var result = _this.projectService.synchronizeProjectList(request.arguments.knownProjects, request.arguments.includeProjectReferenceRedirectInfo); if (!result.some(function (p) { return p.projectErrors && p.projectErrors.length !== 0; })) { return _this.requiredResponse(result); } @@ -143137,7 +145304,7 @@ var ts; }); }), request.arguments.changedFiles && ts.mapIterator(ts.arrayIterator(request.arguments.changedFiles), function (file) { return ({ fileName: file.fileName, changes: ts.mapDefinedIterator(ts.arrayReverseIterator(file.textChanges), function (change) { - var scriptInfo = ts.Debug.assertDefined(_this.projectService.getScriptInfo(file.fileName)); + var scriptInfo = ts.Debug.checkDefined(_this.projectService.getScriptInfo(file.fileName)); var start = scriptInfo.lineOffsetToPosition(change.start.line, change.start.offset); var end = scriptInfo.lineOffsetToPosition(change.end.line, change.end.offset); return start >= 0 ? { span: { start: start, length: end - start }, newText: change.newText } : undefined; @@ -143541,9 +145708,8 @@ var ts; this.projectService.logger.info("got projects updated in background, updating diagnostics for " + openFiles); if (openFiles.length) { if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) { - var checkList_1 = this.createCheckList(openFiles); // For now only queue error checking for open files. We can change this to include non open files as well - this.errorCheck.startNew(function (next) { return _this.updateErrorCheck(next, checkList_1, 100, /*requireOpen*/ true); }); + this.errorCheck.startNew(function (next) { return _this.updateErrorCheck(next, openFiles, 100, /*requireOpen*/ true); }); } // Send project changed event this.event({ @@ -143682,12 +145848,27 @@ var ts; var seq = this.changeSeq; var followMs = Math.min(ms, 200); var index = 0; + var goNext = function () { + index++; + if (checkList.length > index) { + next.delay(followMs, checkOne); + } + }; var checkOne = function () { if (_this.changeSeq !== seq) { return; } - var _a = checkList[index], fileName = _a.fileName, project = _a.project; - index++; + var item = checkList[index]; + if (ts.isString(item)) { + // Find out project for the file name + item = _this.toPendingErrorCheck(item); + if (!item) { + // Ignore file if there is no project for the file + goNext(); + return; + } + } + var fileName = item.fileName, project = item.project; // Ensure the project is upto date before checking if this file is present in the project server.updateProjectIfDirty(project); if (!project.containsFile(fileName, requireOpen)) { @@ -143702,11 +145883,6 @@ var ts; if (_this.changeSeq !== seq) { return; } - var goNext = function () { - if (checkList.length > index) { - next.delay(followMs, checkOne); - } - }; if (_this.getPreferences(fileName).disableSuggestions) { goNext(); } @@ -143830,7 +146006,7 @@ var ts; Session.prototype.getDefinitionAndBoundSpan = function (args, simplifiedResult) { var _a = this.getFileAndProject(args), file = _a.file, project = _a.project; var position = this.getPositionInFile(args, file); - var scriptInfo = ts.Debug.assertDefined(project.getScriptInfo(file)); + var scriptInfo = ts.Debug.checkDefined(project.getScriptInfo(file)); var unmappedDefinitionAndBoundSpan = project.getLanguageService().getDefinitionAndBoundSpan(file, position); if (!unmappedDefinitionAndBoundSpan || !unmappedDefinitionAndBoundSpan.definitions) { return { @@ -144046,7 +146222,7 @@ var ts; if (!simplifiedResult) return locations; var defaultProject = this.getDefaultProject(args); - var renameInfo = this.mapRenameInfo(defaultProject.getLanguageService().getRenameInfo(file, position, { allowRenameOfImportPath: this.getPreferences(file).allowRenameOfImportPath }), ts.Debug.assertDefined(this.projectService.getScriptInfo(file))); + var renameInfo = this.mapRenameInfo(defaultProject.getLanguageService().getRenameInfo(file, position, { allowRenameOfImportPath: this.getPreferences(file).allowRenameOfImportPath }), ts.Debug.checkDefined(this.projectService.getScriptInfo(file))); return { info: renameInfo, locs: this.toSpanGroups(locations) }; }; Session.prototype.mapRenameInfo = function (info, scriptInfo) { @@ -144066,7 +146242,7 @@ var ts; var group_1 = map.get(fileName); if (!group_1) map.set(fileName, group_1 = { file: fileName, locs: [] }); - var scriptInfo = ts.Debug.assertDefined(this.projectService.getScriptInfo(fileName)); + var scriptInfo = ts.Debug.checkDefined(this.projectService.getScriptInfo(fileName)); group_1.locs.push(__assign(__assign({}, toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo)), prefixSuffixText)); } return ts.arrayFrom(map.values()); @@ -144089,7 +146265,7 @@ var ts; var refs = ts.flatMap(references, function (referencedSymbol) { return referencedSymbol.references.map(function (_a) { var fileName = _a.fileName, textSpan = _a.textSpan, contextSpan = _a.contextSpan, isWriteAccess = _a.isWriteAccess, isDefinition = _a.isDefinition; - var scriptInfo = ts.Debug.assertDefined(_this.projectService.getScriptInfo(fileName)); + var scriptInfo = ts.Debug.checkDefined(_this.projectService.getScriptInfo(fileName)); var span = toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo); var lineSpan = scriptInfo.lineToTextSpan(span.start.line - 1); var lineText = scriptInfo.getSnapshot().getText(lineSpan.start, ts.textSpanEnd(lineSpan)).replace(/\r|\n/g, ""); @@ -144391,21 +146567,17 @@ var ts; return helpItems; } }; - Session.prototype.createCheckList = function (fileNames) { - var _this = this; - return ts.mapDefined(fileNames, function (uncheckedFileName) { - var fileName = server.toNormalizedPath(uncheckedFileName); - var project = _this.projectService.tryGetDefaultProjectForFile(fileName); - return project && { fileName: fileName, project: project }; - }); + Session.prototype.toPendingErrorCheck = function (uncheckedFileName) { + var fileName = server.toNormalizedPath(uncheckedFileName); + var project = this.projectService.tryGetDefaultProjectForFile(fileName); + return project && { fileName: fileName, project: project }; }; Session.prototype.getDiagnostics = function (next, delay, fileNames) { if (this.suppressDiagnosticEvents) { return; } - var checkList = this.createCheckList(fileNames); - if (checkList.length > 0) { - this.updateErrorCheck(next, checkList, delay); + if (fileNames.length > 0) { + this.updateErrorCheck(next, fileNames, delay); } }; Session.prototype.change = function (args) { @@ -144536,7 +146708,7 @@ var ts; a.fileName === b.fileName && a.isCaseSensitive === b.isCaseSensitive && a.kind === b.kind && - a.kindModifiers === b.containerName && + a.kindModifiers === b.kindModifiers && a.matchKind === b.matchKind && a.name === b.name && a.textSpan.start === b.textSpan.start && @@ -144559,7 +146731,7 @@ var ts; var _a = this.getStartAndEndPosition(args, scriptInfo), startPosition = _a.startPosition, endPosition = _a.endPosition; textRange = { pos: startPosition, end: endPosition }; } - return ts.Debug.assertDefined(position === undefined ? textRange : position); + return ts.Debug.checkDefined(position === undefined ? textRange : position); function getPosition(loc) { return loc.position !== undefined ? loc.position : scriptInfo.lineOffsetToPosition(loc.line, loc.offset); } @@ -144755,7 +146927,7 @@ var ts; var _this = this; var locations = args.locations; var _a = this.getFileAndLanguageServiceForSyntacticOperation(args), file = _a.file, languageService = _a.languageService; - var scriptInfo = ts.Debug.assertDefined(this.projectService.getScriptInfo(file)); + var scriptInfo = ts.Debug.checkDefined(this.projectService.getScriptInfo(file)); return ts.map(locations, function (location) { var pos = _this.getPosition(location, scriptInfo); var selectionRange = languageService.getSmartSelectionRange(file, pos); @@ -144771,15 +146943,17 @@ var ts; } return result; }; - Session.prototype.toProtocolCallHierarchyItem = function (item, scriptInfo) { + Session.prototype.getScriptInfoFromProjectService = function (file) { + var normalizedFile = server.toNormalizedPath(file); + var scriptInfo = this.projectService.getScriptInfoForNormalizedPath(normalizedFile); if (!scriptInfo) { - var file = server.toNormalizedPath(item.file); - scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - if (!scriptInfo) { - this.projectService.logErrorForScriptInfoNotFound(file); - return server.Errors.ThrowNoProject(); - } + this.projectService.logErrorForScriptInfoNotFound(normalizedFile); + return server.Errors.ThrowNoProject(); } + return scriptInfo; + }; + Session.prototype.toProtocolCallHierarchyItem = function (item) { + var scriptInfo = this.getScriptInfoFromProjectService(item.file); return { name: item.name, kind: item.kind, @@ -144788,7 +146962,8 @@ var ts; selectionSpan: toProtocolTextSpan(item.selectionSpan, scriptInfo) }; }; - Session.prototype.toProtocolCallHierarchyIncomingCall = function (incomingCall, scriptInfo) { + Session.prototype.toProtocolCallHierarchyIncomingCall = function (incomingCall) { + var scriptInfo = this.getScriptInfoFromProjectService(incomingCall.from.file); return { from: this.toProtocolCallHierarchyItem(incomingCall.from), fromSpans: incomingCall.fromSpans.map(function (fromSpan) { return toProtocolTextSpan(fromSpan, scriptInfo); }) @@ -144807,34 +146982,26 @@ var ts; if (scriptInfo) { var position = this.getPosition(args, scriptInfo); var result = project.getLanguageService().prepareCallHierarchy(file, position); - return result && ts.mapOneOrMany(result, function (item) { return _this.toProtocolCallHierarchyItem(item, scriptInfo); }); + return result && ts.mapOneOrMany(result, function (item) { return _this.toProtocolCallHierarchyItem(item); }); } return undefined; }; Session.prototype.provideCallHierarchyIncomingCalls = function (args) { var _this = this; var _a = this.getFileAndProject(args), file = _a.file, project = _a.project; - var scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - if (!scriptInfo) { - this.projectService.logErrorForScriptInfoNotFound(file); - return server.Errors.ThrowNoProject(); - } + var scriptInfo = this.getScriptInfoFromProjectService(file); var incomingCalls = project.getLanguageService().provideCallHierarchyIncomingCalls(file, this.getPosition(args, scriptInfo)); - return incomingCalls.map(function (call) { return _this.toProtocolCallHierarchyIncomingCall(call, scriptInfo); }); + return incomingCalls.map(function (call) { return _this.toProtocolCallHierarchyIncomingCall(call); }); }; Session.prototype.provideCallHierarchyOutgoingCalls = function (args) { var _this = this; var _a = this.getFileAndProject(args), file = _a.file, project = _a.project; - var scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - if (!scriptInfo) { - this.projectService.logErrorForScriptInfoNotFound(file); - return server.Errors.ThrowNoProject(); - } + var scriptInfo = this.getScriptInfoFromProjectService(file); var outgoingCalls = project.getLanguageService().provideCallHierarchyOutgoingCalls(file, this.getPosition(args, scriptInfo)); return outgoingCalls.map(function (call) { return _this.toProtocolCallHierarchyOutgoingCall(call, scriptInfo); }); }; Session.prototype.getCanonicalFileName = function (fileName) { - var name = this.host.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); + var name = this.host.useCaseSensitiveFileNames ? fileName : ts.toFileNameLowerCase(fileName); return ts.normalizePath(name); }; Session.prototype.exit = function () { }; diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts index 1143d4c6ebceb..91eafc2894e1c 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -1,20 +1,20 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "3.8"; + const versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -383,29 +383,30 @@ declare namespace ts { JSDocSignature = 305, JSDocTag = 306, JSDocAugmentsTag = 307, - JSDocAuthorTag = 308, - JSDocClassTag = 309, - JSDocPublicTag = 310, - JSDocPrivateTag = 311, - JSDocProtectedTag = 312, - JSDocReadonlyTag = 313, - JSDocCallbackTag = 314, - JSDocEnumTag = 315, - JSDocParameterTag = 316, - JSDocReturnTag = 317, - JSDocThisTag = 318, - JSDocTypeTag = 319, - JSDocTemplateTag = 320, - JSDocTypedefTag = 321, - JSDocPropertyTag = 322, - SyntaxList = 323, - NotEmittedStatement = 324, - PartiallyEmittedExpression = 325, - CommaListExpression = 326, - MergeDeclarationMarker = 327, - EndOfDeclarationMarker = 328, - SyntheticReferenceExpression = 329, - Count = 330, + JSDocImplementsTag = 308, + JSDocAuthorTag = 309, + JSDocClassTag = 310, + JSDocPublicTag = 311, + JSDocPrivateTag = 312, + JSDocProtectedTag = 313, + JSDocReadonlyTag = 314, + JSDocCallbackTag = 315, + JSDocEnumTag = 316, + JSDocParameterTag = 317, + JSDocReturnTag = 318, + JSDocThisTag = 319, + JSDocTypeTag = 320, + JSDocTemplateTag = 321, + JSDocTypedefTag = 322, + JSDocPropertyTag = 323, + SyntaxList = 324, + NotEmittedStatement = 325, + PartiallyEmittedExpression = 326, + CommaListExpression = 327, + MergeDeclarationMarker = 328, + EndOfDeclarationMarker = 329, + SyntheticReferenceExpression = 330, + Count = 331, FirstAssignment = 62, LastAssignment = 74, FirstCompoundAssignment = 63, @@ -434,9 +435,9 @@ declare namespace ts { LastStatement = 241, FirstNode = 153, FirstJSDocNode = 294, - LastJSDocNode = 322, + LastJSDocNode = 323, FirstJSDocTagNode = 306, - LastJSDocTagNode = 322, + LastJSDocTagNode = 323, } export enum NodeFlags { None = 0, @@ -1145,7 +1146,7 @@ declare namespace ts { } export interface ExpressionWithTypeArguments extends NodeWithTypeArguments { kind: SyntaxKind.ExpressionWithTypeArguments; - parent: HeritageClause | JSDocAugmentsTag; + parent: HeritageClause | JSDocAugmentsTag | JSDocImplementsTag; expression: LeftHandSideExpression; } export interface NewExpression extends PrimaryExpression, Declaration { @@ -1547,6 +1548,7 @@ declare namespace ts { name: Identifier; } export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; + export type TypeOnlyCompatibleAliasDeclaration = ImportClause | NamespaceImport | ImportOrExportSpecifier; /** * This is either an `export =` or an `export default` declaration. * Unless `isExportEquals` is set, this node was parsed as an `export default`. @@ -1634,6 +1636,12 @@ declare namespace ts { expression: Identifier | PropertyAccessEntityNameExpression; }; } + export interface JSDocImplementsTag extends JSDocTag { + kind: SyntaxKind.JSDocImplementsTag; + class: ExpressionWithTypeArguments & { + expression: Identifier | PropertyAccessEntityNameExpression; + }; + } export interface JSDocAuthorTag extends JSDocTag { kind: SyntaxKind.JSDocAuthorTag; } @@ -1725,10 +1733,9 @@ declare namespace ts { SwitchClause = 128, ArrayMutation = 256, Call = 512, - Referenced = 1024, - Shared = 2048, - PreFinally = 4096, - AfterFinally = 8192, + ReduceLabel = 1024, + Referenced = 2048, + Shared = 4096, Label = 12, Condition = 96 } @@ -1775,6 +1782,11 @@ declare namespace ts { node: CallExpression | BinaryExpression; antecedent: FlowNode; } + export interface FlowReduceLabel extends FlowNodeBase { + target: FlowLabel; + antecedents: FlowNode[]; + antecedent: FlowNode; + } export type FlowType = Type | IncompleteType; export interface IncompleteType { flags: TypeFlags; @@ -1947,6 +1959,7 @@ declare namespace ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; + getInstantiationCount(): number; getRelationCacheSizes(): { assignable: number; identity: number; @@ -2117,6 +2130,7 @@ declare namespace ts { UseTypeOfFunction = 4096, OmitParameterModifiers = 8192, UseAliasDefinedOutsideCurrentScope = 16384, + UseSingleQuotesForStringLiteralType = 268435456, AllowThisInObjectLiteral = 32768, AllowQualifedNameInPlaceOfIdentifier = 65536, AllowAnonymousIdentifier = 131072, @@ -2144,6 +2158,7 @@ declare namespace ts { UseTypeOfFunction = 4096, OmitParameterModifiers = 8192, UseAliasDefinedOutsideCurrentScope = 16384, + UseSingleQuotesForStringLiteralType = 268435456, AllowUniqueESSymbolType = 1048576, AddUndefined = 131072, WriteArrowStyleSignature = 262144, @@ -2152,7 +2167,7 @@ declare namespace ts { InFirstTypeArgument = 4194304, InTypeAlias = 8388608, /** @deprecated */ WriteOwnNameForAnyLike = 0, - NodeBuilderFlagsMask = 9469291 + NodeBuilderFlagsMask = 277904747 } export enum SymbolFormatFlags { None = 0, @@ -2651,7 +2666,7 @@ declare namespace ts { experimentalDecorators?: boolean; forceConsistentCasingInFileNames?: boolean; importHelpers?: boolean; - importsNotUsedAsValues?: importsNotUsedAsValues; + importsNotUsedAsValues?: ImportsNotUsedAsValues; inlineSourceMap?: boolean; inlineSources?: boolean; isolatedModules?: boolean; @@ -2750,7 +2765,7 @@ declare namespace ts { React = 2, ReactNative = 3 } - export enum importsNotUsedAsValues { + export enum ImportsNotUsedAsValues { Remove = 0, Preserve = 1, Error = 2 @@ -2969,6 +2984,7 @@ declare namespace ts { readonly scoped: boolean; readonly text: string | ((node: EmitHelperUniqueNameCallback) => string); readonly priority?: number; + readonly dependencies?: EmitHelper[]; } export interface UnscopedEmitHelper extends EmitHelper { readonly scoped: false; @@ -2981,7 +2997,8 @@ declare namespace ts { IdentifierName = 2, MappedTypeParameter = 3, Unspecified = 4, - EmbeddedStatement = 5 + EmbeddedStatement = 5, + JsxAttributeValue = 6 } export interface TransformationContext { /** Gets the compiler options supplied to the transformer. */ @@ -3053,6 +3070,12 @@ declare namespace ts { * @param emitCallback A callback used to emit the node. */ emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; + /** + * Indicates if a given node needs an emit notification + * + * @param node The node to emit. + */ + isEmitNotificationEnabled?(node: Node): boolean; /** * Clean up EmitNode entries on any parse-tree nodes. */ @@ -3125,6 +3148,11 @@ declare namespace ts { * ``` */ onEmitNode?(hint: EmitHint, node: Node | undefined, emitCallback: (hint: EmitHint, node: Node | undefined) => void): void; + /** + * A hook used to check if an emit notification is required for a node. + * @param node The node to emit. + */ + isEmitNotificationEnabled?(node: Node | undefined): boolean; /** * A hook used by the Printer to perform just-in-time substitution of a node. This is * primarily used by node transformations that need to substitute one node for another, @@ -3244,7 +3272,7 @@ declare namespace ts { readonly includeCompletionsWithInsertText?: boolean; readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ - readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; + readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; } @@ -3330,7 +3358,8 @@ declare namespace ts { isUnterminated(): boolean; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; + reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; + reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; scanJsxIdentifier(): SyntaxKind; scanJsxAttributeValue(): SyntaxKind; reScanJsxAttributeValue(): SyntaxKind; @@ -3494,6 +3523,8 @@ declare namespace ts { function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean; /** Gets the JSDoc augments tag for the node if present */ function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined; + /** Gets the JSDoc implements tags for the node if present */ + function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[]; /** Gets the JSDoc class tag for the node if present */ function getJSDocClassTag(node: Node): JSDocClassTag | undefined; /** Gets the JSDoc public tag for the node if present */ @@ -3535,7 +3566,9 @@ 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): readonly JSDocTag[]; - /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + /** Gets all JSDoc tags that match a specified predicate */ + function getAllJSDocTags(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]; + /** Gets all JSDoc tags of a specified kind */ function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[]; /** * Gets the effective type parameters. If the node was parsed in a @@ -3711,6 +3744,7 @@ declare namespace ts { function isJSDoc(node: Node): node is JSDoc; function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag; function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; + function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; function isJSDocClassTag(node: Node): node is JSDocClassTag; function isJSDocPublicTag(node: Node): node is JSDocPublicTag; function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag; @@ -3739,7 +3773,7 @@ declare namespace ts { function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken; function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail; function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier; - function isTypeOnlyImportOrExportName(node: Node): boolean; + function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyCompatibleAliasDeclaration; function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken; function isModifier(node: Node): node is Modifier; function isEntityName(node: Node): node is EntityName; @@ -3772,6 +3806,8 @@ declare namespace ts { function isJSDocCommentContainingNode(node: Node): boolean; function isSetAccessor(node: Node): node is SetAccessorDeclaration; function isGetAccessor(node: Node): node is GetAccessorDeclaration; + /** True if has initializer node attached to it. */ + function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer; function isObjectLiteralElement(node: Node): node is ObjectLiteralElement; function isStringLiteralLike(node: Node): node is StringLiteralLike; } @@ -5184,7 +5220,7 @@ declare namespace ts { fileName: string; } type OrganizeImportsScope = CombinedCodeFixScope; - type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<"; + type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#"; interface GetCompletionsAtPositionOptions extends UserPreferences { /** * If the editor is asking for completions because a certain character was typed @@ -5652,6 +5688,7 @@ declare namespace ts { hasAction?: true; source?: string; isRecommended?: true; + isFromUncheckedFile?: true; } interface CompletionEntryDetails { name: string; diff --git a/lib/typescript.js b/lib/typescript.js index 147a6c200bf65..05d59f02abbf6 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ @@ -242,7 +242,7 @@ var ts; (function (ts) { // WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configurePrerelease` too. - ts.versionMajorMinor = "3.8"; + ts.versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ ts.version = ts.versionMajorMinor + ".0-dev"; /** @@ -1539,6 +1539,46 @@ var ts; /** Returns lower case string */ function toLowerCase(x) { return x.toLowerCase(); } ts.toLowerCase = toLowerCase; + // We convert the file names to lower case as key for file name on case insensitive file system + // While doing so we need to handle special characters (eg \u0130) to ensure that we dont convert + // it to lower case, fileName with its lowercase form can exist along side it. + // Handle special characters and make those case sensitive instead + // + // |-#--|-Unicode--|-Char code-|-Desc-------------------------------------------------------------------| + // | 1. | i | 105 | Ascii i | + // | 2. | I | 73 | Ascii I | + // |-------- Special characters ------------------------------------------------------------------------| + // | 3. | \u0130 | 304 | Uppper case I with dot above | + // | 4. | i,\u0307 | 105,775 | i, followed by 775: Lower case of (3rd item) | + // | 5. | I,\u0307 | 73,775 | I, followed by 775: Upper case of (4th item), lower case is (4th item) | + // | 6. | \u0131 | 305 | Lower case i without dot, upper case is I (2nd item) | + // | 7. | \u00DF | 223 | Lower case sharp s | + // + // Because item 3 is special where in its lowercase character has its own + // upper case form we cant convert its case. + // Rest special characters are either already in lower case format or + // they have corresponding upper case character so they dont need special handling + // + // But to avoid having to do string building for most common cases, also ignore + // a-z, 0-9, \u0131, \u00DF, \, /, ., : and space + var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; + /** + * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - \u0130) + * This function is used in places where we want to make file name as a key on these systems + * It is possible on mac to be able to refer to file name with I with dot on top as a fileName with its lower case form + * But on windows we cannot. Windows can have fileName with I with dot on top next to its lower case and they can not each be referred with the lowercase forms + * Technically we would want this function to be platform sepcific as well but + * our api has till now only taken caseSensitive as the only input and just for some characters we dont want to update API and ensure all customers use those api + * We could use upper case and we would still need to deal with the descripencies but + * we want to continue using lower case since in most cases filenames are lowercasewe and wont need any case changes and avoid having to store another string for the key + * So for this function purpose, we go ahead and assume character I with dot on top it as case sensitive since its very unlikely to use lower case form of that special character + */ + function toFileNameLowerCase(x) { + return fileNameLowerCaseRegExp.test(x) ? + x.replace(fileNameLowerCaseRegExp, toLowerCase) : + x; + } + ts.toFileNameLowerCase = toFileNameLowerCase; /** Throws an error because a function is not implemented. */ function notImplemented() { throw new Error("Not implemented"); @@ -1967,7 +2007,7 @@ var ts; return false; } function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toLowerCase; + return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; } ts.createGetCanonicalFileName = createGetCanonicalFileName; function patternText(_a) { @@ -2124,84 +2164,192 @@ var ts; } } } + function padLeft(s, length) { + while (s.length < length) { + s = " " + s; + } + return s; + } + ts.padLeft = padLeft; + function padRight(s, length) { + while (s.length < length) { + s = s + " "; + } + return s; + } + ts.padRight = padRight; })(ts || (ts = {})); /* @internal */ var ts; (function (ts) { var Debug; (function (Debug) { - /* eslint-disable prefer-const */ - Debug.currentAssertionLevel = 0 /* None */; + var currentAssertionLevel = 0 /* None */; + // eslint-disable-next-line prefer-const Debug.isDebugging = false; - /* eslint-enable prefer-const */ + var assertionCache = {}; + function getAssertionLevel() { + return currentAssertionLevel; + } + Debug.getAssertionLevel = getAssertionLevel; + function setAssertionLevel(level) { + var prevAssertionLevel = currentAssertionLevel; + currentAssertionLevel = level; + if (level > prevAssertionLevel) { + // restore assertion functions for the current assertion level (see `shouldAssertFunction`). + for (var _i = 0, _a = ts.getOwnKeys(assertionCache); _i < _a.length; _i++) { + var key = _a[_i]; + var cachedFunc = assertionCache[key]; + if (cachedFunc !== undefined && Debug[key] !== cachedFunc.assertion && level >= cachedFunc.level) { + Debug[key] = cachedFunc; + assertionCache[key] = undefined; + } + } + } + } + Debug.setAssertionLevel = setAssertionLevel; function shouldAssert(level) { - return Debug.currentAssertionLevel >= level; + return currentAssertionLevel >= level; } Debug.shouldAssert = shouldAssert; + /** + * Tests whether an assertion function should be executed. If it shouldn't, it is cached and replaced with `ts.noop`. + * Replaced assertion functions are restored when `Debug.setAssertionLevel` is set to a high enough level. + * @param level The minimum assertion level required. + * @param name The name of the current assertion function. + */ + function shouldAssertFunction(level, name) { + if (!shouldAssert(level)) { + assertionCache[name] = { level: level, assertion: Debug[name] }; + Debug[name] = ts.noop; + return false; + } + return true; + } + function fail(message, stackCrawlMark) { + debugger; + var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); + if (Error.captureStackTrace) { + Error.captureStackTrace(e, stackCrawlMark || fail); + } + throw e; + } + Debug.fail = fail; + function failBadSyntaxKind(node, message, stackCrawlMark) { + return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", stackCrawlMark || failBadSyntaxKind); + } + Debug.failBadSyntaxKind = failBadSyntaxKind; function assert(expression, message, verboseDebugInfo, stackCrawlMark) { if (!expression) { + message = message ? "False expression: " + message : "False expression."; if (verboseDebugInfo) { message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); } - fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert); + fail(message, stackCrawlMark || assert); } } Debug.assert = assert; - function assertEqual(a, b, msg, msg2) { + function assertEqual(a, b, msg, msg2, stackCrawlMark) { if (a !== b) { var message = msg ? msg2 ? msg + " " + msg2 : msg : ""; - fail("Expected " + a + " === " + b + ". " + message); + fail("Expected " + a + " === " + b + ". " + message, stackCrawlMark || assertEqual); } } Debug.assertEqual = assertEqual; - function assertLessThan(a, b, msg) { + function assertLessThan(a, b, msg, stackCrawlMark) { if (a >= b) { - fail("Expected " + a + " < " + b + ". " + (msg || "")); + fail("Expected " + a + " < " + b + ". " + (msg || ""), stackCrawlMark || assertLessThan); } } Debug.assertLessThan = assertLessThan; - function assertLessThanOrEqual(a, b) { + function assertLessThanOrEqual(a, b, stackCrawlMark) { if (a > b) { - fail("Expected " + a + " <= " + b); + fail("Expected " + a + " <= " + b, stackCrawlMark || assertLessThanOrEqual); } } Debug.assertLessThanOrEqual = assertLessThanOrEqual; - function assertGreaterThanOrEqual(a, b) { + function assertGreaterThanOrEqual(a, b, stackCrawlMark) { if (a < b) { - fail("Expected " + a + " >= " + b); + fail("Expected " + a + " >= " + b, stackCrawlMark || assertGreaterThanOrEqual); } } Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual; - function fail(message, stackCrawlMark) { - debugger; - var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); - if (Error.captureStackTrace) { - Error.captureStackTrace(e, stackCrawlMark || fail); + function assertIsDefined(value, message, stackCrawlMark) { + // eslint-disable-next-line no-null/no-null + if (value === undefined || value === null) { + fail(message, stackCrawlMark || assertIsDefined); } - throw e; } - Debug.fail = fail; - function assertDefined(value, message) { - // eslint-disable-next-line no-null/no-null - if (value === undefined || value === null) - return fail(message); + Debug.assertIsDefined = assertIsDefined; + function checkDefined(value, message, stackCrawlMark) { + assertIsDefined(value, message, stackCrawlMark || checkDefined); return value; } - Debug.assertDefined = assertDefined; - function assertEachDefined(value, message) { + Debug.checkDefined = checkDefined; + /** + * @deprecated Use `checkDefined` to check whether a value is defined inline. Use `assertIsDefined` to check whether + * a value is defined at the statement level. + */ + Debug.assertDefined = checkDefined; + function assertEachIsDefined(value, message, stackCrawlMark) { for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { var v = value_1[_i]; - assertDefined(v, message); + assertIsDefined(v, message, stackCrawlMark || assertEachIsDefined); } + } + Debug.assertEachIsDefined = assertEachIsDefined; + function checkEachDefined(value, message, stackCrawlMark) { + assertEachIsDefined(value, message, stackCrawlMark || checkEachDefined); return value; } - Debug.assertEachDefined = assertEachDefined; + Debug.checkEachDefined = checkEachDefined; + /** + * @deprecated Use `checkEachDefined` to check whether the elements of an array are defined inline. Use `assertEachIsDefined` to check whether + * the elements of an array are defined at the statement level. + */ + Debug.assertEachDefined = checkEachDefined; function assertNever(member, message, stackCrawlMark) { if (message === void 0) { message = "Illegal value:"; } var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member); return fail(message + " " + detail, stackCrawlMark || assertNever); } Debug.assertNever = assertNever; + function assertEachNode(nodes, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) { + assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertEachNode); + } + } + Debug.assertEachNode = assertEachNode; + function assertNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertNode")) { + assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNode); + } + } + Debug.assertNode = assertNode; + function assertNotNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) { + assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNotNode); + } + } + Debug.assertNotNode = assertNotNode; + function assertOptionalNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) { + assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertOptionalNode); + } + } + Debug.assertOptionalNode = assertOptionalNode; + function assertOptionalToken(node, kind, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) { + assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, stackCrawlMark || assertOptionalToken); + } + } + Debug.assertOptionalToken = assertOptionalToken; + function assertMissingNode(node, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) { + assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, stackCrawlMark || assertMissingNode); + } + } + Debug.assertMissingNode = assertMissingNode; function getFunctionName(func) { if (typeof func !== "function") { return ""; @@ -2299,28 +2447,6 @@ var ts; return formatEnum(flags, ts.ObjectFlags, /*isFlags*/ true); } Debug.formatObjectFlags = formatObjectFlags; - function failBadSyntaxKind(node, message) { - return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", failBadSyntaxKind); - } - Debug.failBadSyntaxKind = failBadSyntaxKind; - Debug.assertEachNode = shouldAssert(1 /* Normal */) - ? function (nodes, test, message) { return assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertEachNode); } - : ts.noop; - Debug.assertNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertNotNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertOptionalNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertOptionalNode); } - : ts.noop; - Debug.assertOptionalToken = shouldAssert(1 /* Normal */) - ? function (node, kind, message) { return assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, Debug.assertOptionalToken); } - : ts.noop; - Debug.assertMissingNode = shouldAssert(1 /* Normal */) - ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } - : ts.noop; var isDebugInfoEnabled = false; var extendedDebugModule; function extendedDebug() { @@ -2606,7 +2732,7 @@ var ts; if (prerelease === void 0) { prerelease = ""; } if (build === void 0) { build = ""; } if (typeof major === "string") { - var result = ts.Debug.assertDefined(tryParseComponents(major), "Invalid version"); + var result = ts.Debug.checkDefined(tryParseComponents(major), "Invalid version"); (major = result.major, minor = result.minor, patch = result.patch, prerelease = result.prerelease, build = result.build); } ts.Debug.assert(major >= 0, "Invalid argument: major"); @@ -2737,7 +2863,7 @@ var ts; */ var VersionRange = /** @class */ (function () { function VersionRange(spec) { - this._alternatives = spec ? ts.Debug.assertDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; + this._alternatives = spec ? ts.Debug.checkDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; } VersionRange.tryParse = function (text) { var sets = parseRange(text); @@ -3277,32 +3403,33 @@ var ts; SyntaxKind[SyntaxKind["JSDocSignature"] = 305] = "JSDocSignature"; SyntaxKind[SyntaxKind["JSDocTag"] = 306] = "JSDocTag"; SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 307] = "JSDocAugmentsTag"; - SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 308] = "JSDocAuthorTag"; - SyntaxKind[SyntaxKind["JSDocClassTag"] = 309] = "JSDocClassTag"; - SyntaxKind[SyntaxKind["JSDocPublicTag"] = 310] = "JSDocPublicTag"; - SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 311] = "JSDocPrivateTag"; - SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 312] = "JSDocProtectedTag"; - SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 313] = "JSDocReadonlyTag"; - SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 314] = "JSDocCallbackTag"; - SyntaxKind[SyntaxKind["JSDocEnumTag"] = 315] = "JSDocEnumTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 316] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 317] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocThisTag"] = 318] = "JSDocThisTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 319] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 320] = "JSDocTemplateTag"; - SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 321] = "JSDocTypedefTag"; - SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 322] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 308] = "JSDocImplementsTag"; + SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 309] = "JSDocAuthorTag"; + SyntaxKind[SyntaxKind["JSDocClassTag"] = 310] = "JSDocClassTag"; + SyntaxKind[SyntaxKind["JSDocPublicTag"] = 311] = "JSDocPublicTag"; + SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 312] = "JSDocPrivateTag"; + SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 313] = "JSDocProtectedTag"; + SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 314] = "JSDocReadonlyTag"; + SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 315] = "JSDocCallbackTag"; + SyntaxKind[SyntaxKind["JSDocEnumTag"] = 316] = "JSDocEnumTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 317] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 318] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocThisTag"] = 319] = "JSDocThisTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 320] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 321] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 322] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 323] = "JSDocPropertyTag"; // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 323] = "SyntaxList"; + SyntaxKind[SyntaxKind["SyntaxList"] = 324] = "SyntaxList"; // Transformation nodes - SyntaxKind[SyntaxKind["NotEmittedStatement"] = 324] = "NotEmittedStatement"; - SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 325] = "PartiallyEmittedExpression"; - SyntaxKind[SyntaxKind["CommaListExpression"] = 326] = "CommaListExpression"; - SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 327] = "MergeDeclarationMarker"; - SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 328] = "EndOfDeclarationMarker"; - SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 329] = "SyntheticReferenceExpression"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 325] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 326] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["CommaListExpression"] = 327] = "CommaListExpression"; + SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 328] = "MergeDeclarationMarker"; + SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 329] = "EndOfDeclarationMarker"; + SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 330] = "SyntheticReferenceExpression"; // Enum value count - SyntaxKind[SyntaxKind["Count"] = 330] = "Count"; + SyntaxKind[SyntaxKind["Count"] = 331] = "Count"; // Markers SyntaxKind[SyntaxKind["FirstAssignment"] = 62] = "FirstAssignment"; SyntaxKind[SyntaxKind["LastAssignment"] = 74] = "LastAssignment"; @@ -3332,9 +3459,9 @@ var ts; SyntaxKind[SyntaxKind["LastStatement"] = 241] = "LastStatement"; SyntaxKind[SyntaxKind["FirstNode"] = 153] = "FirstNode"; SyntaxKind[SyntaxKind["FirstJSDocNode"] = 294] = "FirstJSDocNode"; - SyntaxKind[SyntaxKind["LastJSDocNode"] = 322] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 323] = "LastJSDocNode"; SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 306] = "FirstJSDocTagNode"; - SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 322] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 323] = "LastJSDocTagNode"; /* @internal */ SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 122] = "FirstContextualKeyword"; /* @internal */ SyntaxKind[SyntaxKind["LastContextualKeyword"] = 152] = "LastContextualKeyword"; })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {})); @@ -3467,6 +3594,8 @@ var ts; /* @internal */ TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape"; /* @internal */ + TokenFlags[TokenFlags["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape"; + /* @internal */ TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; /* @internal */ TokenFlags[TokenFlags["NumericLiteralFlags"] = 1008] = "NumericLiteralFlags"; @@ -3484,10 +3613,9 @@ var ts; FlowFlags[FlowFlags["SwitchClause"] = 128] = "SwitchClause"; FlowFlags[FlowFlags["ArrayMutation"] = 256] = "ArrayMutation"; FlowFlags[FlowFlags["Call"] = 512] = "Call"; - FlowFlags[FlowFlags["Referenced"] = 1024] = "Referenced"; - FlowFlags[FlowFlags["Shared"] = 2048] = "Shared"; - FlowFlags[FlowFlags["PreFinally"] = 4096] = "PreFinally"; - FlowFlags[FlowFlags["AfterFinally"] = 8192] = "AfterFinally"; + FlowFlags[FlowFlags["ReduceLabel"] = 1024] = "ReduceLabel"; + FlowFlags[FlowFlags["Referenced"] = 2048] = "Referenced"; + FlowFlags[FlowFlags["Shared"] = 4096] = "Shared"; FlowFlags[FlowFlags["Label"] = 12] = "Label"; FlowFlags[FlowFlags["Condition"] = 96] = "Condition"; })(FlowFlags = ts.FlowFlags || (ts.FlowFlags = {})); @@ -3542,7 +3670,7 @@ var ts; ContextFlags[ContextFlags["None"] = 0] = "None"; ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; - ContextFlags[ContextFlags["BaseConstraint"] = 4] = "BaseConstraint"; + ContextFlags[ContextFlags["Completions"] = 4] = "Completions"; })(ContextFlags = ts.ContextFlags || (ts.ContextFlags = {})); // NOTE: If modifying this enum, must modify `TypeFormatFlags` too! var NodeBuilderFlags; @@ -3564,6 +3692,7 @@ var ts; NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; // Error handling NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; NodeBuilderFlags[NodeBuilderFlags["AllowQualifedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifedNameInPlaceOfIdentifier"; @@ -3601,6 +3730,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; TypeFormatFlags[TypeFormatFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; TypeFormatFlags[TypeFormatFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + TypeFormatFlags[TypeFormatFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; // Error Handling TypeFormatFlags[TypeFormatFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; // TypeFormatFlags exclusive @@ -3612,7 +3742,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 4194304] = "InFirstTypeArgument"; TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 8388608] = "InTypeAlias"; /** @deprecated */ TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 0] = "WriteOwnNameForAnyLike"; - TypeFormatFlags[TypeFormatFlags["NodeBuilderFlagsMask"] = 9469291] = "NodeBuilderFlagsMask"; + TypeFormatFlags[TypeFormatFlags["NodeBuilderFlagsMask"] = 277904747] = "NodeBuilderFlagsMask"; })(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {})); var SymbolFormatFlags; (function (SymbolFormatFlags) { @@ -3906,6 +4036,8 @@ var ts; TypeFlags[TypeFlags["ObjectFlagsType"] = 3899393] = "ObjectFlagsType"; /* @internal */ TypeFlags[TypeFlags["Simplifiable"] = 25165824] = "Simplifiable"; + /* @internal */ + TypeFlags[TypeFlags["Substructure"] = 66584576] = "Substructure"; // 'Narrowable' types are types where narrowing actually narrows. // This *should* be every type other than null, undefined, void, and never TypeFlags[TypeFlags["Narrowable"] = 133970943] = "Narrowable"; @@ -3924,9 +4056,6 @@ var ts; TypeFlags[TypeFlags["IncludesWildcard"] = 4194304] = "IncludesWildcard"; /* @internal */ TypeFlags[TypeFlags["IncludesEmptyObject"] = 8388608] = "IncludesEmptyObject"; - // The following flag is used for different purposes by maybeTypeOfKind - /* @internal */ - TypeFlags[TypeFlags["GenericMappedType"] = 131072] = "GenericMappedType"; })(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {})); var ObjectFlags; (function (ObjectFlags) { @@ -3956,6 +4085,18 @@ var ts; ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 1048576] = "ContainsObjectOrArrayLiteral"; /* @internal */ ObjectFlags[ObjectFlags["NonInferrableType"] = 2097152] = "NonInferrableType"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericObjectTypeComputed"] = 4194304] = "IsGenericObjectTypeComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericIndexTypeComputed"] = 16777216] = "IsGenericIndexTypeComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericIndexType"] = 33554432] = "IsGenericIndexType"; + /* @internal */ + ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 67108864] = "CouldContainTypeVariablesComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 134217728] = "CouldContainTypeVariables"; ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; /* @internal */ ObjectFlags[ObjectFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; @@ -4131,12 +4272,12 @@ var ts; JsxEmit[JsxEmit["React"] = 2] = "React"; JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative"; })(JsxEmit = ts.JsxEmit || (ts.JsxEmit = {})); - var importsNotUsedAsValues; - (function (importsNotUsedAsValues) { - importsNotUsedAsValues[importsNotUsedAsValues["Remove"] = 0] = "Remove"; - importsNotUsedAsValues[importsNotUsedAsValues["Preserve"] = 1] = "Preserve"; - importsNotUsedAsValues[importsNotUsedAsValues["Error"] = 2] = "Error"; - })(importsNotUsedAsValues = ts.importsNotUsedAsValues || (ts.importsNotUsedAsValues = {})); + var ImportsNotUsedAsValues; + (function (ImportsNotUsedAsValues) { + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Remove"] = 0] = "Remove"; + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Preserve"] = 1] = "Preserve"; + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Error"] = 2] = "Error"; + })(ImportsNotUsedAsValues = ts.ImportsNotUsedAsValues || (ts.ImportsNotUsedAsValues = {})); var NewLineKind; (function (NewLineKind) { NewLineKind[NewLineKind["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed"; @@ -4455,8 +4596,9 @@ var ts; ExternalEmitHelpers[ExternalEmitHelpers["MakeTemplateObject"] = 131072] = "MakeTemplateObject"; ExternalEmitHelpers[ExternalEmitHelpers["ClassPrivateFieldGet"] = 262144] = "ClassPrivateFieldGet"; ExternalEmitHelpers[ExternalEmitHelpers["ClassPrivateFieldSet"] = 524288] = "ClassPrivateFieldSet"; + ExternalEmitHelpers[ExternalEmitHelpers["CreateBinding"] = 1048576] = "CreateBinding"; ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper"; - ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 524288] = "LastEmitHelper"; + ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 1048576] = "LastEmitHelper"; // Helpers included by ES2015 for..of ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes"; // Helpers included by ES2017 for..await..of @@ -4476,6 +4618,7 @@ var ts; EmitHint[EmitHint["MappedTypeParameter"] = 3] = "MappedTypeParameter"; EmitHint[EmitHint["Unspecified"] = 4] = "Unspecified"; EmitHint[EmitHint["EmbeddedStatement"] = 5] = "EmbeddedStatement"; + EmitHint[EmitHint["JsxAttributeValue"] = 6] = "JsxAttributeValue"; })(EmitHint = ts.EmitHint || (ts.EmitHint = {})); /*@internal*/ var BundleFileSectionKind; @@ -4938,7 +5081,7 @@ var ts; callbacksCache.add(path, callback); return { close: function () { - var watcher = ts.Debug.assertDefined(cache.get(path)); + var watcher = ts.Debug.checkDefined(cache.get(path)); callbacksCache.remove(path, callback); watcher.refCount--; if (watcher.refCount) @@ -5036,7 +5179,7 @@ var ts; return { dirName: dirName, close: function () { - var directoryWatcher = ts.Debug.assertDefined(cache.get(dirPath)); + var directoryWatcher = ts.Debug.checkDefined(cache.get(dirPath)); if (callbackToAdd) callbackCache.remove(dirPath, callbackToAdd); directoryWatcher.refCount--; @@ -5223,7 +5366,7 @@ var ts; }; function watchFile(fileName, callback, pollingInterval, options) { options = updateOptionsForWatchFile(options, useNonPollingWatchers); - var watchFileKind = ts.Debug.assertDefined(options.watchFile); + var watchFileKind = ts.Debug.checkDefined(options.watchFile); switch (watchFileKind) { case ts.WatchFileKind.FixedPollingInterval: return pollingWatchFile(fileName, callback, PollingInterval.Low, /*options*/ undefined); @@ -5303,7 +5446,7 @@ var ts; function nonRecursiveWatchDirectory(directoryName, callback, recursive, options) { ts.Debug.assert(!recursive); options = updateOptionsForWatchDirectory(options); - var watchDirectoryKind = ts.Debug.assertDefined(options.watchDirectory); + var watchDirectoryKind = ts.Debug.checkDefined(options.watchDirectory); switch (watchDirectoryKind) { case ts.WatchDirectoryKind.FixedPollingInterval: return pollingWatchFile(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium, @@ -5909,48 +6052,8 @@ var ts; return hash.digest("hex"); } } - function getChakraSystem() { - var realpath = ChakraHost.realpath && (function (path) { return ChakraHost.realpath(path); }); - return { - newLine: ChakraHost.newLine || "\r\n", - args: ChakraHost.args, - useCaseSensitiveFileNames: !!ChakraHost.useCaseSensitiveFileNames, - write: ChakraHost.echo, - readFile: function (path, _encoding) { - // encoding is automatically handled by the implementation in ChakraHost - return ChakraHost.readFile(path); - }, - writeFile: function (path, data, writeByteOrderMark) { - // If a BOM is required, emit one - if (writeByteOrderMark) { - data = byteOrderMarkIndicator + data; - } - ChakraHost.writeFile(path, data); - }, - resolvePath: ChakraHost.resolvePath, - fileExists: ChakraHost.fileExists, - deleteFile: ChakraHost.deleteFile, - getModifiedTime: ChakraHost.getModifiedTime, - setModifiedTime: ChakraHost.setModifiedTime, - directoryExists: ChakraHost.directoryExists, - createDirectory: ChakraHost.createDirectory, - getExecutingFilePath: function () { return ChakraHost.executingFile; }, - getCurrentDirectory: function () { return ChakraHost.currentDirectory; }, - getDirectories: ChakraHost.getDirectories, - getEnvironmentVariable: ChakraHost.getEnvironmentVariable || (function () { return ""; }), - readDirectory: function (path, extensions, excludes, includes, _depth) { - var pattern = ts.getFileMatcherPatterns(path, excludes, includes, !!ChakraHost.useCaseSensitiveFileNames, ChakraHost.currentDirectory); - return ChakraHost.readDirectory(path, extensions, pattern.basePaths, pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern); - }, - exit: ChakraHost.quit, - realpath: realpath - }; - } var sys; - if (typeof ChakraHost !== "undefined") { - sys = getChakraSystem(); - } - else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { + if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { // process and process.nextTick checks if current environment is node-like // process.browser check excludes webpack and browserify sys = getNodeSystem(); @@ -5963,9 +6066,9 @@ var ts; })(); if (ts.sys && ts.sys.getEnvironmentVariable) { setCustomPollingValues(ts.sys); - ts.Debug.currentAssertionLevel = /^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) + ts.Debug.setAssertionLevel(/^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ - : 0 /* None */; + : 0 /* None */); } if (ts.sys && ts.sys.debugMode) { ts.Debug.isDebugging = true; @@ -6911,8 +7014,9 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), - Type_only_0_must_reference_a_type_but_1_is_a_value: diag(1361, ts.DiagnosticCategory.Error, "Type_only_0_must_reference_a_type_but_1_is_a_value_1361", "Type-only {0} must reference a type, but '{1}' is a value."), - Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported: diag(1362, ts.DiagnosticCategory.Error, "Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported_1362", "Enum '{0}' cannot be used as a value because only its type has been imported."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), + _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), + _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, ts.DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), Convert_to_type_only_export: diag(1364, ts.DiagnosticCategory.Message, "Convert_to_type_only_export_1364", "Convert to type-only export"), Convert_all_re_exported_types_to_type_only_exports: diag(1365, ts.DiagnosticCategory.Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), @@ -6922,11 +7026,16 @@ var ts; Did_you_mean_0: diag(1369, ts.DiagnosticCategory.Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"), Only_ECMAScript_imports_may_use_import_type: diag(1370, ts.DiagnosticCategory.Error, "Only_ECMAScript_imports_may_use_import_type_1370", "Only ECMAScript imports may use 'import type'."), This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error: diag(1371, ts.DiagnosticCategory.Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371", "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'."), - This_import_may_be_converted_to_a_type_only_import: diag(1372, ts.DiagnosticCategory.Suggestion, "This_import_may_be_converted_to_a_type_only_import_1372", "This import may be converted to a type-only import."), Convert_to_type_only_import: diag(1373, ts.DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"), Convert_all_imports_not_used_as_a_value_to_type_only_imports: diag(1374, ts.DiagnosticCategory.Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"), await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1376, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1376", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + _0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."), + _0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."), + Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), + An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), + Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), + Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), @@ -7087,6 +7196,8 @@ var ts; Type_alias_0_circularly_references_itself: diag(2456, ts.DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), Type_alias_name_cannot_be_0: diag(2457, ts.DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, ts.DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Module_0_declares_1_locally_but_it_is_not_exported: diag(2459, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), + Module_0_declares_1_locally_but_it_is_exported_as_2: diag(2460, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), Type_0_is_not_an_array_type: diag(2461, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, ts.DiagnosticCategory.Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, ts.DiagnosticCategory.Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), @@ -7310,7 +7421,7 @@ var ts; Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, ts.DiagnosticCategory.Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, ts.DiagnosticCategory.Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension"), Property_0_was_also_declared_here: diag(2733, ts.DiagnosticCategory.Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), - It_is_highly_likely_that_you_are_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "It_is_highly_likely_that_you_are_missing_a_semicolon_2734", "It is highly likely that you are missing a semicolon."), + Are_you_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, ts.DiagnosticCategory.Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), Operator_0_cannot_be_applied_to_type_1: diag(2736, ts.DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: diag(2737, ts.DiagnosticCategory.Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), @@ -7359,6 +7470,7 @@ var ts; The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: diag(2780, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: diag(2781, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), _0_needs_an_explicit_type_annotation: diag(2782, ts.DiagnosticCategory.Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), + _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: diag(2783, ts.DiagnosticCategory.Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), @@ -7546,7 +7658,7 @@ var ts; File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, ts.DiagnosticCategory.Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, ts.DiagnosticCategory.Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), NEWLINE: diag(6061, ts.DiagnosticCategory.Message, "NEWLINE_6061", "NEWLINE"), - Option_0_can_only_be_specified_in_tsconfig_json_file: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_6064", "Option '{0}' can only be specified in 'tsconfig.json' file."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), Enables_experimental_support_for_ES7_decorators: diag(6065, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), Enables_experimental_support_for_ES7_async_functions: diag(6068, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_async_functions_6068", "Enables experimental support for ES7 async functions."), @@ -7707,6 +7819,8 @@ var ts; Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling: diag(6226, ts.DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'."), Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority: diag(6227, ts.DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'."), Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6228, ts.DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228", "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively."), + Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, ts.DiagnosticCategory.Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), Projects_to_reference: diag(6300, ts.DiagnosticCategory.Message, "Projects_to_reference_6300", "Projects to reference"), Enable_project_compilation: diag(6302, ts.DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"), Composite_projects_may_not_disable_declaration_emit: diag(6304, ts.DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), @@ -7903,6 +8017,7 @@ var ts; Import_default_0_from_module_1: diag(90032, ts.DiagnosticCategory.Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""), Add_default_import_0_to_existing_import_declaration_from_1: diag(90033, ts.DiagnosticCategory.Message, "Add_default_import_0_to_existing_import_declaration_from_1_90033", "Add default import '{0}' to existing import declaration from \"{1}\""), Add_parameter_name: diag(90034, ts.DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"), + Declare_a_private_field_named_0: diag(90053, ts.DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), Convert_function_to_an_ES2015_class: diag(95001, ts.DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), Convert_function_0_to_class: diag(95002, ts.DiagnosticCategory.Message, "Convert_function_0_to_class_95002", "Convert function '{0}' to class"), Extract_to_0_in_1: diag(95004, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), @@ -7998,6 +8113,8 @@ var ts; Add_export_to_make_this_file_into_a_module: diag(95097, ts.DiagnosticCategory.Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), Set_the_target_option_in_your_configuration_file_to_0: diag(95098, ts.DiagnosticCategory.Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), Set_the_module_option_in_your_configuration_file_to_0: diag(95099, ts.DiagnosticCategory.Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), + Convert_invalid_character_to_its_html_entity_code: diag(95100, ts.DiagnosticCategory.Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), + Wrap_invalid_character_in_an_expression_container: diag(95101, ts.DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95101", "Wrap invalid character in an expression container"), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), @@ -8362,6 +8479,12 @@ var ts; function isDigit(ch) { return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; } + function isHexDigit(ch) { + return isDigit(ch) || ch >= 65 /* A */ && ch <= 70 /* F */ || ch >= 97 /* a */ && ch <= 102 /* f */; + } + function isCodePoint(code) { + return code <= 0x10FFFF; + } /* @internal */ function isOctalDigit(ch) { return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; @@ -8749,6 +8872,7 @@ var ts; reScanGreaterToken: reScanGreaterToken, reScanSlashToken: reScanSlashToken, reScanTemplateToken: reScanTemplateToken, + reScanTemplateHeadOrNoSubstitutionTemplate: reScanTemplateHeadOrNoSubstitutionTemplate, scanJsxIdentifier: scanJsxIdentifier, scanJsxAttributeValue: scanJsxAttributeValue, reScanJsxAttributeValue: reScanJsxAttributeValue, @@ -8997,7 +9121,7 @@ var ts; * Sets the current 'tokenValue' and returns a NoSubstitutionTemplateLiteral or * a literal component of a TemplateExpression. */ - function scanTemplateAndSetTokenValue() { + function scanTemplateAndSetTokenValue(isTaggedTemplate) { var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; pos++; var start = pos; @@ -9029,7 +9153,7 @@ var ts; // Escape character if (currChar === 92 /* backslash */) { contents += text.substring(start, pos); - contents += scanEscapeSequence(); + contents += scanEscapeSequence(isTaggedTemplate); start = pos; continue; } @@ -9051,7 +9175,8 @@ var ts; tokenValue = contents; return resultingToken; } - function scanEscapeSequence() { + function scanEscapeSequence(isTaggedTemplate) { + var start = pos; pos++; if (pos >= end) { error(ts.Diagnostics.Unexpected_end_of_text); @@ -9061,6 +9186,12 @@ var ts; pos++; switch (ch) { case 48 /* _0 */: + // '\01' + if (isTaggedTemplate && pos < end && isDigit(text.charCodeAt(pos))) { + pos++; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } return "\0"; case 98 /* b */: return "\b"; @@ -9079,16 +9210,55 @@ var ts; case 34 /* doubleQuote */: return "\""; case 117 /* u */: + if (isTaggedTemplate) { + // '\u' or '\u0' or '\u00' or '\u000' + for (var escapePos = pos; escapePos < pos + 4; escapePos++) { + if (escapePos < end && !isHexDigit(text.charCodeAt(escapePos)) && text.charCodeAt(escapePos) !== 123 /* openBrace */) { + pos = escapePos; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + } + } // '\u{DDDDDDDD}' if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) { - tokenFlags |= 8 /* ExtendedUnicodeEscape */; pos++; + // '\u{' + if (isTaggedTemplate && !isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + if (isTaggedTemplate) { + var savePos = pos; + var escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false); + var escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + // '\u{Not Code Point' or '\u{CodePoint' + if (!isCodePoint(escapedValue) || text.charCodeAt(pos) !== 125 /* closeBrace */) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + else { + pos = savePos; + } + } + tokenFlags |= 8 /* ExtendedUnicodeEscape */; return scanExtendedUnicodeEscape(); } tokenFlags |= 1024 /* UnicodeEscape */; // '\uDDDD' return scanHexadecimalEscape(/*numDigits*/ 4); case 120 /* x */: + if (isTaggedTemplate) { + if (!isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + else if (!isHexDigit(text.charCodeAt(pos + 1))) { + pos++; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + } // '\xDD' return scanHexadecimalEscape(/*numDigits*/ 2); // when encountering a LineContinuation (i.e. a backslash and a line terminator sequence), @@ -9362,7 +9532,7 @@ var ts; tokenValue = scanString(); return token = 10 /* StringLiteral */; case 96 /* backtick */: - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ false); case 37 /* percent */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { return pos += 2, token = 68 /* PercentEqualsToken */; @@ -9692,11 +9862,12 @@ var ts; if (ch === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } - return token = 76 /* PrivateIdentifier */; } - error(ts.Diagnostics.Invalid_character); - // no `pos++` because already advanced past the '#' - return token = 0 /* Unknown */; + else { + tokenValue = "#"; + error(ts.Diagnostics.Invalid_character); + } + return token = 76 /* PrivateIdentifier */; default: if (isIdentifierStart(ch, languageVersion)) { pos += charSize(ch); @@ -9798,10 +9969,14 @@ var ts; /** * Unconditionally back up and scan a template expression portion. */ - function reScanTemplateToken() { + function reScanTemplateToken(isTaggedTemplate) { ts.Debug.assert(token === 19 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + pos = tokenPos; + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ true); } function reScanJsxToken() { pos = tokenPos = startPos; @@ -9839,9 +10014,15 @@ var ts; } // First non-whitespace character on this line. var firstNonWhitespace = 0; + var lastNonWhitespace = -1; // These initial values are special because the first line is: // firstNonWhitespace = 0 to indicate that we want leading whitespace, while (pos < end) { + // We want to keep track of the last non-whitespace (but including + // newlines character for hitting the end of the JSX Text region) + if (!isWhiteSpaceSingleLine(char)) { + lastNonWhitespace = pos; + } char = text.charCodeAt(pos); if (char === 123 /* openBrace */) { break; @@ -9853,6 +10034,14 @@ var ts; } break; } + if (char === 62 /* greaterThan */) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); + } + if (char === 125 /* closeBrace */) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); + } + if (lastNonWhitespace > 0) + lastNonWhitespace++; // FirstNonWhitespace is 0, then we only see whitespaces so far. If we see a linebreak, we want to ignore that whitespaces. // i.e (- : whitespace) //
---- @@ -9867,7 +10056,8 @@ var ts; } pos++; } - tokenValue = text.substring(startPos, pos); + var endPosition = lastNonWhitespace === -1 ? pos : lastNonWhitespace; + tokenValue = text.substring(startPos, endPosition); return firstNonWhitespace === -1 ? 12 /* JsxTextAllWhiteSpaces */ : 11 /* JsxText */; } // Scans a JSX identifier; these differ from normal identifiers in that @@ -10598,8 +10788,8 @@ var ts; switch (declaration.kind) { case 75 /* Identifier */: return declaration; - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: { + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: { var name = declaration.name; if (name.kind === 153 /* QualifiedName */) { return name.right; @@ -10623,9 +10813,9 @@ var ts; return undefined; } } - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 315 /* JSDocEnumTag */: + case 316 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); case 259 /* ExportAssignment */: { var expression = declaration.expression; @@ -10729,6 +10919,11 @@ var ts; return getFirstJSDocTag(node, isJSDocAugmentsTag); } ts.getJSDocAugmentsTag = getJSDocAugmentsTag; + /** Gets the JSDoc implements tags for the node if present */ + function getJSDocImplementsTags(node) { + return getAllJSDocTags(node, isJSDocImplementsTag); + } + ts.getJSDocImplementsTags = getJSDocImplementsTags; /** Gets the JSDoc class tag for the node if present */ function getJSDocClassTag(node) { return getFirstJSDocTag(node, isJSDocClassTag); @@ -10843,7 +11038,12 @@ var ts; function getFirstJSDocTag(node, predicate) { return ts.find(getJSDocTags(node), predicate); } - /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + /** Gets all JSDoc tags that match a specified predicate */ + function getAllJSDocTags(node, predicate) { + return getJSDocTags(node).filter(predicate); + } + ts.getAllJSDocTags = getAllJSDocTags; + /** Gets all JSDoc tags of a specified kind */ function getAllJSDocTagsOfKind(node, kind) { return getJSDocTags(node).filter(function (doc) { return doc.kind === kind; }); } @@ -11189,7 +11389,7 @@ var ts; } ts.isParenthesizedExpression = isParenthesizedExpression; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 325 /* PartiallyEmittedExpression */) { + while (node.kind === 326 /* PartiallyEmittedExpression */) { node = node.expression; } return node; @@ -11613,67 +11813,71 @@ var ts; } ts.isJSDoc = isJSDoc; function isJSDocAuthorTag(node) { - return node.kind === 308 /* JSDocAuthorTag */; + return node.kind === 309 /* JSDocAuthorTag */; } ts.isJSDocAuthorTag = isJSDocAuthorTag; function isJSDocAugmentsTag(node) { return node.kind === 307 /* JSDocAugmentsTag */; } ts.isJSDocAugmentsTag = isJSDocAugmentsTag; + function isJSDocImplementsTag(node) { + return node.kind === 308 /* JSDocImplementsTag */; + } + ts.isJSDocImplementsTag = isJSDocImplementsTag; function isJSDocClassTag(node) { - return node.kind === 309 /* JSDocClassTag */; + return node.kind === 310 /* JSDocClassTag */; } ts.isJSDocClassTag = isJSDocClassTag; function isJSDocPublicTag(node) { - return node.kind === 310 /* JSDocPublicTag */; + return node.kind === 311 /* JSDocPublicTag */; } ts.isJSDocPublicTag = isJSDocPublicTag; function isJSDocPrivateTag(node) { - return node.kind === 311 /* JSDocPrivateTag */; + return node.kind === 312 /* JSDocPrivateTag */; } ts.isJSDocPrivateTag = isJSDocPrivateTag; function isJSDocProtectedTag(node) { - return node.kind === 312 /* JSDocProtectedTag */; + return node.kind === 313 /* JSDocProtectedTag */; } ts.isJSDocProtectedTag = isJSDocProtectedTag; function isJSDocReadonlyTag(node) { - return node.kind === 313 /* JSDocReadonlyTag */; + return node.kind === 314 /* JSDocReadonlyTag */; } ts.isJSDocReadonlyTag = isJSDocReadonlyTag; function isJSDocEnumTag(node) { - return node.kind === 315 /* JSDocEnumTag */; + return node.kind === 316 /* JSDocEnumTag */; } ts.isJSDocEnumTag = isJSDocEnumTag; function isJSDocThisTag(node) { - return node.kind === 318 /* JSDocThisTag */; + return node.kind === 319 /* JSDocThisTag */; } ts.isJSDocThisTag = isJSDocThisTag; function isJSDocParameterTag(node) { - return node.kind === 316 /* JSDocParameterTag */; + return node.kind === 317 /* JSDocParameterTag */; } ts.isJSDocParameterTag = isJSDocParameterTag; function isJSDocReturnTag(node) { - return node.kind === 317 /* JSDocReturnTag */; + return node.kind === 318 /* JSDocReturnTag */; } ts.isJSDocReturnTag = isJSDocReturnTag; function isJSDocTypeTag(node) { - return node.kind === 319 /* JSDocTypeTag */; + return node.kind === 320 /* JSDocTypeTag */; } ts.isJSDocTypeTag = isJSDocTypeTag; function isJSDocTemplateTag(node) { - return node.kind === 320 /* JSDocTemplateTag */; + return node.kind === 321 /* JSDocTemplateTag */; } ts.isJSDocTemplateTag = isJSDocTemplateTag; function isJSDocTypedefTag(node) { - return node.kind === 321 /* JSDocTypedefTag */; + return node.kind === 322 /* JSDocTypedefTag */; } ts.isJSDocTypedefTag = isJSDocTypedefTag; function isJSDocPropertyTag(node) { - return node.kind === 322 /* JSDocPropertyTag */; + return node.kind === 323 /* JSDocPropertyTag */; } ts.isJSDocPropertyTag = isJSDocPropertyTag; function isJSDocPropertyLikeTag(node) { - return node.kind === 322 /* JSDocPropertyTag */ || node.kind === 316 /* JSDocParameterTag */; + return node.kind === 323 /* JSDocPropertyTag */ || node.kind === 317 /* JSDocParameterTag */; } ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag; function isJSDocTypeLiteral(node) { @@ -11681,7 +11885,7 @@ var ts; } ts.isJSDocTypeLiteral = isJSDocTypeLiteral; function isJSDocCallbackTag(node) { - return node.kind === 314 /* JSDocCallbackTag */; + return node.kind === 315 /* JSDocCallbackTag */; } ts.isJSDocCallbackTag = isJSDocCallbackTag; function isJSDocSignature(node) { @@ -11696,7 +11900,7 @@ var ts; // they may be used with transformations. /* @internal */ function isSyntaxList(n) { - return n.kind === 323 /* SyntaxList */; + return n.kind === 324 /* SyntaxList */; } ts.isSyntaxList = isSyntaxList; /* @internal */ @@ -11754,21 +11958,20 @@ var ts; return isImportSpecifier(node) || isExportSpecifier(node); } ts.isImportOrExportSpecifier = isImportOrExportSpecifier; - function isTypeOnlyImportOrExportName(node) { - if (node.kind !== 75 /* Identifier */) { - return false; - } - switch (node.parent.kind) { + function isTypeOnlyImportOrExportDeclaration(node) { + switch (node.kind) { case 258 /* ImportSpecifier */: case 263 /* ExportSpecifier */: - return node.parent.parent.parent.isTypeOnly; - case 255 /* ImportClause */: + return node.parent.parent.isTypeOnly; + case 256 /* NamespaceImport */: return node.parent.isTypeOnly; + case 255 /* ImportClause */: + return node.isTypeOnly; default: return false; } } - ts.isTypeOnlyImportOrExportName = isTypeOnlyImportOrExportName; + ts.isTypeOnlyImportOrExportDeclaration = isTypeOnlyImportOrExportDeclaration; function isStringTextContainingNode(node) { return node.kind === 10 /* StringLiteral */ || isTemplateLiteralKind(node.kind); } @@ -12169,8 +12372,8 @@ var ts; case 213 /* SpreadElement */: case 217 /* AsExpression */: case 215 /* OmittedExpression */: - case 326 /* CommaListExpression */: - case 325 /* PartiallyEmittedExpression */: + case 327 /* CommaListExpression */: + case 326 /* PartiallyEmittedExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -12184,17 +12387,17 @@ var ts; ts.isAssertionExpression = isAssertionExpression; /* @internal */ function isPartiallyEmittedExpression(node) { - return node.kind === 325 /* PartiallyEmittedExpression */; + return node.kind === 326 /* PartiallyEmittedExpression */; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; /* @internal */ function isNotEmittedStatement(node) { - return node.kind === 324 /* NotEmittedStatement */; + return node.kind === 325 /* NotEmittedStatement */; } ts.isNotEmittedStatement = isNotEmittedStatement; /* @internal */ function isSyntheticReference(node) { - return node.kind === 329 /* SyntheticReferenceExpression */; + return node.kind === 330 /* SyntheticReferenceExpression */; } ts.isSyntheticReference = isSyntheticReference; /* @internal */ @@ -12327,9 +12530,9 @@ var ts; || kind === 247 /* TypeAliasDeclaration */ || kind === 155 /* TypeParameter */ || kind === 242 /* VariableDeclaration */ - || kind === 321 /* JSDocTypedefTag */ - || kind === 314 /* JSDocCallbackTag */ - || kind === 322 /* JSDocPropertyTag */; + || kind === 322 /* JSDocTypedefTag */ + || kind === 315 /* JSDocCallbackTag */ + || kind === 323 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { return kind === 244 /* FunctionDeclaration */ @@ -12364,14 +12567,14 @@ var ts; || kind === 225 /* VariableStatement */ || kind === 229 /* WhileStatement */ || kind === 236 /* WithStatement */ - || kind === 324 /* NotEmittedStatement */ - || kind === 328 /* EndOfDeclarationMarker */ - || kind === 327 /* MergeDeclarationMarker */; + || kind === 325 /* NotEmittedStatement */ + || kind === 329 /* EndOfDeclarationMarker */ + || kind === 328 /* MergeDeclarationMarker */; } /* @internal */ function isDeclaration(node) { if (node.kind === 155 /* TypeParameter */) { - return (node.parent && node.parent.kind !== 320 /* JSDocTemplateTag */) || ts.isInJSFile(node); + return (node.parent && node.parent.kind !== 321 /* JSDocTemplateTag */) || ts.isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -12466,18 +12669,18 @@ var ts; /** True if node is of some JSDoc syntax kind. */ /* @internal */ function isJSDocNode(node) { - return node.kind >= 294 /* FirstJSDocNode */ && node.kind <= 322 /* LastJSDocNode */; + return node.kind >= 294 /* FirstJSDocNode */ && node.kind <= 323 /* LastJSDocNode */; } ts.isJSDocNode = isJSDocNode; /** True if node is of a kind that may contain comment text. */ function isJSDocCommentContainingNode(node) { - return node.kind === 303 /* JSDocComment */ || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 303 /* JSDocComment */ || node.kind === 302 /* JSDocNamepathType */ || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode; // TODO: determine what this does before making it public. /* @internal */ function isJSDocTag(node) { - return node.kind >= 306 /* FirstJSDocTagNode */ && node.kind <= 322 /* LastJSDocTagNode */; + return node.kind >= 306 /* FirstJSDocTagNode */ && node.kind <= 323 /* LastJSDocTagNode */; } ts.isJSDocTag = isJSDocTag; function isSetAccessor(node) { @@ -12509,9 +12712,19 @@ var ts; } ts.hasInitializer = hasInitializer; /** True if has initializer node attached to it. */ - /* @internal */ function hasOnlyExpressionInitializer(node) { - return hasInitializer(node) && !isForStatement(node) && !isForInStatement(node) && !isForOfStatement(node) && !isJsxAttribute(node); + switch (node.kind) { + case 242 /* VariableDeclaration */: + case 156 /* Parameter */: + case 191 /* BindingElement */: + case 158 /* PropertySignature */: + case 159 /* PropertyDeclaration */: + case 281 /* PropertyAssignment */: + case 284 /* EnumMember */: + return true; + default: + return false; + } } ts.hasOnlyExpressionInitializer = hasOnlyExpressionInitializer; function isObjectLiteralElement(node) { @@ -12599,14 +12812,6 @@ var ts; return (symbol.flags & 33554432 /* Transient */) !== 0; } ts.isTransientSymbol = isTransientSymbol; - function isTypeOnlyAlias(symbol) { - return isTransientSymbol(symbol) && !!symbol.immediateTarget; - } - ts.isTypeOnlyAlias = isTypeOnlyAlias; - function isTypeOnlyEnumAlias(symbol) { - return isTypeOnlyAlias(symbol) && !!(symbol.immediateTarget.flags & 384 /* Enum */); - } - ts.isTypeOnlyEnumAlias = isTypeOnlyEnumAlias; var stringWriter = createSingleLineStringWriter(); function createSingleLineStringWriter() { var str = ""; @@ -13002,7 +13207,7 @@ var ts; // the syntax list itself considers them as normal trivia. Therefore if we simply skip // trivia for the list, we may have skipped the JSDocComment as well. So we should process its // first child to determine the actual position of its first token. - if (node.kind === 323 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 324 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); @@ -13021,7 +13226,7 @@ var ts; } ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; function isJSDocTypeExpressionOrChild(node) { - return node.kind === 294 /* JSDocTypeExpression */ || (node.parent && isJSDocTypeExpressionOrChild(node.parent)); + return !!findAncestor(node, ts.isJSDocTypeExpression); } function getTextOfNodeFromSourceText(sourceText, node, includeTrivia) { if (includeTrivia === void 0) { includeTrivia = false; } @@ -13060,30 +13265,35 @@ var ts; return emitNode && emitNode.flags || 0; } ts.getEmitFlags = getEmitFlags; - function getLiteralText(node, sourceFile, neverAsciiEscape) { + function getLiteralText(node, sourceFile, neverAsciiEscape, jsxAttributeEscape) { // If we don't need to downlevel and we can reach the original source text using // the node's parent reference, then simply get the text as it was originally written. if (!nodeIsSynthesized(node) && node.parent && !((ts.isNumericLiteral(node) && node.numericLiteralFlags & 512 /* ContainsSeparator */) || ts.isBigIntLiteral(node))) { return getSourceTextOfNodeFromSourceFile(sourceFile, node); } - // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text - // had to include a backslash: `not \${a} substitution`. - var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : escapeNonAsciiString; // If we can't reach the original source text, use the canonical form if it's a number, // or a (possibly escaped) quoted form of the original text if it's string-like. switch (node.kind) { - case 10 /* StringLiteral */: + case 10 /* StringLiteral */: { + var escapeText = jsxAttributeEscape ? escapeJsxAttributeString : + neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : + escapeNonAsciiString; if (node.singleQuote) { return "'" + escapeText(node.text, 39 /* singleQuote */) + "'"; } else { return '"' + escapeText(node.text, 34 /* doubleQuote */) + '"'; } + } case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: - case 17 /* TemplateTail */: + case 17 /* TemplateTail */: { + // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text + // had to include a backslash: `not \${a} substitution`. + var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : + escapeNonAsciiString; var rawText = node.rawText || escapeTemplateSubstitution(escapeText(node.text, 96 /* backtick */)); switch (node.kind) { case 14 /* NoSubstitutionTemplateLiteral */: @@ -13096,6 +13306,7 @@ var ts; return "}" + rawText + "`"; } break; + } case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 13 /* RegularExpressionLiteral */: @@ -13254,8 +13465,8 @@ var ts; ts.isBlockScope = isBlockScope; function isDeclarationWithTypeParameters(node) { switch (node.kind) { - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: case 305 /* JSDocSignature */: return true; default: @@ -13277,7 +13488,7 @@ var ts; case 214 /* ClassExpression */: case 246 /* InterfaceDeclaration */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: case 244 /* FunctionDeclaration */: case 161 /* MethodDeclaration */: case 162 /* Constructor */: @@ -13360,12 +13571,15 @@ var ts; ts.getTextOfPropertyName = getTextOfPropertyName; function entityNameToString(name) { switch (name.kind) { + case 104 /* ThisKeyword */: + return "this"; + case 76 /* PrivateIdentifier */: case 75 /* Identifier */: return getFullWidth(name) === 0 ? ts.idText(name) : getTextOfNode(name); case 153 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); case 194 /* PropertyAccessExpression */: - if (ts.isIdentifier(name.name)) { + if (ts.isIdentifier(name.name) || ts.isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { @@ -13615,7 +13829,7 @@ var ts; return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); case 155 /* TypeParameter */: return node === parent.constraint; - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return node === parent.constraint; case 159 /* PropertyDeclaration */: case 158 /* PropertySignature */: @@ -14234,6 +14448,13 @@ var ts; } } ts.isInExpressionContext = isInExpressionContext; + function isPartOfTypeQuery(node) { + while (node.kind === 153 /* QualifiedName */ || node.kind === 75 /* Identifier */) { + node = node.parent; + } + return node.kind === 172 /* TypeQuery */; + } + ts.isPartOfTypeQuery = isPartOfTypeQuery; function isExternalModuleImportEqualsDeclaration(node) { return node.kind === 253 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 265 /* ExternalModuleReference */; } @@ -14719,6 +14940,21 @@ var ts; return node.kind === 254 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } ts.isDefaultImport = isDefaultImport; + function forEachImportClauseDeclaration(node, action) { + if (node.name) { + var result = action(node); + if (result) + return result; + } + if (node.namedBindings) { + var result = ts.isNamespaceImport(node.namedBindings) + ? action(node.namedBindings) + : ts.forEach(node.namedBindings.elements, action); + if (result) + return result; + } + } + ts.forEachImportClauseDeclaration = forEachImportClauseDeclaration; function hasQuestionToken(node) { if (node) { switch (node.kind) { @@ -14742,7 +14978,7 @@ var ts; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function isJSDocTypeAlias(node) { - return node.kind === 321 /* JSDocTypedefTag */ || node.kind === 314 /* JSDocCallbackTag */ || node.kind === 315 /* JSDocEnumTag */; + return node.kind === 322 /* JSDocTypedefTag */ || node.kind === 315 /* JSDocCallbackTag */ || node.kind === 316 /* JSDocEnumTag */; } ts.isJSDocTypeAlias = isJSDocTypeAlias; function isTypeAlias(node) { @@ -14871,7 +15107,7 @@ var ts; } ts.getHostSignatureFromJSDocHost = getHostSignatureFromJSDocHost; function getJSDocHost(node) { - return ts.Debug.assertDefined(findAncestor(node.parent, ts.isJSDoc)).parent; + return ts.Debug.checkDefined(findAncestor(node.parent, ts.isJSDoc)).parent; } ts.getJSDocHost = getJSDocHost; function getTypeParameterFromJsDoc(node) { @@ -15133,9 +15369,27 @@ var ts; node.kind === 281 /* PropertyAssignment */ && isAliasableExpression(node.initializer); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; + function getAliasDeclarationFromName(node) { + switch (node.parent.kind) { + case 255 /* ImportClause */: + case 258 /* ImportSpecifier */: + case 256 /* NamespaceImport */: + case 263 /* ExportSpecifier */: + case 259 /* ExportAssignment */: + case 253 /* ImportEqualsDeclaration */: + return node.parent; + case 153 /* QualifiedName */: + do { + node = node.parent; + } while (node.parent.kind === 153 /* QualifiedName */); + return getAliasDeclarationFromName(node); + } + } + ts.getAliasDeclarationFromName = getAliasDeclarationFromName; function isAliasableExpression(e) { return isEntityNameExpression(e) || ts.isClassExpression(e); } + ts.isAliasableExpression = isAliasableExpression; function exportAssignmentIsAlias(node) { var e = getExportAssignmentExpression(node); return isAliasableExpression(e); @@ -15167,15 +15421,20 @@ var ts; return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassExtendsHeritageElement = getClassExtendsHeritageElement; - function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 113 /* ImplementsKeyword */); - return heritageClause ? heritageClause.types : undefined; + function getEffectiveImplementsTypeNodes(node) { + if (isInJSFile(node)) { + return ts.getJSDocImplementsTags(node).map(function (n) { return n.class; }); + } + else { + var heritageClause = getHeritageClause(node.heritageClauses, 113 /* ImplementsKeyword */); + return heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.types; + } } - ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; + ts.getEffectiveImplementsTypeNodes = getEffectiveImplementsTypeNodes; /** Returns the node in an `extends` or `implements` clause of a class or interface. */ function getAllSuperTypeNodes(node) { return ts.isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || ts.emptyArray : - ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getClassImplementsHeritageClauseElements(node)) || ts.emptyArray : + ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || ts.emptyArray : ts.emptyArray; } ts.getAllSuperTypeNodes = getAllSuperTypeNodes; @@ -15498,7 +15757,7 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return 0; case 213 /* SpreadElement */: return 1; @@ -15690,6 +15949,13 @@ var ts; function escapeTemplateSubstitution(str) { return str.replace(templateSubstitutionRegExp, "\\${"); } + /** @internal */ + function hasInvalidEscape(template) { + return template && !!(ts.isNoSubstitutionTemplateLiteral(template) + ? template.templateFlags + : (template.head.templateFlags || ts.some(template.templateSpans, function (span) { return !!span.literal.templateFlags; }))); + } + ts.hasInvalidEscape = hasInvalidEscape; // This consists of the first 19 unprintable ASCII characters, canonical escapes, lineSeparator, // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in // the language service. These characters should be escaped when printing, and if any characters are added, @@ -15714,6 +15980,23 @@ var ts; "\u2029": "\\u2029", "\u0085": "\\u0085" // nextLine }); + function encodeUtf16EscapeSequence(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + var paddedHexCode = ("0000" + hexCharCode).slice(-4); + return "\\u" + paddedHexCode; + } + function getReplacement(c, offset, input) { + if (c.charCodeAt(0) === 0 /* nullCharacter */) { + var lookAhead = input.charCodeAt(offset + c.length); + if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) { + // If the null character is followed by digits, print as a hex escape to prevent the result from parsing as an octal (which is forbidden in strict mode) + return "\\x00"; + } + // Otherwise, keep printing a literal \0 for the null character + return "\\0"; + } + return escapedCharsMap.get(c) || encodeUtf16EscapeSequence(c.charCodeAt(0)); + } /** * Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), * but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) @@ -15726,6 +16009,42 @@ var ts; return s.replace(escapedCharsRegExp, getReplacement); } ts.escapeString = escapeString; + var nonAsciiCharacters = /[^\u0000-\u007F]/g; + function escapeNonAsciiString(s, quoteChar) { + s = escapeString(s, quoteChar); + // Replace non-ASCII characters with '\uNNNN' escapes if any exist. + // Otherwise just return the original string. + return nonAsciiCharacters.test(s) ? + s.replace(nonAsciiCharacters, function (c) { return encodeUtf16EscapeSequence(c.charCodeAt(0)); }) : + s; + } + ts.escapeNonAsciiString = escapeNonAsciiString; + // This consists of the first 19 unprintable ASCII characters, JSX canonical escapes, lineSeparator, + // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in + // the language service. These characters should be escaped when printing, and if any characters are added, + // the map below must be updated. + var jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxEscapedCharsMap = ts.createMapFromTemplate({ + "\"": """, + "\'": "'" + }); + function encodeJsxCharacterEntity(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + return "&#x" + hexCharCode + ";"; + } + function getJsxAttributeStringReplacement(c) { + if (c.charCodeAt(0) === 0 /* nullCharacter */) { + return "�"; + } + return jsxEscapedCharsMap.get(c) || encodeJsxCharacterEntity(c.charCodeAt(0)); + } + function escapeJsxAttributeString(s, quoteChar) { + var escapedCharsRegExp = quoteChar === 39 /* singleQuote */ ? jsxSingleQuoteEscapedCharsRegExp : + jsxDoubleQuoteEscapedCharsRegExp; + return s.replace(escapedCharsRegExp, getJsxAttributeStringReplacement); + } + ts.escapeJsxAttributeString = escapeJsxAttributeString; /** * Strip off existed surrounding single quotes, double quotes, or backticks from a given string * @@ -15744,38 +16063,11 @@ var ts; charCode === 34 /* doubleQuote */ || charCode === 96 /* backtick */; } - function getReplacement(c, offset, input) { - if (c.charCodeAt(0) === 0 /* nullCharacter */) { - var lookAhead = input.charCodeAt(offset + c.length); - if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) { - // If the null character is followed by digits, print as a hex escape to prevent the result from parsing as an octal (which is forbidden in strict mode) - return "\\x00"; - } - // Otherwise, keep printing a literal \0 for the null character - return "\\0"; - } - return escapedCharsMap.get(c) || get16BitUnicodeEscapeSequence(c.charCodeAt(0)); - } function isIntrinsicJsxName(name) { var ch = name.charCodeAt(0); return (ch >= 97 /* a */ && ch <= 122 /* z */) || ts.stringContains(name, "-"); } ts.isIntrinsicJsxName = isIntrinsicJsxName; - function get16BitUnicodeEscapeSequence(charCode) { - var hexCharCode = charCode.toString(16).toUpperCase(); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - var nonAsciiCharacters = /[^\u0000-\u007F]/g; - function escapeNonAsciiString(s, quoteChar) { - s = escapeString(s, quoteChar); - // Replace non-ASCII characters with '\uNNNN' escapes if any exist. - // Otherwise just return the original string. - return nonAsciiCharacters.test(s) ? - s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) : - s; - } - ts.escapeNonAsciiString = escapeNonAsciiString; var indentStrings = ["", " "]; function getIndentString(level) { if (indentStrings[level] === undefined) { @@ -16432,6 +16724,9 @@ var ts; } ts.getSelectedModifierFlags = getSelectedModifierFlags; function getModifierFlags(node) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 152 /* LastToken */) { + return 0 /* None */; + } if (node.modifierFlagsCache & 536870912 /* HasComputedFlags */) { return node.modifierFlagsCache & ~536870912 /* HasComputedFlags */; } @@ -16547,7 +16842,7 @@ var ts; } ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { - return node.kind === 75 /* Identifier */ || node.kind === 104 /* ThisKeyword */ || + return node.kind === 75 /* Identifier */ || node.kind === 104 /* ThisKeyword */ || node.kind === 102 /* SuperKeyword */ || node.kind === 194 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 200 /* ParenthesizedExpression */ && isDottedName(node.expression); } @@ -17165,6 +17460,14 @@ var ts; return node.kind === 194 /* PropertyAccessExpression */ || node.kind === 195 /* ElementAccessExpression */; } ts.isAccessExpression = isAccessExpression; + function getNameOfAccessExpression(node) { + if (node.kind === 194 /* PropertyAccessExpression */) { + return node.name; + } + ts.Debug.assert(node.kind === 195 /* ElementAccessExpression */); + return node.argumentExpression; + } + ts.getNameOfAccessExpression = getNameOfAccessExpression; function isBundleFileTextLike(section) { switch (section.kind) { case "text" /* Text */: @@ -17215,6 +17518,26 @@ var ts; this.parent = undefined; this.original = undefined; } + function Token(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0 /* None */; + this.transformFlags = 0 /* None */; + this.parent = undefined; + } + function Identifier(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0 /* None */; + this.transformFlags = 0 /* None */; + this.parent = undefined; + this.original = undefined; + this.flowNode = undefined; + } function SourceMapSource(fileName, text, skipTrivia) { this.fileName = fileName; this.text = text; @@ -17223,8 +17546,8 @@ var ts; // eslint-disable-next-line prefer-const ts.objectAllocator = { getNodeConstructor: function () { return Node; }, - getTokenConstructor: function () { return Node; }, - getIdentifierConstructor: function () { return Node; }, + getTokenConstructor: function () { return Token; }, + getIdentifierConstructor: function () { return Identifier; }, getPrivateIdentifierConstructor: function () { return Node; }, getSourceFileConstructor: function () { return Node; }, getSymbolConstructor: function () { return Symbol; }, @@ -17238,7 +17561,7 @@ var ts; ts.setObjectAllocator = setObjectAllocator; function formatStringFromArgs(text, args, baseIndex) { if (baseIndex === void 0) { baseIndex = 0; } - return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.assertDefined(args[+index + baseIndex]); }); + return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.checkDefined(args[+index + baseIndex]); }); } ts.formatStringFromArgs = formatStringFromArgs; /* @internal */ @@ -18235,6 +18558,34 @@ var ts; return (negative && base10Value !== "0" ? "-" : "") + base10Value; } ts.pseudoBigIntToString = pseudoBigIntToString; + function isValidTypeOnlyAliasUseSite(useSite) { + return !!(useSite.flags & 8388608 /* Ambient */) + || isPartOfTypeQuery(useSite) + || isFirstIdentifierOfNonEmittingHeritageClause(useSite) + || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) + || !isExpressionNode(useSite); + } + ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite; + function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { + while (node.kind === 75 /* Identifier */ || node.kind === 194 /* PropertyAccessExpression */) { + node = node.parent; + } + if (node.kind !== 154 /* ComputedPropertyName */) { + return false; + } + if (hasModifier(node.parent, 128 /* Abstract */)) { + return true; + } + var containerKind = node.parent.parent.kind; + return containerKind === 246 /* InterfaceDeclaration */ || containerKind === 173 /* TypeLiteral */; + } + /** Returns true for the first identifier of 1) an `implements` clause, and 2) an `extends` clause of an interface. */ + function isFirstIdentifierOfNonEmittingHeritageClause(node) { + var _a, _b; + // Number of parents to climb from identifier is 2 for `implements I`, 3 for `implements x.I` + var heritageClause = (_a = ts.tryCast(node.parent.parent, ts.isHeritageClause)) !== null && _a !== void 0 ? _a : ts.tryCast((_b = node.parent.parent) === null || _b === void 0 ? void 0 : _b.parent, ts.isHeritageClause); + return (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.token) === 113 /* ImplementsKeyword */ || (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.parent.kind) === 246 /* InterfaceDeclaration */; + } })(ts || (ts = {})); var ts; (function (ts) { @@ -18663,7 +19014,7 @@ var ts; return visitNode(cbNode, node.expression); case 264 /* MissingDeclaration */: return visitNodes(cbNode, cbNodes, node.decorators); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return visitNodes(cbNode, cbNodes, node.elements); case 266 /* JsxElement */: return visitNode(cbNode, node.openingElement) || @@ -18703,24 +19054,27 @@ var ts; visitNode(cbNode, node.type); case 303 /* JSDocComment */: return visitNodes(cbNode, cbNodes, node.tags); - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return visitNode(cbNode, node.tagName) || (node.isNameFirst ? visitNode(cbNode, node.name) || visitNode(cbNode, node.typeExpression) : visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name)); - case 308 /* JSDocAuthorTag */: + case 309 /* JSDocAuthorTag */: return visitNode(cbNode, node.tagName); + case 308 /* JSDocImplementsTag */: + return visitNode(cbNode, node.tagName) || + visitNode(cbNode, node.class); case 307 /* JSDocAugmentsTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.class); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters); - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return visitNode(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 294 /* JSDocTypeExpression */ @@ -18728,14 +19082,14 @@ var ts; visitNode(cbNode, node.fullName) : visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression)); - case 314 /* JSDocCallbackTag */: + case 315 /* JSDocCallbackTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression); - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 318 /* JSDocThisTag */: - case 315 /* JSDocEnumTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 319 /* JSDocThisTag */: + case 316 /* JSDocEnumTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.typeExpression); case 305 /* JSDocSignature */: @@ -18745,17 +19099,85 @@ var ts; case 304 /* JSDocTypeLiteral */: return ts.forEach(node.jsDocPropertyTags, cbNode); case 306 /* JSDocTag */: - case 309 /* JSDocClassTag */: - case 310 /* JSDocPublicTag */: - case 311 /* JSDocPrivateTag */: - case 312 /* JSDocProtectedTag */: - case 313 /* JSDocReadonlyTag */: + case 310 /* JSDocClassTag */: + case 311 /* JSDocPublicTag */: + case 312 /* JSDocPrivateTag */: + case 313 /* JSDocProtectedTag */: + case 314 /* JSDocReadonlyTag */: return visitNode(cbNode, node.tagName); - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return visitNode(cbNode, node.expression); } } ts.forEachChild = forEachChild; + /** @internal */ + /** + * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes + * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; additionally, + * unlike `forEachChild`, embedded arrays are flattened and the 'cbNode' callback is invoked for each element. + * If a callback returns a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. + * + * @param node a given node to visit its children + * @param cbNode a callback to be invoked for all child nodes + * @param cbNodes a callback to be invoked for embedded array + * + * @remarks Unlike `forEachChild`, `forEachChildRecursively` handles recursively invoking the traversal on each child node found, + * and while doing so, handles traversing the structure without relying on the callstack to encode the tree structure. + */ + function forEachChildRecursively(rootNode, cbNode, cbNodes) { + var stack = [rootNode]; + while (stack.length) { + var parent = stack.pop(); + var res = visitAllPossibleChildren(parent, gatherPossibleChildren(parent)); + if (res) { + return res; + } + } + return; + function gatherPossibleChildren(node) { + var children = []; + forEachChild(node, addWorkItem, addWorkItem); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal + return children; + function addWorkItem(n) { + children.unshift(n); + } + } + function visitAllPossibleChildren(parent, children) { + for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { + var child = children_1[_i]; + if (ts.isArray(child)) { + if (cbNodes) { + var res = cbNodes(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + for (var i = child.length - 1; i >= 0; i--) { + var realChild = child[i]; + var res = cbNode(realChild, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + stack.push(realChild); + } + } + else { + stack.push(child); + var res = cbNode(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + } + } + } + ts.forEachChildRecursively = forEachChildRecursively; function createSourceFile(fileName, sourceText, languageVersion, setParentNodes, scriptKind) { if (setParentNodes === void 0) { setParentNodes = false; } ts.performance.mark("beforeParse"); @@ -19106,27 +19528,15 @@ var ts; // a syntax tree, and no semantic features, then the binding process is an unnecessary // overhead. This functions allows us to set all the parents, without all the expense of // binding. - var parent = rootNode; - forEachChild(rootNode, visitNode); - return; - function visitNode(n) { - // walk down setting parents that differ from the parent we think it should be. This - // allows us to quickly bail out of setting parents for subtrees during incremental - // parsing - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; - forEachChild(n, visitNode); - if (ts.hasJSDocNodes(n)) { - for (var _i = 0, _a = n.jsDoc; _i < _a.length; _i++) { - var jsDoc = _a[_i]; - jsDoc.parent = n; - parent = jsDoc; - forEachChild(jsDoc, visitNode); - } + forEachChildRecursively(rootNode, bindParentToChild); + function bindParentToChild(child, parent) { + child.parent = parent; + if (ts.hasJSDocNodes(child)) { + for (var _i = 0, _a = child.jsDoc; _i < _a.length; _i++) { + var doc = _a[_i]; + bindParentToChild(doc, child); + forEachChildRecursively(doc, bindParentToChild); } - parent = saveParent; } } } @@ -19297,8 +19707,11 @@ var ts; function reScanSlashToken() { return currentToken = scanner.reScanSlashToken(); } - function reScanTemplateToken() { - return currentToken = scanner.reScanTemplateToken(); + function reScanTemplateToken(isTaggedTemplate) { + return currentToken = scanner.reScanTemplateToken(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + return currentToken = scanner.reScanTemplateHeadOrNoSubstitutionTemplate(); } function reScanLessThanToken() { return currentToken = scanner.reScanLessThanToken(); @@ -19518,7 +19931,7 @@ var ts; // An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues // with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for // each identifier in order to reduce memory consumption. - function createIdentifier(isIdentifier, diagnosticMessage) { + function createIdentifier(isIdentifier, diagnosticMessage, privateIdentifierDiagnosticMessage) { identifierCount++; if (isIdentifier) { var node = createNode(75 /* Identifier */); @@ -19530,6 +19943,10 @@ var ts; nextTokenWithoutCheck(); return finishNode(node); } + if (token() === 76 /* PrivateIdentifier */) { + parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + return createIdentifier(/*isIdentifier*/ true); + } // Only for end of file because the error gets reported incorrectly on embedded script tags. var reportAtCurrentPosition = token() === 1 /* EndOfFileToken */; var isReservedWord = scanner.isReservedWord(); @@ -19539,8 +19956,8 @@ var ts; ts.Diagnostics.Identifier_expected; return createMissingNode(75 /* Identifier */, reportAtCurrentPosition, diagnosticMessage || defaultMessage, msgArg); } - function parseIdentifier(diagnosticMessage) { - return createIdentifier(isIdentifier(), diagnosticMessage); + function parseIdentifier(diagnosticMessage, privateIdentifierDiagnosticMessage) { + return createIdentifier(isIdentifier(), diagnosticMessage, privateIdentifierDiagnosticMessage); } function parseIdentifierName(diagnosticMessage) { return createIdentifier(ts.tokenIsIdentifierOrKeyword(token()), diagnosticMessage); @@ -19716,9 +20133,9 @@ var ts; return isIdentifier() && !isHeritageClauseExtendsOrImplementsKeyword(); } case 8 /* VariableDeclarations */: - return isIdentifierOrPattern(); + return isIdentifierOrPrivateIdentifierOrPattern(); case 10 /* ArrayBindingElements */: - return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isIdentifierOrPattern(); + return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isIdentifierOrPrivateIdentifierOrPattern(); case 19 /* TypeParameters */: return isIdentifier(); case 15 /* ArrayLiteralMembers */: @@ -20314,24 +20731,24 @@ var ts; } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } - function parseTemplateExpression() { + function parseTemplateExpression(isTaggedTemplate) { var template = createNode(211 /* TemplateExpression */); - template.head = parseTemplateHead(); + template.head = parseTemplateHead(isTaggedTemplate); ts.Debug.assert(template.head.kind === 15 /* TemplateHead */, "Template head has wrong token kind"); var list = []; var listPos = getNodePos(); do { - list.push(parseTemplateSpan()); + list.push(parseTemplateSpan(isTaggedTemplate)); } while (ts.last(list).literal.kind === 16 /* TemplateMiddle */); template.templateSpans = createNodeArray(list, listPos); return finishNode(template); } - function parseTemplateSpan() { + function parseTemplateSpan(isTaggedTemplate) { var span = createNode(221 /* TemplateSpan */); span.expression = allowInAnd(parseExpression); var literal; if (token() === 19 /* CloseBraceToken */) { - reScanTemplateToken(); + reScanTemplateToken(isTaggedTemplate); literal = parseTemplateMiddleOrTemplateTail(); } else { @@ -20343,7 +20760,10 @@ var ts; function parseLiteralNode() { return parseLiteralLikeNode(token()); } - function parseTemplateHead() { + function parseTemplateHead(isTaggedTemplate) { + if (isTaggedTemplate) { + reScanTemplateHeadOrNoSubstitutionTemplate(); + } var fragment = parseLiteralLikeNode(token()); ts.Debug.assert(fragment.kind === 15 /* TemplateHead */, "Template head has wrong token kind"); return fragment; @@ -20381,6 +20801,9 @@ var ts; if (node.kind === 8 /* NumericLiteral */) { node.numericLiteralFlags = scanner.getTokenFlags() & 1008 /* NumericLiteralFlags */; } + if (ts.isTemplateLiteralKind(node.kind)) { + node.templateFlags = scanner.getTokenFlags() & 2048 /* ContainsInvalidEscape */; + } nextToken(); finishNode(node); return node; @@ -20564,7 +20987,7 @@ var ts; } function isStartOfParameter(isJSDocParameter) { return token() === 25 /* DotDotDotToken */ || - isIdentifierOrPattern() || + isIdentifierOrPrivateIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 59 /* AtToken */ || isStartOfType(/*inStartOfParameter*/ !isJSDocParameter); @@ -20581,7 +21004,7 @@ var ts; node.dotDotDotToken = parseOptionalToken(25 /* DotDotDotToken */); // FormalParameter [Yield,Await]: // BindingElement[?Yield,?Await] - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_cannot_be_used_as_parameters); if (ts.getFullWidth(node.name) === 0 && !node.modifiers && ts.isModifierKind(token())) { // in cases like // 'use strict' @@ -21318,6 +21741,7 @@ var ts; case 29 /* LessThanToken */: case 127 /* AwaitKeyword */: case 121 /* YieldKeyword */: + case 76 /* PrivateIdentifier */: // Yield/await always starts an expression. Either it is an identifier (in which case // it is definitely an expression). Or it's a keyword (either because we're in // a generator or async function, or in strict mode (or both)) and it started a yield or await expression. @@ -22501,8 +22925,8 @@ var ts; tagExpression.questionDotToken = questionDotToken; tagExpression.typeArguments = typeArguments; tagExpression.template = token() === 14 /* NoSubstitutionTemplateLiteral */ - ? parseLiteralNode() - : parseTemplateExpression(); + ? (reScanTemplateHeadOrNoSubstitutionTemplate(), parseLiteralNode()) + : parseTemplateExpression(/*isTaggedTemplate*/ true); if (questionDotToken || tag.flags & 32 /* OptionalChain */) { tagExpression.flags |= 32 /* OptionalChain */; } @@ -22663,7 +23087,7 @@ var ts; } break; case 15 /* TemplateHead */: - return parseTemplateExpression(); + return parseTemplateExpression(/* isTaggedTemplate */ false); } return parseIdentifier(ts.Diagnostics.Expression_expected); } @@ -23427,24 +23851,27 @@ var ts; parseExpected(23 /* CloseBracketToken */); return finishNode(node); } - function isIdentifierOrPattern() { - return token() === 18 /* OpenBraceToken */ || token() === 22 /* OpenBracketToken */ || isIdentifier(); + function isIdentifierOrPrivateIdentifierOrPattern() { + return token() === 18 /* OpenBraceToken */ + || token() === 22 /* OpenBracketToken */ + || token() === 76 /* PrivateIdentifier */ + || isIdentifier(); } - function parseIdentifierOrPattern() { + function parseIdentifierOrPattern(privateIdentifierDiagnosticMessage) { if (token() === 22 /* OpenBracketToken */) { return parseArrayBindingPattern(); } if (token() === 18 /* OpenBraceToken */) { return parseObjectBindingPattern(); } - return parseIdentifier(); + return parseIdentifier(/*diagnosticMessage*/ undefined, privateIdentifierDiagnosticMessage); } function parseVariableDeclarationAllowExclamation() { return parseVariableDeclaration(/*allowExclamation*/ true); } function parseVariableDeclaration(allowExclamation) { var node = createNode(242 /* VariableDeclaration */); - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_are_not_allowed_in_variable_declarations); if (allowExclamation && node.name.kind === 75 /* Identifier */ && token() === 53 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) { node.exclamationToken = parseTokenNode(); @@ -24078,17 +24505,18 @@ var ts; } return finishNode(node); } - function parseNamespaceExport() { - var node = createNode(262 /* NamespaceExport */); + function parseNamespaceExport(pos) { + var node = createNode(262 /* NamespaceExport */, pos); node.name = parseIdentifier(); return finishNode(node); } function parseExportDeclaration(node) { node.kind = 260 /* ExportDeclaration */; node.isTypeOnly = parseOptional(145 /* TypeKeyword */); + var namespaceExportPos = scanner.getStartPos(); if (parseOptional(41 /* AsteriskToken */)) { if (parseOptional(123 /* AsKeyword */)) { - node.exportClause = parseNamespaceExport(); + node.exportClause = parseNamespaceExport(namespaceExportPos); } parseExpected(149 /* FromKeyword */); node.moduleSpecifier = parseModuleSpecifier(); @@ -24420,25 +24848,28 @@ var ts; case "author": tag = parseAuthorTag(start, tagName, margin); break; + case "implements": + tag = parseImplementsTag(start, tagName); + break; case "augments": case "extends": tag = parseAugmentsTag(start, tagName); break; case "class": case "constructor": - tag = parseSimpleTag(start, 309 /* JSDocClassTag */, tagName); + tag = parseSimpleTag(start, 310 /* JSDocClassTag */, tagName); break; case "public": - tag = parseSimpleTag(start, 310 /* JSDocPublicTag */, tagName); + tag = parseSimpleTag(start, 311 /* JSDocPublicTag */, tagName); break; case "private": - tag = parseSimpleTag(start, 311 /* JSDocPrivateTag */, tagName); + tag = parseSimpleTag(start, 312 /* JSDocPrivateTag */, tagName); break; case "protected": - tag = parseSimpleTag(start, 312 /* JSDocProtectedTag */, tagName); + tag = parseSimpleTag(start, 313 /* JSDocProtectedTag */, tagName); break; case "readonly": - tag = parseSimpleTag(start, 313 /* JSDocReadonlyTag */, tagName); + tag = parseSimpleTag(start, 314 /* JSDocReadonlyTag */, tagName); break; case "this": tag = parseThisTag(start, tagName); @@ -24490,10 +24921,12 @@ var ts; comments.push(text); indent += text.length; } - if (initialMargin) { + if (initialMargin !== undefined) { // jump straight to saving comments if there is some initial indentation - pushComment(initialMargin); - state = 2 /* SavingComments */; + if (initialMargin !== "") { + pushComment(initialMargin); + } + state = 1 /* SawAsterisk */; } var tok = token(); loop: while (true) { @@ -24621,7 +25054,7 @@ var ts; case 174 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: - return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object"; + return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; } } function parseParameterOrPropertyTag(start, tagName, target, indent) { @@ -24634,8 +25067,8 @@ var ts; typeExpression = tryParseTypeExpression(); } var result = target === 1 /* Property */ ? - createNode(322 /* JSDocPropertyTag */, start) : - createNode(316 /* JSDocParameterTag */, start); + createNode(323 /* JSDocPropertyTag */, start) : + createNode(317 /* JSDocParameterTag */, start); var comment = parseTagComments(indent + scanner.getStartPos() - start); var nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent); if (nestedTypeLiteral) { @@ -24658,7 +25091,7 @@ var ts; var start_3 = scanner.getStartPos(); var children = void 0; while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) { - if (child.kind === 316 /* JSDocParameterTag */ || child.kind === 322 /* JSDocPropertyTag */) { + if (child.kind === 317 /* JSDocParameterTag */ || child.kind === 323 /* JSDocPropertyTag */) { children = ts.append(children, child); } } @@ -24677,7 +25110,7 @@ var ts; if (ts.some(tags, ts.isJSDocReturnTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(317 /* JSDocReturnTag */, start); + var result = createNode(318 /* JSDocReturnTag */, start); result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); @@ -24686,13 +25119,13 @@ var ts; if (ts.some(tags, ts.isJSDocTypeTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(319 /* JSDocTypeTag */, start); + var result = createNode(320 /* JSDocTypeTag */, start); result.tagName = tagName; result.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); return finishNode(result); } function parseAuthorTag(start, tagName, indent) { - var result = createNode(308 /* JSDocAuthorTag */, start); + var result = createNode(309 /* JSDocAuthorTag */, start); result.tagName = tagName; var authorInfoWithEmail = tryParse(function () { return tryParseAuthorNameAndEmail(); }); if (!authorInfoWithEmail) { @@ -24745,6 +25178,12 @@ var ts; return comments.length === 0 ? undefined : comments.join(""); } } + function parseImplementsTag(start, tagName) { + var result = createNode(308 /* JSDocImplementsTag */, start); + result.tagName = tagName; + result.class = parseExpressionWithTypeArgumentsForAugments(); + return finishNode(result); + } function parseAugmentsTag(start, tagName) { var result = createNode(307 /* JSDocAugmentsTag */, start); result.tagName = tagName; @@ -24778,14 +25217,14 @@ var ts; return finishNode(tag); } function parseThisTag(start, tagName) { - var tag = createNode(318 /* JSDocThisTag */, start); + var tag = createNode(319 /* JSDocThisTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); return finishNode(tag); } function parseEnumTag(start, tagName) { - var tag = createNode(315 /* JSDocEnumTag */, start); + var tag = createNode(316 /* JSDocEnumTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); @@ -24794,7 +25233,7 @@ var ts; function parseTypedefTag(start, tagName, indent) { var typeExpression = tryParseTypeExpression(); skipWhitespaceOrAsterisk(); - var typedefTag = createNode(321 /* JSDocTypedefTag */, start); + var typedefTag = createNode(322 /* JSDocTypedefTag */, start); typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(); typedefTag.name = getJSDocTypeAliasName(typedefTag.fullName); @@ -24810,7 +25249,7 @@ var ts; if (!jsdocTypeLiteral) { jsdocTypeLiteral = createNode(304 /* JSDocTypeLiteral */, start); } - if (child.kind === 319 /* JSDocTypeTag */) { + if (child.kind === 320 /* JSDocTypeTag */) { if (childTypeTag) { break; } @@ -24856,7 +25295,7 @@ var ts; return typeNameOrNamespaceName; } function parseCallbackTag(start, tagName, indent) { - var callbackTag = createNode(314 /* JSDocCallbackTag */, start); + var callbackTag = createNode(315 /* JSDocCallbackTag */, start); callbackTag.tagName = tagName; callbackTag.fullName = parseJSDocTypeNameWithNamespace(); callbackTag.name = getJSDocTypeAliasName(callbackTag.fullName); @@ -24871,7 +25310,7 @@ var ts; var returnTag = tryParse(function () { if (parseOptionalJsdoc(59 /* AtToken */)) { var tag = parseTag(indent); - if (tag && tag.kind === 317 /* JSDocReturnTag */) { + if (tag && tag.kind === 318 /* JSDocReturnTag */) { return tag; } } @@ -24916,7 +25355,7 @@ var ts; case 59 /* AtToken */: if (canParseTag) { var child = tryParseChildTag(target, indent); - if (child && (child.kind === 316 /* JSDocParameterTag */ || child.kind === 322 /* JSDocPropertyTag */) && + if (child && (child.kind === 317 /* JSDocParameterTag */ || child.kind === 323 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; @@ -24983,10 +25422,10 @@ var ts; var typeParameter = createNode(155 /* TypeParameter */); typeParameter.name = parseJSDocIdentifierName(ts.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces); finishNode(typeParameter); - skipWhitespace(); + skipWhitespaceOrAsterisk(); typeParameters.push(typeParameter); } while (parseOptionalJsdoc(27 /* CommaToken */)); - var result = createNode(320 /* JSDocTemplateTag */, start); + var result = createNode(321 /* JSDocTemplateTag */, start); result.tagName = tagName; result.constraint = constraint; result.typeParameters = createNodeArray(typeParameters, typeParametersPos); @@ -26542,6 +26981,7 @@ var ts; { name: "noErrorTruncation", type: "boolean", + affectsSemanticDiagnostics: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Do_not_truncate_error_messages }, @@ -26671,6 +27111,7 @@ var ts; { name: "forceConsistentCasingInFileNames", type: "boolean", + affectsModuleResolution: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file }, @@ -26872,6 +27313,7 @@ var ts; createDiagnostics(diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnostics(diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption); } + /*@internal*/ function parseCommandLineWorker(diagnostics, commandLine, readFile) { var options = {}; var watchOptions; @@ -26948,50 +27390,78 @@ var ts; parseStrings(args); } } + ts.parseCommandLineWorker = parseCommandLineWorker; function parseOptionValue(args, i, diagnostics, opt, options, errors) { if (opt.isTSConfigOnly) { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name)); + var optValue = args[i]; + if (optValue === "null") { + options[opt.name] = undefined; + i++; + } + else if (opt.type === "boolean") { + if (optValue === "false") { + options[opt.name] = false; + i++; + } + else { + if (optValue === "true") + i++; + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, opt.name)); + } + } + else { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, opt.name)); + if (optValue && !ts.startsWith(optValue, "-")) + i++; + } } else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). if (!args[i] && opt.type !== "boolean") { errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name, getCompilerOptionValueTypeString(opt))); } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i]); - i++; - break; - case "boolean": - // boolean flag has optional value true, false, others - var optValue = args[i]; - options[opt.name] = optValue !== "false"; - // consume next argument as boolean flag value - if (optValue === "false" || optValue === "true") { + if (args[i] !== "null") { + switch (opt.type) { + case "number": + options[opt.name] = parseInt(args[i]); i++; - } - break; - case "string": - options[opt.name] = args[i] || ""; - i++; - break; - case "list": - var result = parseListTypeOption(opt, args[i], errors); - options[opt.name] = result || []; - if (result) { + break; + case "boolean": + // boolean flag has optional value true, false, others + var optValue = args[i]; + options[opt.name] = optValue !== "false"; + // consume next argument as boolean flag value + if (optValue === "false" || optValue === "true") { + i++; + } + break; + case "string": + options[opt.name] = args[i] || ""; i++; - } - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - options[opt.name] = parseCustomTypeOption(opt, args[i], errors); - i++; - break; + break; + case "list": + var result = parseListTypeOption(opt, args[i], errors); + options[opt.name] = result || []; + if (result) { + i++; + } + break; + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + options[opt.name] = parseCustomTypeOption(opt, args[i], errors); + i++; + break; + } + } + else { + options[opt.name] = undefined; + i++; } } return i; } - var compilerOptionsDidYouMeanDiagnostics = { + /*@internal*/ + ts.compilerOptionsDidYouMeanDiagnostics = { getOptionsNameMap: getOptionsNameMap, optionDeclarations: ts.optionDeclarations, unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, @@ -26999,7 +27469,7 @@ var ts; optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); + return parseCommandLineWorker(ts.compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; /** @internal */ @@ -27176,7 +27646,7 @@ var ts; name: "compilerOptions", type: "object", elementOptions: getCommandLineCompilerOptionsMap(), - extraKeyDiagnostics: compilerOptionsDidYouMeanDiagnostics, + extraKeyDiagnostics: ts.compilerOptionsDidYouMeanDiagnostics, }, { name: "watchOptions", @@ -27654,7 +28124,7 @@ var ts; } ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { - if (option) { + if (option && !isNullOrUndefined(value)) { if (option.type === "list") { var values = value; if (option.element.isFilePath && values.length) { @@ -28005,7 +28475,7 @@ var ts; } function getExtendedConfig(sourceFile, extendedConfigPath, host, basePath, resolutionStack, errors, extendedConfigCache) { var _a; - var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toLowerCase(extendedConfigPath); + var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toFileNameLowerCase(extendedConfigPath); var value; var extendedResult; var extendedConfig; @@ -28075,7 +28545,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, compilerOptionsDidYouMeanDiagnostics, errors); + convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, ts.compilerOptionsDidYouMeanDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -28262,7 +28732,7 @@ var ts; function getFileNamesFromConfigSpecs(spec, basePath, options, host, extraFileExtensions) { if (extraFileExtensions === void 0) { extraFileExtensions = []; } basePath = ts.normalizePath(basePath); - var keyMapper = host.useCaseSensitiveFileNames ? ts.identity : ts.toLowerCase; + var keyMapper = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); // Literal file names (provided via the "files" array in tsconfig.json) are stored in a // file map with a possibly case insensitive key. We use this map later when when including // wildcard paths. @@ -28421,7 +28891,7 @@ var ts; var match = wildcardDirectoryPattern.exec(spec); if (match) { return { - key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(), + key: useCaseSensitiveFileNames ? match[0] : ts.toFileNameLowerCase(match[0]), flags: watchRecursivePattern.test(spec) ? 1 /* Recursive */ : 0 /* None */ }; } @@ -30141,7 +30611,7 @@ var ts; } } function getDisplayName(node) { - return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.assertDefined(getDeclarationName(node))); + return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.checkDefined(getDeclarationName(node))); } /** * Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. @@ -30542,9 +31012,9 @@ var ts; case 196 /* CallExpression */: bindCallExpressionFlow(node); break; - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime @@ -30651,9 +31121,12 @@ var ts; function createLoopLabel() { return initFlowNode({ flags: 8 /* LoopLabel */, antecedents: undefined }); } + function createReduceLabel(target, antecedents, antecedent) { + return initFlowNode({ flags: 1024 /* ReduceLabel */, target: target, antecedents: antecedents, antecedent: antecedent }); + } function setFlowNodeReferenced(flow) { // On first reference we set the Referenced flag, thereafter we set the Shared flag - flow.flags |= flow.flags & 1024 /* Referenced */ ? 2048 /* Shared */ : 1024 /* Referenced */; + flow.flags |= flow.flags & 2048 /* Referenced */ ? 4096 /* Shared */ : 2048 /* Referenced */; } function addAntecedent(label, antecedent) { if (!(antecedent.flags & 1 /* Unreachable */) && !ts.contains(label.antecedents, antecedent)) { @@ -30884,35 +31357,36 @@ var ts; } } function bindTryStatement(node) { - var preFinallyLabel = createBranchLabel(); // We conservatively assume that *any* code in the try block can cause an exception, but we only need // to track code that causes mutations (because only mutations widen the possible control flow type of - // a variable). The currentExceptionTarget is the target label for control flows that result from - // exceptions. We add all mutation flow nodes as antecedents of this label such that we can analyze them - // as possible antecedents of the start of catch or finally blocks. Furthermore, we add the current - // control flow to represent exceptions that occur before any mutations. + // a variable). The exceptionLabel is the target label for control flows that result from exceptions. + // We add all mutation flow nodes as antecedents of this label such that we can analyze them as possible + // antecedents of the start of catch or finally blocks. Furthermore, we add the current control flow to + // represent exceptions that occur before any mutations. var saveReturnTarget = currentReturnTarget; var saveExceptionTarget = currentExceptionTarget; - currentReturnTarget = createBranchLabel(); - currentExceptionTarget = node.catchClause ? createBranchLabel() : currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + var normalExitLabel = createBranchLabel(); + var returnLabel = createBranchLabel(); + var exceptionLabel = createBranchLabel(); + if (node.finallyBlock) { + currentReturnTarget = returnLabel; + } + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.tryBlock); - addAntecedent(preFinallyLabel, currentFlow); - var flowAfterTry = currentFlow; - var flowAfterCatch = unreachableFlow; + addAntecedent(normalExitLabel, currentFlow); if (node.catchClause) { // Start of catch clause is the target of exceptions from try block. - currentFlow = finishFlowLabel(currentExceptionTarget); + currentFlow = finishFlowLabel(exceptionLabel); // The currentExceptionTarget now represents control flows from exceptions in the catch clause. // Effectively, in a try-catch-finally, if an exception occurs in the try block, the catch block // acts like a second try block. - currentExceptionTarget = currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + exceptionLabel = createBranchLabel(); + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.catchClause); - addAntecedent(preFinallyLabel, currentFlow); - flowAfterCatch = currentFlow; + addAntecedent(normalExitLabel, currentFlow); } - var exceptionTarget = finishFlowLabel(currentExceptionTarget); currentReturnTarget = saveReturnTarget; currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { @@ -30925,35 +31399,33 @@ var ts; // When analyzing a control flow graph that starts inside a finally block we want to consider all // five possibilities above. However, when analyzing a control flow graph that starts outside (past) // the finally block, we only want to consider the first two (if we're past a finally block then it - // must have completed normally). To make this possible, we inject two extra nodes into the control - // flow graph: An after-finally with an antecedent of the control flow at the end of the finally - // block, and a pre-finally with an antecedent that represents all exceptional control flows. The - // 'lock' property of the pre-finally references the after-finally, and the after-finally has a - // boolean 'locked' property that we set to true when analyzing a control flow that contained the - // the after-finally node. When the lock associated with a pre-finally is locked, the antecedent of - // the pre-finally (i.e. the exceptional control flows) are skipped. - var preFinallyFlow = initFlowNode({ flags: 4096 /* PreFinally */, antecedent: exceptionTarget, lock: {} }); - addAntecedent(preFinallyLabel, preFinallyFlow); - currentFlow = finishFlowLabel(preFinallyLabel); + // must have completed normally). Likewise, when analyzing a control flow graph from return statements + // in try or catch blocks in an IIFE, we only want to consider the third. To make this possible, we + // inject a ReduceLabel node into the control flow graph. This node contains an alternate reduced + // set of antecedents for the pre-finally label. As control flow analysis passes by a ReduceLabel + // node, the pre-finally label is temporarily switched to the reduced antecedent set. + var finallyLabel = createBranchLabel(); + finallyLabel.antecedents = ts.concatenate(ts.concatenate(normalExitLabel.antecedents, exceptionLabel.antecedents), returnLabel.antecedents); + currentFlow = finallyLabel; bind(node.finallyBlock); - // If the end of the finally block is reachable, but the end of the try and catch blocks are not, - // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should - // result in an unreachable current control flow. - if (!(currentFlow.flags & 1 /* Unreachable */)) { - if ((flowAfterTry.flags & 1 /* Unreachable */) && (flowAfterCatch.flags & 1 /* Unreachable */)) { - currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow - ? reportedUnreachableFlow - : unreachableFlow; - } + if (currentFlow.flags & 1 /* Unreachable */) { + // If the end of the finally block is unreachable, the end of the entire try statement is unreachable. + currentFlow = unreachableFlow; } - if (!(currentFlow.flags & 1 /* Unreachable */)) { - var afterFinallyFlow = initFlowNode({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); - preFinallyFlow.lock = afterFinallyFlow; - currentFlow = afterFinallyFlow; + else { + // If we have an IIFE return target and return statements in the try or catch blocks, add a control + // flow that goes back through the finally block and back through only the return statements. + if (currentReturnTarget && returnLabel.antecedents) { + addAntecedent(currentReturnTarget, createReduceLabel(finallyLabel, returnLabel.antecedents, currentFlow)); + } + // If the end of the finally block is reachable, but the end of the try and catch blocks are not, + // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should + // result in an unreachable current control flow. + currentFlow = normalExitLabel.antecedents ? createReduceLabel(finallyLabel, normalExitLabel.antecedents, currentFlow) : unreachableFlow; } } else { - currentFlow = finishFlowLabel(preFinallyLabel); + currentFlow = finishFlowLabel(normalExitLabel); } } function bindSwitchStatement(node) { @@ -31111,28 +31583,145 @@ var ts; bindAssignmentTargetFlow(node.operand); } } + var BindBinaryExpressionFlowState; + (function (BindBinaryExpressionFlowState) { + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindThenBindChildren"] = 0] = "BindThenBindChildren"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["MaybeBindLeft"] = 1] = "MaybeBindLeft"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindToken"] = 2] = "BindToken"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindRight"] = 3] = "BindRight"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["FinishBind"] = 4] = "FinishBind"; + })(BindBinaryExpressionFlowState || (BindBinaryExpressionFlowState = {})); function bindBinaryExpressionFlow(node) { - var operator = node.operatorToken.kind; - if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { - if (isTopLevelLogicalExpression(node)) { - var postExpressionLabel = createBranchLabel(); - bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); - currentFlow = finishFlowLabel(postExpressionLabel); + var workStacks = { + expr: [node], + state: [1 /* MaybeBindLeft */], + inStrictMode: [undefined], + parent: [undefined], + subtreeFlags: [undefined] + }; + var stackIndex = 0; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0 /* BindThenBindChildren */: { + // This state is used only when recuring, to emulate the work that `bind` does before + // reaching `bindChildren`. A normal call to `bindBinaryExpressionFlow` will already have done this work. + node.parent = parent; + var saveInStrictMode = inStrictMode; + bindWorker(node); + var saveParent = parent; + parent = node; + var subtreeFlagsState = void 0; + // While this next part does the work of `bindChildren` before it descends into `bindChildrenWorker` + // and uses `subtreeFlagsState` to queue up the work that needs to be done once the node is bound. + if (skipTransformFlagAggregation) { + // do nothing extra + } + else if (node.transformFlags & 536870912 /* HasComputedFlags */) { + skipTransformFlagAggregation = true; + subtreeFlagsState = -1; + } + else { + var savedSubtreeTransformFlags = subtreeTransformFlags; + subtreeTransformFlags = 0; + subtreeFlagsState = savedSubtreeTransformFlags; + } + advanceState(1 /* MaybeBindLeft */, saveInStrictMode, saveParent, subtreeFlagsState); + break; + } + case 1 /* MaybeBindLeft */: { + var operator = node.operatorToken.kind; + // TODO: bindLogicalExpression is recursive - if we want to handle deeply nested `&&` expressions + // we'll need to handle the `bindLogicalExpression` scenarios in this state machine, too + // For now, though, since the common cases are chained `+`, leaving it recursive is fine + if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { + if (isTopLevelLogicalExpression(node)) { + var postExpressionLabel = createBranchLabel(); + bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); + currentFlow = finishFlowLabel(postExpressionLabel); + } + else { + bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + completeNode(); + } + else { + advanceState(2 /* BindToken */); + maybeBind(node.left); + } + break; + } + case 2 /* BindToken */: { + advanceState(3 /* BindRight */); + maybeBind(node.operatorToken); + break; + } + case 3 /* BindRight */: { + advanceState(4 /* FinishBind */); + maybeBind(node.right); + break; + } + case 4 /* FinishBind */: { + var operator = node.operatorToken.kind; + if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { + bindAssignmentTargetFlow(node.left); + if (operator === 62 /* EqualsToken */ && node.left.kind === 195 /* ElementAccessExpression */) { + var elementAccess = node.left; + if (isNarrowableOperand(elementAccess.expression)) { + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); + } + } + } + completeNode(); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for bindBinaryExpressionFlow"); } - else { - bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + /** + * Note that `advanceState` sets the _current_ head state, and that `maybeBind` potentially pushes on a new + * head state; so `advanceState` must be called before any `maybeBind` during a state's execution. + */ + function advanceState(state, isInStrictMode, parent, subtreeFlags) { + workStacks.state[stackIndex] = state; + if (isInStrictMode !== undefined) { + workStacks.inStrictMode[stackIndex] = isInStrictMode; + } + if (parent !== undefined) { + workStacks.parent[stackIndex] = parent; + } + if (subtreeFlags !== undefined) { + workStacks.subtreeFlags[stackIndex] = subtreeFlags; } } - else { - bindEachChild(node); - if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { - bindAssignmentTargetFlow(node.left); - if (operator === 62 /* EqualsToken */ && node.left.kind === 195 /* ElementAccessExpression */) { - var elementAccess = node.left; - if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); - } + function completeNode() { + if (workStacks.inStrictMode[stackIndex] !== undefined) { + if (workStacks.subtreeFlags[stackIndex] === -1) { + skipTransformFlagAggregation = false; + subtreeTransformFlags |= node.transformFlags & ~getTransformFlagsSubtreeExclusions(node.kind); } + else if (workStacks.subtreeFlags[stackIndex] !== undefined) { + subtreeTransformFlags = workStacks.subtreeFlags[stackIndex] | computeTransformFlagsForNode(node, subtreeTransformFlags); + } + inStrictMode = workStacks.inStrictMode[stackIndex]; + parent = workStacks.parent[stackIndex]; + } + stackIndex--; + } + /** + * If `node` is a BinaryExpression, adds it to the local work stack, otherwise recursively binds it + */ + function maybeBind(node) { + if (node && ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0 /* BindThenBindChildren */; + workStacks.inStrictMode[stackIndex] = undefined; + workStacks.parent[stackIndex] = undefined; + workStacks.subtreeFlags[stackIndex] = undefined; + } + else { + bind(node); } } } @@ -31177,7 +31766,7 @@ var ts; } function bindJSDocTypeAlias(node) { node.tagName.parent = node; - if (node.kind !== 315 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 316 /* JSDocEnumTag */ && node.fullName) { setParentPointers(node, node.fullName); } } @@ -31393,8 +31982,8 @@ var ts; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 300 /* JSDocFunctionType */: - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: case 247 /* TypeAliasDeclaration */: case 186 /* MappedType */: // All the children of these container types are never visible through another @@ -31599,7 +32188,9 @@ var ts; container = declName.parent.expression.name; break; case 5 /* Property */: - container = ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression; + container = isExportsOrModuleExportsOrAlias(file, declName.parent.expression) ? file + : ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name + : declName.parent.expression; break; case 0 /* None */: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); @@ -32014,7 +32605,7 @@ var ts; case 304 /* JSDocTypeLiteral */: case 186 /* MappedType */: return bindAnonymousTypeWorker(node); - case 309 /* JSDocClassTag */: + case 310 /* JSDocClassTag */: return bindJSDocClassTag(node); case 193 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); @@ -32082,7 +32673,7 @@ var ts; // falls through case 250 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: if (node.parent.kind === 305 /* JSDocSignature */) { return bindParameter(node); } @@ -32090,15 +32681,15 @@ var ts; break; } // falls through - case 322 /* JSDocPropertyTag */: + case 323 /* JSDocPropertyTag */: var propTag = node; var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 299 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -32170,6 +32761,9 @@ var ts; declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* ExportStar */, 0 /* None */); } else if (ts.isNamespaceExport(node.exportClause)) { + // declareSymbol walks up parents to find name text, parent _must_ be set + // but won't be set by the normal binder walk until `bindChildren` later on. + node.exportClause.parent = node; declareSymbol(container.symbol.exports, container.symbol, node.exportClause, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } } @@ -32605,7 +33199,7 @@ var ts; } } function bindParameter(node) { - if (node.kind === 316 /* JSDocParameterTag */ && container.kind !== 305 /* JSDocSignature */) { + if (node.kind === 317 /* JSDocParameterTag */ && container.kind !== 305 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 8388608 /* Ambient */)) { @@ -33322,7 +33916,7 @@ var ts; break; case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: // These nodes are TypeScript syntax. transformFlags |= 1 /* AssertTypeScript */; excludeFlags = 536870912 /* OuterExpressionExcludes */; @@ -33359,8 +33953,18 @@ var ts; case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: case 17 /* TemplateTail */: - case 211 /* TemplateExpression */: + if (node.templateFlags) { + transformFlags |= 32 /* AssertES2018 */; + break; + } + // falls through case 198 /* TaggedTemplateExpression */: + if (ts.hasInvalidEscape(node.template)) { + transformFlags |= 32 /* AssertES2018 */; + break; + } + // falls through + case 211 /* TemplateExpression */: case 282 /* ShorthandPropertyAssignment */: case 120 /* StaticKeyword */: case 219 /* MetaProperty */: @@ -33587,7 +34191,7 @@ var ts; return 536879104 /* BindingPatternExcludes */; case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: case 200 /* ParenthesizedExpression */: case 102 /* SuperKeyword */: return 536870912 /* OuterExpressionExcludes */; @@ -33921,8 +34525,7 @@ var ts; TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType"; TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; - TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; - TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 7] = "ResolvedTypeArguments"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 6] = "ResolvedTypeArguments"; })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); var CheckMode; (function (CheckMode) { @@ -34049,6 +34652,7 @@ var ts; var typeCount = 0; var symbolCount = 0; var enumCount = 0; + var totalInstantiationCount = 0; var instantiationCount = 0; var instantiationDepth = 0; var constraintDepth = 0; @@ -34091,6 +34695,7 @@ var ts; getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount") + symbolCount; }, getTypeCount: function () { return typeCount; }, + getInstantiationCount: function () { return totalInstantiationCount; }, getRelationCacheSizes: function () { return ({ assignable: assignableRelation.size, identity: identityRelation.size, @@ -34158,7 +34763,8 @@ var ts; }, getSymbolAtLocation: function (node) { node = ts.getParseTreeNode(node); - return node ? getSymbolAtLocation(node) : undefined; + // set ignoreErrors: true because any lookups invoked by the API shouldn't cause any new errors + return node ? getSymbolAtLocation(node, /*ignoreErrors*/ true) : undefined; }, getShorthandAssignmentValueSymbol: function (node) { node = ts.getParseTreeNode(node); @@ -34211,7 +34817,29 @@ var ts; getRootSymbols: getRootSymbols, getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node, contextFlags) : undefined; + if (!node) { + return undefined; + } + var containingCall = ts.findAncestor(node, ts.isCallLikeExpression); + var containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; + if (contextFlags & 4 /* Completions */ && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = true; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = undefined; + } + var result = getContextualType(node, contextFlags); + if (contextFlags & 4 /* Completions */ && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = undefined; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + } + return result; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -34451,9 +35079,9 @@ var ts; var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); var iterationTypesCache = ts.createMap(); // cache for common IterationTypes instances var noIterationTypes = { - get yieldType() { throw new Error("Not supported"); }, - get returnType() { throw new Error("Not supported"); }, - get nextType() { throw new Error("Not supported"); }, + get yieldType() { return ts.Debug.fail("Not supported"); }, + get returnType() { return ts.Debug.fail("Not supported"); }, + get nextType() { return ts.Debug.fail("Not supported"); }, }; var anyIterationTypes = createIterationTypes(anyType, anyType, anyType); var anyIterationTypesExceptNext = createIterationTypes(anyType, anyType, unknownType); @@ -34601,6 +35229,7 @@ var ts; if (jsxPragma) { var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); + ts.visitNode(file.localJsxFactory, markAsSynthetic); if (file.localJsxFactory) { return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } @@ -34611,6 +35240,7 @@ var ts; _jsxNamespace = "React"; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); + ts.visitNode(_jsxFactoryEntity, markAsSynthetic); if (_jsxFactoryEntity) { _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } @@ -34619,7 +35249,15 @@ var ts; _jsxNamespace = ts.escapeLeadingUnderscores(compilerOptions.reactNamespace); } } + if (!_jsxFactoryEntity) { + _jsxFactoryEntity = ts.createQualifiedName(ts.createIdentifier(ts.unescapeLeadingUnderscores(_jsxNamespace)), "createElement"); + } return _jsxNamespace; + function markAsSynthetic(node) { + node.pos = -1; + node.end = -1; + return ts.visitEachChild(node, markAsSynthetic, ts.nullTransformationContext); + } } function getEmitResolver(sourceFile, cancellationToken) { // Ensure we have all the type information in place for this file so that all the @@ -35008,7 +35646,14 @@ var ts; } else if (ts.isPropertyDeclaration(declaration)) { // still might be illegal if a self-referencing property initializer (eg private x = this.x) - return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage); + return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, /*stopAtAnyPropertyDeclaration*/ false); + } + else if (ts.isParameterPropertyDeclaration(declaration, declaration.parent)) { + var container_3 = ts.getEnclosingBlockScopeContainer(declaration.parent); + // foo = this.bar is illegal in esnext+useDefineForClassFields when bar is a parameter property + return !(compilerOptions.target === 99 /* ESNext */ && !!compilerOptions.useDefineForClassFields + && ts.getContainingClass(declaration) === ts.getContainingClass(usage) + && isUsedInFunctionOrInstanceProperty(usage, declaration, container_3)); } return true; } @@ -35016,6 +35661,7 @@ var ts; // 1. inside an export specifier // 2. inside a function // 3. inside an instance property initializer, a reference to a non-instance property + // (except when target: "esnext" and useDefineForClassFields: true and the reference is to a parameter property) // 4. inside a static property initializer, a reference to a static method in the same class // 5. inside a TS export= declaration (since we will move the export statement during emit to avoid TDZ) // or if usage is in a type context: @@ -35030,7 +35676,19 @@ var ts; return true; } var container = ts.getEnclosingBlockScopeContainer(declaration); - return !!(usage.flags & 4194304 /* JSDoc */) || isInTypeQuery(usage) || isUsedInFunctionOrInstanceProperty(usage, declaration, container); + if (!!(usage.flags & 4194304 /* JSDoc */) || isInTypeQuery(usage)) { + return true; + } + if (isUsedInFunctionOrInstanceProperty(usage, declaration, container)) { + if (compilerOptions.target === 99 /* ESNext */ && !!compilerOptions.useDefineForClassFields) { + return (ts.isPropertyDeclaration(declaration) || ts.isParameterPropertyDeclaration(declaration, declaration.parent)) && + !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, /*stopAtAnyPropertyDeclaration*/ true); + } + else { + return true; + } + } + return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); switch (declaration.parent.parent.kind) { @@ -35075,7 +35733,8 @@ var ts; return false; }); } - function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage) { + /** stopAtAnyPropertyDeclaration is used for detecting ES-standard class field use-before-def errors */ + function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, stopAtAnyPropertyDeclaration) { // always legal if usage is after declaration if (usage.end > declaration.end) { return false; @@ -35088,8 +35747,13 @@ var ts; } switch (node.kind) { case 202 /* ArrowFunction */: - case 159 /* PropertyDeclaration */: return true; + case 159 /* PropertyDeclaration */: + // even when stopping at any property declaration, they need to come from the same class + return stopAtAnyPropertyDeclaration && + (ts.isPropertyDeclaration(declaration) && node.parent === declaration.parent + || ts.isParameterPropertyDeclaration(declaration, declaration.parent) && node.parent === declaration.parent.parent) + ? "quit" : true; case 223 /* Block */: switch (node.parent.kind) { case 163 /* GetAccessor */: @@ -35367,9 +36031,9 @@ var ts; location = location.parent; } break; - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: // js type aliases do not resolve names from their host, so skip past it location = ts.getJSDocHost(location); break; @@ -35423,6 +36087,7 @@ var ts; !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && + !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { @@ -35447,9 +36112,10 @@ var ts; } // Perform extra checks only if error reporting was requested if (nameNotFoundMessage) { - if (propertyWithInvalidInitializer) { + if (propertyWithInvalidInitializer && !(compilerOptions.target === 99 /* ESNext */ && compilerOptions.useDefineForClassFields)) { // We have a match, but the reference occurred within a property initializer and the identifier also binds - // to a local variable in the constructor where the code will be emitted. + // to a local variable in the constructor where the code will be emitted. Note that this is actually allowed + // with ESNext+useDefineForClassFields because the scope semantics are different. var propertyName = propertyWithInvalidInitializer.name; error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), diagnosticName(nameArg)); return undefined; @@ -35493,9 +36159,27 @@ var ts; error(errorLocation, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(associatedDeclarationForContainingInitializer.name), ts.declarationNameToString(errorLocation)); } } + if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */) { + checkSymbolUsageInExpressionContext(result, name, errorLocation); + } } return result; } + function checkSymbolUsageInExpressionContext(symbol, name, useSite) { + if (!ts.isValidTypeOnlyAliasUseSite(useSite)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol); + if (typeOnlyDeclaration) { + var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type + : ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + var unescapedName = ts.unescapeLeadingUnderscores(name); + ts.addRelatedInfo(error(useSite, message, unescapedName), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, unescapedName)); + } + } + } function getIsDeferredContext(location, lastLocation) { if (location.kind !== 202 /* ArrowFunction */ && location.kind !== 201 /* FunctionExpression */) { // initializers in instance property declaration of class like entities are executed in constructor and thus deferred @@ -35628,9 +36312,19 @@ var ts; } return false; } + function isPrimitiveTypeName(name) { + return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; + } + function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 263 /* ExportSpecifier */) { + error(errorLocation, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); + return true; + } + return false; + } function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) { if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */)) { - if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") { + if (isPrimitiveTypeName(name)) { error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name)); return true; } @@ -35661,9 +36355,7 @@ var ts; if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */ & ~788968 /* Type */)) { var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 /* NamespaceModule */ & ~111551 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); if (symbol) { - error(errorLocation, ts.isTypeOnlyEnumAlias(symbol) - ? ts.Diagnostics.Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported - : ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); + error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); return true; } } @@ -35731,19 +36423,78 @@ var ts; } } function getDeclarationOfAliasSymbol(symbol) { - return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration); + return ts.find(symbol.declarations, isAliasSymbolDeclaration); + } + /** + * An alias symbol is created by one of the following declarations: + * import = ... + * import from ... + * import * as from ... + * import { x as } from ... + * export { x as } from ... + * export * as ns from ... + * export = + * export default + * module.exports = + * {} + * {name: } + */ + function isAliasSymbolDeclaration(node) { + return node.kind === 253 /* ImportEqualsDeclaration */ || + node.kind === 252 /* NamespaceExportDeclaration */ || + node.kind === 255 /* ImportClause */ && !!node.name || + node.kind === 256 /* NamespaceImport */ || + node.kind === 262 /* NamespaceExport */ || + node.kind === 258 /* ImportSpecifier */ || + node.kind === 263 /* ExportSpecifier */ || + node.kind === 259 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node) || + ts.isBinaryExpression(node) && ts.getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && ts.exportAssignmentIsAlias(node) || + ts.isPropertyAccessExpression(node) + && ts.isBinaryExpression(node.parent) + && node.parent.left === node + && node.parent.operatorToken.kind === 62 /* EqualsToken */ + && isAliasableOrJsExpression(node.parent.right) || + node.kind === 282 /* ShorthandPropertyAssignment */ || + node.kind === 281 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer); + } + function isAliasableOrJsExpression(e) { + return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { if (node.moduleReference.kind === 265 /* ExternalModuleReference */) { - return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); + var immediate = resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)); + var resolved_4 = resolveExternalModuleSymbol(immediate); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved_4, /*overwriteEmpty*/ false); + return resolved_4; } - return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); + var resolved = getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); + checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved); + return resolved; } - function resolveExportByName(moduleSymbol, name, dontResolveAlias) { + function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) { + if (markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node)); + var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type + : ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + // Non-null assertion is safe because the optionality comes from ImportClause, + // but if an ImportClause was the typeOnlyDeclaration, it had to have a `name`. + var name = ts.unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + ts.addRelatedInfo(error(node.moduleReference, message), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); + } + } + function resolveExportByName(moduleSymbol, name, sourceNode, dontResolveAlias) { var exportValue = moduleSymbol.exports.get("export=" /* ExportEquals */); - return exportValue - ? getPropertyOfType(getTypeOfSymbol(exportValue), name) - : resolveSymbol(moduleSymbol.exports.get(name), dontResolveAlias); + if (exportValue) { + return getPropertyOfType(getTypeOfSymbol(exportValue), name); + } + var exportSymbol = moduleSymbol.exports.get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(sourceNode, exportSymbol, resolved, /*overwriteEmpty*/ false); + return resolved; } function isSyntacticDefault(node) { return ((ts.isExportAssignment(node) && !node.isExportEquals) || ts.hasModifier(node, 512 /* Default */) || ts.isExportSpecifier(node)); @@ -35755,13 +36506,13 @@ var ts; // Declaration files (and ambient modules) if (!file || file.isDeclarationFile) { // Definitely cannot have a synthetic default if they have a syntactic default member specified - var defaultExportSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, /*dontResolveAlias*/ true); // Dont resolve alias because we want the immediately exported symbol's declaration + var defaultExportSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, /*sourceNode*/ undefined, /*dontResolveAlias*/ true); // Dont resolve alias because we want the immediately exported symbol's declaration if (defaultExportSymbol && ts.some(defaultExportSymbol.declarations, isSyntacticDefault)) { return false; } // It _might_ still be incorrect to assume there is no __esModule marker on the import at runtime, even if there is no `default` member // So we check a bit more, - if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias)) { + if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), /*sourceNode*/ undefined, dontResolveAlias)) { // If there is an `__esModule` specified in the declaration (meaning someone explicitly added it or wrote it in their code), // it definitely is a module and does not have a synthetic default return false; @@ -35776,7 +36527,7 @@ var ts; return hasExportAssignmentSymbol(moduleSymbol); } // JS files have a synthetic default if they do not contain ES2015+ module syntax (export = is not valid in js) _and_ do not have an __esModule marker - return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias); + return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), /*sourceNode*/ undefined, dontResolveAlias); } function getTargetOfImportClause(node, dontResolveAlias) { var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier); @@ -35786,7 +36537,7 @@ var ts; exportDefaultSymbol = moduleSymbol; } else { - exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, dontResolveAlias); + exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, node, dontResolveAlias); } var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); var hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias); @@ -35809,26 +36560,27 @@ var ts; } else if (hasSyntheticDefault) { // per emit behavior, a synthetic default overrides a "real" .default member if `__esModule` is not present - return maybeTypeOnly(resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || - resolveSymbol(moduleSymbol, dontResolveAlias)); - } - return maybeTypeOnly(exportDefaultSymbol); - } - function maybeTypeOnly(symbol) { - if (symbol && node.isTypeOnly && node.name) { - return createTypeOnlyImportOrExport(node.name, symbol); + var resolved = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, moduleSymbol, resolved, /*overwriteTypeOnly*/ false); + return resolved; } - return symbol; + markSymbolOfAliasDeclarationIfTypeOnly(node, exportDefaultSymbol, /*finalTarget*/ undefined, /*overwriteTypeOnly*/ false); + return exportDefaultSymbol; } } function getTargetOfNamespaceImport(node, dontResolveAlias) { var moduleSpecifier = node.parent.parent.moduleSpecifier; - var moduleSymbol = resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); - return moduleSymbol && node.parent.isTypeOnly ? createTypeOnlySymbol(moduleSymbol) : moduleSymbol; + var immediate = resolveExternalModuleName(node, moduleSpecifier); + var resolved = resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfNamespaceExport(node, dontResolveAlias) { var moduleSpecifier = node.parent.moduleSpecifier; - return moduleSpecifier && resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + var immediate = moduleSpecifier && resolveExternalModuleName(node, moduleSpecifier); + var resolved = moduleSpecifier && resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); + return resolved; } // This function creates a synthetic symbol that combines the value side of one symbol with the // type/namespace side of another symbol. Consider this example: @@ -35861,14 +36613,19 @@ var ts; if (valueSymbol.valueDeclaration) result.valueDeclaration = valueSymbol.valueDeclaration; if (typeSymbol.members) - result.members = typeSymbol.members; + result.members = ts.cloneMap(typeSymbol.members); if (valueSymbol.exports) - result.exports = valueSymbol.exports; + result.exports = ts.cloneMap(valueSymbol.exports); return result; } - function getExportOfModule(symbol, name, dontResolveAlias) { + function getExportOfModule(symbol, specifier, dontResolveAlias) { + var _a; if (symbol.flags & 1536 /* Module */) { - return resolveSymbol(getExportsOfSymbol(symbol).get(name), dontResolveAlias); + var name = ((_a = specifier.propertyName) !== null && _a !== void 0 ? _a : specifier.name).escapedText; + var exportSymbol = getExportsOfSymbol(symbol).get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(specifier, exportSymbol, resolved, /*overwriteEmpty*/ false); + return resolved; } } function getPropertyOfVariable(symbol, name) { @@ -35881,6 +36638,7 @@ var ts; } function getExternalModuleMember(node, specifier, dontResolveAlias) { if (dontResolveAlias === void 0) { dontResolveAlias = false; } + var _a; var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); // TODO: GH#18217 var name = specifier.propertyName || specifier.name; var suppressInteropError = name.escapedText === "default" /* Default */ && !!(compilerOptions.allowSyntheticDefaultImports || compilerOptions.esModuleInterop); @@ -35900,7 +36658,7 @@ var ts; } // if symbolFromVariable is export - get its final target symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias); - var symbolFromModule = getExportOfModule(targetSymbol, name.escapedText, dontResolveAlias); + var symbolFromModule = getExportOfModule(targetSymbol, specifier, dontResolveAlias); if (symbolFromModule === undefined && name.escapedText === "default" /* Default */) { var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); if (canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias)) { @@ -35922,11 +36680,11 @@ var ts; } } else { - if (moduleSymbol.exports && moduleSymbol.exports.has("default" /* Default */)) { + if ((_a = moduleSymbol.exports) === null || _a === void 0 ? void 0 : _a.has("default" /* Default */)) { error(name, ts.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, declarationName); } else { - error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + reportNonExportedMember(name, declarationName, moduleSymbol, moduleName); } } } @@ -35934,90 +36692,47 @@ var ts; } } } + function reportNonExportedMember(name, declarationName, moduleSymbol, moduleName) { + var _a; + var localSymbol = (_a = moduleSymbol.valueDeclaration.locals) === null || _a === void 0 ? void 0 : _a.get(name.escapedText); + var exports = moduleSymbol.exports; + if (localSymbol) { + var exportedSymbol = exports && !exports.has("export=" /* ExportEquals */) + ? ts.find(symbolsToArray(exports), function (symbol) { return !!getSymbolIfSameReference(symbol, localSymbol); }) + : undefined; + var diagnostic = exportedSymbol + ? error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) + : error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); + ts.addRelatedInfo.apply(void 0, __spreadArrays([diagnostic], ts.map(localSymbol.declarations, function (decl, index) { + return ts.createDiagnosticForNode(decl, index === 0 ? ts.Diagnostics._0_is_declared_here : ts.Diagnostics.and_here, declarationName); + }))); + } + else { + error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + } + } function getTargetOfImportSpecifier(node, dontResolveAlias) { var resolved = getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias); - if (resolved && node.parent.parent.isTypeOnly) { - return createTypeOnlyImportOrExport(node.name, resolved); - } + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); return resolved; } function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) { - return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); - } - /** - * Creates a type alias symbol with a target symbol for type-only imports and exports. - * The symbol for `A` in `export type { A }` or `export type { A } from "./mod"` has - * `TypeFlags.Alias` so that alias resolution works as usual, but once the target `A` - * has been resolved, we essentially want to pretend we have a type alias to that target. - */ - function createTypeOnlyImportOrExport(sourceNode, target) { - var _a, _b; - var symbol = createTypeOnlySymbol(target); - if (!symbol && target !== unknownSymbol) { - var identifier = ts.isExportSpecifier(sourceNode) ? sourceNode.name : sourceNode; - var nameText = ts.idText(identifier); - var diagnostic = error(identifier, ts.Diagnostics.Type_only_0_must_reference_a_type_but_1_is_a_value, ts.isExportSpecifier(sourceNode) ? "export" : "import", nameText); - var targetDeclaration = (_a = target.valueDeclaration) !== null && _a !== void 0 ? _a : (_b = target.declarations) === null || _b === void 0 ? void 0 : _b[0]; - if (targetDeclaration) { - ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(targetDeclaration, ts.Diagnostics._0_is_declared_here, nameText)); - } - } - return symbol; - } - function createTypeOnlySymbol(target) { - if (target.flags & 512 /* ValueModule */) { - return createNamespaceModuleForModule(target); - } - if (target.flags & 384 /* Enum */) { - return createNamespaceModuleForEnum(target); - } - if (!(target.flags & 111551 /* Value */)) { - return target; - } - if (target.flags & 788968 /* Type */) { - var alias = createSymbol(524288 /* TypeAlias */, target.escapedName); - alias.declarations = ts.emptyArray; - alias.immediateTarget = target; - return alias; - } - } - function createNamespaceModuleForEnum(enumSymbol) { - ts.Debug.assert(!!(enumSymbol.flags & 384 /* Enum */)); - var symbol = createSymbol(1024 /* NamespaceModule */ | 524288 /* TypeAlias */, enumSymbol.escapedName); - symbol.immediateTarget = enumSymbol; - symbol.declarations = enumSymbol.declarations; - if (enumSymbol.exports) { - symbol.exports = ts.createSymbolTable(); - enumSymbol.exports.forEach(function (exportSymbol, key) { - symbol.exports.set(key, ts.Debug.assertDefined(createTypeOnlySymbol(exportSymbol))); - }); - } - return symbol; - } - function createNamespaceModuleForModule(moduleSymbol) { - ts.Debug.assert(!!(moduleSymbol.flags & 512 /* ValueModule */)); - var filtered = createSymbol(1024 /* NamespaceModule */, moduleSymbol.escapedName); - filtered.declarations = moduleSymbol.declarations; - if (moduleSymbol.exports) { - filtered.exports = ts.createSymbolTable(); - moduleSymbol.exports.forEach(function (exportSymbol, key) { - var typeOnlyExport = createTypeOnlySymbol(exportSymbol); - if (typeOnlyExport) { - filtered.exports.set(key, typeOnlyExport); - } - }); - } - return filtered; + var resolved = resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) { - var target = node.parent.parent.moduleSpecifier ? + var resolved = node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node, dontResolveAlias) : resolveEntityName(node.propertyName || node.name, meaning, /*ignoreErrors*/ false, dontResolveAlias); - return target && node.parent.parent.isTypeOnly ? createTypeOnlyImportOrExport(node, target) : target; + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfExportAssignment(node, dontResolveAlias) { var expression = (ts.isExportAssignment(node) ? node.expression : node.right); - return getTargetOfAliasLikeExpression(expression, dontResolveAlias); + var resolved = getTargetOfAliasLikeExpression(expression, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfAliasLikeExpression(expression, dontResolveAlias) { if (ts.isClassExpression(expression)) { @@ -36107,12 +36822,64 @@ var ts; } return links.target; } + /** + * Marks a symbol as type-only if its declaration is syntactically type-only. + * If it is not itself marked type-only, but resolves to a type-only alias + * somewhere in its resolution chain, save a reference to the type-only alias declaration + * so the alias _not_ marked type-only can be identified as _transitively_ type-only. + * + * This function is called on each alias declaration that could be type-only or resolve to + * another type-only alias during `resolveAlias`, so that later, when an alias is used in a + * JS-emitting expression, we can quickly determine if that symbol is effectively type-only + * and issue an error if so. + * + * @param aliasDeclaration The alias declaration not marked as type-only + * has already been marked as not resolving to a type-only alias. Used when recursively resolving qualified + * names of import aliases, e.g. `import C = a.b.C`. If namespace `a` is not found to be type-only, the + * import declaration will initially be marked as not resolving to a type-only symbol. But, namespace `b` + * must still be checked for a type-only marker, overwriting the previous negative result if found. + * @param immediateTarget The symbol to which the alias declaration immediately resolves + * @param finalTarget The symbol to which the alias declaration ultimately resolves + * @param overwriteEmpty Checks `resolvesToSymbol` for type-only declarations even if `aliasDeclaration` + */ + function markSymbolOfAliasDeclarationIfTypeOnly(aliasDeclaration, immediateTarget, finalTarget, overwriteEmpty) { + if (!aliasDeclaration) + return false; + // If the declaration itself is type-only, mark it and return. + // No need to check what it resolves to. + var sourceSymbol = getSymbolOfNode(aliasDeclaration); + if (ts.isTypeOnlyImportOrExportDeclaration(aliasDeclaration)) { + var links_1 = getSymbolLinks(sourceSymbol); + links_1.typeOnlyDeclaration = aliasDeclaration; + return true; + } + var links = getSymbolLinks(sourceSymbol); + return markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, immediateTarget, overwriteEmpty) + || markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, finalTarget, overwriteEmpty); + } + function markSymbolOfAliasDeclarationIfTypeOnlyWorker(aliasDeclarationLinks, target, overwriteEmpty) { + var _a, _b, _c; + if (target && (aliasDeclarationLinks.typeOnlyDeclaration === undefined || overwriteEmpty && aliasDeclarationLinks.typeOnlyDeclaration === false)) { + var exportSymbol = (_b = (_a = target.exports) === null || _a === void 0 ? void 0 : _a.get("export=" /* ExportEquals */)) !== null && _b !== void 0 ? _b : target; + var typeOnly = exportSymbol.declarations && ts.find(exportSymbol.declarations, ts.isTypeOnlyImportOrExportDeclaration); + aliasDeclarationLinks.typeOnlyDeclaration = (_c = typeOnly !== null && typeOnly !== void 0 ? typeOnly : getSymbolLinks(exportSymbol).typeOnlyDeclaration) !== null && _c !== void 0 ? _c : false; + } + return !!aliasDeclarationLinks.typeOnlyDeclaration; + } + /** Indicates that a symbol directly or indirectly resolves to a type-only import or export. */ + function getTypeOnlyAliasDeclaration(symbol) { + if (!(symbol.flags & 2097152 /* Alias */)) { + return undefined; + } + var links = getSymbolLinks(symbol); + return links.typeOnlyDeclaration || undefined; + } function markExportAsReferenced(node) { var symbol = getSymbolOfNode(node); var target = resolveAlias(symbol); if (target) { var markAlias = target === unknownSymbol || - ((target.flags & 111551 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target)); + ((target.flags & 111551 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol)); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -36140,6 +36907,14 @@ var ts; } } } + // Aliases that resolve to const enums are not marked as referenced because they are not emitted, + // but their usage in value positions must be tracked to determine if the import can be type-only. + function markConstEnumAliasAsReferenced(symbol) { + var links = getSymbolLinks(symbol); + if (!links.constEnumReferenced) { + links.constEnumReferenced = true; + } + } // This function is only for imports with entity names function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) { // There are three things we might try to look for. In the following examples, @@ -36175,8 +36950,8 @@ var ts; var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 111551 /* Value */ : 0); var symbol; if (name.kind === 75 /* Identifier */) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); - var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; + var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); + var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true); if (!symbol) { return symbolFromJSPrototype; @@ -36219,6 +36994,9 @@ var ts; throw ts.Debug.assertNever(name, "Unknown entity name kind."); } ts.Debug.assert((ts.getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); + if (!ts.nodeIsSynthesized(name) && ts.isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 259 /* ExportAssignment */)) { + markSymbolOfAliasDeclarationIfTypeOnly(ts.getAliasDeclarationFromName(name), symbol, /*finalTarget*/ undefined, /*overwriteEmpty*/ true); + } return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol); } /** @@ -36283,7 +37061,7 @@ var ts; */ function getExpandoSymbol(symbol) { var decl = symbol.valueDeclaration; - if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */) { + if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */ || ts.getExpandoInitializer(decl, /*isPrototypeAssignment*/ false)) { return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); @@ -36719,7 +37497,7 @@ var ts; return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 ? symbol.exportSymbol : symbol); } function symbolIsValue(symbol) { - return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */); + return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */ && !getTypeOnlyAliasDeclaration(symbol)); } function findConstructorDeclaration(node) { var members = node.members; @@ -36822,7 +37600,7 @@ var ts; // `sym` may not have exports if this module declaration is backed by the symbol for a `const` that's being rewritten // into a namespace - in such cases, it's best to just let the namespace appear empty (the const members couldn't have referred // to one another anyway) - if (result = callback(sym.exports || emptySymbols)) { + if (result = callback((sym === null || sym === void 0 ? void 0 : sym.exports) || emptySymbols)) { return { value: result }; } break; @@ -36995,6 +37773,7 @@ var ts; if (!ts.length(symbols)) return; var hadAccessibleChain; + var earlyModuleBail = false; for (var _i = 0, _a = symbols; _i < _a.length; _i++) { var symbol = _a[_i]; // Symbol is accessible if it by itself is accessible @@ -37008,6 +37787,14 @@ var ts; } else { if (ts.some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { + if (shouldComputeAliasesToMakeVisible) { + earlyModuleBail = true; + // Generally speaking, we want to use the aliases that already exist to refer to a module, if present + // In order to do so, we need to find those aliases in order to retain them in declaration emit; so + // if we are in declaration emit, we cannot use the fast path for module visibility until we've exhausted + // all other visibility options (in order to capture the possible aliases used to reference the module) + continue; + } // Any meaning of a module symbol is always accessible via an `import` type return { accessibility: 0 /* Accessible */ @@ -37041,6 +37828,11 @@ var ts; return parentResult; } } + if (earlyModuleBail) { + return { + accessibility: 0 /* Accessible */ + }; + } if (hadAccessibleChain) { return { accessibility: 1 /* NotAccessible */, @@ -37240,7 +38032,7 @@ var ts; } function toNodeBuilderFlags(flags) { if (flags === void 0) { flags = 0 /* None */; } - return flags & 9469291 /* NodeBuilderFlagsMask */; + return flags & 277904747 /* NodeBuilderFlagsMask */; } function createNodeBuilder() { return { @@ -37344,7 +38136,7 @@ var ts; } if (type.flags & 128 /* StringLiteral */) { context.approximateLength += (type.value.length + 2); - return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value), 16777216 /* NoAsciiEscaping */)); + return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value, !!(context.flags & 268435456 /* UseSingleQuotesForStringLiteralType */)), 16777216 /* NoAsciiEscaping */)); } if (type.flags & 256 /* NumberLiteral */) { var value = type.value; @@ -37842,8 +38634,8 @@ var ts; typeElements.push(preserveCommentsOn(propertySignature)); } function preserveCommentsOn(node) { - if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 322 /* JSDocPropertyTag */; })) { - var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 322 /* JSDocPropertyTag */; }); + if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 323 /* JSDocPropertyTag */; })) { + var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 323 /* JSDocPropertyTag */; }); var commentText = d.comment; if (commentText) { ts.setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -37967,7 +38759,7 @@ var ts; function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags) { var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 156 /* Parameter */); if (!parameterDeclaration && !ts.isTransientSymbol(parameterSymbol)) { - parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 316 /* JSDocParameterTag */); + parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 317 /* JSDocParameterTag */); } var parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -38024,7 +38816,7 @@ var ts; var chain; var isTypeParameter = symbol.flags & 262144 /* TypeParameter */; if (!isTypeParameter && (context.enclosingDeclaration || context.flags & 64 /* UseFullyQualifiedType */) && !(context.flags & 134217728 /* DoNotIncludeSymbolChain */)) { - chain = ts.Debug.assertDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); + chain = ts.Debug.checkDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); ts.Debug.assert(chain && chain.length > 0); } else { @@ -38399,7 +39191,7 @@ var ts; } // See getNameForSymbolFromNameType for a stringy equivalent function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; @@ -38674,7 +39466,7 @@ var ts; symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */; var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); - if (symbol.flags & 16 /* Function */ || isConstMergedWithNSPrintableAsSignatureMerge) { + if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288 /* TypeAlias */) { @@ -38733,7 +39525,7 @@ var ts; function includePrivateSymbol(symbol) { if (ts.some(symbol.declarations, ts.isParameterDeclaration)) return; - ts.Debug.assertDefined(deferredPrivates); + ts.Debug.assertIsDefined(deferredPrivates); getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol deferredPrivates.set("" + getSymbolId(symbol), symbol); } @@ -38874,7 +39666,7 @@ var ts; // function g() {} // module.exports.g = g // ``` - // In such a situation, we have a local variable named `g`, and a seperate exported variable named `g`. + // In such a situation, we have a local variable named `g`, and a separate exported variable named `g`. // Naively, we would emit // ``` // function g() {} @@ -38965,18 +39757,19 @@ var ts; var typeParamDecls = ts.map(localParams, function (p) { return typeParameterToDeclaration(p, context); }); var classType = getDeclaredTypeOfClassOrInterface(symbol); var baseTypes = getBaseTypes(classType); + var implementsTypes = getImplementsTypes(classType); var staticType = getTypeOfSymbol(symbol); var staticBaseType = getBaseConstructorTypeOfClass(staticType); - var heritageClauses = !ts.length(baseTypes) ? undefined : [ts.createHeritageClause(90 /* ExtendsKeyword */, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]; + var heritageClauses = __spreadArrays(!ts.length(baseTypes) ? [] : [ts.createHeritageClause(90 /* ExtendsKeyword */, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))], !ts.length(implementsTypes) ? [] : [ts.createHeritageClause(113 /* ImplementsKeyword */, ts.map(implementsTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]); var symbolProps = getPropertiesOfType(classType); var publicSymbolProps = ts.filter(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return !(ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name)); }); var hasPrivateIdentifier = ts.some(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name); }); // Boil down all private properties into a single one. @@ -39008,8 +39801,8 @@ var ts; } function serializeAsAlias(symbol, localName, modifierFlags) { // synthesize an alias, eg `export { symbolName as Name }` - // need to mark the alias `symbol` points - // at as something we need to serialize as a private declaration as well + // need to mark the alias `symbol` points at + // as something we need to serialize as a private declaration as well var node = getDeclarationOfAliasSymbol(symbol); if (!node) return ts.Debug.fail(); @@ -39212,7 +40005,7 @@ var ts; && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName)))) { return []; } - var flag = modifierFlags | (isStatic ? 32 /* Static */ : 0); + var flag = (modifierFlags & ~256 /* Async */) | (isStatic ? 32 /* Static */ : 0); var name = getPropertyNameNodeForSymbol(p, context); var firstPropertyLikeDecl = ts.find(p.declarations, ts.or(ts.isPropertyDeclaration, ts.isAccessor, ts.isVariableDeclaration, ts.isPropertySignature, ts.isBinaryExpression, ts.isPropertyAccessExpression)); if (p.flags & 98304 /* Accessor */ && useAccessors) { @@ -39276,7 +40069,7 @@ var ts; return serializePropertySymbolForInterfaceWorker(p, /*isStatic*/ false, baseType); } function getDeclarationWithTypeAnnotation(symbol) { - return ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); + return symbol.declarations && ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); } /** * Unlike `typeToTypeNodeHelper`, this handles setting up the `AllowUniqueESSymbolType` flag @@ -39594,7 +40387,7 @@ var ts; return location.kind === 290 /* SourceFile */ || ts.isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; @@ -39635,11 +40428,14 @@ var ts; if (ts.isCallExpression(declaration) && ts.isBindableObjectDefinePropertyCall(declaration)) { return ts.symbolName(symbol); } - if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096 /* Late */) && symbol.nameType && symbol.nameType.flags & 384 /* StringOrNumberLiteral */) { - // Computed property name isn't late bound, but has a well-known name type - use name type to generate a symbol name - var result = getNameOfSymbolFromNameType(symbol, context); - if (result !== undefined) { - return result; + if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096 /* Late */)) { + var nameType = getSymbolLinks(symbol).nameType; + if (nameType && nameType.flags & 384 /* StringOrNumberLiteral */) { + // Computed property name isn't late bound, but has a well-known name type - use name type to generate a symbol name + var result = getNameOfSymbolFromNameType(symbol, context); + if (result !== undefined) { + return result; + } } } return ts.declarationNameToString(name_2); @@ -39674,9 +40470,9 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: - case 315 /* JSDocEnumTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 316 /* JSDocEnumTag */: // Top-level jsdoc type aliases are considered exported // First parent is comment node, second is hosting declaration or token; we only care about those tokens or declarations whose parent is a source file return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent)); @@ -39848,9 +40644,7 @@ var ts; return !!target.resolvedReturnType; case 4 /* ImmediateBaseConstraint */: return !!target.immediateBaseConstraint; - case 6 /* JSDocTypeReference */: - return !!getSymbolLinks(target).resolvedJSDocType; - case 7 /* ResolvedTypeArguments */: + case 6 /* ResolvedTypeArguments */: return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); @@ -40090,11 +40884,6 @@ var ts; if (optional === void 0) { optional = true; } return strictNullChecks && optional ? getOptionalType(type) : type; } - function isParameterOfContextuallyTypedFunction(node) { - return node.kind === 156 /* Parameter */ && - (node.parent.kind === 201 /* FunctionExpression */ || node.parent.kind === 202 /* ArrowFunction */) && - !!getContextualType(node.parent); - } // Return the inferred type for a variable, parameter, or property declaration function getTypeForVariableLikeDeclaration(declaration, includeOptionality) { // A variable declared in a for..in statement is of type string, or of type keyof T when the @@ -40159,7 +40948,7 @@ var ts; } } // Use contextual parameter type if one is available - var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration, /*forCache*/ true); + var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration); if (type) { return addOptionality(type, isOptional); } @@ -40172,7 +40961,7 @@ var ts; } // Use the type of the initializer expression if one is present and the declaration is // not a parameter of a contextually typed function - if (declaration.initializer && !isParameterOfContextuallyTypedFunction(declaration)) { + if (declaration.initializer) { var type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration)); return addOptionality(type, isOptional); } @@ -40183,7 +40972,7 @@ var ts; } // If the declaration specifies a binding pattern and is not a parameter of a contextually // typed function, use the type implied by the binding pattern - if (ts.isBindingPattern(declaration.name) && !isParameterOfContextuallyTypedFunction(declaration)) { + if (ts.isBindingPattern(declaration.name)) { return getTypeFromBindingPattern(declaration.name, /*includePatternInType*/ false, /*reportErrors*/ true); } // No type specified and nothing can be inferred @@ -40823,8 +41612,8 @@ var ts; function getTypeOfSymbolWithDeferredType(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); links.type = links.deferralParent.flags & 1048576 /* Union */ ? getUnionType(links.deferralConstituents) : getIntersectionType(links.deferralConstituents); } return links.type; @@ -40921,10 +41710,10 @@ var ts; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: - case 321 /* JSDocTypedefTag */: - case 315 /* JSDocEnumTag */: - case 314 /* JSDocCallbackTag */: + case 321 /* JSDocTemplateTag */: + case 322 /* JSDocTypedefTag */: + case 316 /* JSDocEnumTag */: + case 315 /* JSDocCallbackTag */: case 186 /* MappedType */: case 180 /* ConditionalType */: var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); @@ -41055,6 +41844,28 @@ var ts; } return type.resolvedBaseConstructorType; } + function getImplementsTypes(type) { + var resolvedImplementsTypes = ts.emptyArray; + for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + var implementsTypeNodes = ts.getEffectiveImplementsTypeNodes(declaration); + if (!implementsTypeNodes) + continue; + for (var _b = 0, implementsTypeNodes_1 = implementsTypeNodes; _b < implementsTypeNodes_1.length; _b++) { + var node = implementsTypeNodes_1[_b]; + var implementsType = getTypeFromTypeNode(node); + if (implementsType !== errorType) { + if (resolvedImplementsTypes === ts.emptyArray) { + resolvedImplementsTypes = [implementsType]; + } + else { + resolvedImplementsTypes.push(implementsType); + } + } + } + } + return resolvedImplementsTypes; + } function getBaseTypes(type) { if (!type.resolvedBaseTypes) { if (type.objectFlags & 8 /* Tuple */) { @@ -41250,20 +42061,10 @@ var ts; if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { return errorType; } - var type = void 0; - var declaration = void 0; - if (ts.isTypeOnlyAlias(symbol)) { - // Symbol is synthetic type alias for type-only import or export. - // See `createSyntheticTypeAlias`. - type = getDeclaredTypeOfSymbol(symbol.immediateTarget); - declaration = symbol.valueDeclaration; - } - else { - declaration = ts.Debug.assertDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); - var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; - // If typeNode is missing, we will error in checkJSDocTypedefTag. - type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; - } + var declaration = ts.Debug.checkDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); + var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; + // If typeNode is missing, we will error in checkJSDocTypedefTag. + var type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; if (popTypeResolution()) { var typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); if (typeParameters) { @@ -42256,7 +43057,7 @@ var ts; var checkFlags = 8192 /* ReverseMapped */ | (readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0); var inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.escapedName, checkFlags); inferredProp.declarations = prop.declarations; - inferredProp.nameType = prop.nameType; + inferredProp.nameType = getSymbolLinks(prop).nameType; inferredProp.propertyType = getTypeOfSymbol(prop); inferredProp.mappedType = type.mappedType; inferredProp.constraintType = type.constraintType; @@ -42344,7 +43145,7 @@ var ts; // When creating an optional property in strictNullChecks mode, if 'undefined' isn't assignable to the // type, we include 'undefined' in the type. Similarly, when creating a non-optional property in strictNullChecks // mode, if the underlying property is optional we remove 'undefined' from the type. - prop.type = strictNullChecks && isOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + prop.type = strictNullChecks && isOptional && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType) : strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */ ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType; if (modifiersProp) { @@ -42907,7 +43708,7 @@ var ts; var type = getTypeOfSymbol(prop); if (!firstType) { firstType = type; - nameType = prop.nameType; + nameType = getSymbolLinks(prop).nameType; } else if (type !== firstType) { checkFlags |= 64 /* HasNonUniformType */; @@ -43671,7 +44472,7 @@ var ts; function getTypeArguments(type) { var _a, _b; if (!type.resolvedTypeArguments) { - if (!pushTypeResolution(type, 7 /* ResolvedTypeArguments */)) { + if (!pushTypeResolution(type, 6 /* ResolvedTypeArguments */)) { return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; } var node = type.node; @@ -43721,7 +44522,7 @@ var ts; return errorType; } } - if (node.kind === 169 /* TypeReference */ && isAliasedType(node)) { + if (node.kind === 169 /* TypeReference */ && isDeferredTypeReferenceNode(node, ts.length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference(type, node, /*mapper*/ undefined); } // In a type reference, the outer type parameters of the referenced class or interface are automatically @@ -43793,9 +44594,6 @@ var ts; if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) { return getTypeFromClassOrInterfaceReference(node, symbol); } - if (ts.isTypeOnlyAlias(symbol)) { - return getTypeReferenceType(node, symbol.immediateTarget); - } if (symbol.flags & 524288 /* TypeAlias */) { return getTypeFromTypeAliasReference(node, symbol); } @@ -43825,26 +44623,30 @@ var ts; * but this function's special-case code fakes alias resolution as well. */ function getTypeFromJSDocValueReference(node, symbol) { - var valueType = getTypeOfSymbol(symbol); - var typeType = valueType; - if (symbol.valueDeclaration) { - var decl = ts.getRootDeclaration(symbol.valueDeclaration); - var isRequireAlias = false; - if (ts.isVariableDeclaration(decl) && decl.initializer) { - var expr = decl.initializer; - // skip past entity names, eg `require("x").a.b.c` - while (ts.isPropertyAccessExpression(expr)) { - expr = expr.expression; + var links = getNodeLinks(node); + if (!links.resolvedJSDocType) { + var valueType = getTypeOfSymbol(symbol); + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + // skip past entity names, eg `require("x").a.b.c` + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 188 /* ImportType */ && node.qualifier; + // valueType might not have a symbol, eg, {import('./b').STRING_LITERAL} + if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { + typeType = getTypeReferenceType(node, valueType.symbol); } - isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; - } - var isImportTypeWithQualifier = node.kind === 188 /* ImportType */ && node.qualifier; - // valueType might not have a symbol, eg, {import('./b').STRING_LITERAL} - if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { - typeType = getTypeReferenceType(node, valueType.symbol); } + links.resolvedJSDocType = typeType; } - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + return links.resolvedJSDocType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === typeVariable) { @@ -43945,6 +44747,11 @@ var ts; function getTypeFromTypeReference(node) { var links = getNodeLinks(node); if (!links.resolvedType) { + // handle LS queries on the `const` in `x as const` by resolving to the type of `x` + if (ts.isConstTypeReference(node) && ts.isAssertionExpression(node.parent)) { + links.resolvedSymbol = unknownSymbol; + return links.resolvedType = checkExpressionCached(node.parent.expression); + } var symbol = void 0; var type = void 0; var meaning = 788968 /* Type */; @@ -44123,10 +44930,17 @@ var ts; var minLength = ts.findLastIndex(node.elementTypes, function (n) { return n.kind !== 176 /* OptionalType */ && n !== restElement; }) + 1; return getTupleTypeOfArity(node.elementTypes.length, minLength, !!restElement, readonly, /*associatedNames*/ undefined); } + // Return true if the given type reference node is directly aliased or if it needs to be deferred + // because it is possibly contained in a circular chain of eagerly resolved types. + function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 174 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : + node.kind === 175 /* TupleType */ ? ts.some(node.elementTypes, mayResolveTypeAlias) : + hasDefaultTypeArguments || ts.some(node.typeArguments, mayResolveTypeAlias)); + } // Return true when the given node is transitively contained in type constructs that eagerly // resolve their constituent types. We include SyntaxKind.TypeReference because type arguments // of type aliases are eagerly resolved. - function isAliasedType(node) { + function isResolvedByTypeAlias(node) { var parent = node.parent; switch (parent.kind) { case 182 /* ParenthesizedType */: @@ -44136,12 +44950,42 @@ var ts; case 185 /* IndexedAccessType */: case 180 /* ConditionalType */: case 184 /* TypeOperator */: - return isAliasedType(parent); + return isResolvedByTypeAlias(parent); case 247 /* TypeAliasDeclaration */: return true; } return false; } + // Return true if resolving the given node (i.e. getTypeFromTypeNode) possibly causes resolution + // of a type alias. + function mayResolveTypeAlias(node) { + switch (node.kind) { + case 169 /* TypeReference */: + return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node.typeName, 788968 /* Type */).flags & 524288 /* TypeAlias */); + case 172 /* TypeQuery */: + return true; + case 184 /* TypeOperator */: + return node.operator !== 147 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); + case 182 /* ParenthesizedType */: + case 176 /* OptionalType */: + case 299 /* JSDocOptionalType */: + case 297 /* JSDocNullableType */: + case 298 /* JSDocNonNullableType */: + case 294 /* JSDocTypeExpression */: + return mayResolveTypeAlias(node.type); + case 177 /* RestType */: + return node.type.kind !== 174 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 178 /* UnionType */: + case 179 /* IntersectionType */: + return ts.some(node.types, mayResolveTypeAlias); + case 185 /* IndexedAccessType */: + return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); + case 180 /* ConditionalType */: + return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || + mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); + } + return false; + } function getTypeFromArrayOrTupleTypeNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { @@ -44149,7 +44993,7 @@ var ts; if (target === emptyGenericType) { links.resolvedType = emptyObjectType; } - else if (isAliasedType(node)) { + else if (isDeferredTypeReferenceNode(node)) { links.resolvedType = node.kind === 175 /* TupleType */ && node.elementTypes.length === 0 ? target : createDeferredTypeReference(target, node, /*mapper*/ undefined); } @@ -44722,7 +45566,7 @@ var ts; } function getLiteralTypeFromProperty(prop, include) { if (!(ts.getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */)) { - var type = getLateBoundSymbol(prop).nameType; + var type = getSymbolLinks(getLateBoundSymbol(prop)).nameType; if (!type && !ts.isKnownSymbol(prop)) { if (prop.escapedName === "default" /* Default */) { type = getLiteralType("default"); @@ -44979,10 +45823,24 @@ var ts; accessNode; } function isGenericObjectType(type) { - return maybeTypeOfKind(type, 58982400 /* InstantiableNonPrimitive */ | 131072 /* GenericMappedType */); + if (type.flags & 3145728 /* UnionOrIntersection */) { + if (!(type.objectFlags & 4194304 /* IsGenericObjectTypeComputed */)) { + type.objectFlags |= 4194304 /* IsGenericObjectTypeComputed */ | + (ts.some(type.types, isGenericObjectType) ? 8388608 /* IsGenericObjectType */ : 0); + } + return !!(type.objectFlags & 8388608 /* IsGenericObjectType */); + } + return !!(type.flags & 58982400 /* InstantiableNonPrimitive */) || isGenericMappedType(type); } function isGenericIndexType(type) { - return maybeTypeOfKind(type, 58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */); + if (type.flags & 3145728 /* UnionOrIntersection */) { + if (!(type.objectFlags & 16777216 /* IsGenericIndexTypeComputed */)) { + type.objectFlags |= 16777216 /* IsGenericIndexTypeComputed */ | + (ts.some(type.types, isGenericIndexType) ? 33554432 /* IsGenericIndexType */ : 0); + } + return !!(type.objectFlags & 33554432 /* IsGenericIndexType */); + } + return !!(type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */)); } function isThisTypeParameter(type) { return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType); @@ -45009,6 +45867,12 @@ var ts; return writing ? getIntersectionType(types) : getUnionType(types); } } + function unwrapSubstitution(type) { + if (type.flags & 33554432 /* Substitution */) { + return type.substitute; + } + return type; + } // Transform an indexed access to a simpler form, if possible. Return the simpler form, or return // the type itself if no transformation is possible. The writing flag indicates that the type is // the target of an assignment. @@ -45020,7 +45884,7 @@ var ts; type[cache] = circularConstraintType; // We recursively simplify the object type as it may in turn be an indexed access type. For example, with // '{ [P in T]: { [Q in U]: number } }[T][U]' we want to first simplify the inner indexed access type. - var objectType = getSimplifiedType(type.objectType, writing); + var objectType = unwrapSubstitution(getSimplifiedType(type.objectType, writing)); var indexType = getSimplifiedType(type.indexType, writing); // T[A | B] -> T[A] | T[B] (reading) // T[A | B] -> T[A] & T[B] (writing) @@ -45185,11 +46049,15 @@ var ts; if (checkType === wildcardType || extendsType === wildcardType) { return wildcardType; } - var checkTypeInstantiable = maybeTypeOfKind(checkType, 63176704 /* Instantiable */ | 131072 /* GenericMappedType */); + var checkTypeInstantiable = isGenericObjectType(checkType) || isGenericIndexType(checkType); var combinedMapper; if (root.inferTypeParameters) { var context = createInferenceContext(root.inferTypeParameters, /*signature*/ undefined, 0 /* None */); - if (!checkTypeInstantiable) { + // We skip inference of the possible `infer` types unles the `extendsType` _is_ an infer type + // if it was, it's trivial to say that extendsType = checkType, however such a pattern is used to + // "reset" the type being build up during constraint calculation and avoid making an apparently "infinite" constraint + // so in those cases we refain from performing inference and retain the uninfered type parameter + if (!checkTypeInstantiable || !ts.some(root.inferTypeParameters, function (t) { return t === extendsType; })) { // We don't want inferences from constraints as they may cause us to eagerly resolve the // conditional type instead of deferring resolution. Also, we always want strict function // types rules (i.e. proper contravariance) for inferences. @@ -45200,7 +46068,7 @@ var ts; // Instantiate the extends type including inferences for 'infer T' type parameters var inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType; // We attempt to resolve the conditional type only when the check and extends types are non-generic - if (!checkTypeInstantiable && !maybeTypeOfKind(inferredExtendsType, 63176704 /* Instantiable */ | 131072 /* GenericMappedType */)) { + if (!checkTypeInstantiable && !isGenericObjectType(inferredExtendsType) && !isGenericIndexType(inferredExtendsType)) { if (inferredExtendsType.flags & 3 /* AnyOrUnknown */) { return instantiateType(root.trueType, combinedMapper || mapper); } @@ -45433,7 +46301,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 /* Readonly */ : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; members.set(prop.escapedName, result); } @@ -45448,7 +46316,7 @@ var 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, right, symbol, objectFlags, readonly) { + function getSpreadType(left, right, symbol, objectFlags, readonly, isParentTypeNullable) { if (left.flags & 1 /* Any */ || right.flags & 1 /* Any */) { return anyType; } @@ -45464,16 +46332,16 @@ var ts; if (left.flags & 1048576 /* Union */) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(left, readonly); if (merged) { - return getSpreadType(merged, right, symbol, objectFlags, readonly); + return getSpreadType(merged, right, symbol, objectFlags, readonly, isParentTypeNullable); } - return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly); }); + return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly, isParentTypeNullable); }); } if (right.flags & 1048576 /* Union */) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(right, readonly); if (merged) { - return getSpreadType(left, merged, symbol, objectFlags, readonly); + return getSpreadType(left, merged, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304 /* Nullable */)); } - return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly); }); + return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304 /* Nullable */)); }); } if (right.flags & (528 /* BooleanLike */ | 296 /* NumberLike */ | 2112 /* BigIntLike */ | 132 /* StringLike */ | 1056 /* EnumLike */ | 67108864 /* NonPrimitive */ | 4194304 /* Index */)) { return left; @@ -45532,9 +46400,17 @@ var ts; result.leftSpread = leftProp; result.rightSpread = rightProp; result.declarations = declarations; - result.nameType = leftProp.nameType; + result.nameType = getSymbolLinks(leftProp).nameType; members.set(leftProp.escapedName, result); } + else if (strictNullChecks && + !isParentTypeNullable && + symbol && + !isFromSpreadAssignment(leftProp, symbol) && + isFromSpreadAssignment(rightProp, symbol) && + !maybeTypeOfKind(rightType, 98304 /* Nullable */)) { + error(leftProp.valueDeclaration, ts.Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, ts.unescapeLeadingUnderscores(leftProp.escapedName)); + } } else { members.set(leftProp.escapedName, getSpreadSymbol(leftProp, readonly)); @@ -45559,7 +46435,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 /* Readonly */ : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; return result; } @@ -45885,8 +46761,8 @@ var ts; if (symbol.valueDeclaration) { result.valueDeclaration = symbol.valueDeclaration; } - if (symbol.nameType) { - result.nameType = symbol.nameType; + if (links.nameType) { + result.nameType = links.nameType; } return result; } @@ -46038,7 +46914,7 @@ var ts; var templateMapper = combineTypeMappers(mapper, createTypeMapper([getTypeParameterFromMappedType(type)], [key])); var propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper); var modifiers = getMappedTypeModifiers(type); - return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType) : strictNullChecks && modifiers & 8 /* ExcludeOptional */ && isOptional ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType; } @@ -46101,6 +46977,7 @@ var ts; error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } + totalInstantiationCount++; instantiationCount++; instantiationDepth++; var result = instantiateTypeWorker(type, mapper); @@ -46134,15 +47011,17 @@ var ts; } return type; } - if (flags & 1048576 /* Union */ && !(flags & 131068 /* Primitive */)) { - var types = type.types; - var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getUnionType(newTypes, 1 /* Literal */, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; - } - if (flags & 2097152 /* Intersection */) { + if ((flags & 2097152 /* Intersection */) || (flags & 1048576 /* Union */ && !(flags & 131068 /* Primitive */))) { + if (!couldContainTypeVariables(type)) { + return type; + } var types = type.types; var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; + return newTypes === types + ? type + : (flags & 2097152 /* Intersection */) + ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) + : getUnionType(newTypes, 1 /* Literal */, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)); } if (flags & 4194304 /* Index */) { return getIndexType(instantiateType(type.type, mapper)); @@ -46231,30 +47110,30 @@ var ts; return false; } function isContextSensitiveFunctionLikeDeclaration(node) { - if (ts.isFunctionDeclaration(node) && (!ts.isInJSFile(node) || !getTypeForDeclarationFromJSDocComment(node))) { - return false; - } + return (!ts.isFunctionDeclaration(node) || ts.isInJSFile(node) && !!getTypeForDeclarationFromJSDocComment(node)) && + (hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node)); + } + function hasContextSensitiveParameters(node) { // Functions with type parameters are not context sensitive. - if (node.typeParameters) { - return false; - } - // Functions with any parameters that lack type annotations are context sensitive. - if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { - return true; - } - if (node.kind !== 202 /* ArrowFunction */) { - // If the first parameter is not an explicit 'this' parameter, then the function has - // an implicit 'this' parameter which is subject to contextual typing. - var parameter = ts.firstOrUndefined(node.parameters); - if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + if (!node.typeParameters) { + // Functions with any parameters that lack type annotations are context sensitive. + if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { return true; } + if (node.kind !== 202 /* ArrowFunction */) { + // If the first parameter is not an explicit 'this' parameter, then the function has + // an implicit 'this' parameter which is subject to contextual typing. + var parameter = ts.firstOrUndefined(node.parameters); + if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + return true; + } + } } - return hasContextSensitiveReturnExpression(node); + return false; } function hasContextSensitiveReturnExpression(node) { // TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value. - return !!node.body && node.body.kind !== 223 /* Block */ && isContextSensitive(node.body); + return !ts.getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 223 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (ts.isInJSFile(func) && ts.isFunctionDeclaration(func) || isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) && @@ -46427,6 +47306,13 @@ var ts; if (target.symbol && ts.length(target.symbol.declarations)) { ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(target.symbol.declarations[0], ts.Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature)); } + if ((ts.getFunctionFlags(node) & 2 /* Async */) === 0 + // exclude cases where source itself is promisy - this way we don't make a suggestion when relating + // an IPromise and a Promise that are slightly different + && !getTypeOfPropertyOfType(sourceReturn, "then") + && checkTypeRelatedTo(createPromiseType(sourceReturn), targetReturn, relation, /*errorNode*/ undefined)) { + ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async)); + } return true; } } @@ -46684,11 +47570,20 @@ var ts; return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); } // recreate a tuple from the elements, if possible - var tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, /*forceTuple*/ true); - if (isTupleLikeType(tupleizedType)) { - return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + // Since we're re-doing the expression type, we need to reapply the contextual type + var oldContext = node.contextualType; + node.contextualType = target; + try { + var tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, /*forceTuple*/ true); + node.contextualType = oldContext; + if (isTupleLikeType(tupleizedType)) { + return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + } + return false; + } + finally { + node.contextualType = oldContext; } - return false; } function generateObjectLiteralElements(node) { var _i, _a, prop, type, _b; @@ -47034,11 +47929,18 @@ var ts; if (isFreshLiteralType(target)) { target = target.regularType; } - if (source === target || - relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || - relation !== identityRelation && isSimpleTypeRelatedTo(source, target, relation)) { + if (source === target) { return true; } + if (relation !== identityRelation) { + if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation)) { + return true; + } + } + else { + if (!(source.flags === target.flags && source.flags & 66584576 /* Substructure */)) + return false; + } if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) { var related = relation.get(getRelationKey(source, target, 0 /* None */, relation)); if (related !== undefined) { @@ -47054,11 +47956,17 @@ var ts; return ts.getObjectFlags(source) & 4096 /* JsxAttributes */ && !isUnhyphenatedJsxName(sourceProp.escapedName); } function getNormalizedType(type, writing) { - return isFreshLiteralType(type) ? type.regularType : - ts.getObjectFlags(type) & 4 /* Reference */ && type.node ? createTypeReference(type.target, getTypeArguments(type)) : - type.flags & 33554432 /* Substitution */ ? writing ? type.typeVariable : type.substitute : - type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : - type; + do { + var t = isFreshLiteralType(type) ? type.regularType : + ts.getObjectFlags(type) & 4 /* Reference */ && type.node ? createTypeReference(type.target, getTypeArguments(type)) : + type.flags & 33554432 /* Substitution */ ? writing ? type.typeVariable : type.substitute : + type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : + type; + if (t === type) + break; + type = t; + } while (true); + return type; } /** * Checks if 'source' is related to 'target' (e.g.: is a assignable to). @@ -47346,6 +48254,11 @@ var ts; // side) or the type variable (on the target side). var source = getNormalizedType(originalSource, /*writing*/ false); var target = getNormalizedType(originalTarget, /*writing*/ true); + if (source === target) + return -1 /* True */; + if (relation === identityRelation) { + return isIdenticalTo(source, target); + } // Try to see if we're relating something like `Foo` -> `Bar | null | undefined`. // If so, reporting the `null` and `undefined` in the type is hardly useful. // First, see if we're even relating an object type to a union. @@ -47359,15 +48272,11 @@ var ts; target.types.length <= 3 && maybeTypeOfKind(target, 98304 /* Nullable */)) { var nullStrippedTarget = extractTypesOfKind(target, ~98304 /* Nullable */); if (!(nullStrippedTarget.flags & (1048576 /* Union */ | 131072 /* Never */))) { + if (source === nullStrippedTarget) + return -1 /* True */; target = nullStrippedTarget; } } - // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases - if (source === target) - return -1 /* True */; - if (relation === identityRelation) { - return isIdenticalTo(source, target); - } if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation, reportErrors ? reportError : undefined)) return -1 /* True */; @@ -47508,19 +48417,18 @@ var ts; return result; } function isIdenticalTo(source, target) { - var result; var flags = source.flags & target.flags; - if (flags & 524288 /* Object */ || flags & 8388608 /* IndexedAccess */ || flags & 16777216 /* Conditional */ || flags & 4194304 /* Index */ || flags & 33554432 /* Substitution */) { - return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, 0 /* None */); + if (!(flags & 66584576 /* Substructure */)) { + return 0 /* False */; } - if (flags & (1048576 /* Union */ | 2097152 /* Intersection */)) { - if (result = eachTypeRelatedToSomeType(source, target)) { - if (result &= eachTypeRelatedToSomeType(target, source)) { - return result; - } + if (flags & 3145728 /* UnionOrIntersection */) { + var result_3 = eachTypeRelatedToSomeType(source, target); + if (result_3) { + result_3 &= eachTypeRelatedToSomeType(target, source); } + return result_3; } - return 0 /* False */; + return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, 0 /* None */); } function getTypeOfPropertyInTypes(types, name) { var appendPropType = function (propTypes, type) { @@ -47547,7 +48455,7 @@ var ts; checkTypes = reducedTarget.flags & 1048576 /* Union */ ? reducedTarget.types : [reducedTarget]; } var _loop_11 = function (prop) { - if (shouldCheckAsExcessProperty(prop, source.symbol)) { + if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) { if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) { if (reportErrors) { // Report error in terms of object types in the target as those are the only ones @@ -47837,21 +48745,21 @@ var ts; if (flags & 4194304 /* Index */) { return isRelatedTo(source.type, target.type, /*reportErrors*/ false); } - var result_3 = 0 /* False */; + var result_4 = 0 /* False */; if (flags & 8388608 /* IndexedAccess */) { - if (result_3 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { + return result_4; } } } if (flags & 16777216 /* Conditional */) { if (source.root.isDistributive === target.root.isDistributive) { - if (result_3 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { + return result_4; } } } @@ -48130,11 +49038,11 @@ var ts; // with respect to T. We do not report errors here, as we will use the existing // error result from checking each constituent of the union. if (source.flags & (524288 /* Object */ | 2097152 /* Intersection */) && target.flags & 1048576 /* Union */) { - var objectOnlyTarget = extractTypesOfKind(target, 524288 /* Object */); + var objectOnlyTarget = extractTypesOfKind(target, 524288 /* Object */ | 2097152 /* Intersection */ | 33554432 /* Substitution */); if (objectOnlyTarget.flags & 1048576 /* Union */) { - var result_4 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); - if (result_4) { - return result_4; + var result_5 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); + if (result_5) { + return result_5; } } } @@ -48201,12 +49109,12 @@ var ts; var modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source) === getMappedTypeModifiers(target) : getCombinedMappedTypeOptionality(source) <= getCombinedMappedTypeOptionality(target)); if (modifiersRelated) { - var result_5; + var result_6; var targetConstraint = getConstraintTypeFromMappedType(target); var sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMarkers : reportUnreliableMarkers); - if (result_5 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { + if (result_6 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]); - return result_5 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); + return result_6 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); } } return 0 /* False */; @@ -48221,7 +49129,7 @@ var ts; // // NOTE: See ~/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts // for examples. - var sourceProperties = getPropertiesOfObjectType(source); + var sourceProperties = getPropertiesOfType(source); var sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target); if (!sourcePropertiesFiltered) return 0 /* False */; @@ -48260,7 +49168,7 @@ var ts; var type = _a[_i]; var _loop_13 = function (i) { var sourceProperty = sourcePropertiesFiltered[i]; - var targetProperty = getPropertyOfObjectType(type, sourceProperty.escapedName); + var targetProperty = getPropertyOfType(type, sourceProperty.escapedName); if (!targetProperty) return "continue-outer"; if (sourceProperty === targetProperty) @@ -48337,10 +49245,10 @@ var ts; if (ts.getCheckFlags(targetProp) & 65536 /* DeferredType */ && !getSymbolLinks(targetProp).type) { // Rather than resolving (and normalizing) the type, relate constituent-by-constituent without performing normalization or seconadary passes var links = getSymbolLinks(targetProp); - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); var unionParent = !!(links.deferralParent.flags & 1048576 /* Union */); - var result_6 = unionParent ? 0 /* False */ : -1 /* True */; + var result_7 = unionParent ? 0 /* False */ : -1 /* True */; var targetTypes = links.deferralConstituents; for (var _i = 0, targetTypes_3 = targetTypes; _i < targetTypes_3.length; _i++) { var targetType = targetTypes_3[_i]; @@ -48350,7 +49258,7 @@ var ts; // Can't assign to a target individually - have to fallback to assigning to the _whole_ intersection (which forces normalization) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - result_6 &= related; + result_7 &= related; } else { if (related) { @@ -48358,17 +49266,17 @@ var ts; } } } - if (unionParent && !result_6 && targetIsOptional) { - result_6 = isRelatedTo(source, undefinedType); + if (unionParent && !result_7 && targetIsOptional) { + result_7 = isRelatedTo(source, undefinedType); } - if (unionParent && !result_6 && reportErrors) { + if (unionParent && !result_7 && reportErrors) { // The easiest way to get the right errors here is to un-defer (which may be costly) // If it turns out this is too costly too often, we can replicate the error handling logic within // typeRelatedToSomeType without the discriminatable type branch (as that requires a manifest union // type on which to hand discriminable properties, which we are expressly trying to avoid here) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - return result_6; + return result_7; } else { return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors, /*headMessage*/ undefined, intersectionState); @@ -48441,13 +49349,14 @@ var ts; if (unmatchedProperty.valueDeclaration && ts.isNamedDeclaration(unmatchedProperty.valueDeclaration) && ts.isPrivateIdentifier(unmatchedProperty.valueDeclaration.name) - && ts.isClassDeclaration(source.symbol.valueDeclaration)) { + && source.symbol + && source.symbol.flags & 32 /* Class */) { var privateIdentifierDescription = unmatchedProperty.valueDeclaration.name.escapedText; var symbolTableKey = ts.getSymbolNameForPrivateIdentifier(source.symbol, privateIdentifierDescription); - if (symbolTableKey && !!getPropertyOfType(source, symbolTableKey)) { - var sourceName = source.symbol.valueDeclaration.name; - var targetName = ts.isClassDeclaration(target.symbol.valueDeclaration) ? target.symbol.valueDeclaration.name : undefined; - reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName || anon), diagnosticName(targetName || anon)); + if (symbolTableKey && getPropertyOfType(source, symbolTableKey)) { + var sourceName = ts.getDeclarationName(source.symbol.valueDeclaration); + var targetName = ts.getDeclarationName(target.symbol.valueDeclaration); + reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName.escapedText === "" ? anon : sourceName), diagnosticName(targetName.escapedText === "" ? anon : targetName)); return; } } @@ -48694,7 +49603,11 @@ var ts; for (var _i = 0, props_2 = props; _i < props_2.length; _i++) { var prop = props_2[_i]; // Skip over ignored JSX and symbol-named members - if (isIgnoredJsxProperty(source, prop) || prop.nameType && prop.nameType.flags & 8192 /* UniqueESSymbol */) { + if (isIgnoredJsxProperty(source, prop)) { + continue; + } + var nameType = getSymbolLinks(prop).nameType; + if (nameType && nameType.flags & 8192 /* UniqueESSymbol */) { continue; } if (kind === 0 /* String */ || isNumericLiteralName(prop.escapedName)) { @@ -48817,6 +49730,10 @@ var ts; // make sure exactly 1 matches before returning it return match === -1 || discriminable.indexOf(/*searchElement*/ true, match + 1) !== -1 ? defaultValue : target.types[match]; } + function isFromSpreadAssignment(prop, container) { + var _a; + return ((_a = prop.valueDeclaration) === null || _a === void 0 ? void 0 : _a.parent) !== container.valueDeclaration; + } /** * A type is 'weak' if it is an object type with at least one optional property * and no required properties, call/construct signatures or index signatures @@ -49314,7 +50231,7 @@ var ts; } /** * Check if a Type was written as a tuple type literal. - * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. + * Prefer using isTupleLikeType() unless the use of `elementTypes`/`getTypeArguments` is required. */ function isTupleType(type) { return !!(ts.getObjectFlags(type) & 4 /* Reference */ && type.target.objectFlags & 8 /* Tuple */); @@ -49460,8 +50377,9 @@ var ts; if (source.valueDeclaration) { symbol.valueDeclaration = source.valueDeclaration; } - if (source.nameType) { - symbol.nameType = source.nameType; + var nameType = getSymbolLinks(source).nameType; + if (nameType) { + symbol.nameType = nameType; } return symbol; } @@ -49843,17 +50761,18 @@ var ts; // results for union and intersection types for performance reasons. function couldContainTypeVariables(type) { var objectFlags = ts.getObjectFlags(type); - return !!(type.flags & 63176704 /* Instantiable */ || + if (objectFlags & 67108864 /* CouldContainTypeVariablesComputed */) { + return !!(objectFlags & 134217728 /* CouldContainTypeVariables */); + } + var result = !!(type.flags & 63176704 /* Instantiable */ || objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 131072 /* ObjectRestType */) || - type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && couldUnionOrIntersectionContainTypeVariables(type)); - } - function couldUnionOrIntersectionContainTypeVariables(type) { - if (type.couldContainTypeVariables === undefined) { - type.couldContainTypeVariables = ts.some(type.types, couldContainTypeVariables); + type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && ts.some(type.types, couldContainTypeVariables)); + if (type.flags & 3899393 /* ObjectFlagsType */) { + type.objectFlags |= 67108864 /* CouldContainTypeVariablesComputed */ | (result ? 134217728 /* CouldContainTypeVariables */ : 0); } - return type.couldContainTypeVariables; + return result; } function isTypeParameterAtTopLevel(type, typeParameter) { return !!(type === typeParameter || @@ -49999,6 +50918,12 @@ var ts; inference.contraCandidates ? getIntersectionType(inference.contraCandidates) : undefined; } + function hasSkipDirectInferenceFlag(node) { + return !!getNodeLinks(node).skipDirectInference; + } + function isFromInferenceBlockedSource(type) { + return !!(type.symbol && ts.some(type.symbol.declarations, hasSkipDirectInferenceFlag)); + } function inferTypes(inferences, originalSource, originalTarget, priority, contravariant) { if (priority === void 0) { priority = 0; } if (contravariant === void 0) { contravariant = false; } @@ -50090,7 +51015,7 @@ var ts; // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). if (ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ || source === nonInferrableAnyType || source === silentNeverType || - (priority & 32 /* ReturnType */ && (source === autoType || source === autoArrayType))) { + (priority & 32 /* ReturnType */ && (source === autoType || source === autoArrayType)) || isFromInferenceBlockedSource(source)) { return; } var inference = getInferenceInfoForType(target); @@ -50211,6 +51136,12 @@ var ts; invokeOnce(source, target, inferFromObjectTypes); } } + if (source.flags & 25165824 /* Simplifiable */) { + var simplified = getSimplifiedType(source, contravariant); + if (simplified !== source) { + inferFromTypes(simplified, target); + } + } } function inferWithPriority(source, target, newPriority) { var savePriority = priority; @@ -50388,7 +51319,7 @@ var ts; // type and then make a secondary inference from that type to T. We make a secondary inference // such that direct inferences to T get priority over inferences to Partial, for example. var inference = getInferenceInfoForType(constraintType.type); - if (inference && !inference.isFixed) { + if (inference && !inference.isFixed && !isFromInferenceBlockedSource(source)) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { // We assign a lower priority to inferences made from types containing non-inferrable @@ -50550,7 +51481,7 @@ var ts; } } function isTypeOrBaseIdenticalTo(s, t) { - return isTypeIdenticalTo(s, t) || !!(s.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) && isTypeIdenticalTo(getBaseTypeOfLiteralType(s), t); + return isTypeIdenticalTo(s, t) || !!(t.flags & 4 /* String */ && s.flags & 128 /* StringLiteral */ || t.flags & 8 /* Number */ && s.flags & 256 /* NumberLiteral */); } function isTypeCloselyMatchedBy(s, t) { return !!(s.flags & 524288 /* Object */ && t.flags & 524288 /* Object */ && s.symbol && s.symbol === t.symbol || @@ -51320,6 +52251,8 @@ var ts; return getExplicitTypeOfSymbol(symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol, diagnostic); case 104 /* ThisKeyword */: return getExplicitThisType(node); + case 102 /* SuperKeyword */: + return checkSuperExpression(node); case 194 /* PropertyAccessExpression */: var type = getTypeOfDottedName(node.expression, diagnostic); var prop = type && getPropertyOfType(type, node.name.escapedText); @@ -51375,14 +52308,11 @@ var ts; diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis)); } function isReachableFlowNode(flow) { - var result = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); + var result = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ false); lastFlowNode = flow; lastFlowNodeReachable = result; return result; } - function isUnlockedReachableFlowNode(flow) { - return !(flow.flags & 4096 /* PreFinally */ && flow.lock.locked) && isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); - } function isFalseExpression(expr) { var node = ts.skipParentheses(expr); return node.kind === 91 /* FalseKeyword */ || node.kind === 209 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || @@ -51394,15 +52324,15 @@ var ts; return lastFlowNodeReachable; } var flags = flow.flags; - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { if (!noCacheCheck) { var id = getFlowNodeId(flow); var reachable = flowNodeReachable[id]; - return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ true)); + return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ true)); } noCacheCheck = false; } - if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */ | 4096 /* PreFinally */)) { + if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */)) { flow = flow.antecedent; } else if (flags & 512 /* Call */) { @@ -51423,7 +52353,7 @@ var ts; } else if (flags & 4 /* BranchLabel */) { // A branching point is reachable if any branch is reachable. - return ts.some(flow.antecedents, isUnlockedReachableFlowNode); + return ts.some(flow.antecedents, function (f) { return isReachableFlowNodeWorker(f, /*noCacheCheck*/ false); }); } else if (flags & 8 /* LoopLabel */) { // A loop is reachable if the control flow path that leads to the top is reachable. @@ -51437,12 +52367,14 @@ var ts; } flow = flow.antecedent; } - else if (flags & 8192 /* AfterFinally */) { - // Cache is unreliable once we start locking nodes + else if (flags & 1024 /* ReduceLabel */) { + // Cache is unreliable once we start adjusting labels lastFlowNode = undefined; - flow.locked = true; - var result = isReachableFlowNodeWorker(flow.antecedent, /*skipCacheCheck*/ false); - flow.locked = false; + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; + var result = isReachableFlowNodeWorker(flow.antecedent, /*noCacheCheck*/ false); + target.antecedents = saveAntecedents; return result; } else { @@ -51492,7 +52424,7 @@ var ts; flowDepth++; while (true) { var flags = flow.flags; - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { // We cache results of flow type resolution for shared nodes that were previously visited in // the same getFlowTypeOfReference invocation. A node is considered shared when it is the // antecedent of more than one node. @@ -51504,19 +52436,7 @@ var ts; } } var type = void 0; - if (flags & 8192 /* AfterFinally */) { - // block flow edge: finally -> pre-try (for larger explanation check comment in binder.ts - bindTryStatement - flow.locked = true; - type = getTypeAtFlowNode(flow.antecedent); - flow.locked = false; - } - else if (flags & 4096 /* PreFinally */) { - // locked pre-finally flows are filtered out in getTypeAtFlowBranchLabel - // so here just redirect to antecedent - flow = flow.antecedent; - continue; - } - else if (flags & 16 /* Assignment */) { + if (flags & 16 /* Assignment */) { type = getTypeAtFlowAssignment(flow); if (!type) { flow = flow.antecedent; @@ -51552,6 +52472,13 @@ var ts; continue; } } + else if (flags & 1024 /* ReduceLabel */) { + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; + type = getTypeAtFlowNode(flow.antecedent); + target.antecedents = saveAntecedents; + } else if (flags & 2 /* Start */) { // Check if we should continue with the control flow of the containing function. var container = flow.node; @@ -51570,7 +52497,7 @@ var ts; // simply return the non-auto declared type to reduce follow-on errors. type = convertAutoToAny(declaredType); } - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { // Record visited node and the associated type in the cache. sharedFlowNodes[sharedFlowCount] = flow; sharedFlowTypes[sharedFlowCount] = type; @@ -51754,12 +52681,6 @@ var ts; var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; - if (antecedent.flags & 4096 /* PreFinally */ && antecedent.lock.locked) { - // if flow correspond to branch from pre-try to finally and this branch is locked - this means that - // we initially have started following the flow outside the finally block. - // in this case we should ignore this branch. - continue; - } if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.clauseStart === antecedent.clauseEnd) { // The antecedent is the bypass branch of a potentially exhaustive switch statement. bypassFlow = antecedent; @@ -52439,12 +53360,19 @@ var ts; } /** remove undefined from the annotated type of a parameter when there is an initializer (that doesn't include undefined) */ function removeOptionalityFromDeclaredType(declaredType, declaration) { - var annotationIncludesUndefined = strictNullChecks && - declaration.kind === 156 /* Parameter */ && - declaration.initializer && - getFalsyFlags(declaredType) & 32768 /* Undefined */ && - !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768 /* Undefined */); - return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; + if (pushTypeResolution(declaration.symbol, 2 /* DeclaredType */)) { + var annotationIncludesUndefined = strictNullChecks && + declaration.kind === 156 /* Parameter */ && + declaration.initializer && + getFalsyFlags(declaredType) & 32768 /* Undefined */ && + !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768 /* Undefined */); + popTypeResolution(); + return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; + } + else { + reportCircularityError(declaration.symbol); + return declaredType; + } } function isConstraintPosition(node) { var parent = node.parent; @@ -52470,8 +53398,13 @@ var ts; return !!ts.findAncestor(location, function (e) { return e.parent && ts.isExportAssignment(e.parent) && e.parent.expression === e && ts.isEntityNameExpression(e); }); } function markAliasReferenced(symbol, location) { - if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && ((compilerOptions.preserveConstEnums && isExportOrExportExpression(location)) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol)))) { - markAliasSymbolAsReferenced(symbol); + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol)) { + if (compilerOptions.preserveConstEnums && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + markAliasSymbolAsReferenced(symbol); + } + else { + markConstEnumAliasAsReferenced(symbol); + } } } function checkIdentifier(node) { @@ -52810,7 +53743,7 @@ var ts; break; case 159 /* PropertyDeclaration */: case 158 /* PropertySignature */: - if (ts.hasModifier(container, 32 /* Static */)) { + if (ts.hasModifier(container, 32 /* Static */) && !(compilerOptions.target === 99 /* ESNext */ && compilerOptions.useDefineForClassFields)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks } @@ -53216,7 +54149,7 @@ var ts; } // In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the // contextual type for 'this' is 'obj'. - var parent = func.parent; + var parent = ts.walkUpParenthesizedExpressions(func.parent); if (parent.kind === 209 /* BinaryExpression */ && parent.operatorToken.kind === 62 /* EqualsToken */) { var target = parent.left; if (ts.isAccessExpression(target)) { @@ -53235,7 +54168,7 @@ var ts; return undefined; } // Return contextual type of parameter or undefined if no contextual type is available - function getContextuallyTypedParameterType(parameter, forCache) { + function getContextuallyTypedParameterType(parameter) { var func = parameter.parent; if (!isContextSensitiveFunctionOrObjectLiteralMethod(func)) { return undefined; @@ -53258,19 +54191,6 @@ var ts; } var contextualSignature = getContextualSignature(func); if (contextualSignature) { - if (forCache) { - // Calling the below guarantees the types are primed and assigned in the same way - // as when the parameter is reached via `checkFunctionExpressionOrObjectLiteralMethod`. - // This should prevent any uninstantiated inference variables in the contextual signature - // from leaking, and should lock in cached parameter types via `assignContextualParameterTypes` - // which we will then immediately use the results of below. - contextuallyCheckFunctionExpressionOrObjectLiteralMethod(func); - var type = getTypeOfSymbol(getMergedSymbol(func.symbol)); - if (isTypeAny(type)) { - return type; - } - contextualSignature = getSignaturesOfType(type, 0 /* Call */)[0]; - } var index = func.parameters.indexOf(parameter) - (ts.getThisParameter(func) ? 1 : 0); return parameter.dotDotDotToken && ts.lastOrUndefined(func.parameters) === parameter ? getRestTypeAtPosition(contextualSignature, index) : @@ -53284,7 +54204,7 @@ var ts; } switch (declaration.kind) { case 156 /* Parameter */: - return getContextuallyTypedParameterType(declaration, /*forCache*/ false); + return getContextuallyTypedParameterType(declaration); case 191 /* BindingElement */: return getContextualTypeForBindingElement(declaration); // By default, do nothing and return undefined - only parameters and binding elements have context implied by a parent @@ -53401,18 +54321,15 @@ var ts; return undefined; } // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg, contextFlags) { + function getContextualTypeForArgument(callTarget, arg) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); // -1 for e.g. the expression of a CallExpression, or the tag of a TaggedTemplateExpression - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { // If we're already in the process of resolving the given signature, don't resolve again as // that could cause infinite recursion. Instead, return anySignature. var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); - if (contextFlags && contextFlags & 4 /* BaseConstraint */ && signature.target && !ts.hasTypeArguments(callTarget)) { - signature = getBaseSignature(signature.target); - } if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } @@ -53774,7 +54691,7 @@ var ts; } /* falls through */ case 197 /* NewExpression */: - return getContextualTypeForArgument(parent, node, contextFlags); + return getContextualTypeForArgument(parent, node); case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -53816,13 +54733,13 @@ var ts; return ancestor && ancestor.inferenceContext; } function getContextualJsxElementAttributesType(node, contextFlags) { - if (ts.isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== 4 /* BaseConstraint */) { + if (ts.isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== 4 /* Completions */) { // Contextually applied type is moved from attributes up to the outer jsx attributes so when walking up from the children they get hit // _However_ to hit them from the _attributes_ we must look for them here; otherwise we'll used the declared type // (as below) instead! return node.parent.contextualType; } - return getContextualTypeForArgumentAtIndex(node, 0, contextFlags); + return getContextualTypeForArgumentAtIndex(node, 0); } function getEffectiveFirstArgumentForJsxSignature(signature, node) { return getJsxReferenceKind(node) !== 0 /* Component */ @@ -54028,58 +54945,73 @@ var ts; function checkArrayLiteral(node, checkMode, forceTuple) { var elements = node.elements; var elementCount = elements.length; - var hasNonEndingSpreadElement = false; var elementTypes = []; - var inDestructuringPattern = ts.isAssignmentTarget(node); + var hasEndingSpreadElement = false; + var hasNonEndingSpreadElement = false; var contextualType = getApparentTypeOfContextualType(node); + var inDestructuringPattern = ts.isAssignmentTarget(node); var inConstContext = isConstContext(node); - for (var index = 0; index < elementCount; index++) { - var e = elements[index]; - if (inDestructuringPattern && e.kind === 213 /* SpreadElement */) { - // Given the following situation: - // var c: {}; - // [...c] = ["", 0]; - // - // c is represented in the tree as a spread element in an array literal. - // But c really functions as a rest element, and its purpose is to provide - // a contextual type for the right hand side of the assignment. Therefore, - // instead of calling checkExpression on "...c", which will give an error - // if c is not iterable/array-like, we need to act as if we are trying to - // get the contextual element type from it. So we do something similar to - // getContextualTypeForElementExpression, which will crucially not error - // if there is no index type / iterated type. - var restArrayType = checkExpression(e.expression, checkMode, forceTuple); - var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) || - getIteratedTypeOrElementType(65 /* Destructuring */, restArrayType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); - if (restElementType) { - elementTypes.push(restElementType); + for (var i = 0; i < elementCount; i++) { + var e = elements[i]; + var spread = e.kind === 213 /* SpreadElement */ && e.expression; + var spreadType = spread && checkExpression(spread, checkMode, forceTuple); + if (spreadType && isTupleType(spreadType)) { + elementTypes.push.apply(elementTypes, getTypeArguments(spreadType)); + if (spreadType.target.hasRestElement) { + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; } } else { - var elementContextualType = getContextualTypeForElementExpression(contextualType, index); - var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); - elementTypes.push(type); - } - if (index < elementCount - 1 && e.kind === 213 /* SpreadElement */) { - hasNonEndingSpreadElement = true; + if (inDestructuringPattern && spreadType) { + // Given the following situation: + // var c: {}; + // [...c] = ["", 0]; + // + // c is represented in the tree as a spread element in an array literal. + // But c really functions as a rest element, and its purpose is to provide + // a contextual type for the right hand side of the assignment. Therefore, + // instead of calling checkExpression on "...c", which will give an error + // if c is not iterable/array-like, we need to act as if we are trying to + // get the contextual element type from it. So we do something similar to + // getContextualTypeForElementExpression, which will crucially not error + // if there is no index type / iterated type. + var restElementType = getIndexTypeOfType(spreadType, 1 /* Number */) || + getIteratedTypeOrElementType(65 /* Destructuring */, spreadType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); + if (restElementType) { + elementTypes.push(restElementType); + } + } + else { + var elementContextualType = getContextualTypeForElementExpression(contextualType, elementTypes.length); + var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); + elementTypes.push(type); + } + if (spread) { // tuples are done above, so these are only arrays + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; + } } } if (!hasNonEndingSpreadElement) { - var hasRestElement = elementCount > 0 && elements[elementCount - 1].kind === 213 /* SpreadElement */; - var minLength = elementCount - (hasRestElement ? 1 : 0); + var minLength = elementTypes.length - (hasEndingSpreadElement ? 1 : 0); // If array literal is actually a destructuring pattern, mark it as an implied type. We do this such // that we get the same behavior for "var [x, y] = []" and "[x, y] = []". var tupleResult = void 0; if (inDestructuringPattern && minLength > 0) { - var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasRestElement)); + var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); type.pattern = node; return type; } - else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasRestElement, elementCount, inConstContext)) { + else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasEndingSpreadElement, elementTypes.length, inConstContext)) { return createArrayLiteralType(tupleResult); } else if (forceTuple) { - return createArrayLiteralType(createTupleType(elementTypes, minLength, hasRestElement)); + return createArrayLiteralType(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); } } return createArrayLiteralType(createArrayType(elementTypes.length ? @@ -54316,10 +55248,12 @@ var ts; } // If object literal is contextually typed by the implied type of a binding pattern, augment the result // type with those properties for which the binding pattern specifies a default value. - if (contextualTypeHasPattern) { + // If the object literal is spread into another object literal, skip this step and let the top-level object + // literal handle it instead. + if (contextualTypeHasPattern && node.parent.kind !== 283 /* SpreadAssignment */) { for (var _i = 0, _a = getPropertiesOfType(contextualType); _i < _a.length; _i++) { var prop = _a[_i]; - if (!propertiesTable.get(prop.escapedName) && !(spread && getPropertyOfType(spread, prop.escapedName))) { + if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } @@ -54370,6 +55304,7 @@ var ts; } function checkJsxSelfClosingElementDeferred(node) { checkJsxOpeningLikeElementOrOpeningFragment(node); + resolveUntypedCall(node); // ensure type arguments and parameters are typechecked, even if there is an arity error } function checkJsxSelfClosingElement(node, _checkMode) { checkNodeDeferred(node); @@ -54811,7 +55746,7 @@ var ts; // if jsx emit was not react as there wont be error being emitted reactSym.isReferenced = 67108863 /* All */; // If react symbol is alias, mark it as refereced - if (reactSym.flags & 2097152 /* Alias */) { + if (reactSym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(reactSym)) { markAliasSymbolAsReferenced(reactSym); } } @@ -54979,7 +55914,7 @@ var ts; return false; } var thisType = getTypeFromTypeNode(thisParameter.type); - enclosingClass = ((thisType.flags & 262144 /* TypeParameter */) ? getConstraintOfTypeParameter(thisType) : thisType); + enclosingClass = ((thisType.flags & 262144 /* TypeParameter */) ? getConstraintOfTypeParameter(thisType) : thisType).target; } // No further restrictions for static properties if (flags & 32 /* Static */) { @@ -55937,8 +56872,83 @@ var ts; // can be specified by users through attributes property. var paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); var attributesType = checkExpressionWithContextualType(node.attributes, paramType, /*inferenceContext*/ undefined, checkMode); - return checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, + return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, /*headMessage*/ undefined, containingMessageChain, errorOutputContainer); + function checkTagNameDoesNotExpectTooManyArguments() { + var _a; + var tagType = ts.isJsxOpeningElement(node) || ts.isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : undefined; + if (!tagType) { + return true; + } + var tagCallSignatures = getSignaturesOfType(tagType, 0 /* Call */); + if (!ts.length(tagCallSignatures)) { + return true; + } + var factory = getJsxFactoryEntity(node); + if (!factory) { + return true; + } + var factorySymbol = resolveEntityName(factory, 111551 /* Value */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, node); + if (!factorySymbol) { + return true; + } + var factoryType = getTypeOfSymbol(factorySymbol); + var callSignatures = getSignaturesOfType(factoryType, 0 /* Call */); + if (!ts.length(callSignatures)) { + return true; + } + var hasFirstParamSignatures = false; + var maxParamCount = 0; + // Check that _some_ first parameter expects a FC-like thing, and that some overload of the SFC expects an acceptable number of arguments + for (var _i = 0, callSignatures_1 = callSignatures; _i < callSignatures_1.length; _i++) { + var sig = callSignatures_1[_i]; + var firstparam = getTypeAtPosition(sig, 0); + var signaturesOfParam = getSignaturesOfType(firstparam, 0 /* Call */); + if (!ts.length(signaturesOfParam)) + continue; + for (var _b = 0, signaturesOfParam_1 = signaturesOfParam; _b < signaturesOfParam_1.length; _b++) { + var paramSig = signaturesOfParam_1[_b]; + hasFirstParamSignatures = true; + if (hasEffectiveRestParameter(paramSig)) { + return true; // some signature has a rest param, so function components can have an arbitrary number of arguments + } + var paramCount = getParameterCount(paramSig); + if (paramCount > maxParamCount) { + maxParamCount = paramCount; + } + } + } + if (!hasFirstParamSignatures) { + // Not a single signature had a first parameter which expected a signature - for back compat, and + // to guard against generic factories which won't have signatures directly, do not error + return true; + } + var absoluteMinArgCount = Infinity; + for (var _c = 0, tagCallSignatures_1 = tagCallSignatures; _c < tagCallSignatures_1.length; _c++) { + var tagSig = tagCallSignatures_1[_c]; + var tagRequiredArgCount = getMinArgumentCount(tagSig); + if (tagRequiredArgCount < absoluteMinArgCount) { + absoluteMinArgCount = tagRequiredArgCount; + } + } + if (absoluteMinArgCount <= maxParamCount) { + return true; // some signature accepts the number of arguments the function component provides + } + if (reportErrors) { + var diag = ts.createDiagnosticForNode(node.tagName, ts.Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, ts.entityNameToString(node.tagName), absoluteMinArgCount, ts.entityNameToString(factory), maxParamCount); + var tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) === null || _a === void 0 ? void 0 : _a.valueDeclaration; + if (tagNameDeclaration) { + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(tagNameDeclaration, ts.Diagnostics._0_is_declared_here, ts.entityNameToString(node.tagName))); + } + if (errorOutputContainer && errorOutputContainer.skipLogging) { + (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); + } + if (!errorOutputContainer.skipLogging) { + diagnostics.add(diag); + } + } + return false; + } } function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors, containingMessageChain) { var errorOutputContainer = { errors: undefined, skipLogging: true }; @@ -56419,7 +57429,7 @@ var ts; } } } - return produceDiagnostics || !args ? resolveErrorCall(node) : getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); + return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); function chooseOverload(candidates, relation, signatureHelpTrailingComma) { if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; } candidatesForArgumentError = undefined; @@ -56501,9 +57511,9 @@ var ts; } } // No signature was applicable. We have already reported the errors for the invalid signature. - // If this is a type resolution session, e.g. Language Service, try to get better information than anySignature. function getCandidateForOverloadFailure(node, candidates, args, hasCandidatesOutArray) { ts.Debug.assert(candidates.length > 0); // Else should not have called this. + checkNodeDeferred(node); // Normally we will combine overloads. Skip this if they have type parameters since that's hard to combine. // Don't do this if there is a `candidatesOutArray`, // because then we want the chosen best candidate to be one of the overloads, not a combination. @@ -56678,7 +57688,7 @@ var ts; if (node.arguments.length === 1) { var text = ts.getSourceFileOfNode(node).text; if (ts.isLineBreak(text.charCodeAt(ts.skipTrivia(text, node.expression.end, /* stopAfterLineBreak */ true) - 1))) { - relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.It_is_highly_likely_that_you_are_missing_a_semicolon); + relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.Are_you_missing_a_semicolon); } } invocationError(node.expression, apparentType, 0 /* Call */, relatedInformation); @@ -57567,15 +58577,15 @@ var ts; if (!parameter) { signature.thisParameter = createSymbolWithType(context.thisParameter, /*type*/ undefined); } - assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); + assignParameterType(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { - var contextualParameterType = getTypeAtPosition(context, i); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + var contextualParameterType = tryGetTypeAtPosition(context, i); + assignParameterType(parameter, contextualParameterType); } } if (signatureHasRestParameter(signature)) { @@ -57583,7 +58593,30 @@ var ts; var parameter = ts.last(signature.parameters); if (ts.isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { var contextualParameterType = getRestTypeAtPosition(context, len); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + assignParameterType(parameter, contextualParameterType); + } + } + } + function assignNonContextualParameterTypes(signature) { + if (signature.thisParameter) { + assignParameterType(signature.thisParameter); + } + for (var _i = 0, _a = signature.parameters; _i < _a.length; _i++) { + var parameter = _a[_i]; + assignParameterType(parameter); + } + } + function assignParameterType(parameter, type) { + var links = getSymbolLinks(parameter); + if (!links.type) { + var declaration = parameter.valueDeclaration; + links.type = type || getWidenedTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true); + if (declaration.name.kind !== 75 /* Identifier */) { + // if inference didn't come up with anything but unknown, fall back to the binding pattern if present. + if (links.type === unknownType) { + links.type = getTypeFromBindingPattern(declaration.name); + } + assignBindingElementTypes(declaration.name); } } } @@ -57602,20 +58635,6 @@ var ts; } } } - function assignTypeToParameterAndFixTypeParameters(parameter, contextualType) { - var links = getSymbolLinks(parameter); - if (!links.type) { - links.type = contextualType; - var decl = parameter.valueDeclaration; - if (decl.name.kind !== 75 /* Identifier */) { - // if inference didn't come up with anything but unknown, fall back to the binding pattern if present. - if (links.type === unknownType) { - links.type = getTypeFromBindingPattern(decl.name); - } - assignBindingElementTypes(decl.name); - } - } - } function createPromiseType(promisedType) { // creates a `Promise` type where `T` is the promisedType argument var globalPromiseType = getGlobalPromiseType(/*reportErrors*/ true); @@ -57977,7 +58996,7 @@ var ts; // The identityMapper object is used to indicate that function expressions are wildcards if (checkMode && checkMode & 4 /* SkipContextSensitive */ && isContextSensitive(node)) { // Skip parameters, return signature with return type that retains noncontextual parts so inferences can still be drawn in an early stage - if (!ts.getEffectiveReturnTypeNode(node) && hasContextSensitiveReturnExpression(node)) { + if (!ts.getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) { // Return plain anyFunctionType if there is no possibility we'll make inferences from the return type var contextualSignature = getContextualSignature(node); if (contextualSignature && couldContainTypeVariables(getReturnTypeOfSignature(contextualSignature))) { @@ -57999,12 +59018,8 @@ var ts; if (!hasGrammarError && node.kind === 201 /* FunctionExpression */) { checkGrammarForGenerator(node); } - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return type; - } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); - return type; + return getTypeOfSymbol(getSymbolOfNode(node)); } function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) { var links = getNodeLinks(node); @@ -58016,13 +59031,12 @@ var ts; // already assigned contextual types. if (!(links.flags & 1024 /* ContextChecked */)) { links.flags |= 1024 /* ContextChecked */; - if (contextualSignature) { - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return; - } - var signature = getSignaturesOfType(type, 0 /* Call */)[0]; - if (isContextSensitive(node)) { + var signature = ts.firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfNode(node)), 0 /* Call */)); + if (!signature) { + return; + } + if (isContextSensitive(node)) { + if (contextualSignature) { var inferenceContext = getInferenceContext(node); if (checkMode && checkMode & 2 /* Inferential */) { inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext); @@ -58031,11 +59045,15 @@ var ts; instantiateSignature(contextualSignature, inferenceContext.mapper) : contextualSignature; assignContextualParameterTypes(signature, instantiatedContextualSignature); } - if (!getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { - var returnType = getReturnTypeFromBody(node, checkMode); - if (!signature.resolvedReturnType) { - signature.resolvedReturnType = returnType; - } + else { + // Force resolution of all parameter types such that the absence of a contextual type is consistently reflected. + assignNonContextualParameterTypes(signature); + } + } + if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { + var returnType = getReturnTypeFromBody(node, checkMode); + if (!signature.resolvedReturnType) { + signature.resolvedReturnType = returnType; } } checkSignatureDeclaration(node); @@ -58351,7 +59369,7 @@ var ts; // Return true if type might be of the given kind. A union or intersection type might be of a given // kind if at least one constituent type is of the given kind. function maybeTypeOfKind(type, kind) { - if (type.flags & kind & ~131072 /* GenericMappedType */ || kind & 131072 /* GenericMappedType */ && isGenericMappedType(type)) { + if (type.flags & kind) { return true; } if (type.flags & 3145728 /* UnionOrIntersection */) { @@ -58648,12 +59666,81 @@ var ts; function isTypeEqualityComparableTo(source, target) { return (target.flags & 98304 /* Nullable */) !== 0 || isTypeComparableTo(source, target); } + var CheckBinaryExpressionState; + (function (CheckBinaryExpressionState) { + CheckBinaryExpressionState[CheckBinaryExpressionState["MaybeCheckLeft"] = 0] = "MaybeCheckLeft"; + CheckBinaryExpressionState[CheckBinaryExpressionState["CheckRight"] = 1] = "CheckRight"; + CheckBinaryExpressionState[CheckBinaryExpressionState["FinishCheck"] = 2] = "FinishCheck"; + })(CheckBinaryExpressionState || (CheckBinaryExpressionState = {})); function checkBinaryExpression(node, checkMode) { - if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { - return checkExpression(node.right, checkMode); + var workStacks = { + expr: [node], + state: [0 /* MaybeCheckLeft */], + leftType: [undefined] + }; + var stackIndex = 0; + var lastResult; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0 /* MaybeCheckLeft */: { + if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { + finishInvocation(checkExpression(node.right, checkMode)); + break; + } + checkGrammarNullishCoalesceWithLogicalExpression(node); + var operator = node.operatorToken.kind; + if (operator === 62 /* EqualsToken */ && (node.left.kind === 193 /* ObjectLiteralExpression */ || node.left.kind === 192 /* ArrayLiteralExpression */)) { + finishInvocation(checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 104 /* ThisKeyword */)); + break; + } + advanceState(1 /* CheckRight */); + maybeCheckExpression(node.left); + break; + } + case 1 /* CheckRight */: { + var leftType = lastResult; + workStacks.leftType[stackIndex] = leftType; + var operator = node.operatorToken.kind; + if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { + checkTruthinessOfType(leftType, node.left); + } + advanceState(2 /* FinishCheck */); + maybeCheckExpression(node.right); + break; + } + case 2 /* FinishCheck */: { + var leftType = workStacks.leftType[stackIndex]; + var rightType = lastResult; + finishInvocation(checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node)); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for checkBinaryExpression"); + } + } + return lastResult; + function finishInvocation(result) { + lastResult = result; + stackIndex--; + } + /** + * Note that `advanceState` sets the _current_ head state, and that `maybeCheckExpression` potentially pushes on a new + * head state; so `advanceState` must be called before any `maybeCheckExpression` during a state's execution. + */ + function advanceState(nextState) { + workStacks.state[stackIndex] = nextState; + } + function maybeCheckExpression(node) { + if (ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0 /* MaybeCheckLeft */; + workStacks.leftType[stackIndex] = undefined; + } + else { + lastResult = checkExpression(node, checkMode); + } } - checkGrammarNullishCoalesceWithLogicalExpression(node); - return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, checkMode, node); } function checkGrammarNullishCoalesceWithLogicalExpression(node) { var left = node.left, operatorToken = node.operatorToken, right = node.right; @@ -58666,6 +59753,8 @@ var ts; } } } + // Note that this and `checkBinaryExpression` above should behave mostly the same, except this elides some + // expression-wide checks and does not use a work stack to fold nested binary expressions into the same callstack frame function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { var operator = operatorToken.kind; if (operator === 62 /* EqualsToken */ && (left.kind === 193 /* ObjectLiteralExpression */ || left.kind === 192 /* ArrayLiteralExpression */)) { @@ -58679,6 +59768,10 @@ var ts; leftType = checkExpression(left, checkMode); } var rightType = checkExpression(right, checkMode); + return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode); + } + function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode) { + var operator = operatorToken.kind; switch (operator) { case 41 /* AsteriskToken */: case 42 /* AsteriskAsteriskToken */: @@ -59049,7 +60142,8 @@ var ts; return getContextualIterationType(2 /* Next */, func) || anyType; } function checkConditionalExpression(node, checkMode) { - checkTruthinessExpression(node.condition); + var type = checkTruthinessExpression(node.condition); + checkTestingKnownTruthyCallableType(node.condition, node.whenTrue, type); var type1 = checkExpression(node.whenTrue, checkMode); var type2 = checkExpression(node.whenFalse, checkMode); return getUnionType([type1, type2], 2 /* Subtype */); @@ -59077,17 +60171,24 @@ var ts; var context = getContextNode(node); var saveContextualType = context.contextualType; var saveInferenceContext = context.inferenceContext; - context.contextualType = contextualType; - context.inferenceContext = inferenceContext; - var type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0)); - // We strip literal freshness when an appropriate contextual type is present such that contextually typed - // literals always preserve their literal types (otherwise they might widen during type inference). An alternative - // here would be to not mark contextually typed literals as fresh in the first place. - var result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? - getRegularTypeOfLiteralType(type) : type; - context.contextualType = saveContextualType; - context.inferenceContext = saveInferenceContext; - return result; + try { + context.contextualType = contextualType; + context.inferenceContext = inferenceContext; + var type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0)); + // We strip literal freshness when an appropriate contextual type is present such that contextually typed + // literals always preserve their literal types (otherwise they might widen during type inference). An alternative + // here would be to not mark contextually typed literals as fresh in the first place. + var result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? + getRegularTypeOfLiteralType(type) : type; + return result; + } + finally { + // In the event our operation is canceled or some other exception occurs, reset the contextual type + // so that we do not accidentally hold onto an instance of the checker, as a Type created in the services layer + // may hold onto the checker that created it. + context.contextualType = saveContextualType; + context.inferenceContext = saveInferenceContext; + } } function checkExpressionCached(node, checkMode) { var links = getNodeLinks(node); @@ -59409,9 +60510,16 @@ var ts; } var saveContextualType = node.contextualType; node.contextualType = anyType; - var type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */); - node.contextualType = saveContextualType; - return type; + try { + var type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */); + return type; + } + finally { + // In the event our operation is canceled or some other exception occurs, reset the contextual type + // so that we do not accidentally hold onto an instance of the checker, as a Type created in the services layer + // may hold onto the checker that created it. + node.contextualType = saveContextualType; + } } function checkExpression(node, checkMode, forceTuple) { var saveCurrentNode = currentNode; @@ -60273,7 +61381,7 @@ var ts; getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return ts.hasModifier(node, 8 /* Private */) && !!(node.flags & 8388608 /* Ambient */); + return (ts.hasModifier(node, 8 /* Private */) || ts.isPrivateIdentifierPropertyDeclaration(node)) && !!(node.flags & 8388608 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedModifierFlags(n); @@ -60566,9 +61674,9 @@ var ts; case 247 /* TypeAliasDeclaration */: // A jsdoc typedef and callback are, by definition, type aliases. // falls through - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return 2 /* ExportType */; case 249 /* ModuleDeclaration */: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ @@ -60576,6 +61684,7 @@ var ts; : 4 /* ExportNamespace */; case 245 /* ClassDeclaration */: case 248 /* EnumDeclaration */: + case 284 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; case 290 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; @@ -60590,10 +61699,10 @@ var ts; case 253 /* ImportEqualsDeclaration */: case 256 /* NamespaceImport */: case 255 /* ImportClause */: - var result_7 = 0 /* None */; + var result_8 = 0 /* None */; var target = resolveAlias(getSymbolOfNode(d)); - ts.forEach(target.declarations, function (d) { result_7 |= getDeclarationSpaces(d); }); - return result_7; + ts.forEach(target.declarations, function (d) { result_8 |= getDeclarationSpaces(d); }); + return result_8; case 242 /* VariableDeclaration */: case 191 /* BindingElement */: case 244 /* FunctionDeclaration */: @@ -60916,7 +62025,8 @@ var ts; if (rootSymbol && rootSymbol.flags & 2097152 /* Alias */ && symbolIsValue(rootSymbol) - && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol))) { + && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol)) + && !getTypeOnlyAliasDeclaration(rootSymbol)) { markAliasSymbolAsReferenced(rootSymbol); } } @@ -61110,6 +62220,13 @@ var ts; } checkSignatureDeclaration(node); } + function checkJSDocImplementsTag(node) { + var classLike = ts.getJSDocHost(node); + if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { + error(classLike, ts.Diagnostics.JSDoc_0_is_not_attached_to_a_class, ts.idText(node.tagName)); + return; + } + } function checkJSDocAugmentsTag(node) { var classLike = ts.getJSDocHost(node); if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { @@ -61282,7 +62399,9 @@ var ts; break; } var symbol = getSymbolOfNode(member); - if (!symbol.isReferenced && (ts.hasModifier(member, 8 /* Private */) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name))) { + if (!symbol.isReferenced + && (ts.hasModifier(member, 8 /* Private */) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name)) + && !(member.flags & 8388608 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, ts.createDiagnosticForNode(member.name, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; @@ -61847,21 +62966,21 @@ var ts; // Grammar checking checkGrammarStatementInAmbientContext(node); var type = checkTruthinessExpression(node.expression); - checkTestingKnownTruthyCallableType(node, type); + checkTestingKnownTruthyCallableType(node.expression, node.thenStatement, type); checkSourceElement(node.thenStatement); if (node.thenStatement.kind === 224 /* EmptyStatement */) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); } - function checkTestingKnownTruthyCallableType(ifStatement, type) { + function checkTestingKnownTruthyCallableType(condExpr, body, type) { if (!strictNullChecks) { return; } - var testedNode = ts.isIdentifier(ifStatement.expression) - ? ifStatement.expression - : ts.isPropertyAccessExpression(ifStatement.expression) - ? ifStatement.expression.name + var testedNode = ts.isIdentifier(condExpr) + ? condExpr + : ts.isPropertyAccessExpression(condExpr) + ? condExpr.name : undefined; if (!testedNode) { return; @@ -61883,7 +63002,7 @@ var ts; if (!testedFunctionSymbol) { return; } - var functionIsUsedInBody = ts.forEachChild(ifStatement.thenStatement, function check(childNode) { + var functionIsUsedInBody = ts.forEachChild(body, function check(childNode) { if (ts.isIdentifier(childNode)) { var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol.id === testedFunctionSymbol.id) { @@ -61893,7 +63012,7 @@ var ts; return ts.forEachChild(childNode, check); }); if (!functionIsUsedInBody) { - error(ifStatement.expression, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); + error(condExpr, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); } } function checkDoStatement(node) { @@ -61908,13 +63027,15 @@ var ts; checkTruthinessExpression(node.expression); checkSourceElement(node.statement); } - function checkTruthinessExpression(node, checkMode) { - var type = checkExpression(node, checkMode); + function checkTruthinessOfType(type, node) { if (type.flags & 16384 /* Void */) { error(node, ts.Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); } return type; } + function checkTruthinessExpression(node, checkMode) { + return checkTruthinessOfType(checkExpression(node, checkMode), node); + } function checkForStatement(node) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { @@ -62214,6 +63335,12 @@ var ts; } return noIterationTypes; } + function getCachedIterationTypes(type, cacheKey) { + return type[cacheKey]; + } + function setCachedIterationTypes(type, cacheKey, cachedTypes) { + return type[cacheKey] = cachedTypes; + } /** * Gets the *yield*, *return*, and *next* types from an `Iterable`-like or `AsyncIterable`-like type. * @@ -62250,7 +63377,7 @@ var ts; return iterationTypes_1; } var cacheKey = use & 2 /* AllowsAsyncIterablesFlag */ ? "iterationTypesOfAsyncIterable" : "iterationTypesOfIterable"; - var cachedTypes = type[cacheKey]; + var cachedTypes = getCachedIterationTypes(type, cacheKey); if (cachedTypes) return cachedTypes === noIterationTypes ? undefined : cachedTypes; var allIterationTypes; @@ -62268,7 +63395,7 @@ var ts; } } var iterationTypes = allIterationTypes ? combineIterationTypes(allIterationTypes) : noIterationTypes; - type[cacheKey] = iterationTypes; + setCachedIterationTypes(type, cacheKey, iterationTypes); return iterationTypes === noIterationTypes ? undefined : iterationTypes; } function getAsyncFromSyncIterationTypes(iterationTypes, errorNode) { @@ -62307,7 +63434,7 @@ var ts; if (use & 2 /* AllowsAsyncIterablesFlag */) { // for a sync iterable in an async context, only use the cached types if they are valid. if (iterationTypes !== noIterationTypes) { - return type.iterationTypesOfAsyncIterable = getAsyncFromSyncIterationTypes(iterationTypes, errorNode); + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", getAsyncFromSyncIterationTypes(iterationTypes, errorNode)); } } else { @@ -62325,9 +63452,9 @@ var ts; var iterationTypes = getIterationTypesOfIterableSlow(type, syncIterationTypesResolver, errorNode); if (iterationTypes !== noIterationTypes) { if (use & 2 /* AllowsAsyncIterablesFlag */) { - return type.iterationTypesOfAsyncIterable = iterationTypes + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", iterationTypes ? getAsyncFromSyncIterationTypes(iterationTypes, errorNode) - : noIterationTypes; + : noIterationTypes); } else { return iterationTypes; @@ -62344,7 +63471,7 @@ var ts; * `getIterationTypesOfIterable` instead. */ function getIterationTypesOfIterableCached(type, resolver) { - return type[resolver.iterableCacheKey]; + return getCachedIterationTypes(type, resolver.iterableCacheKey); } function getIterationTypesOfGlobalIterableType(globalType, resolver) { var globalIterationTypes = getIterationTypesOfIterableCached(globalType, resolver) || @@ -62377,14 +63504,14 @@ var ts; // While we define these as `any` and `undefined` in our libs by default, a custom lib *could* use // different definitions. var _a = getIterationTypesOfGlobalIterableType(globalType, resolver), returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } // As an optimization, if the type is an instantiation of the following global type, then // just grab its related type arguments: // - `Generator` or `AsyncGenerator` if (isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } /** @@ -62398,18 +63525,19 @@ var ts; * `getIterationTypesOfIterable` instead. */ function getIterationTypesOfIterableSlow(type, resolver, errorNode) { + var _a; var method = getPropertyOfType(type, ts.getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName)); var methodType = method && !(method.flags & 16777216 /* Optional */) ? getTypeOfSymbol(method) : undefined; if (isTypeAny(methodType)) { - return type[resolver.iterableCacheKey] = anyIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes); } var signatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : undefined; if (!ts.some(signatures)) { - return type[resolver.iterableCacheKey] = noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes); } var iteratorType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), 2 /* Subtype */); - var iterationTypes = getIterationTypesOfIterator(iteratorType, resolver, errorNode) || noIterationTypes; - return type[resolver.iterableCacheKey] = iterationTypes; + var iterationTypes = (_a = getIterationTypesOfIterator(iteratorType, resolver, errorNode)) !== null && _a !== void 0 ? _a : noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes); } function reportTypeNotIterableError(errorNode, type, allowAsyncIterables) { var message = allowAsyncIterables @@ -62440,7 +63568,7 @@ var ts; * `getIterationTypesOfIterator` instead. */ function getIterationTypesOfIteratorCached(type, resolver) { - return type[resolver.iteratorCacheKey]; + return getCachedIterationTypes(type, resolver.iteratorCacheKey); } /** * Gets the iteration types of an `Iterator`-like or `AsyncIterator`-like type from the @@ -62469,12 +63597,12 @@ var ts; var globalIterationTypes = getIterationTypesOfIteratorCached(globalType, resolver) || getIterationTypesOfIteratorSlow(globalType, resolver, /*errorNode*/ undefined); var _a = globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes, returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } if (isReferenceToType(type, resolver.getGlobalIteratorType(/*reportErrors*/ false)) || isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } function isIteratorResult(type, kind) { @@ -62502,7 +63630,7 @@ var ts; if (isTypeAny(type)) { return anyIterationTypes; } - var cachedTypes = type.iterationTypesOfIteratorResult; + var cachedTypes = getCachedIterationTypes(type, "iterationTypesOfIteratorResult"); if (cachedTypes) { return cachedTypes; } @@ -62510,11 +63638,11 @@ var ts; // or `IteratorReturnResult` types, then just grab its type argument. if (isReferenceToType(type, getGlobalIteratorYieldResultType(/*reportErrors*/ false))) { var yieldType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType_1, /*returnType*/ undefined, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType_1, /*returnType*/ undefined, /*nextType*/ undefined)); } if (isReferenceToType(type, getGlobalIteratorReturnResultType(/*reportErrors*/ false))) { var returnType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(/*yieldType*/ undefined, returnType_1, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(/*yieldType*/ undefined, returnType_1, /*nextType*/ undefined)); } // Choose any constituents that can produce the requested iteration type. var yieldIteratorResult = filterType(type, isYieldIteratorResult); @@ -62522,13 +63650,13 @@ var ts; var returnIteratorResult = filterType(type, isReturnIteratorResult); var returnType = returnIteratorResult !== neverType ? getTypeOfPropertyOfType(returnIteratorResult, "value") : undefined; if (!yieldType && !returnType) { - return type.iterationTypesOfIteratorResult = noIterationTypes; + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", noIterationTypes); } // From https://tc39.github.io/ecma262/#sec-iteratorresult-interface // > ... If the iterator does not have a return value, `value` is `undefined`. In that case, the // > `value` property may be absent from the conforming object if it does not inherit an explicit // > `value` property. - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType, returnType || voidType, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType, returnType || voidType, /*nextType*/ undefined)); } /** * Gets the *yield*, *return*, and *next* types of a the `next()`, `return()`, or @@ -62621,7 +63749,7 @@ var ts; getIterationTypesOfMethod(type, resolver, "return", errorNode), getIterationTypesOfMethod(type, resolver, "throw", errorNode), ]); - return type[resolver.iteratorCacheKey] = iterationTypes; + return setCachedIterationTypes(type, resolver.iteratorCacheKey, iterationTypes); } /** * Gets the requested "iteration type" from a type that is either `Iterable`-like, `Iterator`-like, @@ -63015,7 +64143,7 @@ var ts; var sourceConstraint = constraint && getTypeFromTypeNode(constraint); var targetConstraint = getConstraintOfTypeParameter(target); // relax check if later interface augmentation has no constraint, it's more broad and is OK to merge with - // a more constrained interface (this could be generalized to a full heirarchy check, but that's maybe overkill) + // a more constrained interface (this could be generalized to a full hierarchy check, but that's maybe overkill) if (sourceConstraint && targetConstraint && !isTypeIdenticalTo(sourceConstraint, targetConstraint)) { return false; } @@ -63119,7 +64247,7 @@ var ts; checkKindsOfPropertyMemberOverrides(type, baseType_1); } } - var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(node); + var implementedTypeNodes = ts.getEffectiveImplementsTypeNodes(node); if (implementedTypeNodes) { for (var _b = 0, implementedTypeNodes_1 = implementedTypeNodes; _b < implementedTypeNodes_1.length; _b++) { var typeRefNode = implementedTypeNodes_1[_b]; @@ -63444,6 +64572,7 @@ var ts; // Grammar checking checkGrammarDecoratorsAndModifiers(node); checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_alias_name_cannot_be_0); + checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); checkSourceElement(node.type); registerForUnusedIdentifiersCheck(node); @@ -63988,6 +65117,9 @@ var ts; if (!checkGrammarDecoratorsAndModifiers(node) && ts.hasModifiers(node)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); } + if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0 /* ES3 */) { + checkExternalEmitHelpers(node, 1048576 /* CreateBinding */); + } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { // export { x, y } @@ -64025,16 +65157,14 @@ var ts; return !isInAppropriateContext; } function importClauseContainsReferencedImport(importClause) { - return importClause.name && isReferenced(importClause) - || importClause.namedBindings && namedBindingsContainsReferencedImport(importClause.namedBindings); - function isReferenced(declaration) { - return !!getMergedSymbol(getSymbolOfNode(declaration)).isReferenced; - } - function namedBindingsContainsReferencedImport(namedBindings) { - return ts.isNamespaceImport(namedBindings) - ? isReferenced(namedBindings) - : ts.some(namedBindings.elements, isReferenced); - } + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolOfNode(declaration).isReferenced; + }); + } + function importClauseContainsConstEnumUsedAsValue(importClause) { + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolLinks(getSymbolOfNode(declaration)).constEnumReferenced; + }); } function checkImportsForTypeOnlyConversion(sourceFile) { for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { @@ -64043,11 +65173,9 @@ var ts; statement.importClause && !statement.importClause.isTypeOnly && importClauseContainsReferencedImport(statement.importClause) && - !isReferencedAliasDeclaration(statement.importClause, /*checkChildren*/ true)) { - var isError = compilerOptions.importsNotUsedAsValues === 2 /* Error */; - errorOrSuggestion(isError, statement, isError - ? ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error - : ts.Diagnostics.This_import_may_be_converted_to_a_type_only_import); + !isReferencedAliasDeclaration(statement.importClause, /*checkChildren*/ true) && + !importClauseContainsConstEnumUsedAsValue(statement.importClause)) { + error(statement, ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error); } } } @@ -64257,15 +65385,17 @@ var ts; return checkImportType(node); case 307 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 308 /* JSDocImplementsTag */: + return checkJSDocImplementsTag(node); + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: return checkJSDocParameterTag(node); case 300 /* JSDocFunctionType */: checkJSDocFunctionType(node); @@ -64444,6 +65574,16 @@ var ts; currentNode = node; instantiationCount = 0; switch (node.kind) { + case 196 /* CallExpression */: + case 197 /* NewExpression */: + case 198 /* TaggedTemplateExpression */: + case 157 /* Decorator */: + case 268 /* JsxOpeningElement */: + // These node kinds are deferred checked when overload resolution fails + // To save on work, we ensure the arguments are checked just once, in + // a deferred way + resolveUntypedCall(node); + break; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 161 /* MethodDeclaration */: @@ -64513,7 +65653,9 @@ var ts; } }); } - if (!node.isDeclarationFile && ts.isExternalModule(node)) { + if (compilerOptions.importsNotUsedAsValues === 2 /* Error */ && + !node.isDeclarationFile && + ts.isExternalModule(node)) { checkImportsForTypeOnlyConversion(node); } if (ts.isExternalOrCommonJsModule(node)) { @@ -64827,10 +65969,10 @@ var ts; return entityNameSymbol; } } - if (name.parent.kind === 316 /* JSDocParameterTag */) { + if (name.parent.kind === 317 /* JSDocParameterTag */) { return ts.getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 155 /* TypeParameter */ && name.parent.parent.kind === 320 /* JSDocTemplateTag */) { + if (name.parent.kind === 155 /* TypeParameter */ && name.parent.parent.kind === 321 /* JSDocTemplateTag */) { ts.Debug.assert(!ts.isInJSFile(name)); // Otherwise `isDeclarationName` would have been true. var typeParameter = ts.getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -64871,7 +66013,7 @@ var ts; // Do we want to return undefined here? return undefined; } - function getSymbolAtLocation(node) { + function getSymbolAtLocation(node, ignoreErrors) { if (node.kind === 290 /* SourceFile */) { return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } @@ -64944,7 +66086,7 @@ var ts; ((node.parent.kind === 254 /* ImportDeclaration */ || node.parent.kind === 260 /* ExportDeclaration */) && node.parent.moduleSpecifier === node) || ((ts.isInJSFile(node) && ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteralLike*/ false)) || ts.isImportCall(node.parent)) || (ts.isLiteralTypeNode(node.parent) && ts.isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent)) { - return resolveExternalModuleName(node, node); + return resolveExternalModuleName(node, node, ignoreErrors); } if (ts.isCallExpression(parent) && ts.isBindableObjectDefinePropertyCall(parent) && parent.arguments[1] === node) { return getSymbolOfNode(parent); @@ -64964,9 +66106,9 @@ var ts; case 80 /* ClassKeyword */: return getSymbolOfNode(node.parent); case 188 /* ImportType */: - return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal) : undefined; + return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : undefined; case 89 /* ExportKeyword */: - return ts.isExportAssignment(node.parent) ? ts.Debug.assertDefined(node.parent.symbol) : undefined; + return ts.isExportAssignment(node.parent) ? ts.Debug.checkDefined(node.parent.symbol) : undefined; default: return undefined; } @@ -65020,7 +66162,7 @@ var ts; if (isDeclarationNameOrImportPropertyName(node)) { var symbol = getSymbolAtLocation(node); if (symbol) { - return ts.isTypeOnlyImportOrExportName(node) ? getDeclaredTypeOfSymbol(symbol) : getTypeOfSymbol(symbol); + return getTypeOfSymbol(symbol); } return errorType; } @@ -65239,7 +66381,7 @@ var ts; var symbol = getReferencedValueSymbol(node); // We should only get the declaration of an alias if there isn't a local value // declaration for the symbol - if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */)) { + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !getTypeOnlyAliasDeclaration(symbol)) { return getDeclarationOfAliasSymbol(symbol); } } @@ -65320,11 +66462,13 @@ var ts; function isValueAliasDeclaration(node) { switch (node.kind) { case 253 /* ImportEqualsDeclaration */: + return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); case 255 /* ImportClause */: case 256 /* NamespaceImport */: case 258 /* ImportSpecifier */: case 263 /* ExportSpecifier */: - return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); + var symbol = getSymbolOfNode(node) || unknownSymbol; + return isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol); case 260 /* ExportDeclaration */: var exportClause = node.exportClause; return !!exportClause && (ts.isNamespaceExport(exportClause) || @@ -65359,14 +66503,15 @@ var ts; return isConstEnumSymbol(s) || !!s.constEnumOnlyModule; } function isReferencedAliasDeclaration(node, checkChildren) { - if (ts.isAliasSymbolDeclaration(node)) { + if (isAliasSymbolDeclaration(node)) { var symbol = getSymbolOfNode(node); if (symbol && getSymbolLinks(symbol).referenced) { return true; } var target = getSymbolLinks(symbol).target; // TODO: GH#18217 if (target && ts.getModifierFlags(node) & 1 /* Export */ && - target.flags & 111551 /* Value */ && (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { + target.flags & 111551 /* Value */ && + (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { // An `export import ... =` of a value symbol is always considered referenced return true; } @@ -65610,6 +66755,9 @@ var ts; var type = getTypeOfSymbol(getSymbolOfNode(node)); return literalTypeToNode(type, node, tracker); } + function getJsxFactoryEntity(location) { + return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; + } function createResolver() { // this variable and functions that use it are deliberately moved here from the outer scope // to avoid scope pollution @@ -65680,7 +66828,7 @@ var ts; var symbol = node && getSymbolOfNode(node); return !!(symbol && ts.getCheckFlags(symbol) & 4096 /* Late */); }, - getJsxFactoryEntity: function (location) { return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; }, + getJsxFactoryEntity: getJsxFactoryEntity, getAllAccessorDeclarations: function (accessor) { accessor = ts.getParseTreeNode(accessor, ts.isGetOrSetAccessorDeclaration); // TODO: GH#18217 var otherKind = accessor.kind === 164 /* SetAccessor */ ? 163 /* GetAccessor */ : 164 /* SetAccessor */; @@ -65946,7 +67094,7 @@ var ts; var helpersModule = resolveHelpersModule(sourceFile, location); if (helpersModule !== unknownSymbol) { var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (var helper = 1 /* FirstEmitHelper */; helper <= 524288 /* LastEmitHelper */; helper <<= 1) { + for (var helper = 1 /* FirstEmitHelper */; helper <= 1048576 /* LastEmitHelper */; helper <<= 1) { if (uncheckedHelpers & helper) { var name = getHelperName(helper); var symbol = getSymbol(helpersModule.exports, ts.escapeLeadingUnderscores(name), 111551 /* Value */); @@ -65982,6 +67130,7 @@ var ts; case 131072 /* MakeTemplateObject */: return "__makeTemplateObject"; case 262144 /* ClassPrivateFieldGet */: return "__classPrivateFieldGet"; case 524288 /* ClassPrivateFieldSet */: return "__classPrivateFieldSet"; + case 1048576 /* CreateBinding */: return "__createBinding"; default: return ts.Debug.fail("Unrecognized helper"); } } @@ -66065,6 +67214,9 @@ var ts; return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract"); } } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + } flags |= ts.modifierToFlag(modifier.kind); break; case 120 /* StaticKeyword */: @@ -66147,6 +67299,9 @@ var ts; else if ((node.parent.flags & 8388608 /* Ambient */) && node.parent.kind === 250 /* ModuleBlock */) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); + } flags |= 2 /* Ambient */; lastDeclare = modifier; break; @@ -66172,7 +67327,7 @@ var ts; } } if (ts.isNamedDeclaration(node) && node.name.kind === 76 /* PrivateIdentifier */) { - return grammarErrorOnNode(node, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); } flags |= 128 /* Abstract */; break; @@ -66215,9 +67370,6 @@ var ts; else if (node.kind === 156 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } - else if (ts.isNamedDeclaration(node) && (flags & 28 /* AccessibilityModifier */) && node.name.kind === 76 /* PrivateIdentifier */) { - return grammarErrorOnNode(node, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); - } if (flags & 256 /* Async */) { return checkGrammarAsyncModifier(node, lastAsync); } @@ -66750,7 +67902,7 @@ var ts; if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } - var parameter = ts.Debug.assertDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); + var parameter = ts.Debug.checkDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); } @@ -67209,10 +68361,10 @@ var ts; // this has already been reported, and don't report if it has. // if (node.parent.kind === 223 /* Block */ || node.parent.kind === 250 /* ModuleBlock */ || node.parent.kind === 290 /* SourceFile */) { - var links_1 = getNodeLinks(node.parent); + var links_2 = getNodeLinks(node.parent); // Check if the containing block ever report this error - if (!links_1.hasReportedStatementInAmbientContext) { - return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); + if (!links_2.hasReportedStatementInAmbientContext) { + return links_2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); } } else { @@ -67648,6 +68800,9 @@ var ts; ts.getGeneratedNameForNode = getGeneratedNameForNode; // Private Identifiers function createPrivateIdentifier(text) { + if (text[0] !== "#") { + ts.Debug.fail("First character of private identifier must be #: " + text); + } var node = createSynthesizedNode(76 /* PrivateIdentifier */); node.escapedText = ts.escapeLeadingUnderscores(text); return node; @@ -68768,7 +69923,7 @@ var ts; } var token = rawTextScanner.scan(); if (token === 23 /* CloseBracketToken */) { - token = rawTextScanner.reScanTemplateToken(); + token = rawTextScanner.reScanTemplateToken(/* isTaggedTemplate */ false); } if (rawTextScanner.isUnterminated()) { rawTextScanner.setText(undefined); @@ -69619,7 +70774,7 @@ var ts; ts.createJSDocTypeExpression = createJSDocTypeExpression; /* @internal */ function createJSDocTypeTag(typeExpression, comment) { - var tag = createJSDocTag(319 /* JSDocTypeTag */, "type"); + var tag = createJSDocTag(320 /* JSDocTypeTag */, "type"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; @@ -69627,7 +70782,7 @@ var ts; ts.createJSDocTypeTag = createJSDocTypeTag; /* @internal */ function createJSDocReturnTag(typeExpression, comment) { - var tag = createJSDocTag(317 /* JSDocReturnTag */, "returns"); + var tag = createJSDocTag(318 /* JSDocReturnTag */, "returns"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; @@ -69635,14 +70790,14 @@ var ts; ts.createJSDocReturnTag = createJSDocReturnTag; /** @internal */ function createJSDocThisTag(typeExpression) { - var tag = createJSDocTag(318 /* JSDocThisTag */, "this"); + var tag = createJSDocTag(319 /* JSDocThisTag */, "this"); tag.typeExpression = typeExpression; return tag; } ts.createJSDocThisTag = createJSDocThisTag; /* @internal */ function createJSDocParamTag(name, isBracketed, typeExpression, comment) { - var tag = createJSDocTag(316 /* JSDocParameterTag */, "param"); + var tag = createJSDocTag(317 /* JSDocParameterTag */, "param"); tag.typeExpression = typeExpression; tag.name = name; tag.isBracketed = isBracketed; @@ -70017,7 +71172,7 @@ var ts; * @param original The original statement. */ function createNotEmittedStatement(original) { - var node = createSynthesizedNode(324 /* NotEmittedStatement */); + var node = createSynthesizedNode(325 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; @@ -70029,7 +71184,7 @@ var ts; */ /* @internal */ function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(328 /* EndOfDeclarationMarker */); + var node = createSynthesizedNode(329 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -70041,7 +71196,7 @@ var ts; */ /* @internal */ function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(327 /* MergeDeclarationMarker */); + var node = createSynthesizedNode(328 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -70056,7 +71211,7 @@ var ts; * @param location The location for the expression. Defaults to the positions from "original" if provided. */ function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(325 /* PartiallyEmittedExpression */); + var node = createSynthesizedNode(326 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; setTextRange(node, original); @@ -70072,7 +71227,7 @@ var ts; ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function flattenCommaElements(node) { if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) { - if (node.kind === 326 /* CommaListExpression */) { + if (node.kind === 327 /* CommaListExpression */) { return node.elements; } if (ts.isBinaryExpression(node) && node.operatorToken.kind === 27 /* CommaToken */) { @@ -70082,7 +71237,7 @@ var ts; return node; } function createCommaList(elements) { - var node = createSynthesizedNode(326 /* CommaListExpression */); + var node = createSynthesizedNode(327 /* CommaListExpression */); node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements)); return node; } @@ -70095,7 +71250,7 @@ var ts; ts.updateCommaList = updateCommaList; /* @internal */ function createSyntheticReferenceExpression(expression, thisArg) { - var node = createSynthesizedNode(329 /* SyntheticReferenceExpression */); + var node = createSynthesizedNode(330 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; return node; @@ -70141,6 +71296,8 @@ var ts; ts.importDefaultHelper, ts.classPrivateFieldGetHelper, ts.classPrivateFieldSetHelper, + ts.createBindingHelper, + ts.setModuleDefaultHelper ], function (helper) { return helper.name; })); } function createUnparsedSource() { @@ -70169,7 +71326,7 @@ var ts; stripInternal = mapTextOrStripInternal; bundleFileInfo = mapPathOrType === "js" ? textOrInputFiles.buildInfo.bundle.js : textOrInputFiles.buildInfo.bundle.dts; if (node.oldFileOfCurrentEmit) { - parseOldFileOfCurrentEmit(node, ts.Debug.assertDefined(bundleFileInfo)); + parseOldFileOfCurrentEmit(node, ts.Debug.checkDefined(bundleFileInfo)); return node; } } @@ -70334,13 +71491,13 @@ var ts; }; node.javascriptPath = declarationTextOrJavascriptPath; node.javascriptMapPath = javascriptMapPath; - node.declarationPath = ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath); + node.declarationPath = ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath); node.declarationMapPath = declarationMapPath; node.buildInfoPath = declarationMapTextOrBuildInfoPath; Object.defineProperties(node, { javascriptText: { get: function () { return definedTextGetter_1(declarationTextOrJavascriptPath); } }, javascriptMapText: { get: function () { return textGetter_1(javascriptMapPath); } }, - declarationText: { get: function () { return definedTextGetter_1(ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath)); } }, + declarationText: { get: function () { return definedTextGetter_1(ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath)); } }, declarationMapText: { get: function () { return textGetter_1(declarationMapPath); } }, buildInfo: { get: function () { return getAndCacheBuildInfo_1(function () { return textGetter_1(declarationMapTextOrBuildInfoPath); }); } } }); @@ -70923,8 +72080,8 @@ var ts; argumentsList.push(ts.createNull()); } if (children.length > 1) { - for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { - var child = children_1[_i]; + for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { + var child = children_2[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -70943,8 +72100,8 @@ var ts; argumentsList.push(ts.createNull()); if (children && children.length > 0) { if (children.length > 1) { - for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { - var child = children_2[_i]; + for (var _i = 0, children_3 = children; _i < children_3.length; _i++) { + var child = children_3[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -70995,10 +72152,10 @@ var ts; name: "typescript:spread", importName: "__spread", scoped: false, + dependencies: [ts.readHelper], text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };" }; function createSpreadHelper(context, argumentList, location) { - context.requestEmitHelper(ts.readHelper); context.requestEmitHelper(ts.spreadHelper); return ts.setTextRange(ts.createCall(getUnscopedHelperName("__spread"), /*typeArguments*/ undefined, argumentList), location); @@ -71858,7 +73015,7 @@ var ts; case 195 /* ElementAccessExpression */: case 194 /* PropertyAccessExpression */: case 218 /* NonNullExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: node = node.expression; continue; } @@ -71875,7 +73032,7 @@ var ts; ts.parenthesizeConciseBody = parenthesizeConciseBody; function isCommaSequence(node) { return node.kind === 209 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || - node.kind === 326 /* CommaListExpression */; + node.kind === 327 /* CommaListExpression */; } ts.isCommaSequence = isCommaSequence; var OuterExpressionKinds; @@ -71894,7 +73051,7 @@ var ts; case 217 /* AsExpression */: case 218 /* NonNullExpression */: return (kinds & 2 /* Assertions */) !== 0; - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return (kinds & 4 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -71931,7 +73088,7 @@ var ts; case 199 /* TypeAssertionExpression */: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression); case 217 /* AsExpression */: return ts.updateAsExpression(outerExpression, expression, outerExpression.type); case 218 /* NonNullExpression */: return ts.updateNonNullExpression(outerExpression, expression); - case 325 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); + case 326 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); } } /** @@ -72804,9 +73961,9 @@ var ts; case 290 /* SourceFile */: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression)); default: // No need to visit nodes with no children. @@ -72863,7 +74020,7 @@ var ts; case 224 /* EmptyStatement */: case 215 /* OmittedExpression */: case 241 /* DebuggerStatement */: - case 324 /* NotEmittedStatement */: + case 325 /* NotEmittedStatement */: // No need to visit nodes with no children. break; // Names @@ -73247,10 +74404,10 @@ var ts; result = reduceNodes(node.statements, cbNodes, result); break; // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: result = reduceNode(node.expression, cbNode, result); break; - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: result = reduceNodes(node.elements, cbNodes, result); break; default: @@ -74251,10 +75408,12 @@ var ts; // list contains nothing but prologue directives (or empty) - exit return index; } - var statement = statements[index]; - if (statement.kind === 226 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { - result.push(ts.visitNode(statement, visitor, ts.isStatement)); - return index + 1; + var superIndex = ts.findIndex(statements, function (s) { return ts.isExpressionStatement(s) && ts.isSuperCall(s.expression); }, index); + if (superIndex > -1) { + for (var i = index; i <= superIndex; i++) { + result.push(ts.visitNode(statements[i], visitor, ts.isStatement)); + } + return superIndex + 1; } return index; } @@ -74587,7 +75746,7 @@ var ts; && !(element.transformFlags & (8192 /* ContainsRestOrSpread */ | 16384 /* ContainsObjectRestOrSpread */)) && !(ts.getTargetOfBindingOrAssignmentElement(element).transformFlags & (8192 /* ContainsRestOrSpread */ | 16384 /* ContainsObjectRestOrSpread */)) && !ts.isComputedPropertyName(propertyName)) { - bindingElements = ts.append(bindingElements, element); + bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor)); } else { if (bindingElements) { @@ -74805,6 +75964,96 @@ var ts; })(ts || (ts = {})); /*@internal*/ var ts; +(function (ts) { + var ProcessLevel; + (function (ProcessLevel) { + ProcessLevel[ProcessLevel["LiftRestriction"] = 0] = "LiftRestriction"; + ProcessLevel[ProcessLevel["All"] = 1] = "All"; + })(ProcessLevel = ts.ProcessLevel || (ts.ProcessLevel = {})); + function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) { + // Visit the tag expression + var tag = ts.visitNode(node.tag, visitor, ts.isExpression); + // Build up the template arguments and the raw and cooked strings for the template. + // We start out with 'undefined' for the first argument and revisit later + // to avoid walking over the template string twice and shifting all our arguments over after the fact. + var templateArguments = [undefined]; + var cookedStrings = []; + var rawStrings = []; + var template = node.template; + if (level === ProcessLevel.LiftRestriction && !ts.hasInvalidEscape(template)) + return node; + if (ts.isNoSubstitutionTemplateLiteral(template)) { + cookedStrings.push(createTemplateCooked(template)); + rawStrings.push(getRawLiteral(template, currentSourceFile)); + } + else { + cookedStrings.push(createTemplateCooked(template.head)); + rawStrings.push(getRawLiteral(template.head, currentSourceFile)); + for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { + var templateSpan = _a[_i]; + cookedStrings.push(createTemplateCooked(templateSpan.literal)); + rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile)); + templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); + } + } + var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); + // Create a variable to cache the template object if we're in a module. + // Do not do this in the global scope, as any variable we currently generate could conflict with + // variables from outside of the current compilation. In the future, we can revisit this behavior. + if (ts.isExternalModule(currentSourceFile)) { + var tempVar = ts.createUniqueName("templateObject"); + recordTaggedTemplateString(tempVar); + templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); + } + else { + templateArguments[0] = helperCall; + } + return ts.createCall(tag, /*typeArguments*/ undefined, templateArguments); + } + ts.processTaggedTemplateExpression = processTaggedTemplateExpression; + function createTemplateCooked(template) { + return template.templateFlags ? ts.createIdentifier("undefined") : ts.createLiteral(template.text); + } + /** + * Creates an ES5 compatible literal from an ES6 template literal. + * + * @param node The ES6 template literal. + */ + function getRawLiteral(node, currentSourceFile) { + // Find original source text, since we need to emit the raw strings of the tagged template. + // The raw strings contain the (escaped) strings of what the user wrote. + // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". + var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), + // thus we need to remove those characters. + // First template piece starts with "`", others with "}" + // Last template piece ends with "`", others with "${" + var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + // Newline normalization: + // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's + // and LineTerminatorSequences are normalized to for both TV and TRV. + text = text.replace(/\r\n?/g, "\n"); + return ts.setTextRange(ts.createLiteral(text), node); + } + function createTemplateObjectHelper(context, cooked, raw) { + context.requestEmitHelper(ts.templateObjectHelper); + return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), + /*typeArguments*/ undefined, [ + cooked, + raw + ]); + } + ts.templateObjectHelper = { + name: "typescript:makeTemplateObject", + importName: "__makeTemplateObject", + scoped: false, + priority: 0, + text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" + }; +})(ts || (ts = {})); +/*@internal*/ +var ts; (function (ts) { /** * Indicates whether to emit type metadata in the new format. @@ -74829,10 +76078,9 @@ var ts; ClassFacts[ClassFacts["IsNamedExternalExport"] = 16] = "IsNamedExternalExport"; ClassFacts[ClassFacts["IsDefaultExternalExport"] = 32] = "IsDefaultExternalExport"; ClassFacts[ClassFacts["IsDerivedClass"] = 64] = "IsDerivedClass"; - ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 128] = "UseImmediatelyInvokedFunctionExpression"; ClassFacts[ClassFacts["HasAnyDecorators"] = 6] = "HasAnyDecorators"; ClassFacts[ClassFacts["NeedsName"] = 5] = "NeedsName"; - ClassFacts[ClassFacts["MayNeedImmediatelyInvokedFunctionExpression"] = 7] = "MayNeedImmediatelyInvokedFunctionExpression"; + ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 7] = "UseImmediatelyInvokedFunctionExpression"; ClassFacts[ClassFacts["IsExported"] = 56] = "IsExported"; })(ClassFacts || (ClassFacts = {})); function transformTypeScript(context) { @@ -75315,8 +76563,6 @@ var ts; facts |= 32 /* IsDefaultExternalExport */; else if (isNamedExternalModuleExport(node)) facts |= 16 /* IsNamedExternalExport */; - if (languageVersion <= 1 /* ES5 */ && (facts & 7 /* MayNeedImmediatelyInvokedFunctionExpression */)) - facts |= 128 /* UseImmediatelyInvokedFunctionExpression */; return facts; } function hasTypeScriptClassSyntax(node) { @@ -75334,7 +76580,7 @@ var ts; } var staticProperties = ts.getProperties(node, /*requireInitializer*/ true, /*isStatic*/ true); var facts = getClassFacts(node, staticProperties); - if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) { + if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */) { context.startLexicalEnvironment(); } var name = node.name || (facts & 5 /* NeedsName */ ? ts.getGeneratedNameForNode(node) : undefined); @@ -75346,7 +76592,7 @@ var ts; addClassElementDecorationStatements(statements, node, /*isStatic*/ false); addClassElementDecorationStatements(statements, node, /*isStatic*/ true); addConstructorDecorationStatement(statements, node); - if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) { + if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */) { // When we emit a TypeScript class down to ES5, we must wrap it in an IIFE so that the // 'es2015' transformer can properly nest static initializers and decorators. The result // looks something like: @@ -75372,11 +76618,16 @@ var ts; ts.insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment()); var iife = ts.createImmediatelyInvokedArrowFunction(statements); ts.setEmitFlags(iife, 33554432 /* TypeScriptClassWrapper */); + // Class comment is already added by the ES2015 transform when targeting ES5 or below. + // Only add if targetting ES2015+ to prevent duplicates + if (languageVersion > 1 /* ES5 */) { + ts.addSyntheticLeadingComment(iife, 3 /* MultiLineCommentTrivia */, "* @class "); + } var varStatement = ts.createVariableStatement( /*modifiers*/ undefined, ts.createVariableDeclarationList([ ts.createVariableDeclaration(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false), /*type*/ undefined, iife) - ])); + ], languageVersion > 1 /* ES5 */ ? 2 /* Const */ : undefined)); ts.setOriginalNode(varStatement, node); ts.setCommentRange(varStatement, node); ts.setSourceMapRange(varStatement, ts.moveRangePastDecorators(node)); @@ -75389,7 +76640,7 @@ var ts; if (facts & 8 /* IsExportOfNamespace */) { addExportMemberAssignment(statements, node); } - else if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) { + else if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) { if (facts & 32 /* IsDefaultExternalExport */) { statements.push(ts.createExportDefault(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))); } @@ -75416,7 +76667,7 @@ var ts; // ${members} // } // we do not emit modifiers on the declaration if we are emitting an IIFE - var modifiers = !(facts & 128 /* UseImmediatelyInvokedFunctionExpression */) + var modifiers = !(facts & 7 /* UseImmediatelyInvokedFunctionExpression */) ? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier) : undefined; var classDeclaration = ts.createClassDeclaration( @@ -77124,7 +78375,7 @@ var ts; return undefined; } // Elide the export declaration if all of its named exports are elided. - var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedImportBindings); + var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedExportBindings); return exportClause ? ts.updateExportDeclaration(node, /*decorators*/ undefined, @@ -77893,7 +79144,7 @@ var ts; /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass)); if (ts.some(staticProperties) || ts.some(pendingExpressions)) { if (isDecoratedClassDeclaration) { - ts.Debug.assertDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); + ts.Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); // Write any pending expressions from elided or moved computed property names if (pendingStatements && pendingExpressions && ts.some(pendingExpressions)) { pendingStatements.push(ts.createExpressionStatement(ts.inlineExpressions(pendingExpressions))); @@ -78981,6 +80232,8 @@ var ts; var enclosingFunctionFlags; var enclosingSuperContainerFlags = 0; var hasLexicalThis; + var currentSourceFile; + var taggedTemplateStringDeclarations; /** Keeps track of property names accessed on super (`super.x`) within async functions. */ var capturedSuperProperties; /** Whether the async function contains an element access on super (`super[x]`). */ @@ -78988,14 +80241,18 @@ var ts; /** A set of node IDs for generated super accessors. */ var substitutedSuperAccessors = []; return ts.chainBundle(transformSourceFile); + function recordTaggedTemplateString(temp) { + taggedTemplateStringDeclarations = ts.append(taggedTemplateStringDeclarations, ts.createVariableDeclaration(temp)); + } function transformSourceFile(node) { if (node.isDeclarationFile) { return node; } - exportedVariableStatement = false; - hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); - var visited = ts.visitEachChild(node, visitor, context); + currentSourceFile = node; + var visited = visitSourceFile(node); ts.addEmitHelpers(visited, context.readEmitHelpers()); + currentSourceFile = undefined; + taggedTemplateStringDeclarations = undefined; return visited; } function visitor(node) { @@ -79071,6 +80328,8 @@ var ts; return visitExpressionStatement(node); case 200 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, noDestructuringValue); + case 198 /* TaggedTemplateExpression */: + return visitTaggedTemplateExpression(node); case 194 /* PropertyAccessExpression */: if (capturedSuperProperties && ts.isPropertyAccessExpression(node) && node.expression.kind === 102 /* SuperKeyword */) { capturedSuperProperties.set(node.name.escapedText, true); @@ -79193,6 +80452,18 @@ var ts; function visitParenthesizedExpression(node, noDestructuringValue) { return ts.visitEachChild(node, noDestructuringValue ? visitorNoDestructuringValue : visitor, context); } + function visitSourceFile(node) { + exportedVariableStatement = false; + hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); + var visited = ts.visitEachChild(node, visitor, context); + var statement = ts.concatenate(visited.statements, taggedTemplateStringDeclarations && [ + ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList(taggedTemplateStringDeclarations)) + ]); + return ts.updateSourceFileNode(visited, ts.setTextRange(ts.createNodeArray(statement), node.statements)); + } + function visitTaggedTemplateExpression(node) { + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.LiftRestriction); + } /** * Visits a BinaryExpression that contains a destructuring assignment. * @@ -79679,10 +80950,10 @@ var ts; name: "typescript:asyncGenerator", importName: "__asyncGenerator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n 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); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };" }; function createAsyncGeneratorHelper(context, generatorFunc, hasLexicalThis) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncGeneratorHelper); // Mark this node as originally an async function (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* AsyncFunctionBody */; @@ -79697,10 +80968,10 @@ var ts; name: "typescript:asyncDelegator", importName: "__asyncDelegator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n };" }; function createAsyncDelegatorHelper(context, expression, location) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncDelegator); return ts.setTextRange(ts.createCall(ts.getUnscopedHelperName("__asyncDelegator"), /*typeArguments*/ undefined, [expression]), location); @@ -81947,10 +83218,15 @@ var ts; } return ts.visitEachChild(node, visitor, context); } + function isVariableStatementOfTypeScriptClassWrapper(node) { + return node.declarationList.declarations.length === 1 + && !!node.declarationList.declarations[0].initializer + && !!(ts.getEmitFlags(node.declarationList.declarations[0].initializer) & 33554432 /* TypeScriptClassWrapper */); + } function visitVariableStatement(node) { var ancestorFacts = enterSubtree(0 /* None */, ts.hasModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); var updated; - if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0) { + if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { // we are inside a converted loop - hoist variable declarations var assignments = void 0; for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { @@ -83102,7 +84378,11 @@ var ts; // The class statements are the statements generated by visiting the first statement with initializer of the // body (1), while all other statements are added to remainingStatements (2) var isVariableStatementWithInitializer = function (stmt) { return ts.isVariableStatement(stmt) && !!ts.first(stmt.declarationList.declarations).initializer; }; + // visit the class body statements outside of any converted loop body. + var savedConvertedLoopState = convertedLoopState; + convertedLoopState = undefined; var bodyStatements = ts.visitNodes(body.statements, visitor, ts.isStatement); + convertedLoopState = savedConvertedLoopState; var classStatements = ts.filter(bodyStatements, isVariableStatementWithInitializer); var remainingStatements = ts.filter(bodyStatements, function (stmt) { return !isVariableStatementWithInitializer(stmt); }); var varStatement = ts.cast(ts.first(classStatements), ts.isVariableStatement); @@ -83359,67 +84639,7 @@ var ts; * @param node A TaggedTemplateExpression node. */ function visitTaggedTemplateExpression(node) { - // Visit the tag expression - var tag = ts.visitNode(node.tag, visitor, ts.isExpression); - // Build up the template arguments and the raw and cooked strings for the template. - // We start out with 'undefined' for the first argument and revisit later - // to avoid walking over the template string twice and shifting all our arguments over after the fact. - var templateArguments = [undefined]; - var cookedStrings = []; - var rawStrings = []; - var template = node.template; - if (ts.isNoSubstitutionTemplateLiteral(template)) { - cookedStrings.push(ts.createLiteral(template.text)); - rawStrings.push(getRawLiteral(template)); - } - else { - cookedStrings.push(ts.createLiteral(template.head.text)); - rawStrings.push(getRawLiteral(template.head)); - for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { - var templateSpan = _a[_i]; - cookedStrings.push(ts.createLiteral(templateSpan.literal.text)); - rawStrings.push(getRawLiteral(templateSpan.literal)); - templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); - } - } - var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); - // Create a variable to cache the template object if we're in a module. - // Do not do this in the global scope, as any variable we currently generate could conflict with - // variables from outside of the current compilation. In the future, we can revisit this behavior. - if (ts.isExternalModule(currentSourceFile)) { - var tempVar = ts.createUniqueName("templateObject"); - recordTaggedTemplateString(tempVar); - templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); - } - else { - templateArguments[0] = helperCall; - } - return ts.createCall(tag, /*typeArguments*/ undefined, templateArguments); - } - /** - * Creates an ES5 compatible literal from an ES6 template literal. - * - * @param node The ES6 template literal. - */ - function getRawLiteral(node) { - // Find original source text, since we need to emit the raw strings of the tagged template. - // The raw strings contain the (escaped) strings of what the user wrote. - // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". - var text = node.rawText; - if (text === undefined) { - text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), - // thus we need to remove those characters. - // First template piece starts with "`", others with "}" - // Last template piece ends with "`", others with "${" - var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; - text = text.substring(1, text.length - (isLast ? 1 : 2)); - } - // Newline normalization: - // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's - // and LineTerminatorSequences are normalized to for both TV and TRV. - text = text.replace(/\r\n?/g, "\n"); - return ts.setTextRange(ts.createLiteral(text), node); + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.All); } /** * Visits a TemplateExpression node. @@ -83712,14 +84932,6 @@ var ts; ts.createFileLevelUniqueName("_super") ]); } - function createTemplateObjectHelper(context, cooked, raw) { - context.requestEmitHelper(ts.templateObjectHelper); - return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), - /*typeArguments*/ undefined, [ - cooked, - raw - ]); - } ts.extendsHelper = { name: "typescript:extends", importName: "__extends", @@ -83727,13 +84939,6 @@ var ts; priority: 0, text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();" }; - ts.templateObjectHelper = { - name: "typescript:makeTemplateObject", - importName: "__makeTemplateObject", - scoped: false, - priority: 0, - text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" - }; })(ts || (ts = {})); /*@internal*/ var ts; @@ -86547,7 +87752,7 @@ var ts; startLexicalEnvironment(); var statements = []; var ensureUseStrict = ts.getStrictOptionValue(compilerOptions, "alwaysStrict") || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile)); - var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor); + var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict && !ts.isJsonSourceFile(node), sourceElementVisitor); if (shouldEmitUnderscoreUnderscoreESModule()) { ts.append(statements, createUnderscoreUnderscoreESModule()); } @@ -86556,11 +87761,6 @@ var ts; addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false); ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements)); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - ts.addEmitHelper(updated, exportStarHelper); - } ts.addEmitHelpers(updated, context.readEmitHelpers()); return updated; } @@ -86782,11 +87982,6 @@ var ts; // and merge any new lexical declarations. ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var body = ts.createBlock(statements, /*multiLine*/ true); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - ts.addEmitHelper(body, exportStarHelper); - } if (needUMDDynamicImportHelper) { ts.addEmitHelper(body, dynamicImportUMDHelper); } @@ -86843,9 +88038,9 @@ var ts; return visitFunctionDeclaration(node); case 245 /* ClassDeclaration */: return visitClassDeclaration(node); - case 327 /* MergeDeclarationMarker */: + case 328 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 328 /* EndOfDeclarationMarker */: + case 329 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return ts.visitEachChild(node, moduleExpressionElementVisitor, context); @@ -87203,8 +88398,13 @@ var ts; } for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) { var specifier = _a[_i]; - var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); - statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue)), specifier), specifier)); + if (languageVersion === 0 /* ES3 */) { + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createCreateBindingHelper(context, generatedName, ts.createLiteral(specifier.propertyName || specifier.name), specifier.propertyName ? ts.createLiteral(specifier.name) : undefined)), specifier), specifier)); + } + else { + var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue, /* location */ undefined, /* liveBinding */ true)), specifier), specifier)); + } } return ts.singleOrMany(statements); } @@ -87307,7 +88507,6 @@ var ts; if (ts.hasModifier(node, 1 /* Export */)) { var modifiers = void 0; // If we're exporting these variables, then these just become assignments to 'exports.x'. - // We only want to emit assignments for variables with initializers. for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var variable = _a[_i]; if (ts.isIdentifier(variable.name) && ts.isLocalName(variable.name)) { @@ -87316,7 +88515,7 @@ var ts; } variables = ts.append(variables, variable); } - else if (variable.initializer) { + else { expressions = ts.append(expressions, transformInitializedVariable(variable)); } } @@ -87368,7 +88567,7 @@ var ts; } else { return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name), - /*location*/ node.name), ts.visitNode(node.initializer, moduleExpressionElementVisitor)); + /*location*/ node.name), node.initializer ? ts.visitNode(node.initializer, moduleExpressionElementVisitor) : ts.createVoidZero()); } } /** @@ -87446,7 +88645,7 @@ var ts; case 257 /* NamedImports */: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; - statements = appendExportsOfDeclaration(statements, importBinding); + statements = appendExportsOfDeclaration(statements, importBinding, /* liveBinding */ true); } break; } @@ -87543,13 +88742,13 @@ var ts; * appended. * @param decl The declaration to export. */ - function appendExportsOfDeclaration(statements, decl) { + function appendExportsOfDeclaration(statements, decl, liveBinding) { var name = ts.getDeclarationName(decl); var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(ts.idText(name)); if (exportSpecifiers) { for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) { var exportSpecifier = exportSpecifiers_1[_i]; - statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name); + statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name, /* allowComments */ undefined, liveBinding); } } return statements; @@ -87566,8 +88765,8 @@ var ts; * @param location The location to use for source maps and comments for the export. * @param allowComments Whether to allow comments on the export. */ - function appendExportStatement(statements, exportName, expression, location, allowComments) { - statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments)); + function appendExportStatement(statements, exportName, expression, location, allowComments, liveBinding) { + statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); return statements; } function createUnderscoreUnderscoreESModule() { @@ -87596,8 +88795,8 @@ var ts; * @param location The location to use for source maps and comments for the export. * @param allowComments An optional value indicating whether to emit comments for the statement. */ - function createExportStatement(name, value, location, allowComments) { - var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value)), location); + function createExportStatement(name, value, location, allowComments, liveBinding) { + var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value, /* location */ undefined, liveBinding)), location); ts.startOnNewLine(statement); if (!allowComments) { ts.setEmitFlags(statement, 1536 /* NoComments */); @@ -87611,8 +88810,22 @@ var ts; * @param value The exported value. * @param location The location to use for source maps and comments for the export. */ - function createExportExpression(name, value, location) { - return ts.setTextRange(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); + function createExportExpression(name, value, location, liveBinding) { + return ts.setTextRange(liveBinding && languageVersion !== 0 /* ES3 */ ? ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ undefined, [ + ts.createIdentifier("exports"), + ts.createLiteral(name), + ts.createObjectLiteral([ + ts.createPropertyAssignment("enumerable", ts.createLiteral(/*value*/ true)), + ts.createPropertyAssignment("get", ts.createFunctionExpression( + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + /*parameters*/ [], + /*type*/ undefined, ts.createBlock([ts.createReturn(value)]))) + ]) + ]) : ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); } // // Modifier Visitors @@ -87837,17 +89050,36 @@ var ts; } } ts.transformModule = transformModule; + ts.createBindingHelper = { + name: "typescript:commonjscreatebinding", + importName: "__createBinding", + scoped: false, + priority: 1, + text: "\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));" + }; + function createCreateBindingHelper(context, module, inputName, outputName) { + context.requestEmitHelper(ts.createBindingHelper); + return ts.createCall(ts.getUnscopedHelperName("__createBinding"), /*typeArguments*/ undefined, __spreadArrays([ts.createIdentifier("exports"), module, inputName], (outputName ? [outputName] : []))); + } + ts.setModuleDefaultHelper = { + name: "typescript:commonjscreatevalue", + importName: "__setModuleDefault", + scoped: false, + priority: 1, + text: "\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});" + }; // emit output for the __export helper function var exportStarHelper = { name: "typescript:export-star", - scoped: true, - text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }" + importName: "__exportStar", + scoped: false, + dependencies: [ts.createBindingHelper], + priority: 2, + text: "\n var __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p);\n }" }; function createExportStarHelper(context, module) { - var compilerOptions = context.getCompilerOptions(); - return compilerOptions.importHelpers - ? ts.createCall(ts.getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]) - : ts.createCall(ts.createIdentifier("__export"), /*typeArguments*/ undefined, [module]); + context.requestEmitHelper(exportStarHelper); + return ts.createCall(ts.getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]); } // emit helper for dynamic import var dynamicImportUMDHelper = { @@ -87860,7 +89092,9 @@ var ts; name: "typescript:commonjsimportstar", importName: "__importStar", scoped: false, - text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};" + dependencies: [ts.createBindingHelper, ts.setModuleDefaultHelper], + priority: 2, + text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};" }; // emit helper for `import Name from "foo"` ts.importDefaultHelper = { @@ -88324,7 +89558,7 @@ var ts; return ts.singleOrMany(statements); } function visitExportDeclaration(node) { - ts.Debug.assertDefined(node); + ts.Debug.assertIsDefined(node); return undefined; } /** @@ -88820,9 +90054,9 @@ var ts; return visitCatchClause(node); case 223 /* Block */: return visitBlock(node); - case 327 /* MergeDeclarationMarker */: + case 328 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 328 /* EndOfDeclarationMarker */: + case 329 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return destructuringAndImportCallVisitor(node); @@ -89433,7 +90667,9 @@ var ts; */ function onEmitNode(hint, node, emitCallback) { if (ts.isSourceFile(node)) { - helperNameSubstitutions = ts.createMap(); + if ((ts.isExternalModule(node) || compilerOptions.isolatedModules) && compilerOptions.importHelpers) { + helperNameSubstitutions = ts.createMap(); + } previousOnEmitNode(hint, node, emitCallback); helperNameSubstitutions = undefined; } @@ -90231,7 +91467,7 @@ var ts; ts.forEach(sourceFile.libReferenceDirectives, function (ref) { var lib = host.getLibFileFromReference(ref); if (lib) { - ret.set(ref.fileName.toLocaleLowerCase(), true); + ret.set(ts.toFileNameLowerCase(ref.fileName), true); } }); return ret; @@ -91314,7 +92550,7 @@ var ts; * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files. */ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(330 /* Count */); + var enabledSyntaxKindFeatures = new Array(331 /* Count */); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -91387,6 +92623,7 @@ var ts; transformed: transformed, substituteNode: substituteNode, emitNodeWithNotification: emitNodeWithNotification, + isEmitNotificationEnabled: isEmitNotificationEnabled, dispose: dispose, diagnostics: diagnostics }; @@ -91443,6 +92680,8 @@ var ts; function emitNodeWithNotification(hint, node, emitCallback) { ts.Debug.assert(state < 3 /* Disposed */, "Cannot invoke TransformationResult callbacks after the result is disposed."); if (node) { + // TODO: Remove check and unconditionally use onEmitNode when API is breakingly changed + // (see https://github.com/microsoft/TypeScript/pull/36248/files/5062623f39120171b98870c71344b3242eb03d23#r369766739) if (isEmitNotificationEnabled(node)) { onEmitNode(hint, node, emitCallback); } @@ -91549,6 +92788,12 @@ var ts; ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the transformation context during initialization."); ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed."); ts.Debug.assert(!helper.scoped, "Cannot request a scoped emit helper."); + if (helper.dependencies) { + for (var _i = 0, _a = helper.dependencies; _i < _a.length; _i++) { + var h = _a[_i]; + requestEmitHelper(h); + } + } emitHelpers = ts.append(emitHelpers, helper); } function readEmitHelpers() { @@ -91712,7 +92957,7 @@ var ts; } ts.getOutputExtension = getOutputExtension; function rootDirOfOptions(configFile) { - return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.assertDefined(configFile.options.configFilePath)); + return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.checkDefined(configFile.options.configFilePath)); } function getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, outputDir) { return outputDir ? @@ -91734,7 +92979,7 @@ var ts; ts.fileExtensionIs(inputFileName, ".tsx" /* Tsx */) && configFile.options.jsx === 1 /* Preserve */ ? ".jsx" /* Jsx */ : ".js" /* Js */); - return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.assertDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? + return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.checkDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? outputFileName : undefined; } @@ -91809,7 +93054,7 @@ var ts; function getFirstProjectOutput(configFile, ignoreCase) { if (configFile.options.outFile || configFile.options.out) { var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath; - return ts.Debug.assertDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); + return ts.Debug.checkDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); } for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) { var inputFileName = _b[_a]; @@ -91933,6 +93178,7 @@ var ts; hasGlobalName: resolver.hasGlobalName, // transform hooks onEmitNode: transform.emitNodeWithNotification, + isEmitNotificationEnabled: transform.isEmitNotificationEnabled, substituteNode: transform.substituteNode, }); ts.Debug.assert(transform.transformed.length === 1, "Should only see one output from the transform"); @@ -91985,6 +93231,7 @@ var ts; hasGlobalName: resolver.hasGlobalName, // transform hooks onEmitNode: declarationTransform.emitNodeWithNotification, + isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled, substituteNode: declarationTransform.substituteNode, }); var declBlocked = (!!declarationTransform.diagnostics && !!declarationTransform.diagnostics.length) || !!host.isEmitBlocked(declarationFilePath) || !!compilerOptions.noEmit; @@ -92095,7 +93342,7 @@ var ts; var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText); return "data:application/json;base64," + base64SourceMapText; } - var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.assertDefined(sourceMapFilePath))); + var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath))); if (mapOptions.mapRoot) { var sourceMapDir = ts.normalizeSlashes(mapOptions.mapRoot); if (sourceFile) { @@ -92179,7 +93426,7 @@ var ts; sourceFile.statements = ts.createNodeArray(); return sourceFile; }); - var jsBundle = ts.Debug.assertDefined(bundle.js); + var jsBundle = ts.Debug.checkDefined(bundle.js); ts.forEach(jsBundle.sources && jsBundle.sources.prologues, function (prologueInfo) { var sourceFile = sourceFiles[prologueInfo.file]; sourceFile.text = prologueInfo.text; @@ -92196,10 +93443,10 @@ var ts; /*@internal*/ function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) { var _a = getOutputPathsForBundle(config.options, /*forceDtsPaths*/ false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath; - var buildInfoText = host.readFile(ts.Debug.assertDefined(buildInfoPath)); + var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath)); if (!buildInfoText) return buildInfoPath; - var jsFileText = host.readFile(ts.Debug.assertDefined(jsFilePath)); + var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath)); if (!jsFileText) return jsFilePath; var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath); @@ -92297,7 +93544,7 @@ var ts; function createPrinter(printerOptions, handlers) { if (printerOptions === void 0) { printerOptions = {}; } if (handlers === void 0) { handlers = {}; } - var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; + var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, isEmitNotificationEnabled = handlers.isEmitNotificationEnabled, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; var extendedDiagnostics = !!printerOptions.extendedDiagnostics; var newLine = ts.getNewLineCharacter(printerOptions); var moduleKind = ts.getEmitModuleKind(printerOptions); @@ -92315,7 +93562,7 @@ var ts; var write = writeBase; var isOwnFileEmit; var bundleFileInfo = printerOptions.writeBundleFileInfo ? { sections: [] } : undefined; - var relativeToBuildInfo = bundleFileInfo ? ts.Debug.assertDefined(printerOptions.relativeToBuildInfo) : undefined; + var relativeToBuildInfo = bundleFileInfo ? ts.Debug.checkDefined(printerOptions.relativeToBuildInfo) : undefined; var recordInternalSection = printerOptions.recordInternalSection; var sourceFileTextPos = 0; var sourceFileTextKind = "text" /* Text */; @@ -92586,12 +93833,15 @@ var ts; return; return pipelineEmit(1 /* Expression */, node); } + function emitJsxAttributeValue(node) { + return pipelineEmit(ts.isStringLiteral(node) ? 6 /* JsxAttributeValue */ : 4 /* Unspecified */, node); + } function pipelineEmit(emitHint, node) { var savedLastNode = lastNode; var savedLastSubstitution = lastSubstitution; lastNode = node; lastSubstitution = undefined; - var pipelinePhase = getPipelinePhase(0 /* Notification */, node); + var pipelinePhase = getPipelinePhase(0 /* Notification */, emitHint, node); pipelinePhase(emitHint, node); ts.Debug.assert(lastNode === node); var substitute = lastSubstitution; @@ -92599,15 +93849,15 @@ var ts; lastSubstitution = savedLastSubstitution; return substitute || node; } - function getPipelinePhase(phase, node) { + function getPipelinePhase(phase, emitHint, node) { switch (phase) { case 0 /* Notification */: - if (onEmitNode !== ts.noEmitNotification) { + if (onEmitNode !== ts.noEmitNotification && (!isEmitNotificationEnabled || isEmitNotificationEnabled(node))) { return pipelineEmitWithNotification; } // falls through case 1 /* Substitution */: - if (substituteNode !== ts.noEmitSubstitution) { + if (substituteNode !== ts.noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node)) !== node) { return pipelineEmitWithSubstitution; } // falls through @@ -92627,12 +93877,12 @@ var ts; return ts.Debug.assertNever(phase); } } - function getNextPipelinePhase(currentPhase, node) { - return getPipelinePhase(currentPhase + 1, node); + function getNextPipelinePhase(currentPhase, emitHint, node) { + return getPipelinePhase(currentPhase + 1, emitHint, node); } function pipelineEmitWithNotification(hint, node) { ts.Debug.assert(lastNode === node); - var pipelinePhase = getNextPipelinePhase(0 /* Notification */, node); + var pipelinePhase = getNextPipelinePhase(0 /* Notification */, hint, node); onEmitNode(hint, node, pipelinePhase); ts.Debug.assert(lastNode === node); } @@ -92642,6 +93892,8 @@ var ts; return emitSourceFile(ts.cast(node, ts.isSourceFile)); if (hint === 2 /* IdentifierName */) return emitIdentifier(ts.cast(node, ts.isIdentifier)); + if (hint === 6 /* JsxAttributeValue */) + return emitLiteral(ts.cast(node, ts.isStringLiteral), /*jsxAttributeEscape*/ true); if (hint === 3 /* MappedTypeParameter */) return emitMappedTypeParameter(ts.cast(node, ts.isTypeParameterDeclaration)); if (hint === 5 /* EmbeddedStatement */) { @@ -92656,7 +93908,7 @@ var ts; case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: case 17 /* TemplateTail */: - return emitLiteral(node); + return emitLiteral(node, /*jsxAttributeEscape*/ false); case 292 /* UnparsedSource */: case 286 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); @@ -92904,27 +94156,28 @@ var ts; case 284 /* EnumMember */: return emitEnumMember(node); // JSDoc nodes (only used in codefixes currently) - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 318 /* JSDocThisTag */: - case 315 /* JSDocEnumTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 319 /* JSDocThisTag */: + case 316 /* JSDocEnumTag */: return emitJSDocSimpleTypedTag(node); + case 308 /* JSDocImplementsTag */: case 307 /* JSDocAugmentsTag */: - return emitJSDocAugmentsTag(node); - case 320 /* JSDocTemplateTag */: + return emitJSDocHeritageTag(node); + case 321 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 314 /* JSDocCallbackTag */: + case 315 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); case 305 /* JSDocSignature */: return emitJSDocSignature(node); case 304 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 309 /* JSDocClassTag */: + case 310 /* JSDocClassTag */: case 306 /* JSDocTag */: return emitJSDocSimpleTag(node); case 303 /* JSDocComment */: @@ -92950,7 +94203,7 @@ var ts; case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - return emitLiteral(node); + return emitLiteral(node, /*jsxAttributeEscape*/ false); // Identifiers case 75 /* Identifier */: return emitIdentifier(node); @@ -93026,9 +94279,9 @@ var ts; case 270 /* JsxFragment */: return emitJsxFragment(node); // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return emitCommaList(node); } } @@ -93042,8 +94295,7 @@ var ts; } function pipelineEmitWithSubstitution(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(1 /* Substitution */, node); - lastSubstitution = substituteNode(hint, node); + var pipelinePhase = getNextPipelinePhase(1 /* Substitution */, hint, node); pipelinePhase(hint, lastSubstitution); ts.Debug.assert(lastNode === node || lastSubstitution === node); } @@ -93130,7 +94382,7 @@ var ts; // SyntaxKind.NumericLiteral // SyntaxKind.BigIntLiteral function emitNumericOrBigIntLiteral(node) { - emitLiteral(node); + emitLiteral(node, /*jsxAttributeEscape*/ false); } // SyntaxKind.StringLiteral // SyntaxKind.RegularExpressionLiteral @@ -93138,8 +94390,8 @@ var ts; // SyntaxKind.TemplateHead // SyntaxKind.TemplateMiddle // SyntaxKind.TemplateTail - function emitLiteral(node) { - var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape); + function emitLiteral(node, jsxAttributeEscape) { + var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape); if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 10 /* StringLiteral */ || ts.isTemplateLiteralKind(node.kind))) { writeLiteral(text); @@ -93602,7 +94854,7 @@ var ts; expression = ts.skipPartiallyEmittedExpressions(expression); if (ts.isNumericLiteral(expression)) { // check if numeric literal is a decimal literal that was originally written with a dot - var text = getLiteralTextOfNode(expression, /*neverAsciiEscape*/ true); + var text = getLiteralTextOfNode(expression, /*neverAsciiEscape*/ true, /*jsxAttributeEscape*/ false); // If he number will be printed verbatim and it doesn't already contain a dot, add one // if the expression doesn't have any comments that will be emitted. return !expression.numericLiteralFlags && !ts.stringContains(text, ts.tokenToString(24 /* DotToken */)); @@ -93717,18 +94969,77 @@ var ts; emitExpression(node.operand); writeTokenText(node.operator, writeOperator); } + var EmitBinaryExpressionState; + (function (EmitBinaryExpressionState) { + EmitBinaryExpressionState[EmitBinaryExpressionState["EmitLeft"] = 0] = "EmitLeft"; + EmitBinaryExpressionState[EmitBinaryExpressionState["EmitRight"] = 1] = "EmitRight"; + EmitBinaryExpressionState[EmitBinaryExpressionState["FinishEmit"] = 2] = "FinishEmit"; + })(EmitBinaryExpressionState || (EmitBinaryExpressionState = {})); + /** + * emitBinaryExpression includes an embedded work stack to attempt to handle as many nested binary expressions + * as possible without creating any additional stack frames. This can only be done when the emit pipeline does + * not require notification/substitution/comment/sourcemap decorations. + */ function emitBinaryExpression(node) { - var isCommaOperator = node.operatorToken.kind !== 27 /* CommaToken */; - var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); - var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); - emitExpression(node.left); - increaseIndentIf(indentBeforeOperator, isCommaOperator); - emitLeadingCommentsOfPosition(node.operatorToken.pos); - writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 /* InKeyword */ ? writeKeyword : writeOperator); - emitTrailingCommentsOfPosition(node.operatorToken.end, /*prefixSpace*/ true); // Binary operators should have a space before the comment starts - increaseIndentIf(indentAfterOperator, /*writeSpaceIfNotIndenting*/ true); - emitExpression(node.right); - decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + var nodeStack = [node]; + var stateStack = [0 /* EmitLeft */]; + var stackIndex = 0; + while (stackIndex >= 0) { + node = nodeStack[stackIndex]; + switch (stateStack[stackIndex]) { + case 0 /* EmitLeft */: { + maybePipelineEmitExpression(node.left); + break; + } + case 1 /* EmitRight */: { + var isCommaOperator = node.operatorToken.kind !== 27 /* CommaToken */; + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + increaseIndentIf(indentBeforeOperator, isCommaOperator); + emitLeadingCommentsOfPosition(node.operatorToken.pos); + writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 /* InKeyword */ ? writeKeyword : writeOperator); + emitTrailingCommentsOfPosition(node.operatorToken.end, /*prefixSpace*/ true); // Binary operators should have a space before the comment starts + increaseIndentIf(indentAfterOperator, /*writeSpaceIfNotIndenting*/ true); + maybePipelineEmitExpression(node.right); + break; + } + case 2 /* FinishEmit */: { + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + stackIndex--; + break; + } + default: return ts.Debug.fail("Invalid state " + stateStack[stackIndex] + " for emitBinaryExpressionWorker"); + } + } + function maybePipelineEmitExpression(next) { + // Advance the state of this unit of work, + stateStack[stackIndex]++; + // Then actually do the work of emitting the node `next` returned by the prior state + // The following section should be identical to `pipelineEmit` save it assumes EmitHint.Expression and offloads + // binary expression handling, where possible, to the contained work queue + // #region trampolinePipelineEmit + var savedLastNode = lastNode; + var savedLastSubstitution = lastSubstitution; + lastNode = next; + lastSubstitution = undefined; + var pipelinePhase = getPipelinePhase(0 /* Notification */, 1 /* Expression */, next); + if (pipelinePhase === pipelineEmitWithHint && ts.isBinaryExpression(next)) { + // If the target pipeline phase is emit directly, and the next node's also a binary expression, + // skip all the intermediate indirection and push the expression directly onto the work stack + stackIndex++; + stateStack[stackIndex] = 0 /* EmitLeft */; + nodeStack[stackIndex] = next; + } + else { + pipelinePhase(1 /* Expression */, next); + } + ts.Debug.assert(lastNode === next); + lastNode = savedLastNode; + lastSubstitution = savedLastSubstitution; + // #endregion trampolinePipelineEmit + } } function emitConditionalExpression(node) { var indentBeforeQuestion = needsIndentation(node, node.condition, node.questionToken); @@ -93931,11 +95242,11 @@ var ts; var node = ts.getParseTreeNode(contextNode); var isSimilarNode = node && node.kind === contextNode.kind; var startPos = pos; - if (isSimilarNode) { + if (isSimilarNode && currentSourceFile) { pos = ts.skipTrivia(currentSourceFile.text, pos); } if (emitLeadingCommentsOfPosition && isSimilarNode && contextNode.pos !== startPos) { - var needsIndent = indentLeading && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); + var needsIndent = indentLeading && currentSourceFile && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); if (needsIndent) { increaseIndent(); } @@ -94410,7 +95721,7 @@ var ts; } function emitJsxAttribute(node) { emit(node.name); - emitNodeWithPrefix("=", writePunctuation, node.initializer, emit); // TODO: GH#18217 + emitNodeWithPrefix("=", writePunctuation, node.initializer, emitJsxAttributeValue); } function emitJsxSpreadAttribute(node) { writePunctuation("{..."); @@ -94541,7 +95852,7 @@ var ts; } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 319 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 320 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } @@ -94557,7 +95868,7 @@ var ts; emitJSDocTypeExpression(tag.typeExpression); emitJSDocComment(tag.comment); } - function emitJSDocAugmentsTag(tag) { + function emitJSDocHeritageTag(tag) { emitJSDocTagName(tag.tagName); writeSpace(); writePunctuation("{"); @@ -95394,19 +96705,19 @@ var ts; } return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node, includeTrivia); } - function getLiteralTextOfNode(node, neverAsciiEscape) { + function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) { if (node.kind === 10 /* StringLiteral */ && node.textSourceNode) { var textSourceNode = node.textSourceNode; if (ts.isIdentifier(textSourceNode)) { - return neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? - "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : - "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; + return jsxAttributeEscape ? "\"" + ts.escapeJsxAttributeString(getTextOfNode(textSourceNode)) + "\"" : + neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : + "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; } else { - return getLiteralTextOfNode(textSourceNode, neverAsciiEscape); + return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape); } } - return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape); + return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape, jsxAttributeEscape); } /** * Push a new name generation scope. @@ -95776,7 +97087,7 @@ var ts; hasWrittenComment = false; var emitFlags = ts.getEmitFlags(node); var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end; - var isEmittedNode = node.kind !== 324 /* NotEmittedStatement */; + var isEmittedNode = node.kind !== 325 /* NotEmittedStatement */; // We have to explicitly check that the node is JsxText because if the compilerOptions.jsx is "preserve" we will not do any transformation. // It is expensive to walk entire tree just to set one kind of node to have no comments. var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0 || node.kind === 11 /* JsxText */; @@ -95807,7 +97118,7 @@ var ts; } ts.forEach(ts.getSyntheticLeadingComments(node), emitLeadingSynthesizedComment); exitComment(); - var pipelinePhase = getNextPipelinePhase(2 /* Comments */, node); + var pipelinePhase = getNextPipelinePhase(2 /* Comments */, hint, node); if (emitFlags & 2048 /* NoNestedComments */) { commentsDisabled = true; pipelinePhase(hint, node); @@ -96045,7 +97356,7 @@ var ts; } function pipelineEmitWithSourceMap(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, node); + var pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, hint, node); if (ts.isUnparsedSource(node) || ts.isUnparsedPrepend(node)) { pipelinePhase(hint, node); } @@ -96059,7 +97370,7 @@ var ts; else { var _a = ts.getSourceMapRange(node), pos = _a.pos, end = _a.end, _b = _a.source, source = _b === void 0 ? sourceMapSource : _b; var emitFlags = ts.getEmitFlags(node); - if (node.kind !== 324 /* NotEmittedStatement */ + if (node.kind !== 325 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && pos >= 0) { emitSourcePos(source, skipSourceTrivia(source, pos)); @@ -96072,7 +97383,7 @@ var ts; else { pipelinePhase(hint, node); } - if (node.kind !== 324 /* NotEmittedStatement */ + if (node.kind !== 325 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && end >= 0) { emitSourcePos(source, end); @@ -96857,12 +98168,6 @@ var ts; return formatStyle + text + resetEscapeSequence; } ts.formatColorAndReset = formatColorAndReset; - function padLeft(s, length) { - while (s.length < length) { - s = " " + s; - } - return s; - } function formatCodeSpan(file, start, length, indent, squiggleColor, host) { var _a = ts.getLineAndCharacterOfPosition(file, start), firstLine = _a.line, firstLineChar = _a.character; var _b = ts.getLineAndCharacterOfPosition(file, start + length), lastLine = _b.line, lastLineChar = _b.character; @@ -96878,7 +98183,7 @@ var ts; // If the error spans over 5 lines, we'll only show the first 2 and last 2 lines, // so we'll skip ahead to the second-to-last line. if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) { - context += indent + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); + context += indent + formatColorAndReset(ts.padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); i = lastLine - 1; } var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0); @@ -96887,10 +98192,10 @@ var ts; lineContent = lineContent.replace(/\s+$/g, ""); // trim from end lineContent = lineContent.replace("\t", " "); // convert tabs to single spaces // Output the gutter and the actual contents of the line. - context += indent + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; context += lineContent + host.getNewLine(); // Output the gutter and the error span for the line using tildes. - context += indent + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; context += squiggleColor; if (i === firstLine) { // If we're on the last line, then limit it to the last character of the last line. @@ -97049,7 +98354,7 @@ var ts; hasInvalidatedResolution(sourceFile.path); } function sourceFileVersionUptoDate(sourceFile) { - return sourceFile.version === getSourceVersion(sourceFile.resolvedPath); + return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName); } function projectReferenceUptoDate(oldRef, newRef, index) { if (!ts.projectReferenceIsEqualTo(oldRef, newRef)) { @@ -97154,10 +98459,10 @@ var ts; var hasEmitBlockingDiagnostics = ts.createMap(); var _compilerOptionsObjectLiteralSyntax; var moduleResolutionCache; - var resolveModuleNamesWorker; + var actualResolveModuleNamesWorker; var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse; if (host.resolveModuleNames) { - resolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.assertEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { + actualResolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.checkEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. if (!resolved || resolved.extension !== undefined) { return resolved; @@ -97170,15 +98475,15 @@ var ts; else { moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); }, options); var loader_1 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache, redirectedReference).resolvedModule; }; // TODO: GH#18217 - resolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; + actualResolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; } - var resolveTypeReferenceDirectiveNamesWorker; + var actualResolveTypeReferenceDirectiveNamesWorker; if (host.resolveTypeReferenceDirectives) { - resolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.assertEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; } else { var loader_2 = function (typesRef, containingFile, redirectedReference) { return ts.resolveTypeReferenceDirective(typesRef, containingFile, options, host, redirectedReference).resolvedTypeReferenceDirective; }; // TODO: GH#18217 - resolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; } // Map from a stringified PackageId to the source file with that id. // Only one source file may have a given packageId. Others become redirects (see createRedirectSourceFile). @@ -97339,6 +98644,7 @@ var ts; getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); }, getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); }, getTypeCount: function () { return getDiagnosticsProducingTypeChecker().getTypeCount(); }, + getInstantiationCount: function () { return getDiagnosticsProducingTypeChecker().getInstantiationCount(); }, getRelationCacheSizes: function () { return getDiagnosticsProducingTypeChecker().getRelationCacheSizes(); }, getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; }, getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; }, @@ -97366,6 +98672,20 @@ var ts; ts.performance.mark("afterProgram"); ts.performance.measure("Program", "beforeProgram", "afterProgram"); return program; + function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference) { + ts.performance.mark("beforeResolveModule"); + var result = actualResolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference); + ts.performance.mark("afterResolveModule"); + ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule"); + return result; + } + function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference) { + ts.performance.mark("beforeResolveTypeReference"); + var result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference); + ts.performance.mark("afterResolveTypeReference"); + ts.performance.measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"); + return result; + } function compareDefaultLibFiles(a, b) { return ts.compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b)); } @@ -97439,13 +98759,13 @@ var ts; // which per above occurred during the current program creation. // Since we assume the filesystem does not change during program creation, // it is safe to reuse resolutions from the earlier call. - var result_8 = []; + var result_9 = []; for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { var moduleName = moduleNames_1[_i]; var resolvedModule = file.resolvedModules.get(moduleName); - result_8.push(resolvedModule); + result_9.push(resolvedModule); } - return result_8; + return result_9; } // At this point, we know at least one of the following hold: // - file has local declarations for ambient modules @@ -97739,7 +99059,7 @@ var ts; } if (resolveTypeReferenceDirectiveNamesWorker) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); var resolutions_1 = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFilePath, getResolvedProjectReferenceToRedirect(newSourceFile.originalFileName)); // ensure that types resolutions are still correct var resolutionsChanged_1 = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions_1, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo); @@ -98045,10 +99365,10 @@ var ts; function getJSSyntacticDiagnosticsForFile(sourceFile) { return runWithCancellationToken(function () { var diagnostics = []; - var parent = sourceFile; - walk(sourceFile); + walk(sourceFile, sourceFile); + ts.forEachChildRecursively(sourceFile, walk, walkArray); return diagnostics; - function walk(node) { + function walk(node, parent) { // Return directly from the case if the given node doesnt want to visit each child // Otherwise break to visit each child switch (parent.kind) { @@ -98057,7 +99377,7 @@ var ts; case 161 /* MethodDeclaration */: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); - return; + return "skip"; } // falls through case 160 /* MethodSignature */: @@ -98071,70 +99391,66 @@ var ts; // type annotation if (parent.type === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } } switch (node.kind) { case 255 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node.parent, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); - return; + return "skip"; } break; case 260 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); - return; + return "skip"; } break; case 253 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 259 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 279 /* HeritageClause */: var heritageClause = node; if (heritageClause.token === 113 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 246 /* InterfaceDeclaration */: var interfaceKeyword = ts.tokenToString(114 /* InterfaceKeyword */); - ts.Debug.assertDefined(interfaceKeyword); + ts.Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); - return; + return "skip"; case 249 /* ModuleDeclaration */: var moduleKeyword = node.flags & 16 /* Namespace */ ? ts.tokenToString(136 /* NamespaceKeyword */) : ts.tokenToString(135 /* ModuleKeyword */); - ts.Debug.assertDefined(moduleKeyword); + ts.Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); - return; + return "skip"; case 247 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 248 /* EnumDeclaration */: - var enumKeyword = ts.Debug.assertDefined(ts.tokenToString(88 /* EnumKeyword */)); + var enumKeyword = ts.Debug.checkDefined(ts.tokenToString(88 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); - return; + return "skip"; case 218 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 217 /* AsExpression */: diagnostics.push(createDiagnosticForNode(node.type, ts.Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 199 /* TypeAssertionExpression */: ts.Debug.fail(); // Won't parse these in a JS file anyway, as they are interpreted as JSX. } - var prevParent = parent; - parent = node; - ts.forEachChild(node, walk, walkArray); - parent = prevParent; } - function walkArray(nodes) { + function walkArray(nodes, parent) { if (parent.decorators === nodes && !options.experimentalDecorators) { diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)); } @@ -98151,13 +99467,14 @@ var ts; // Check type parameters if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } // falls through case 225 /* VariableStatement */: // Check modifiers if (nodes === parent.modifiers) { - return checkModifiers(parent.modifiers, parent.kind === 225 /* VariableStatement */); + checkModifiers(parent.modifiers, parent.kind === 225 /* VariableStatement */); + return "skip"; } break; case 159 /* PropertyDeclaration */: @@ -98169,14 +99486,14 @@ var ts; diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, ts.tokenToString(modifier.kind))); } } - return; + return "skip"; } break; case 156 /* Parameter */: // Check modifiers of parameter declaration if (nodes === parent.modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 196 /* CallExpression */: @@ -98188,14 +99505,10 @@ var ts; // Check type arguments if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; } - for (var _b = 0, nodes_6 = nodes; _b < nodes_6.length; _b++) { - var node = nodes_6[_b]; - walk(node); - } } function checkModifiers(modifiers, isConstValid) { for (var _i = 0, modifiers_1 = modifiers; _i < modifiers_1.length; _i++) { @@ -98407,7 +99720,7 @@ var ts; } } function getLibFileFromReference(ref) { - var libName = ref.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(ref.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { return getSourceFile(ts.combinePaths(defaultLibraryPath, libFileName)); @@ -98616,7 +99929,7 @@ var ts; file.originalFileName = originalFileName; addFileToRefFileMap(fileName, file, refFile); if (host.useCaseSensitiveFileNames()) { - var pathLowerCase = path.toLowerCase(); + var pathLowerCase = ts.toFileNameLowerCase(path); // for case-sensitive file systems check if we've already seen some file with similar filename ignoring case var existingFile = filesByNameIgnoreCase.get(pathLowerCase); if (existingFile) { @@ -98787,7 +100100,7 @@ var ts; } function processTypeReferenceDirectives(file) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); if (!typeDirectives) { return; } @@ -98796,7 +100109,7 @@ var ts; var ref = file.typeReferenceDirectives[i]; var resolvedTypeReferenceDirective = resolutions[i]; // store resolved type directive on the file - var fileName = ref.fileName.toLocaleLowerCase(); + var fileName = ts.toFileNameLowerCase(ref.fileName); ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective); processTypeReferenceDirective(fileName, resolvedTypeReferenceDirective, { kind: ts.RefFileKind.TypeReferenceDirective, @@ -98858,7 +100171,7 @@ var ts; } function processLibReferenceDirectives(file) { ts.forEach(file.libReferenceDirectives, function (libReference) { - var libName = libReference.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(libReference.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { // we ignore any 'no-default-lib' reference set on this file. @@ -98990,7 +100303,7 @@ var ts; projectReferenceRedirects.set(sourceFilePath, false); return undefined; } - sourceFile = ts.Debug.assertDefined(commandLine.options.configFile); + sourceFile = ts.Debug.checkDefined(commandLine.options.configFile); ts.Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath); addFileToFilesByName(sourceFile, sourceFilePath, /*redirectedPath*/ undefined); } @@ -99055,6 +100368,9 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } + if (!options.listFilesOnly && options.noEmit && ts.isIncrementalCompilation(options)) { + createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); + } verifyProjectReferences(); // List of collected files is complete; validate exhautiveness if this is a project with a file list if (options.composite) { @@ -99233,7 +100549,7 @@ var ts; chain = ts.chainDiagnosticMessages(chain, ts.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file, emitFileName); blockEmittingOfFile(emitFileName, ts.createCompilerDiagnosticFromMessageChain(chain)); } - var emitFileKey = !host.useCaseSensitiveFileNames() ? emitFilePath.toLocaleLowerCase() : emitFilePath; + var emitFileKey = !host.useCaseSensitiveFileNames() ? ts.toFileNameLowerCase(emitFilePath) : emitFilePath; // Report error if multiple files write into same file if (emitFilesSeen.has(emitFileKey)) { // Already seen the same emit file - report error @@ -99251,7 +100567,7 @@ var ts; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } - var refFile = ts.Debug.assertDefined(getSourceFileByPath(refPathToReportErrorOn.file)); + var refFile = ts.Debug.checkDefined(getSourceFileByPath(refPathToReportErrorOn.file)); var kind = refPathToReportErrorOn.kind, index = refPathToReportErrorOn.index; var pos, end; switch (kind) { @@ -99476,7 +100792,7 @@ var ts; return { fileExists: function (f) { return directoryStructureHost.fileExists(f); }, readDirectory: function (root, extensions, excludes, includes, depth) { - ts.Debug.assertDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + ts.Debug.assertIsDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: function (f) { return directoryStructureHost.readFile(f); }, @@ -99694,7 +101010,7 @@ var ts; // Create the reference map, and set the file infos for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) { var sourceFile = _a[_i]; - var version_1 = ts.Debug.assertDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); + var version_1 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined; if (referencedMap) { var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName); @@ -100221,7 +101537,7 @@ var ts; } // With --out or --outFile all outputs go into single file // so operations are performed directly on program, return program - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var compilerOptions = program.getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); @@ -100246,10 +101562,10 @@ var ts; if (affectedFilesPendingEmit) { var seenEmittedFiles = state.seenEmittedFiles || (state.seenEmittedFiles = ts.createMap()); for (var i = state.affectedFilesPendingEmitIndex; i < affectedFilesPendingEmit.length; i++) { - var affectedFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); + var affectedFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); if (affectedFile) { var seenKind = seenEmittedFiles.get(affectedFile.resolvedPath); - var emitKind = ts.Debug.assertDefined(ts.Debug.assertDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); + var emitKind = ts.Debug.checkDefined(ts.Debug.checkDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); if (seenKind === undefined || seenKind < emitKind) { // emit this file state.affectedFilesPendingEmitIndex = i; @@ -100273,7 +101589,7 @@ var ts; if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) { if (!state.cleanedDiagnosticsOfLibFiles) { state.cleanedDiagnosticsOfLibFiles = true; - var program_1 = ts.Debug.assertDefined(state.program); + var program_1 = ts.Debug.checkDefined(state.program); var options_2 = program_1.getCompilerOptions(); ts.forEach(program_1.getSourceFiles(), function (f) { return program_1.isSourceFileDefaultLibrary(f) && @@ -100294,14 +101610,14 @@ var ts; function handleDtsMayChangeOf(state, path, cancellationToken, computeHash) { removeSemanticDiagnosticsOf(state, path); if (!state.changedFilesSet.has(path)) { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var sourceFile = program.getSourceFileByPath(path); if (sourceFile) { // Even though the js emit doesnt change and we are already handling dts emit and semantic diagnostics // we need to update the signature to reflect correctness of the signature(which is output d.ts emit) of this file // This ensures that we dont later during incremental builds considering wrong signature. // Eg where this also is needed to ensure that .tsbuildinfo generated by incremental build should be same as if it was first fresh build - ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.assertDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); + ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); // If not dts emit, nothing more to do if (ts.getEmitDeclarations(state.compilerOptions)) { addToAffectedFilesPendingEmit(state, path, 0 /* DtsOnly */); @@ -100323,8 +101639,8 @@ var ts; return !state.semanticDiagnosticsFromOldState.size; } function isChangedSignagure(state, path) { - var newSignature = ts.Debug.assertDefined(state.currentAffectedFilesSignatures).get(path); - var oldSignagure = ts.Debug.assertDefined(state.fileInfos.get(path)).signature; + var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path); + var oldSignagure = ts.Debug.checkDefined(state.fileInfos.get(path)).signature; return newSignature !== oldSignagure; } /** @@ -100350,7 +101666,7 @@ var ts; seenFileNamesMap.set(currentPath, true); var result = fn(state, currentPath); if (result && isChangedSignagure(state, currentPath)) { - var currentSourceFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(currentPath); + var currentSourceFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(currentPath); queue.push.apply(queue, ts.BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath)); } } @@ -100463,7 +101779,7 @@ var ts; * bindAndCheckDiagnostics (from cache) and program diagnostics */ function getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken) { - return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.assertDefined(state.program).getProgramDiagnostics(sourceFile)); + return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.checkDefined(state.program).getProgramDiagnostics(sourceFile)); } /** * Gets the binder and checker diagnostics either from cache if present, or otherwise from program and caches it @@ -100479,7 +101795,7 @@ var ts; } } // Diagnostics werent cached, get them from program, and cache the result - var diagnostics = ts.Debug.assertDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); + var diagnostics = ts.Debug.checkDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); if (state.semanticDiagnosticsPerFile) { state.semanticDiagnosticsPerFile.set(path, diagnostics); } @@ -100491,7 +101807,7 @@ var ts; function getProgramBuildInfo(state, getCanonicalFileName) { if (state.compilerOptions.outFile || state.compilerOptions.out) return undefined; - var currentDirectory = ts.Debug.assertDefined(state.program).getCurrentDirectory(); + var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory(); var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory)); var fileInfos = {}; state.fileInfos.forEach(function (value, key) { @@ -100657,10 +101973,10 @@ var ts; backupState = cloneBuilderProgramState(state); }; builderProgram.restoreState = function () { - state = ts.Debug.assertDefined(backupState); + state = ts.Debug.checkDefined(backupState); backupState = undefined; }; - builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.assertDefined(state.program), sourceFile); }; + builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); }; builderProgram.getSemanticDiagnostics = getSemanticDiagnostics; builderProgram.emit = emit; builderProgram.releaseProgram = function () { @@ -100694,7 +102010,7 @@ var ts; if (state.emittedBuildInfo) { return undefined; } - var affected_1 = ts.Debug.assertDefined(state.program); + var affected_1 = ts.Debug.checkDefined(state.program); return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file @@ -100706,7 +102022,7 @@ var ts; isPendingEmitFile = true; } else { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); if (state.programEmitComplete) return undefined; affected = program; @@ -100715,7 +102031,7 @@ var ts; return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file - ts.Debug.assertDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */, customTransformers), affected, emitKind, isPendingEmitFile); + ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */, customTransformers), affected, emitKind, isPendingEmitFile); } /** * Emits the JavaScript and declaration files. @@ -100755,7 +102071,7 @@ var ts; }; } } - return ts.Debug.assertDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); + return ts.Debug.checkDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); } /** * Return the semantic diagnostics for the next affected file or undefined if iteration is complete @@ -100795,11 +102111,11 @@ var ts; */ function getSemanticDiagnostics(sourceFile, cancellationToken) { assertSourceFileOkWithoutNextAffectedCall(state, sourceFile); - var compilerOptions = ts.Debug.assertDefined(state.program).getCompilerOptions(); + var compilerOptions = ts.Debug.checkDefined(state.program).getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); // We dont need to cache the diagnostics just return them from program - return ts.Debug.assertDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); + return ts.Debug.checkDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); } if (sourceFile) { return getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken); @@ -100810,7 +102126,7 @@ var ts; while (getSemanticDiagnosticsOfNextAffectedFile(cancellationToken)) { } var diagnostics; - for (var _i = 0, _a = ts.Debug.assertDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { + for (var _i = 0, _a = ts.Debug.checkDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { var sourceFile_1 = _a[_i]; diagnostics = ts.addRange(diagnostics, getSemanticDiagnosticsOfFile(state, sourceFile_1, cancellationToken)); } @@ -100918,7 +102234,7 @@ var ts; close: ts.noop, }; function getProgram() { - return ts.Debug.assertDefined(state.program); + return ts.Debug.checkDefined(state.program); } } ts.createRedirectedBuilderProgram = createRedirectedBuilderProgram; @@ -101025,6 +102341,7 @@ var ts; var directoryWatchesOfFailedLookups = ts.createMap(); var rootDir = rootDirForResolution && ts.removeTrailingDirectorySeparator(ts.getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory())); var rootPath = (rootDir && resolutionHost.toPath(rootDir)); // TODO: GH#18217 + var rootSplitLength = rootPath !== undefined ? rootPath.split(ts.directorySeparator).length : 0; // TypeRoot watches for the types that get added as part of getAutomaticTypeDirectiveNames var typeRootsWatches = ts.createMap(); return { @@ -101126,7 +102443,7 @@ var ts; if (globalCache !== undefined && !ts.isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && ts.extensionIsTS(primaryResult.resolvedModule.extension))) { // create different collection of failed lookup locations for second pass // if it will fail and we've already found something during the first pass - we don't want to pollute its results - var _a = ts.loadModuleFromGlobalCache(ts.Debug.assertDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; + var _a = ts.loadModuleFromGlobalCache(ts.Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; if (resolvedModule) { return { resolvedModule: resolvedModule, failedLookupLocations: ts.addRange(primaryResult.failedLookupLocations, failedLookupLocations) }; } @@ -101235,15 +102552,23 @@ var ts; if (isInDirectoryPath(rootPath, failedLookupLocationPath)) { // Ensure failed look up is normalized path failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory()); - ts.Debug.assert(failedLookupLocation.length === failedLookupLocationPath.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); - var subDirectoryInRoot = failedLookupLocationPath.indexOf(ts.directorySeparator, rootPath.length + 1); - if (subDirectoryInRoot !== -1) { + var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator); + var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator); + ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); + if (failedLookupPathSplit.length > rootSplitLength + 1) { // Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution - return { dir: failedLookupLocation.substr(0, subDirectoryInRoot), dirPath: failedLookupLocationPath.substr(0, subDirectoryInRoot) }; + return { + dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator), + dirPath: failedLookupPathSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator) + }; } else { // Always watch root directory non recursively - return { dir: rootDir, dirPath: rootPath, nonRecursive: false }; // TODO: GH#18217 + return { + dir: rootDir, + dirPath: rootPath, + nonRecursive: false + }; } } return getDirectoryToWatchFromFailedLookupLocationDirectory(ts.getDirectoryPath(ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory())), ts.getDirectoryPath(failedLookupLocationPath)); @@ -101447,7 +102772,7 @@ var ts; resolution.isInvalidated = true; (filesWithInvalidatedResolutions || (filesWithInvalidatedResolutions = ts.createMap())).set(containingFilePath, true); // When its a file with inferred types resolution, invalidate type reference directive resolution - if (containingFilePath.endsWith(ts.inferredTypesContainingFile)) { + if (ts.endsWith(containingFilePath, ts.inferredTypesContainingFile)) { resolutionHost.onChangedAutomaticTypeDirectiveNames(); } } @@ -102301,7 +103626,7 @@ var ts; var getDefaultLibLocation = ts.memoize(function () { return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath())); }); var host = system; // TODO: `host` is unused! - // eslint-disable-next-line no-unused-expressions + // eslint-disable-next-line @typescript-eslint/no-unused-expressions host; return { useCaseSensitiveFileNames: function () { return system.useCaseSensitiveFileNames; }, @@ -102841,7 +104166,7 @@ var ts; return watchDirectory(host, directory, function (fileOrDirectory) { ts.Debug.assert(!!configFileName); var fileOrDirectoryPath = toPath(fileOrDirectory); - // Since the file existance changed, update the sourceFiles cache + // Since the file existence changed, update the sourceFiles cache if (cachedDirectoryStructureHost) { cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); } @@ -103027,7 +104352,7 @@ var ts; if (!compilerHost.resolveModuleNames) { var loader_3 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference).resolvedModule; }; compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference) { - return ts.loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_3); + return ts.loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_3); }; } var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchFilePath = _a.watchFilePath, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog; @@ -103413,7 +104738,7 @@ var ts; if (state.options.verbose) reportStatus(state, ts.Diagnostics.Building_project_0, project); if (config.fileNames.length === 0) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); // Nothing to build - must be a solution file, basically buildResult = BuildResultFlags.None; step = Step.QueueReferencingProjects; @@ -103424,7 +104749,7 @@ var ts; // Update module resolution cache if needed updateModuleResolutionCache(state, project, config); // Create program - program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), config.errors, config.projectReferences); + program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences); step++; } function handleDiagnostics(diagnostics, errorFlags, errorType) { @@ -103437,14 +104762,14 @@ var ts; } } function getSyntaxDiagnostics(cancellationToken) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); handleDiagnostics(__spreadArrays(program.getConfigFileParsingDiagnostics(), program.getOptionsDiagnostics(cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken)), BuildResultFlags.SyntaxErrors, "Syntactic"); } function getSemanticDiagnostics(cancellationToken) { - handleDiagnostics(ts.Debug.assertDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); + handleDiagnostics(ts.Debug.checkDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); } function emit(writeFileCallback, cancellationToken, customTransformers) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); ts.Debug.assert(step === Step.Emit); // Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly program.backupState(); @@ -103578,11 +104903,11 @@ var ts; emitBundle(writeFile, customTransformers); break; case Step.BuildInvalidatedProjectOfBundle: - ts.Debug.assertDefined(invalidatedProjectOfBundle).done(cancellationToken); + ts.Debug.checkDefined(invalidatedProjectOfBundle).done(cancellationToken); step = Step.Done; break; case Step.QueueReferencingProjects: - queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.assertDefined(buildResult)); + queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.checkDefined(buildResult)); step++; break; // Should never be done @@ -103599,7 +104924,7 @@ var ts; if (status.type !== ts.UpToDateStatusType.OutOfDateWithPrepend || options.force) return true; return config.fileNames.length === 0 || - !!config.errors.length || + !!ts.getConfigFileParsingDiagnostics(config).length || !ts.isIncrementalCompilation(config.options); } function getNextInvalidatedProject(state, buildOrder, reportQueue) { @@ -103646,7 +104971,7 @@ var ts; verboseReportProjectStatus(state, project, status); if (!options.force) { if (status.type === ts.UpToDateStatusType.UpToDate) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); // Up to date, skip if (options.dry) { @@ -103656,12 +104981,12 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); return createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder); } } if (status.type === ts.UpToDateStatusType.UpstreamBlocked) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); if (options.verbose) { reportStatus(state, status.upstreamProjectBlocked ? @@ -103671,7 +104996,7 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.ContainerOnly) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); // Do nothing continue; @@ -105091,7 +106416,7 @@ var ts; case 247 /* TypeAliasDeclaration */: case 173 /* TypeLiteral */: return 2 /* Type */; - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: // If it has no name node, it shares the name with the value declaration below it. return node.name === undefined ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; case 284 /* EnumMember */: @@ -105123,6 +106448,7 @@ var ts; } ts.getMeaningFromDeclaration = getMeaningFromDeclaration; function getMeaningFromLocation(node) { + node = getAdjustedReferenceLocation(node); if (node.kind === 290 /* SourceFile */) { return 1 /* Value */; } @@ -105407,8 +106733,8 @@ var ts; return "class" /* classElement */; case 246 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; case 247 /* TypeAliasDeclaration */: - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: return "type" /* typeElement */; case 248 /* EnumDeclaration */: return "enum" /* enumElement */; case 242 /* VariableDeclaration */: @@ -105474,6 +106800,10 @@ var ts; } case 75 /* Identifier */: return ts.isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; + case 259 /* ExportAssignment */: + var scriptKind = getNodeKind(node.expression); + // If the expression didn't come back with something (like it does for an identifiers) + return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: return "" /* unknown */; } @@ -105720,6 +107050,339 @@ var ts; return syntaxList; } ts.findContainingList = findContainingList; + function isDefaultModifier(node) { + return node.kind === 84 /* DefaultKeyword */; + } + function isClassKeyword(node) { + return node.kind === 80 /* ClassKeyword */; + } + function isFunctionKeyword(node) { + return node.kind === 94 /* FunctionKeyword */; + } + function getAdjustedLocationForClass(node) { + if (ts.isNamedDeclaration(node)) { + return node.name; + } + if (ts.isClassDeclaration(node)) { + // for class and function declarations, use the `default` modifier + // when the declaration is unnamed. + var defaultModifier = ts.find(node.modifiers, isDefaultModifier); + if (defaultModifier) + return defaultModifier; + } + if (ts.isClassExpression(node)) { + // for class expressions, use the `class` keyword when the class is unnamed + var classKeyword = ts.find(node.getChildren(), isClassKeyword); + if (classKeyword) + return classKeyword; + } + } + function getAdjustedLocationForFunction(node) { + if (ts.isNamedDeclaration(node)) { + return node.name; + } + if (ts.isFunctionDeclaration(node)) { + // for class and function declarations, use the `default` modifier + // when the declaration is unnamed. + var defaultModifier = ts.find(node.modifiers, isDefaultModifier); + if (defaultModifier) + return defaultModifier; + } + if (ts.isFunctionExpression(node)) { + // for function expressions, use the `function` keyword when the function is unnamed + var functionKeyword = ts.find(node.getChildren(), isFunctionKeyword); + if (functionKeyword) + return functionKeyword; + } + } + function getAdjustedLocationForDeclaration(node, forRename) { + if (!forRename) { + switch (node.kind) { + case 245 /* ClassDeclaration */: + case 214 /* ClassExpression */: + return getAdjustedLocationForClass(node); + case 244 /* FunctionDeclaration */: + case 201 /* FunctionExpression */: + return getAdjustedLocationForFunction(node); + } + } + if (ts.isNamedDeclaration(node)) { + return node.name; + } + } + function getAdjustedLocationForImportDeclaration(node, forRename) { + if (node.importClause) { + if (node.importClause.name && node.importClause.namedBindings) { + // do not adjust if we have both a name and named bindings + return; + } + // /**/import [|name|] from ...; + // import /**/type [|name|] from ...; + if (node.importClause.name) { + return node.importClause.name; + } + // /**/import { [|name|] } from ...; + // /**/import { propertyName as [|name|] } from ...; + // /**/import * as [|name|] from ...; + // import /**/type { [|name|] } from ...; + // import /**/type { propertyName as [|name|] } from ...; + // import /**/type * as [|name|] from ...; + if (node.importClause.namedBindings) { + if (ts.isNamedImports(node.importClause.namedBindings)) { + // do nothing if there is more than one binding + var onlyBinding = ts.singleOrUndefined(node.importClause.namedBindings.elements); + if (!onlyBinding) { + return; + } + return onlyBinding.name; + } + else if (ts.isNamespaceImport(node.importClause.namedBindings)) { + return node.importClause.namedBindings.name; + } + } + } + if (!forRename) { + // /**/import "[|module|]"; + // /**/import ... from "[|module|]"; + // import /**/type ... from "[|module|]"; + return node.moduleSpecifier; + } + } + function getAdjustedLocationForExportDeclaration(node, forRename) { + if (node.exportClause) { + // /**/export { [|name|] } ... + // /**/export { propertyName as [|name|] } ... + // /**/export * as [|name|] ... + // export /**/type { [|name|] } from ... + // export /**/type { propertyName as [|name|] } from ... + // export /**/type * as [|name|] ... + if (ts.isNamedExports(node.exportClause)) { + // do nothing if there is more than one binding + var onlyBinding = ts.singleOrUndefined(node.exportClause.elements); + if (!onlyBinding) { + return; + } + return node.exportClause.elements[0].name; + } + else if (ts.isNamespaceExport(node.exportClause)) { + return node.exportClause.name; + } + } + if (!forRename) { + // /**/export * from "[|module|]"; + // export /**/type * from "[|module|]"; + return node.moduleSpecifier; + } + } + function getAdjustedLocationForHeritageClause(node) { + // /**/extends [|name|] + // /**/implements [|name|] + if (node.types.length === 1) { + return node.types[0].expression; + } + // /**/extends name1, name2 ... + // /**/implements name1, name2 ... + } + function getAdjustedLocation(node, forRename) { + var parent = node.parent; + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/import [|name|] = ... + // + // NOTE: If the node is a modifier, we don't adjust its location if it is the `default` modifier as that is handled + // specially by `getSymbolAtLocation`. + if (ts.isModifier(node) && (forRename || node.kind !== 84 /* DefaultKeyword */) ? ts.contains(parent.modifiers, node) : + node.kind === 80 /* ClassKeyword */ ? ts.isClassDeclaration(parent) || ts.isClassExpression(node) : + node.kind === 94 /* FunctionKeyword */ ? ts.isFunctionDeclaration(parent) || ts.isFunctionExpression(node) : + node.kind === 114 /* InterfaceKeyword */ ? ts.isInterfaceDeclaration(parent) : + node.kind === 88 /* EnumKeyword */ ? ts.isEnumDeclaration(parent) : + node.kind === 145 /* TypeKeyword */ ? ts.isTypeAliasDeclaration(parent) : + node.kind === 136 /* NamespaceKeyword */ || node.kind === 135 /* ModuleKeyword */ ? ts.isModuleDeclaration(parent) : + node.kind === 96 /* ImportKeyword */ ? ts.isImportEqualsDeclaration(parent) : + node.kind === 131 /* GetKeyword */ ? ts.isGetAccessorDeclaration(parent) : + node.kind === 142 /* SetKeyword */ && ts.isSetAccessorDeclaration(parent)) { + var location = getAdjustedLocationForDeclaration(parent, forRename); + if (location) { + return location; + } + } + // /**/ [|name|] ... + if ((node.kind === 109 /* VarKeyword */ || node.kind === 81 /* ConstKeyword */ || node.kind === 115 /* LetKeyword */) && + ts.isVariableDeclarationList(parent) && parent.declarations.length === 1) { + var decl = parent.declarations[0]; + if (ts.isIdentifier(decl.name)) { + return decl.name; + } + } + if (node.kind === 145 /* TypeKeyword */) { + // import /**/type [|name|] from ...; + // import /**/type { [|name|] } from ...; + // import /**/type { propertyName as [|name|] } from ...; + // import /**/type ... from "[|module|]"; + if (ts.isImportClause(parent) && parent.isTypeOnly) { + var location = getAdjustedLocationForImportDeclaration(parent.parent, forRename); + if (location) { + return location; + } + } + // export /**/type { [|name|] } from ...; + // export /**/type { propertyName as [|name|] } from ...; + // export /**/type * from "[|module|]"; + // export /**/type * as ... from "[|module|]"; + if (ts.isExportDeclaration(parent) && parent.isTypeOnly) { + var location = getAdjustedLocationForExportDeclaration(parent, forRename); + if (location) { + return location; + } + } + } + // import { propertyName /**/as [|name|] } ... + // import * /**/as [|name|] ... + // export { propertyName /**/as [|name|] } ... + // export * /**/as [|name|] ... + if (node.kind === 123 /* AsKeyword */) { + if (ts.isImportSpecifier(parent) && parent.propertyName || + ts.isExportSpecifier(parent) && parent.propertyName || + ts.isNamespaceImport(parent) || + ts.isNamespaceExport(parent)) { + return parent.name; + } + if (ts.isExportDeclaration(parent) && parent.exportClause && ts.isNamespaceExport(parent.exportClause)) { + return parent.exportClause.name; + } + } + // /**/import [|name|] from ...; + // /**/import { [|name|] } from ...; + // /**/import { propertyName as [|name|] } from ...; + // /**/import ... from "[|module|]"; + // /**/import "[|module|]"; + if (node.kind === 96 /* ImportKeyword */ && ts.isImportDeclaration(parent)) { + var location = getAdjustedLocationForImportDeclaration(parent, forRename); + if (location) { + return location; + } + } + if (node.kind === 89 /* ExportKeyword */) { + // /**/export { [|name|] } ...; + // /**/export { propertyName as [|name|] } ...; + // /**/export * from "[|module|]"; + // /**/export * as ... from "[|module|]"; + if (ts.isExportDeclaration(parent)) { + var location = getAdjustedLocationForExportDeclaration(parent, forRename); + if (location) { + return location; + } + } + // NOTE: We don't adjust the location of the `default` keyword as that is handled specially by `getSymbolAtLocation`. + // /**/export default [|name|]; + // /**/export = [|name|]; + if (ts.isExportAssignment(parent)) { + return ts.skipOuterExpressions(parent.expression); + } + } + // import name = /**/require("[|module|]"); + if (node.kind === 139 /* RequireKeyword */ && ts.isExternalModuleReference(parent)) { + return parent.expression; + } + // import ... /**/from "[|module|]"; + // export ... /**/from "[|module|]"; + if (node.kind === 149 /* FromKeyword */ && (ts.isImportDeclaration(parent) || ts.isExportDeclaration(parent)) && parent.moduleSpecifier) { + return parent.moduleSpecifier; + } + // class ... /**/extends [|name|] ... + // class ... /**/implements [|name|] ... + // class ... /**/implements name1, name2 ... + // interface ... /**/extends [|name|] ... + // interface ... /**/extends name1, name2 ... + if ((node.kind === 90 /* ExtendsKeyword */ || node.kind === 113 /* ImplementsKeyword */) && ts.isHeritageClause(parent) && parent.token === node.kind) { + var location = getAdjustedLocationForHeritageClause(parent); + if (location) { + return location; + } + } + if (node.kind === 90 /* ExtendsKeyword */) { + // ... ... + if (ts.isTypeParameterDeclaration(parent) && parent.constraint && ts.isTypeReferenceNode(parent.constraint)) { + return parent.constraint.typeName; + } + // ... T /**/extends [|U|] ? ... + if (ts.isConditionalTypeNode(parent) && ts.isTypeReferenceNode(parent.extendsType)) { + return parent.extendsType.typeName; + } + } + // ... T extends /**/infer [|U|] ? ... + if (node.kind === 132 /* InferKeyword */ && ts.isInferTypeNode(parent)) { + return parent.typeParameter.name; + } + // { [ [|K|] /**/in keyof T]: ... } + if (node.kind === 97 /* InKeyword */ && ts.isTypeParameterDeclaration(parent) && ts.isMappedTypeNode(parent.parent)) { + return parent.name; + } + // /**/keyof [|T|] + if (node.kind === 134 /* KeyOfKeyword */ && ts.isTypeOperatorNode(parent) && parent.operator === 134 /* KeyOfKeyword */ && + ts.isTypeReferenceNode(parent.type)) { + return parent.type.typeName; + } + // /**/readonly [|name|][] + if (node.kind === 138 /* ReadonlyKeyword */ && ts.isTypeOperatorNode(parent) && parent.operator === 138 /* ReadonlyKeyword */ && + ts.isArrayTypeNode(parent.type) && ts.isTypeReferenceNode(parent.type.elementType)) { + return parent.type.elementType.typeName; + } + if (!forRename) { + // /**/new [|name|] + // /**/void [|name|] + // /**/void obj.[|name|] + // /**/typeof [|name|] + // /**/typeof obj.[|name|] + // /**/await [|name|] + // /**/await obj.[|name|] + // /**/yield [|name|] + // /**/yield obj.[|name|] + // /**/delete obj.[|name|] + if (node.kind === 99 /* NewKeyword */ && ts.isNewExpression(parent) || + node.kind === 110 /* VoidKeyword */ && ts.isVoidExpression(parent) || + node.kind === 108 /* TypeOfKeyword */ && ts.isTypeOfExpression(parent) || + node.kind === 127 /* AwaitKeyword */ && ts.isAwaitExpression(parent) || + node.kind === 121 /* YieldKeyword */ && ts.isYieldExpression(parent) || + node.kind === 85 /* DeleteKeyword */ && ts.isDeleteExpression(parent)) { + if (parent.expression) { + return ts.skipOuterExpressions(parent.expression); + } + } + // left /**/in [|name|] + // left /**/instanceof [|name|] + if ((node.kind === 97 /* InKeyword */ || node.kind === 98 /* InstanceOfKeyword */) && ts.isBinaryExpression(parent) && parent.operatorToken === node) { + return ts.skipOuterExpressions(parent.right); + } + // left /**/as [|name|] + if (node.kind === 123 /* AsKeyword */ && ts.isAsExpression(parent) && ts.isTypeReferenceNode(parent.type)) { + return parent.type.typeName; + } + // for (... /**/in [|name|]) + // for (... /**/of [|name|]) + if (node.kind === 97 /* InKeyword */ && ts.isForInStatement(parent) || + node.kind === 152 /* OfKeyword */ && ts.isForOfStatement(parent)) { + return ts.skipOuterExpressions(parent.expression); + } + } + return node; + } + /** + * Adjusts the location used for "find references" and "go to definition" when the cursor was not + * on a property name. + */ + function getAdjustedReferenceLocation(node) { + return getAdjustedLocation(node, /*forRename*/ false); + } + ts.getAdjustedReferenceLocation = getAdjustedReferenceLocation; + /** + * Adjusts the location used for "rename" when the cursor was not on a property name. + */ + function getAdjustedRenameLocation(node) { + return getAdjustedLocation(node, /*forRename*/ true); + } + ts.getAdjustedRenameLocation = getAdjustedRenameLocation; /** * Gets the token whose text has range [start, end) and * position >= start and (position < end or (position === end && token is literal or keyword or identifier)) @@ -106116,6 +107779,8 @@ var ts; result.push("export" /* exportedModifier */); if (node.flags & 8388608 /* Ambient */) result.push("declare" /* ambientModifier */); + if (node.kind === 259 /* ExportAssignment */) + result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } ts.getNodeModifiers = getNodeModifiers; @@ -106232,6 +107897,7 @@ var ts; ts.createTextChange = createTextChange; ts.typeKeywords = [ 125 /* AnyKeyword */, + 124 /* AssertsKeyword */, 151 /* BigIntKeyword */, 128 /* BooleanKeyword */, 91 /* FalseKeyword */, @@ -106253,6 +107919,10 @@ var ts; return ts.contains(ts.typeKeywords, kind); } ts.isTypeKeyword = isTypeKeyword; + function isTypeKeywordToken(node) { + return node.kind === 145 /* TypeKeyword */; + } + ts.isTypeKeywordToken = isTypeKeywordToken; /** True if the symbol is for an external module, as opposed to a namespace. */ function isExternalModuleSymbol(moduleSymbol) { return !!(moduleSymbol.flags & 1536 /* Module */) && moduleSymbol.name.charCodeAt(0) === 34 /* doubleQuote */; @@ -106425,16 +108095,21 @@ var ts; return node.modifiers && ts.find(node.modifiers, function (m) { return m.kind === kind; }); } ts.findModifier = findModifier; - function insertImport(changes, sourceFile, importDecl) { + function insertImport(changes, sourceFile, importDecl, blankLineBetween) { var lastImportDeclaration = ts.findLast(sourceFile.statements, ts.isAnyImportSyntax); if (lastImportDeclaration) { changes.insertNodeAfter(sourceFile, lastImportDeclaration, importDecl); } else { - changes.insertNodeAtTopOfFile(sourceFile, importDecl, /*blankLineBetween*/ true); + changes.insertNodeAtTopOfFile(sourceFile, importDecl, blankLineBetween); } } ts.insertImport = insertImport; + function getTypeKeywordOfTypeOnlyImport(importClause, sourceFile) { + ts.Debug.assert(importClause.isTypeOnly); + return ts.cast(importClause.getChildAt(0, sourceFile), isTypeKeywordToken); + } + ts.getTypeKeywordOfTypeOnlyImport = getTypeKeywordOfTypeOnlyImport; function textSpansEqual(a, b) { return !!a && !!b && a.start === b.start && a.length === b.length; } @@ -106946,9 +108621,6 @@ var ts; } ts.getContextualTypeFromParent = getContextualTypeFromParent; function quote(text, preferences) { - if (/^\d+$/.test(text)) { - return text; - } // Editors can pass in undefined or empty string - we want to infer the preference in those cases. var quotePreference = preferences.quotePreference || "auto"; var quoted = JSON.stringify(text); @@ -107335,6 +109007,15 @@ var ts; return ts.isArray(valueOrArray) ? ts.first(valueOrArray) : valueOrArray; } ts.firstOrOnly = firstOrOnly; + function getNameForExportedSymbol(symbol, scriptTarget) { + if (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */) { + // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. + return ts.firstDefined(symbol.declarations, function (d) { return ts.isExportAssignment(d) && ts.isIdentifier(d.expression) ? d.expression.text : undefined; }) + || ts.codefix.moduleSymbolToValidIdentifier(ts.Debug.checkDefined(symbol.parent), scriptTarget); + } + return symbol.name; + } + ts.getNameForExportedSymbol = getNameForExportedSymbol; // #endregion })(ts || (ts = {})); var ts; @@ -107465,7 +109146,7 @@ var ts; if (templateStack.length > 0) { var lastTemplateStackToken = ts.lastOrUndefined(templateStack); if (lastTemplateStackToken === 15 /* TemplateHead */) { - token = scanner.reScanTemplateToken(); + token = scanner.reScanTemplateToken(/* isTaggedTemplate */ false); // Only pop on a TemplateTail; a TemplateMiddle indicates there is more for us. if (token === 17 /* TemplateTail */) { templateStack.pop(); @@ -107996,18 +109677,18 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); // e.g. "param" pos = tag.tagName.end; switch (tag.kind) { - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: processJSDocParameterTag(tag); break; - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; break; - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; break; - case 317 /* JSDocReturnTag */: + case 318 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; break; @@ -108308,9 +109989,10 @@ var ts; return entries && convertPathCompletions(entries); } if (ts.isInString(sourceFile, position, contextToken)) { - return !contextToken || !ts.isStringLiteralLike(contextToken) - ? undefined - : convertStringLiteralCompletions(getStringLiteralCompletionEntries(sourceFile, contextToken, position, checker, options, host), sourceFile, checker, log, preferences); + if (!contextToken || !ts.isStringLiteralLike(contextToken)) + return undefined; + var entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, checker, options, host); + return convertStringLiteralCompletions(entries, sourceFile, checker, log, preferences); } } StringCompletions.getStringLiteralCompletions = getStringLiteralCompletions; @@ -108492,7 +110174,11 @@ var ts; return { kind: 2 /* Types */, types: types, isNewIdentifier: isNewIdentifier }; } function stringLiteralCompletionsFromProperties(type) { - return type && { kind: 1 /* Properties */, symbols: type.getApparentProperties(), hasIndexSignature: ts.hasIndexSignature(type) }; + return type && { + kind: 1 /* Properties */, + symbols: type.getApparentProperties().filter(function (prop) { return !ts.isPrivateIdentifierPropertyDeclaration(prop.valueDeclaration); }), + hasIndexSignature: ts.hasIndexSignature(type) + }; } function getStringLiteralTypes(type, uniques) { if (uniques === void 0) { uniques = ts.createMap(); } @@ -108939,7 +110625,7 @@ var ts; return !!(origin.kind & 2 /* SymbolMember */); } function originIsExport(origin) { - return !!(origin.kind & 4 /* Export */); + return !!(origin && origin.kind & 4 /* Export */); } function originIsPromise(origin) { return !!(origin.kind & 8 /* Promise */); @@ -109089,7 +110775,7 @@ var ts; } for (var _b = 0, literals_1 = literals; _b < literals_1.length; _b++) { var literal = literals_1[_b]; - entries.push(createCompletionEntryForLiteral(literal)); + entries.push(createCompletionEntryForLiteral(literal, preferences)); } return { isGlobalCompletion: isInSnippetScope, isMemberCompletion: isMemberCompletionKind(completionKind), isNewIdentifierLocation: isNewIdentifierLocation, entries: entries }; } @@ -109118,16 +110804,18 @@ var ts; name: realName, kind: "warning" /* warning */, kindModifiers: "", - sortText: SortText.JavascriptIdentifiers + sortText: SortText.JavascriptIdentifiers, + isFromUncheckedFile: true }); } }); } - var completionNameForLiteral = function (literal) { - return typeof literal === "object" ? ts.pseudoBigIntToString(literal) + "n" : JSON.stringify(literal); - }; - function createCompletionEntryForLiteral(literal) { - return { name: completionNameForLiteral(literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; + function completionNameForLiteral(literal, preferences) { + return typeof literal === "object" ? ts.pseudoBigIntToString(literal) + "n" : + ts.isString(literal) ? ts.quote(literal, preferences) : JSON.stringify(literal); + } + function createCompletionEntryForLiteral(literal, preferences) { + return { name: completionNameForLiteral(literal, preferences), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; } function createCompletionEntry(symbol, sortText, location, sourceFile, typeChecker, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, preferences) { var insertText; @@ -109136,13 +110824,13 @@ var ts; var useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess; if (origin && originIsThisType(origin)) { insertText = needsConvertPropertyAccess - ? "this" + (insertQuestionDot ? "?." : "") + "[" + ts.quote(name, preferences) + "]" + ? "this" + (insertQuestionDot ? "?." : "") + "[" + quotePropertyName(name, preferences) + "]" : "this" + (insertQuestionDot ? "?." : ".") + name; } // We should only have needsConvertPropertyAccess if there's a property access to convert. But see #21790. // Somehow there was a global with a non-identifier name. Hopefully someone will complain about getting a "foo bar" global completion and provide a repro. else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) { - insertText = useBraces ? needsConvertPropertyAccess ? "[" + ts.quote(name, preferences) + "]" : "[" + name + "]" : name; + insertText = useBraces ? needsConvertPropertyAccess ? "[" + quotePropertyName(name, preferences) + "]" : "[" + name + "]" : name; if (insertQuestionDot || propertyAccessToConvert.questionDotToken) { insertText = "?." + insertText; } @@ -109191,19 +110879,22 @@ var ts; kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol), sortText: sortText, source: getSourceFromOrigin(origin), - hasAction: trueOrUndefined(!!origin && originIsExport(origin)), - isRecommended: trueOrUndefined(isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker)), + hasAction: origin && originIsExport(origin) || undefined, + isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || undefined, insertText: insertText, replacementSpan: replacementSpan, }; } + function quotePropertyName(name, preferences) { + if (/^\d+$/.test(name)) { + return name; + } + return ts.quote(name, preferences); + } function isRecommendedCompletionMatch(localSymbol, recommendedCompletion, checker) { return localSymbol === recommendedCompletion || !!(localSymbol.flags & 1048576 /* ExportValue */) && checker.getExportSymbolOfSymbol(localSymbol) === recommendedCompletion; } - function trueOrUndefined(b) { - return b ? true : undefined; - } function getSourceFromOrigin(origin) { return origin && originIsExport(origin) ? ts.stripQuotes(origin.moduleSymbol.name) : undefined; } @@ -109269,7 +110960,7 @@ var ts; } return entries; } - function getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host) { + function getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences) { var compilerOptions = program.getCompilerOptions(); var completionData = getCompletionData(program, log, sourceFile, isUncheckedFile(sourceFile, compilerOptions), position, { includeCompletionsForModuleExports: true, includeCompletionsWithInsertText: true }, entryId, host); if (!completionData) { @@ -109278,8 +110969,8 @@ var ts; if (completionData.kind !== 0 /* Data */) { return { type: "request", request: completionData }; } - var symbols = completionData.symbols, literals = completionData.literals, location = completionData.location, completionKind = completionData.completionKind, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, previousToken = completionData.previousToken, isJsxInitializer = completionData.isJsxInitializer; - var literal = ts.find(literals, function (l) { return completionNameForLiteral(l) === entryId.name; }); + var symbols = completionData.symbols, literals = completionData.literals, location = completionData.location, completionKind = completionData.completionKind, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, previousToken = completionData.previousToken, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation; + var literal = ts.find(literals, function (l) { return completionNameForLiteral(l, preferences) === entryId.name; }); if (literal !== undefined) return { type: "literal", literal: literal }; // Find the symbol with the matching entry name. @@ -109290,18 +110981,10 @@ var ts; var origin = symbolToOriginInfoMap[ts.getSymbolId(symbol)]; var info = getCompletionEntryDisplayNameForSymbol(symbol, compilerOptions.target, origin, completionKind); return info && info.name === entryId.name && getSourceFromOrigin(origin) === entryId.source - ? { type: "symbol", symbol: symbol, location: location, symbolToOriginInfoMap: symbolToOriginInfoMap, previousToken: previousToken, isJsxInitializer: isJsxInitializer } + ? { type: "symbol", symbol: symbol, location: location, symbolToOriginInfoMap: symbolToOriginInfoMap, previousToken: previousToken, isJsxInitializer: isJsxInitializer, isTypeOnlyLocation: isTypeOnlyLocation } : undefined; }) || { type: "none" }; } - function getSymbolName(symbol, origin, target) { - return origin && originIsExport(origin) && ((origin.isDefaultExport && symbol.escapedName === "default" /* Default */) || - (symbol.escapedName === "export=" /* ExportEquals */)) - // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. - ? ts.firstDefined(symbol.declarations, function (d) { return ts.isExportAssignment(d) && ts.isIdentifier(d.expression) ? d.expression.text : undefined; }) - || ts.codefix.moduleSymbolToValidIdentifier(origin.moduleSymbol, target) - : symbol.name; - } function getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) { var typeChecker = program.getTypeChecker(); var compilerOptions = program.getCompilerOptions(); @@ -109311,7 +110994,7 @@ var ts; return Completions.StringCompletions.getStringLiteralCompletionDetails(name, sourceFile, position, contextToken, typeChecker, compilerOptions, host, cancellationToken); } // Compute all the completion symbols again. - var symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host); + var symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); switch (symbolCompletion.type) { case "request": { var request = symbolCompletion.request; @@ -109333,7 +111016,7 @@ var ts; } case "literal": { var literal = symbolCompletion.literal; - return createSimpleDetails(completionNameForLiteral(literal), "string" /* string */, typeof literal === "string" ? ts.SymbolDisplayPartKind.stringLiteral : ts.SymbolDisplayPartKind.numericLiteral); + return createSimpleDetails(completionNameForLiteral(literal, preferences), "string" /* string */, typeof literal === "string" ? ts.SymbolDisplayPartKind.stringLiteral : ts.SymbolDisplayPartKind.numericLiteral); } case "none": // Didn't find a symbol with this name. See if we can find a keyword instead. @@ -109364,11 +111047,11 @@ var ts; } var moduleSymbol = symbolOriginInfo.moduleSymbol; var exportedSymbol = checker.getMergedSymbol(ts.skipAlias(symbol.exportSymbol || symbol, checker)); - var _a = ts.codefix.getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, getSymbolName(symbol, symbolOriginInfo, compilerOptions.target), host, program, formatContext, previousToken && ts.isIdentifier(previousToken) ? previousToken.getStart(sourceFile) : position, preferences), moduleSpecifier = _a.moduleSpecifier, codeAction = _a.codeAction; + var _a = ts.codefix.getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, ts.getNameForExportedSymbol(symbol, compilerOptions.target), host, program, formatContext, previousToken && ts.isIdentifier(previousToken) ? previousToken.getStart(sourceFile) : position, preferences), moduleSpecifier = _a.moduleSpecifier, codeAction = _a.codeAction; return { sourceDisplay: [ts.textPart(moduleSpecifier)], codeActions: [codeAction] }; } - function getCompletionEntrySymbol(program, log, sourceFile, position, entryId, host) { - var completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host); + function getCompletionEntrySymbol(program, log, sourceFile, position, entryId, host, preferences) { + var completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); return completion.type === "symbol" ? completion.symbol : undefined; } Completions.getCompletionEntrySymbol = getCompletionEntrySymbol; @@ -109493,7 +111176,7 @@ var ts; currentToken = ts.getTokenAtPosition(sourceFile, position); if (!currentToken || (!ts.isDeclarationName(currentToken) && - (currentToken.parent.kind !== 322 /* JSDocPropertyTag */ || + (currentToken.parent.kind !== 323 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken))) { // Use as type location if inside tag's type expression insideJsDocTagTypeExpression = isCurrentlyEditingNode(tag.typeExpression); @@ -109643,11 +111326,13 @@ var ts; var symbolToOriginInfoMap = []; var symbolToSortTextMap = []; var importSuggestionsCache = host.getImportSuggestionsCache && host.getImportSuggestionsCache(); + var isTypeOnly = isTypeOnlyCompletion(); if (isRightOfDot || isRightOfQuestionDot) { getTypeScriptMemberSymbols(); } else if (isRightOfOpenTag) { - var tagSymbols = ts.Debug.assertEachDefined(typeChecker.getJsxIntrinsicTagNamesAt(location), "getJsxIntrinsicTagNames() should all be defined"); + var tagSymbols = typeChecker.getJsxIntrinsicTagNamesAt(location); + ts.Debug.assertEachIsDefined(tagSymbols, "getJsxIntrinsicTagNames() should all be defined"); tryGetGlobalSymbols(); symbols = tagSymbols.concat(symbols); completionKind = 3 /* MemberLike */; @@ -109689,15 +111374,16 @@ var ts; previousToken: previousToken, isJsxInitializer: isJsxInitializer, insideJsDocTagTypeExpression: insideJsDocTagTypeExpression, - symbolToSortTextMap: symbolToSortTextMap + symbolToSortTextMap: symbolToSortTextMap, + isTypeOnlyLocation: isTypeOnly }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 321 /* JSDocTypedefTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 322 /* JSDocTypedefTag */: return true; default: return false; @@ -109722,7 +111408,8 @@ var ts; symbol = ts.skipAlias(symbol, typeChecker); if (symbol.flags & (1536 /* Module */ | 384 /* Enum */)) { // Extract module or enum members - var exportedSymbols = ts.Debug.assertEachDefined(typeChecker.getExportsOfModule(symbol), "getExportsOfModule() should all be defined"); + var exportedSymbols = typeChecker.getExportsOfModule(symbol); + ts.Debug.assertEachIsDefined(exportedSymbols, "getExportsOfModule() should all be defined"); var isValidValueAccess_1 = function (symbol) { return typeChecker.isValidPropertyAccess(isImportType ? node : (node.parent), symbol.name); }; var isValidTypeAccess_1 = function (symbol) { return symbolCanBeReferencedAtTypeLocation(symbol); }; var isValidAccess = isNamespaceName @@ -109888,8 +111575,8 @@ var ts; var attrsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes); if (!attrsType) return 0 /* Continue */; - var baseType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* BaseConstraint */); - symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, baseType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties); + var completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* Completions */); + symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties); setSortTextToOptionalMember(); completionKind = 3 /* MemberLike */; isNewIdentifierLocation = false; @@ -109933,9 +111620,9 @@ var ts; position; var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; isInSnippetScope = isSnippetScope(scopeNode); - var isTypeOnly = isTypeOnlyCompletion(); var symbolMeanings = (isTypeOnly ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */; - symbols = ts.Debug.assertEachDefined(typeChecker.getSymbolsInScope(scopeNode, symbolMeanings), "getSymbolsInScope() should all be defined"); + symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings); + ts.Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined"); for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) { var symbol = symbols_2[_i]; if (!typeChecker.isArgumentsSymbol(symbol) && @@ -110216,7 +111903,7 @@ var ts; var origin = { kind: 4 /* Export */, moduleSymbol: moduleSymbol, isDefaultExport: isDefaultExport }; results.push({ symbol: symbol, - symbolName: getSymbolName(symbol, origin, target), + symbolName: ts.getNameForExportedSymbol(symbol, target), origin: origin, skipFilter: skipFilter, }); @@ -110359,11 +112046,11 @@ var ts; var existingMembers; if (objectLikeContainer.kind === 193 /* ObjectLiteralExpression */) { var instantiatedType = typeChecker.getContextualType(objectLikeContainer); - var baseType = instantiatedType && typeChecker.getContextualType(objectLikeContainer, 4 /* BaseConstraint */); - if (!instantiatedType || !baseType) + var completionsType = instantiatedType && typeChecker.getContextualType(objectLikeContainer, 4 /* Completions */); + if (!instantiatedType || !completionsType) return 2 /* Fail */; - isNewIdentifierLocation = ts.hasIndexSignature(instantiatedType || baseType); - typeMembers = getPropertiesForObjectExpression(instantiatedType, baseType, objectLikeContainer, typeChecker); + isNewIdentifierLocation = ts.hasIndexSignature(instantiatedType || completionsType); + typeMembers = getPropertiesForObjectExpression(instantiatedType, completionsType, objectLikeContainer, typeChecker); existingMembers = objectLikeContainer.properties; } else { @@ -110405,7 +112092,7 @@ var ts; } if (typeMembers && typeMembers.length > 0) { // Add filtered items to the completion list - symbols = filterObjectMembersList(typeMembers, ts.Debug.assertDefined(existingMembers)); + symbols = filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers)); } setSortTextToOptionalMember(); return 1 /* Success */; @@ -110886,7 +112573,7 @@ var ts; } } function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind) { - var name = getSymbolName(symbol, origin, target); + var name = originIsExport(origin) ? ts.getNameForExportedSymbol(symbol, target) : symbol.name; if (name === undefined // If the symbol is external module, don't show it in the completion list // (i.e declare module "http" { const x; } | // <= request completion here, "http" should not be there) @@ -110950,6 +112637,7 @@ var ts; || kind === 135 /* ModuleKeyword */ || kind === 145 /* TypeKeyword */ || kind === 136 /* NamespaceKeyword */ + || kind === 123 /* AsKeyword */ || ts.isTypeKeyword(kind) && kind !== 146 /* UndefinedKeyword */; case 5 /* FunctionLikeBodyKeywords */: return isFunctionLikeBodyKeyword(kind); @@ -111011,6 +112699,7 @@ var ts; case 131 /* GetKeyword */: case 142 /* SetKeyword */: case 126 /* AsyncKeyword */: + case 130 /* DeclareKeyword */: return true; default: return ts.isClassMemberModifier(kind); @@ -111029,10 +112718,10 @@ var ts; var jsdoc = ts.findAncestor(node, ts.isJSDoc); return jsdoc && jsdoc.tags && (ts.rangeContainsPosition(jsdoc, position) ? ts.findLast(jsdoc.tags, function (tag) { return tag.pos < position; }) : undefined); } - function getPropertiesForObjectExpression(contextualType, baseConstrainedType, obj, checker) { - var hasBaseType = baseConstrainedType && baseConstrainedType !== contextualType; - var type = hasBaseType && !(baseConstrainedType.flags & 3 /* AnyOrUnknown */) - ? checker.getUnionType([contextualType, baseConstrainedType]) + function getPropertiesForObjectExpression(contextualType, completionsType, obj, checker) { + var hasCompletionsType = completionsType && completionsType !== contextualType; + var type = hasCompletionsType && !(completionsType.flags & 3 /* AnyOrUnknown */) + ? checker.getUnionType([contextualType, completionsType]) : contextualType; var properties = type.isUnion() ? checker.getAllPossiblePropertiesOfTypes(type.types.filter(function (memberType) { @@ -111043,7 +112732,7 @@ var ts; checker.isTypeInvalidDueToUnionDiscriminant(memberType, obj)); })) : type.getApparentProperties(); - return hasBaseType ? properties.filter(hasDeclarationOtherThanSelf) : properties; + return hasCompletionsType ? properties.filter(hasDeclarationOtherThanSelf) : properties; // Filter out members whose only declaration is the object literal itself to avoid // self-fulfilling completions like: // @@ -111059,8 +112748,8 @@ var ts; */ function getPropertiesForCompletion(type, checker) { return type.isUnion() - ? ts.Debug.assertEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") - : ts.Debug.assertEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); + ? ts.Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") + : ts.Debug.checkEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); } /** * Returns the immediate owning class declaration of a context token, @@ -111069,7 +112758,7 @@ var ts; function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { // class c { method() { } | method2() { } } switch (location.kind) { - case 323 /* SyntaxList */: + case 324 /* SyntaxList */: return ts.tryCast(location.parent, ts.isObjectTypeDeclaration); case 1 /* EndOfFileToken */: var cls = ts.tryCast(ts.lastOrUndefined(ts.cast(location.parent, ts.isSourceFile).statements), ts.isObjectTypeDeclaration); @@ -111123,6 +112812,8 @@ var ts; case "`": // Only automatically bring up completions if this is an opening quote. return !!contextToken && ts.isStringLiteralOrTemplate(contextToken) && position === contextToken.getStart(sourceFile) + 1; + case "#": + return !!contextToken && ts.isPrivateIdentifier(contextToken) && !!ts.getContainingClass(contextToken); case "<": // Opening JSX tag return !!contextToken && contextToken.kind === 29 /* LessThanToken */ && (!ts.isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent)); @@ -111686,7 +113377,7 @@ var ts; return releaseDocumentWithKey(path, key); } function releaseDocumentWithKey(path, key) { - var bucket = ts.Debug.assertDefined(buckets.get(key)); + var bucket = ts.Debug.checkDefined(buckets.get(key)); var entry = bucket.get(path); entry.languageServiceRefCount--; ts.Debug.assert(entry.languageServiceRefCount >= 0); @@ -112152,7 +113843,7 @@ var ts; } function getExportAssignmentExport(ex) { // Get the symbol for the `export =` node; its parent is the module it's the export of. - var exportingModuleSymbol = ts.Debug.assertDefined(ex.symbol.parent, "Expected export symbol to have a parent"); + var exportingModuleSymbol = ts.Debug.checkDefined(ex.symbol.parent, "Expected export symbol to have a parent"); var exportKind = ex.isExportEquals ? 2 /* ExportEquals */ : 1 /* Default */; return { kind: 1 /* Export */, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: exportKind } }; } @@ -112168,11 +113859,7 @@ var ts; default: return undefined; } - var sym = useLhsSymbol ? checker.getSymbolAtLocation(ts.cast(node.left, ts.isPropertyAccessExpression).name) : symbol; - // Better detection for GH#20803 - if (sym && !(checker.getMergedSymbol(sym.parent).flags & 1536 /* Module */)) { - ts.Debug.fail("Special property assignment kind does not have a module as its parent. Assignment is " + ts.Debug.formatSymbol(sym) + ", parent is " + ts.Debug.formatSymbol(sym.parent)); - } + var sym = useLhsSymbol ? checker.getSymbolAtLocation(ts.getNameOfAccessExpression(ts.cast(node.left, ts.isAccessExpression))) : symbol; return sym && exportInfo(sym, kind); } } @@ -112210,17 +113897,17 @@ var ts; FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol; function getExportEqualsLocalSymbol(importedSymbol, checker) { if (importedSymbol.flags & 2097152 /* Alias */) { - return ts.Debug.assertDefined(checker.getImmediateAliasedSymbol(importedSymbol)); + return ts.Debug.checkDefined(checker.getImmediateAliasedSymbol(importedSymbol)); } var decl = importedSymbol.valueDeclaration; if (ts.isExportAssignment(decl)) { // `export = class {}` - return ts.Debug.assertDefined(decl.expression.symbol); + return ts.Debug.checkDefined(decl.expression.symbol); } else if (ts.isBinaryExpression(decl)) { // `module.exports = class {}` - return ts.Debug.assertDefined(decl.right.symbol); + return ts.Debug.checkDefined(decl.right.symbol); } else if (ts.isSourceFile(decl)) { // json module - return ts.Debug.assertDefined(decl.symbol); + return ts.Debug.checkDefined(decl.symbol); } return ts.Debug.fail(); } @@ -112444,9 +114131,26 @@ var ts; undefined; } FindAllReferences.toContextSpan = toContextSpan; + var FindReferencesUse; + (function (FindReferencesUse) { + /** + * When searching for references to a symbol, the location will not be adjusted (this is the default behavior when not specified). + */ + FindReferencesUse[FindReferencesUse["Other"] = 0] = "Other"; + /** + * When searching for references to a symbol, the location will be adjusted if the cursor was on a keyword. + */ + FindReferencesUse[FindReferencesUse["References"] = 1] = "References"; + /** + * When searching for references to a symbol, the location will be adjusted if the cursor was on a keyword. + * Unlike `References`, the location will only be adjusted keyword belonged to a declaration with a valid name. + * If set, we will find fewer references -- if it is referenced by several different names, we still only find references for the original name. + */ + FindReferencesUse[FindReferencesUse["Rename"] = 2] = "Rename"; + })(FindReferencesUse = FindAllReferences.FindReferencesUse || (FindAllReferences.FindReferencesUse = {})); function findReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position) { var node = ts.getTouchingPropertyName(sourceFile, position); - var referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken); + var referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, { use: 1 /* References */ }); var checker = program.getTypeChecker(); return !referencedSymbols || !referencedSymbols.length ? undefined : ts.mapDefined(referencedSymbols, function (_a) { var definition = _a.definition, references = _a.references; @@ -112485,7 +114189,7 @@ var ts; } else { // Perform "Find all References" and retrieve only those that are implementations - return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true }); + return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true, use: 1 /* References */ }); } } function findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, convertEntry) { @@ -112584,7 +114288,7 @@ var ts; var node = entry.node, kind = entry.kind; var name = originalNode.text; var isShorthandAssignment = ts.isShorthandPropertyAssignment(node.parent); - if (isShorthandAssignment || ts.isObjectBindingElementWithoutPropertyName(node.parent)) { + if (isShorthandAssignment || ts.isObjectBindingElementWithoutPropertyName(node.parent) && node.parent.name === node) { var prefixColon = { prefixText: name + ": " }; var suffixColon = { suffixText: ": " + name }; return kind === 3 /* SearchedLocalFoundProperty */ ? prefixColon @@ -112701,12 +114405,13 @@ var ts; case 253 /* ImportEqualsDeclaration */: case 258 /* ImportSpecifier */: case 246 /* InterfaceDeclaration */: - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: case 273 /* JsxAttribute */: case 249 /* ModuleDeclaration */: case 252 /* NamespaceExportDeclaration */: case 256 /* NamespaceImport */: + case 262 /* NamespaceExport */: case 156 /* Parameter */: case 282 /* ShorthandPropertyAssignment */: case 247 /* TypeAliasDeclaration */: @@ -112727,8 +114432,8 @@ var ts; return !!decl.initializer || ts.isCatchClause(decl.parent); case 160 /* MethodSignature */: case 158 /* PropertySignature */: - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: return false; default: return ts.Debug.failBadSyntaxKind(decl); @@ -112741,6 +114446,12 @@ var ts; function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options, sourceFilesSet) { if (options === void 0) { options = {}; } if (sourceFilesSet === void 0) { sourceFilesSet = ts.arrayToSet(sourceFiles, function (f) { return f.fileName; }); } + if (options.use === 1 /* References */) { + node = ts.getAdjustedReferenceLocation(node); + } + else if (options.use === 2 /* Rename */) { + node = ts.getAdjustedRenameLocation(node); + } if (ts.isSourceFile(node)) { var reference = ts.GoToDefinition.getReferenceAtPosition(node, position, program); var moduleSymbol = reference && program.getTypeChecker().getMergedSymbol(reference.file.symbol); @@ -112903,7 +114614,7 @@ var ts; if (sourceFilesSet.has(sourceFile.fileName)) { // At `module.exports = ...`, reference node is `module` var node = ts.isBinaryExpression(decl) && ts.isPropertyAccessExpression(decl.left) ? decl.left.expression : - ts.isExportAssignment(decl) ? ts.Debug.assertDefined(ts.findChildOfKind(decl, 89 /* ExportKeyword */, sourceFile)) : + ts.isExportAssignment(decl) ? ts.Debug.checkDefined(ts.findChildOfKind(decl, 89 /* ExportKeyword */, sourceFile)) : ts.getNameOfDeclaration(decl) || decl; references.push(nodeEntry(node)); } @@ -112920,6 +114631,10 @@ var ts; /** getReferencedSymbols for special node kinds. */ function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) { if (ts.isTypeKeyword(node.kind)) { + // A void expression (i.e., `void foo()`) is not special, but the `void` type is. + if (node.kind === 110 /* VoidKeyword */ && ts.isVoidExpression(node.parent)) { + return undefined; + } // A modifier readonly (like on a property declaration) is not special; // a readonly type keyword (like `readonly string[]`) is. if (node.kind === 138 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { @@ -112962,10 +114677,10 @@ var ts; } else if (node && node.kind === 84 /* DefaultKeyword */) { addReference(node, symbol, state); - searchForImportsOfExport(node, symbol, { exportingModuleSymbol: ts.Debug.assertDefined(symbol.parent, "Expected export symbol to have a parent"), exportKind: 1 /* Default */ }, state); + searchForImportsOfExport(node, symbol, { exportingModuleSymbol: ts.Debug.checkDefined(symbol.parent, "Expected export symbol to have a parent"), exportKind: 1 /* Default */ }, state); } else { - var search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, !!options.isForRename, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] }); + var search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, options.use === 2 /* Rename */, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] }); getReferencesInContainerOrFiles(symbol, state, search); } return result; @@ -113079,7 +114794,7 @@ var ts; State.prototype.getImportSearches = function (exportSymbol, exportInfo) { if (!this.importTracker) this.importTracker = FindAllReferences.createImportTracker(this.sourceFiles, this.sourceFilesSet, this.checker, this.cancellationToken); - return this.importTracker(exportSymbol, exportInfo, !!this.options.isForRename); + return this.importTracker(exportSymbol, exportInfo, this.options.use === 2 /* Rename */); }; /** @param allSearchSymbols set of additional symbols for use by `includes`. */ State.prototype.createSearch = function (location, symbol, comingFrom, searchOptions) { @@ -113151,7 +114866,7 @@ var ts; break; case 1 /* Default */: // Search for a property access to '.default'. This can't be renamed. - indirectSearch = state.options.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" }); + indirectSearch = state.options.use === 2 /* Rename */ ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" }); break; case 2 /* ExportEquals */: break; @@ -113186,7 +114901,7 @@ var ts; function shouldAddSingleReference(singleRef, state) { if (!hasMatchingMeaning(singleRef, state)) return false; - if (!state.options.isForRename) + if (state.options.use !== 2 /* Rename */) return true; // Don't rename an import type `import("./module-name")` when renaming `name` in `export = name;` if (!ts.isIdentifier(singleRef)) @@ -113309,7 +115024,7 @@ var ts; function eachSignatureCall(signature, sourceFiles, checker, cb) { if (!signature.name || !ts.isIdentifier(signature.name)) return; - var symbol = ts.Debug.assertDefined(checker.getSymbolAtLocation(signature.name)); + var symbol = ts.Debug.checkDefined(checker.getSymbolAtLocation(signature.name)); for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) { var sourceFile = sourceFiles_3[_i]; for (var _a = 0, _b = getPossibleSymbolReferenceNodes(sourceFile, symbol.name); _a < _b.length; _a++) { @@ -113485,7 +115200,7 @@ var ts; } if (!propertyName) { // Don't rename at `export { default } from "m";`. (but do continue to search for imports of the re-export) - if (!(state.options.isForRename && (name.escapedText === "default" /* Default */))) { + if (!(state.options.use === 2 /* Rename */ && (name.escapedText === "default" /* Default */))) { addRef(); } } @@ -113495,8 +115210,8 @@ var ts; if (!exportDeclaration.moduleSpecifier) { addRef(); } - if (addReferencesHere && !state.options.isForRename && state.markSeenReExportRHS(name)) { - addReference(name, ts.Debug.assertDefined(exportSpecifier.symbol), state); + if (addReferencesHere && state.options.use !== 2 /* Rename */ && state.markSeenReExportRHS(name)) { + addReference(name, ts.Debug.checkDefined(exportSpecifier.symbol), state); } } else { @@ -113509,7 +115224,7 @@ var ts; var isDefaultExport = referenceLocation.originalKeywordKind === 84 /* DefaultKeyword */ || exportSpecifier.name.originalKeywordKind === 84 /* DefaultKeyword */; var exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */; - var exportSymbol = ts.Debug.assertDefined(exportSpecifier.symbol); + var exportSymbol = ts.Debug.checkDefined(exportSpecifier.symbol); var exportInfo = FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker); if (exportInfo) { searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); @@ -113604,7 +115319,7 @@ var ts; function addClassStaticThisReferences(referenceLocation, search, state) { addReference(referenceLocation, search.symbol, state); var classLike = referenceLocation.parent; - if (state.options.isForRename || !ts.isClassLike(classLike)) + if (state.options.use === 2 /* Rename */ || !ts.isClassLike(classLike)) return; ts.Debug.assert(classLike.name === referenceLocation); var addRef = state.referenceAdder(search.symbol); @@ -113968,11 +115683,13 @@ var ts; return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); } var exportSpecifier = ts.getDeclarationOfKind(symbol, 263 /* ExportSpecifier */); - var localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); - if (localSymbol) { - var res_3 = cbSymbol(localSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, 1 /* Node */); - if (res_3) - return res_3; + if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { + var localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); + if (localSymbol) { + var res_3 = cbSymbol(localSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, 1 /* Node */); + if (res_3) + return res_3; + } } // symbolAtLocation for a binding element is the local symbol. See if the search symbol is the property. // Don't do this when populating search set for a rename when prefix and suffix text will be provided -- just rename the local. @@ -114019,7 +115736,7 @@ var ts; function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) { var checker = state.checker; return forEachRelatedSymbol(referenceSymbol, referenceLocation, checker, /*isForRenamePopulateSearchSymbolSet*/ false, - /*onlyIncludeBindingElementAtReferenceLocation*/ !state.options.isForRename || !!state.options.providePrefixAndSuffixTextForRename, function (sym, rootSymbol, baseSymbol, kind) { return search.includes(baseSymbol || rootSymbol || sym) + /*onlyIncludeBindingElementAtReferenceLocation*/ state.options.use !== 2 /* Rename */ || !!state.options.providePrefixAndSuffixTextForRename, function (sym, rootSymbol, baseSymbol, kind) { return search.includes(baseSymbol || rootSymbol || sym) // For a base type, use the symbol for the derived type. For a synthetic (e.g. union) property, use the union symbol. ? { symbol: rootSymbol && !(ts.getCheckFlags(sym) & 6 /* Synthetic */) ? rootSymbol : sym, kind: kind } : undefined; }, @@ -114105,7 +115822,7 @@ var ts; return res.length === 0 ? undefined : res; } function isForRenameWithPrefixAndSuffixText(options) { - return options.isForRename && options.providePrefixAndSuffixTextForRename; + return options.use === 2 /* Rename */ && options.providePrefixAndSuffixTextForRename; } })(Core = FindAllReferences.Core || (FindAllReferences.Core = {})); })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {})); @@ -114169,7 +115886,7 @@ var ts; return node.name; if (isConstNamedExpression(node)) return node.parent.name; - return ts.Debug.assertDefined(node.modifiers && ts.find(node.modifiers, isDefaultModifier)); + return ts.Debug.checkDefined(node.modifiers && ts.find(node.modifiers, isDefaultModifier)); } function isDefaultModifier(node) { return node.kind === 84 /* DefaultKeyword */; @@ -114191,7 +115908,7 @@ var ts; } } var declName = isConstNamedExpression(node) ? node.parent.name : - ts.Debug.assertDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); + ts.Debug.checkDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); var text = ts.isIdentifier(declName) ? ts.idText(declName) : ts.isStringOrNumericLiteralLike(declName) ? declName.text : ts.isComputedPropertyName(declName) ? @@ -114330,16 +116047,18 @@ var ts; function isDefined(x) { return x !== undefined; } - function convertEntryToCallSite(entry, _originalNode, typeChecker) { + function convertEntryToCallSite(entry) { if (entry.kind === 1 /* Node */) { - if (ts.isCallOrNewExpressionTarget(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isTaggedTemplateTag(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isDecoratorTarget(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isJsxOpeningLikeElementTagName(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isRightSideOfPropertyAccess(entry.node) - || ts.isArgumentExpressionOfElementAccess(entry.node)) { - var ancestor = ts.findAncestor(entry.node, isValidCallHierarchyDeclaration) || entry.node.getSourceFile(); - return { declaration: ts.firstOrOnly(findImplementationOrAllInitialDeclarations(typeChecker, ancestor)), range: ts.createTextRangeFromNode(entry.node, entry.node.getSourceFile()) }; + var node = entry.node; + if (ts.isCallOrNewExpressionTarget(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isTaggedTemplateTag(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isDecoratorTarget(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isJsxOpeningLikeElementTagName(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isRightSideOfPropertyAccess(node) + || ts.isArgumentExpressionOfElementAccess(node)) { + var sourceFile = node.getSourceFile(); + var ancestor = ts.findAncestor(node, isValidCallHierarchyDeclaration) || sourceFile; + return { declaration: ancestor, range: ts.createTextRangeFromNode(node, sourceFile) }; } } } @@ -114359,7 +116078,7 @@ var ts; return []; } var location = getCallHierarchyDeclarationReferenceNode(declaration); - var calls = ts.filter(ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, program.getSourceFiles(), location, /*position*/ 0, /*options*/ undefined, convertEntryToCallSite), isDefined); + var calls = ts.filter(ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, program.getSourceFiles(), location, /*position*/ 0, { use: 1 /* References */ }, convertEntryToCallSite), isDefined); return calls ? ts.group(calls, getCallSiteGroupKey, function (entries) { return convertCallSiteGroupToIncomingCall(program, entries); }) : []; } CallHierarchy.getIncomingCalls = getIncomingCalls; @@ -114596,8 +116315,8 @@ var ts; var includes = ts.mapDefined(property.initializer.elements, function (e) { return ts.isStringLiteral(e) ? e.text : undefined; }); var matchers = ts.getFileMatcherPatterns(configDir, /*excludes*/ [], includes, useCaseSensitiveFileNames, currentDirectory); // If there isn't some include for this, add a new one. - if (ts.getRegexFromPattern(ts.Debug.assertDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && - !ts.getRegexFromPattern(ts.Debug.assertDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { + if (ts.getRegexFromPattern(ts.Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && + !ts.getRegexFromPattern(ts.Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { changeTracker.insertNodeAfter(configFile, ts.last(property.initializer.elements), ts.createStringLiteral(relativePath(newFileOrDirPath))); } } @@ -114959,6 +116678,15 @@ var ts; return aliased; } } + if (symbol && ts.isInJSFile(node)) { + var requireCall = ts.forEach(symbol.declarations, function (d) { return ts.isVariableDeclaration(d) && !!d.initializer && ts.isRequireCall(d.initializer, /*checkArgumentIsStringLiteralLike*/ true) ? d.initializer : undefined; }); + if (requireCall) { + var moduleSymbol = checker.getSymbolAtLocation(requireCall.arguments[0]); + if (moduleSymbol) { + return checker.resolveExternalModuleSymbol(moduleSymbol); + } + } + } return symbol; } // Go to the original declaration for cases: @@ -115185,11 +116913,11 @@ var ts; JsDoc.getJsDocCommentsFromDeclarations = getJsDocCommentsFromDeclarations; function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return [declaration]; - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return ts.getJSDocCommentsAndTags(declaration); @@ -115210,16 +116938,18 @@ var ts; function getCommentText(tag) { var comment = tag.comment; switch (tag.kind) { + case 308 /* JSDocImplementsTag */: + return withNode(tag.class); case 307 /* JSDocAugmentsTag */: return withNode(tag.class); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return withList(tag.typeParameters); - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: return withNode(tag.typeExpression); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: var name = tag.name; return name ? withNode(name) : comment; default: @@ -115427,6 +117157,11 @@ var ts; var parameters_2 = ts.isFunctionLike(be.right) ? be.right.parameters : ts.emptyArray; return { commentOwner: commentOwner, parameters: parameters_2 }; } + case 159 /* PropertyDeclaration */: + var init = commentOwner.initializer; + if (init && (ts.isFunctionExpression(init) || ts.isArrowFunction(init))) { + return { commentOwner: commentOwner, parameters: init.parameters }; + } } } /** @@ -115597,7 +117332,7 @@ var ts; var whiteSpaceRegex = /\s+/g; /** * Maximum amount of characters to return - * The amount was choosen arbitrarily. + * The amount was chosen arbitrarily. */ var maxLength = 150; // Keep sourceFile handy so we don't have to search for it every time we need to call `getText`. @@ -115852,6 +117587,7 @@ var ts; case 249 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; + case 259 /* ExportAssignment */: case 263 /* ExportSpecifier */: case 253 /* ImportEqualsDeclaration */: case 167 /* IndexSignature */: @@ -116189,6 +117925,8 @@ var ts; return ts.isExternalModule(sourceFile) ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\"" : ""; + case 259 /* ExportAssignment */: + return ts.isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; case 202 /* ArrowFunction */: case 244 /* FunctionDeclaration */: case 201 /* FunctionExpression */: @@ -116247,8 +117985,8 @@ var ts; case 249 /* ModuleDeclaration */: case 290 /* SourceFile */: case 247 /* TypeAliasDeclaration */: - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: return true; case 202 /* ArrowFunction */: case 244 /* FunctionDeclaration */: @@ -116566,100 +118304,114 @@ var ts; * @param importGroup a list of ImportDeclarations, all with the same module name. */ function coalesceImports(importGroup) { + var _a; if (importGroup.length === 0) { return importGroup; } - var _a = getCategorizedImports(importGroup), importWithoutClause = _a.importWithoutClause, defaultImports = _a.defaultImports, namespaceImports = _a.namespaceImports, namedImports = _a.namedImports; + var _b = getCategorizedImports(importGroup), importWithoutClause = _b.importWithoutClause, typeOnlyImports = _b.typeOnlyImports, regularImports = _b.regularImports; var coalescedImports = []; if (importWithoutClause) { coalescedImports.push(importWithoutClause); } - // Normally, we don't combine default and namespace imports, but it would be silly to - // produce two import declarations in this special case. - if (defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) { - // Add the namespace import to the existing default ImportDeclaration. - var defaultImport = defaultImports[0]; - coalescedImports.push(updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)); // TODO: GH#18217 - return coalescedImports; - } - var sortedNamespaceImports = ts.stableSort(namespaceImports, function (i1, i2) { - return compareIdentifiers(i1.importClause.namedBindings.name, i2.importClause.namedBindings.name); - }); // TODO: GH#18217 - for (var _i = 0, sortedNamespaceImports_1 = sortedNamespaceImports; _i < sortedNamespaceImports_1.length; _i++) { - var namespaceImport = sortedNamespaceImports_1[_i]; - // Drop the name, if any - coalescedImports.push(updateImportDeclarationAndClause(namespaceImport, /*name*/ undefined, namespaceImport.importClause.namedBindings)); // TODO: GH#18217 - } - if (defaultImports.length === 0 && namedImports.length === 0) { - return coalescedImports; - } - var newDefaultImport; - var newImportSpecifiers = []; - if (defaultImports.length === 1) { - newDefaultImport = defaultImports[0].importClause.name; + for (var _i = 0, _c = [regularImports, typeOnlyImports]; _i < _c.length; _i++) { + var group_2 = _c[_i]; + var isTypeOnly = group_2 === typeOnlyImports; + var defaultImports = group_2.defaultImports, namespaceImports = group_2.namespaceImports, namedImports = group_2.namedImports; + // Normally, we don't combine default and namespace imports, but it would be silly to + // produce two import declarations in this special case. + if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) { + // Add the namespace import to the existing default ImportDeclaration. + var defaultImport = defaultImports[0]; + coalescedImports.push(updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)); // TODO: GH#18217 + continue; + } + var sortedNamespaceImports = ts.stableSort(namespaceImports, function (i1, i2) { + return compareIdentifiers(i1.importClause.namedBindings.name, i2.importClause.namedBindings.name); + }); // TODO: GH#18217 + for (var _d = 0, sortedNamespaceImports_1 = sortedNamespaceImports; _d < sortedNamespaceImports_1.length; _d++) { + var namespaceImport = sortedNamespaceImports_1[_d]; + // Drop the name, if any + coalescedImports.push(updateImportDeclarationAndClause(namespaceImport, /*name*/ undefined, namespaceImport.importClause.namedBindings)); // TODO: GH#18217 + } + if (defaultImports.length === 0 && namedImports.length === 0) { + continue; + } + var newDefaultImport = void 0; + var newImportSpecifiers = []; + if (defaultImports.length === 1) { + newDefaultImport = defaultImports[0].importClause.name; + } + else { + for (var _e = 0, defaultImports_1 = defaultImports; _e < defaultImports_1.length; _e++) { + var defaultImport = defaultImports_1[_e]; + newImportSpecifiers.push(ts.createImportSpecifier(ts.createIdentifier("default"), defaultImport.importClause.name)); // TODO: GH#18217 + } + } + newImportSpecifiers.push.apply(newImportSpecifiers, ts.flatMap(namedImports, function (i) { return i.importClause.namedBindings.elements; })); // TODO: GH#18217 + var sortedImportSpecifiers = sortSpecifiers(newImportSpecifiers); + var importDecl = defaultImports.length > 0 + ? defaultImports[0] + : namedImports[0]; + var newNamedImports = sortedImportSpecifiers.length === 0 + ? newDefaultImport + ? undefined + : ts.createNamedImports(ts.emptyArray) + : namedImports.length === 0 + ? ts.createNamedImports(sortedImportSpecifiers) + : ts.updateNamedImports(namedImports[0].importClause.namedBindings, sortedImportSpecifiers); // TODO: GH#18217 + // Type-only imports are not allowed to mix default, namespace, and named imports in any combination. + // We could rewrite a default import as a named import (`import { default as name }`), but we currently + // choose not to as a stylistic preference. + if (isTypeOnly && newDefaultImport && newNamedImports) { + coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, /*namedBindings*/ undefined)); + coalescedImports.push(updateImportDeclarationAndClause((_a = namedImports[0]) !== null && _a !== void 0 ? _a : importDecl, /*name*/ undefined, newNamedImports)); + } + else { + coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)); + } } - else { - for (var _b = 0, defaultImports_1 = defaultImports; _b < defaultImports_1.length; _b++) { - var defaultImport = defaultImports_1[_b]; - newImportSpecifiers.push(ts.createImportSpecifier(ts.createIdentifier("default"), defaultImport.importClause.name)); // TODO: GH#18217 - } - } - newImportSpecifiers.push.apply(newImportSpecifiers, ts.flatMap(namedImports, function (i) { return i.importClause.namedBindings.elements; })); // TODO: GH#18217 - var sortedImportSpecifiers = sortSpecifiers(newImportSpecifiers); - var importDecl = defaultImports.length > 0 - ? defaultImports[0] - : namedImports[0]; - var newNamedImports = sortedImportSpecifiers.length === 0 - ? newDefaultImport - ? undefined - : ts.createNamedImports(ts.emptyArray) - : namedImports.length === 0 - ? ts.createNamedImports(sortedImportSpecifiers) - : ts.updateNamedImports(namedImports[0].importClause.namedBindings, sortedImportSpecifiers); // TODO: GH#18217 - coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)); return coalescedImports; - /* - * Returns entire import declarations because they may already have been rewritten and - * may lack parent pointers. The desired parts can easily be recovered based on the - * categorization. - * - * NB: There may be overlap between `defaultImports` and `namespaceImports`/`namedImports`. - */ - function getCategorizedImports(importGroup) { - var importWithoutClause; - var defaultImports = []; - var namespaceImports = []; - var namedImports = []; - for (var _i = 0, importGroup_1 = importGroup; _i < importGroup_1.length; _i++) { - var importDeclaration = importGroup_1[_i]; - if (importDeclaration.importClause === undefined) { - // Only the first such import is interesting - the others are redundant. - // Note: Unfortunately, we will lose trivia that was on this node. - importWithoutClause = importWithoutClause || importDeclaration; - continue; - } - var _a = importDeclaration.importClause, name = _a.name, namedBindings = _a.namedBindings; - if (name) { - defaultImports.push(importDeclaration); + } + OrganizeImports.coalesceImports = coalesceImports; + /* + * Returns entire import declarations because they may already have been rewritten and + * may lack parent pointers. The desired parts can easily be recovered based on the + * categorization. + * + * NB: There may be overlap between `defaultImports` and `namespaceImports`/`namedImports`. + */ + function getCategorizedImports(importGroup) { + var importWithoutClause; + var typeOnlyImports = { defaultImports: [], namespaceImports: [], namedImports: [] }; + var regularImports = { defaultImports: [], namespaceImports: [], namedImports: [] }; + for (var _i = 0, importGroup_1 = importGroup; _i < importGroup_1.length; _i++) { + var importDeclaration = importGroup_1[_i]; + if (importDeclaration.importClause === undefined) { + // Only the first such import is interesting - the others are redundant. + // Note: Unfortunately, we will lose trivia that was on this node. + importWithoutClause = importWithoutClause || importDeclaration; + continue; + } + var group_3 = importDeclaration.importClause.isTypeOnly ? typeOnlyImports : regularImports; + var _a = importDeclaration.importClause, name = _a.name, namedBindings = _a.namedBindings; + if (name) { + group_3.defaultImports.push(importDeclaration); + } + if (namedBindings) { + if (ts.isNamespaceImport(namedBindings)) { + group_3.namespaceImports.push(importDeclaration); } - if (namedBindings) { - if (ts.isNamespaceImport(namedBindings)) { - namespaceImports.push(importDeclaration); - } - else { - namedImports.push(importDeclaration); - } + else { + group_3.namedImports.push(importDeclaration); } } - return { - importWithoutClause: importWithoutClause, - defaultImports: defaultImports, - namespaceImports: namespaceImports, - namedImports: namedImports, - }; } + return { + importWithoutClause: importWithoutClause, + typeOnlyImports: typeOnlyImports, + regularImports: regularImports, + }; } - OrganizeImports.coalesceImports = coalesceImports; // Internal for testing /** * @param exportGroup a list of ExportDeclarations, all with the same module name. @@ -116668,21 +118420,24 @@ var ts; if (exportGroup.length === 0) { return exportGroup; } - var _a = getCategorizedExports(exportGroup), exportWithoutClause = _a.exportWithoutClause, namedExports = _a.namedExports; + var _a = getCategorizedExports(exportGroup), exportWithoutClause = _a.exportWithoutClause, namedExports = _a.namedExports, typeOnlyExports = _a.typeOnlyExports; var coalescedExports = []; if (exportWithoutClause) { coalescedExports.push(exportWithoutClause); } - if (namedExports.length === 0) { - return coalescedExports; + for (var _i = 0, _b = [namedExports, typeOnlyExports]; _i < _b.length; _i++) { + var exportGroup_1 = _b[_i]; + if (exportGroup_1.length === 0) { + continue; + } + var newExportSpecifiers = []; + newExportSpecifiers.push.apply(newExportSpecifiers, ts.flatMap(exportGroup_1, function (i) { return i.exportClause && ts.isNamedExports(i.exportClause) ? i.exportClause.elements : ts.emptyArray; })); + var sortedExportSpecifiers = sortSpecifiers(newExportSpecifiers); + var exportDecl = exportGroup_1[0]; + coalescedExports.push(ts.updateExportDeclaration(exportDecl, exportDecl.decorators, exportDecl.modifiers, exportDecl.exportClause && (ts.isNamedExports(exportDecl.exportClause) ? + ts.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : + ts.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), exportDecl.moduleSpecifier, exportDecl.isTypeOnly)); } - var newExportSpecifiers = []; - newExportSpecifiers.push.apply(newExportSpecifiers, ts.flatMap(namedExports, function (i) { return i.exportClause && ts.isNamedExports(i.exportClause) ? i.exportClause.elements : ts.emptyArray; })); - var sortedExportSpecifiers = sortSpecifiers(newExportSpecifiers); - var exportDecl = namedExports[0]; - coalescedExports.push(ts.updateExportDeclaration(exportDecl, exportDecl.decorators, exportDecl.modifiers, exportDecl.exportClause && (ts.isNamedExports(exportDecl.exportClause) ? - ts.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : - ts.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), exportDecl.moduleSpecifier, exportDecl.isTypeOnly)); return coalescedExports; /* * Returns entire export declarations because they may already have been rewritten and @@ -116692,13 +118447,17 @@ var ts; function getCategorizedExports(exportGroup) { var exportWithoutClause; var namedExports = []; - for (var _i = 0, exportGroup_1 = exportGroup; _i < exportGroup_1.length; _i++) { - var exportDeclaration = exportGroup_1[_i]; + var typeOnlyExports = []; + for (var _i = 0, exportGroup_2 = exportGroup; _i < exportGroup_2.length; _i++) { + var exportDeclaration = exportGroup_2[_i]; if (exportDeclaration.exportClause === undefined) { // Only the first such export is interesting - the others are redundant. // Note: Unfortunately, we will lose trivia that was on this node. exportWithoutClause = exportWithoutClause || exportDeclaration; } + else if (exportDeclaration.isTypeOnly) { + typeOnlyExports.push(exportDeclaration); + } else { namedExports.push(exportDeclaration); } @@ -116706,6 +118465,7 @@ var ts; return { exportWithoutClause: exportWithoutClause, namedExports: namedExports, + typeOnlyExports: typeOnlyExports, }; } } @@ -116749,7 +118509,8 @@ var ts; function addNodeOutliningSpans(sourceFile, cancellationToken, out) { var depthRemaining = 40; var current = 0; - var statements = sourceFile.statements; + // Includes the EOF Token so that comments which aren't attached to statements are included + var statements = __spreadArrays(sourceFile.statements, [sourceFile.endOfFileToken]); var n = statements.length; while (current < n) { while (current < n && !ts.isAnyImportSyntax(statements[current])) { @@ -116773,7 +118534,7 @@ var ts; if (depthRemaining === 0) return; cancellationToken.throwIfCancellationRequested(); - if (ts.isDeclaration(n)) { + if (ts.isDeclaration(n) || n.kind === 1 /* EndOfFileToken */) { addOutliningForLeadingCommentsForNode(n, sourceFile, cancellationToken, out); } if (isFunctionExpressionAssignedToVariable(n)) { @@ -116914,7 +118675,9 @@ var ts; return spanForNode(n.parent); } else if (tryStatement.finallyBlock === n) { - return spanForNode(ts.findChildOfKind(tryStatement, 92 /* FinallyKeyword */, sourceFile)); + var node = ts.findChildOfKind(tryStatement, 92 /* FinallyKeyword */, sourceFile); + if (node) + return spanForNode(node); } // falls through default: @@ -117807,11 +119570,14 @@ var ts; var Rename; (function (Rename) { function getRenameInfo(program, sourceFile, position, options) { - var node = ts.getTouchingPropertyName(sourceFile, position); - var renameInfo = node && nodeIsEligibleForRename(node) - ? getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, function (declaration) { return program.isSourceFileDefaultLibrary(declaration.getSourceFile()); }, options) - : undefined; - return renameInfo || getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element); + var node = ts.getAdjustedRenameLocation(ts.getTouchingPropertyName(sourceFile, position)); + if (nodeIsEligibleForRename(node)) { + var renameInfo = getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, function (declaration) { return program.isSourceFileDefaultLibrary(declaration.getSourceFile()); }, options); + if (renameInfo) { + return renameInfo; + } + } + return getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element); } Rename.getRenameInfo = getRenameInfo; function getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile, options) { @@ -117891,6 +119657,7 @@ var ts; function nodeIsEligibleForRename(node) { switch (node.kind) { case 75 /* Identifier */: + case 76 /* PrivateIdentifier */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: case 104 /* ThisKeyword */: @@ -118040,7 +119807,7 @@ var ts; // few keystrokes. if (ts.isMappedTypeNode(node)) { var _a = node.getChildren(), openBraceToken = _a[0], children = _a.slice(1); - var closeBraceToken = ts.Debug.assertDefined(children.pop()); + var closeBraceToken = ts.Debug.checkDefined(children.pop()); ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */); ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */); // Group `-/+readonly` and `-/+?` @@ -118159,7 +119926,7 @@ var ts; } function createSyntaxList(children) { ts.Debug.assertGreaterThanOrEqual(children.length, 1); - var syntaxList = ts.createNode(323 /* SyntaxList */, children[0].pos, ts.last(children).end); + var syntaxList = ts.createNode(324 /* SyntaxList */, children[0].pos, ts.last(children).end); syntaxList._children = children; return syntaxList; } @@ -118852,6 +120619,9 @@ var ts; // obviously invalid map return undefined; } + // Dont support sourcemaps that contain inlined sources + if (map.sourcesContent && map.sourcesContent.some(ts.isString)) + return undefined; return ts.createDocumentPositionMapper(host, map, mapFileName); } function createSourceFileLike(text, lineMap) { @@ -118899,23 +120669,8 @@ var ts; return diags.sort(function (d1, d2) { return d1.start - d2.start; }); function check(node) { if (isJsFile) { - switch (node.kind) { - case 201 /* FunctionExpression */: - var decl = ts.getDeclarationOfExpando(node); - if (decl) { - var symbol_1 = decl.symbol; - if (symbol_1 && (symbol_1.exports && symbol_1.exports.size || symbol_1.members && symbol_1.members.size)) { - diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); - break; - } - } - // falls through if no diagnostic was created - case 244 /* FunctionDeclaration */: - var symbol = node.symbol; - if (symbol.members && (symbol.members.size > 0)) { - diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); - } - break; + if (canBeConvertedToClass(node)) { + diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); } } else { @@ -119042,6 +120797,21 @@ var ts; function getKeyFromNode(exp) { return exp.pos.toString() + ":" + exp.end.toString(); } + function canBeConvertedToClass(node) { + var _a, _b, _c, _d; + if (node.kind === 201 /* FunctionExpression */) { + if (ts.isVariableDeclaration(node.parent) && ((_a = node.symbol.members) === null || _a === void 0 ? void 0 : _a.size)) { + return true; + } + var decl = ts.getDeclarationOfExpando(node); + var symbol = decl === null || decl === void 0 ? void 0 : decl.symbol; + return !!(symbol && (((_b = symbol.exports) === null || _b === void 0 ? void 0 : _b.size) || ((_c = symbol.members) === null || _c === void 0 ? void 0 : _c.size))); + } + if (node.kind === 244 /* FunctionDeclaration */) { + return !!((_d = node.symbol.members) === null || _d === void 0 ? void 0 : _d.size); + } + return false; + } })(ts || (ts = {})); /* @internal */ var ts; @@ -119050,9 +120820,6 @@ var ts; (function (SymbolDisplay) { // TODO(drosen): use contextual SemanticMeaning. function getSymbolKind(typeChecker, symbol, location) { - while (ts.isTypeOnlyAlias(symbol)) { - symbol = symbol.immediateTarget; - } var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location); if (result !== "" /* unknown */) { return result; @@ -119170,9 +120937,6 @@ var ts; // TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning, alias) { if (semanticMeaning === void 0) { semanticMeaning = ts.getMeaningFromLocation(location); } - while (ts.isTypeOnlyAlias(symbol)) { - symbol = symbol.immediateTarget; - } var displayParts = []; var documentation = []; var tags = []; @@ -119814,11 +121578,11 @@ var ts; this.options = options; } FormattingContext.prototype.updateContext = function (currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) { - this.currentTokenSpan = ts.Debug.assertDefined(currentRange); - this.currentTokenParent = ts.Debug.assertDefined(currentTokenParent); - this.nextTokenSpan = ts.Debug.assertDefined(nextRange); - this.nextTokenParent = ts.Debug.assertDefined(nextTokenParent); - this.contextNode = ts.Debug.assertDefined(commonParent); + this.currentTokenSpan = ts.Debug.checkDefined(currentRange); + this.currentTokenParent = ts.Debug.checkDefined(currentTokenParent); + this.nextTokenSpan = ts.Debug.checkDefined(nextRange); + this.nextTokenParent = ts.Debug.checkDefined(nextTokenParent); + this.contextNode = ts.Debug.checkDefined(commonParent); // drop cached results this.contextNodeAllOnSameLine = undefined; this.nextNodeAllOnSameLine = undefined; @@ -119973,7 +121737,14 @@ var ts; return false; } function shouldRescanJsxText(node) { - return node.kind === 11 /* JsxText */; + var isJSXText = ts.isJsxText(node); + if (isJSXText) { + var containingElement = ts.findAncestor(node.parent, function (p) { return ts.isJsxElement(p); }); + if (!containingElement) + return false; // should never happen + return !ts.isParenthesizedExpression(containingElement.parent); + } + return false; } function shouldRescanSlashToken(container) { return container.kind === 13 /* RegularExpressionLiteral */; @@ -120062,7 +121833,7 @@ var ts; case 3 /* RescanTemplateToken */: if (token === 19 /* CloseBraceToken */) { lastScanAction = 3 /* RescanTemplateToken */; - return scanner.reScanTemplateToken(); + return scanner.reScanTemplateToken(/* isTaggedTemplate */ false); } break; case 4 /* RescanJsxIdentifier */: @@ -120337,7 +122108,7 @@ var ts; // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses rule("SpaceAfterConstructor", 129 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), rule("NoSpaceAfterConstructor", 129 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("SpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket], 4 /* InsertSpace */), + rule("SpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket, isNextTokenNotCloseParen], 4 /* InsertSpace */), rule("NoSpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext], 16 /* DeleteSpace */), // Insert space after function keyword for anonymous functions rule("SpaceAfterAnonymousFunctionKeyword", [94 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 4 /* InsertSpace */), @@ -120686,6 +122457,9 @@ var ts; function isNextTokenNotCloseBracket(context) { return context.nextTokenSpan.kind !== 23 /* CloseBracketToken */; } + function isNextTokenNotCloseParen(context) { + return context.nextTokenSpan.kind !== 21 /* CloseParenToken */; + } function isArrowFunctionContext(context) { return context.contextNode.kind === 202 /* ArrowFunction */; } @@ -121186,7 +122960,7 @@ var ts; } var error = sorted[index]; if (r.end <= error.start) { - // specified range ends before the error refered by 'index' - no error in range + // specified range ends before the error referred by 'index' - no error in range return false; } if (ts.startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { @@ -121488,6 +123262,11 @@ var ts; if (tokenInfo.token.end > node.end) { break; } + if (node.kind === 11 /* JsxText */) { + // Intentation rules for jsx text are handled by `indentMultilineCommentOrJsxText` inside `processChildNode`; just fastforward past it here + formattingScanner.advance(); + continue; + } consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node); } if (!node.parent && formattingScanner.isOnEOF()) { @@ -121546,7 +123325,19 @@ var ts; processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); if (child.kind === 11 /* JsxText */) { var range = { pos: child.getStart(), end: child.getEnd() }; - indentMultilineCommentOrJsxText(range, childIndentation.indentation, /*firstLineIsIndented*/ true, /*indentFinalLine*/ false); + if (range.pos !== range.end) { // don't indent zero-width jsx text + var siblings = parent.getChildren(sourceFile); + var currentIndex = ts.findIndex(siblings, function (arg) { return arg.pos === child.pos; }); + var previousNode = siblings[currentIndex - 1]; + if (previousNode) { + // The jsx text needs no indentation whatsoever if it ends on the same line the previous sibling ends on + if (sourceFile.getLineAndCharacterOfPosition(range.end).line !== sourceFile.getLineAndCharacterOfPosition(previousNode.end).line) { + // The first line is (already) "indented" if the text starts on the same line as the previous sibling element ends on + var firstLineIsIndented = sourceFile.getLineAndCharacterOfPosition(range.pos).line === sourceFile.getLineAndCharacterOfPosition(previousNode.end).line; + indentMultilineCommentOrJsxText(range, childIndentation.indentation, firstLineIsIndented, /*indentFinalLine*/ false, /*jsxStyle*/ true); + } + } + } } childContextNode = node; if (isFirstListItem && parent.kind === 192 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { @@ -121600,8 +123391,11 @@ var ts; if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(parent); if (tokenInfo.token.kind === 27 /* CommaToken */ && ts.isCallLikeExpression(parent)) { - formattingScanner.advance(); - tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent) : undefined; + var commaTokenLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; + if (startLine !== commaTokenLine) { + formattingScanner.advance(); + tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent) : undefined; + } } // consume the list end token only if it is still belong to the parent // there might be the case when current token matches end token but does not considered as one @@ -121787,7 +123581,7 @@ var ts; function indentationIsDifferent(indentationString, startLinePosition) { return indentationString !== sourceFile.text.substr(startLinePosition, indentationString.length); } - function indentMultilineCommentOrJsxText(commentRange, indentation, firstLineIsIndented, indentFinalLine) { + function indentMultilineCommentOrJsxText(commentRange, indentation, firstLineIsIndented, indentFinalLine, jsxTextStyleIndent) { if (indentFinalLine === void 0) { indentFinalLine = true; } // split comment in lines var startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; @@ -121813,7 +123607,7 @@ var ts; return; var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); var nonWhitespaceColumnInFirstPart = formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); - if (indentation === nonWhitespaceColumnInFirstPart.column) { + if (indentation === nonWhitespaceColumnInFirstPart.column && !jsxTextStyleIndent) { return; } var startIndex = 0; @@ -121828,6 +123622,13 @@ var ts; var nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); + if (jsxTextStyleIndent) { + // skip adding indentation to blank lines + if (ts.isLineBreak(sourceFile.text.charCodeAt(ts.getStartPositionOfLine(startLine, sourceFile)))) + continue; + // reset delta on every line + delta = indentation - nonWhitespaceCharacterAndColumn.column; + } var newIndentation = nonWhitespaceCharacterAndColumn.column + delta; if (newIndentation > 0) { var indentationString = getIndentationString(newIndentation, options); @@ -122389,7 +124190,7 @@ var ts; case 214 /* ClassExpression */: case 246 /* InterfaceDeclaration */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return getList(node.typeParameters); case 197 /* NewExpression */: case 196 /* CallExpression */: @@ -123608,25 +125409,47 @@ var ts; position = shebang.length; advancePastLineBreak(); } - // For a source file, it is possible there are detached comments we should not skip var ranges = ts.getLeadingCommentRanges(text, position); if (!ranges) return position; - // However we should still skip a pinned comment at the top - if (ranges.length && ranges[0].kind === 3 /* MultiLineCommentTrivia */ && ts.isPinnedComment(text, ranges[0].pos)) { - position = ranges[0].end; - advancePastLineBreak(); - ranges = ranges.slice(1); - } - // As well as any triple slash references + // Find the first attached comment to the first node and add before it + var lastComment; + var firstNodeLine; for (var _b = 0, ranges_1 = ranges; _b < ranges_1.length; _b++) { var range = ranges_1[_b]; - if (range.kind === 2 /* SingleLineCommentTrivia */ && ts.isRecognizedTripleSlashComment(text, range.pos, range.end)) { - position = range.end; - advancePastLineBreak(); + if (range.kind === 3 /* MultiLineCommentTrivia */) { + if (ts.isPinnedComment(text, range.pos)) { + lastComment = { range: range, pinnedOrTripleSlash: true }; + continue; + } + } + else if (ts.isRecognizedTripleSlashComment(text, range.pos, range.end)) { + lastComment = { range: range, pinnedOrTripleSlash: true }; continue; } - break; + if (lastComment) { + // Always insert after pinned or triple slash comments + if (lastComment.pinnedOrTripleSlash) + break; + // There was a blank line between the last comment and this comment. + // This comment is not part of the copyright comments + var commentLine = sourceFile.getLineAndCharacterOfPosition(range.pos).line; + var lastCommentEndLine = sourceFile.getLineAndCharacterOfPosition(lastComment.range.end).line; + if (commentLine >= lastCommentEndLine + 2) + break; + } + if (sourceFile.statements.length) { + if (firstNodeLine === undefined) + firstNodeLine = sourceFile.getLineAndCharacterOfPosition(sourceFile.statements[0].getStart()).line; + var commentEndLine = sourceFile.getLineAndCharacterOfPosition(range.end).line; + if (firstNodeLine < commentEndLine + 2) + break; + } + lastComment = { range: range, pinnedOrTripleSlash: false }; + } + if (lastComment) { + position = lastComment.range.end; + advancePastLineBreak(); } return position; function advancePastLineBreak() { @@ -123669,9 +125492,10 @@ var ts; break; } case 254 /* ImportDeclaration */: + var isFirstImport = sourceFile.imports.length && node === ts.first(sourceFile.imports).parent || node === ts.find(sourceFile.statements, ts.isImportDeclaration); deleteNode(changes, sourceFile, node, // For first import, leave header comment in place - node === sourceFile.imports[0].parent ? { leadingTriviaOption: LeadingTriviaOption.Exclude } : undefined); + isFirstImport ? { leadingTriviaOption: LeadingTriviaOption.Exclude } : undefined); break; case 191 /* BindingElement */: var pattern = node.parent; @@ -123738,7 +125562,7 @@ var ts; // Delete named imports while preserving the default import // import d|, * as ns| from './file' // import d|, { a }| from './file' - var previousToken = ts.Debug.assertDefined(ts.getTokenAtPosition(sourceFile, node.pos - 1)); + var previousToken = ts.Debug.checkDefined(ts.getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { @@ -123787,7 +125611,7 @@ var ts; } textChanges_3.deleteNode = deleteNode; function deleteNodeInList(changes, deletedNodesInLists, sourceFile, node) { - var containingList = ts.Debug.assertDefined(ts.formatting.SmartIndenter.getContainingList(node, sourceFile)); + var containingList = ts.Debug.checkDefined(ts.formatting.SmartIndenter.getContainingList(node, sourceFile)); var index = ts.indexOfNode(containingList, node); ts.Debug.assert(index !== -1); if (containingList.length === 1) { @@ -123946,7 +125770,7 @@ var ts; }); function makeChange(changeTracker, sourceFile, pos) { var token = ts.getTokenAtPosition(sourceFile, pos); - var assertion = ts.Debug.assertDefined(ts.findAncestor(token, function (n) { return ts.isAsExpression(n) || ts.isTypeAssertion(n); }), "Expected to find an assertion expression"); + var assertion = ts.Debug.checkDefined(ts.findAncestor(token, function (n) { return ts.isAsExpression(n) || ts.isTypeAssertion(n); }), "Expected to find an assertion expression"); var replacement = ts.isAsExpression(assertion) ? ts.createAsExpression(assertion.expression, ts.createKeywordTypeNode(148 /* UnknownKeyword */)) : ts.createTypeAssertion(ts.createKeywordTypeNode(148 /* UnknownKeyword */), assertion.expression); @@ -123978,6 +125802,87 @@ var ts; })(ts || (ts = {})); /* @internal */ var ts; +(function (ts) { + var codefix; + (function (codefix) { + var fixId = "addMissingAsync"; + var errorCodes = [ + ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + ts.Diagnostics.Type_0_is_not_assignable_to_type_1.code, + ts.Diagnostics.Type_0_is_not_comparable_to_type_1.code + ]; + codefix.registerCodeFix({ + fixIds: [fixId], + errorCodes: errorCodes, + getCodeActions: function (context) { + var sourceFile = context.sourceFile, errorCode = context.errorCode, cancellationToken = context.cancellationToken, program = context.program, span = context.span; + var diagnostic = ts.find(program.getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile, cancellationToken), getIsMatchingAsyncError(span, errorCode)); + var directSpan = diagnostic && diagnostic.relatedInformation && ts.find(diagnostic.relatedInformation, function (r) { return r.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + var decl = getFixableErrorSpanDeclaration(sourceFile, directSpan); + if (!decl) { + return; + } + var trackChanges = function (cb) { return ts.textChanges.ChangeTracker.with(context, cb); }; + return [getFix(context, decl, trackChanges)]; + }, + getAllCodeActions: function (context) { + var sourceFile = context.sourceFile; + var fixedDeclarations = ts.createMap(); + return codefix.codeFixAll(context, errorCodes, function (t, diagnostic) { + var span = diagnostic.relatedInformation && ts.find(diagnostic.relatedInformation, function (r) { return r.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + var decl = getFixableErrorSpanDeclaration(sourceFile, span); + if (!decl) { + return; + } + var trackChanges = function (cb) { return (cb(t), []); }; + return getFix(context, decl, trackChanges, fixedDeclarations); + }); + }, + }); + function getFix(context, decl, trackChanges, fixedDeclarations) { + var changes = trackChanges(function (t) { return makeChange(t, context.sourceFile, decl, fixedDeclarations); }); + return codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_async_modifier_to_containing_function, fixId, ts.Diagnostics.Add_all_missing_async_modifiers); + } + function makeChange(changeTracker, sourceFile, insertionSite, fixedDeclarations) { + if (fixedDeclarations) { + if (fixedDeclarations.has(ts.getNodeId(insertionSite).toString())) { + return; + } + } + fixedDeclarations === null || fixedDeclarations === void 0 ? void 0 : fixedDeclarations.set(ts.getNodeId(insertionSite).toString(), true); + var cloneWithModifier = ts.getSynthesizedDeepClone(insertionSite, /*includeTrivia*/ true); + cloneWithModifier.modifiers = ts.createNodeArray(ts.createModifiersFromModifierFlags(ts.getModifierFlags(insertionSite) | 256 /* Async */)); + cloneWithModifier.modifierFlagsCache = 0; + changeTracker.replaceNode(sourceFile, insertionSite, cloneWithModifier); + } + function getFixableErrorSpanDeclaration(sourceFile, span) { + if (!span) + return undefined; + var token = ts.getTokenAtPosition(sourceFile, span.start); + // Checker has already done work to determine that async might be possible, and has attached + // related info to the node, so start by finding the signature that exactly matches up + // with the diagnostic range. + var decl = ts.findAncestor(token, function (node) { + if (node.getStart(sourceFile) < span.start || node.getEnd() > ts.textSpanEnd(span)) { + return "quit"; + } + return (ts.isArrowFunction(node) || ts.isMethodDeclaration(node) || ts.isFunctionExpression(node) || ts.isFunctionDeclaration(node)) && ts.textSpansEqual(span, ts.createTextSpanFromNode(node, sourceFile)); + }); + return decl; + } + function getIsMatchingAsyncError(span, errorCode) { + return function (_a) { + var start = _a.start, length = _a.length, relatedInformation = _a.relatedInformation, code = _a.code; + return ts.isNumber(start) && ts.isNumber(length) && ts.textSpansEqual({ start: start, length: length }, span) && + code === errorCode && + !!relatedInformation && + ts.some(relatedInformation, function (related) { return related.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + }; + } + })(codefix = ts.codefix || (ts.codefix = {})); +})(ts || (ts = {})); +/* @internal */ +var ts; (function (ts) { var codefix; (function (codefix) { @@ -124496,7 +126401,7 @@ var ts; } } else { - var jsdocType = ts.Debug.assertDefined(ts.getJSDocType(decl), "A JSDocType for this declaration should exist"); // If not defined, shouldn't have been an error to fix + var jsdocType = ts.Debug.checkDefined(ts.getJSDocType(decl), "A JSDocType for this declaration should exist"); // If not defined, shouldn't have been an error to fix ts.Debug.assert(!decl.type, "The JSDocType decl should have a type"); // If defined, shouldn't have been an error to fix. changes.tryInsertTypeAnnotation(sourceFile, decl, transformJSDocType(jsdocType)); } @@ -124635,20 +126540,20 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; + var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, preferences = context.preferences; var token = ts.getTokenAtPosition(sourceFile, start); var declaration; - var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, formatContext, preferences); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, preferences); }); var name = declaration && ts.getNameOfDeclaration(declaration); return !name || changes.length === 0 ? undefined : [codefix.createCodeFixAction(fixId, changes, [getDiagnostic(errorCode, token), name.getText(sourceFile)], fixId, ts.Diagnostics.Infer_all_types_from_usage)]; }, fixIds: [fixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; + var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, preferences = context.preferences; var markSeen = ts.nodeSeenTracker(); return codefix.codeFixAll(context, errorCodes, function (changes, err) { - doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, formatContext, preferences); + doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, preferences); }); }, }); @@ -124688,18 +126593,20 @@ var ts; } return errorCode; } - function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, formatContext, preferences) { + function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, preferences) { if (!ts.isParameterPropertyModifier(token.kind) && token.kind !== 75 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 104 /* ThisKeyword */) { return undefined; } var parent = token.parent; + var importAdder = codefix.createImportAdder(sourceFile, program, preferences, host); errorCode = mapSuggestionDiagnostic(errorCode); switch (errorCode) { // Variable and Property declarations case ts.Diagnostics.Member_0_implicitly_has_an_1_type.code: case ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: if ((ts.isVariableDeclaration(parent) && markSeen(parent)) || ts.isPropertyDeclaration(parent) || ts.isPropertySignature(parent)) { // handle bad location - annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken, formatContext, preferences); + annotateVariableDeclaration(changes, importAdder, sourceFile, parent, program, host, cancellationToken); + importAdder.writeFixes(changes); return parent; } if (ts.isPropertyAccessExpression(parent)) { @@ -124710,13 +126617,15 @@ var ts; var typeTag = ts.createJSDocTypeTag(ts.createJSDocTypeExpression(typeNode), /*comment*/ ""); addJSDocTags(changes, sourceFile, ts.cast(parent.parent.parent, ts.isExpressionStatement), [typeTag]); } + importAdder.writeFixes(changes); return parent; } return undefined; case ts.Diagnostics.Variable_0_implicitly_has_an_1_type.code: { var symbol = program.getTypeChecker().getSymbolAtLocation(token); if (symbol && symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) { - annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken, formatContext, preferences); + annotateVariableDeclaration(changes, importAdder, sourceFile, symbol.valueDeclaration, program, host, cancellationToken); + importAdder.writeFixes(changes); return symbol.valueDeclaration; } return undefined; @@ -124726,53 +126635,57 @@ var ts; if (containingFunction === undefined) { return undefined; } + var declaration; switch (errorCode) { // Parameter declarations case ts.Diagnostics.Parameter_0_implicitly_has_an_1_type.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); - return containingFunction; + annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); + declaration = containingFunction; + break; } // falls through case ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: if (markSeen(containingFunction)) { var param = ts.cast(parent, ts.isParameter); - annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken, formatContext, preferences); - return param; + annotateParameters(changes, importAdder, sourceFile, param, containingFunction, program, host, cancellationToken); + declaration = param; } - return undefined; + break; // Get Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: case ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: if (ts.isGetAccessorDeclaration(containingFunction) && ts.isIdentifier(containingFunction.name)) { - annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host, formatContext, preferences); - return containingFunction; + annotate(changes, importAdder, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host); + declaration = containingFunction; } - return undefined; + break; // Set Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); - return containingFunction; + annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); + declaration = containingFunction; } - return undefined; + break; // Function 'this' case ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: if (ts.textChanges.isThisTypeAnnotatable(containingFunction) && markSeen(containingFunction)) { annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken); - return containingFunction; + declaration = containingFunction; } - return undefined; + break; default: return ts.Debug.fail(String(errorCode)); } + importAdder.writeFixes(changes); + return declaration; } - function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken, formatContext, preferences) { + function annotateVariableDeclaration(changes, importAdder, sourceFile, declaration, program, host, cancellationToken) { if (ts.isIdentifier(declaration.name)) { - annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host); } } - function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken, formatContext, preferences) { + function annotateParameters(changes, importAdder, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) { if (!ts.isIdentifier(parameterDeclaration.name)) { return; } @@ -124788,7 +126701,7 @@ var ts; for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) { var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type; if (declaration && !declaration.type && !declaration.initializer) { - annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, declaration, type, program, host); } } if (needParens) @@ -124817,7 +126730,7 @@ var ts; ts.createJSDocThisTag(ts.createJSDocTypeExpression(typeNode)), ]); } - function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken, formatContext, preferences) { + function annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclaration, program, host, cancellationToken) { var param = ts.firstOrUndefined(setAccessorDeclaration.parameters); if (param && ts.isIdentifier(setAccessorDeclaration.name) && ts.isIdentifier(param.name)) { var type = inferTypeForVariableFromUsage(setAccessorDeclaration.name, program, cancellationToken); @@ -124828,11 +126741,11 @@ var ts; annotateJSDocParameters(changes, sourceFile, [{ declaration: param, type: type }], program, host); } else { - annotate(changes, sourceFile, param, type, program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, param, type, program, host); } } } - function annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences) { + function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { var typeNode = ts.getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { if (ts.isInJSFile(sourceFile) && declaration.kind !== 158 /* PropertySignature */) { @@ -124844,29 +126757,16 @@ var ts; var typeTag = ts.isGetAccessorDeclaration(declaration) ? ts.createJSDocReturnTag(typeExpression, "") : ts.createJSDocTypeTag(typeExpression, ""); addJSDocTags(changes, sourceFile, parent, [typeTag]); } - else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences)) { + else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, type, sourceFile, changes, importAdder, ts.getEmitScriptTarget(program.getCompilerOptions()))) { changes.tryInsertTypeAnnotation(sourceFile, declaration, typeNode); } } } - function tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences) { - var _a; - if (ts.isLiteralImportTypeNode(typeNode) && typeNode.qualifier && type.symbol) { - // Replace 'import("./a").SomeType' with 'SomeType' and an actual import if possible - var moduleSymbol = (_a = ts.find(type.symbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) === null || _a === void 0 ? void 0 : _a.getSourceFile().symbol; - // Symbol for the left-most thing after the dot - if (moduleSymbol) { - var symbol = ts.getFirstIdentifier(typeNode.qualifier).symbol; - var action = codefix.getImportCompletionAction(symbol, moduleSymbol, sourceFile, symbol.name, host, program, formatContext, declaration.pos, preferences); - if (action.codeAction.changes.length && changes.tryInsertTypeAnnotation(sourceFile, declaration, ts.createTypeReferenceNode(typeNode.qualifier, typeNode.typeArguments))) { - for (var _i = 0, _b = action.codeAction.changes; _i < _b.length; _i++) { - var change = _b[_i]; - var file = sourceFile.fileName === change.fileName ? sourceFile : ts.Debug.assertDefined(program.getSourceFile(change.fileName)); - changes.pushRaw(file, change); - } - return true; - } - } + function tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, type, sourceFile, changes, importAdder, scriptTarget) { + var importableReference = codefix.tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget); + if (importableReference && changes.tryInsertTypeAnnotation(sourceFile, declaration, importableReference.typeReference)) { + ts.forEach(importableReference.symbols, function (s) { return importAdder.addImportFromExportedSymbol(s, /*usageIsTypeOnly*/ true); }); + return true; } return false; } @@ -124913,14 +126813,14 @@ var ts; return undefined; } switch (oldTag.kind) { - case 316 /* JSDocParameterTag */: { + case 317 /* JSDocParameterTag */: { var oldParam = oldTag; var newParam = newTag; return ts.isIdentifier(oldParam.name) && ts.isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? ts.createJSDocParamTag(newParam.name, newParam.isBracketed, newParam.typeExpression, oldParam.comment) : undefined; } - case 317 /* JSDocReturnTag */: + case 318 /* JSDocReturnTag */: return ts.createJSDocReturnTag(newTag.typeExpression, oldTag.comment); } } @@ -125443,7 +127343,7 @@ var ts; var callSignatures = usage.calls ? [getSignatureFromCalls(usage.calls)] : []; var constructSignatures = usage.constructs ? [getSignatureFromCalls(usage.constructs)] : []; var stringIndexInfo = usage.stringIndex && checker.createIndexInfo(combineFromUsage(usage.stringIndex), /*isReadonly*/ false); - return checker.createAnonymousType(/*symbol*/ undefined, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined); // TODO: GH#18217 + return checker.createAnonymousType(/*symbol*/ undefined, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined); } function inferNamedTypesFromProperties(usage) { if (!usage.properties || !usage.properties.size) @@ -125543,7 +127443,7 @@ var ts; return types; } function getFunctionFromCalls(calls) { - return checker.createAnonymousType(undefined, ts.createSymbolTable(), [getSignatureFromCalls(calls)], ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); + return checker.createAnonymousType(/*symbol*/ undefined, ts.createSymbolTable(), [getSignatureFromCalls(calls)], ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); } function getSignatureFromCalls(calls) { var parameters = []; @@ -126850,7 +128750,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile, span = context.span; var classDeclaration = getClass(sourceFile, span.start); - return ts.mapDefined(ts.getClassImplementsHeritageClauseElements(classDeclaration), function (implementedTypeNode) { + return ts.mapDefined(ts.getEffectiveImplementsTypeNodes(classDeclaration), function (implementedTypeNode) { var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, t, context.preferences); }); return changes.length === 0 ? undefined : codefix.createCodeFixAction(fixId, changes, [ts.Diagnostics.Implement_interface_0, implementedTypeNode.getText(sourceFile)], fixId, ts.Diagnostics.Implement_all_unimplemented_interfaces); }); @@ -126861,7 +128761,7 @@ var ts; return codefix.codeFixAll(context, errorCodes, function (changes, diag) { var classDeclaration = getClass(diag.file, diag.start); if (ts.addToSeen(seenClassDeclarations, ts.getNodeId(classDeclaration))) { - for (var _i = 0, _a = ts.getClassImplementsHeritageClauseElements(classDeclaration); _i < _a.length; _i++) { + for (var _i = 0, _a = ts.getEffectiveImplementsTypeNodes(classDeclaration); _i < _a.length; _i++) { var implementedTypeNode = _a[_i]; addMissingDeclarations(context, implementedTypeNode, diag.file, classDeclaration, changes, context.preferences); } @@ -126870,7 +128770,7 @@ var ts; }, }); function getClass(sourceFile, pos) { - return ts.Debug.assertDefined(ts.getContainingClass(ts.getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); + return ts.Debug.checkDefined(ts.getContainingClass(ts.getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); } function symbolPointsToNonPrivateMember(symbol) { return !symbol.valueDeclaration || !(ts.getModifierFlags(symbol.valueDeclaration) & 8 /* Private */); @@ -126891,7 +128791,9 @@ var ts; if (!classType.getStringIndexType()) { createMissingIndexSignatureDeclaration(implementedType, 0 /* String */); } - codefix.createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, function (member) { return insertInterfaceMemberNode(sourceFile, classDeclaration, member); }); + var importAdder = codefix.createImportAdder(sourceFile, context.program, preferences, context.host); + codefix.createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, importAdder, function (member) { return insertInterfaceMemberNode(sourceFile, classDeclaration, member); }); + importAdder.writeFixes(changeTracker); function createMissingIndexSignatureDeclaration(type, kind) { var indexInfoOfKind = checker.getIndexInfoOfType(type, kind); if (indexInfoOfKind) { @@ -126947,111 +128849,115 @@ var ts; }, fixIds: [importFixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, preferences = context.preferences; - // Namespace fixes don't conflict, so just build a list. - var addToNamespace = []; - var importType = []; - // Keys are import clause node IDs. - var addToExisting = ts.createMap(); - var newImports = createNewImportMap(); - codefix.eachDiagnostic(context, errorCodes, function (diag) { - var info = getFixesInfo(context, diag.code, diag.start); - if (!info || !info.fixes.length) - return; - var fixes = info.fixes, symbolName = info.symbolName; - var fix = ts.first(fixes); - switch (fix.kind) { - case 0 /* UseNamespace */: - addToNamespace.push(fix); - break; - case 1 /* ImportType */: - importType.push(fix); - break; - case 2 /* AddToExisting */: { - var importClause = fix.importClause, importKind = fix.importKind; - var key = String(ts.getNodeId(importClause)); - var entry = addToExisting.get(key); - if (!entry) { - addToExisting.set(key, entry = { importClause: importClause, defaultImport: undefined, namedImports: [] }); - } - if (importKind === 0 /* Named */) { - ts.pushIfUnique(entry.namedImports, symbolName); - } - else { - ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add to Existing) Default import should be missing or match symbolName"); - entry.defaultImport = symbolName; - } - break; + var sourceFile = context.sourceFile, program = context.program, preferences = context.preferences, host = context.host; + var importAdder = createImportAdder(sourceFile, program, preferences, host); + codefix.eachDiagnostic(context, errorCodes, function (diag) { return importAdder.addImportFromDiagnostic(diag, context); }); + return codefix.createCombinedCodeActions(ts.textChanges.ChangeTracker.with(context, importAdder.writeFixes)); + }, + }); + function createImportAdder(sourceFile, program, preferences, host) { + var compilerOptions = program.getCompilerOptions(); + // Namespace fixes don't conflict, so just build a list. + var addToNamespace = []; + var importType = []; + // Keys are import clause node IDs. + var addToExisting = ts.createMap(); + var newImports = ts.createMap(); + var lastModuleSpecifier; + return { addImportFromDiagnostic: addImportFromDiagnostic, addImportFromExportedSymbol: addImportFromExportedSymbol, writeFixes: writeFixes }; + function addImportFromDiagnostic(diagnostic, context) { + var info = getFixesInfo(context, diagnostic.code, diagnostic.start); + if (!info || !info.fixes.length) + return; + addImport(info); + } + function addImportFromExportedSymbol(exportedSymbol, usageIsTypeOnly) { + var moduleSymbol = ts.Debug.checkDefined(exportedSymbol.parent); + var symbolName = ts.getNameForExportedSymbol(exportedSymbol, ts.getEmitScriptTarget(compilerOptions)); + var checker = program.getTypeChecker(); + var symbol = checker.getMergedSymbol(ts.skipAlias(exportedSymbol, checker)); + var exportInfos = getAllReExportingModules(sourceFile, symbol, moduleSymbol, symbolName, sourceFile, compilerOptions, checker, program.getSourceFiles()); + var preferTypeOnlyImport = !!usageIsTypeOnly && compilerOptions.importsNotUsedAsValues === 2 /* Error */; + var fix = getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, /*position*/ undefined, preferTypeOnlyImport, host, preferences); + addImport({ fixes: [fix], symbolName: symbolName }); + } + function addImport(info) { + var fixes = info.fixes, symbolName = info.symbolName; + var fix = ts.first(fixes); + switch (fix.kind) { + case 0 /* UseNamespace */: + addToNamespace.push(fix); + break; + case 1 /* ImportType */: + importType.push(fix); + break; + case 2 /* AddToExisting */: { + var importClause = fix.importClause, importKind = fix.importKind, canUseTypeOnlyImport = fix.canUseTypeOnlyImport; + var key = String(ts.getNodeId(importClause)); + var entry = addToExisting.get(key); + if (!entry) { + addToExisting.set(key, entry = { importClause: importClause, defaultImport: undefined, namedImports: [], canUseTypeOnlyImport: canUseTypeOnlyImport }); } - case 3 /* AddNew */: { - var moduleSpecifier = fix.moduleSpecifier, importKind = fix.importKind, typeOnly = fix.typeOnly; - var entry = newImports.get(moduleSpecifier, typeOnly); - if (!entry) { - newImports.set(moduleSpecifier, typeOnly, entry = { defaultImport: undefined, namedImports: [], namespaceLikeImport: undefined }); - } - switch (importKind) { - case 1 /* Default */: - ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add new) Default import should be missing or match symbolName"); - entry.defaultImport = symbolName; - break; - case 0 /* Named */: - ts.pushIfUnique(entry.namedImports, symbolName); - break; - case 3 /* Equals */: - case 2 /* Namespace */: - ts.Debug.assert(entry.namespaceLikeImport === undefined || entry.namespaceLikeImport.name === symbolName, "Namespacelike import shoudl be missing or match symbolName"); - entry.namespaceLikeImport = { importKind: importKind, name: symbolName }; - break; - } - break; + if (importKind === 0 /* Named */) { + ts.pushIfUnique(entry.namedImports, symbolName); } - default: - ts.Debug.assertNever(fix, "fix wasn't never - got kind " + fix.kind); + else { + ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add to Existing) Default import should be missing or match symbolName"); + entry.defaultImport = symbolName; + } + break; } + case 3 /* AddNew */: { + var moduleSpecifier = fix.moduleSpecifier, importKind = fix.importKind, typeOnly = fix.typeOnly; + var entry = newImports.get(moduleSpecifier); + if (!entry) { + newImports.set(moduleSpecifier, entry = { defaultImport: undefined, namedImports: [], namespaceLikeImport: undefined, typeOnly: typeOnly }); + lastModuleSpecifier = moduleSpecifier; + } + else { + // An import clause can only be type-only if every import fix contributing to it can be type-only. + entry.typeOnly = entry.typeOnly && typeOnly; + } + switch (importKind) { + case 1 /* Default */: + ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add new) Default import should be missing or match symbolName"); + entry.defaultImport = symbolName; + break; + case 0 /* Named */: + ts.pushIfUnique(entry.namedImports, symbolName); + break; + case 3 /* Equals */: + case 2 /* Namespace */: + ts.Debug.assert(entry.namespaceLikeImport === undefined || entry.namespaceLikeImport.name === symbolName, "Namespacelike import shoudl be missing or match symbolName"); + entry.namespaceLikeImport = { importKind: importKind, name: symbolName }; + break; + } + break; + } + default: + ts.Debug.assertNever(fix, "fix wasn't never - got kind " + fix.kind); + } + } + function writeFixes(changeTracker) { + var quotePreference = ts.getQuotePreference(sourceFile, preferences); + for (var _i = 0, addToNamespace_1 = addToNamespace; _i < addToNamespace_1.length; _i++) { + var fix = addToNamespace_1[_i]; + addNamespaceQualifier(changeTracker, sourceFile, fix); + } + for (var _a = 0, importType_1 = importType; _a < importType_1.length; _a++) { + var fix = importType_1[_a]; + addImportType(changeTracker, sourceFile, fix, quotePreference); + } + addToExisting.forEach(function (_a) { + var importClause = _a.importClause, defaultImport = _a.defaultImport, namedImports = _a.namedImports, canUseTypeOnlyImport = _a.canUseTypeOnlyImport; + doAddExistingFix(changeTracker, sourceFile, importClause, defaultImport, namedImports, canUseTypeOnlyImport); + }); + newImports.forEach(function (imports, moduleSpecifier) { + addNewImports(changeTracker, sourceFile, moduleSpecifier, quotePreference, imports, /*blankLineBetween*/ lastModuleSpecifier === moduleSpecifier); }); - return codefix.createCombinedCodeActions(ts.textChanges.ChangeTracker.with(context, function (changes) { - var quotePreference = ts.getQuotePreference(sourceFile, preferences); - for (var _i = 0, addToNamespace_1 = addToNamespace; _i < addToNamespace_1.length; _i++) { - var fix = addToNamespace_1[_i]; - addNamespaceQualifier(changes, sourceFile, fix); - } - for (var _a = 0, importType_1 = importType; _a < importType_1.length; _a++) { - var fix = importType_1[_a]; - addImportType(changes, sourceFile, fix, quotePreference); - } - addToExisting.forEach(function (_a) { - var importClause = _a.importClause, defaultImport = _a.defaultImport, namedImports = _a.namedImports; - doAddExistingFix(changes, sourceFile, importClause, defaultImport, namedImports); - }); - newImports.forEach(function (imports, moduleSpecifier, typeOnly) { - addNewImports(changes, sourceFile, typeOnly, moduleSpecifier, quotePreference, imports); - }); - })); - }, - }); - function createNewImportMap() { - // Keys are module specifiers. - var newImports = ts.createMap(); - return { - get: function (moduleSpecifier, typeOnly) { - return newImports.get(key(moduleSpecifier, typeOnly)); - }, - set: function (moduleSpecifier, typeOnly, value) { - return newImports.set(key(moduleSpecifier, typeOnly), value); - }, - forEach: function (action) { - newImports.forEach(function (value, key) { - var typeOnly = !!+key[0]; - var moduleSpecifier = key.slice(1); - action(value, moduleSpecifier, typeOnly); - }); - }, - }; - function key(moduleSpecifier, typeOnly) { - var prefix = typeOnly ? "1" : "0"; - return prefix + moduleSpecifier; } } + codefix.createImportAdder = createImportAdder; // Sorted with the preferred fix coming first. var ImportFixKind; (function (ImportFixKind) { @@ -127069,14 +128975,19 @@ var ts; ImportKind[ImportKind["ConstEquals"] = 4] = "ConstEquals"; })(ImportKind || (ImportKind = {})); function getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, symbolName, host, program, formatContext, position, preferences) { - var exportInfos = getAllReExportingModules(sourceFile, exportedSymbol, moduleSymbol, symbolName, sourceFile, program.getCompilerOptions(), program.getTypeChecker(), program.getSourceFiles()); - ts.Debug.assert(exportInfos.some(function (info) { return info.moduleSymbol === moduleSymbol; }), "Some exportInfo should match the specified moduleSymbol"); - // We sort the best codefixes first, so taking `first` is best for completions. - var moduleSpecifier = ts.first(getNewImportInfos(program, sourceFile, position, exportInfos, host, preferences)).moduleSpecifier; - var fix = ts.first(getFixForImport(exportInfos, symbolName, position, program, sourceFile, host, preferences)); + var compilerOptions = program.getCompilerOptions(); + var exportInfos = getAllReExportingModules(sourceFile, exportedSymbol, moduleSymbol, symbolName, sourceFile, compilerOptions, program.getTypeChecker(), program.getSourceFiles()); + var preferTypeOnlyImport = compilerOptions.importsNotUsedAsValues === 2 /* Error */ && ts.isValidTypeOnlyAliasUseSite(ts.getTokenAtPosition(sourceFile, position)); + var moduleSpecifier = ts.first(getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, exportInfos, host, preferences)).moduleSpecifier; + var fix = getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, preferTypeOnlyImport, host, preferences); return { moduleSpecifier: moduleSpecifier, codeAction: codeFixActionToCodeAction(codeActionForFix({ host: host, formatContext: formatContext, preferences: preferences }, sourceFile, symbolName, fix, ts.getQuotePreference(sourceFile, preferences))) }; } codefix.getImportCompletionAction = getImportCompletionAction; + function getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, preferTypeOnlyImport, host, preferences) { + ts.Debug.assert(exportInfos.some(function (info) { return info.moduleSymbol === moduleSymbol; }), "Some exportInfo should match the specified moduleSymbol"); + // We sort the best codefixes first, so taking `first` is best. + return ts.first(getFixForImport(exportInfos, symbolName, position, preferTypeOnlyImport, program, sourceFile, host, preferences)); + } function codeFixActionToCodeAction(_a) { var description = _a.description, changes = _a.changes, commands = _a.commands; return { description: description, changes: changes, commands: commands }; @@ -127104,13 +129015,18 @@ var ts; function isTypeOnlySymbol(s, checker) { return !(ts.skipAlias(s, checker).flags & 111551 /* Value */); } - function getFixForImport(exportInfos, symbolName, position, program, sourceFile, host, preferences) { + function isTypeOnlyPosition(sourceFile, position) { + return ts.isValidTypeOnlyAliasUseSite(ts.getTokenAtPosition(sourceFile, position)); + } + function getFixForImport(exportInfos, symbolName, + /** undefined only for missing JSX namespace */ + position, preferTypeOnlyImport, program, sourceFile, host, preferences) { var checker = program.getTypeChecker(); var existingImports = ts.flatMap(exportInfos, function (info) { return getExistingImportDeclarations(info, checker, sourceFile); }); var useNamespace = position === undefined ? undefined : tryUseExistingNamespaceImport(existingImports, symbolName, position, checker); - var addToExisting = tryAddToExistingImport(existingImports); + var addToExisting = tryAddToExistingImport(existingImports, position !== undefined && isTypeOnlyPosition(sourceFile, position)); // Don't bother providing an action to add a new import if we can add to an existing one. - var addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, host, preferences); + var addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, preferTypeOnlyImport, host, preferences); return __spreadArrays((useNamespace ? [useNamespace] : ts.emptyArray), addImport); } function tryUseExistingNamespaceImport(existingImports, symbolName, position, checker) { @@ -127137,7 +129053,7 @@ var ts; } }); } - function tryAddToExistingImport(existingImports) { + function tryAddToExistingImport(existingImports, canUseTypeOnlyImport) { return ts.firstDefined(existingImports, function (_a) { var declaration = _a.declaration, importKind = _a.importKind; if (declaration.kind !== 254 /* ImportDeclaration */) @@ -127147,7 +129063,7 @@ var ts; return undefined; var name = importClause.name, namedBindings = importClause.namedBindings; return importKind === 1 /* Default */ && !name || importKind === 0 /* Named */ && (!namedBindings || namedBindings.kind === 257 /* NamedImports */) - ? { kind: 2 /* AddToExisting */, importClause: importClause, importKind: importKind } + ? { kind: 2 /* AddToExisting */, importClause: importClause, importKind: importKind, canUseTypeOnlyImport: canUseTypeOnlyImport } : undefined; }); } @@ -127169,7 +129085,7 @@ var ts; && checker.getSymbolAtLocation(moduleSpecifier) === moduleSymbol ? { declaration: i, importKind: importKind, exportedSymbolIsTypeOnly: exportedSymbolIsTypeOnly } : undefined; }); } - function getNewImportInfos(program, sourceFile, position, moduleSymbols, host, preferences) { + function getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, moduleSymbols, host, preferences) { var isJs = ts.isSourceFileJS(sourceFile); var allowsImportingSpecifier = createAutoImportFilter(sourceFile, program, host).allowsImportingSpecifier; var choicesForEachExportingModule = ts.flatMap(moduleSymbols, function (_a) { @@ -127178,8 +129094,8 @@ var ts; .map(function (moduleSpecifier) { // `position` should only be undefined at a missing jsx namespace, in which case we shouldn't be looking for pure types. return exportedSymbolIsTypeOnly && isJs - ? { kind: 1 /* ImportType */, moduleSpecifier: moduleSpecifier, position: ts.Debug.assertDefined(position, "position should be defined") } - : { kind: 3 /* AddNew */, moduleSpecifier: moduleSpecifier, importKind: importKind, typeOnly: exportedSymbolIsTypeOnly }; + ? { kind: 1 /* ImportType */, moduleSpecifier: moduleSpecifier, position: ts.Debug.checkDefined(position, "position should be defined") } + : { kind: 3 /* AddNew */, moduleSpecifier: moduleSpecifier, importKind: importKind, typeOnly: preferTypeOnlyImport }; }); }); // Sort by presence in package.json, then shortest paths first @@ -127195,19 +129111,19 @@ var ts; return a.moduleSpecifier.length - b.moduleSpecifier.length; }); } - function getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, host, preferences) { - var existingDeclaration = ts.firstDefined(existingImports, newImportInfoFromExistingSpecifier); - return existingDeclaration ? [existingDeclaration] : getNewImportInfos(program, sourceFile, position, exportInfos, host, preferences); + function getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, preferTypeOnlyImport, host, preferences) { + var existingDeclaration = ts.firstDefined(existingImports, function (info) { return newImportInfoFromExistingSpecifier(info, preferTypeOnlyImport); }); + return existingDeclaration ? [existingDeclaration] : getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, exportInfos, host, preferences); } - function newImportInfoFromExistingSpecifier(_a) { - var declaration = _a.declaration, importKind = _a.importKind, exportedSymbolIsTypeOnly = _a.exportedSymbolIsTypeOnly; + function newImportInfoFromExistingSpecifier(_a, preferTypeOnlyImport) { + var declaration = _a.declaration, importKind = _a.importKind; var expression = declaration.kind === 254 /* ImportDeclaration */ ? declaration.moduleSpecifier : declaration.moduleReference.kind === 265 /* ExternalModuleReference */ ? declaration.moduleReference.expression : undefined; return expression && ts.isStringLiteral(expression) - ? { kind: 3 /* AddNew */, moduleSpecifier: expression.text, importKind: importKind, typeOnly: exportedSymbolIsTypeOnly } + ? { kind: 3 /* AddNew */, moduleSpecifier: expression.text, importKind: importKind, typeOnly: preferTypeOnlyImport } : undefined; } function getFixesInfo(context, errorCode, pos) { @@ -127226,7 +129142,7 @@ var ts; var symbol = checker.getAliasedSymbol(umdSymbol); var symbolName = umdSymbol.name; var exportInfos = [{ moduleSymbol: symbol, importKind: getUmdImportKind(sourceFile, program.getCompilerOptions()), exportedSymbolIsTypeOnly: false }]; - var fixes = getFixForImport(exportInfos, symbolName, ts.isIdentifier(token) ? token.getStart(sourceFile) : undefined, program, sourceFile, host, preferences); + var fixes = getFixForImport(exportInfos, symbolName, ts.isIdentifier(token) ? token.getStart(sourceFile) : undefined, /*preferTypeOnlyImport*/ false, program, sourceFile, host, preferences); return { fixes: fixes, symbolName: symbolName }; } function getUmdSymbol(token, checker) { @@ -127277,10 +129193,11 @@ var ts; : symbolToken.text; // "default" is a keyword and not a legal identifier for the import, so we don't expect it here ts.Debug.assert(symbolName !== "default" /* Default */, "'default' isn't a legal identifier and couldn't occur here"); + var preferTypeOnlyImport = program.getCompilerOptions().importsNotUsedAsValues === 2 /* Error */ && ts.isValidTypeOnlyAliasUseSite(symbolToken); var exportInfos = getExportInfos(symbolName, ts.getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, checker, program, host); var fixes = ts.arrayFrom(ts.flatMapIterator(exportInfos.entries(), function (_a) { var _ = _a[0], exportInfos = _a[1]; - return getFixForImport(exportInfos, symbolName, symbolToken.getStart(sourceFile), program, sourceFile, host, preferences); + return getFixForImport(exportInfos, symbolName, symbolToken.getStart(sourceFile), preferTypeOnlyImport, program, sourceFile, host, preferences); })); return { fixes: fixes, symbolName: symbolName }; } @@ -127319,28 +129236,32 @@ var ts; if (defaultExport) return { symbol: defaultExport, kind: 1 /* Default */ }; var exportEquals = checker.resolveExternalModuleSymbol(moduleSymbol); - return exportEquals === moduleSymbol ? undefined : { symbol: exportEquals, kind: getExportEqualsImportKind(importingFile, compilerOptions, checker) }; + return exportEquals === moduleSymbol ? undefined : { symbol: exportEquals, kind: getExportEqualsImportKind(importingFile, compilerOptions) }; } - function getExportEqualsImportKind(importingFile, compilerOptions, checker) { + function getExportEqualsImportKind(importingFile, compilerOptions) { + var allowSyntheticDefaults = ts.getAllowSyntheticDefaultImports(compilerOptions); + // 1. 'import =' will not work in es2015+, so the decision is between a default + // and a namespace import, based on allowSyntheticDefaultImports/esModuleInterop. if (ts.getEmitModuleKind(compilerOptions) >= ts.ModuleKind.ES2015) { - return ts.getAllowSyntheticDefaultImports(compilerOptions) ? 1 /* Default */ : 2 /* Namespace */; + return allowSyntheticDefaults ? 1 /* Default */ : 2 /* Namespace */; } + // 2. 'import =' will not work in JavaScript, so the decision is between a default + // and const/require. if (ts.isInJSFile(importingFile)) { return ts.isExternalModule(importingFile) ? 1 /* Default */ : 4 /* ConstEquals */; } + // 3. At this point the most correct choice is probably 'import =', but people + // really hate that, so look to see if the importing file has any precedent + // on how to handle it. for (var _i = 0, _a = importingFile.statements; _i < _a.length; _i++) { var statement = _a[_i]; if (ts.isImportEqualsDeclaration(statement)) { return 3 /* Equals */; } - if (ts.isImportDeclaration(statement) && statement.importClause && statement.importClause.name) { - var moduleSymbol = checker.getImmediateAliasedSymbol(statement.importClause.symbol); - if (moduleSymbol && moduleSymbol.name !== "default" /* Default */) { - return 1 /* Default */; - } - } } - return 3 /* Equals */; + // 4. We have no precedent to go on, so just use a default import if + // allowSyntheticDefaultImports/esModuleInterop is enabled. + return allowSyntheticDefaults ? 1 /* Default */ : 3 /* Equals */; } function getDefaultExportInfoWorker(defaultExport, moduleSymbol, checker, compilerOptions) { var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport); @@ -127351,7 +129272,7 @@ var ts; return { symbolForMeaning: defaultExport, name: name }; if (defaultExport.flags & 2097152 /* Alias */) { var aliased = checker.getImmediateAliasedSymbol(defaultExport); - return aliased && getDefaultExportInfoWorker(aliased, ts.Debug.assertDefined(aliased.parent, "Alias targets of default exports must have a parent"), checker, compilerOptions); + return aliased && getDefaultExportInfoWorker(aliased, ts.Debug.checkDefined(aliased.parent, "Alias targets of default exports must have a parent"), checker, compilerOptions); } if (defaultExport.escapedName !== "default" /* Default */ && defaultExport.escapedName !== "export=" /* ExportEquals */) { @@ -127388,25 +129309,26 @@ var ts; addImportType(changes, sourceFile, fix, quotePreference); return [ts.Diagnostics.Change_0_to_1, symbolName, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName]; case 2 /* AddToExisting */: { - var importClause = fix.importClause, importKind = fix.importKind; - doAddExistingFix(changes, sourceFile, importClause, importKind === 1 /* Default */ ? symbolName : undefined, importKind === 0 /* Named */ ? [symbolName] : ts.emptyArray); + var importClause = fix.importClause, importKind = fix.importKind, canUseTypeOnlyImport = fix.canUseTypeOnlyImport; + doAddExistingFix(changes, sourceFile, importClause, importKind === 1 /* Default */ ? symbolName : undefined, importKind === 0 /* Named */ ? [symbolName] : ts.emptyArray, canUseTypeOnlyImport); var moduleSpecifierWithoutQuotes = ts.stripQuotes(importClause.parent.moduleSpecifier.getText()); return [importKind === 1 /* Default */ ? ts.Diagnostics.Add_default_import_0_to_existing_import_declaration_from_1 : ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, symbolName, moduleSpecifierWithoutQuotes]; // you too! } case 3 /* AddNew */: { - var importKind = fix.importKind, moduleSpecifier = fix.moduleSpecifier; - addNewImports(changes, sourceFile, fix.typeOnly, moduleSpecifier, quotePreference, importKind === 1 /* Default */ ? { defaultImport: symbolName, namedImports: ts.emptyArray, namespaceLikeImport: undefined } - : importKind === 0 /* Named */ ? { defaultImport: undefined, namedImports: [symbolName], namespaceLikeImport: undefined } - : { defaultImport: undefined, namedImports: ts.emptyArray, namespaceLikeImport: { importKind: importKind, name: symbolName } }); + var importKind = fix.importKind, moduleSpecifier = fix.moduleSpecifier, typeOnly = fix.typeOnly; + addNewImports(changes, sourceFile, moduleSpecifier, quotePreference, importKind === 1 /* Default */ ? { defaultImport: symbolName, namedImports: ts.emptyArray, namespaceLikeImport: undefined, typeOnly: typeOnly } + : importKind === 0 /* Named */ ? { defaultImport: undefined, namedImports: [symbolName], namespaceLikeImport: undefined, typeOnly: typeOnly } + : { defaultImport: undefined, namedImports: ts.emptyArray, namespaceLikeImport: { importKind: importKind, name: symbolName }, typeOnly: typeOnly }, /*blankLineBetween*/ true); return [importKind === 1 /* Default */ ? ts.Diagnostics.Import_default_0_from_module_1 : ts.Diagnostics.Import_0_from_module_1, symbolName, moduleSpecifier]; } default: return ts.Debug.assertNever(fix, "Unexpected fix kind " + fix.kind); } } - function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports) { + function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, canUseTypeOnlyImport) { + var convertTypeOnlyToRegular = !canUseTypeOnlyImport && clause.isTypeOnly; if (defaultImport) { - ts.Debug.assert(!clause.name, "Default imports can't have names"); + ts.Debug.assert(!clause.name, "Cannot add a default import to an import clause that already has one"); changes.insertNodeAt(sourceFile, clause.getStart(sourceFile), ts.createIdentifier(defaultImport), { suffix: ", " }); } if (namedImports.length) { @@ -127424,11 +129346,14 @@ var ts; changes.replaceNode(sourceFile, clause.namedBindings, namedImports_1); } else { - changes.insertNodeAfter(sourceFile, ts.Debug.assertDefined(clause.name, "Named import specifiers must have names"), namedImports_1); + changes.insertNodeAfter(sourceFile, ts.Debug.checkDefined(clause.name, "Import clause must have either named imports or a default import"), namedImports_1); } } } } + if (convertTypeOnlyToRegular) { + changes.delete(sourceFile, ts.getTypeKeywordOfTypeOnlyImport(clause, sourceFile)); + } } function addNamespaceQualifier(changes, sourceFile, _a) { var namespacePrefix = _a.namespacePrefix, position = _a.position; @@ -127442,16 +129367,16 @@ var ts; var quote = ts.getQuoteFromPreference(quotePreference); return "import(" + quote + moduleSpecifier + quote + ")."; } - function addNewImports(changes, sourceFile, typeOnly, moduleSpecifier, quotePreference, _a) { - var defaultImport = _a.defaultImport, namedImports = _a.namedImports, namespaceLikeImport = _a.namespaceLikeImport; + function addNewImports(changes, sourceFile, moduleSpecifier, quotePreference, _a, blankLineBetween) { + var defaultImport = _a.defaultImport, namedImports = _a.namedImports, namespaceLikeImport = _a.namespaceLikeImport, typeOnly = _a.typeOnly; var quotedModuleSpecifier = ts.makeStringLiteral(moduleSpecifier, quotePreference); if (defaultImport !== undefined || namedImports.length) { - ts.insertImport(changes, sourceFile, ts.makeImport(defaultImport === undefined ? undefined : ts.createIdentifier(defaultImport), namedImports.map(function (n) { return ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(n)); }), moduleSpecifier, quotePreference, typeOnly)); + ts.insertImport(changes, sourceFile, ts.makeImport(defaultImport === undefined ? undefined : ts.createIdentifier(defaultImport), namedImports.map(function (n) { return ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(n)); }), moduleSpecifier, quotePreference, typeOnly), /*blankLineBetween*/ blankLineBetween); } if (namespaceLikeImport) { ts.insertImport(changes, sourceFile, namespaceLikeImport.importKind === 3 /* Equals */ ? ts.createImportEqualsDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createIdentifier(namespaceLikeImport.name), ts.createExternalModuleReference(quotedModuleSpecifier)) : namespaceLikeImport.importKind === 4 /* ConstEquals */ ? createConstEqualsRequireDeclaration(namespaceLikeImport.name, quotedModuleSpecifier) : - ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(namespaceLikeImport.name)), typeOnly), quotedModuleSpecifier)); + ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(namespaceLikeImport.name)), typeOnly), quotedModuleSpecifier), /*blankLineBetween*/ blankLineBetween); } } function createConstEqualsRequireDeclaration(name, quotedModuleSpecifier) { @@ -127693,19 +129618,19 @@ var ts; // this.speling = 1; // ^^^^^^^ var node = ts.getTokenAtPosition(sourceFile, pos); + var parent = node.parent; var checker = context.program.getTypeChecker(); var suggestedSymbol; - if (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node) { + if (ts.isPropertyAccessExpression(parent) && parent.name === node) { ts.Debug.assert(ts.isIdentifierOrPrivateIdentifier(node), "Expected an identifier for spelling (property access)"); - var containingType = checker.getTypeAtLocation(node.parent.expression); - if (node.parent.flags & 32 /* OptionalChain */) { + var containingType = checker.getTypeAtLocation(parent.expression); + if (parent.flags & 32 /* OptionalChain */) { containingType = checker.getNonNullableType(containingType); } - var name = node; - suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(name, containingType); + suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); } - else if (ts.isImportSpecifier(node.parent) && node.parent.name === node) { - ts.Debug.assert(node.kind === 75 /* Identifier */, "Expected an identifier for spelling (import)"); + else if (ts.isImportSpecifier(parent) && parent.name === node) { + ts.Debug.assertNode(node, ts.isIdentifier, "Expected an identifier for spelling (import)"); var importDeclaration = ts.findAncestor(node, ts.isImportDeclaration); var resolvedSourceFile = getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration); if (resolvedSourceFile && resolvedSourceFile.symbol) { @@ -127786,7 +129711,7 @@ var ts; var parentDeclaration = info.parentDeclaration, declSourceFile = info.declSourceFile, inJs = info.inJs, makeStatic = info.makeStatic, token = info.token, call = info.call; var methodCodeAction = call && getActionForMethodDeclaration(context, declSourceFile, parentDeclaration, token, call, makeStatic, inJs, context.preferences); var addMember = inJs && !ts.isInterfaceDeclaration(parentDeclaration) ? - ts.singleElementArray(getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, parentDeclaration, token.text, makeStatic)) : + ts.singleElementArray(getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, parentDeclaration, token, makeStatic)) : getActionsForAddMissingMemberInTypeScriptFile(context, declSourceFile, parentDeclaration, token, makeStatic); return ts.concatenate(ts.singleElementArray(methodCodeAction), addMember); }, @@ -127832,7 +129757,7 @@ var ts; } else { if (inJs && !ts.isInterfaceDeclaration(parentDeclaration)) { - addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token.text, makeStatic); + addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token, makeStatic); } else { var typeNode = getTypeNode(program.getTypeChecker(), parentDeclaration, token); @@ -127881,17 +129806,16 @@ var ts; var symbol = leftExpressionType.symbol; if (!symbol || !symbol.declarations) return undefined; - var isClass = ts.find(symbol.declarations, ts.isClassLike); + var classDeclaration = ts.find(symbol.declarations, ts.isClassLike); // Don't suggest adding private identifiers to anything other than a class. - if (!isClass && ts.isPrivateIdentifier(token)) { + if (!classDeclaration && ts.isPrivateIdentifier(token)) { return undefined; } // Prefer to change the class instead of the interface if they are merged - var classOrInterface = isClass || ts.find(symbol.declarations, ts.isInterfaceDeclaration); + var classOrInterface = classDeclaration || ts.find(symbol.declarations, ts.isInterfaceDeclaration); if (classOrInterface && !program.isSourceFileFromExternalLibrary(classOrInterface.getSourceFile())) { var makeStatic = (leftExpressionType.target || leftExpressionType) !== checker.getDeclaredTypeOfSymbol(symbol); - // Static private identifier properties are not supported yet. - if (makeStatic && ts.isPrivateIdentifier(token)) { + if (makeStatic && (ts.isPrivateIdentifier(token) || ts.isInterfaceDeclaration(classOrInterface))) { return undefined; } var declSourceFile = classOrInterface.getSourceFile(); @@ -127905,12 +129829,17 @@ var ts; } return undefined; } - function getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, classDeclaration, tokenName, makeStatic) { - var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingMemberInJs(t, declSourceFile, classDeclaration, tokenName, makeStatic); }); - return changes.length === 0 ? undefined - : codefix.createCodeFixAction(fixName, changes, [makeStatic ? ts.Diagnostics.Initialize_static_property_0 : ts.Diagnostics.Initialize_property_0_in_the_constructor, tokenName], fixId, ts.Diagnostics.Add_all_missing_members); + function getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, classDeclaration, token, makeStatic) { + var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingMemberInJs(t, declSourceFile, classDeclaration, token, makeStatic); }); + if (changes.length === 0) { + return undefined; + } + var diagnostic = makeStatic ? ts.Diagnostics.Initialize_static_property_0 : + ts.isPrivateIdentifier(token) ? ts.Diagnostics.Declare_a_private_field_named_0 : ts.Diagnostics.Initialize_property_0_in_the_constructor; + return codefix.createCodeFixAction(fixName, changes, [diagnostic, token.text], fixId, ts.Diagnostics.Add_all_missing_members); } - function addMissingMemberInJs(changeTracker, declSourceFile, classDeclaration, tokenName, makeStatic) { + function addMissingMemberInJs(changeTracker, declSourceFile, classDeclaration, token, makeStatic) { + var tokenName = token.text; if (makeStatic) { if (classDeclaration.kind === 214 /* ClassExpression */) { return; @@ -127919,6 +129848,21 @@ var ts; var staticInitialization = initializePropertyToUndefined(ts.createIdentifier(className), tokenName); changeTracker.insertNodeAfter(declSourceFile, classDeclaration, staticInitialization); } + else if (ts.isPrivateIdentifier(token)) { + var property = ts.createProperty( + /*decorators*/ undefined, + /*modifiers*/ undefined, tokenName, + /*questionToken*/ undefined, + /*type*/ undefined, + /*initializer*/ undefined); + var lastProp = getNodeToInsertPropertyAfter(classDeclaration); + if (lastProp) { + changeTracker.insertNodeAfter(declSourceFile, lastProp, property); + } + else { + changeTracker.insertNodeAtClassStart(declSourceFile, classDeclaration, property); + } + } else { var classConstructor = ts.getFirstConstructorWithBody(classDeclaration); if (!classConstructor) { @@ -128164,7 +130108,9 @@ var ts; // Note that this is ultimately derived from a map indexed by symbol names, // so duplicates cannot occur. var abstractAndNonPrivateExtendsSymbols = checker.getPropertiesOfType(instantiatedExtendsType).filter(symbolPointsToNonPrivateAndAbstractMember); - codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, context, preferences, function (member) { return changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, member); }); + var importAdder = codefix.createImportAdder(sourceFile, context.program, preferences, context.host); + codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, context, preferences, importAdder, function (member) { return changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, member); }); + importAdder.writeFixes(changeTracker); } function symbolPointsToNonPrivateAndAbstractMember(symbol) { // See `codeFixClassExtendAbstractProtectedProperty.ts` in https://github.com/Microsoft/TypeScript/pull/11547/files @@ -128252,7 +130198,7 @@ var ts; }); function getNode(sourceFile, pos) { var token = ts.getTokenAtPosition(sourceFile, pos); - ts.Debug.assert(token.kind === 129 /* ConstructorKeyword */, "token should be at the constructor keyword"); + ts.Debug.assert(ts.isConstructorDeclaration(token.parent), "token should be at the constructor declaration"); return token.parent; } function doChange(changes, sourceFile, ctr) { @@ -128435,6 +130381,7 @@ var ts; var didYouMeanStaticMemberCode = ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code; var errorCodes = [ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, + ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies.code, didYouMeanStaticMemberCode, ]; codefix.registerCodeFix({ @@ -128457,9 +130404,9 @@ var ts; }); function getInfo(sourceFile, pos, diagCode) { var node = ts.getTokenAtPosition(sourceFile, pos); - if (!ts.isIdentifier(node)) - return undefined; - return { node: node, className: diagCode === didYouMeanStaticMemberCode ? ts.getContainingClass(node).name.text : undefined }; + if (ts.isIdentifier(node)) { + return { node: node, className: diagCode === didYouMeanStaticMemberCode ? ts.getContainingClass(node).name.text : undefined }; + } } function doChange(changes, sourceFile, _a) { var node = _a.node, className = _a.className; @@ -128471,6 +130418,47 @@ var ts; })(ts || (ts = {})); /* @internal */ var ts; +(function (ts) { + var codefix; + (function (codefix) { + var fixIdHtmlEntity = "invalidJsxCharactersConvertToHtmlEntity"; + var fixIdExpression = "invalidJsxCharactersConvertToExpression"; + var errorCodes = [ts.Diagnostics.Unexpected_token_Did_you_mean_or_gt.code, ts.Diagnostics.Unexpected_token_Did_you_mean_or_rbrace.code]; + codefix.registerCodeFix({ + errorCodes: errorCodes, + getCodeActions: function (context) { + var sourceFile = context.sourceFile, span = context.span; + var changeToExpression = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, span.start, /* useHtmlEntity */ false); }); + var changeToHtmlEntity = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, span.start, /* useHtmlEntity */ true); }); + return [ + codefix.createCodeFixActionWithoutFixAll(fixIdExpression, changeToExpression, ts.Diagnostics.Wrap_invalid_character_in_an_expression_container), + codefix.createCodeFixAction(fixIdHtmlEntity, changeToHtmlEntity, ts.Diagnostics.Convert_invalid_character_to_its_html_entity_code, fixIdHtmlEntity, ts.Diagnostics.Convert_invalid_character_to_its_html_entity_code), + ]; + }, + fixIds: [fixIdExpression, fixIdHtmlEntity], + }); + var htmlEntity = { + ">": ">", + "}": "}", + }; + function isValidCharacter(character) { + return ts.hasProperty(htmlEntity, character); + } + function doChange(changes, sourceFile, start, useHtmlEntity) { + var character = sourceFile.getText()[start]; + // sanity check + if (!isValidCharacter(character)) { + return; + } + var replacement = useHtmlEntity + ? htmlEntity[character] + : "{'" + character + "'}"; + changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement); + } + })(codefix = ts.codefix || (ts.codefix = {})); +})(ts || (ts = {})); +/* @internal */ +var ts; (function (ts) { var codefix; (function (codefix) { @@ -128585,7 +130573,7 @@ var ts; return codefix.createCodeFixAction(fixName, changes, diag, fixIdDelete, ts.Diagnostics.Delete_all_unused_declarations); } function deleteTypeParameters(changes, sourceFile, token) { - changes.delete(sourceFile, ts.Debug.assertDefined(ts.cast(token.parent, ts.isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); + changes.delete(sourceFile, ts.Debug.checkDefined(ts.cast(token.parent, ts.isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } // Sometimes the diagnostic span is an entire ImportDeclaration, so we should remove the whole thing. function tryGetFullImport(token) { @@ -128724,16 +130712,25 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, context.span.start, context.span.length); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, context.span.start, context.span.length, context.errorCode); }); return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Remove_unreachable_code, fixId, ts.Diagnostics.Remove_all_unreachable_code)]; }, fixIds: [fixId], - getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return doChange(changes, diag.file, diag.start, diag.length); }); }, + getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return doChange(changes, diag.file, diag.start, diag.length, diag.code); }); }, }); - function doChange(changes, sourceFile, start, length) { + function doChange(changes, sourceFile, start, length, errorCode) { var token = ts.getTokenAtPosition(sourceFile, start); var statement = ts.findAncestor(token, ts.isStatement); - ts.Debug.assert(statement.getStart(sourceFile) === token.getStart(sourceFile), "token and statement should start at the same point"); + if (statement.getStart(sourceFile) !== token.getStart(sourceFile)) { + var logData = JSON.stringify({ + statementKind: ts.Debug.formatSyntaxKind(statement.kind), + tokenKind: ts.Debug.formatSyntaxKind(token.kind), + errorCode: errorCode, + start: start, + length: length + }); + ts.Debug.fail("Token and statement should start at the same point. " + logData); + } var container = (ts.isBlock(statement.parent) ? statement.parent : statement).parent; if (!ts.isBlock(statement.parent) || statement === ts.first(statement.parent.statements)) { switch (container.kind) { @@ -128756,7 +130753,7 @@ var ts; } if (ts.isBlock(statement.parent)) { var end_3 = start + length; - var lastStatement = ts.Debug.assertDefined(lastWhere(ts.sliceAfter(statement.parent.statements, statement), function (s) { return s.pos < end_3; }), "Some statement should be last"); + var lastStatement = ts.Debug.checkDefined(lastWhere(ts.sliceAfter(statement.parent.statements, statement), function (s) { return s.pos < end_3; }), "Some statement should be last"); changes.deleteNodeRange(sourceFile, statement, lastStatement); } else { @@ -129020,14 +131017,15 @@ var ts; * Finds members of the resolved type that are missing in the class pointed to by class decl * and generates source code for the missing members. * @param possiblyMissingSymbols The collection of symbols to filter and then get insertions for. + * @param importAdder If provided, type annotations will use identifier type references instead of ImportTypeNodes, and the missing imports will be added to the importAdder. * @returns Empty string iff there are no member insertions. */ - function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, context, preferences, out) { + function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, context, preferences, importAdder, addClassElement) { var classMembers = classDeclaration.symbol.members; for (var _i = 0, possiblyMissingSymbols_1 = possiblyMissingSymbols; _i < possiblyMissingSymbols_1.length; _i++) { var symbol = possiblyMissingSymbols_1[_i]; if (!classMembers.has(symbol.escapedName)) { - addNewNodeForMemberSymbol(symbol, classDeclaration, context, preferences, out); + addNewNodeForMemberSymbol(symbol, classDeclaration, context, preferences, importAdder, addClassElement); } } } @@ -129053,12 +131051,13 @@ var ts; /** * @returns Empty string iff there we can't figure out a representation for `symbol` in `enclosingDeclaration`. */ - function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, context, preferences, out) { + function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, context, preferences, importAdder, addClassElement) { var declarations = symbol.getDeclarations(); if (!(declarations && declarations.length)) { return undefined; } var checker = context.program.getTypeChecker(); + var scriptTarget = ts.getEmitScriptTarget(context.program.getCompilerOptions()); var declaration = declarations[0]; var name = ts.getSynthesizedDeepClone(ts.getNameOfDeclaration(declaration), /*includeTrivia*/ false); var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration)); @@ -129069,29 +131068,44 @@ var ts; switch (declaration.kind) { case 158 /* PropertySignature */: case 159 /* PropertyDeclaration */: - var typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); - out(ts.createProperty( + var flags = preferences.quotePreference === "single" ? 268435456 /* UseSingleQuotesForStringLiteralType */ : undefined; + var typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); + if (importAdder) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget); + if (importableReference) { + typeNode = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + addClassElement(ts.createProperty( /*decorators*/ undefined, modifiers, name, optional ? ts.createToken(57 /* QuestionToken */) : undefined, typeNode, /*initializer*/ undefined)); break; case 163 /* GetAccessor */: case 164 /* SetAccessor */: { - var allAccessors = ts.getAllAccessorDeclarations(declarations, declaration); var typeNode_1 = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); + var allAccessors = ts.getAllAccessorDeclarations(declarations, declaration); var orderedAccessors = allAccessors.secondAccessor ? [allAccessors.firstAccessor, allAccessors.secondAccessor] : [allAccessors.firstAccessor]; + if (importAdder) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode_1, type, scriptTarget); + if (importableReference) { + typeNode_1 = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } for (var _i = 0, orderedAccessors_1 = orderedAccessors; _i < orderedAccessors_1.length; _i++) { var accessor = orderedAccessors_1[_i]; if (ts.isGetAccessorDeclaration(accessor)) { - out(ts.createGetAccessor( + addClassElement(ts.createGetAccessor( /*decorators*/ undefined, modifiers, name, ts.emptyArray, typeNode_1, ambient ? undefined : createStubbedMethodBody(preferences))); } else { ts.Debug.assertNode(accessor, ts.isSetAccessorDeclaration, "The counterpart to a getter should be a setter"); var parameter = ts.getSetAccessorValueParameter(accessor); var parameterName = parameter && ts.isIdentifier(parameter.name) ? ts.idText(parameter.name) : undefined; - out(ts.createSetAccessor( + addClassElement(ts.createSetAccessor( /*decorators*/ undefined, modifiers, name, createDummyParameters(1, [parameterName], [typeNode_1], 1, /*inJs*/ false), ambient ? undefined : createStubbedMethodBody(preferences))); } } @@ -129128,23 +131142,61 @@ var ts; } else { ts.Debug.assert(declarations.length === signatures.length, "Declarations and signatures should match count"); - out(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); + addClassElement(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); } } break; } function outputMethod(signature, modifiers, name, body) { - var method = signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body); + var method = signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body, importAdder); if (method) - out(method); + addClassElement(method); } } - function signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body) { + function signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body, importAdder) { var program = context.program; - var signatureDeclaration = program.getTypeChecker().signatureToSignatureDeclaration(signature, 161 /* MethodDeclaration */, enclosingDeclaration, 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */, getNoopSymbolTrackerWithResolver(context)); + var checker = program.getTypeChecker(); + var scriptTarget = ts.getEmitScriptTarget(program.getCompilerOptions()); + var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 161 /* MethodDeclaration */, enclosingDeclaration, 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */, getNoopSymbolTrackerWithResolver(context)); if (!signatureDeclaration) { return undefined; } + if (importAdder) { + if (signatureDeclaration.typeParameters) { + ts.forEach(signatureDeclaration.typeParameters, function (typeParameterDecl, i) { + var typeParameter = signature.typeParameters[i]; + if (typeParameterDecl.constraint) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeParameterDecl.constraint, typeParameter.constraint, scriptTarget); + if (importableReference) { + typeParameterDecl.constraint = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + if (typeParameterDecl.default) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeParameterDecl.default, typeParameter.default, scriptTarget); + if (importableReference) { + typeParameterDecl.default = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + }); + } + ts.forEach(signatureDeclaration.parameters, function (parameterDecl, i) { + var parameter = signature.parameters[i]; + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(parameterDecl.type, checker.getTypeAtLocation(parameter.valueDeclaration), scriptTarget); + if (importableReference) { + parameterDecl.type = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + }); + if (signatureDeclaration.type) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(signatureDeclaration.type, signature.resolvedReturnType, scriptTarget); + if (importableReference) { + signatureDeclaration.type = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + } signatureDeclaration.decorators = undefined; signatureDeclaration.modifiers = modifiers; signatureDeclaration.name = name; @@ -129288,6 +131340,49 @@ var ts; return ts.find(obj.properties, function (p) { return ts.isPropertyAssignment(p) && !!p.name && ts.isStringLiteral(p.name) && p.name.text === name; }); } codefix.findJsonProperty = findJsonProperty; + /** + * Given an ImportTypeNode 'import("./a").SomeType>', + * returns an equivalent type reference node with any nested ImportTypeNodes also replaced + * with type references, and a list of symbols that must be imported to use the type reference. + */ + function tryGetAutoImportableReferenceFromImportTypeNode(importTypeNode, type, scriptTarget) { + if (importTypeNode && ts.isLiteralImportTypeNode(importTypeNode) && importTypeNode.qualifier && (!type || type.symbol)) { + // Symbol for the left-most thing after the dot + var firstIdentifier = ts.getFirstIdentifier(importTypeNode.qualifier); + var name = ts.getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget); + var qualifier = name !== firstIdentifier.text + ? replaceFirstIdentifierOfEntityName(importTypeNode.qualifier, ts.createIdentifier(name)) + : importTypeNode.qualifier; + var symbols_4 = [firstIdentifier.symbol]; + var typeArguments_1 = []; + if (importTypeNode.typeArguments) { + importTypeNode.typeArguments.forEach(function (arg) { + var ref = tryGetAutoImportableReferenceFromImportTypeNode(arg, /*undefined*/ type, scriptTarget); + if (ref) { + symbols_4.push.apply(symbols_4, ref.symbols); + typeArguments_1.push(ref.typeReference); + } + else { + typeArguments_1.push(arg); + } + }); + } + return { + symbols: symbols_4, + typeReference: ts.createTypeReferenceNode(qualifier, typeArguments_1) + }; + } + } + codefix.tryGetAutoImportableReferenceFromImportTypeNode = tryGetAutoImportableReferenceFromImportTypeNode; + function replaceFirstIdentifierOfEntityName(name, newIdentifier) { + if (name.kind === 75 /* Identifier */) { + return newIdentifier; + } + return ts.createQualifiedName(replaceFirstIdentifierOfEntityName(name.left, newIdentifier), name.right); + } + function importSymbols(importAdder, symbols) { + symbols.forEach(function (s) { return importAdder.addImportFromExportedSymbol(s, /*usageIsTypeOnly*/ true); }); + } })(codefix = ts.codefix || (ts.codefix = {})); })(ts || (ts = {})); /* @internal */ @@ -129751,7 +131846,7 @@ var ts; if (!importDeclaration) { return; } - var importClause = ts.Debug.assertDefined(importDeclaration.importClause); + var importClause = ts.Debug.checkDefined(importDeclaration.importClause); changes.replaceNode(context.sourceFile, importDeclaration, ts.updateImportDeclaration(importDeclaration, importDeclaration.decorators, importDeclaration.modifiers, ts.updateImportClause(importClause, importClause.name, /*namedBindings*/ undefined, importClause.isTypeOnly), importDeclaration.moduleSpecifier)); changes.insertNodeAfter(context.sourceFile, importDeclaration, ts.createImportDeclaration( /*decorators*/ undefined, @@ -129812,7 +131907,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === actionNameDefaultToNamed || actionName === actionNameNamedToDefault, "Unexpected action name"); - var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, ts.Debug.assertDefined(getInfo(context), "context must have info"), t, context.cancellationToken); }); + var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, ts.Debug.checkDefined(getInfo(context), "context must have info"), t, context.cancellationToken); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; }, }); @@ -129864,10 +131959,10 @@ var ts; function changeExport(exportingSourceFile, _a, changes, checker) { var wasDefault = _a.wasDefault, exportNode = _a.exportNode, exportName = _a.exportName; if (wasDefault) { - changes.delete(exportingSourceFile, ts.Debug.assertDefined(ts.findModifier(exportNode, 84 /* DefaultKeyword */), "Should find a default keyword in modifier list")); + changes.delete(exportingSourceFile, ts.Debug.checkDefined(ts.findModifier(exportNode, 84 /* DefaultKeyword */), "Should find a default keyword in modifier list")); } else { - var exportKeyword = ts.Debug.assertDefined(ts.findModifier(exportNode, 89 /* ExportKeyword */), "Should find an export keyword in modifier list"); + var exportKeyword = ts.Debug.checkDefined(ts.findModifier(exportNode, 89 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { case 244 /* FunctionDeclaration */: case 245 /* ClassDeclaration */: @@ -129878,7 +131973,7 @@ var ts; // If 'x' isn't used in this file, `export const x = 0;` --> `export default 0;` if (!ts.FindAllReferences.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile)) { // We checked in `getInfo` that an initializer exists. - changes.replaceNode(exportingSourceFile, exportNode, ts.createExportDefault(ts.Debug.assertDefined(ts.first(exportNode.declarationList.declarations).initializer, "Initializer was previously known to be present"))); + changes.replaceNode(exportingSourceFile, exportNode, ts.createExportDefault(ts.Debug.checkDefined(ts.first(exportNode.declarationList.declarations).initializer, "Initializer was previously known to be present"))); break; } // falls through @@ -129897,7 +131992,7 @@ var ts; function changeImports(program, _a, changes, cancellationToken) { var wasDefault = _a.wasDefault, exportName = _a.exportName, exportingModuleSymbol = _a.exportingModuleSymbol; var checker = program.getTypeChecker(); - var exportSymbol = ts.Debug.assertDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); + var exportSymbol = ts.Debug.checkDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); ts.FindAllReferences.Core.eachExportReference(program.getSourceFiles(), checker, cancellationToken, exportSymbol, exportingModuleSymbol, exportName.text, wasDefault, function (ref) { var importingSourceFile = ref.getSourceFile(); if (wasDefault) { @@ -130008,7 +132103,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === actionNameNamespaceToNamed || actionName === actionNameNamedToNamespace, "Unexpected action name"); - var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, t, ts.Debug.assertDefined(getImportToConvert(context), "Context must provide an import to convert")); }); + var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, t, ts.Debug.checkDefined(getImportToConvert(context), "Context must provide an import to convert")); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; } }); @@ -130487,6 +132582,7 @@ var ts; permittedJumps = 4 /* Return */; } break; + case 278 /* DefaultClause */: case 277 /* CaseClause */: // allow unlabeled break inside case clauses permittedJumps |= 1 /* Break */; @@ -131265,7 +133361,7 @@ var ts; return curr.parent.parent; } // There must be at least one statement since we started in one. - return ts.Debug.assertDefined(prevStatement, "prevStatement failed to get set"); + return ts.Debug.checkDefined(prevStatement, "prevStatement failed to get set"); } ts.Debug.assert(curr !== scope, "Didn't encounter a block-like before encountering scope"); } @@ -131710,7 +133806,7 @@ var ts; }, getEditsForAction: function (context, actionName) { var file = context.file; - var info = ts.Debug.assertDefined(getRangeToExtract(context), "Expected to find a range to extract"); + var info = ts.Debug.checkDefined(getRangeToExtract(context), "Expected to find a range to extract"); var name = ts.getUniqueName("NewType", file); var edits = ts.textChanges.ChangeTracker.with(context, function (changes) { switch (actionName) { @@ -131741,7 +133837,7 @@ var ts; if (!selection || !ts.isTypeNode(selection)) return undefined; var checker = context.program.getTypeChecker(); - var firstStatement = ts.Debug.assertDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); + var firstStatement = ts.Debug.checkDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); var typeParameters = collectTypeParameters(checker, selection, firstStatement, file); if (!typeParameters) return undefined; @@ -131837,7 +133933,7 @@ var ts; } function doTypedefChange(changes, file, name, info) { var firstStatement = info.firstStatement, selection = info.selection, typeParameters = info.typeParameters; - var node = ts.createNode(321 /* JSDocTypedefTag */); + var node = ts.createNode(322 /* JSDocTypedefTag */); node.tagName = ts.createIdentifier("typedef"); // TODO: jsdoc factory https://github.com/Microsoft/TypeScript/pull/29539 node.fullName = ts.createIdentifier(name); node.name = node.fullName; @@ -131845,7 +133941,7 @@ var ts; var templates = []; ts.forEach(typeParameters, function (typeParameter) { var constraint = ts.getEffectiveConstraintOfTypeParameter(typeParameter); - var template = ts.createNode(320 /* JSDocTemplateTag */); + var template = ts.createNode(321 /* JSDocTemplateTag */); template.tagName = ts.createIdentifier("template"); template.constraint = constraint && ts.cast(constraint, ts.isJSDocTypeExpression); var parameter = ts.createNode(155 /* TypeParameter */); @@ -132049,7 +134145,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === refactorName, "Wrong refactor invoked"); - var statements = ts.Debug.assertDefined(getStatementsToMove(context)); + var statements = ts.Debug.checkDefined(getStatementsToMove(context)); var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, statements, t, context.host, context.preferences); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; } @@ -132139,7 +134235,7 @@ var ts; var quotePreference = ts.getQuotePreference(oldFile, preferences); var importsFromNewFile = createOldFileImportsFromNewFile(usage.oldFileImportsFromNewFile, newModuleName, useEs6ModuleSyntax, quotePreference); if (importsFromNewFile) { - ts.insertImport(changes, oldFile, importsFromNewFile); + ts.insertImport(changes, oldFile, importsFromNewFile, /*blankLineBetween*/ true); } deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker); deleteMovedStatements(oldFile, toMove.ranges, changes); @@ -132306,7 +134402,7 @@ var ts; return ts.flatMap(toMove, function (statement) { if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && - forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.assertDefined(d.symbol)); })) { + forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { var exports = addExport(statement, useEs6Exports); if (exports) return exports; @@ -132443,7 +134539,7 @@ var ts; for (var _i = 0, toMove_1 = toMove; _i < toMove_1.length; _i++) { var statement = toMove_1[_i]; forEachTopLevelDeclaration(statement, function (decl) { - movedSymbols.add(ts.Debug.assertDefined(ts.isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); + movedSymbols.add(ts.Debug.checkDefined(ts.isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); }); } for (var _a = 0, toMove_2 = toMove; _a < toMove_2.length; _a++) { @@ -133273,7 +135369,7 @@ var ts; return [classDeclaration.name]; // If the class declaration doesn't have a name, it should have a default modifier. // We validated this in `isValidFunctionDeclaration` through `hasNameOrDefault` - var defaultModifier = ts.Debug.assertDefined(ts.findModifier(classDeclaration, 84 /* DefaultKeyword */), "Nameless class declaration should be a default export"); + var defaultModifier = ts.Debug.checkDefined(ts.findModifier(classDeclaration, 84 /* DefaultKeyword */), "Nameless class declaration should be a default export"); return [defaultModifier]; case 214 /* ClassExpression */: var classExpression = constructorDeclaration.parent; @@ -133291,12 +135387,12 @@ var ts; return [functionDeclaration.name]; // If the function declaration doesn't have a name, it should have a default modifier. // We validated this in `isValidFunctionDeclaration` through `hasNameOrDefault` - var defaultModifier = ts.Debug.assertDefined(ts.findModifier(functionDeclaration, 84 /* DefaultKeyword */), "Nameless function declaration should be a default export"); + var defaultModifier = ts.Debug.checkDefined(ts.findModifier(functionDeclaration, 84 /* DefaultKeyword */), "Nameless function declaration should be a default export"); return [defaultModifier]; case 161 /* MethodDeclaration */: return [functionDeclaration.name]; case 162 /* Constructor */: - var ctrKeyword = ts.Debug.assertDefined(ts.findChildOfKind(functionDeclaration, 129 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword"); + var ctrKeyword = ts.Debug.checkDefined(ts.findChildOfKind(functionDeclaration, 129 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword"); if (functionDeclaration.parent.kind === 214 /* ClassExpression */) { var variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; @@ -133330,7 +135426,7 @@ var ts; var node = getNodeOrParentOfParentheses(file, startPosition); var maybeBinary = getParentBinaryExpression(node); var refactorInfo = { name: refactorName, description: refactorDescription, actions: [] }; - if ((ts.isBinaryExpression(maybeBinary) || ts.isStringLiteral(maybeBinary)) && isStringConcatenationValid(maybeBinary)) { + if (ts.isBinaryExpression(maybeBinary) && isStringConcatenationValid(maybeBinary)) { refactorInfo.actions.push({ name: refactorName, description: refactorDescription }); return [refactorInfo]; } @@ -133555,7 +135651,7 @@ var ts; if (!children.length) { return undefined; } - var child = ts.find(children, function (kid) { return kid.kind < 294 /* FirstJSDocNode */ || kid.kind > 322 /* LastJSDocNode */; }); + var child = ts.find(children, function (kid) { return kid.kind < 294 /* FirstJSDocNode */ || kid.kind > 323 /* LastJSDocNode */; }); return child.kind < 153 /* FirstNode */ ? child : child.getFirstToken(sourceFile); @@ -133625,7 +135721,7 @@ var ts; } } function createSyntaxList(nodes, parent) { - var list = createNode(323 /* SyntaxList */, nodes.pos, nodes.end, parent); + var list = createNode(324 /* SyntaxList */, nodes.pos, nodes.end, parent); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { @@ -134238,10 +136334,6 @@ var ts; }); return names; }; - HostCache.prototype.getVersion = function (path) { - var file = this.getHostFileInformation(path); - return (file && file.version); // TODO: GH#18217 - }; HostCache.prototype.getScriptSnapshot = function (path) { var file = this.getHostFileInformation(path); return (file && file.scriptSnapshot); // TODO: GH#18217 @@ -134448,7 +136540,7 @@ var ts; var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse; var projectReferences = hostCache.getProjectReferences(); // If the program is already up-to-date, we can reuse it - if (ts.isProgramUptoDate(program, rootFileNames, hostCache.compilationSettings(), function (path) { return hostCache.getVersion(path); }, fileExists, hasInvalidatedResolution, !!host.hasChangedAutomaticTypeDirectiveNames, projectReferences)) { + if (ts.isProgramUptoDate(program, rootFileNames, hostCache.compilationSettings(), function (_path, fileName) { return host.getScriptVersion(fileName); }, fileExists, hasInvalidatedResolution, !!host.hasChangedAutomaticTypeDirectiveNames, projectReferences)) { return; } // IMPORTANT - It is critical from this moment onward that we do not check @@ -134478,7 +136570,7 @@ var ts; return host.getDirectories ? host.getDirectories(path) : []; }, readDirectory: function (path, extensions, exclude, include, depth) { - ts.Debug.assertDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + ts.Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return host.readDirectory(path, extensions, exclude, include, depth); }, onReleaseOldSourceFile: onReleaseOldSourceFile, @@ -134670,9 +136762,10 @@ var ts; return ts.Completions.getCompletionEntryDetails(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host, (formattingOptions && ts.formatting.getFormatContext(formattingOptions)), // TODO: GH#18217 preferences, cancellationToken); } - function getCompletionEntrySymbol(fileName, position, name, source) { + function getCompletionEntrySymbol(fileName, position, name, source, preferences) { + if (preferences === void 0) { preferences = ts.emptyOptions; } synchronizeHostData(); - return ts.Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host); + return ts.Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host, preferences); } function getQuickInfoAtPosition(fileName, position) { synchronizeHostData(); @@ -134763,7 +136856,7 @@ var ts; function findRenameLocations(fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); + var node = ts.getAdjustedRenameLocation(ts.getTouchingPropertyName(sourceFile, position)); if (ts.isIdentifier(node) && (ts.isJsxOpeningElement(node.parent) || ts.isJsxClosingElement(node.parent)) && ts.isIntrinsicJsxName(node.escapedText)) { var _a = node.parent.parent, openingElement = _a.openingElement, closingElement = _a.closingElement; return [openingElement, closingElement].map(function (node) { @@ -134772,17 +136865,17 @@ var ts; }); } else { - return getReferencesWorker(node, position, { findInStrings: findInStrings, findInComments: findInComments, providePrefixAndSuffixTextForRename: providePrefixAndSuffixTextForRename, isForRename: true }, function (entry, originalNode, checker) { return ts.FindAllReferences.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false); }); + return getReferencesWorker(node, position, { findInStrings: findInStrings, findInComments: findInComments, providePrefixAndSuffixTextForRename: providePrefixAndSuffixTextForRename, use: 2 /* Rename */ }, function (entry, originalNode, checker) { return ts.FindAllReferences.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false); }); } } function getReferencesAtPosition(fileName, position) { synchronizeHostData(); - return getReferencesWorker(ts.getTouchingPropertyName(getValidSourceFile(fileName), position), position, {}, ts.FindAllReferences.toReferenceEntry); + return getReferencesWorker(ts.getTouchingPropertyName(getValidSourceFile(fileName), position), position, { use: 1 /* References */ }, ts.FindAllReferences.toReferenceEntry); } function getReferencesWorker(node, position, options, cb) { synchronizeHostData(); // Exclude default library when renaming as commonly user don't want to change that file. - var sourceFiles = options && options.isForRename + var sourceFiles = options && options.use === 2 /* Rename */ ? program.getSourceFiles().filter(function (sourceFile) { return !program.isSourceFileDefaultLibrary(sourceFile); }) : program.getSourceFiles(); return ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, cb); @@ -135283,6 +137376,7 @@ var ts; getEditsForRefactor: getEditsForRefactor, toLineColumnOffset: sourceMapper.toLineColumnOffset, getSourceMapper: function () { return sourceMapper; }, + clearSourceMapperCache: function () { return sourceMapper.clearCache(); }, prepareCallHierarchy: prepareCallHierarchy, provideCallHierarchyIncomingCalls: provideCallHierarchyIncomingCalls, provideCallHierarchyOutgoingCalls: provideCallHierarchyOutgoingCalls @@ -136524,8 +138618,8 @@ var ts; return this.forwardJSONCall("getDocumentHighlights('" + fileName + "', " + position + ")", function () { var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch)); // workaround for VS document highlighting issue - keep only items from the initial file - var normalizedName = ts.normalizeSlashes(fileName).toLowerCase(); - return ts.filter(results, function (r) { return ts.normalizeSlashes(r.fileName).toLowerCase() === normalizedName; }); + var normalizedName = ts.toFileNameLowerCase(ts.normalizeSlashes(fileName)); + return ts.filter(results, function (r) { return ts.toFileNameLowerCase(ts.normalizeSlashes(r.fileName)) === normalizedName; }); }); }; /// COMPLETION LISTS @@ -136821,7 +138915,7 @@ var ts; }()); ts.TypeScriptServicesFactory = TypeScriptServicesFactory; })(ts || (ts = {})); -/* eslint-enable no-in-operator */ +/* eslint-enable no-in-operator */ // We polyfill `globalThis` here so re can reliably patch the global scope // in the contexts we want to in the same way across script and module formats /* eslint-enable no-var */ diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts index a3b2e77522007..fe7223478461f 100644 --- a/lib/typescriptServices.d.ts +++ b/lib/typescriptServices.d.ts @@ -1,20 +1,20 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "3.8"; + const versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -383,29 +383,30 @@ declare namespace ts { JSDocSignature = 305, JSDocTag = 306, JSDocAugmentsTag = 307, - JSDocAuthorTag = 308, - JSDocClassTag = 309, - JSDocPublicTag = 310, - JSDocPrivateTag = 311, - JSDocProtectedTag = 312, - JSDocReadonlyTag = 313, - JSDocCallbackTag = 314, - JSDocEnumTag = 315, - JSDocParameterTag = 316, - JSDocReturnTag = 317, - JSDocThisTag = 318, - JSDocTypeTag = 319, - JSDocTemplateTag = 320, - JSDocTypedefTag = 321, - JSDocPropertyTag = 322, - SyntaxList = 323, - NotEmittedStatement = 324, - PartiallyEmittedExpression = 325, - CommaListExpression = 326, - MergeDeclarationMarker = 327, - EndOfDeclarationMarker = 328, - SyntheticReferenceExpression = 329, - Count = 330, + JSDocImplementsTag = 308, + JSDocAuthorTag = 309, + JSDocClassTag = 310, + JSDocPublicTag = 311, + JSDocPrivateTag = 312, + JSDocProtectedTag = 313, + JSDocReadonlyTag = 314, + JSDocCallbackTag = 315, + JSDocEnumTag = 316, + JSDocParameterTag = 317, + JSDocReturnTag = 318, + JSDocThisTag = 319, + JSDocTypeTag = 320, + JSDocTemplateTag = 321, + JSDocTypedefTag = 322, + JSDocPropertyTag = 323, + SyntaxList = 324, + NotEmittedStatement = 325, + PartiallyEmittedExpression = 326, + CommaListExpression = 327, + MergeDeclarationMarker = 328, + EndOfDeclarationMarker = 329, + SyntheticReferenceExpression = 330, + Count = 331, FirstAssignment = 62, LastAssignment = 74, FirstCompoundAssignment = 63, @@ -434,9 +435,9 @@ declare namespace ts { LastStatement = 241, FirstNode = 153, FirstJSDocNode = 294, - LastJSDocNode = 322, + LastJSDocNode = 323, FirstJSDocTagNode = 306, - LastJSDocTagNode = 322, + LastJSDocTagNode = 323, } export enum NodeFlags { None = 0, @@ -1145,7 +1146,7 @@ declare namespace ts { } export interface ExpressionWithTypeArguments extends NodeWithTypeArguments { kind: SyntaxKind.ExpressionWithTypeArguments; - parent: HeritageClause | JSDocAugmentsTag; + parent: HeritageClause | JSDocAugmentsTag | JSDocImplementsTag; expression: LeftHandSideExpression; } export interface NewExpression extends PrimaryExpression, Declaration { @@ -1547,6 +1548,7 @@ declare namespace ts { name: Identifier; } export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; + export type TypeOnlyCompatibleAliasDeclaration = ImportClause | NamespaceImport | ImportOrExportSpecifier; /** * This is either an `export =` or an `export default` declaration. * Unless `isExportEquals` is set, this node was parsed as an `export default`. @@ -1634,6 +1636,12 @@ declare namespace ts { expression: Identifier | PropertyAccessEntityNameExpression; }; } + export interface JSDocImplementsTag extends JSDocTag { + kind: SyntaxKind.JSDocImplementsTag; + class: ExpressionWithTypeArguments & { + expression: Identifier | PropertyAccessEntityNameExpression; + }; + } export interface JSDocAuthorTag extends JSDocTag { kind: SyntaxKind.JSDocAuthorTag; } @@ -1725,10 +1733,9 @@ declare namespace ts { SwitchClause = 128, ArrayMutation = 256, Call = 512, - Referenced = 1024, - Shared = 2048, - PreFinally = 4096, - AfterFinally = 8192, + ReduceLabel = 1024, + Referenced = 2048, + Shared = 4096, Label = 12, Condition = 96 } @@ -1775,6 +1782,11 @@ declare namespace ts { node: CallExpression | BinaryExpression; antecedent: FlowNode; } + export interface FlowReduceLabel extends FlowNodeBase { + target: FlowLabel; + antecedents: FlowNode[]; + antecedent: FlowNode; + } export type FlowType = Type | IncompleteType; export interface IncompleteType { flags: TypeFlags; @@ -1947,6 +1959,7 @@ declare namespace ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; + getInstantiationCount(): number; getRelationCacheSizes(): { assignable: number; identity: number; @@ -2117,6 +2130,7 @@ declare namespace ts { UseTypeOfFunction = 4096, OmitParameterModifiers = 8192, UseAliasDefinedOutsideCurrentScope = 16384, + UseSingleQuotesForStringLiteralType = 268435456, AllowThisInObjectLiteral = 32768, AllowQualifedNameInPlaceOfIdentifier = 65536, AllowAnonymousIdentifier = 131072, @@ -2144,6 +2158,7 @@ declare namespace ts { UseTypeOfFunction = 4096, OmitParameterModifiers = 8192, UseAliasDefinedOutsideCurrentScope = 16384, + UseSingleQuotesForStringLiteralType = 268435456, AllowUniqueESSymbolType = 1048576, AddUndefined = 131072, WriteArrowStyleSignature = 262144, @@ -2152,7 +2167,7 @@ declare namespace ts { InFirstTypeArgument = 4194304, InTypeAlias = 8388608, /** @deprecated */ WriteOwnNameForAnyLike = 0, - NodeBuilderFlagsMask = 9469291 + NodeBuilderFlagsMask = 277904747 } export enum SymbolFormatFlags { None = 0, @@ -2651,7 +2666,7 @@ declare namespace ts { experimentalDecorators?: boolean; forceConsistentCasingInFileNames?: boolean; importHelpers?: boolean; - importsNotUsedAsValues?: importsNotUsedAsValues; + importsNotUsedAsValues?: ImportsNotUsedAsValues; inlineSourceMap?: boolean; inlineSources?: boolean; isolatedModules?: boolean; @@ -2750,7 +2765,7 @@ declare namespace ts { React = 2, ReactNative = 3 } - export enum importsNotUsedAsValues { + export enum ImportsNotUsedAsValues { Remove = 0, Preserve = 1, Error = 2 @@ -2969,6 +2984,7 @@ declare namespace ts { readonly scoped: boolean; readonly text: string | ((node: EmitHelperUniqueNameCallback) => string); readonly priority?: number; + readonly dependencies?: EmitHelper[]; } export interface UnscopedEmitHelper extends EmitHelper { readonly scoped: false; @@ -2981,7 +2997,8 @@ declare namespace ts { IdentifierName = 2, MappedTypeParameter = 3, Unspecified = 4, - EmbeddedStatement = 5 + EmbeddedStatement = 5, + JsxAttributeValue = 6 } export interface TransformationContext { /** Gets the compiler options supplied to the transformer. */ @@ -3053,6 +3070,12 @@ declare namespace ts { * @param emitCallback A callback used to emit the node. */ emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; + /** + * Indicates if a given node needs an emit notification + * + * @param node The node to emit. + */ + isEmitNotificationEnabled?(node: Node): boolean; /** * Clean up EmitNode entries on any parse-tree nodes. */ @@ -3125,6 +3148,11 @@ declare namespace ts { * ``` */ onEmitNode?(hint: EmitHint, node: Node | undefined, emitCallback: (hint: EmitHint, node: Node | undefined) => void): void; + /** + * A hook used to check if an emit notification is required for a node. + * @param node The node to emit. + */ + isEmitNotificationEnabled?(node: Node | undefined): boolean; /** * A hook used by the Printer to perform just-in-time substitution of a node. This is * primarily used by node transformations that need to substitute one node for another, @@ -3244,7 +3272,7 @@ declare namespace ts { readonly includeCompletionsWithInsertText?: boolean; readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ - readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; + readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; } @@ -3330,7 +3358,8 @@ declare namespace ts { isUnterminated(): boolean; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; + reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; + reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; scanJsxIdentifier(): SyntaxKind; scanJsxAttributeValue(): SyntaxKind; reScanJsxAttributeValue(): SyntaxKind; @@ -3494,6 +3523,8 @@ declare namespace ts { function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean; /** Gets the JSDoc augments tag for the node if present */ function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined; + /** Gets the JSDoc implements tags for the node if present */ + function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[]; /** Gets the JSDoc class tag for the node if present */ function getJSDocClassTag(node: Node): JSDocClassTag | undefined; /** Gets the JSDoc public tag for the node if present */ @@ -3535,7 +3566,9 @@ 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): readonly JSDocTag[]; - /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + /** Gets all JSDoc tags that match a specified predicate */ + function getAllJSDocTags(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]; + /** Gets all JSDoc tags of a specified kind */ function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[]; /** * Gets the effective type parameters. If the node was parsed in a @@ -3711,6 +3744,7 @@ declare namespace ts { function isJSDoc(node: Node): node is JSDoc; function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag; function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; + function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; function isJSDocClassTag(node: Node): node is JSDocClassTag; function isJSDocPublicTag(node: Node): node is JSDocPublicTag; function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag; @@ -3739,7 +3773,7 @@ declare namespace ts { function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken; function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail; function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier; - function isTypeOnlyImportOrExportName(node: Node): boolean; + function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyCompatibleAliasDeclaration; function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken; function isModifier(node: Node): node is Modifier; function isEntityName(node: Node): node is EntityName; @@ -3772,6 +3806,8 @@ declare namespace ts { function isJSDocCommentContainingNode(node: Node): boolean; function isSetAccessor(node: Node): node is SetAccessorDeclaration; function isGetAccessor(node: Node): node is GetAccessorDeclaration; + /** True if has initializer node attached to it. */ + function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer; function isObjectLiteralElement(node: Node): node is ObjectLiteralElement; function isStringLiteralLike(node: Node): node is StringLiteralLike; } @@ -5184,7 +5220,7 @@ declare namespace ts { fileName: string; } type OrganizeImportsScope = CombinedCodeFixScope; - type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<"; + type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#"; interface GetCompletionsAtPositionOptions extends UserPreferences { /** * If the editor is asking for completions because a certain character was typed @@ -5652,6 +5688,7 @@ declare namespace ts { hasAction?: true; source?: string; isRecommended?: true; + isFromUncheckedFile?: true; } interface CompletionEntryDetails { name: string; diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index d434587d9d587..a84f31eb02ca5 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ @@ -242,7 +242,7 @@ var ts; (function (ts) { // WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configurePrerelease` too. - ts.versionMajorMinor = "3.8"; + ts.versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ ts.version = ts.versionMajorMinor + ".0-dev"; /** @@ -1539,6 +1539,46 @@ var ts; /** Returns lower case string */ function toLowerCase(x) { return x.toLowerCase(); } ts.toLowerCase = toLowerCase; + // We convert the file names to lower case as key for file name on case insensitive file system + // While doing so we need to handle special characters (eg \u0130) to ensure that we dont convert + // it to lower case, fileName with its lowercase form can exist along side it. + // Handle special characters and make those case sensitive instead + // + // |-#--|-Unicode--|-Char code-|-Desc-------------------------------------------------------------------| + // | 1. | i | 105 | Ascii i | + // | 2. | I | 73 | Ascii I | + // |-------- Special characters ------------------------------------------------------------------------| + // | 3. | \u0130 | 304 | Uppper case I with dot above | + // | 4. | i,\u0307 | 105,775 | i, followed by 775: Lower case of (3rd item) | + // | 5. | I,\u0307 | 73,775 | I, followed by 775: Upper case of (4th item), lower case is (4th item) | + // | 6. | \u0131 | 305 | Lower case i without dot, upper case is I (2nd item) | + // | 7. | \u00DF | 223 | Lower case sharp s | + // + // Because item 3 is special where in its lowercase character has its own + // upper case form we cant convert its case. + // Rest special characters are either already in lower case format or + // they have corresponding upper case character so they dont need special handling + // + // But to avoid having to do string building for most common cases, also ignore + // a-z, 0-9, \u0131, \u00DF, \, /, ., : and space + var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; + /** + * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - \u0130) + * This function is used in places where we want to make file name as a key on these systems + * It is possible on mac to be able to refer to file name with I with dot on top as a fileName with its lower case form + * But on windows we cannot. Windows can have fileName with I with dot on top next to its lower case and they can not each be referred with the lowercase forms + * Technically we would want this function to be platform sepcific as well but + * our api has till now only taken caseSensitive as the only input and just for some characters we dont want to update API and ensure all customers use those api + * We could use upper case and we would still need to deal with the descripencies but + * we want to continue using lower case since in most cases filenames are lowercasewe and wont need any case changes and avoid having to store another string for the key + * So for this function purpose, we go ahead and assume character I with dot on top it as case sensitive since its very unlikely to use lower case form of that special character + */ + function toFileNameLowerCase(x) { + return fileNameLowerCaseRegExp.test(x) ? + x.replace(fileNameLowerCaseRegExp, toLowerCase) : + x; + } + ts.toFileNameLowerCase = toFileNameLowerCase; /** Throws an error because a function is not implemented. */ function notImplemented() { throw new Error("Not implemented"); @@ -1967,7 +2007,7 @@ var ts; return false; } function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toLowerCase; + return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; } ts.createGetCanonicalFileName = createGetCanonicalFileName; function patternText(_a) { @@ -2124,84 +2164,192 @@ var ts; } } } + function padLeft(s, length) { + while (s.length < length) { + s = " " + s; + } + return s; + } + ts.padLeft = padLeft; + function padRight(s, length) { + while (s.length < length) { + s = s + " "; + } + return s; + } + ts.padRight = padRight; })(ts || (ts = {})); /* @internal */ var ts; (function (ts) { var Debug; (function (Debug) { - /* eslint-disable prefer-const */ - Debug.currentAssertionLevel = 0 /* None */; + var currentAssertionLevel = 0 /* None */; + // eslint-disable-next-line prefer-const Debug.isDebugging = false; - /* eslint-enable prefer-const */ + var assertionCache = {}; + function getAssertionLevel() { + return currentAssertionLevel; + } + Debug.getAssertionLevel = getAssertionLevel; + function setAssertionLevel(level) { + var prevAssertionLevel = currentAssertionLevel; + currentAssertionLevel = level; + if (level > prevAssertionLevel) { + // restore assertion functions for the current assertion level (see `shouldAssertFunction`). + for (var _i = 0, _a = ts.getOwnKeys(assertionCache); _i < _a.length; _i++) { + var key = _a[_i]; + var cachedFunc = assertionCache[key]; + if (cachedFunc !== undefined && Debug[key] !== cachedFunc.assertion && level >= cachedFunc.level) { + Debug[key] = cachedFunc; + assertionCache[key] = undefined; + } + } + } + } + Debug.setAssertionLevel = setAssertionLevel; function shouldAssert(level) { - return Debug.currentAssertionLevel >= level; + return currentAssertionLevel >= level; } Debug.shouldAssert = shouldAssert; + /** + * Tests whether an assertion function should be executed. If it shouldn't, it is cached and replaced with `ts.noop`. + * Replaced assertion functions are restored when `Debug.setAssertionLevel` is set to a high enough level. + * @param level The minimum assertion level required. + * @param name The name of the current assertion function. + */ + function shouldAssertFunction(level, name) { + if (!shouldAssert(level)) { + assertionCache[name] = { level: level, assertion: Debug[name] }; + Debug[name] = ts.noop; + return false; + } + return true; + } + function fail(message, stackCrawlMark) { + debugger; + var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); + if (Error.captureStackTrace) { + Error.captureStackTrace(e, stackCrawlMark || fail); + } + throw e; + } + Debug.fail = fail; + function failBadSyntaxKind(node, message, stackCrawlMark) { + return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", stackCrawlMark || failBadSyntaxKind); + } + Debug.failBadSyntaxKind = failBadSyntaxKind; function assert(expression, message, verboseDebugInfo, stackCrawlMark) { if (!expression) { + message = message ? "False expression: " + message : "False expression."; if (verboseDebugInfo) { message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); } - fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert); + fail(message, stackCrawlMark || assert); } } Debug.assert = assert; - function assertEqual(a, b, msg, msg2) { + function assertEqual(a, b, msg, msg2, stackCrawlMark) { if (a !== b) { var message = msg ? msg2 ? msg + " " + msg2 : msg : ""; - fail("Expected " + a + " === " + b + ". " + message); + fail("Expected " + a + " === " + b + ". " + message, stackCrawlMark || assertEqual); } } Debug.assertEqual = assertEqual; - function assertLessThan(a, b, msg) { + function assertLessThan(a, b, msg, stackCrawlMark) { if (a >= b) { - fail("Expected " + a + " < " + b + ". " + (msg || "")); + fail("Expected " + a + " < " + b + ". " + (msg || ""), stackCrawlMark || assertLessThan); } } Debug.assertLessThan = assertLessThan; - function assertLessThanOrEqual(a, b) { + function assertLessThanOrEqual(a, b, stackCrawlMark) { if (a > b) { - fail("Expected " + a + " <= " + b); + fail("Expected " + a + " <= " + b, stackCrawlMark || assertLessThanOrEqual); } } Debug.assertLessThanOrEqual = assertLessThanOrEqual; - function assertGreaterThanOrEqual(a, b) { + function assertGreaterThanOrEqual(a, b, stackCrawlMark) { if (a < b) { - fail("Expected " + a + " >= " + b); + fail("Expected " + a + " >= " + b, stackCrawlMark || assertGreaterThanOrEqual); } } Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual; - function fail(message, stackCrawlMark) { - debugger; - var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); - if (Error.captureStackTrace) { - Error.captureStackTrace(e, stackCrawlMark || fail); + function assertIsDefined(value, message, stackCrawlMark) { + // eslint-disable-next-line no-null/no-null + if (value === undefined || value === null) { + fail(message, stackCrawlMark || assertIsDefined); } - throw e; } - Debug.fail = fail; - function assertDefined(value, message) { - // eslint-disable-next-line no-null/no-null - if (value === undefined || value === null) - return fail(message); + Debug.assertIsDefined = assertIsDefined; + function checkDefined(value, message, stackCrawlMark) { + assertIsDefined(value, message, stackCrawlMark || checkDefined); return value; } - Debug.assertDefined = assertDefined; - function assertEachDefined(value, message) { + Debug.checkDefined = checkDefined; + /** + * @deprecated Use `checkDefined` to check whether a value is defined inline. Use `assertIsDefined` to check whether + * a value is defined at the statement level. + */ + Debug.assertDefined = checkDefined; + function assertEachIsDefined(value, message, stackCrawlMark) { for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { var v = value_1[_i]; - assertDefined(v, message); + assertIsDefined(v, message, stackCrawlMark || assertEachIsDefined); } + } + Debug.assertEachIsDefined = assertEachIsDefined; + function checkEachDefined(value, message, stackCrawlMark) { + assertEachIsDefined(value, message, stackCrawlMark || checkEachDefined); return value; } - Debug.assertEachDefined = assertEachDefined; + Debug.checkEachDefined = checkEachDefined; + /** + * @deprecated Use `checkEachDefined` to check whether the elements of an array are defined inline. Use `assertEachIsDefined` to check whether + * the elements of an array are defined at the statement level. + */ + Debug.assertEachDefined = checkEachDefined; function assertNever(member, message, stackCrawlMark) { if (message === void 0) { message = "Illegal value:"; } var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member); return fail(message + " " + detail, stackCrawlMark || assertNever); } Debug.assertNever = assertNever; + function assertEachNode(nodes, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) { + assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertEachNode); + } + } + Debug.assertEachNode = assertEachNode; + function assertNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertNode")) { + assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNode); + } + } + Debug.assertNode = assertNode; + function assertNotNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) { + assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNotNode); + } + } + Debug.assertNotNode = assertNotNode; + function assertOptionalNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) { + assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertOptionalNode); + } + } + Debug.assertOptionalNode = assertOptionalNode; + function assertOptionalToken(node, kind, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) { + assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, stackCrawlMark || assertOptionalToken); + } + } + Debug.assertOptionalToken = assertOptionalToken; + function assertMissingNode(node, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) { + assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, stackCrawlMark || assertMissingNode); + } + } + Debug.assertMissingNode = assertMissingNode; function getFunctionName(func) { if (typeof func !== "function") { return ""; @@ -2299,28 +2447,6 @@ var ts; return formatEnum(flags, ts.ObjectFlags, /*isFlags*/ true); } Debug.formatObjectFlags = formatObjectFlags; - function failBadSyntaxKind(node, message) { - return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", failBadSyntaxKind); - } - Debug.failBadSyntaxKind = failBadSyntaxKind; - Debug.assertEachNode = shouldAssert(1 /* Normal */) - ? function (nodes, test, message) { return assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertEachNode); } - : ts.noop; - Debug.assertNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertNotNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertOptionalNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertOptionalNode); } - : ts.noop; - Debug.assertOptionalToken = shouldAssert(1 /* Normal */) - ? function (node, kind, message) { return assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, Debug.assertOptionalToken); } - : ts.noop; - Debug.assertMissingNode = shouldAssert(1 /* Normal */) - ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } - : ts.noop; var isDebugInfoEnabled = false; var extendedDebugModule; function extendedDebug() { @@ -2606,7 +2732,7 @@ var ts; if (prerelease === void 0) { prerelease = ""; } if (build === void 0) { build = ""; } if (typeof major === "string") { - var result = ts.Debug.assertDefined(tryParseComponents(major), "Invalid version"); + var result = ts.Debug.checkDefined(tryParseComponents(major), "Invalid version"); (major = result.major, minor = result.minor, patch = result.patch, prerelease = result.prerelease, build = result.build); } ts.Debug.assert(major >= 0, "Invalid argument: major"); @@ -2737,7 +2863,7 @@ var ts; */ var VersionRange = /** @class */ (function () { function VersionRange(spec) { - this._alternatives = spec ? ts.Debug.assertDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; + this._alternatives = spec ? ts.Debug.checkDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; } VersionRange.tryParse = function (text) { var sets = parseRange(text); @@ -3277,32 +3403,33 @@ var ts; SyntaxKind[SyntaxKind["JSDocSignature"] = 305] = "JSDocSignature"; SyntaxKind[SyntaxKind["JSDocTag"] = 306] = "JSDocTag"; SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 307] = "JSDocAugmentsTag"; - SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 308] = "JSDocAuthorTag"; - SyntaxKind[SyntaxKind["JSDocClassTag"] = 309] = "JSDocClassTag"; - SyntaxKind[SyntaxKind["JSDocPublicTag"] = 310] = "JSDocPublicTag"; - SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 311] = "JSDocPrivateTag"; - SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 312] = "JSDocProtectedTag"; - SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 313] = "JSDocReadonlyTag"; - SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 314] = "JSDocCallbackTag"; - SyntaxKind[SyntaxKind["JSDocEnumTag"] = 315] = "JSDocEnumTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 316] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 317] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocThisTag"] = 318] = "JSDocThisTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 319] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 320] = "JSDocTemplateTag"; - SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 321] = "JSDocTypedefTag"; - SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 322] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 308] = "JSDocImplementsTag"; + SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 309] = "JSDocAuthorTag"; + SyntaxKind[SyntaxKind["JSDocClassTag"] = 310] = "JSDocClassTag"; + SyntaxKind[SyntaxKind["JSDocPublicTag"] = 311] = "JSDocPublicTag"; + SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 312] = "JSDocPrivateTag"; + SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 313] = "JSDocProtectedTag"; + SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 314] = "JSDocReadonlyTag"; + SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 315] = "JSDocCallbackTag"; + SyntaxKind[SyntaxKind["JSDocEnumTag"] = 316] = "JSDocEnumTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 317] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 318] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocThisTag"] = 319] = "JSDocThisTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 320] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 321] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 322] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 323] = "JSDocPropertyTag"; // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 323] = "SyntaxList"; + SyntaxKind[SyntaxKind["SyntaxList"] = 324] = "SyntaxList"; // Transformation nodes - SyntaxKind[SyntaxKind["NotEmittedStatement"] = 324] = "NotEmittedStatement"; - SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 325] = "PartiallyEmittedExpression"; - SyntaxKind[SyntaxKind["CommaListExpression"] = 326] = "CommaListExpression"; - SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 327] = "MergeDeclarationMarker"; - SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 328] = "EndOfDeclarationMarker"; - SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 329] = "SyntheticReferenceExpression"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 325] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 326] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["CommaListExpression"] = 327] = "CommaListExpression"; + SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 328] = "MergeDeclarationMarker"; + SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 329] = "EndOfDeclarationMarker"; + SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 330] = "SyntheticReferenceExpression"; // Enum value count - SyntaxKind[SyntaxKind["Count"] = 330] = "Count"; + SyntaxKind[SyntaxKind["Count"] = 331] = "Count"; // Markers SyntaxKind[SyntaxKind["FirstAssignment"] = 62] = "FirstAssignment"; SyntaxKind[SyntaxKind["LastAssignment"] = 74] = "LastAssignment"; @@ -3332,9 +3459,9 @@ var ts; SyntaxKind[SyntaxKind["LastStatement"] = 241] = "LastStatement"; SyntaxKind[SyntaxKind["FirstNode"] = 153] = "FirstNode"; SyntaxKind[SyntaxKind["FirstJSDocNode"] = 294] = "FirstJSDocNode"; - SyntaxKind[SyntaxKind["LastJSDocNode"] = 322] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 323] = "LastJSDocNode"; SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 306] = "FirstJSDocTagNode"; - SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 322] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 323] = "LastJSDocTagNode"; /* @internal */ SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 122] = "FirstContextualKeyword"; /* @internal */ SyntaxKind[SyntaxKind["LastContextualKeyword"] = 152] = "LastContextualKeyword"; })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {})); @@ -3467,6 +3594,8 @@ var ts; /* @internal */ TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape"; /* @internal */ + TokenFlags[TokenFlags["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape"; + /* @internal */ TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; /* @internal */ TokenFlags[TokenFlags["NumericLiteralFlags"] = 1008] = "NumericLiteralFlags"; @@ -3484,10 +3613,9 @@ var ts; FlowFlags[FlowFlags["SwitchClause"] = 128] = "SwitchClause"; FlowFlags[FlowFlags["ArrayMutation"] = 256] = "ArrayMutation"; FlowFlags[FlowFlags["Call"] = 512] = "Call"; - FlowFlags[FlowFlags["Referenced"] = 1024] = "Referenced"; - FlowFlags[FlowFlags["Shared"] = 2048] = "Shared"; - FlowFlags[FlowFlags["PreFinally"] = 4096] = "PreFinally"; - FlowFlags[FlowFlags["AfterFinally"] = 8192] = "AfterFinally"; + FlowFlags[FlowFlags["ReduceLabel"] = 1024] = "ReduceLabel"; + FlowFlags[FlowFlags["Referenced"] = 2048] = "Referenced"; + FlowFlags[FlowFlags["Shared"] = 4096] = "Shared"; FlowFlags[FlowFlags["Label"] = 12] = "Label"; FlowFlags[FlowFlags["Condition"] = 96] = "Condition"; })(FlowFlags = ts.FlowFlags || (ts.FlowFlags = {})); @@ -3542,7 +3670,7 @@ var ts; ContextFlags[ContextFlags["None"] = 0] = "None"; ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; - ContextFlags[ContextFlags["BaseConstraint"] = 4] = "BaseConstraint"; + ContextFlags[ContextFlags["Completions"] = 4] = "Completions"; })(ContextFlags = ts.ContextFlags || (ts.ContextFlags = {})); // NOTE: If modifying this enum, must modify `TypeFormatFlags` too! var NodeBuilderFlags; @@ -3564,6 +3692,7 @@ var ts; NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; // Error handling NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; NodeBuilderFlags[NodeBuilderFlags["AllowQualifedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifedNameInPlaceOfIdentifier"; @@ -3601,6 +3730,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; TypeFormatFlags[TypeFormatFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; TypeFormatFlags[TypeFormatFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + TypeFormatFlags[TypeFormatFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; // Error Handling TypeFormatFlags[TypeFormatFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; // TypeFormatFlags exclusive @@ -3612,7 +3742,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 4194304] = "InFirstTypeArgument"; TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 8388608] = "InTypeAlias"; /** @deprecated */ TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 0] = "WriteOwnNameForAnyLike"; - TypeFormatFlags[TypeFormatFlags["NodeBuilderFlagsMask"] = 9469291] = "NodeBuilderFlagsMask"; + TypeFormatFlags[TypeFormatFlags["NodeBuilderFlagsMask"] = 277904747] = "NodeBuilderFlagsMask"; })(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {})); var SymbolFormatFlags; (function (SymbolFormatFlags) { @@ -3906,6 +4036,8 @@ var ts; TypeFlags[TypeFlags["ObjectFlagsType"] = 3899393] = "ObjectFlagsType"; /* @internal */ TypeFlags[TypeFlags["Simplifiable"] = 25165824] = "Simplifiable"; + /* @internal */ + TypeFlags[TypeFlags["Substructure"] = 66584576] = "Substructure"; // 'Narrowable' types are types where narrowing actually narrows. // This *should* be every type other than null, undefined, void, and never TypeFlags[TypeFlags["Narrowable"] = 133970943] = "Narrowable"; @@ -3924,9 +4056,6 @@ var ts; TypeFlags[TypeFlags["IncludesWildcard"] = 4194304] = "IncludesWildcard"; /* @internal */ TypeFlags[TypeFlags["IncludesEmptyObject"] = 8388608] = "IncludesEmptyObject"; - // The following flag is used for different purposes by maybeTypeOfKind - /* @internal */ - TypeFlags[TypeFlags["GenericMappedType"] = 131072] = "GenericMappedType"; })(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {})); var ObjectFlags; (function (ObjectFlags) { @@ -3956,6 +4085,18 @@ var ts; ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 1048576] = "ContainsObjectOrArrayLiteral"; /* @internal */ ObjectFlags[ObjectFlags["NonInferrableType"] = 2097152] = "NonInferrableType"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericObjectTypeComputed"] = 4194304] = "IsGenericObjectTypeComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericIndexTypeComputed"] = 16777216] = "IsGenericIndexTypeComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericIndexType"] = 33554432] = "IsGenericIndexType"; + /* @internal */ + ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 67108864] = "CouldContainTypeVariablesComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 134217728] = "CouldContainTypeVariables"; ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; /* @internal */ ObjectFlags[ObjectFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; @@ -4131,12 +4272,12 @@ var ts; JsxEmit[JsxEmit["React"] = 2] = "React"; JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative"; })(JsxEmit = ts.JsxEmit || (ts.JsxEmit = {})); - var importsNotUsedAsValues; - (function (importsNotUsedAsValues) { - importsNotUsedAsValues[importsNotUsedAsValues["Remove"] = 0] = "Remove"; - importsNotUsedAsValues[importsNotUsedAsValues["Preserve"] = 1] = "Preserve"; - importsNotUsedAsValues[importsNotUsedAsValues["Error"] = 2] = "Error"; - })(importsNotUsedAsValues = ts.importsNotUsedAsValues || (ts.importsNotUsedAsValues = {})); + var ImportsNotUsedAsValues; + (function (ImportsNotUsedAsValues) { + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Remove"] = 0] = "Remove"; + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Preserve"] = 1] = "Preserve"; + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Error"] = 2] = "Error"; + })(ImportsNotUsedAsValues = ts.ImportsNotUsedAsValues || (ts.ImportsNotUsedAsValues = {})); var NewLineKind; (function (NewLineKind) { NewLineKind[NewLineKind["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed"; @@ -4455,8 +4596,9 @@ var ts; ExternalEmitHelpers[ExternalEmitHelpers["MakeTemplateObject"] = 131072] = "MakeTemplateObject"; ExternalEmitHelpers[ExternalEmitHelpers["ClassPrivateFieldGet"] = 262144] = "ClassPrivateFieldGet"; ExternalEmitHelpers[ExternalEmitHelpers["ClassPrivateFieldSet"] = 524288] = "ClassPrivateFieldSet"; + ExternalEmitHelpers[ExternalEmitHelpers["CreateBinding"] = 1048576] = "CreateBinding"; ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper"; - ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 524288] = "LastEmitHelper"; + ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 1048576] = "LastEmitHelper"; // Helpers included by ES2015 for..of ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes"; // Helpers included by ES2017 for..await..of @@ -4476,6 +4618,7 @@ var ts; EmitHint[EmitHint["MappedTypeParameter"] = 3] = "MappedTypeParameter"; EmitHint[EmitHint["Unspecified"] = 4] = "Unspecified"; EmitHint[EmitHint["EmbeddedStatement"] = 5] = "EmbeddedStatement"; + EmitHint[EmitHint["JsxAttributeValue"] = 6] = "JsxAttributeValue"; })(EmitHint = ts.EmitHint || (ts.EmitHint = {})); /*@internal*/ var BundleFileSectionKind; @@ -4938,7 +5081,7 @@ var ts; callbacksCache.add(path, callback); return { close: function () { - var watcher = ts.Debug.assertDefined(cache.get(path)); + var watcher = ts.Debug.checkDefined(cache.get(path)); callbacksCache.remove(path, callback); watcher.refCount--; if (watcher.refCount) @@ -5036,7 +5179,7 @@ var ts; return { dirName: dirName, close: function () { - var directoryWatcher = ts.Debug.assertDefined(cache.get(dirPath)); + var directoryWatcher = ts.Debug.checkDefined(cache.get(dirPath)); if (callbackToAdd) callbackCache.remove(dirPath, callbackToAdd); directoryWatcher.refCount--; @@ -5223,7 +5366,7 @@ var ts; }; function watchFile(fileName, callback, pollingInterval, options) { options = updateOptionsForWatchFile(options, useNonPollingWatchers); - var watchFileKind = ts.Debug.assertDefined(options.watchFile); + var watchFileKind = ts.Debug.checkDefined(options.watchFile); switch (watchFileKind) { case ts.WatchFileKind.FixedPollingInterval: return pollingWatchFile(fileName, callback, PollingInterval.Low, /*options*/ undefined); @@ -5303,7 +5446,7 @@ var ts; function nonRecursiveWatchDirectory(directoryName, callback, recursive, options) { ts.Debug.assert(!recursive); options = updateOptionsForWatchDirectory(options); - var watchDirectoryKind = ts.Debug.assertDefined(options.watchDirectory); + var watchDirectoryKind = ts.Debug.checkDefined(options.watchDirectory); switch (watchDirectoryKind) { case ts.WatchDirectoryKind.FixedPollingInterval: return pollingWatchFile(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium, @@ -5909,48 +6052,8 @@ var ts; return hash.digest("hex"); } } - function getChakraSystem() { - var realpath = ChakraHost.realpath && (function (path) { return ChakraHost.realpath(path); }); - return { - newLine: ChakraHost.newLine || "\r\n", - args: ChakraHost.args, - useCaseSensitiveFileNames: !!ChakraHost.useCaseSensitiveFileNames, - write: ChakraHost.echo, - readFile: function (path, _encoding) { - // encoding is automatically handled by the implementation in ChakraHost - return ChakraHost.readFile(path); - }, - writeFile: function (path, data, writeByteOrderMark) { - // If a BOM is required, emit one - if (writeByteOrderMark) { - data = byteOrderMarkIndicator + data; - } - ChakraHost.writeFile(path, data); - }, - resolvePath: ChakraHost.resolvePath, - fileExists: ChakraHost.fileExists, - deleteFile: ChakraHost.deleteFile, - getModifiedTime: ChakraHost.getModifiedTime, - setModifiedTime: ChakraHost.setModifiedTime, - directoryExists: ChakraHost.directoryExists, - createDirectory: ChakraHost.createDirectory, - getExecutingFilePath: function () { return ChakraHost.executingFile; }, - getCurrentDirectory: function () { return ChakraHost.currentDirectory; }, - getDirectories: ChakraHost.getDirectories, - getEnvironmentVariable: ChakraHost.getEnvironmentVariable || (function () { return ""; }), - readDirectory: function (path, extensions, excludes, includes, _depth) { - var pattern = ts.getFileMatcherPatterns(path, excludes, includes, !!ChakraHost.useCaseSensitiveFileNames, ChakraHost.currentDirectory); - return ChakraHost.readDirectory(path, extensions, pattern.basePaths, pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern); - }, - exit: ChakraHost.quit, - realpath: realpath - }; - } var sys; - if (typeof ChakraHost !== "undefined") { - sys = getChakraSystem(); - } - else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { + if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { // process and process.nextTick checks if current environment is node-like // process.browser check excludes webpack and browserify sys = getNodeSystem(); @@ -5963,9 +6066,9 @@ var ts; })(); if (ts.sys && ts.sys.getEnvironmentVariable) { setCustomPollingValues(ts.sys); - ts.Debug.currentAssertionLevel = /^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) + ts.Debug.setAssertionLevel(/^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ - : 0 /* None */; + : 0 /* None */); } if (ts.sys && ts.sys.debugMode) { ts.Debug.isDebugging = true; @@ -6911,8 +7014,9 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), - Type_only_0_must_reference_a_type_but_1_is_a_value: diag(1361, ts.DiagnosticCategory.Error, "Type_only_0_must_reference_a_type_but_1_is_a_value_1361", "Type-only {0} must reference a type, but '{1}' is a value."), - Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported: diag(1362, ts.DiagnosticCategory.Error, "Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported_1362", "Enum '{0}' cannot be used as a value because only its type has been imported."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), + _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), + _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, ts.DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), Convert_to_type_only_export: diag(1364, ts.DiagnosticCategory.Message, "Convert_to_type_only_export_1364", "Convert to type-only export"), Convert_all_re_exported_types_to_type_only_exports: diag(1365, ts.DiagnosticCategory.Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), @@ -6922,11 +7026,16 @@ var ts; Did_you_mean_0: diag(1369, ts.DiagnosticCategory.Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"), Only_ECMAScript_imports_may_use_import_type: diag(1370, ts.DiagnosticCategory.Error, "Only_ECMAScript_imports_may_use_import_type_1370", "Only ECMAScript imports may use 'import type'."), This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error: diag(1371, ts.DiagnosticCategory.Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371", "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'."), - This_import_may_be_converted_to_a_type_only_import: diag(1372, ts.DiagnosticCategory.Suggestion, "This_import_may_be_converted_to_a_type_only_import_1372", "This import may be converted to a type-only import."), Convert_to_type_only_import: diag(1373, ts.DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"), Convert_all_imports_not_used_as_a_value_to_type_only_imports: diag(1374, ts.DiagnosticCategory.Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"), await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1376, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1376", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + _0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."), + _0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."), + Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), + An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), + Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), + Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), @@ -7087,6 +7196,8 @@ var ts; Type_alias_0_circularly_references_itself: diag(2456, ts.DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), Type_alias_name_cannot_be_0: diag(2457, ts.DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, ts.DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Module_0_declares_1_locally_but_it_is_not_exported: diag(2459, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), + Module_0_declares_1_locally_but_it_is_exported_as_2: diag(2460, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), Type_0_is_not_an_array_type: diag(2461, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, ts.DiagnosticCategory.Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, ts.DiagnosticCategory.Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), @@ -7310,7 +7421,7 @@ var ts; Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, ts.DiagnosticCategory.Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, ts.DiagnosticCategory.Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension"), Property_0_was_also_declared_here: diag(2733, ts.DiagnosticCategory.Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), - It_is_highly_likely_that_you_are_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "It_is_highly_likely_that_you_are_missing_a_semicolon_2734", "It is highly likely that you are missing a semicolon."), + Are_you_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, ts.DiagnosticCategory.Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), Operator_0_cannot_be_applied_to_type_1: diag(2736, ts.DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: diag(2737, ts.DiagnosticCategory.Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), @@ -7359,6 +7470,7 @@ var ts; The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: diag(2780, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: diag(2781, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), _0_needs_an_explicit_type_annotation: diag(2782, ts.DiagnosticCategory.Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), + _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: diag(2783, ts.DiagnosticCategory.Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), @@ -7546,7 +7658,7 @@ var ts; File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, ts.DiagnosticCategory.Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, ts.DiagnosticCategory.Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), NEWLINE: diag(6061, ts.DiagnosticCategory.Message, "NEWLINE_6061", "NEWLINE"), - Option_0_can_only_be_specified_in_tsconfig_json_file: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_6064", "Option '{0}' can only be specified in 'tsconfig.json' file."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), Enables_experimental_support_for_ES7_decorators: diag(6065, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), Enables_experimental_support_for_ES7_async_functions: diag(6068, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_async_functions_6068", "Enables experimental support for ES7 async functions."), @@ -7707,6 +7819,8 @@ var ts; Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling: diag(6226, ts.DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'."), Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority: diag(6227, ts.DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'."), Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6228, ts.DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228", "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively."), + Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, ts.DiagnosticCategory.Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), Projects_to_reference: diag(6300, ts.DiagnosticCategory.Message, "Projects_to_reference_6300", "Projects to reference"), Enable_project_compilation: diag(6302, ts.DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"), Composite_projects_may_not_disable_declaration_emit: diag(6304, ts.DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), @@ -7903,6 +8017,7 @@ var ts; Import_default_0_from_module_1: diag(90032, ts.DiagnosticCategory.Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""), Add_default_import_0_to_existing_import_declaration_from_1: diag(90033, ts.DiagnosticCategory.Message, "Add_default_import_0_to_existing_import_declaration_from_1_90033", "Add default import '{0}' to existing import declaration from \"{1}\""), Add_parameter_name: diag(90034, ts.DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"), + Declare_a_private_field_named_0: diag(90053, ts.DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), Convert_function_to_an_ES2015_class: diag(95001, ts.DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), Convert_function_0_to_class: diag(95002, ts.DiagnosticCategory.Message, "Convert_function_0_to_class_95002", "Convert function '{0}' to class"), Extract_to_0_in_1: diag(95004, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), @@ -7998,6 +8113,8 @@ var ts; Add_export_to_make_this_file_into_a_module: diag(95097, ts.DiagnosticCategory.Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), Set_the_target_option_in_your_configuration_file_to_0: diag(95098, ts.DiagnosticCategory.Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), Set_the_module_option_in_your_configuration_file_to_0: diag(95099, ts.DiagnosticCategory.Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), + Convert_invalid_character_to_its_html_entity_code: diag(95100, ts.DiagnosticCategory.Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), + Wrap_invalid_character_in_an_expression_container: diag(95101, ts.DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95101", "Wrap invalid character in an expression container"), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), @@ -8362,6 +8479,12 @@ var ts; function isDigit(ch) { return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; } + function isHexDigit(ch) { + return isDigit(ch) || ch >= 65 /* A */ && ch <= 70 /* F */ || ch >= 97 /* a */ && ch <= 102 /* f */; + } + function isCodePoint(code) { + return code <= 0x10FFFF; + } /* @internal */ function isOctalDigit(ch) { return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; @@ -8749,6 +8872,7 @@ var ts; reScanGreaterToken: reScanGreaterToken, reScanSlashToken: reScanSlashToken, reScanTemplateToken: reScanTemplateToken, + reScanTemplateHeadOrNoSubstitutionTemplate: reScanTemplateHeadOrNoSubstitutionTemplate, scanJsxIdentifier: scanJsxIdentifier, scanJsxAttributeValue: scanJsxAttributeValue, reScanJsxAttributeValue: reScanJsxAttributeValue, @@ -8997,7 +9121,7 @@ var ts; * Sets the current 'tokenValue' and returns a NoSubstitutionTemplateLiteral or * a literal component of a TemplateExpression. */ - function scanTemplateAndSetTokenValue() { + function scanTemplateAndSetTokenValue(isTaggedTemplate) { var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; pos++; var start = pos; @@ -9029,7 +9153,7 @@ var ts; // Escape character if (currChar === 92 /* backslash */) { contents += text.substring(start, pos); - contents += scanEscapeSequence(); + contents += scanEscapeSequence(isTaggedTemplate); start = pos; continue; } @@ -9051,7 +9175,8 @@ var ts; tokenValue = contents; return resultingToken; } - function scanEscapeSequence() { + function scanEscapeSequence(isTaggedTemplate) { + var start = pos; pos++; if (pos >= end) { error(ts.Diagnostics.Unexpected_end_of_text); @@ -9061,6 +9186,12 @@ var ts; pos++; switch (ch) { case 48 /* _0 */: + // '\01' + if (isTaggedTemplate && pos < end && isDigit(text.charCodeAt(pos))) { + pos++; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } return "\0"; case 98 /* b */: return "\b"; @@ -9079,16 +9210,55 @@ var ts; case 34 /* doubleQuote */: return "\""; case 117 /* u */: + if (isTaggedTemplate) { + // '\u' or '\u0' or '\u00' or '\u000' + for (var escapePos = pos; escapePos < pos + 4; escapePos++) { + if (escapePos < end && !isHexDigit(text.charCodeAt(escapePos)) && text.charCodeAt(escapePos) !== 123 /* openBrace */) { + pos = escapePos; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + } + } // '\u{DDDDDDDD}' if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) { - tokenFlags |= 8 /* ExtendedUnicodeEscape */; pos++; + // '\u{' + if (isTaggedTemplate && !isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + if (isTaggedTemplate) { + var savePos = pos; + var escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false); + var escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + // '\u{Not Code Point' or '\u{CodePoint' + if (!isCodePoint(escapedValue) || text.charCodeAt(pos) !== 125 /* closeBrace */) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + else { + pos = savePos; + } + } + tokenFlags |= 8 /* ExtendedUnicodeEscape */; return scanExtendedUnicodeEscape(); } tokenFlags |= 1024 /* UnicodeEscape */; // '\uDDDD' return scanHexadecimalEscape(/*numDigits*/ 4); case 120 /* x */: + if (isTaggedTemplate) { + if (!isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + else if (!isHexDigit(text.charCodeAt(pos + 1))) { + pos++; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + } // '\xDD' return scanHexadecimalEscape(/*numDigits*/ 2); // when encountering a LineContinuation (i.e. a backslash and a line terminator sequence), @@ -9362,7 +9532,7 @@ var ts; tokenValue = scanString(); return token = 10 /* StringLiteral */; case 96 /* backtick */: - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ false); case 37 /* percent */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { return pos += 2, token = 68 /* PercentEqualsToken */; @@ -9692,11 +9862,12 @@ var ts; if (ch === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } - return token = 76 /* PrivateIdentifier */; } - error(ts.Diagnostics.Invalid_character); - // no `pos++` because already advanced past the '#' - return token = 0 /* Unknown */; + else { + tokenValue = "#"; + error(ts.Diagnostics.Invalid_character); + } + return token = 76 /* PrivateIdentifier */; default: if (isIdentifierStart(ch, languageVersion)) { pos += charSize(ch); @@ -9798,10 +9969,14 @@ var ts; /** * Unconditionally back up and scan a template expression portion. */ - function reScanTemplateToken() { + function reScanTemplateToken(isTaggedTemplate) { ts.Debug.assert(token === 19 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + pos = tokenPos; + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ true); } function reScanJsxToken() { pos = tokenPos = startPos; @@ -9839,9 +10014,15 @@ var ts; } // First non-whitespace character on this line. var firstNonWhitespace = 0; + var lastNonWhitespace = -1; // These initial values are special because the first line is: // firstNonWhitespace = 0 to indicate that we want leading whitespace, while (pos < end) { + // We want to keep track of the last non-whitespace (but including + // newlines character for hitting the end of the JSX Text region) + if (!isWhiteSpaceSingleLine(char)) { + lastNonWhitespace = pos; + } char = text.charCodeAt(pos); if (char === 123 /* openBrace */) { break; @@ -9853,6 +10034,14 @@ var ts; } break; } + if (char === 62 /* greaterThan */) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); + } + if (char === 125 /* closeBrace */) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); + } + if (lastNonWhitespace > 0) + lastNonWhitespace++; // FirstNonWhitespace is 0, then we only see whitespaces so far. If we see a linebreak, we want to ignore that whitespaces. // i.e (- : whitespace) //
---- @@ -9867,7 +10056,8 @@ var ts; } pos++; } - tokenValue = text.substring(startPos, pos); + var endPosition = lastNonWhitespace === -1 ? pos : lastNonWhitespace; + tokenValue = text.substring(startPos, endPosition); return firstNonWhitespace === -1 ? 12 /* JsxTextAllWhiteSpaces */ : 11 /* JsxText */; } // Scans a JSX identifier; these differ from normal identifiers in that @@ -10598,8 +10788,8 @@ var ts; switch (declaration.kind) { case 75 /* Identifier */: return declaration; - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: { + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: { var name = declaration.name; if (name.kind === 153 /* QualifiedName */) { return name.right; @@ -10623,9 +10813,9 @@ var ts; return undefined; } } - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 315 /* JSDocEnumTag */: + case 316 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); case 259 /* ExportAssignment */: { var expression = declaration.expression; @@ -10729,6 +10919,11 @@ var ts; return getFirstJSDocTag(node, isJSDocAugmentsTag); } ts.getJSDocAugmentsTag = getJSDocAugmentsTag; + /** Gets the JSDoc implements tags for the node if present */ + function getJSDocImplementsTags(node) { + return getAllJSDocTags(node, isJSDocImplementsTag); + } + ts.getJSDocImplementsTags = getJSDocImplementsTags; /** Gets the JSDoc class tag for the node if present */ function getJSDocClassTag(node) { return getFirstJSDocTag(node, isJSDocClassTag); @@ -10843,7 +11038,12 @@ var ts; function getFirstJSDocTag(node, predicate) { return ts.find(getJSDocTags(node), predicate); } - /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + /** Gets all JSDoc tags that match a specified predicate */ + function getAllJSDocTags(node, predicate) { + return getJSDocTags(node).filter(predicate); + } + ts.getAllJSDocTags = getAllJSDocTags; + /** Gets all JSDoc tags of a specified kind */ function getAllJSDocTagsOfKind(node, kind) { return getJSDocTags(node).filter(function (doc) { return doc.kind === kind; }); } @@ -11189,7 +11389,7 @@ var ts; } ts.isParenthesizedExpression = isParenthesizedExpression; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 325 /* PartiallyEmittedExpression */) { + while (node.kind === 326 /* PartiallyEmittedExpression */) { node = node.expression; } return node; @@ -11613,67 +11813,71 @@ var ts; } ts.isJSDoc = isJSDoc; function isJSDocAuthorTag(node) { - return node.kind === 308 /* JSDocAuthorTag */; + return node.kind === 309 /* JSDocAuthorTag */; } ts.isJSDocAuthorTag = isJSDocAuthorTag; function isJSDocAugmentsTag(node) { return node.kind === 307 /* JSDocAugmentsTag */; } ts.isJSDocAugmentsTag = isJSDocAugmentsTag; + function isJSDocImplementsTag(node) { + return node.kind === 308 /* JSDocImplementsTag */; + } + ts.isJSDocImplementsTag = isJSDocImplementsTag; function isJSDocClassTag(node) { - return node.kind === 309 /* JSDocClassTag */; + return node.kind === 310 /* JSDocClassTag */; } ts.isJSDocClassTag = isJSDocClassTag; function isJSDocPublicTag(node) { - return node.kind === 310 /* JSDocPublicTag */; + return node.kind === 311 /* JSDocPublicTag */; } ts.isJSDocPublicTag = isJSDocPublicTag; function isJSDocPrivateTag(node) { - return node.kind === 311 /* JSDocPrivateTag */; + return node.kind === 312 /* JSDocPrivateTag */; } ts.isJSDocPrivateTag = isJSDocPrivateTag; function isJSDocProtectedTag(node) { - return node.kind === 312 /* JSDocProtectedTag */; + return node.kind === 313 /* JSDocProtectedTag */; } ts.isJSDocProtectedTag = isJSDocProtectedTag; function isJSDocReadonlyTag(node) { - return node.kind === 313 /* JSDocReadonlyTag */; + return node.kind === 314 /* JSDocReadonlyTag */; } ts.isJSDocReadonlyTag = isJSDocReadonlyTag; function isJSDocEnumTag(node) { - return node.kind === 315 /* JSDocEnumTag */; + return node.kind === 316 /* JSDocEnumTag */; } ts.isJSDocEnumTag = isJSDocEnumTag; function isJSDocThisTag(node) { - return node.kind === 318 /* JSDocThisTag */; + return node.kind === 319 /* JSDocThisTag */; } ts.isJSDocThisTag = isJSDocThisTag; function isJSDocParameterTag(node) { - return node.kind === 316 /* JSDocParameterTag */; + return node.kind === 317 /* JSDocParameterTag */; } ts.isJSDocParameterTag = isJSDocParameterTag; function isJSDocReturnTag(node) { - return node.kind === 317 /* JSDocReturnTag */; + return node.kind === 318 /* JSDocReturnTag */; } ts.isJSDocReturnTag = isJSDocReturnTag; function isJSDocTypeTag(node) { - return node.kind === 319 /* JSDocTypeTag */; + return node.kind === 320 /* JSDocTypeTag */; } ts.isJSDocTypeTag = isJSDocTypeTag; function isJSDocTemplateTag(node) { - return node.kind === 320 /* JSDocTemplateTag */; + return node.kind === 321 /* JSDocTemplateTag */; } ts.isJSDocTemplateTag = isJSDocTemplateTag; function isJSDocTypedefTag(node) { - return node.kind === 321 /* JSDocTypedefTag */; + return node.kind === 322 /* JSDocTypedefTag */; } ts.isJSDocTypedefTag = isJSDocTypedefTag; function isJSDocPropertyTag(node) { - return node.kind === 322 /* JSDocPropertyTag */; + return node.kind === 323 /* JSDocPropertyTag */; } ts.isJSDocPropertyTag = isJSDocPropertyTag; function isJSDocPropertyLikeTag(node) { - return node.kind === 322 /* JSDocPropertyTag */ || node.kind === 316 /* JSDocParameterTag */; + return node.kind === 323 /* JSDocPropertyTag */ || node.kind === 317 /* JSDocParameterTag */; } ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag; function isJSDocTypeLiteral(node) { @@ -11681,7 +11885,7 @@ var ts; } ts.isJSDocTypeLiteral = isJSDocTypeLiteral; function isJSDocCallbackTag(node) { - return node.kind === 314 /* JSDocCallbackTag */; + return node.kind === 315 /* JSDocCallbackTag */; } ts.isJSDocCallbackTag = isJSDocCallbackTag; function isJSDocSignature(node) { @@ -11696,7 +11900,7 @@ var ts; // they may be used with transformations. /* @internal */ function isSyntaxList(n) { - return n.kind === 323 /* SyntaxList */; + return n.kind === 324 /* SyntaxList */; } ts.isSyntaxList = isSyntaxList; /* @internal */ @@ -11754,21 +11958,20 @@ var ts; return isImportSpecifier(node) || isExportSpecifier(node); } ts.isImportOrExportSpecifier = isImportOrExportSpecifier; - function isTypeOnlyImportOrExportName(node) { - if (node.kind !== 75 /* Identifier */) { - return false; - } - switch (node.parent.kind) { + function isTypeOnlyImportOrExportDeclaration(node) { + switch (node.kind) { case 258 /* ImportSpecifier */: case 263 /* ExportSpecifier */: - return node.parent.parent.parent.isTypeOnly; - case 255 /* ImportClause */: + return node.parent.parent.isTypeOnly; + case 256 /* NamespaceImport */: return node.parent.isTypeOnly; + case 255 /* ImportClause */: + return node.isTypeOnly; default: return false; } } - ts.isTypeOnlyImportOrExportName = isTypeOnlyImportOrExportName; + ts.isTypeOnlyImportOrExportDeclaration = isTypeOnlyImportOrExportDeclaration; function isStringTextContainingNode(node) { return node.kind === 10 /* StringLiteral */ || isTemplateLiteralKind(node.kind); } @@ -12169,8 +12372,8 @@ var ts; case 213 /* SpreadElement */: case 217 /* AsExpression */: case 215 /* OmittedExpression */: - case 326 /* CommaListExpression */: - case 325 /* PartiallyEmittedExpression */: + case 327 /* CommaListExpression */: + case 326 /* PartiallyEmittedExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -12184,17 +12387,17 @@ var ts; ts.isAssertionExpression = isAssertionExpression; /* @internal */ function isPartiallyEmittedExpression(node) { - return node.kind === 325 /* PartiallyEmittedExpression */; + return node.kind === 326 /* PartiallyEmittedExpression */; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; /* @internal */ function isNotEmittedStatement(node) { - return node.kind === 324 /* NotEmittedStatement */; + return node.kind === 325 /* NotEmittedStatement */; } ts.isNotEmittedStatement = isNotEmittedStatement; /* @internal */ function isSyntheticReference(node) { - return node.kind === 329 /* SyntheticReferenceExpression */; + return node.kind === 330 /* SyntheticReferenceExpression */; } ts.isSyntheticReference = isSyntheticReference; /* @internal */ @@ -12327,9 +12530,9 @@ var ts; || kind === 247 /* TypeAliasDeclaration */ || kind === 155 /* TypeParameter */ || kind === 242 /* VariableDeclaration */ - || kind === 321 /* JSDocTypedefTag */ - || kind === 314 /* JSDocCallbackTag */ - || kind === 322 /* JSDocPropertyTag */; + || kind === 322 /* JSDocTypedefTag */ + || kind === 315 /* JSDocCallbackTag */ + || kind === 323 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { return kind === 244 /* FunctionDeclaration */ @@ -12364,14 +12567,14 @@ var ts; || kind === 225 /* VariableStatement */ || kind === 229 /* WhileStatement */ || kind === 236 /* WithStatement */ - || kind === 324 /* NotEmittedStatement */ - || kind === 328 /* EndOfDeclarationMarker */ - || kind === 327 /* MergeDeclarationMarker */; + || kind === 325 /* NotEmittedStatement */ + || kind === 329 /* EndOfDeclarationMarker */ + || kind === 328 /* MergeDeclarationMarker */; } /* @internal */ function isDeclaration(node) { if (node.kind === 155 /* TypeParameter */) { - return (node.parent && node.parent.kind !== 320 /* JSDocTemplateTag */) || ts.isInJSFile(node); + return (node.parent && node.parent.kind !== 321 /* JSDocTemplateTag */) || ts.isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -12466,18 +12669,18 @@ var ts; /** True if node is of some JSDoc syntax kind. */ /* @internal */ function isJSDocNode(node) { - return node.kind >= 294 /* FirstJSDocNode */ && node.kind <= 322 /* LastJSDocNode */; + return node.kind >= 294 /* FirstJSDocNode */ && node.kind <= 323 /* LastJSDocNode */; } ts.isJSDocNode = isJSDocNode; /** True if node is of a kind that may contain comment text. */ function isJSDocCommentContainingNode(node) { - return node.kind === 303 /* JSDocComment */ || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 303 /* JSDocComment */ || node.kind === 302 /* JSDocNamepathType */ || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode; // TODO: determine what this does before making it public. /* @internal */ function isJSDocTag(node) { - return node.kind >= 306 /* FirstJSDocTagNode */ && node.kind <= 322 /* LastJSDocTagNode */; + return node.kind >= 306 /* FirstJSDocTagNode */ && node.kind <= 323 /* LastJSDocTagNode */; } ts.isJSDocTag = isJSDocTag; function isSetAccessor(node) { @@ -12509,9 +12712,19 @@ var ts; } ts.hasInitializer = hasInitializer; /** True if has initializer node attached to it. */ - /* @internal */ function hasOnlyExpressionInitializer(node) { - return hasInitializer(node) && !isForStatement(node) && !isForInStatement(node) && !isForOfStatement(node) && !isJsxAttribute(node); + switch (node.kind) { + case 242 /* VariableDeclaration */: + case 156 /* Parameter */: + case 191 /* BindingElement */: + case 158 /* PropertySignature */: + case 159 /* PropertyDeclaration */: + case 281 /* PropertyAssignment */: + case 284 /* EnumMember */: + return true; + default: + return false; + } } ts.hasOnlyExpressionInitializer = hasOnlyExpressionInitializer; function isObjectLiteralElement(node) { @@ -12599,14 +12812,6 @@ var ts; return (symbol.flags & 33554432 /* Transient */) !== 0; } ts.isTransientSymbol = isTransientSymbol; - function isTypeOnlyAlias(symbol) { - return isTransientSymbol(symbol) && !!symbol.immediateTarget; - } - ts.isTypeOnlyAlias = isTypeOnlyAlias; - function isTypeOnlyEnumAlias(symbol) { - return isTypeOnlyAlias(symbol) && !!(symbol.immediateTarget.flags & 384 /* Enum */); - } - ts.isTypeOnlyEnumAlias = isTypeOnlyEnumAlias; var stringWriter = createSingleLineStringWriter(); function createSingleLineStringWriter() { var str = ""; @@ -13002,7 +13207,7 @@ var ts; // the syntax list itself considers them as normal trivia. Therefore if we simply skip // trivia for the list, we may have skipped the JSDocComment as well. So we should process its // first child to determine the actual position of its first token. - if (node.kind === 323 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 324 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); @@ -13021,7 +13226,7 @@ var ts; } ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; function isJSDocTypeExpressionOrChild(node) { - return node.kind === 294 /* JSDocTypeExpression */ || (node.parent && isJSDocTypeExpressionOrChild(node.parent)); + return !!findAncestor(node, ts.isJSDocTypeExpression); } function getTextOfNodeFromSourceText(sourceText, node, includeTrivia) { if (includeTrivia === void 0) { includeTrivia = false; } @@ -13060,30 +13265,35 @@ var ts; return emitNode && emitNode.flags || 0; } ts.getEmitFlags = getEmitFlags; - function getLiteralText(node, sourceFile, neverAsciiEscape) { + function getLiteralText(node, sourceFile, neverAsciiEscape, jsxAttributeEscape) { // If we don't need to downlevel and we can reach the original source text using // the node's parent reference, then simply get the text as it was originally written. if (!nodeIsSynthesized(node) && node.parent && !((ts.isNumericLiteral(node) && node.numericLiteralFlags & 512 /* ContainsSeparator */) || ts.isBigIntLiteral(node))) { return getSourceTextOfNodeFromSourceFile(sourceFile, node); } - // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text - // had to include a backslash: `not \${a} substitution`. - var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : escapeNonAsciiString; // If we can't reach the original source text, use the canonical form if it's a number, // or a (possibly escaped) quoted form of the original text if it's string-like. switch (node.kind) { - case 10 /* StringLiteral */: + case 10 /* StringLiteral */: { + var escapeText = jsxAttributeEscape ? escapeJsxAttributeString : + neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : + escapeNonAsciiString; if (node.singleQuote) { return "'" + escapeText(node.text, 39 /* singleQuote */) + "'"; } else { return '"' + escapeText(node.text, 34 /* doubleQuote */) + '"'; } + } case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: - case 17 /* TemplateTail */: + case 17 /* TemplateTail */: { + // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text + // had to include a backslash: `not \${a} substitution`. + var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : + escapeNonAsciiString; var rawText = node.rawText || escapeTemplateSubstitution(escapeText(node.text, 96 /* backtick */)); switch (node.kind) { case 14 /* NoSubstitutionTemplateLiteral */: @@ -13096,6 +13306,7 @@ var ts; return "}" + rawText + "`"; } break; + } case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 13 /* RegularExpressionLiteral */: @@ -13254,8 +13465,8 @@ var ts; ts.isBlockScope = isBlockScope; function isDeclarationWithTypeParameters(node) { switch (node.kind) { - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: case 305 /* JSDocSignature */: return true; default: @@ -13277,7 +13488,7 @@ var ts; case 214 /* ClassExpression */: case 246 /* InterfaceDeclaration */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: case 244 /* FunctionDeclaration */: case 161 /* MethodDeclaration */: case 162 /* Constructor */: @@ -13360,12 +13571,15 @@ var ts; ts.getTextOfPropertyName = getTextOfPropertyName; function entityNameToString(name) { switch (name.kind) { + case 104 /* ThisKeyword */: + return "this"; + case 76 /* PrivateIdentifier */: case 75 /* Identifier */: return getFullWidth(name) === 0 ? ts.idText(name) : getTextOfNode(name); case 153 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); case 194 /* PropertyAccessExpression */: - if (ts.isIdentifier(name.name)) { + if (ts.isIdentifier(name.name) || ts.isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { @@ -13615,7 +13829,7 @@ var ts; return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); case 155 /* TypeParameter */: return node === parent.constraint; - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return node === parent.constraint; case 159 /* PropertyDeclaration */: case 158 /* PropertySignature */: @@ -14234,6 +14448,13 @@ var ts; } } ts.isInExpressionContext = isInExpressionContext; + function isPartOfTypeQuery(node) { + while (node.kind === 153 /* QualifiedName */ || node.kind === 75 /* Identifier */) { + node = node.parent; + } + return node.kind === 172 /* TypeQuery */; + } + ts.isPartOfTypeQuery = isPartOfTypeQuery; function isExternalModuleImportEqualsDeclaration(node) { return node.kind === 253 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 265 /* ExternalModuleReference */; } @@ -14719,6 +14940,21 @@ var ts; return node.kind === 254 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } ts.isDefaultImport = isDefaultImport; + function forEachImportClauseDeclaration(node, action) { + if (node.name) { + var result = action(node); + if (result) + return result; + } + if (node.namedBindings) { + var result = ts.isNamespaceImport(node.namedBindings) + ? action(node.namedBindings) + : ts.forEach(node.namedBindings.elements, action); + if (result) + return result; + } + } + ts.forEachImportClauseDeclaration = forEachImportClauseDeclaration; function hasQuestionToken(node) { if (node) { switch (node.kind) { @@ -14742,7 +14978,7 @@ var ts; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function isJSDocTypeAlias(node) { - return node.kind === 321 /* JSDocTypedefTag */ || node.kind === 314 /* JSDocCallbackTag */ || node.kind === 315 /* JSDocEnumTag */; + return node.kind === 322 /* JSDocTypedefTag */ || node.kind === 315 /* JSDocCallbackTag */ || node.kind === 316 /* JSDocEnumTag */; } ts.isJSDocTypeAlias = isJSDocTypeAlias; function isTypeAlias(node) { @@ -14871,7 +15107,7 @@ var ts; } ts.getHostSignatureFromJSDocHost = getHostSignatureFromJSDocHost; function getJSDocHost(node) { - return ts.Debug.assertDefined(findAncestor(node.parent, ts.isJSDoc)).parent; + return ts.Debug.checkDefined(findAncestor(node.parent, ts.isJSDoc)).parent; } ts.getJSDocHost = getJSDocHost; function getTypeParameterFromJsDoc(node) { @@ -15133,9 +15369,27 @@ var ts; node.kind === 281 /* PropertyAssignment */ && isAliasableExpression(node.initializer); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; + function getAliasDeclarationFromName(node) { + switch (node.parent.kind) { + case 255 /* ImportClause */: + case 258 /* ImportSpecifier */: + case 256 /* NamespaceImport */: + case 263 /* ExportSpecifier */: + case 259 /* ExportAssignment */: + case 253 /* ImportEqualsDeclaration */: + return node.parent; + case 153 /* QualifiedName */: + do { + node = node.parent; + } while (node.parent.kind === 153 /* QualifiedName */); + return getAliasDeclarationFromName(node); + } + } + ts.getAliasDeclarationFromName = getAliasDeclarationFromName; function isAliasableExpression(e) { return isEntityNameExpression(e) || ts.isClassExpression(e); } + ts.isAliasableExpression = isAliasableExpression; function exportAssignmentIsAlias(node) { var e = getExportAssignmentExpression(node); return isAliasableExpression(e); @@ -15167,15 +15421,20 @@ var ts; return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassExtendsHeritageElement = getClassExtendsHeritageElement; - function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 113 /* ImplementsKeyword */); - return heritageClause ? heritageClause.types : undefined; + function getEffectiveImplementsTypeNodes(node) { + if (isInJSFile(node)) { + return ts.getJSDocImplementsTags(node).map(function (n) { return n.class; }); + } + else { + var heritageClause = getHeritageClause(node.heritageClauses, 113 /* ImplementsKeyword */); + return heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.types; + } } - ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; + ts.getEffectiveImplementsTypeNodes = getEffectiveImplementsTypeNodes; /** Returns the node in an `extends` or `implements` clause of a class or interface. */ function getAllSuperTypeNodes(node) { return ts.isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || ts.emptyArray : - ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getClassImplementsHeritageClauseElements(node)) || ts.emptyArray : + ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || ts.emptyArray : ts.emptyArray; } ts.getAllSuperTypeNodes = getAllSuperTypeNodes; @@ -15498,7 +15757,7 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return 0; case 213 /* SpreadElement */: return 1; @@ -15690,6 +15949,13 @@ var ts; function escapeTemplateSubstitution(str) { return str.replace(templateSubstitutionRegExp, "\\${"); } + /** @internal */ + function hasInvalidEscape(template) { + return template && !!(ts.isNoSubstitutionTemplateLiteral(template) + ? template.templateFlags + : (template.head.templateFlags || ts.some(template.templateSpans, function (span) { return !!span.literal.templateFlags; }))); + } + ts.hasInvalidEscape = hasInvalidEscape; // This consists of the first 19 unprintable ASCII characters, canonical escapes, lineSeparator, // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in // the language service. These characters should be escaped when printing, and if any characters are added, @@ -15714,6 +15980,23 @@ var ts; "\u2029": "\\u2029", "\u0085": "\\u0085" // nextLine }); + function encodeUtf16EscapeSequence(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + var paddedHexCode = ("0000" + hexCharCode).slice(-4); + return "\\u" + paddedHexCode; + } + function getReplacement(c, offset, input) { + if (c.charCodeAt(0) === 0 /* nullCharacter */) { + var lookAhead = input.charCodeAt(offset + c.length); + if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) { + // If the null character is followed by digits, print as a hex escape to prevent the result from parsing as an octal (which is forbidden in strict mode) + return "\\x00"; + } + // Otherwise, keep printing a literal \0 for the null character + return "\\0"; + } + return escapedCharsMap.get(c) || encodeUtf16EscapeSequence(c.charCodeAt(0)); + } /** * Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), * but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) @@ -15726,6 +16009,42 @@ var ts; return s.replace(escapedCharsRegExp, getReplacement); } ts.escapeString = escapeString; + var nonAsciiCharacters = /[^\u0000-\u007F]/g; + function escapeNonAsciiString(s, quoteChar) { + s = escapeString(s, quoteChar); + // Replace non-ASCII characters with '\uNNNN' escapes if any exist. + // Otherwise just return the original string. + return nonAsciiCharacters.test(s) ? + s.replace(nonAsciiCharacters, function (c) { return encodeUtf16EscapeSequence(c.charCodeAt(0)); }) : + s; + } + ts.escapeNonAsciiString = escapeNonAsciiString; + // This consists of the first 19 unprintable ASCII characters, JSX canonical escapes, lineSeparator, + // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in + // the language service. These characters should be escaped when printing, and if any characters are added, + // the map below must be updated. + var jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxEscapedCharsMap = ts.createMapFromTemplate({ + "\"": """, + "\'": "'" + }); + function encodeJsxCharacterEntity(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + return "&#x" + hexCharCode + ";"; + } + function getJsxAttributeStringReplacement(c) { + if (c.charCodeAt(0) === 0 /* nullCharacter */) { + return "�"; + } + return jsxEscapedCharsMap.get(c) || encodeJsxCharacterEntity(c.charCodeAt(0)); + } + function escapeJsxAttributeString(s, quoteChar) { + var escapedCharsRegExp = quoteChar === 39 /* singleQuote */ ? jsxSingleQuoteEscapedCharsRegExp : + jsxDoubleQuoteEscapedCharsRegExp; + return s.replace(escapedCharsRegExp, getJsxAttributeStringReplacement); + } + ts.escapeJsxAttributeString = escapeJsxAttributeString; /** * Strip off existed surrounding single quotes, double quotes, or backticks from a given string * @@ -15744,38 +16063,11 @@ var ts; charCode === 34 /* doubleQuote */ || charCode === 96 /* backtick */; } - function getReplacement(c, offset, input) { - if (c.charCodeAt(0) === 0 /* nullCharacter */) { - var lookAhead = input.charCodeAt(offset + c.length); - if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) { - // If the null character is followed by digits, print as a hex escape to prevent the result from parsing as an octal (which is forbidden in strict mode) - return "\\x00"; - } - // Otherwise, keep printing a literal \0 for the null character - return "\\0"; - } - return escapedCharsMap.get(c) || get16BitUnicodeEscapeSequence(c.charCodeAt(0)); - } function isIntrinsicJsxName(name) { var ch = name.charCodeAt(0); return (ch >= 97 /* a */ && ch <= 122 /* z */) || ts.stringContains(name, "-"); } ts.isIntrinsicJsxName = isIntrinsicJsxName; - function get16BitUnicodeEscapeSequence(charCode) { - var hexCharCode = charCode.toString(16).toUpperCase(); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - var nonAsciiCharacters = /[^\u0000-\u007F]/g; - function escapeNonAsciiString(s, quoteChar) { - s = escapeString(s, quoteChar); - // Replace non-ASCII characters with '\uNNNN' escapes if any exist. - // Otherwise just return the original string. - return nonAsciiCharacters.test(s) ? - s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) : - s; - } - ts.escapeNonAsciiString = escapeNonAsciiString; var indentStrings = ["", " "]; function getIndentString(level) { if (indentStrings[level] === undefined) { @@ -16432,6 +16724,9 @@ var ts; } ts.getSelectedModifierFlags = getSelectedModifierFlags; function getModifierFlags(node) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 152 /* LastToken */) { + return 0 /* None */; + } if (node.modifierFlagsCache & 536870912 /* HasComputedFlags */) { return node.modifierFlagsCache & ~536870912 /* HasComputedFlags */; } @@ -16547,7 +16842,7 @@ var ts; } ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { - return node.kind === 75 /* Identifier */ || node.kind === 104 /* ThisKeyword */ || + return node.kind === 75 /* Identifier */ || node.kind === 104 /* ThisKeyword */ || node.kind === 102 /* SuperKeyword */ || node.kind === 194 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 200 /* ParenthesizedExpression */ && isDottedName(node.expression); } @@ -17165,6 +17460,14 @@ var ts; return node.kind === 194 /* PropertyAccessExpression */ || node.kind === 195 /* ElementAccessExpression */; } ts.isAccessExpression = isAccessExpression; + function getNameOfAccessExpression(node) { + if (node.kind === 194 /* PropertyAccessExpression */) { + return node.name; + } + ts.Debug.assert(node.kind === 195 /* ElementAccessExpression */); + return node.argumentExpression; + } + ts.getNameOfAccessExpression = getNameOfAccessExpression; function isBundleFileTextLike(section) { switch (section.kind) { case "text" /* Text */: @@ -17215,6 +17518,26 @@ var ts; this.parent = undefined; this.original = undefined; } + function Token(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0 /* None */; + this.transformFlags = 0 /* None */; + this.parent = undefined; + } + function Identifier(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0 /* None */; + this.transformFlags = 0 /* None */; + this.parent = undefined; + this.original = undefined; + this.flowNode = undefined; + } function SourceMapSource(fileName, text, skipTrivia) { this.fileName = fileName; this.text = text; @@ -17223,8 +17546,8 @@ var ts; // eslint-disable-next-line prefer-const ts.objectAllocator = { getNodeConstructor: function () { return Node; }, - getTokenConstructor: function () { return Node; }, - getIdentifierConstructor: function () { return Node; }, + getTokenConstructor: function () { return Token; }, + getIdentifierConstructor: function () { return Identifier; }, getPrivateIdentifierConstructor: function () { return Node; }, getSourceFileConstructor: function () { return Node; }, getSymbolConstructor: function () { return Symbol; }, @@ -17238,7 +17561,7 @@ var ts; ts.setObjectAllocator = setObjectAllocator; function formatStringFromArgs(text, args, baseIndex) { if (baseIndex === void 0) { baseIndex = 0; } - return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.assertDefined(args[+index + baseIndex]); }); + return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.checkDefined(args[+index + baseIndex]); }); } ts.formatStringFromArgs = formatStringFromArgs; /* @internal */ @@ -18235,6 +18558,34 @@ var ts; return (negative && base10Value !== "0" ? "-" : "") + base10Value; } ts.pseudoBigIntToString = pseudoBigIntToString; + function isValidTypeOnlyAliasUseSite(useSite) { + return !!(useSite.flags & 8388608 /* Ambient */) + || isPartOfTypeQuery(useSite) + || isFirstIdentifierOfNonEmittingHeritageClause(useSite) + || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) + || !isExpressionNode(useSite); + } + ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite; + function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { + while (node.kind === 75 /* Identifier */ || node.kind === 194 /* PropertyAccessExpression */) { + node = node.parent; + } + if (node.kind !== 154 /* ComputedPropertyName */) { + return false; + } + if (hasModifier(node.parent, 128 /* Abstract */)) { + return true; + } + var containerKind = node.parent.parent.kind; + return containerKind === 246 /* InterfaceDeclaration */ || containerKind === 173 /* TypeLiteral */; + } + /** Returns true for the first identifier of 1) an `implements` clause, and 2) an `extends` clause of an interface. */ + function isFirstIdentifierOfNonEmittingHeritageClause(node) { + var _a, _b; + // Number of parents to climb from identifier is 2 for `implements I`, 3 for `implements x.I` + var heritageClause = (_a = ts.tryCast(node.parent.parent, ts.isHeritageClause)) !== null && _a !== void 0 ? _a : ts.tryCast((_b = node.parent.parent) === null || _b === void 0 ? void 0 : _b.parent, ts.isHeritageClause); + return (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.token) === 113 /* ImplementsKeyword */ || (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.parent.kind) === 246 /* InterfaceDeclaration */; + } })(ts || (ts = {})); var ts; (function (ts) { @@ -18663,7 +19014,7 @@ var ts; return visitNode(cbNode, node.expression); case 264 /* MissingDeclaration */: return visitNodes(cbNode, cbNodes, node.decorators); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return visitNodes(cbNode, cbNodes, node.elements); case 266 /* JsxElement */: return visitNode(cbNode, node.openingElement) || @@ -18703,24 +19054,27 @@ var ts; visitNode(cbNode, node.type); case 303 /* JSDocComment */: return visitNodes(cbNode, cbNodes, node.tags); - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return visitNode(cbNode, node.tagName) || (node.isNameFirst ? visitNode(cbNode, node.name) || visitNode(cbNode, node.typeExpression) : visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name)); - case 308 /* JSDocAuthorTag */: + case 309 /* JSDocAuthorTag */: return visitNode(cbNode, node.tagName); + case 308 /* JSDocImplementsTag */: + return visitNode(cbNode, node.tagName) || + visitNode(cbNode, node.class); case 307 /* JSDocAugmentsTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.class); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters); - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return visitNode(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 294 /* JSDocTypeExpression */ @@ -18728,14 +19082,14 @@ var ts; visitNode(cbNode, node.fullName) : visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression)); - case 314 /* JSDocCallbackTag */: + case 315 /* JSDocCallbackTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression); - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 318 /* JSDocThisTag */: - case 315 /* JSDocEnumTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 319 /* JSDocThisTag */: + case 316 /* JSDocEnumTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.typeExpression); case 305 /* JSDocSignature */: @@ -18745,17 +19099,85 @@ var ts; case 304 /* JSDocTypeLiteral */: return ts.forEach(node.jsDocPropertyTags, cbNode); case 306 /* JSDocTag */: - case 309 /* JSDocClassTag */: - case 310 /* JSDocPublicTag */: - case 311 /* JSDocPrivateTag */: - case 312 /* JSDocProtectedTag */: - case 313 /* JSDocReadonlyTag */: + case 310 /* JSDocClassTag */: + case 311 /* JSDocPublicTag */: + case 312 /* JSDocPrivateTag */: + case 313 /* JSDocProtectedTag */: + case 314 /* JSDocReadonlyTag */: return visitNode(cbNode, node.tagName); - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return visitNode(cbNode, node.expression); } } ts.forEachChild = forEachChild; + /** @internal */ + /** + * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes + * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; additionally, + * unlike `forEachChild`, embedded arrays are flattened and the 'cbNode' callback is invoked for each element. + * If a callback returns a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. + * + * @param node a given node to visit its children + * @param cbNode a callback to be invoked for all child nodes + * @param cbNodes a callback to be invoked for embedded array + * + * @remarks Unlike `forEachChild`, `forEachChildRecursively` handles recursively invoking the traversal on each child node found, + * and while doing so, handles traversing the structure without relying on the callstack to encode the tree structure. + */ + function forEachChildRecursively(rootNode, cbNode, cbNodes) { + var stack = [rootNode]; + while (stack.length) { + var parent = stack.pop(); + var res = visitAllPossibleChildren(parent, gatherPossibleChildren(parent)); + if (res) { + return res; + } + } + return; + function gatherPossibleChildren(node) { + var children = []; + forEachChild(node, addWorkItem, addWorkItem); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal + return children; + function addWorkItem(n) { + children.unshift(n); + } + } + function visitAllPossibleChildren(parent, children) { + for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { + var child = children_1[_i]; + if (ts.isArray(child)) { + if (cbNodes) { + var res = cbNodes(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + for (var i = child.length - 1; i >= 0; i--) { + var realChild = child[i]; + var res = cbNode(realChild, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + stack.push(realChild); + } + } + else { + stack.push(child); + var res = cbNode(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + } + } + } + ts.forEachChildRecursively = forEachChildRecursively; function createSourceFile(fileName, sourceText, languageVersion, setParentNodes, scriptKind) { if (setParentNodes === void 0) { setParentNodes = false; } ts.performance.mark("beforeParse"); @@ -19106,27 +19528,15 @@ var ts; // a syntax tree, and no semantic features, then the binding process is an unnecessary // overhead. This functions allows us to set all the parents, without all the expense of // binding. - var parent = rootNode; - forEachChild(rootNode, visitNode); - return; - function visitNode(n) { - // walk down setting parents that differ from the parent we think it should be. This - // allows us to quickly bail out of setting parents for subtrees during incremental - // parsing - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; - forEachChild(n, visitNode); - if (ts.hasJSDocNodes(n)) { - for (var _i = 0, _a = n.jsDoc; _i < _a.length; _i++) { - var jsDoc = _a[_i]; - jsDoc.parent = n; - parent = jsDoc; - forEachChild(jsDoc, visitNode); - } + forEachChildRecursively(rootNode, bindParentToChild); + function bindParentToChild(child, parent) { + child.parent = parent; + if (ts.hasJSDocNodes(child)) { + for (var _i = 0, _a = child.jsDoc; _i < _a.length; _i++) { + var doc = _a[_i]; + bindParentToChild(doc, child); + forEachChildRecursively(doc, bindParentToChild); } - parent = saveParent; } } } @@ -19297,8 +19707,11 @@ var ts; function reScanSlashToken() { return currentToken = scanner.reScanSlashToken(); } - function reScanTemplateToken() { - return currentToken = scanner.reScanTemplateToken(); + function reScanTemplateToken(isTaggedTemplate) { + return currentToken = scanner.reScanTemplateToken(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + return currentToken = scanner.reScanTemplateHeadOrNoSubstitutionTemplate(); } function reScanLessThanToken() { return currentToken = scanner.reScanLessThanToken(); @@ -19518,7 +19931,7 @@ var ts; // An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues // with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for // each identifier in order to reduce memory consumption. - function createIdentifier(isIdentifier, diagnosticMessage) { + function createIdentifier(isIdentifier, diagnosticMessage, privateIdentifierDiagnosticMessage) { identifierCount++; if (isIdentifier) { var node = createNode(75 /* Identifier */); @@ -19530,6 +19943,10 @@ var ts; nextTokenWithoutCheck(); return finishNode(node); } + if (token() === 76 /* PrivateIdentifier */) { + parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + return createIdentifier(/*isIdentifier*/ true); + } // Only for end of file because the error gets reported incorrectly on embedded script tags. var reportAtCurrentPosition = token() === 1 /* EndOfFileToken */; var isReservedWord = scanner.isReservedWord(); @@ -19539,8 +19956,8 @@ var ts; ts.Diagnostics.Identifier_expected; return createMissingNode(75 /* Identifier */, reportAtCurrentPosition, diagnosticMessage || defaultMessage, msgArg); } - function parseIdentifier(diagnosticMessage) { - return createIdentifier(isIdentifier(), diagnosticMessage); + function parseIdentifier(diagnosticMessage, privateIdentifierDiagnosticMessage) { + return createIdentifier(isIdentifier(), diagnosticMessage, privateIdentifierDiagnosticMessage); } function parseIdentifierName(diagnosticMessage) { return createIdentifier(ts.tokenIsIdentifierOrKeyword(token()), diagnosticMessage); @@ -19716,9 +20133,9 @@ var ts; return isIdentifier() && !isHeritageClauseExtendsOrImplementsKeyword(); } case 8 /* VariableDeclarations */: - return isIdentifierOrPattern(); + return isIdentifierOrPrivateIdentifierOrPattern(); case 10 /* ArrayBindingElements */: - return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isIdentifierOrPattern(); + return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isIdentifierOrPrivateIdentifierOrPattern(); case 19 /* TypeParameters */: return isIdentifier(); case 15 /* ArrayLiteralMembers */: @@ -20314,24 +20731,24 @@ var ts; } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } - function parseTemplateExpression() { + function parseTemplateExpression(isTaggedTemplate) { var template = createNode(211 /* TemplateExpression */); - template.head = parseTemplateHead(); + template.head = parseTemplateHead(isTaggedTemplate); ts.Debug.assert(template.head.kind === 15 /* TemplateHead */, "Template head has wrong token kind"); var list = []; var listPos = getNodePos(); do { - list.push(parseTemplateSpan()); + list.push(parseTemplateSpan(isTaggedTemplate)); } while (ts.last(list).literal.kind === 16 /* TemplateMiddle */); template.templateSpans = createNodeArray(list, listPos); return finishNode(template); } - function parseTemplateSpan() { + function parseTemplateSpan(isTaggedTemplate) { var span = createNode(221 /* TemplateSpan */); span.expression = allowInAnd(parseExpression); var literal; if (token() === 19 /* CloseBraceToken */) { - reScanTemplateToken(); + reScanTemplateToken(isTaggedTemplate); literal = parseTemplateMiddleOrTemplateTail(); } else { @@ -20343,7 +20760,10 @@ var ts; function parseLiteralNode() { return parseLiteralLikeNode(token()); } - function parseTemplateHead() { + function parseTemplateHead(isTaggedTemplate) { + if (isTaggedTemplate) { + reScanTemplateHeadOrNoSubstitutionTemplate(); + } var fragment = parseLiteralLikeNode(token()); ts.Debug.assert(fragment.kind === 15 /* TemplateHead */, "Template head has wrong token kind"); return fragment; @@ -20381,6 +20801,9 @@ var ts; if (node.kind === 8 /* NumericLiteral */) { node.numericLiteralFlags = scanner.getTokenFlags() & 1008 /* NumericLiteralFlags */; } + if (ts.isTemplateLiteralKind(node.kind)) { + node.templateFlags = scanner.getTokenFlags() & 2048 /* ContainsInvalidEscape */; + } nextToken(); finishNode(node); return node; @@ -20564,7 +20987,7 @@ var ts; } function isStartOfParameter(isJSDocParameter) { return token() === 25 /* DotDotDotToken */ || - isIdentifierOrPattern() || + isIdentifierOrPrivateIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 59 /* AtToken */ || isStartOfType(/*inStartOfParameter*/ !isJSDocParameter); @@ -20581,7 +21004,7 @@ var ts; node.dotDotDotToken = parseOptionalToken(25 /* DotDotDotToken */); // FormalParameter [Yield,Await]: // BindingElement[?Yield,?Await] - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_cannot_be_used_as_parameters); if (ts.getFullWidth(node.name) === 0 && !node.modifiers && ts.isModifierKind(token())) { // in cases like // 'use strict' @@ -21318,6 +21741,7 @@ var ts; case 29 /* LessThanToken */: case 127 /* AwaitKeyword */: case 121 /* YieldKeyword */: + case 76 /* PrivateIdentifier */: // Yield/await always starts an expression. Either it is an identifier (in which case // it is definitely an expression). Or it's a keyword (either because we're in // a generator or async function, or in strict mode (or both)) and it started a yield or await expression. @@ -22501,8 +22925,8 @@ var ts; tagExpression.questionDotToken = questionDotToken; tagExpression.typeArguments = typeArguments; tagExpression.template = token() === 14 /* NoSubstitutionTemplateLiteral */ - ? parseLiteralNode() - : parseTemplateExpression(); + ? (reScanTemplateHeadOrNoSubstitutionTemplate(), parseLiteralNode()) + : parseTemplateExpression(/*isTaggedTemplate*/ true); if (questionDotToken || tag.flags & 32 /* OptionalChain */) { tagExpression.flags |= 32 /* OptionalChain */; } @@ -22663,7 +23087,7 @@ var ts; } break; case 15 /* TemplateHead */: - return parseTemplateExpression(); + return parseTemplateExpression(/* isTaggedTemplate */ false); } return parseIdentifier(ts.Diagnostics.Expression_expected); } @@ -23427,24 +23851,27 @@ var ts; parseExpected(23 /* CloseBracketToken */); return finishNode(node); } - function isIdentifierOrPattern() { - return token() === 18 /* OpenBraceToken */ || token() === 22 /* OpenBracketToken */ || isIdentifier(); + function isIdentifierOrPrivateIdentifierOrPattern() { + return token() === 18 /* OpenBraceToken */ + || token() === 22 /* OpenBracketToken */ + || token() === 76 /* PrivateIdentifier */ + || isIdentifier(); } - function parseIdentifierOrPattern() { + function parseIdentifierOrPattern(privateIdentifierDiagnosticMessage) { if (token() === 22 /* OpenBracketToken */) { return parseArrayBindingPattern(); } if (token() === 18 /* OpenBraceToken */) { return parseObjectBindingPattern(); } - return parseIdentifier(); + return parseIdentifier(/*diagnosticMessage*/ undefined, privateIdentifierDiagnosticMessage); } function parseVariableDeclarationAllowExclamation() { return parseVariableDeclaration(/*allowExclamation*/ true); } function parseVariableDeclaration(allowExclamation) { var node = createNode(242 /* VariableDeclaration */); - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_are_not_allowed_in_variable_declarations); if (allowExclamation && node.name.kind === 75 /* Identifier */ && token() === 53 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) { node.exclamationToken = parseTokenNode(); @@ -24078,17 +24505,18 @@ var ts; } return finishNode(node); } - function parseNamespaceExport() { - var node = createNode(262 /* NamespaceExport */); + function parseNamespaceExport(pos) { + var node = createNode(262 /* NamespaceExport */, pos); node.name = parseIdentifier(); return finishNode(node); } function parseExportDeclaration(node) { node.kind = 260 /* ExportDeclaration */; node.isTypeOnly = parseOptional(145 /* TypeKeyword */); + var namespaceExportPos = scanner.getStartPos(); if (parseOptional(41 /* AsteriskToken */)) { if (parseOptional(123 /* AsKeyword */)) { - node.exportClause = parseNamespaceExport(); + node.exportClause = parseNamespaceExport(namespaceExportPos); } parseExpected(149 /* FromKeyword */); node.moduleSpecifier = parseModuleSpecifier(); @@ -24420,25 +24848,28 @@ var ts; case "author": tag = parseAuthorTag(start, tagName, margin); break; + case "implements": + tag = parseImplementsTag(start, tagName); + break; case "augments": case "extends": tag = parseAugmentsTag(start, tagName); break; case "class": case "constructor": - tag = parseSimpleTag(start, 309 /* JSDocClassTag */, tagName); + tag = parseSimpleTag(start, 310 /* JSDocClassTag */, tagName); break; case "public": - tag = parseSimpleTag(start, 310 /* JSDocPublicTag */, tagName); + tag = parseSimpleTag(start, 311 /* JSDocPublicTag */, tagName); break; case "private": - tag = parseSimpleTag(start, 311 /* JSDocPrivateTag */, tagName); + tag = parseSimpleTag(start, 312 /* JSDocPrivateTag */, tagName); break; case "protected": - tag = parseSimpleTag(start, 312 /* JSDocProtectedTag */, tagName); + tag = parseSimpleTag(start, 313 /* JSDocProtectedTag */, tagName); break; case "readonly": - tag = parseSimpleTag(start, 313 /* JSDocReadonlyTag */, tagName); + tag = parseSimpleTag(start, 314 /* JSDocReadonlyTag */, tagName); break; case "this": tag = parseThisTag(start, tagName); @@ -24490,10 +24921,12 @@ var ts; comments.push(text); indent += text.length; } - if (initialMargin) { + if (initialMargin !== undefined) { // jump straight to saving comments if there is some initial indentation - pushComment(initialMargin); - state = 2 /* SavingComments */; + if (initialMargin !== "") { + pushComment(initialMargin); + } + state = 1 /* SawAsterisk */; } var tok = token(); loop: while (true) { @@ -24621,7 +25054,7 @@ var ts; case 174 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: - return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object"; + return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; } } function parseParameterOrPropertyTag(start, tagName, target, indent) { @@ -24634,8 +25067,8 @@ var ts; typeExpression = tryParseTypeExpression(); } var result = target === 1 /* Property */ ? - createNode(322 /* JSDocPropertyTag */, start) : - createNode(316 /* JSDocParameterTag */, start); + createNode(323 /* JSDocPropertyTag */, start) : + createNode(317 /* JSDocParameterTag */, start); var comment = parseTagComments(indent + scanner.getStartPos() - start); var nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent); if (nestedTypeLiteral) { @@ -24658,7 +25091,7 @@ var ts; var start_3 = scanner.getStartPos(); var children = void 0; while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) { - if (child.kind === 316 /* JSDocParameterTag */ || child.kind === 322 /* JSDocPropertyTag */) { + if (child.kind === 317 /* JSDocParameterTag */ || child.kind === 323 /* JSDocPropertyTag */) { children = ts.append(children, child); } } @@ -24677,7 +25110,7 @@ var ts; if (ts.some(tags, ts.isJSDocReturnTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(317 /* JSDocReturnTag */, start); + var result = createNode(318 /* JSDocReturnTag */, start); result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); @@ -24686,13 +25119,13 @@ var ts; if (ts.some(tags, ts.isJSDocTypeTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(319 /* JSDocTypeTag */, start); + var result = createNode(320 /* JSDocTypeTag */, start); result.tagName = tagName; result.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); return finishNode(result); } function parseAuthorTag(start, tagName, indent) { - var result = createNode(308 /* JSDocAuthorTag */, start); + var result = createNode(309 /* JSDocAuthorTag */, start); result.tagName = tagName; var authorInfoWithEmail = tryParse(function () { return tryParseAuthorNameAndEmail(); }); if (!authorInfoWithEmail) { @@ -24745,6 +25178,12 @@ var ts; return comments.length === 0 ? undefined : comments.join(""); } } + function parseImplementsTag(start, tagName) { + var result = createNode(308 /* JSDocImplementsTag */, start); + result.tagName = tagName; + result.class = parseExpressionWithTypeArgumentsForAugments(); + return finishNode(result); + } function parseAugmentsTag(start, tagName) { var result = createNode(307 /* JSDocAugmentsTag */, start); result.tagName = tagName; @@ -24778,14 +25217,14 @@ var ts; return finishNode(tag); } function parseThisTag(start, tagName) { - var tag = createNode(318 /* JSDocThisTag */, start); + var tag = createNode(319 /* JSDocThisTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); return finishNode(tag); } function parseEnumTag(start, tagName) { - var tag = createNode(315 /* JSDocEnumTag */, start); + var tag = createNode(316 /* JSDocEnumTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); @@ -24794,7 +25233,7 @@ var ts; function parseTypedefTag(start, tagName, indent) { var typeExpression = tryParseTypeExpression(); skipWhitespaceOrAsterisk(); - var typedefTag = createNode(321 /* JSDocTypedefTag */, start); + var typedefTag = createNode(322 /* JSDocTypedefTag */, start); typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(); typedefTag.name = getJSDocTypeAliasName(typedefTag.fullName); @@ -24810,7 +25249,7 @@ var ts; if (!jsdocTypeLiteral) { jsdocTypeLiteral = createNode(304 /* JSDocTypeLiteral */, start); } - if (child.kind === 319 /* JSDocTypeTag */) { + if (child.kind === 320 /* JSDocTypeTag */) { if (childTypeTag) { break; } @@ -24856,7 +25295,7 @@ var ts; return typeNameOrNamespaceName; } function parseCallbackTag(start, tagName, indent) { - var callbackTag = createNode(314 /* JSDocCallbackTag */, start); + var callbackTag = createNode(315 /* JSDocCallbackTag */, start); callbackTag.tagName = tagName; callbackTag.fullName = parseJSDocTypeNameWithNamespace(); callbackTag.name = getJSDocTypeAliasName(callbackTag.fullName); @@ -24871,7 +25310,7 @@ var ts; var returnTag = tryParse(function () { if (parseOptionalJsdoc(59 /* AtToken */)) { var tag = parseTag(indent); - if (tag && tag.kind === 317 /* JSDocReturnTag */) { + if (tag && tag.kind === 318 /* JSDocReturnTag */) { return tag; } } @@ -24916,7 +25355,7 @@ var ts; case 59 /* AtToken */: if (canParseTag) { var child = tryParseChildTag(target, indent); - if (child && (child.kind === 316 /* JSDocParameterTag */ || child.kind === 322 /* JSDocPropertyTag */) && + if (child && (child.kind === 317 /* JSDocParameterTag */ || child.kind === 323 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; @@ -24983,10 +25422,10 @@ var ts; var typeParameter = createNode(155 /* TypeParameter */); typeParameter.name = parseJSDocIdentifierName(ts.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces); finishNode(typeParameter); - skipWhitespace(); + skipWhitespaceOrAsterisk(); typeParameters.push(typeParameter); } while (parseOptionalJsdoc(27 /* CommaToken */)); - var result = createNode(320 /* JSDocTemplateTag */, start); + var result = createNode(321 /* JSDocTemplateTag */, start); result.tagName = tagName; result.constraint = constraint; result.typeParameters = createNodeArray(typeParameters, typeParametersPos); @@ -26542,6 +26981,7 @@ var ts; { name: "noErrorTruncation", type: "boolean", + affectsSemanticDiagnostics: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Do_not_truncate_error_messages }, @@ -26671,6 +27111,7 @@ var ts; { name: "forceConsistentCasingInFileNames", type: "boolean", + affectsModuleResolution: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file }, @@ -26872,6 +27313,7 @@ var ts; createDiagnostics(diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnostics(diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption); } + /*@internal*/ function parseCommandLineWorker(diagnostics, commandLine, readFile) { var options = {}; var watchOptions; @@ -26948,50 +27390,78 @@ var ts; parseStrings(args); } } + ts.parseCommandLineWorker = parseCommandLineWorker; function parseOptionValue(args, i, diagnostics, opt, options, errors) { if (opt.isTSConfigOnly) { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name)); + var optValue = args[i]; + if (optValue === "null") { + options[opt.name] = undefined; + i++; + } + else if (opt.type === "boolean") { + if (optValue === "false") { + options[opt.name] = false; + i++; + } + else { + if (optValue === "true") + i++; + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, opt.name)); + } + } + else { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, opt.name)); + if (optValue && !ts.startsWith(optValue, "-")) + i++; + } } else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). if (!args[i] && opt.type !== "boolean") { errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name, getCompilerOptionValueTypeString(opt))); } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i]); - i++; - break; - case "boolean": - // boolean flag has optional value true, false, others - var optValue = args[i]; - options[opt.name] = optValue !== "false"; - // consume next argument as boolean flag value - if (optValue === "false" || optValue === "true") { + if (args[i] !== "null") { + switch (opt.type) { + case "number": + options[opt.name] = parseInt(args[i]); i++; - } - break; - case "string": - options[opt.name] = args[i] || ""; - i++; - break; - case "list": - var result = parseListTypeOption(opt, args[i], errors); - options[opt.name] = result || []; - if (result) { + break; + case "boolean": + // boolean flag has optional value true, false, others + var optValue = args[i]; + options[opt.name] = optValue !== "false"; + // consume next argument as boolean flag value + if (optValue === "false" || optValue === "true") { + i++; + } + break; + case "string": + options[opt.name] = args[i] || ""; i++; - } - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - options[opt.name] = parseCustomTypeOption(opt, args[i], errors); - i++; - break; + break; + case "list": + var result = parseListTypeOption(opt, args[i], errors); + options[opt.name] = result || []; + if (result) { + i++; + } + break; + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + options[opt.name] = parseCustomTypeOption(opt, args[i], errors); + i++; + break; + } + } + else { + options[opt.name] = undefined; + i++; } } return i; } - var compilerOptionsDidYouMeanDiagnostics = { + /*@internal*/ + ts.compilerOptionsDidYouMeanDiagnostics = { getOptionsNameMap: getOptionsNameMap, optionDeclarations: ts.optionDeclarations, unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, @@ -26999,7 +27469,7 @@ var ts; optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); + return parseCommandLineWorker(ts.compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; /** @internal */ @@ -27176,7 +27646,7 @@ var ts; name: "compilerOptions", type: "object", elementOptions: getCommandLineCompilerOptionsMap(), - extraKeyDiagnostics: compilerOptionsDidYouMeanDiagnostics, + extraKeyDiagnostics: ts.compilerOptionsDidYouMeanDiagnostics, }, { name: "watchOptions", @@ -27654,7 +28124,7 @@ var ts; } ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { - if (option) { + if (option && !isNullOrUndefined(value)) { if (option.type === "list") { var values = value; if (option.element.isFilePath && values.length) { @@ -28005,7 +28475,7 @@ var ts; } function getExtendedConfig(sourceFile, extendedConfigPath, host, basePath, resolutionStack, errors, extendedConfigCache) { var _a; - var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toLowerCase(extendedConfigPath); + var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toFileNameLowerCase(extendedConfigPath); var value; var extendedResult; var extendedConfig; @@ -28075,7 +28545,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, compilerOptionsDidYouMeanDiagnostics, errors); + convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, ts.compilerOptionsDidYouMeanDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -28262,7 +28732,7 @@ var ts; function getFileNamesFromConfigSpecs(spec, basePath, options, host, extraFileExtensions) { if (extraFileExtensions === void 0) { extraFileExtensions = []; } basePath = ts.normalizePath(basePath); - var keyMapper = host.useCaseSensitiveFileNames ? ts.identity : ts.toLowerCase; + var keyMapper = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); // Literal file names (provided via the "files" array in tsconfig.json) are stored in a // file map with a possibly case insensitive key. We use this map later when when including // wildcard paths. @@ -28421,7 +28891,7 @@ var ts; var match = wildcardDirectoryPattern.exec(spec); if (match) { return { - key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(), + key: useCaseSensitiveFileNames ? match[0] : ts.toFileNameLowerCase(match[0]), flags: watchRecursivePattern.test(spec) ? 1 /* Recursive */ : 0 /* None */ }; } @@ -30141,7 +30611,7 @@ var ts; } } function getDisplayName(node) { - return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.assertDefined(getDeclarationName(node))); + return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.checkDefined(getDeclarationName(node))); } /** * Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. @@ -30542,9 +31012,9 @@ var ts; case 196 /* CallExpression */: bindCallExpressionFlow(node); break; - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime @@ -30651,9 +31121,12 @@ var ts; function createLoopLabel() { return initFlowNode({ flags: 8 /* LoopLabel */, antecedents: undefined }); } + function createReduceLabel(target, antecedents, antecedent) { + return initFlowNode({ flags: 1024 /* ReduceLabel */, target: target, antecedents: antecedents, antecedent: antecedent }); + } function setFlowNodeReferenced(flow) { // On first reference we set the Referenced flag, thereafter we set the Shared flag - flow.flags |= flow.flags & 1024 /* Referenced */ ? 2048 /* Shared */ : 1024 /* Referenced */; + flow.flags |= flow.flags & 2048 /* Referenced */ ? 4096 /* Shared */ : 2048 /* Referenced */; } function addAntecedent(label, antecedent) { if (!(antecedent.flags & 1 /* Unreachable */) && !ts.contains(label.antecedents, antecedent)) { @@ -30884,35 +31357,36 @@ var ts; } } function bindTryStatement(node) { - var preFinallyLabel = createBranchLabel(); // We conservatively assume that *any* code in the try block can cause an exception, but we only need // to track code that causes mutations (because only mutations widen the possible control flow type of - // a variable). The currentExceptionTarget is the target label for control flows that result from - // exceptions. We add all mutation flow nodes as antecedents of this label such that we can analyze them - // as possible antecedents of the start of catch or finally blocks. Furthermore, we add the current - // control flow to represent exceptions that occur before any mutations. + // a variable). The exceptionLabel is the target label for control flows that result from exceptions. + // We add all mutation flow nodes as antecedents of this label such that we can analyze them as possible + // antecedents of the start of catch or finally blocks. Furthermore, we add the current control flow to + // represent exceptions that occur before any mutations. var saveReturnTarget = currentReturnTarget; var saveExceptionTarget = currentExceptionTarget; - currentReturnTarget = createBranchLabel(); - currentExceptionTarget = node.catchClause ? createBranchLabel() : currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + var normalExitLabel = createBranchLabel(); + var returnLabel = createBranchLabel(); + var exceptionLabel = createBranchLabel(); + if (node.finallyBlock) { + currentReturnTarget = returnLabel; + } + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.tryBlock); - addAntecedent(preFinallyLabel, currentFlow); - var flowAfterTry = currentFlow; - var flowAfterCatch = unreachableFlow; + addAntecedent(normalExitLabel, currentFlow); if (node.catchClause) { // Start of catch clause is the target of exceptions from try block. - currentFlow = finishFlowLabel(currentExceptionTarget); + currentFlow = finishFlowLabel(exceptionLabel); // The currentExceptionTarget now represents control flows from exceptions in the catch clause. // Effectively, in a try-catch-finally, if an exception occurs in the try block, the catch block // acts like a second try block. - currentExceptionTarget = currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + exceptionLabel = createBranchLabel(); + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.catchClause); - addAntecedent(preFinallyLabel, currentFlow); - flowAfterCatch = currentFlow; + addAntecedent(normalExitLabel, currentFlow); } - var exceptionTarget = finishFlowLabel(currentExceptionTarget); currentReturnTarget = saveReturnTarget; currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { @@ -30925,35 +31399,33 @@ var ts; // When analyzing a control flow graph that starts inside a finally block we want to consider all // five possibilities above. However, when analyzing a control flow graph that starts outside (past) // the finally block, we only want to consider the first two (if we're past a finally block then it - // must have completed normally). To make this possible, we inject two extra nodes into the control - // flow graph: An after-finally with an antecedent of the control flow at the end of the finally - // block, and a pre-finally with an antecedent that represents all exceptional control flows. The - // 'lock' property of the pre-finally references the after-finally, and the after-finally has a - // boolean 'locked' property that we set to true when analyzing a control flow that contained the - // the after-finally node. When the lock associated with a pre-finally is locked, the antecedent of - // the pre-finally (i.e. the exceptional control flows) are skipped. - var preFinallyFlow = initFlowNode({ flags: 4096 /* PreFinally */, antecedent: exceptionTarget, lock: {} }); - addAntecedent(preFinallyLabel, preFinallyFlow); - currentFlow = finishFlowLabel(preFinallyLabel); + // must have completed normally). Likewise, when analyzing a control flow graph from return statements + // in try or catch blocks in an IIFE, we only want to consider the third. To make this possible, we + // inject a ReduceLabel node into the control flow graph. This node contains an alternate reduced + // set of antecedents for the pre-finally label. As control flow analysis passes by a ReduceLabel + // node, the pre-finally label is temporarily switched to the reduced antecedent set. + var finallyLabel = createBranchLabel(); + finallyLabel.antecedents = ts.concatenate(ts.concatenate(normalExitLabel.antecedents, exceptionLabel.antecedents), returnLabel.antecedents); + currentFlow = finallyLabel; bind(node.finallyBlock); - // If the end of the finally block is reachable, but the end of the try and catch blocks are not, - // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should - // result in an unreachable current control flow. - if (!(currentFlow.flags & 1 /* Unreachable */)) { - if ((flowAfterTry.flags & 1 /* Unreachable */) && (flowAfterCatch.flags & 1 /* Unreachable */)) { - currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow - ? reportedUnreachableFlow - : unreachableFlow; - } + if (currentFlow.flags & 1 /* Unreachable */) { + // If the end of the finally block is unreachable, the end of the entire try statement is unreachable. + currentFlow = unreachableFlow; } - if (!(currentFlow.flags & 1 /* Unreachable */)) { - var afterFinallyFlow = initFlowNode({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); - preFinallyFlow.lock = afterFinallyFlow; - currentFlow = afterFinallyFlow; + else { + // If we have an IIFE return target and return statements in the try or catch blocks, add a control + // flow that goes back through the finally block and back through only the return statements. + if (currentReturnTarget && returnLabel.antecedents) { + addAntecedent(currentReturnTarget, createReduceLabel(finallyLabel, returnLabel.antecedents, currentFlow)); + } + // If the end of the finally block is reachable, but the end of the try and catch blocks are not, + // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should + // result in an unreachable current control flow. + currentFlow = normalExitLabel.antecedents ? createReduceLabel(finallyLabel, normalExitLabel.antecedents, currentFlow) : unreachableFlow; } } else { - currentFlow = finishFlowLabel(preFinallyLabel); + currentFlow = finishFlowLabel(normalExitLabel); } } function bindSwitchStatement(node) { @@ -31111,28 +31583,145 @@ var ts; bindAssignmentTargetFlow(node.operand); } } + var BindBinaryExpressionFlowState; + (function (BindBinaryExpressionFlowState) { + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindThenBindChildren"] = 0] = "BindThenBindChildren"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["MaybeBindLeft"] = 1] = "MaybeBindLeft"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindToken"] = 2] = "BindToken"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindRight"] = 3] = "BindRight"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["FinishBind"] = 4] = "FinishBind"; + })(BindBinaryExpressionFlowState || (BindBinaryExpressionFlowState = {})); function bindBinaryExpressionFlow(node) { - var operator = node.operatorToken.kind; - if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { - if (isTopLevelLogicalExpression(node)) { - var postExpressionLabel = createBranchLabel(); - bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); - currentFlow = finishFlowLabel(postExpressionLabel); + var workStacks = { + expr: [node], + state: [1 /* MaybeBindLeft */], + inStrictMode: [undefined], + parent: [undefined], + subtreeFlags: [undefined] + }; + var stackIndex = 0; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0 /* BindThenBindChildren */: { + // This state is used only when recuring, to emulate the work that `bind` does before + // reaching `bindChildren`. A normal call to `bindBinaryExpressionFlow` will already have done this work. + node.parent = parent; + var saveInStrictMode = inStrictMode; + bindWorker(node); + var saveParent = parent; + parent = node; + var subtreeFlagsState = void 0; + // While this next part does the work of `bindChildren` before it descends into `bindChildrenWorker` + // and uses `subtreeFlagsState` to queue up the work that needs to be done once the node is bound. + if (skipTransformFlagAggregation) { + // do nothing extra + } + else if (node.transformFlags & 536870912 /* HasComputedFlags */) { + skipTransformFlagAggregation = true; + subtreeFlagsState = -1; + } + else { + var savedSubtreeTransformFlags = subtreeTransformFlags; + subtreeTransformFlags = 0; + subtreeFlagsState = savedSubtreeTransformFlags; + } + advanceState(1 /* MaybeBindLeft */, saveInStrictMode, saveParent, subtreeFlagsState); + break; + } + case 1 /* MaybeBindLeft */: { + var operator = node.operatorToken.kind; + // TODO: bindLogicalExpression is recursive - if we want to handle deeply nested `&&` expressions + // we'll need to handle the `bindLogicalExpression` scenarios in this state machine, too + // For now, though, since the common cases are chained `+`, leaving it recursive is fine + if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { + if (isTopLevelLogicalExpression(node)) { + var postExpressionLabel = createBranchLabel(); + bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); + currentFlow = finishFlowLabel(postExpressionLabel); + } + else { + bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + completeNode(); + } + else { + advanceState(2 /* BindToken */); + maybeBind(node.left); + } + break; + } + case 2 /* BindToken */: { + advanceState(3 /* BindRight */); + maybeBind(node.operatorToken); + break; + } + case 3 /* BindRight */: { + advanceState(4 /* FinishBind */); + maybeBind(node.right); + break; + } + case 4 /* FinishBind */: { + var operator = node.operatorToken.kind; + if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { + bindAssignmentTargetFlow(node.left); + if (operator === 62 /* EqualsToken */ && node.left.kind === 195 /* ElementAccessExpression */) { + var elementAccess = node.left; + if (isNarrowableOperand(elementAccess.expression)) { + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); + } + } + } + completeNode(); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for bindBinaryExpressionFlow"); } - else { - bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + /** + * Note that `advanceState` sets the _current_ head state, and that `maybeBind` potentially pushes on a new + * head state; so `advanceState` must be called before any `maybeBind` during a state's execution. + */ + function advanceState(state, isInStrictMode, parent, subtreeFlags) { + workStacks.state[stackIndex] = state; + if (isInStrictMode !== undefined) { + workStacks.inStrictMode[stackIndex] = isInStrictMode; + } + if (parent !== undefined) { + workStacks.parent[stackIndex] = parent; + } + if (subtreeFlags !== undefined) { + workStacks.subtreeFlags[stackIndex] = subtreeFlags; } } - else { - bindEachChild(node); - if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { - bindAssignmentTargetFlow(node.left); - if (operator === 62 /* EqualsToken */ && node.left.kind === 195 /* ElementAccessExpression */) { - var elementAccess = node.left; - if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); - } + function completeNode() { + if (workStacks.inStrictMode[stackIndex] !== undefined) { + if (workStacks.subtreeFlags[stackIndex] === -1) { + skipTransformFlagAggregation = false; + subtreeTransformFlags |= node.transformFlags & ~getTransformFlagsSubtreeExclusions(node.kind); } + else if (workStacks.subtreeFlags[stackIndex] !== undefined) { + subtreeTransformFlags = workStacks.subtreeFlags[stackIndex] | computeTransformFlagsForNode(node, subtreeTransformFlags); + } + inStrictMode = workStacks.inStrictMode[stackIndex]; + parent = workStacks.parent[stackIndex]; + } + stackIndex--; + } + /** + * If `node` is a BinaryExpression, adds it to the local work stack, otherwise recursively binds it + */ + function maybeBind(node) { + if (node && ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0 /* BindThenBindChildren */; + workStacks.inStrictMode[stackIndex] = undefined; + workStacks.parent[stackIndex] = undefined; + workStacks.subtreeFlags[stackIndex] = undefined; + } + else { + bind(node); } } } @@ -31177,7 +31766,7 @@ var ts; } function bindJSDocTypeAlias(node) { node.tagName.parent = node; - if (node.kind !== 315 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 316 /* JSDocEnumTag */ && node.fullName) { setParentPointers(node, node.fullName); } } @@ -31393,8 +31982,8 @@ var ts; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 300 /* JSDocFunctionType */: - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: case 247 /* TypeAliasDeclaration */: case 186 /* MappedType */: // All the children of these container types are never visible through another @@ -31599,7 +32188,9 @@ var ts; container = declName.parent.expression.name; break; case 5 /* Property */: - container = ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression; + container = isExportsOrModuleExportsOrAlias(file, declName.parent.expression) ? file + : ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name + : declName.parent.expression; break; case 0 /* None */: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); @@ -32014,7 +32605,7 @@ var ts; case 304 /* JSDocTypeLiteral */: case 186 /* MappedType */: return bindAnonymousTypeWorker(node); - case 309 /* JSDocClassTag */: + case 310 /* JSDocClassTag */: return bindJSDocClassTag(node); case 193 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); @@ -32082,7 +32673,7 @@ var ts; // falls through case 250 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: if (node.parent.kind === 305 /* JSDocSignature */) { return bindParameter(node); } @@ -32090,15 +32681,15 @@ var ts; break; } // falls through - case 322 /* JSDocPropertyTag */: + case 323 /* JSDocPropertyTag */: var propTag = node; var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 299 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -32170,6 +32761,9 @@ var ts; declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* ExportStar */, 0 /* None */); } else if (ts.isNamespaceExport(node.exportClause)) { + // declareSymbol walks up parents to find name text, parent _must_ be set + // but won't be set by the normal binder walk until `bindChildren` later on. + node.exportClause.parent = node; declareSymbol(container.symbol.exports, container.symbol, node.exportClause, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } } @@ -32605,7 +33199,7 @@ var ts; } } function bindParameter(node) { - if (node.kind === 316 /* JSDocParameterTag */ && container.kind !== 305 /* JSDocSignature */) { + if (node.kind === 317 /* JSDocParameterTag */ && container.kind !== 305 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 8388608 /* Ambient */)) { @@ -33322,7 +33916,7 @@ var ts; break; case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: // These nodes are TypeScript syntax. transformFlags |= 1 /* AssertTypeScript */; excludeFlags = 536870912 /* OuterExpressionExcludes */; @@ -33359,8 +33953,18 @@ var ts; case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: case 17 /* TemplateTail */: - case 211 /* TemplateExpression */: + if (node.templateFlags) { + transformFlags |= 32 /* AssertES2018 */; + break; + } + // falls through case 198 /* TaggedTemplateExpression */: + if (ts.hasInvalidEscape(node.template)) { + transformFlags |= 32 /* AssertES2018 */; + break; + } + // falls through + case 211 /* TemplateExpression */: case 282 /* ShorthandPropertyAssignment */: case 120 /* StaticKeyword */: case 219 /* MetaProperty */: @@ -33587,7 +34191,7 @@ var ts; return 536879104 /* BindingPatternExcludes */; case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: case 200 /* ParenthesizedExpression */: case 102 /* SuperKeyword */: return 536870912 /* OuterExpressionExcludes */; @@ -33921,8 +34525,7 @@ var ts; TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType"; TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; - TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; - TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 7] = "ResolvedTypeArguments"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 6] = "ResolvedTypeArguments"; })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); var CheckMode; (function (CheckMode) { @@ -34049,6 +34652,7 @@ var ts; var typeCount = 0; var symbolCount = 0; var enumCount = 0; + var totalInstantiationCount = 0; var instantiationCount = 0; var instantiationDepth = 0; var constraintDepth = 0; @@ -34091,6 +34695,7 @@ var ts; getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount") + symbolCount; }, getTypeCount: function () { return typeCount; }, + getInstantiationCount: function () { return totalInstantiationCount; }, getRelationCacheSizes: function () { return ({ assignable: assignableRelation.size, identity: identityRelation.size, @@ -34158,7 +34763,8 @@ var ts; }, getSymbolAtLocation: function (node) { node = ts.getParseTreeNode(node); - return node ? getSymbolAtLocation(node) : undefined; + // set ignoreErrors: true because any lookups invoked by the API shouldn't cause any new errors + return node ? getSymbolAtLocation(node, /*ignoreErrors*/ true) : undefined; }, getShorthandAssignmentValueSymbol: function (node) { node = ts.getParseTreeNode(node); @@ -34211,7 +34817,29 @@ var ts; getRootSymbols: getRootSymbols, getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node, contextFlags) : undefined; + if (!node) { + return undefined; + } + var containingCall = ts.findAncestor(node, ts.isCallLikeExpression); + var containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; + if (contextFlags & 4 /* Completions */ && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = true; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = undefined; + } + var result = getContextualType(node, contextFlags); + if (contextFlags & 4 /* Completions */ && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = undefined; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + } + return result; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -34451,9 +35079,9 @@ var ts; var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); var iterationTypesCache = ts.createMap(); // cache for common IterationTypes instances var noIterationTypes = { - get yieldType() { throw new Error("Not supported"); }, - get returnType() { throw new Error("Not supported"); }, - get nextType() { throw new Error("Not supported"); }, + get yieldType() { return ts.Debug.fail("Not supported"); }, + get returnType() { return ts.Debug.fail("Not supported"); }, + get nextType() { return ts.Debug.fail("Not supported"); }, }; var anyIterationTypes = createIterationTypes(anyType, anyType, anyType); var anyIterationTypesExceptNext = createIterationTypes(anyType, anyType, unknownType); @@ -34601,6 +35229,7 @@ var ts; if (jsxPragma) { var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); + ts.visitNode(file.localJsxFactory, markAsSynthetic); if (file.localJsxFactory) { return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } @@ -34611,6 +35240,7 @@ var ts; _jsxNamespace = "React"; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); + ts.visitNode(_jsxFactoryEntity, markAsSynthetic); if (_jsxFactoryEntity) { _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } @@ -34619,7 +35249,15 @@ var ts; _jsxNamespace = ts.escapeLeadingUnderscores(compilerOptions.reactNamespace); } } + if (!_jsxFactoryEntity) { + _jsxFactoryEntity = ts.createQualifiedName(ts.createIdentifier(ts.unescapeLeadingUnderscores(_jsxNamespace)), "createElement"); + } return _jsxNamespace; + function markAsSynthetic(node) { + node.pos = -1; + node.end = -1; + return ts.visitEachChild(node, markAsSynthetic, ts.nullTransformationContext); + } } function getEmitResolver(sourceFile, cancellationToken) { // Ensure we have all the type information in place for this file so that all the @@ -35008,7 +35646,14 @@ var ts; } else if (ts.isPropertyDeclaration(declaration)) { // still might be illegal if a self-referencing property initializer (eg private x = this.x) - return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage); + return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, /*stopAtAnyPropertyDeclaration*/ false); + } + else if (ts.isParameterPropertyDeclaration(declaration, declaration.parent)) { + var container_3 = ts.getEnclosingBlockScopeContainer(declaration.parent); + // foo = this.bar is illegal in esnext+useDefineForClassFields when bar is a parameter property + return !(compilerOptions.target === 99 /* ESNext */ && !!compilerOptions.useDefineForClassFields + && ts.getContainingClass(declaration) === ts.getContainingClass(usage) + && isUsedInFunctionOrInstanceProperty(usage, declaration, container_3)); } return true; } @@ -35016,6 +35661,7 @@ var ts; // 1. inside an export specifier // 2. inside a function // 3. inside an instance property initializer, a reference to a non-instance property + // (except when target: "esnext" and useDefineForClassFields: true and the reference is to a parameter property) // 4. inside a static property initializer, a reference to a static method in the same class // 5. inside a TS export= declaration (since we will move the export statement during emit to avoid TDZ) // or if usage is in a type context: @@ -35030,7 +35676,19 @@ var ts; return true; } var container = ts.getEnclosingBlockScopeContainer(declaration); - return !!(usage.flags & 4194304 /* JSDoc */) || isInTypeQuery(usage) || isUsedInFunctionOrInstanceProperty(usage, declaration, container); + if (!!(usage.flags & 4194304 /* JSDoc */) || isInTypeQuery(usage)) { + return true; + } + if (isUsedInFunctionOrInstanceProperty(usage, declaration, container)) { + if (compilerOptions.target === 99 /* ESNext */ && !!compilerOptions.useDefineForClassFields) { + return (ts.isPropertyDeclaration(declaration) || ts.isParameterPropertyDeclaration(declaration, declaration.parent)) && + !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, /*stopAtAnyPropertyDeclaration*/ true); + } + else { + return true; + } + } + return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); switch (declaration.parent.parent.kind) { @@ -35075,7 +35733,8 @@ var ts; return false; }); } - function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage) { + /** stopAtAnyPropertyDeclaration is used for detecting ES-standard class field use-before-def errors */ + function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, stopAtAnyPropertyDeclaration) { // always legal if usage is after declaration if (usage.end > declaration.end) { return false; @@ -35088,8 +35747,13 @@ var ts; } switch (node.kind) { case 202 /* ArrowFunction */: - case 159 /* PropertyDeclaration */: return true; + case 159 /* PropertyDeclaration */: + // even when stopping at any property declaration, they need to come from the same class + return stopAtAnyPropertyDeclaration && + (ts.isPropertyDeclaration(declaration) && node.parent === declaration.parent + || ts.isParameterPropertyDeclaration(declaration, declaration.parent) && node.parent === declaration.parent.parent) + ? "quit" : true; case 223 /* Block */: switch (node.parent.kind) { case 163 /* GetAccessor */: @@ -35367,9 +36031,9 @@ var ts; location = location.parent; } break; - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: // js type aliases do not resolve names from their host, so skip past it location = ts.getJSDocHost(location); break; @@ -35423,6 +36087,7 @@ var ts; !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && + !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { @@ -35447,9 +36112,10 @@ var ts; } // Perform extra checks only if error reporting was requested if (nameNotFoundMessage) { - if (propertyWithInvalidInitializer) { + if (propertyWithInvalidInitializer && !(compilerOptions.target === 99 /* ESNext */ && compilerOptions.useDefineForClassFields)) { // We have a match, but the reference occurred within a property initializer and the identifier also binds - // to a local variable in the constructor where the code will be emitted. + // to a local variable in the constructor where the code will be emitted. Note that this is actually allowed + // with ESNext+useDefineForClassFields because the scope semantics are different. var propertyName = propertyWithInvalidInitializer.name; error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), diagnosticName(nameArg)); return undefined; @@ -35493,9 +36159,27 @@ var ts; error(errorLocation, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(associatedDeclarationForContainingInitializer.name), ts.declarationNameToString(errorLocation)); } } + if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */) { + checkSymbolUsageInExpressionContext(result, name, errorLocation); + } } return result; } + function checkSymbolUsageInExpressionContext(symbol, name, useSite) { + if (!ts.isValidTypeOnlyAliasUseSite(useSite)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol); + if (typeOnlyDeclaration) { + var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type + : ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + var unescapedName = ts.unescapeLeadingUnderscores(name); + ts.addRelatedInfo(error(useSite, message, unescapedName), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, unescapedName)); + } + } + } function getIsDeferredContext(location, lastLocation) { if (location.kind !== 202 /* ArrowFunction */ && location.kind !== 201 /* FunctionExpression */) { // initializers in instance property declaration of class like entities are executed in constructor and thus deferred @@ -35628,9 +36312,19 @@ var ts; } return false; } + function isPrimitiveTypeName(name) { + return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; + } + function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 263 /* ExportSpecifier */) { + error(errorLocation, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); + return true; + } + return false; + } function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) { if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */)) { - if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") { + if (isPrimitiveTypeName(name)) { error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name)); return true; } @@ -35661,9 +36355,7 @@ var ts; if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */ & ~788968 /* Type */)) { var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 /* NamespaceModule */ & ~111551 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); if (symbol) { - error(errorLocation, ts.isTypeOnlyEnumAlias(symbol) - ? ts.Diagnostics.Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported - : ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); + error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); return true; } } @@ -35731,19 +36423,78 @@ var ts; } } function getDeclarationOfAliasSymbol(symbol) { - return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration); + return ts.find(symbol.declarations, isAliasSymbolDeclaration); + } + /** + * An alias symbol is created by one of the following declarations: + * import = ... + * import from ... + * import * as from ... + * import { x as } from ... + * export { x as } from ... + * export * as ns from ... + * export = + * export default + * module.exports = + * {} + * {name: } + */ + function isAliasSymbolDeclaration(node) { + return node.kind === 253 /* ImportEqualsDeclaration */ || + node.kind === 252 /* NamespaceExportDeclaration */ || + node.kind === 255 /* ImportClause */ && !!node.name || + node.kind === 256 /* NamespaceImport */ || + node.kind === 262 /* NamespaceExport */ || + node.kind === 258 /* ImportSpecifier */ || + node.kind === 263 /* ExportSpecifier */ || + node.kind === 259 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node) || + ts.isBinaryExpression(node) && ts.getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && ts.exportAssignmentIsAlias(node) || + ts.isPropertyAccessExpression(node) + && ts.isBinaryExpression(node.parent) + && node.parent.left === node + && node.parent.operatorToken.kind === 62 /* EqualsToken */ + && isAliasableOrJsExpression(node.parent.right) || + node.kind === 282 /* ShorthandPropertyAssignment */ || + node.kind === 281 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer); + } + function isAliasableOrJsExpression(e) { + return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { if (node.moduleReference.kind === 265 /* ExternalModuleReference */) { - return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); + var immediate = resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)); + var resolved_4 = resolveExternalModuleSymbol(immediate); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved_4, /*overwriteEmpty*/ false); + return resolved_4; } - return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); + var resolved = getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); + checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved); + return resolved; } - function resolveExportByName(moduleSymbol, name, dontResolveAlias) { + function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) { + if (markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node)); + var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type + : ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + // Non-null assertion is safe because the optionality comes from ImportClause, + // but if an ImportClause was the typeOnlyDeclaration, it had to have a `name`. + var name = ts.unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + ts.addRelatedInfo(error(node.moduleReference, message), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); + } + } + function resolveExportByName(moduleSymbol, name, sourceNode, dontResolveAlias) { var exportValue = moduleSymbol.exports.get("export=" /* ExportEquals */); - return exportValue - ? getPropertyOfType(getTypeOfSymbol(exportValue), name) - : resolveSymbol(moduleSymbol.exports.get(name), dontResolveAlias); + if (exportValue) { + return getPropertyOfType(getTypeOfSymbol(exportValue), name); + } + var exportSymbol = moduleSymbol.exports.get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(sourceNode, exportSymbol, resolved, /*overwriteEmpty*/ false); + return resolved; } function isSyntacticDefault(node) { return ((ts.isExportAssignment(node) && !node.isExportEquals) || ts.hasModifier(node, 512 /* Default */) || ts.isExportSpecifier(node)); @@ -35755,13 +36506,13 @@ var ts; // Declaration files (and ambient modules) if (!file || file.isDeclarationFile) { // Definitely cannot have a synthetic default if they have a syntactic default member specified - var defaultExportSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, /*dontResolveAlias*/ true); // Dont resolve alias because we want the immediately exported symbol's declaration + var defaultExportSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, /*sourceNode*/ undefined, /*dontResolveAlias*/ true); // Dont resolve alias because we want the immediately exported symbol's declaration if (defaultExportSymbol && ts.some(defaultExportSymbol.declarations, isSyntacticDefault)) { return false; } // It _might_ still be incorrect to assume there is no __esModule marker on the import at runtime, even if there is no `default` member // So we check a bit more, - if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias)) { + if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), /*sourceNode*/ undefined, dontResolveAlias)) { // If there is an `__esModule` specified in the declaration (meaning someone explicitly added it or wrote it in their code), // it definitely is a module and does not have a synthetic default return false; @@ -35776,7 +36527,7 @@ var ts; return hasExportAssignmentSymbol(moduleSymbol); } // JS files have a synthetic default if they do not contain ES2015+ module syntax (export = is not valid in js) _and_ do not have an __esModule marker - return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias); + return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), /*sourceNode*/ undefined, dontResolveAlias); } function getTargetOfImportClause(node, dontResolveAlias) { var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier); @@ -35786,7 +36537,7 @@ var ts; exportDefaultSymbol = moduleSymbol; } else { - exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, dontResolveAlias); + exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, node, dontResolveAlias); } var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); var hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias); @@ -35809,26 +36560,27 @@ var ts; } else if (hasSyntheticDefault) { // per emit behavior, a synthetic default overrides a "real" .default member if `__esModule` is not present - return maybeTypeOnly(resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || - resolveSymbol(moduleSymbol, dontResolveAlias)); - } - return maybeTypeOnly(exportDefaultSymbol); - } - function maybeTypeOnly(symbol) { - if (symbol && node.isTypeOnly && node.name) { - return createTypeOnlyImportOrExport(node.name, symbol); + var resolved = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, moduleSymbol, resolved, /*overwriteTypeOnly*/ false); + return resolved; } - return symbol; + markSymbolOfAliasDeclarationIfTypeOnly(node, exportDefaultSymbol, /*finalTarget*/ undefined, /*overwriteTypeOnly*/ false); + return exportDefaultSymbol; } } function getTargetOfNamespaceImport(node, dontResolveAlias) { var moduleSpecifier = node.parent.parent.moduleSpecifier; - var moduleSymbol = resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); - return moduleSymbol && node.parent.isTypeOnly ? createTypeOnlySymbol(moduleSymbol) : moduleSymbol; + var immediate = resolveExternalModuleName(node, moduleSpecifier); + var resolved = resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfNamespaceExport(node, dontResolveAlias) { var moduleSpecifier = node.parent.moduleSpecifier; - return moduleSpecifier && resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + var immediate = moduleSpecifier && resolveExternalModuleName(node, moduleSpecifier); + var resolved = moduleSpecifier && resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); + return resolved; } // This function creates a synthetic symbol that combines the value side of one symbol with the // type/namespace side of another symbol. Consider this example: @@ -35861,14 +36613,19 @@ var ts; if (valueSymbol.valueDeclaration) result.valueDeclaration = valueSymbol.valueDeclaration; if (typeSymbol.members) - result.members = typeSymbol.members; + result.members = ts.cloneMap(typeSymbol.members); if (valueSymbol.exports) - result.exports = valueSymbol.exports; + result.exports = ts.cloneMap(valueSymbol.exports); return result; } - function getExportOfModule(symbol, name, dontResolveAlias) { + function getExportOfModule(symbol, specifier, dontResolveAlias) { + var _a; if (symbol.flags & 1536 /* Module */) { - return resolveSymbol(getExportsOfSymbol(symbol).get(name), dontResolveAlias); + var name = ((_a = specifier.propertyName) !== null && _a !== void 0 ? _a : specifier.name).escapedText; + var exportSymbol = getExportsOfSymbol(symbol).get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(specifier, exportSymbol, resolved, /*overwriteEmpty*/ false); + return resolved; } } function getPropertyOfVariable(symbol, name) { @@ -35881,6 +36638,7 @@ var ts; } function getExternalModuleMember(node, specifier, dontResolveAlias) { if (dontResolveAlias === void 0) { dontResolveAlias = false; } + var _a; var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); // TODO: GH#18217 var name = specifier.propertyName || specifier.name; var suppressInteropError = name.escapedText === "default" /* Default */ && !!(compilerOptions.allowSyntheticDefaultImports || compilerOptions.esModuleInterop); @@ -35900,7 +36658,7 @@ var ts; } // if symbolFromVariable is export - get its final target symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias); - var symbolFromModule = getExportOfModule(targetSymbol, name.escapedText, dontResolveAlias); + var symbolFromModule = getExportOfModule(targetSymbol, specifier, dontResolveAlias); if (symbolFromModule === undefined && name.escapedText === "default" /* Default */) { var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); if (canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias)) { @@ -35922,11 +36680,11 @@ var ts; } } else { - if (moduleSymbol.exports && moduleSymbol.exports.has("default" /* Default */)) { + if ((_a = moduleSymbol.exports) === null || _a === void 0 ? void 0 : _a.has("default" /* Default */)) { error(name, ts.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, declarationName); } else { - error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + reportNonExportedMember(name, declarationName, moduleSymbol, moduleName); } } } @@ -35934,90 +36692,47 @@ var ts; } } } + function reportNonExportedMember(name, declarationName, moduleSymbol, moduleName) { + var _a; + var localSymbol = (_a = moduleSymbol.valueDeclaration.locals) === null || _a === void 0 ? void 0 : _a.get(name.escapedText); + var exports = moduleSymbol.exports; + if (localSymbol) { + var exportedSymbol = exports && !exports.has("export=" /* ExportEquals */) + ? ts.find(symbolsToArray(exports), function (symbol) { return !!getSymbolIfSameReference(symbol, localSymbol); }) + : undefined; + var diagnostic = exportedSymbol + ? error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) + : error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); + ts.addRelatedInfo.apply(void 0, __spreadArrays([diagnostic], ts.map(localSymbol.declarations, function (decl, index) { + return ts.createDiagnosticForNode(decl, index === 0 ? ts.Diagnostics._0_is_declared_here : ts.Diagnostics.and_here, declarationName); + }))); + } + else { + error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + } + } function getTargetOfImportSpecifier(node, dontResolveAlias) { var resolved = getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias); - if (resolved && node.parent.parent.isTypeOnly) { - return createTypeOnlyImportOrExport(node.name, resolved); - } + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); return resolved; } function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) { - return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); - } - /** - * Creates a type alias symbol with a target symbol for type-only imports and exports. - * The symbol for `A` in `export type { A }` or `export type { A } from "./mod"` has - * `TypeFlags.Alias` so that alias resolution works as usual, but once the target `A` - * has been resolved, we essentially want to pretend we have a type alias to that target. - */ - function createTypeOnlyImportOrExport(sourceNode, target) { - var _a, _b; - var symbol = createTypeOnlySymbol(target); - if (!symbol && target !== unknownSymbol) { - var identifier = ts.isExportSpecifier(sourceNode) ? sourceNode.name : sourceNode; - var nameText = ts.idText(identifier); - var diagnostic = error(identifier, ts.Diagnostics.Type_only_0_must_reference_a_type_but_1_is_a_value, ts.isExportSpecifier(sourceNode) ? "export" : "import", nameText); - var targetDeclaration = (_a = target.valueDeclaration) !== null && _a !== void 0 ? _a : (_b = target.declarations) === null || _b === void 0 ? void 0 : _b[0]; - if (targetDeclaration) { - ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(targetDeclaration, ts.Diagnostics._0_is_declared_here, nameText)); - } - } - return symbol; - } - function createTypeOnlySymbol(target) { - if (target.flags & 512 /* ValueModule */) { - return createNamespaceModuleForModule(target); - } - if (target.flags & 384 /* Enum */) { - return createNamespaceModuleForEnum(target); - } - if (!(target.flags & 111551 /* Value */)) { - return target; - } - if (target.flags & 788968 /* Type */) { - var alias = createSymbol(524288 /* TypeAlias */, target.escapedName); - alias.declarations = ts.emptyArray; - alias.immediateTarget = target; - return alias; - } - } - function createNamespaceModuleForEnum(enumSymbol) { - ts.Debug.assert(!!(enumSymbol.flags & 384 /* Enum */)); - var symbol = createSymbol(1024 /* NamespaceModule */ | 524288 /* TypeAlias */, enumSymbol.escapedName); - symbol.immediateTarget = enumSymbol; - symbol.declarations = enumSymbol.declarations; - if (enumSymbol.exports) { - symbol.exports = ts.createSymbolTable(); - enumSymbol.exports.forEach(function (exportSymbol, key) { - symbol.exports.set(key, ts.Debug.assertDefined(createTypeOnlySymbol(exportSymbol))); - }); - } - return symbol; - } - function createNamespaceModuleForModule(moduleSymbol) { - ts.Debug.assert(!!(moduleSymbol.flags & 512 /* ValueModule */)); - var filtered = createSymbol(1024 /* NamespaceModule */, moduleSymbol.escapedName); - filtered.declarations = moduleSymbol.declarations; - if (moduleSymbol.exports) { - filtered.exports = ts.createSymbolTable(); - moduleSymbol.exports.forEach(function (exportSymbol, key) { - var typeOnlyExport = createTypeOnlySymbol(exportSymbol); - if (typeOnlyExport) { - filtered.exports.set(key, typeOnlyExport); - } - }); - } - return filtered; + var resolved = resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) { - var target = node.parent.parent.moduleSpecifier ? + var resolved = node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node, dontResolveAlias) : resolveEntityName(node.propertyName || node.name, meaning, /*ignoreErrors*/ false, dontResolveAlias); - return target && node.parent.parent.isTypeOnly ? createTypeOnlyImportOrExport(node, target) : target; + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfExportAssignment(node, dontResolveAlias) { var expression = (ts.isExportAssignment(node) ? node.expression : node.right); - return getTargetOfAliasLikeExpression(expression, dontResolveAlias); + var resolved = getTargetOfAliasLikeExpression(expression, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfAliasLikeExpression(expression, dontResolveAlias) { if (ts.isClassExpression(expression)) { @@ -36107,12 +36822,64 @@ var ts; } return links.target; } + /** + * Marks a symbol as type-only if its declaration is syntactically type-only. + * If it is not itself marked type-only, but resolves to a type-only alias + * somewhere in its resolution chain, save a reference to the type-only alias declaration + * so the alias _not_ marked type-only can be identified as _transitively_ type-only. + * + * This function is called on each alias declaration that could be type-only or resolve to + * another type-only alias during `resolveAlias`, so that later, when an alias is used in a + * JS-emitting expression, we can quickly determine if that symbol is effectively type-only + * and issue an error if so. + * + * @param aliasDeclaration The alias declaration not marked as type-only + * has already been marked as not resolving to a type-only alias. Used when recursively resolving qualified + * names of import aliases, e.g. `import C = a.b.C`. If namespace `a` is not found to be type-only, the + * import declaration will initially be marked as not resolving to a type-only symbol. But, namespace `b` + * must still be checked for a type-only marker, overwriting the previous negative result if found. + * @param immediateTarget The symbol to which the alias declaration immediately resolves + * @param finalTarget The symbol to which the alias declaration ultimately resolves + * @param overwriteEmpty Checks `resolvesToSymbol` for type-only declarations even if `aliasDeclaration` + */ + function markSymbolOfAliasDeclarationIfTypeOnly(aliasDeclaration, immediateTarget, finalTarget, overwriteEmpty) { + if (!aliasDeclaration) + return false; + // If the declaration itself is type-only, mark it and return. + // No need to check what it resolves to. + var sourceSymbol = getSymbolOfNode(aliasDeclaration); + if (ts.isTypeOnlyImportOrExportDeclaration(aliasDeclaration)) { + var links_1 = getSymbolLinks(sourceSymbol); + links_1.typeOnlyDeclaration = aliasDeclaration; + return true; + } + var links = getSymbolLinks(sourceSymbol); + return markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, immediateTarget, overwriteEmpty) + || markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, finalTarget, overwriteEmpty); + } + function markSymbolOfAliasDeclarationIfTypeOnlyWorker(aliasDeclarationLinks, target, overwriteEmpty) { + var _a, _b, _c; + if (target && (aliasDeclarationLinks.typeOnlyDeclaration === undefined || overwriteEmpty && aliasDeclarationLinks.typeOnlyDeclaration === false)) { + var exportSymbol = (_b = (_a = target.exports) === null || _a === void 0 ? void 0 : _a.get("export=" /* ExportEquals */)) !== null && _b !== void 0 ? _b : target; + var typeOnly = exportSymbol.declarations && ts.find(exportSymbol.declarations, ts.isTypeOnlyImportOrExportDeclaration); + aliasDeclarationLinks.typeOnlyDeclaration = (_c = typeOnly !== null && typeOnly !== void 0 ? typeOnly : getSymbolLinks(exportSymbol).typeOnlyDeclaration) !== null && _c !== void 0 ? _c : false; + } + return !!aliasDeclarationLinks.typeOnlyDeclaration; + } + /** Indicates that a symbol directly or indirectly resolves to a type-only import or export. */ + function getTypeOnlyAliasDeclaration(symbol) { + if (!(symbol.flags & 2097152 /* Alias */)) { + return undefined; + } + var links = getSymbolLinks(symbol); + return links.typeOnlyDeclaration || undefined; + } function markExportAsReferenced(node) { var symbol = getSymbolOfNode(node); var target = resolveAlias(symbol); if (target) { var markAlias = target === unknownSymbol || - ((target.flags & 111551 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target)); + ((target.flags & 111551 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol)); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -36140,6 +36907,14 @@ var ts; } } } + // Aliases that resolve to const enums are not marked as referenced because they are not emitted, + // but their usage in value positions must be tracked to determine if the import can be type-only. + function markConstEnumAliasAsReferenced(symbol) { + var links = getSymbolLinks(symbol); + if (!links.constEnumReferenced) { + links.constEnumReferenced = true; + } + } // This function is only for imports with entity names function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) { // There are three things we might try to look for. In the following examples, @@ -36175,8 +36950,8 @@ var ts; var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 111551 /* Value */ : 0); var symbol; if (name.kind === 75 /* Identifier */) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); - var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; + var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); + var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true); if (!symbol) { return symbolFromJSPrototype; @@ -36219,6 +36994,9 @@ var ts; throw ts.Debug.assertNever(name, "Unknown entity name kind."); } ts.Debug.assert((ts.getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); + if (!ts.nodeIsSynthesized(name) && ts.isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 259 /* ExportAssignment */)) { + markSymbolOfAliasDeclarationIfTypeOnly(ts.getAliasDeclarationFromName(name), symbol, /*finalTarget*/ undefined, /*overwriteEmpty*/ true); + } return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol); } /** @@ -36283,7 +37061,7 @@ var ts; */ function getExpandoSymbol(symbol) { var decl = symbol.valueDeclaration; - if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */) { + if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */ || ts.getExpandoInitializer(decl, /*isPrototypeAssignment*/ false)) { return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); @@ -36719,7 +37497,7 @@ var ts; return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 ? symbol.exportSymbol : symbol); } function symbolIsValue(symbol) { - return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */); + return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */ && !getTypeOnlyAliasDeclaration(symbol)); } function findConstructorDeclaration(node) { var members = node.members; @@ -36822,7 +37600,7 @@ var ts; // `sym` may not have exports if this module declaration is backed by the symbol for a `const` that's being rewritten // into a namespace - in such cases, it's best to just let the namespace appear empty (the const members couldn't have referred // to one another anyway) - if (result = callback(sym.exports || emptySymbols)) { + if (result = callback((sym === null || sym === void 0 ? void 0 : sym.exports) || emptySymbols)) { return { value: result }; } break; @@ -36995,6 +37773,7 @@ var ts; if (!ts.length(symbols)) return; var hadAccessibleChain; + var earlyModuleBail = false; for (var _i = 0, _a = symbols; _i < _a.length; _i++) { var symbol = _a[_i]; // Symbol is accessible if it by itself is accessible @@ -37008,6 +37787,14 @@ var ts; } else { if (ts.some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { + if (shouldComputeAliasesToMakeVisible) { + earlyModuleBail = true; + // Generally speaking, we want to use the aliases that already exist to refer to a module, if present + // In order to do so, we need to find those aliases in order to retain them in declaration emit; so + // if we are in declaration emit, we cannot use the fast path for module visibility until we've exhausted + // all other visibility options (in order to capture the possible aliases used to reference the module) + continue; + } // Any meaning of a module symbol is always accessible via an `import` type return { accessibility: 0 /* Accessible */ @@ -37041,6 +37828,11 @@ var ts; return parentResult; } } + if (earlyModuleBail) { + return { + accessibility: 0 /* Accessible */ + }; + } if (hadAccessibleChain) { return { accessibility: 1 /* NotAccessible */, @@ -37240,7 +38032,7 @@ var ts; } function toNodeBuilderFlags(flags) { if (flags === void 0) { flags = 0 /* None */; } - return flags & 9469291 /* NodeBuilderFlagsMask */; + return flags & 277904747 /* NodeBuilderFlagsMask */; } function createNodeBuilder() { return { @@ -37344,7 +38136,7 @@ var ts; } if (type.flags & 128 /* StringLiteral */) { context.approximateLength += (type.value.length + 2); - return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value), 16777216 /* NoAsciiEscaping */)); + return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value, !!(context.flags & 268435456 /* UseSingleQuotesForStringLiteralType */)), 16777216 /* NoAsciiEscaping */)); } if (type.flags & 256 /* NumberLiteral */) { var value = type.value; @@ -37842,8 +38634,8 @@ var ts; typeElements.push(preserveCommentsOn(propertySignature)); } function preserveCommentsOn(node) { - if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 322 /* JSDocPropertyTag */; })) { - var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 322 /* JSDocPropertyTag */; }); + if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 323 /* JSDocPropertyTag */; })) { + var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 323 /* JSDocPropertyTag */; }); var commentText = d.comment; if (commentText) { ts.setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -37967,7 +38759,7 @@ var ts; function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags) { var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 156 /* Parameter */); if (!parameterDeclaration && !ts.isTransientSymbol(parameterSymbol)) { - parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 316 /* JSDocParameterTag */); + parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 317 /* JSDocParameterTag */); } var parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -38024,7 +38816,7 @@ var ts; var chain; var isTypeParameter = symbol.flags & 262144 /* TypeParameter */; if (!isTypeParameter && (context.enclosingDeclaration || context.flags & 64 /* UseFullyQualifiedType */) && !(context.flags & 134217728 /* DoNotIncludeSymbolChain */)) { - chain = ts.Debug.assertDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); + chain = ts.Debug.checkDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); ts.Debug.assert(chain && chain.length > 0); } else { @@ -38399,7 +39191,7 @@ var ts; } // See getNameForSymbolFromNameType for a stringy equivalent function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; @@ -38674,7 +39466,7 @@ var ts; symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */; var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); - if (symbol.flags & 16 /* Function */ || isConstMergedWithNSPrintableAsSignatureMerge) { + if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288 /* TypeAlias */) { @@ -38733,7 +39525,7 @@ var ts; function includePrivateSymbol(symbol) { if (ts.some(symbol.declarations, ts.isParameterDeclaration)) return; - ts.Debug.assertDefined(deferredPrivates); + ts.Debug.assertIsDefined(deferredPrivates); getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol deferredPrivates.set("" + getSymbolId(symbol), symbol); } @@ -38874,7 +39666,7 @@ var ts; // function g() {} // module.exports.g = g // ``` - // In such a situation, we have a local variable named `g`, and a seperate exported variable named `g`. + // In such a situation, we have a local variable named `g`, and a separate exported variable named `g`. // Naively, we would emit // ``` // function g() {} @@ -38965,18 +39757,19 @@ var ts; var typeParamDecls = ts.map(localParams, function (p) { return typeParameterToDeclaration(p, context); }); var classType = getDeclaredTypeOfClassOrInterface(symbol); var baseTypes = getBaseTypes(classType); + var implementsTypes = getImplementsTypes(classType); var staticType = getTypeOfSymbol(symbol); var staticBaseType = getBaseConstructorTypeOfClass(staticType); - var heritageClauses = !ts.length(baseTypes) ? undefined : [ts.createHeritageClause(90 /* ExtendsKeyword */, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]; + var heritageClauses = __spreadArrays(!ts.length(baseTypes) ? [] : [ts.createHeritageClause(90 /* ExtendsKeyword */, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))], !ts.length(implementsTypes) ? [] : [ts.createHeritageClause(113 /* ImplementsKeyword */, ts.map(implementsTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]); var symbolProps = getPropertiesOfType(classType); var publicSymbolProps = ts.filter(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return !(ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name)); }); var hasPrivateIdentifier = ts.some(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name); }); // Boil down all private properties into a single one. @@ -39008,8 +39801,8 @@ var ts; } function serializeAsAlias(symbol, localName, modifierFlags) { // synthesize an alias, eg `export { symbolName as Name }` - // need to mark the alias `symbol` points - // at as something we need to serialize as a private declaration as well + // need to mark the alias `symbol` points at + // as something we need to serialize as a private declaration as well var node = getDeclarationOfAliasSymbol(symbol); if (!node) return ts.Debug.fail(); @@ -39212,7 +40005,7 @@ var ts; && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName)))) { return []; } - var flag = modifierFlags | (isStatic ? 32 /* Static */ : 0); + var flag = (modifierFlags & ~256 /* Async */) | (isStatic ? 32 /* Static */ : 0); var name = getPropertyNameNodeForSymbol(p, context); var firstPropertyLikeDecl = ts.find(p.declarations, ts.or(ts.isPropertyDeclaration, ts.isAccessor, ts.isVariableDeclaration, ts.isPropertySignature, ts.isBinaryExpression, ts.isPropertyAccessExpression)); if (p.flags & 98304 /* Accessor */ && useAccessors) { @@ -39276,7 +40069,7 @@ var ts; return serializePropertySymbolForInterfaceWorker(p, /*isStatic*/ false, baseType); } function getDeclarationWithTypeAnnotation(symbol) { - return ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); + return symbol.declarations && ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); } /** * Unlike `typeToTypeNodeHelper`, this handles setting up the `AllowUniqueESSymbolType` flag @@ -39594,7 +40387,7 @@ var ts; return location.kind === 290 /* SourceFile */ || ts.isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; @@ -39635,11 +40428,14 @@ var ts; if (ts.isCallExpression(declaration) && ts.isBindableObjectDefinePropertyCall(declaration)) { return ts.symbolName(symbol); } - if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096 /* Late */) && symbol.nameType && symbol.nameType.flags & 384 /* StringOrNumberLiteral */) { - // Computed property name isn't late bound, but has a well-known name type - use name type to generate a symbol name - var result = getNameOfSymbolFromNameType(symbol, context); - if (result !== undefined) { - return result; + if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096 /* Late */)) { + var nameType = getSymbolLinks(symbol).nameType; + if (nameType && nameType.flags & 384 /* StringOrNumberLiteral */) { + // Computed property name isn't late bound, but has a well-known name type - use name type to generate a symbol name + var result = getNameOfSymbolFromNameType(symbol, context); + if (result !== undefined) { + return result; + } } } return ts.declarationNameToString(name_2); @@ -39674,9 +40470,9 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: - case 315 /* JSDocEnumTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 316 /* JSDocEnumTag */: // Top-level jsdoc type aliases are considered exported // First parent is comment node, second is hosting declaration or token; we only care about those tokens or declarations whose parent is a source file return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent)); @@ -39848,9 +40644,7 @@ var ts; return !!target.resolvedReturnType; case 4 /* ImmediateBaseConstraint */: return !!target.immediateBaseConstraint; - case 6 /* JSDocTypeReference */: - return !!getSymbolLinks(target).resolvedJSDocType; - case 7 /* ResolvedTypeArguments */: + case 6 /* ResolvedTypeArguments */: return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); @@ -40090,11 +40884,6 @@ var ts; if (optional === void 0) { optional = true; } return strictNullChecks && optional ? getOptionalType(type) : type; } - function isParameterOfContextuallyTypedFunction(node) { - return node.kind === 156 /* Parameter */ && - (node.parent.kind === 201 /* FunctionExpression */ || node.parent.kind === 202 /* ArrowFunction */) && - !!getContextualType(node.parent); - } // Return the inferred type for a variable, parameter, or property declaration function getTypeForVariableLikeDeclaration(declaration, includeOptionality) { // A variable declared in a for..in statement is of type string, or of type keyof T when the @@ -40159,7 +40948,7 @@ var ts; } } // Use contextual parameter type if one is available - var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration, /*forCache*/ true); + var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration); if (type) { return addOptionality(type, isOptional); } @@ -40172,7 +40961,7 @@ var ts; } // Use the type of the initializer expression if one is present and the declaration is // not a parameter of a contextually typed function - if (declaration.initializer && !isParameterOfContextuallyTypedFunction(declaration)) { + if (declaration.initializer) { var type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration)); return addOptionality(type, isOptional); } @@ -40183,7 +40972,7 @@ var ts; } // If the declaration specifies a binding pattern and is not a parameter of a contextually // typed function, use the type implied by the binding pattern - if (ts.isBindingPattern(declaration.name) && !isParameterOfContextuallyTypedFunction(declaration)) { + if (ts.isBindingPattern(declaration.name)) { return getTypeFromBindingPattern(declaration.name, /*includePatternInType*/ false, /*reportErrors*/ true); } // No type specified and nothing can be inferred @@ -40823,8 +41612,8 @@ var ts; function getTypeOfSymbolWithDeferredType(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); links.type = links.deferralParent.flags & 1048576 /* Union */ ? getUnionType(links.deferralConstituents) : getIntersectionType(links.deferralConstituents); } return links.type; @@ -40921,10 +41710,10 @@ var ts; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: - case 321 /* JSDocTypedefTag */: - case 315 /* JSDocEnumTag */: - case 314 /* JSDocCallbackTag */: + case 321 /* JSDocTemplateTag */: + case 322 /* JSDocTypedefTag */: + case 316 /* JSDocEnumTag */: + case 315 /* JSDocCallbackTag */: case 186 /* MappedType */: case 180 /* ConditionalType */: var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); @@ -41055,6 +41844,28 @@ var ts; } return type.resolvedBaseConstructorType; } + function getImplementsTypes(type) { + var resolvedImplementsTypes = ts.emptyArray; + for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + var implementsTypeNodes = ts.getEffectiveImplementsTypeNodes(declaration); + if (!implementsTypeNodes) + continue; + for (var _b = 0, implementsTypeNodes_1 = implementsTypeNodes; _b < implementsTypeNodes_1.length; _b++) { + var node = implementsTypeNodes_1[_b]; + var implementsType = getTypeFromTypeNode(node); + if (implementsType !== errorType) { + if (resolvedImplementsTypes === ts.emptyArray) { + resolvedImplementsTypes = [implementsType]; + } + else { + resolvedImplementsTypes.push(implementsType); + } + } + } + } + return resolvedImplementsTypes; + } function getBaseTypes(type) { if (!type.resolvedBaseTypes) { if (type.objectFlags & 8 /* Tuple */) { @@ -41250,20 +42061,10 @@ var ts; if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { return errorType; } - var type = void 0; - var declaration = void 0; - if (ts.isTypeOnlyAlias(symbol)) { - // Symbol is synthetic type alias for type-only import or export. - // See `createSyntheticTypeAlias`. - type = getDeclaredTypeOfSymbol(symbol.immediateTarget); - declaration = symbol.valueDeclaration; - } - else { - declaration = ts.Debug.assertDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); - var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; - // If typeNode is missing, we will error in checkJSDocTypedefTag. - type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; - } + var declaration = ts.Debug.checkDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); + var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; + // If typeNode is missing, we will error in checkJSDocTypedefTag. + var type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; if (popTypeResolution()) { var typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); if (typeParameters) { @@ -42256,7 +43057,7 @@ var ts; var checkFlags = 8192 /* ReverseMapped */ | (readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0); var inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.escapedName, checkFlags); inferredProp.declarations = prop.declarations; - inferredProp.nameType = prop.nameType; + inferredProp.nameType = getSymbolLinks(prop).nameType; inferredProp.propertyType = getTypeOfSymbol(prop); inferredProp.mappedType = type.mappedType; inferredProp.constraintType = type.constraintType; @@ -42344,7 +43145,7 @@ var ts; // When creating an optional property in strictNullChecks mode, if 'undefined' isn't assignable to the // type, we include 'undefined' in the type. Similarly, when creating a non-optional property in strictNullChecks // mode, if the underlying property is optional we remove 'undefined' from the type. - prop.type = strictNullChecks && isOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + prop.type = strictNullChecks && isOptional && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType) : strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */ ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType; if (modifiersProp) { @@ -42907,7 +43708,7 @@ var ts; var type = getTypeOfSymbol(prop); if (!firstType) { firstType = type; - nameType = prop.nameType; + nameType = getSymbolLinks(prop).nameType; } else if (type !== firstType) { checkFlags |= 64 /* HasNonUniformType */; @@ -43671,7 +44472,7 @@ var ts; function getTypeArguments(type) { var _a, _b; if (!type.resolvedTypeArguments) { - if (!pushTypeResolution(type, 7 /* ResolvedTypeArguments */)) { + if (!pushTypeResolution(type, 6 /* ResolvedTypeArguments */)) { return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; } var node = type.node; @@ -43721,7 +44522,7 @@ var ts; return errorType; } } - if (node.kind === 169 /* TypeReference */ && isAliasedType(node)) { + if (node.kind === 169 /* TypeReference */ && isDeferredTypeReferenceNode(node, ts.length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference(type, node, /*mapper*/ undefined); } // In a type reference, the outer type parameters of the referenced class or interface are automatically @@ -43793,9 +44594,6 @@ var ts; if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) { return getTypeFromClassOrInterfaceReference(node, symbol); } - if (ts.isTypeOnlyAlias(symbol)) { - return getTypeReferenceType(node, symbol.immediateTarget); - } if (symbol.flags & 524288 /* TypeAlias */) { return getTypeFromTypeAliasReference(node, symbol); } @@ -43825,26 +44623,30 @@ var ts; * but this function's special-case code fakes alias resolution as well. */ function getTypeFromJSDocValueReference(node, symbol) { - var valueType = getTypeOfSymbol(symbol); - var typeType = valueType; - if (symbol.valueDeclaration) { - var decl = ts.getRootDeclaration(symbol.valueDeclaration); - var isRequireAlias = false; - if (ts.isVariableDeclaration(decl) && decl.initializer) { - var expr = decl.initializer; - // skip past entity names, eg `require("x").a.b.c` - while (ts.isPropertyAccessExpression(expr)) { - expr = expr.expression; + var links = getNodeLinks(node); + if (!links.resolvedJSDocType) { + var valueType = getTypeOfSymbol(symbol); + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + // skip past entity names, eg `require("x").a.b.c` + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 188 /* ImportType */ && node.qualifier; + // valueType might not have a symbol, eg, {import('./b').STRING_LITERAL} + if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { + typeType = getTypeReferenceType(node, valueType.symbol); } - isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; - } - var isImportTypeWithQualifier = node.kind === 188 /* ImportType */ && node.qualifier; - // valueType might not have a symbol, eg, {import('./b').STRING_LITERAL} - if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { - typeType = getTypeReferenceType(node, valueType.symbol); } + links.resolvedJSDocType = typeType; } - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + return links.resolvedJSDocType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === typeVariable) { @@ -43945,6 +44747,11 @@ var ts; function getTypeFromTypeReference(node) { var links = getNodeLinks(node); if (!links.resolvedType) { + // handle LS queries on the `const` in `x as const` by resolving to the type of `x` + if (ts.isConstTypeReference(node) && ts.isAssertionExpression(node.parent)) { + links.resolvedSymbol = unknownSymbol; + return links.resolvedType = checkExpressionCached(node.parent.expression); + } var symbol = void 0; var type = void 0; var meaning = 788968 /* Type */; @@ -44123,10 +44930,17 @@ var ts; var minLength = ts.findLastIndex(node.elementTypes, function (n) { return n.kind !== 176 /* OptionalType */ && n !== restElement; }) + 1; return getTupleTypeOfArity(node.elementTypes.length, minLength, !!restElement, readonly, /*associatedNames*/ undefined); } + // Return true if the given type reference node is directly aliased or if it needs to be deferred + // because it is possibly contained in a circular chain of eagerly resolved types. + function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 174 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : + node.kind === 175 /* TupleType */ ? ts.some(node.elementTypes, mayResolveTypeAlias) : + hasDefaultTypeArguments || ts.some(node.typeArguments, mayResolveTypeAlias)); + } // Return true when the given node is transitively contained in type constructs that eagerly // resolve their constituent types. We include SyntaxKind.TypeReference because type arguments // of type aliases are eagerly resolved. - function isAliasedType(node) { + function isResolvedByTypeAlias(node) { var parent = node.parent; switch (parent.kind) { case 182 /* ParenthesizedType */: @@ -44136,12 +44950,42 @@ var ts; case 185 /* IndexedAccessType */: case 180 /* ConditionalType */: case 184 /* TypeOperator */: - return isAliasedType(parent); + return isResolvedByTypeAlias(parent); case 247 /* TypeAliasDeclaration */: return true; } return false; } + // Return true if resolving the given node (i.e. getTypeFromTypeNode) possibly causes resolution + // of a type alias. + function mayResolveTypeAlias(node) { + switch (node.kind) { + case 169 /* TypeReference */: + return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node.typeName, 788968 /* Type */).flags & 524288 /* TypeAlias */); + case 172 /* TypeQuery */: + return true; + case 184 /* TypeOperator */: + return node.operator !== 147 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); + case 182 /* ParenthesizedType */: + case 176 /* OptionalType */: + case 299 /* JSDocOptionalType */: + case 297 /* JSDocNullableType */: + case 298 /* JSDocNonNullableType */: + case 294 /* JSDocTypeExpression */: + return mayResolveTypeAlias(node.type); + case 177 /* RestType */: + return node.type.kind !== 174 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 178 /* UnionType */: + case 179 /* IntersectionType */: + return ts.some(node.types, mayResolveTypeAlias); + case 185 /* IndexedAccessType */: + return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); + case 180 /* ConditionalType */: + return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || + mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); + } + return false; + } function getTypeFromArrayOrTupleTypeNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { @@ -44149,7 +44993,7 @@ var ts; if (target === emptyGenericType) { links.resolvedType = emptyObjectType; } - else if (isAliasedType(node)) { + else if (isDeferredTypeReferenceNode(node)) { links.resolvedType = node.kind === 175 /* TupleType */ && node.elementTypes.length === 0 ? target : createDeferredTypeReference(target, node, /*mapper*/ undefined); } @@ -44722,7 +45566,7 @@ var ts; } function getLiteralTypeFromProperty(prop, include) { if (!(ts.getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */)) { - var type = getLateBoundSymbol(prop).nameType; + var type = getSymbolLinks(getLateBoundSymbol(prop)).nameType; if (!type && !ts.isKnownSymbol(prop)) { if (prop.escapedName === "default" /* Default */) { type = getLiteralType("default"); @@ -44979,10 +45823,24 @@ var ts; accessNode; } function isGenericObjectType(type) { - return maybeTypeOfKind(type, 58982400 /* InstantiableNonPrimitive */ | 131072 /* GenericMappedType */); + if (type.flags & 3145728 /* UnionOrIntersection */) { + if (!(type.objectFlags & 4194304 /* IsGenericObjectTypeComputed */)) { + type.objectFlags |= 4194304 /* IsGenericObjectTypeComputed */ | + (ts.some(type.types, isGenericObjectType) ? 8388608 /* IsGenericObjectType */ : 0); + } + return !!(type.objectFlags & 8388608 /* IsGenericObjectType */); + } + return !!(type.flags & 58982400 /* InstantiableNonPrimitive */) || isGenericMappedType(type); } function isGenericIndexType(type) { - return maybeTypeOfKind(type, 58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */); + if (type.flags & 3145728 /* UnionOrIntersection */) { + if (!(type.objectFlags & 16777216 /* IsGenericIndexTypeComputed */)) { + type.objectFlags |= 16777216 /* IsGenericIndexTypeComputed */ | + (ts.some(type.types, isGenericIndexType) ? 33554432 /* IsGenericIndexType */ : 0); + } + return !!(type.objectFlags & 33554432 /* IsGenericIndexType */); + } + return !!(type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */)); } function isThisTypeParameter(type) { return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType); @@ -45009,6 +45867,12 @@ var ts; return writing ? getIntersectionType(types) : getUnionType(types); } } + function unwrapSubstitution(type) { + if (type.flags & 33554432 /* Substitution */) { + return type.substitute; + } + return type; + } // Transform an indexed access to a simpler form, if possible. Return the simpler form, or return // the type itself if no transformation is possible. The writing flag indicates that the type is // the target of an assignment. @@ -45020,7 +45884,7 @@ var ts; type[cache] = circularConstraintType; // We recursively simplify the object type as it may in turn be an indexed access type. For example, with // '{ [P in T]: { [Q in U]: number } }[T][U]' we want to first simplify the inner indexed access type. - var objectType = getSimplifiedType(type.objectType, writing); + var objectType = unwrapSubstitution(getSimplifiedType(type.objectType, writing)); var indexType = getSimplifiedType(type.indexType, writing); // T[A | B] -> T[A] | T[B] (reading) // T[A | B] -> T[A] & T[B] (writing) @@ -45185,11 +46049,15 @@ var ts; if (checkType === wildcardType || extendsType === wildcardType) { return wildcardType; } - var checkTypeInstantiable = maybeTypeOfKind(checkType, 63176704 /* Instantiable */ | 131072 /* GenericMappedType */); + var checkTypeInstantiable = isGenericObjectType(checkType) || isGenericIndexType(checkType); var combinedMapper; if (root.inferTypeParameters) { var context = createInferenceContext(root.inferTypeParameters, /*signature*/ undefined, 0 /* None */); - if (!checkTypeInstantiable) { + // We skip inference of the possible `infer` types unles the `extendsType` _is_ an infer type + // if it was, it's trivial to say that extendsType = checkType, however such a pattern is used to + // "reset" the type being build up during constraint calculation and avoid making an apparently "infinite" constraint + // so in those cases we refain from performing inference and retain the uninfered type parameter + if (!checkTypeInstantiable || !ts.some(root.inferTypeParameters, function (t) { return t === extendsType; })) { // We don't want inferences from constraints as they may cause us to eagerly resolve the // conditional type instead of deferring resolution. Also, we always want strict function // types rules (i.e. proper contravariance) for inferences. @@ -45200,7 +46068,7 @@ var ts; // Instantiate the extends type including inferences for 'infer T' type parameters var inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType; // We attempt to resolve the conditional type only when the check and extends types are non-generic - if (!checkTypeInstantiable && !maybeTypeOfKind(inferredExtendsType, 63176704 /* Instantiable */ | 131072 /* GenericMappedType */)) { + if (!checkTypeInstantiable && !isGenericObjectType(inferredExtendsType) && !isGenericIndexType(inferredExtendsType)) { if (inferredExtendsType.flags & 3 /* AnyOrUnknown */) { return instantiateType(root.trueType, combinedMapper || mapper); } @@ -45433,7 +46301,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 /* Readonly */ : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; members.set(prop.escapedName, result); } @@ -45448,7 +46316,7 @@ var 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, right, symbol, objectFlags, readonly) { + function getSpreadType(left, right, symbol, objectFlags, readonly, isParentTypeNullable) { if (left.flags & 1 /* Any */ || right.flags & 1 /* Any */) { return anyType; } @@ -45464,16 +46332,16 @@ var ts; if (left.flags & 1048576 /* Union */) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(left, readonly); if (merged) { - return getSpreadType(merged, right, symbol, objectFlags, readonly); + return getSpreadType(merged, right, symbol, objectFlags, readonly, isParentTypeNullable); } - return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly); }); + return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly, isParentTypeNullable); }); } if (right.flags & 1048576 /* Union */) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(right, readonly); if (merged) { - return getSpreadType(left, merged, symbol, objectFlags, readonly); + return getSpreadType(left, merged, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304 /* Nullable */)); } - return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly); }); + return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304 /* Nullable */)); }); } if (right.flags & (528 /* BooleanLike */ | 296 /* NumberLike */ | 2112 /* BigIntLike */ | 132 /* StringLike */ | 1056 /* EnumLike */ | 67108864 /* NonPrimitive */ | 4194304 /* Index */)) { return left; @@ -45532,9 +46400,17 @@ var ts; result.leftSpread = leftProp; result.rightSpread = rightProp; result.declarations = declarations; - result.nameType = leftProp.nameType; + result.nameType = getSymbolLinks(leftProp).nameType; members.set(leftProp.escapedName, result); } + else if (strictNullChecks && + !isParentTypeNullable && + symbol && + !isFromSpreadAssignment(leftProp, symbol) && + isFromSpreadAssignment(rightProp, symbol) && + !maybeTypeOfKind(rightType, 98304 /* Nullable */)) { + error(leftProp.valueDeclaration, ts.Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, ts.unescapeLeadingUnderscores(leftProp.escapedName)); + } } else { members.set(leftProp.escapedName, getSpreadSymbol(leftProp, readonly)); @@ -45559,7 +46435,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 /* Readonly */ : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; return result; } @@ -45885,8 +46761,8 @@ var ts; if (symbol.valueDeclaration) { result.valueDeclaration = symbol.valueDeclaration; } - if (symbol.nameType) { - result.nameType = symbol.nameType; + if (links.nameType) { + result.nameType = links.nameType; } return result; } @@ -46038,7 +46914,7 @@ var ts; var templateMapper = combineTypeMappers(mapper, createTypeMapper([getTypeParameterFromMappedType(type)], [key])); var propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper); var modifiers = getMappedTypeModifiers(type); - return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType) : strictNullChecks && modifiers & 8 /* ExcludeOptional */ && isOptional ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType; } @@ -46101,6 +46977,7 @@ var ts; error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } + totalInstantiationCount++; instantiationCount++; instantiationDepth++; var result = instantiateTypeWorker(type, mapper); @@ -46134,15 +47011,17 @@ var ts; } return type; } - if (flags & 1048576 /* Union */ && !(flags & 131068 /* Primitive */)) { - var types = type.types; - var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getUnionType(newTypes, 1 /* Literal */, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; - } - if (flags & 2097152 /* Intersection */) { + if ((flags & 2097152 /* Intersection */) || (flags & 1048576 /* Union */ && !(flags & 131068 /* Primitive */))) { + if (!couldContainTypeVariables(type)) { + return type; + } var types = type.types; var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; + return newTypes === types + ? type + : (flags & 2097152 /* Intersection */) + ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) + : getUnionType(newTypes, 1 /* Literal */, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)); } if (flags & 4194304 /* Index */) { return getIndexType(instantiateType(type.type, mapper)); @@ -46231,30 +47110,30 @@ var ts; return false; } function isContextSensitiveFunctionLikeDeclaration(node) { - if (ts.isFunctionDeclaration(node) && (!ts.isInJSFile(node) || !getTypeForDeclarationFromJSDocComment(node))) { - return false; - } + return (!ts.isFunctionDeclaration(node) || ts.isInJSFile(node) && !!getTypeForDeclarationFromJSDocComment(node)) && + (hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node)); + } + function hasContextSensitiveParameters(node) { // Functions with type parameters are not context sensitive. - if (node.typeParameters) { - return false; - } - // Functions with any parameters that lack type annotations are context sensitive. - if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { - return true; - } - if (node.kind !== 202 /* ArrowFunction */) { - // If the first parameter is not an explicit 'this' parameter, then the function has - // an implicit 'this' parameter which is subject to contextual typing. - var parameter = ts.firstOrUndefined(node.parameters); - if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + if (!node.typeParameters) { + // Functions with any parameters that lack type annotations are context sensitive. + if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { return true; } + if (node.kind !== 202 /* ArrowFunction */) { + // If the first parameter is not an explicit 'this' parameter, then the function has + // an implicit 'this' parameter which is subject to contextual typing. + var parameter = ts.firstOrUndefined(node.parameters); + if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + return true; + } + } } - return hasContextSensitiveReturnExpression(node); + return false; } function hasContextSensitiveReturnExpression(node) { // TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value. - return !!node.body && node.body.kind !== 223 /* Block */ && isContextSensitive(node.body); + return !ts.getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 223 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (ts.isInJSFile(func) && ts.isFunctionDeclaration(func) || isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) && @@ -46427,6 +47306,13 @@ var ts; if (target.symbol && ts.length(target.symbol.declarations)) { ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(target.symbol.declarations[0], ts.Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature)); } + if ((ts.getFunctionFlags(node) & 2 /* Async */) === 0 + // exclude cases where source itself is promisy - this way we don't make a suggestion when relating + // an IPromise and a Promise that are slightly different + && !getTypeOfPropertyOfType(sourceReturn, "then") + && checkTypeRelatedTo(createPromiseType(sourceReturn), targetReturn, relation, /*errorNode*/ undefined)) { + ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async)); + } return true; } } @@ -46684,11 +47570,20 @@ var ts; return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); } // recreate a tuple from the elements, if possible - var tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, /*forceTuple*/ true); - if (isTupleLikeType(tupleizedType)) { - return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + // Since we're re-doing the expression type, we need to reapply the contextual type + var oldContext = node.contextualType; + node.contextualType = target; + try { + var tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, /*forceTuple*/ true); + node.contextualType = oldContext; + if (isTupleLikeType(tupleizedType)) { + return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + } + return false; + } + finally { + node.contextualType = oldContext; } - return false; } function generateObjectLiteralElements(node) { var _i, _a, prop, type, _b; @@ -47034,11 +47929,18 @@ var ts; if (isFreshLiteralType(target)) { target = target.regularType; } - if (source === target || - relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || - relation !== identityRelation && isSimpleTypeRelatedTo(source, target, relation)) { + if (source === target) { return true; } + if (relation !== identityRelation) { + if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation)) { + return true; + } + } + else { + if (!(source.flags === target.flags && source.flags & 66584576 /* Substructure */)) + return false; + } if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) { var related = relation.get(getRelationKey(source, target, 0 /* None */, relation)); if (related !== undefined) { @@ -47054,11 +47956,17 @@ var ts; return ts.getObjectFlags(source) & 4096 /* JsxAttributes */ && !isUnhyphenatedJsxName(sourceProp.escapedName); } function getNormalizedType(type, writing) { - return isFreshLiteralType(type) ? type.regularType : - ts.getObjectFlags(type) & 4 /* Reference */ && type.node ? createTypeReference(type.target, getTypeArguments(type)) : - type.flags & 33554432 /* Substitution */ ? writing ? type.typeVariable : type.substitute : - type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : - type; + do { + var t = isFreshLiteralType(type) ? type.regularType : + ts.getObjectFlags(type) & 4 /* Reference */ && type.node ? createTypeReference(type.target, getTypeArguments(type)) : + type.flags & 33554432 /* Substitution */ ? writing ? type.typeVariable : type.substitute : + type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : + type; + if (t === type) + break; + type = t; + } while (true); + return type; } /** * Checks if 'source' is related to 'target' (e.g.: is a assignable to). @@ -47346,6 +48254,11 @@ var ts; // side) or the type variable (on the target side). var source = getNormalizedType(originalSource, /*writing*/ false); var target = getNormalizedType(originalTarget, /*writing*/ true); + if (source === target) + return -1 /* True */; + if (relation === identityRelation) { + return isIdenticalTo(source, target); + } // Try to see if we're relating something like `Foo` -> `Bar | null | undefined`. // If so, reporting the `null` and `undefined` in the type is hardly useful. // First, see if we're even relating an object type to a union. @@ -47359,15 +48272,11 @@ var ts; target.types.length <= 3 && maybeTypeOfKind(target, 98304 /* Nullable */)) { var nullStrippedTarget = extractTypesOfKind(target, ~98304 /* Nullable */); if (!(nullStrippedTarget.flags & (1048576 /* Union */ | 131072 /* Never */))) { + if (source === nullStrippedTarget) + return -1 /* True */; target = nullStrippedTarget; } } - // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases - if (source === target) - return -1 /* True */; - if (relation === identityRelation) { - return isIdenticalTo(source, target); - } if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation, reportErrors ? reportError : undefined)) return -1 /* True */; @@ -47508,19 +48417,18 @@ var ts; return result; } function isIdenticalTo(source, target) { - var result; var flags = source.flags & target.flags; - if (flags & 524288 /* Object */ || flags & 8388608 /* IndexedAccess */ || flags & 16777216 /* Conditional */ || flags & 4194304 /* Index */ || flags & 33554432 /* Substitution */) { - return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, 0 /* None */); + if (!(flags & 66584576 /* Substructure */)) { + return 0 /* False */; } - if (flags & (1048576 /* Union */ | 2097152 /* Intersection */)) { - if (result = eachTypeRelatedToSomeType(source, target)) { - if (result &= eachTypeRelatedToSomeType(target, source)) { - return result; - } + if (flags & 3145728 /* UnionOrIntersection */) { + var result_3 = eachTypeRelatedToSomeType(source, target); + if (result_3) { + result_3 &= eachTypeRelatedToSomeType(target, source); } + return result_3; } - return 0 /* False */; + return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, 0 /* None */); } function getTypeOfPropertyInTypes(types, name) { var appendPropType = function (propTypes, type) { @@ -47547,7 +48455,7 @@ var ts; checkTypes = reducedTarget.flags & 1048576 /* Union */ ? reducedTarget.types : [reducedTarget]; } var _loop_11 = function (prop) { - if (shouldCheckAsExcessProperty(prop, source.symbol)) { + if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) { if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) { if (reportErrors) { // Report error in terms of object types in the target as those are the only ones @@ -47837,21 +48745,21 @@ var ts; if (flags & 4194304 /* Index */) { return isRelatedTo(source.type, target.type, /*reportErrors*/ false); } - var result_3 = 0 /* False */; + var result_4 = 0 /* False */; if (flags & 8388608 /* IndexedAccess */) { - if (result_3 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { + return result_4; } } } if (flags & 16777216 /* Conditional */) { if (source.root.isDistributive === target.root.isDistributive) { - if (result_3 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { + return result_4; } } } @@ -48130,11 +49038,11 @@ var ts; // with respect to T. We do not report errors here, as we will use the existing // error result from checking each constituent of the union. if (source.flags & (524288 /* Object */ | 2097152 /* Intersection */) && target.flags & 1048576 /* Union */) { - var objectOnlyTarget = extractTypesOfKind(target, 524288 /* Object */); + var objectOnlyTarget = extractTypesOfKind(target, 524288 /* Object */ | 2097152 /* Intersection */ | 33554432 /* Substitution */); if (objectOnlyTarget.flags & 1048576 /* Union */) { - var result_4 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); - if (result_4) { - return result_4; + var result_5 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); + if (result_5) { + return result_5; } } } @@ -48201,12 +49109,12 @@ var ts; var modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source) === getMappedTypeModifiers(target) : getCombinedMappedTypeOptionality(source) <= getCombinedMappedTypeOptionality(target)); if (modifiersRelated) { - var result_5; + var result_6; var targetConstraint = getConstraintTypeFromMappedType(target); var sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMarkers : reportUnreliableMarkers); - if (result_5 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { + if (result_6 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]); - return result_5 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); + return result_6 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); } } return 0 /* False */; @@ -48221,7 +49129,7 @@ var ts; // // NOTE: See ~/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts // for examples. - var sourceProperties = getPropertiesOfObjectType(source); + var sourceProperties = getPropertiesOfType(source); var sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target); if (!sourcePropertiesFiltered) return 0 /* False */; @@ -48260,7 +49168,7 @@ var ts; var type = _a[_i]; var _loop_13 = function (i) { var sourceProperty = sourcePropertiesFiltered[i]; - var targetProperty = getPropertyOfObjectType(type, sourceProperty.escapedName); + var targetProperty = getPropertyOfType(type, sourceProperty.escapedName); if (!targetProperty) return "continue-outer"; if (sourceProperty === targetProperty) @@ -48337,10 +49245,10 @@ var ts; if (ts.getCheckFlags(targetProp) & 65536 /* DeferredType */ && !getSymbolLinks(targetProp).type) { // Rather than resolving (and normalizing) the type, relate constituent-by-constituent without performing normalization or seconadary passes var links = getSymbolLinks(targetProp); - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); var unionParent = !!(links.deferralParent.flags & 1048576 /* Union */); - var result_6 = unionParent ? 0 /* False */ : -1 /* True */; + var result_7 = unionParent ? 0 /* False */ : -1 /* True */; var targetTypes = links.deferralConstituents; for (var _i = 0, targetTypes_3 = targetTypes; _i < targetTypes_3.length; _i++) { var targetType = targetTypes_3[_i]; @@ -48350,7 +49258,7 @@ var ts; // Can't assign to a target individually - have to fallback to assigning to the _whole_ intersection (which forces normalization) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - result_6 &= related; + result_7 &= related; } else { if (related) { @@ -48358,17 +49266,17 @@ var ts; } } } - if (unionParent && !result_6 && targetIsOptional) { - result_6 = isRelatedTo(source, undefinedType); + if (unionParent && !result_7 && targetIsOptional) { + result_7 = isRelatedTo(source, undefinedType); } - if (unionParent && !result_6 && reportErrors) { + if (unionParent && !result_7 && reportErrors) { // The easiest way to get the right errors here is to un-defer (which may be costly) // If it turns out this is too costly too often, we can replicate the error handling logic within // typeRelatedToSomeType without the discriminatable type branch (as that requires a manifest union // type on which to hand discriminable properties, which we are expressly trying to avoid here) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - return result_6; + return result_7; } else { return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors, /*headMessage*/ undefined, intersectionState); @@ -48441,13 +49349,14 @@ var ts; if (unmatchedProperty.valueDeclaration && ts.isNamedDeclaration(unmatchedProperty.valueDeclaration) && ts.isPrivateIdentifier(unmatchedProperty.valueDeclaration.name) - && ts.isClassDeclaration(source.symbol.valueDeclaration)) { + && source.symbol + && source.symbol.flags & 32 /* Class */) { var privateIdentifierDescription = unmatchedProperty.valueDeclaration.name.escapedText; var symbolTableKey = ts.getSymbolNameForPrivateIdentifier(source.symbol, privateIdentifierDescription); - if (symbolTableKey && !!getPropertyOfType(source, symbolTableKey)) { - var sourceName = source.symbol.valueDeclaration.name; - var targetName = ts.isClassDeclaration(target.symbol.valueDeclaration) ? target.symbol.valueDeclaration.name : undefined; - reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName || anon), diagnosticName(targetName || anon)); + if (symbolTableKey && getPropertyOfType(source, symbolTableKey)) { + var sourceName = ts.getDeclarationName(source.symbol.valueDeclaration); + var targetName = ts.getDeclarationName(target.symbol.valueDeclaration); + reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName.escapedText === "" ? anon : sourceName), diagnosticName(targetName.escapedText === "" ? anon : targetName)); return; } } @@ -48694,7 +49603,11 @@ var ts; for (var _i = 0, props_2 = props; _i < props_2.length; _i++) { var prop = props_2[_i]; // Skip over ignored JSX and symbol-named members - if (isIgnoredJsxProperty(source, prop) || prop.nameType && prop.nameType.flags & 8192 /* UniqueESSymbol */) { + if (isIgnoredJsxProperty(source, prop)) { + continue; + } + var nameType = getSymbolLinks(prop).nameType; + if (nameType && nameType.flags & 8192 /* UniqueESSymbol */) { continue; } if (kind === 0 /* String */ || isNumericLiteralName(prop.escapedName)) { @@ -48817,6 +49730,10 @@ var ts; // make sure exactly 1 matches before returning it return match === -1 || discriminable.indexOf(/*searchElement*/ true, match + 1) !== -1 ? defaultValue : target.types[match]; } + function isFromSpreadAssignment(prop, container) { + var _a; + return ((_a = prop.valueDeclaration) === null || _a === void 0 ? void 0 : _a.parent) !== container.valueDeclaration; + } /** * A type is 'weak' if it is an object type with at least one optional property * and no required properties, call/construct signatures or index signatures @@ -49314,7 +50231,7 @@ var ts; } /** * Check if a Type was written as a tuple type literal. - * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. + * Prefer using isTupleLikeType() unless the use of `elementTypes`/`getTypeArguments` is required. */ function isTupleType(type) { return !!(ts.getObjectFlags(type) & 4 /* Reference */ && type.target.objectFlags & 8 /* Tuple */); @@ -49460,8 +50377,9 @@ var ts; if (source.valueDeclaration) { symbol.valueDeclaration = source.valueDeclaration; } - if (source.nameType) { - symbol.nameType = source.nameType; + var nameType = getSymbolLinks(source).nameType; + if (nameType) { + symbol.nameType = nameType; } return symbol; } @@ -49843,17 +50761,18 @@ var ts; // results for union and intersection types for performance reasons. function couldContainTypeVariables(type) { var objectFlags = ts.getObjectFlags(type); - return !!(type.flags & 63176704 /* Instantiable */ || + if (objectFlags & 67108864 /* CouldContainTypeVariablesComputed */) { + return !!(objectFlags & 134217728 /* CouldContainTypeVariables */); + } + var result = !!(type.flags & 63176704 /* Instantiable */ || objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 131072 /* ObjectRestType */) || - type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && couldUnionOrIntersectionContainTypeVariables(type)); - } - function couldUnionOrIntersectionContainTypeVariables(type) { - if (type.couldContainTypeVariables === undefined) { - type.couldContainTypeVariables = ts.some(type.types, couldContainTypeVariables); + type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && ts.some(type.types, couldContainTypeVariables)); + if (type.flags & 3899393 /* ObjectFlagsType */) { + type.objectFlags |= 67108864 /* CouldContainTypeVariablesComputed */ | (result ? 134217728 /* CouldContainTypeVariables */ : 0); } - return type.couldContainTypeVariables; + return result; } function isTypeParameterAtTopLevel(type, typeParameter) { return !!(type === typeParameter || @@ -49999,6 +50918,12 @@ var ts; inference.contraCandidates ? getIntersectionType(inference.contraCandidates) : undefined; } + function hasSkipDirectInferenceFlag(node) { + return !!getNodeLinks(node).skipDirectInference; + } + function isFromInferenceBlockedSource(type) { + return !!(type.symbol && ts.some(type.symbol.declarations, hasSkipDirectInferenceFlag)); + } function inferTypes(inferences, originalSource, originalTarget, priority, contravariant) { if (priority === void 0) { priority = 0; } if (contravariant === void 0) { contravariant = false; } @@ -50090,7 +51015,7 @@ var ts; // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). if (ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ || source === nonInferrableAnyType || source === silentNeverType || - (priority & 32 /* ReturnType */ && (source === autoType || source === autoArrayType))) { + (priority & 32 /* ReturnType */ && (source === autoType || source === autoArrayType)) || isFromInferenceBlockedSource(source)) { return; } var inference = getInferenceInfoForType(target); @@ -50211,6 +51136,12 @@ var ts; invokeOnce(source, target, inferFromObjectTypes); } } + if (source.flags & 25165824 /* Simplifiable */) { + var simplified = getSimplifiedType(source, contravariant); + if (simplified !== source) { + inferFromTypes(simplified, target); + } + } } function inferWithPriority(source, target, newPriority) { var savePriority = priority; @@ -50388,7 +51319,7 @@ var ts; // type and then make a secondary inference from that type to T. We make a secondary inference // such that direct inferences to T get priority over inferences to Partial, for example. var inference = getInferenceInfoForType(constraintType.type); - if (inference && !inference.isFixed) { + if (inference && !inference.isFixed && !isFromInferenceBlockedSource(source)) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { // We assign a lower priority to inferences made from types containing non-inferrable @@ -50550,7 +51481,7 @@ var ts; } } function isTypeOrBaseIdenticalTo(s, t) { - return isTypeIdenticalTo(s, t) || !!(s.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) && isTypeIdenticalTo(getBaseTypeOfLiteralType(s), t); + return isTypeIdenticalTo(s, t) || !!(t.flags & 4 /* String */ && s.flags & 128 /* StringLiteral */ || t.flags & 8 /* Number */ && s.flags & 256 /* NumberLiteral */); } function isTypeCloselyMatchedBy(s, t) { return !!(s.flags & 524288 /* Object */ && t.flags & 524288 /* Object */ && s.symbol && s.symbol === t.symbol || @@ -51320,6 +52251,8 @@ var ts; return getExplicitTypeOfSymbol(symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol, diagnostic); case 104 /* ThisKeyword */: return getExplicitThisType(node); + case 102 /* SuperKeyword */: + return checkSuperExpression(node); case 194 /* PropertyAccessExpression */: var type = getTypeOfDottedName(node.expression, diagnostic); var prop = type && getPropertyOfType(type, node.name.escapedText); @@ -51375,14 +52308,11 @@ var ts; diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis)); } function isReachableFlowNode(flow) { - var result = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); + var result = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ false); lastFlowNode = flow; lastFlowNodeReachable = result; return result; } - function isUnlockedReachableFlowNode(flow) { - return !(flow.flags & 4096 /* PreFinally */ && flow.lock.locked) && isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); - } function isFalseExpression(expr) { var node = ts.skipParentheses(expr); return node.kind === 91 /* FalseKeyword */ || node.kind === 209 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || @@ -51394,15 +52324,15 @@ var ts; return lastFlowNodeReachable; } var flags = flow.flags; - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { if (!noCacheCheck) { var id = getFlowNodeId(flow); var reachable = flowNodeReachable[id]; - return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ true)); + return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ true)); } noCacheCheck = false; } - if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */ | 4096 /* PreFinally */)) { + if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */)) { flow = flow.antecedent; } else if (flags & 512 /* Call */) { @@ -51423,7 +52353,7 @@ var ts; } else if (flags & 4 /* BranchLabel */) { // A branching point is reachable if any branch is reachable. - return ts.some(flow.antecedents, isUnlockedReachableFlowNode); + return ts.some(flow.antecedents, function (f) { return isReachableFlowNodeWorker(f, /*noCacheCheck*/ false); }); } else if (flags & 8 /* LoopLabel */) { // A loop is reachable if the control flow path that leads to the top is reachable. @@ -51437,12 +52367,14 @@ var ts; } flow = flow.antecedent; } - else if (flags & 8192 /* AfterFinally */) { - // Cache is unreliable once we start locking nodes + else if (flags & 1024 /* ReduceLabel */) { + // Cache is unreliable once we start adjusting labels lastFlowNode = undefined; - flow.locked = true; - var result = isReachableFlowNodeWorker(flow.antecedent, /*skipCacheCheck*/ false); - flow.locked = false; + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; + var result = isReachableFlowNodeWorker(flow.antecedent, /*noCacheCheck*/ false); + target.antecedents = saveAntecedents; return result; } else { @@ -51492,7 +52424,7 @@ var ts; flowDepth++; while (true) { var flags = flow.flags; - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { // We cache results of flow type resolution for shared nodes that were previously visited in // the same getFlowTypeOfReference invocation. A node is considered shared when it is the // antecedent of more than one node. @@ -51504,19 +52436,7 @@ var ts; } } var type = void 0; - if (flags & 8192 /* AfterFinally */) { - // block flow edge: finally -> pre-try (for larger explanation check comment in binder.ts - bindTryStatement - flow.locked = true; - type = getTypeAtFlowNode(flow.antecedent); - flow.locked = false; - } - else if (flags & 4096 /* PreFinally */) { - // locked pre-finally flows are filtered out in getTypeAtFlowBranchLabel - // so here just redirect to antecedent - flow = flow.antecedent; - continue; - } - else if (flags & 16 /* Assignment */) { + if (flags & 16 /* Assignment */) { type = getTypeAtFlowAssignment(flow); if (!type) { flow = flow.antecedent; @@ -51552,6 +52472,13 @@ var ts; continue; } } + else if (flags & 1024 /* ReduceLabel */) { + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; + type = getTypeAtFlowNode(flow.antecedent); + target.antecedents = saveAntecedents; + } else if (flags & 2 /* Start */) { // Check if we should continue with the control flow of the containing function. var container = flow.node; @@ -51570,7 +52497,7 @@ var ts; // simply return the non-auto declared type to reduce follow-on errors. type = convertAutoToAny(declaredType); } - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { // Record visited node and the associated type in the cache. sharedFlowNodes[sharedFlowCount] = flow; sharedFlowTypes[sharedFlowCount] = type; @@ -51754,12 +52681,6 @@ var ts; var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; - if (antecedent.flags & 4096 /* PreFinally */ && antecedent.lock.locked) { - // if flow correspond to branch from pre-try to finally and this branch is locked - this means that - // we initially have started following the flow outside the finally block. - // in this case we should ignore this branch. - continue; - } if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.clauseStart === antecedent.clauseEnd) { // The antecedent is the bypass branch of a potentially exhaustive switch statement. bypassFlow = antecedent; @@ -52439,12 +53360,19 @@ var ts; } /** remove undefined from the annotated type of a parameter when there is an initializer (that doesn't include undefined) */ function removeOptionalityFromDeclaredType(declaredType, declaration) { - var annotationIncludesUndefined = strictNullChecks && - declaration.kind === 156 /* Parameter */ && - declaration.initializer && - getFalsyFlags(declaredType) & 32768 /* Undefined */ && - !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768 /* Undefined */); - return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; + if (pushTypeResolution(declaration.symbol, 2 /* DeclaredType */)) { + var annotationIncludesUndefined = strictNullChecks && + declaration.kind === 156 /* Parameter */ && + declaration.initializer && + getFalsyFlags(declaredType) & 32768 /* Undefined */ && + !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768 /* Undefined */); + popTypeResolution(); + return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; + } + else { + reportCircularityError(declaration.symbol); + return declaredType; + } } function isConstraintPosition(node) { var parent = node.parent; @@ -52470,8 +53398,13 @@ var ts; return !!ts.findAncestor(location, function (e) { return e.parent && ts.isExportAssignment(e.parent) && e.parent.expression === e && ts.isEntityNameExpression(e); }); } function markAliasReferenced(symbol, location) { - if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && ((compilerOptions.preserveConstEnums && isExportOrExportExpression(location)) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol)))) { - markAliasSymbolAsReferenced(symbol); + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol)) { + if (compilerOptions.preserveConstEnums && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + markAliasSymbolAsReferenced(symbol); + } + else { + markConstEnumAliasAsReferenced(symbol); + } } } function checkIdentifier(node) { @@ -52810,7 +53743,7 @@ var ts; break; case 159 /* PropertyDeclaration */: case 158 /* PropertySignature */: - if (ts.hasModifier(container, 32 /* Static */)) { + if (ts.hasModifier(container, 32 /* Static */) && !(compilerOptions.target === 99 /* ESNext */ && compilerOptions.useDefineForClassFields)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks } @@ -53216,7 +54149,7 @@ var ts; } // In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the // contextual type for 'this' is 'obj'. - var parent = func.parent; + var parent = ts.walkUpParenthesizedExpressions(func.parent); if (parent.kind === 209 /* BinaryExpression */ && parent.operatorToken.kind === 62 /* EqualsToken */) { var target = parent.left; if (ts.isAccessExpression(target)) { @@ -53235,7 +54168,7 @@ var ts; return undefined; } // Return contextual type of parameter or undefined if no contextual type is available - function getContextuallyTypedParameterType(parameter, forCache) { + function getContextuallyTypedParameterType(parameter) { var func = parameter.parent; if (!isContextSensitiveFunctionOrObjectLiteralMethod(func)) { return undefined; @@ -53258,19 +54191,6 @@ var ts; } var contextualSignature = getContextualSignature(func); if (contextualSignature) { - if (forCache) { - // Calling the below guarantees the types are primed and assigned in the same way - // as when the parameter is reached via `checkFunctionExpressionOrObjectLiteralMethod`. - // This should prevent any uninstantiated inference variables in the contextual signature - // from leaking, and should lock in cached parameter types via `assignContextualParameterTypes` - // which we will then immediately use the results of below. - contextuallyCheckFunctionExpressionOrObjectLiteralMethod(func); - var type = getTypeOfSymbol(getMergedSymbol(func.symbol)); - if (isTypeAny(type)) { - return type; - } - contextualSignature = getSignaturesOfType(type, 0 /* Call */)[0]; - } var index = func.parameters.indexOf(parameter) - (ts.getThisParameter(func) ? 1 : 0); return parameter.dotDotDotToken && ts.lastOrUndefined(func.parameters) === parameter ? getRestTypeAtPosition(contextualSignature, index) : @@ -53284,7 +54204,7 @@ var ts; } switch (declaration.kind) { case 156 /* Parameter */: - return getContextuallyTypedParameterType(declaration, /*forCache*/ false); + return getContextuallyTypedParameterType(declaration); case 191 /* BindingElement */: return getContextualTypeForBindingElement(declaration); // By default, do nothing and return undefined - only parameters and binding elements have context implied by a parent @@ -53401,18 +54321,15 @@ var ts; return undefined; } // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg, contextFlags) { + function getContextualTypeForArgument(callTarget, arg) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); // -1 for e.g. the expression of a CallExpression, or the tag of a TaggedTemplateExpression - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { // If we're already in the process of resolving the given signature, don't resolve again as // that could cause infinite recursion. Instead, return anySignature. var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); - if (contextFlags && contextFlags & 4 /* BaseConstraint */ && signature.target && !ts.hasTypeArguments(callTarget)) { - signature = getBaseSignature(signature.target); - } if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } @@ -53774,7 +54691,7 @@ var ts; } /* falls through */ case 197 /* NewExpression */: - return getContextualTypeForArgument(parent, node, contextFlags); + return getContextualTypeForArgument(parent, node); case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -53816,13 +54733,13 @@ var ts; return ancestor && ancestor.inferenceContext; } function getContextualJsxElementAttributesType(node, contextFlags) { - if (ts.isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== 4 /* BaseConstraint */) { + if (ts.isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== 4 /* Completions */) { // Contextually applied type is moved from attributes up to the outer jsx attributes so when walking up from the children they get hit // _However_ to hit them from the _attributes_ we must look for them here; otherwise we'll used the declared type // (as below) instead! return node.parent.contextualType; } - return getContextualTypeForArgumentAtIndex(node, 0, contextFlags); + return getContextualTypeForArgumentAtIndex(node, 0); } function getEffectiveFirstArgumentForJsxSignature(signature, node) { return getJsxReferenceKind(node) !== 0 /* Component */ @@ -54028,58 +54945,73 @@ var ts; function checkArrayLiteral(node, checkMode, forceTuple) { var elements = node.elements; var elementCount = elements.length; - var hasNonEndingSpreadElement = false; var elementTypes = []; - var inDestructuringPattern = ts.isAssignmentTarget(node); + var hasEndingSpreadElement = false; + var hasNonEndingSpreadElement = false; var contextualType = getApparentTypeOfContextualType(node); + var inDestructuringPattern = ts.isAssignmentTarget(node); var inConstContext = isConstContext(node); - for (var index = 0; index < elementCount; index++) { - var e = elements[index]; - if (inDestructuringPattern && e.kind === 213 /* SpreadElement */) { - // Given the following situation: - // var c: {}; - // [...c] = ["", 0]; - // - // c is represented in the tree as a spread element in an array literal. - // But c really functions as a rest element, and its purpose is to provide - // a contextual type for the right hand side of the assignment. Therefore, - // instead of calling checkExpression on "...c", which will give an error - // if c is not iterable/array-like, we need to act as if we are trying to - // get the contextual element type from it. So we do something similar to - // getContextualTypeForElementExpression, which will crucially not error - // if there is no index type / iterated type. - var restArrayType = checkExpression(e.expression, checkMode, forceTuple); - var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) || - getIteratedTypeOrElementType(65 /* Destructuring */, restArrayType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); - if (restElementType) { - elementTypes.push(restElementType); + for (var i = 0; i < elementCount; i++) { + var e = elements[i]; + var spread = e.kind === 213 /* SpreadElement */ && e.expression; + var spreadType = spread && checkExpression(spread, checkMode, forceTuple); + if (spreadType && isTupleType(spreadType)) { + elementTypes.push.apply(elementTypes, getTypeArguments(spreadType)); + if (spreadType.target.hasRestElement) { + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; } } else { - var elementContextualType = getContextualTypeForElementExpression(contextualType, index); - var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); - elementTypes.push(type); - } - if (index < elementCount - 1 && e.kind === 213 /* SpreadElement */) { - hasNonEndingSpreadElement = true; + if (inDestructuringPattern && spreadType) { + // Given the following situation: + // var c: {}; + // [...c] = ["", 0]; + // + // c is represented in the tree as a spread element in an array literal. + // But c really functions as a rest element, and its purpose is to provide + // a contextual type for the right hand side of the assignment. Therefore, + // instead of calling checkExpression on "...c", which will give an error + // if c is not iterable/array-like, we need to act as if we are trying to + // get the contextual element type from it. So we do something similar to + // getContextualTypeForElementExpression, which will crucially not error + // if there is no index type / iterated type. + var restElementType = getIndexTypeOfType(spreadType, 1 /* Number */) || + getIteratedTypeOrElementType(65 /* Destructuring */, spreadType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); + if (restElementType) { + elementTypes.push(restElementType); + } + } + else { + var elementContextualType = getContextualTypeForElementExpression(contextualType, elementTypes.length); + var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); + elementTypes.push(type); + } + if (spread) { // tuples are done above, so these are only arrays + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; + } } } if (!hasNonEndingSpreadElement) { - var hasRestElement = elementCount > 0 && elements[elementCount - 1].kind === 213 /* SpreadElement */; - var minLength = elementCount - (hasRestElement ? 1 : 0); + var minLength = elementTypes.length - (hasEndingSpreadElement ? 1 : 0); // If array literal is actually a destructuring pattern, mark it as an implied type. We do this such // that we get the same behavior for "var [x, y] = []" and "[x, y] = []". var tupleResult = void 0; if (inDestructuringPattern && minLength > 0) { - var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasRestElement)); + var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); type.pattern = node; return type; } - else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasRestElement, elementCount, inConstContext)) { + else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasEndingSpreadElement, elementTypes.length, inConstContext)) { return createArrayLiteralType(tupleResult); } else if (forceTuple) { - return createArrayLiteralType(createTupleType(elementTypes, minLength, hasRestElement)); + return createArrayLiteralType(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); } } return createArrayLiteralType(createArrayType(elementTypes.length ? @@ -54316,10 +55248,12 @@ var ts; } // If object literal is contextually typed by the implied type of a binding pattern, augment the result // type with those properties for which the binding pattern specifies a default value. - if (contextualTypeHasPattern) { + // If the object literal is spread into another object literal, skip this step and let the top-level object + // literal handle it instead. + if (contextualTypeHasPattern && node.parent.kind !== 283 /* SpreadAssignment */) { for (var _i = 0, _a = getPropertiesOfType(contextualType); _i < _a.length; _i++) { var prop = _a[_i]; - if (!propertiesTable.get(prop.escapedName) && !(spread && getPropertyOfType(spread, prop.escapedName))) { + if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } @@ -54370,6 +55304,7 @@ var ts; } function checkJsxSelfClosingElementDeferred(node) { checkJsxOpeningLikeElementOrOpeningFragment(node); + resolveUntypedCall(node); // ensure type arguments and parameters are typechecked, even if there is an arity error } function checkJsxSelfClosingElement(node, _checkMode) { checkNodeDeferred(node); @@ -54811,7 +55746,7 @@ var ts; // if jsx emit was not react as there wont be error being emitted reactSym.isReferenced = 67108863 /* All */; // If react symbol is alias, mark it as refereced - if (reactSym.flags & 2097152 /* Alias */) { + if (reactSym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(reactSym)) { markAliasSymbolAsReferenced(reactSym); } } @@ -54979,7 +55914,7 @@ var ts; return false; } var thisType = getTypeFromTypeNode(thisParameter.type); - enclosingClass = ((thisType.flags & 262144 /* TypeParameter */) ? getConstraintOfTypeParameter(thisType) : thisType); + enclosingClass = ((thisType.flags & 262144 /* TypeParameter */) ? getConstraintOfTypeParameter(thisType) : thisType).target; } // No further restrictions for static properties if (flags & 32 /* Static */) { @@ -55937,8 +56872,83 @@ var ts; // can be specified by users through attributes property. var paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); var attributesType = checkExpressionWithContextualType(node.attributes, paramType, /*inferenceContext*/ undefined, checkMode); - return checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, + return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, /*headMessage*/ undefined, containingMessageChain, errorOutputContainer); + function checkTagNameDoesNotExpectTooManyArguments() { + var _a; + var tagType = ts.isJsxOpeningElement(node) || ts.isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : undefined; + if (!tagType) { + return true; + } + var tagCallSignatures = getSignaturesOfType(tagType, 0 /* Call */); + if (!ts.length(tagCallSignatures)) { + return true; + } + var factory = getJsxFactoryEntity(node); + if (!factory) { + return true; + } + var factorySymbol = resolveEntityName(factory, 111551 /* Value */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, node); + if (!factorySymbol) { + return true; + } + var factoryType = getTypeOfSymbol(factorySymbol); + var callSignatures = getSignaturesOfType(factoryType, 0 /* Call */); + if (!ts.length(callSignatures)) { + return true; + } + var hasFirstParamSignatures = false; + var maxParamCount = 0; + // Check that _some_ first parameter expects a FC-like thing, and that some overload of the SFC expects an acceptable number of arguments + for (var _i = 0, callSignatures_1 = callSignatures; _i < callSignatures_1.length; _i++) { + var sig = callSignatures_1[_i]; + var firstparam = getTypeAtPosition(sig, 0); + var signaturesOfParam = getSignaturesOfType(firstparam, 0 /* Call */); + if (!ts.length(signaturesOfParam)) + continue; + for (var _b = 0, signaturesOfParam_1 = signaturesOfParam; _b < signaturesOfParam_1.length; _b++) { + var paramSig = signaturesOfParam_1[_b]; + hasFirstParamSignatures = true; + if (hasEffectiveRestParameter(paramSig)) { + return true; // some signature has a rest param, so function components can have an arbitrary number of arguments + } + var paramCount = getParameterCount(paramSig); + if (paramCount > maxParamCount) { + maxParamCount = paramCount; + } + } + } + if (!hasFirstParamSignatures) { + // Not a single signature had a first parameter which expected a signature - for back compat, and + // to guard against generic factories which won't have signatures directly, do not error + return true; + } + var absoluteMinArgCount = Infinity; + for (var _c = 0, tagCallSignatures_1 = tagCallSignatures; _c < tagCallSignatures_1.length; _c++) { + var tagSig = tagCallSignatures_1[_c]; + var tagRequiredArgCount = getMinArgumentCount(tagSig); + if (tagRequiredArgCount < absoluteMinArgCount) { + absoluteMinArgCount = tagRequiredArgCount; + } + } + if (absoluteMinArgCount <= maxParamCount) { + return true; // some signature accepts the number of arguments the function component provides + } + if (reportErrors) { + var diag = ts.createDiagnosticForNode(node.tagName, ts.Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, ts.entityNameToString(node.tagName), absoluteMinArgCount, ts.entityNameToString(factory), maxParamCount); + var tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) === null || _a === void 0 ? void 0 : _a.valueDeclaration; + if (tagNameDeclaration) { + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(tagNameDeclaration, ts.Diagnostics._0_is_declared_here, ts.entityNameToString(node.tagName))); + } + if (errorOutputContainer && errorOutputContainer.skipLogging) { + (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); + } + if (!errorOutputContainer.skipLogging) { + diagnostics.add(diag); + } + } + return false; + } } function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors, containingMessageChain) { var errorOutputContainer = { errors: undefined, skipLogging: true }; @@ -56419,7 +57429,7 @@ var ts; } } } - return produceDiagnostics || !args ? resolveErrorCall(node) : getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); + return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); function chooseOverload(candidates, relation, signatureHelpTrailingComma) { if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; } candidatesForArgumentError = undefined; @@ -56501,9 +57511,9 @@ var ts; } } // No signature was applicable. We have already reported the errors for the invalid signature. - // If this is a type resolution session, e.g. Language Service, try to get better information than anySignature. function getCandidateForOverloadFailure(node, candidates, args, hasCandidatesOutArray) { ts.Debug.assert(candidates.length > 0); // Else should not have called this. + checkNodeDeferred(node); // Normally we will combine overloads. Skip this if they have type parameters since that's hard to combine. // Don't do this if there is a `candidatesOutArray`, // because then we want the chosen best candidate to be one of the overloads, not a combination. @@ -56678,7 +57688,7 @@ var ts; if (node.arguments.length === 1) { var text = ts.getSourceFileOfNode(node).text; if (ts.isLineBreak(text.charCodeAt(ts.skipTrivia(text, node.expression.end, /* stopAfterLineBreak */ true) - 1))) { - relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.It_is_highly_likely_that_you_are_missing_a_semicolon); + relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.Are_you_missing_a_semicolon); } } invocationError(node.expression, apparentType, 0 /* Call */, relatedInformation); @@ -57567,15 +58577,15 @@ var ts; if (!parameter) { signature.thisParameter = createSymbolWithType(context.thisParameter, /*type*/ undefined); } - assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); + assignParameterType(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { - var contextualParameterType = getTypeAtPosition(context, i); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + var contextualParameterType = tryGetTypeAtPosition(context, i); + assignParameterType(parameter, contextualParameterType); } } if (signatureHasRestParameter(signature)) { @@ -57583,7 +58593,30 @@ var ts; var parameter = ts.last(signature.parameters); if (ts.isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { var contextualParameterType = getRestTypeAtPosition(context, len); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + assignParameterType(parameter, contextualParameterType); + } + } + } + function assignNonContextualParameterTypes(signature) { + if (signature.thisParameter) { + assignParameterType(signature.thisParameter); + } + for (var _i = 0, _a = signature.parameters; _i < _a.length; _i++) { + var parameter = _a[_i]; + assignParameterType(parameter); + } + } + function assignParameterType(parameter, type) { + var links = getSymbolLinks(parameter); + if (!links.type) { + var declaration = parameter.valueDeclaration; + links.type = type || getWidenedTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true); + if (declaration.name.kind !== 75 /* Identifier */) { + // if inference didn't come up with anything but unknown, fall back to the binding pattern if present. + if (links.type === unknownType) { + links.type = getTypeFromBindingPattern(declaration.name); + } + assignBindingElementTypes(declaration.name); } } } @@ -57602,20 +58635,6 @@ var ts; } } } - function assignTypeToParameterAndFixTypeParameters(parameter, contextualType) { - var links = getSymbolLinks(parameter); - if (!links.type) { - links.type = contextualType; - var decl = parameter.valueDeclaration; - if (decl.name.kind !== 75 /* Identifier */) { - // if inference didn't come up with anything but unknown, fall back to the binding pattern if present. - if (links.type === unknownType) { - links.type = getTypeFromBindingPattern(decl.name); - } - assignBindingElementTypes(decl.name); - } - } - } function createPromiseType(promisedType) { // creates a `Promise` type where `T` is the promisedType argument var globalPromiseType = getGlobalPromiseType(/*reportErrors*/ true); @@ -57977,7 +58996,7 @@ var ts; // The identityMapper object is used to indicate that function expressions are wildcards if (checkMode && checkMode & 4 /* SkipContextSensitive */ && isContextSensitive(node)) { // Skip parameters, return signature with return type that retains noncontextual parts so inferences can still be drawn in an early stage - if (!ts.getEffectiveReturnTypeNode(node) && hasContextSensitiveReturnExpression(node)) { + if (!ts.getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) { // Return plain anyFunctionType if there is no possibility we'll make inferences from the return type var contextualSignature = getContextualSignature(node); if (contextualSignature && couldContainTypeVariables(getReturnTypeOfSignature(contextualSignature))) { @@ -57999,12 +59018,8 @@ var ts; if (!hasGrammarError && node.kind === 201 /* FunctionExpression */) { checkGrammarForGenerator(node); } - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return type; - } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); - return type; + return getTypeOfSymbol(getSymbolOfNode(node)); } function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) { var links = getNodeLinks(node); @@ -58016,13 +59031,12 @@ var ts; // already assigned contextual types. if (!(links.flags & 1024 /* ContextChecked */)) { links.flags |= 1024 /* ContextChecked */; - if (contextualSignature) { - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return; - } - var signature = getSignaturesOfType(type, 0 /* Call */)[0]; - if (isContextSensitive(node)) { + var signature = ts.firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfNode(node)), 0 /* Call */)); + if (!signature) { + return; + } + if (isContextSensitive(node)) { + if (contextualSignature) { var inferenceContext = getInferenceContext(node); if (checkMode && checkMode & 2 /* Inferential */) { inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext); @@ -58031,11 +59045,15 @@ var ts; instantiateSignature(contextualSignature, inferenceContext.mapper) : contextualSignature; assignContextualParameterTypes(signature, instantiatedContextualSignature); } - if (!getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { - var returnType = getReturnTypeFromBody(node, checkMode); - if (!signature.resolvedReturnType) { - signature.resolvedReturnType = returnType; - } + else { + // Force resolution of all parameter types such that the absence of a contextual type is consistently reflected. + assignNonContextualParameterTypes(signature); + } + } + if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { + var returnType = getReturnTypeFromBody(node, checkMode); + if (!signature.resolvedReturnType) { + signature.resolvedReturnType = returnType; } } checkSignatureDeclaration(node); @@ -58351,7 +59369,7 @@ var ts; // Return true if type might be of the given kind. A union or intersection type might be of a given // kind if at least one constituent type is of the given kind. function maybeTypeOfKind(type, kind) { - if (type.flags & kind & ~131072 /* GenericMappedType */ || kind & 131072 /* GenericMappedType */ && isGenericMappedType(type)) { + if (type.flags & kind) { return true; } if (type.flags & 3145728 /* UnionOrIntersection */) { @@ -58648,12 +59666,81 @@ var ts; function isTypeEqualityComparableTo(source, target) { return (target.flags & 98304 /* Nullable */) !== 0 || isTypeComparableTo(source, target); } + var CheckBinaryExpressionState; + (function (CheckBinaryExpressionState) { + CheckBinaryExpressionState[CheckBinaryExpressionState["MaybeCheckLeft"] = 0] = "MaybeCheckLeft"; + CheckBinaryExpressionState[CheckBinaryExpressionState["CheckRight"] = 1] = "CheckRight"; + CheckBinaryExpressionState[CheckBinaryExpressionState["FinishCheck"] = 2] = "FinishCheck"; + })(CheckBinaryExpressionState || (CheckBinaryExpressionState = {})); function checkBinaryExpression(node, checkMode) { - if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { - return checkExpression(node.right, checkMode); + var workStacks = { + expr: [node], + state: [0 /* MaybeCheckLeft */], + leftType: [undefined] + }; + var stackIndex = 0; + var lastResult; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0 /* MaybeCheckLeft */: { + if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { + finishInvocation(checkExpression(node.right, checkMode)); + break; + } + checkGrammarNullishCoalesceWithLogicalExpression(node); + var operator = node.operatorToken.kind; + if (operator === 62 /* EqualsToken */ && (node.left.kind === 193 /* ObjectLiteralExpression */ || node.left.kind === 192 /* ArrayLiteralExpression */)) { + finishInvocation(checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 104 /* ThisKeyword */)); + break; + } + advanceState(1 /* CheckRight */); + maybeCheckExpression(node.left); + break; + } + case 1 /* CheckRight */: { + var leftType = lastResult; + workStacks.leftType[stackIndex] = leftType; + var operator = node.operatorToken.kind; + if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { + checkTruthinessOfType(leftType, node.left); + } + advanceState(2 /* FinishCheck */); + maybeCheckExpression(node.right); + break; + } + case 2 /* FinishCheck */: { + var leftType = workStacks.leftType[stackIndex]; + var rightType = lastResult; + finishInvocation(checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node)); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for checkBinaryExpression"); + } + } + return lastResult; + function finishInvocation(result) { + lastResult = result; + stackIndex--; + } + /** + * Note that `advanceState` sets the _current_ head state, and that `maybeCheckExpression` potentially pushes on a new + * head state; so `advanceState` must be called before any `maybeCheckExpression` during a state's execution. + */ + function advanceState(nextState) { + workStacks.state[stackIndex] = nextState; + } + function maybeCheckExpression(node) { + if (ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0 /* MaybeCheckLeft */; + workStacks.leftType[stackIndex] = undefined; + } + else { + lastResult = checkExpression(node, checkMode); + } } - checkGrammarNullishCoalesceWithLogicalExpression(node); - return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, checkMode, node); } function checkGrammarNullishCoalesceWithLogicalExpression(node) { var left = node.left, operatorToken = node.operatorToken, right = node.right; @@ -58666,6 +59753,8 @@ var ts; } } } + // Note that this and `checkBinaryExpression` above should behave mostly the same, except this elides some + // expression-wide checks and does not use a work stack to fold nested binary expressions into the same callstack frame function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { var operator = operatorToken.kind; if (operator === 62 /* EqualsToken */ && (left.kind === 193 /* ObjectLiteralExpression */ || left.kind === 192 /* ArrayLiteralExpression */)) { @@ -58679,6 +59768,10 @@ var ts; leftType = checkExpression(left, checkMode); } var rightType = checkExpression(right, checkMode); + return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode); + } + function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode) { + var operator = operatorToken.kind; switch (operator) { case 41 /* AsteriskToken */: case 42 /* AsteriskAsteriskToken */: @@ -59049,7 +60142,8 @@ var ts; return getContextualIterationType(2 /* Next */, func) || anyType; } function checkConditionalExpression(node, checkMode) { - checkTruthinessExpression(node.condition); + var type = checkTruthinessExpression(node.condition); + checkTestingKnownTruthyCallableType(node.condition, node.whenTrue, type); var type1 = checkExpression(node.whenTrue, checkMode); var type2 = checkExpression(node.whenFalse, checkMode); return getUnionType([type1, type2], 2 /* Subtype */); @@ -59077,17 +60171,24 @@ var ts; var context = getContextNode(node); var saveContextualType = context.contextualType; var saveInferenceContext = context.inferenceContext; - context.contextualType = contextualType; - context.inferenceContext = inferenceContext; - var type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0)); - // We strip literal freshness when an appropriate contextual type is present such that contextually typed - // literals always preserve their literal types (otherwise they might widen during type inference). An alternative - // here would be to not mark contextually typed literals as fresh in the first place. - var result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? - getRegularTypeOfLiteralType(type) : type; - context.contextualType = saveContextualType; - context.inferenceContext = saveInferenceContext; - return result; + try { + context.contextualType = contextualType; + context.inferenceContext = inferenceContext; + var type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0)); + // We strip literal freshness when an appropriate contextual type is present such that contextually typed + // literals always preserve their literal types (otherwise they might widen during type inference). An alternative + // here would be to not mark contextually typed literals as fresh in the first place. + var result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? + getRegularTypeOfLiteralType(type) : type; + return result; + } + finally { + // In the event our operation is canceled or some other exception occurs, reset the contextual type + // so that we do not accidentally hold onto an instance of the checker, as a Type created in the services layer + // may hold onto the checker that created it. + context.contextualType = saveContextualType; + context.inferenceContext = saveInferenceContext; + } } function checkExpressionCached(node, checkMode) { var links = getNodeLinks(node); @@ -59409,9 +60510,16 @@ var ts; } var saveContextualType = node.contextualType; node.contextualType = anyType; - var type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */); - node.contextualType = saveContextualType; - return type; + try { + var type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */); + return type; + } + finally { + // In the event our operation is canceled or some other exception occurs, reset the contextual type + // so that we do not accidentally hold onto an instance of the checker, as a Type created in the services layer + // may hold onto the checker that created it. + node.contextualType = saveContextualType; + } } function checkExpression(node, checkMode, forceTuple) { var saveCurrentNode = currentNode; @@ -60273,7 +61381,7 @@ var ts; getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return ts.hasModifier(node, 8 /* Private */) && !!(node.flags & 8388608 /* Ambient */); + return (ts.hasModifier(node, 8 /* Private */) || ts.isPrivateIdentifierPropertyDeclaration(node)) && !!(node.flags & 8388608 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedModifierFlags(n); @@ -60566,9 +61674,9 @@ var ts; case 247 /* TypeAliasDeclaration */: // A jsdoc typedef and callback are, by definition, type aliases. // falls through - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return 2 /* ExportType */; case 249 /* ModuleDeclaration */: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ @@ -60576,6 +61684,7 @@ var ts; : 4 /* ExportNamespace */; case 245 /* ClassDeclaration */: case 248 /* EnumDeclaration */: + case 284 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; case 290 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; @@ -60590,10 +61699,10 @@ var ts; case 253 /* ImportEqualsDeclaration */: case 256 /* NamespaceImport */: case 255 /* ImportClause */: - var result_7 = 0 /* None */; + var result_8 = 0 /* None */; var target = resolveAlias(getSymbolOfNode(d)); - ts.forEach(target.declarations, function (d) { result_7 |= getDeclarationSpaces(d); }); - return result_7; + ts.forEach(target.declarations, function (d) { result_8 |= getDeclarationSpaces(d); }); + return result_8; case 242 /* VariableDeclaration */: case 191 /* BindingElement */: case 244 /* FunctionDeclaration */: @@ -60916,7 +62025,8 @@ var ts; if (rootSymbol && rootSymbol.flags & 2097152 /* Alias */ && symbolIsValue(rootSymbol) - && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol))) { + && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol)) + && !getTypeOnlyAliasDeclaration(rootSymbol)) { markAliasSymbolAsReferenced(rootSymbol); } } @@ -61110,6 +62220,13 @@ var ts; } checkSignatureDeclaration(node); } + function checkJSDocImplementsTag(node) { + var classLike = ts.getJSDocHost(node); + if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { + error(classLike, ts.Diagnostics.JSDoc_0_is_not_attached_to_a_class, ts.idText(node.tagName)); + return; + } + } function checkJSDocAugmentsTag(node) { var classLike = ts.getJSDocHost(node); if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { @@ -61282,7 +62399,9 @@ var ts; break; } var symbol = getSymbolOfNode(member); - if (!symbol.isReferenced && (ts.hasModifier(member, 8 /* Private */) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name))) { + if (!symbol.isReferenced + && (ts.hasModifier(member, 8 /* Private */) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name)) + && !(member.flags & 8388608 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, ts.createDiagnosticForNode(member.name, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; @@ -61847,21 +62966,21 @@ var ts; // Grammar checking checkGrammarStatementInAmbientContext(node); var type = checkTruthinessExpression(node.expression); - checkTestingKnownTruthyCallableType(node, type); + checkTestingKnownTruthyCallableType(node.expression, node.thenStatement, type); checkSourceElement(node.thenStatement); if (node.thenStatement.kind === 224 /* EmptyStatement */) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); } - function checkTestingKnownTruthyCallableType(ifStatement, type) { + function checkTestingKnownTruthyCallableType(condExpr, body, type) { if (!strictNullChecks) { return; } - var testedNode = ts.isIdentifier(ifStatement.expression) - ? ifStatement.expression - : ts.isPropertyAccessExpression(ifStatement.expression) - ? ifStatement.expression.name + var testedNode = ts.isIdentifier(condExpr) + ? condExpr + : ts.isPropertyAccessExpression(condExpr) + ? condExpr.name : undefined; if (!testedNode) { return; @@ -61883,7 +63002,7 @@ var ts; if (!testedFunctionSymbol) { return; } - var functionIsUsedInBody = ts.forEachChild(ifStatement.thenStatement, function check(childNode) { + var functionIsUsedInBody = ts.forEachChild(body, function check(childNode) { if (ts.isIdentifier(childNode)) { var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol.id === testedFunctionSymbol.id) { @@ -61893,7 +63012,7 @@ var ts; return ts.forEachChild(childNode, check); }); if (!functionIsUsedInBody) { - error(ifStatement.expression, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); + error(condExpr, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); } } function checkDoStatement(node) { @@ -61908,13 +63027,15 @@ var ts; checkTruthinessExpression(node.expression); checkSourceElement(node.statement); } - function checkTruthinessExpression(node, checkMode) { - var type = checkExpression(node, checkMode); + function checkTruthinessOfType(type, node) { if (type.flags & 16384 /* Void */) { error(node, ts.Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); } return type; } + function checkTruthinessExpression(node, checkMode) { + return checkTruthinessOfType(checkExpression(node, checkMode), node); + } function checkForStatement(node) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { @@ -62214,6 +63335,12 @@ var ts; } return noIterationTypes; } + function getCachedIterationTypes(type, cacheKey) { + return type[cacheKey]; + } + function setCachedIterationTypes(type, cacheKey, cachedTypes) { + return type[cacheKey] = cachedTypes; + } /** * Gets the *yield*, *return*, and *next* types from an `Iterable`-like or `AsyncIterable`-like type. * @@ -62250,7 +63377,7 @@ var ts; return iterationTypes_1; } var cacheKey = use & 2 /* AllowsAsyncIterablesFlag */ ? "iterationTypesOfAsyncIterable" : "iterationTypesOfIterable"; - var cachedTypes = type[cacheKey]; + var cachedTypes = getCachedIterationTypes(type, cacheKey); if (cachedTypes) return cachedTypes === noIterationTypes ? undefined : cachedTypes; var allIterationTypes; @@ -62268,7 +63395,7 @@ var ts; } } var iterationTypes = allIterationTypes ? combineIterationTypes(allIterationTypes) : noIterationTypes; - type[cacheKey] = iterationTypes; + setCachedIterationTypes(type, cacheKey, iterationTypes); return iterationTypes === noIterationTypes ? undefined : iterationTypes; } function getAsyncFromSyncIterationTypes(iterationTypes, errorNode) { @@ -62307,7 +63434,7 @@ var ts; if (use & 2 /* AllowsAsyncIterablesFlag */) { // for a sync iterable in an async context, only use the cached types if they are valid. if (iterationTypes !== noIterationTypes) { - return type.iterationTypesOfAsyncIterable = getAsyncFromSyncIterationTypes(iterationTypes, errorNode); + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", getAsyncFromSyncIterationTypes(iterationTypes, errorNode)); } } else { @@ -62325,9 +63452,9 @@ var ts; var iterationTypes = getIterationTypesOfIterableSlow(type, syncIterationTypesResolver, errorNode); if (iterationTypes !== noIterationTypes) { if (use & 2 /* AllowsAsyncIterablesFlag */) { - return type.iterationTypesOfAsyncIterable = iterationTypes + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", iterationTypes ? getAsyncFromSyncIterationTypes(iterationTypes, errorNode) - : noIterationTypes; + : noIterationTypes); } else { return iterationTypes; @@ -62344,7 +63471,7 @@ var ts; * `getIterationTypesOfIterable` instead. */ function getIterationTypesOfIterableCached(type, resolver) { - return type[resolver.iterableCacheKey]; + return getCachedIterationTypes(type, resolver.iterableCacheKey); } function getIterationTypesOfGlobalIterableType(globalType, resolver) { var globalIterationTypes = getIterationTypesOfIterableCached(globalType, resolver) || @@ -62377,14 +63504,14 @@ var ts; // While we define these as `any` and `undefined` in our libs by default, a custom lib *could* use // different definitions. var _a = getIterationTypesOfGlobalIterableType(globalType, resolver), returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } // As an optimization, if the type is an instantiation of the following global type, then // just grab its related type arguments: // - `Generator` or `AsyncGenerator` if (isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } /** @@ -62398,18 +63525,19 @@ var ts; * `getIterationTypesOfIterable` instead. */ function getIterationTypesOfIterableSlow(type, resolver, errorNode) { + var _a; var method = getPropertyOfType(type, ts.getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName)); var methodType = method && !(method.flags & 16777216 /* Optional */) ? getTypeOfSymbol(method) : undefined; if (isTypeAny(methodType)) { - return type[resolver.iterableCacheKey] = anyIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes); } var signatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : undefined; if (!ts.some(signatures)) { - return type[resolver.iterableCacheKey] = noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes); } var iteratorType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), 2 /* Subtype */); - var iterationTypes = getIterationTypesOfIterator(iteratorType, resolver, errorNode) || noIterationTypes; - return type[resolver.iterableCacheKey] = iterationTypes; + var iterationTypes = (_a = getIterationTypesOfIterator(iteratorType, resolver, errorNode)) !== null && _a !== void 0 ? _a : noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes); } function reportTypeNotIterableError(errorNode, type, allowAsyncIterables) { var message = allowAsyncIterables @@ -62440,7 +63568,7 @@ var ts; * `getIterationTypesOfIterator` instead. */ function getIterationTypesOfIteratorCached(type, resolver) { - return type[resolver.iteratorCacheKey]; + return getCachedIterationTypes(type, resolver.iteratorCacheKey); } /** * Gets the iteration types of an `Iterator`-like or `AsyncIterator`-like type from the @@ -62469,12 +63597,12 @@ var ts; var globalIterationTypes = getIterationTypesOfIteratorCached(globalType, resolver) || getIterationTypesOfIteratorSlow(globalType, resolver, /*errorNode*/ undefined); var _a = globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes, returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } if (isReferenceToType(type, resolver.getGlobalIteratorType(/*reportErrors*/ false)) || isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } function isIteratorResult(type, kind) { @@ -62502,7 +63630,7 @@ var ts; if (isTypeAny(type)) { return anyIterationTypes; } - var cachedTypes = type.iterationTypesOfIteratorResult; + var cachedTypes = getCachedIterationTypes(type, "iterationTypesOfIteratorResult"); if (cachedTypes) { return cachedTypes; } @@ -62510,11 +63638,11 @@ var ts; // or `IteratorReturnResult` types, then just grab its type argument. if (isReferenceToType(type, getGlobalIteratorYieldResultType(/*reportErrors*/ false))) { var yieldType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType_1, /*returnType*/ undefined, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType_1, /*returnType*/ undefined, /*nextType*/ undefined)); } if (isReferenceToType(type, getGlobalIteratorReturnResultType(/*reportErrors*/ false))) { var returnType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(/*yieldType*/ undefined, returnType_1, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(/*yieldType*/ undefined, returnType_1, /*nextType*/ undefined)); } // Choose any constituents that can produce the requested iteration type. var yieldIteratorResult = filterType(type, isYieldIteratorResult); @@ -62522,13 +63650,13 @@ var ts; var returnIteratorResult = filterType(type, isReturnIteratorResult); var returnType = returnIteratorResult !== neverType ? getTypeOfPropertyOfType(returnIteratorResult, "value") : undefined; if (!yieldType && !returnType) { - return type.iterationTypesOfIteratorResult = noIterationTypes; + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", noIterationTypes); } // From https://tc39.github.io/ecma262/#sec-iteratorresult-interface // > ... If the iterator does not have a return value, `value` is `undefined`. In that case, the // > `value` property may be absent from the conforming object if it does not inherit an explicit // > `value` property. - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType, returnType || voidType, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType, returnType || voidType, /*nextType*/ undefined)); } /** * Gets the *yield*, *return*, and *next* types of a the `next()`, `return()`, or @@ -62621,7 +63749,7 @@ var ts; getIterationTypesOfMethod(type, resolver, "return", errorNode), getIterationTypesOfMethod(type, resolver, "throw", errorNode), ]); - return type[resolver.iteratorCacheKey] = iterationTypes; + return setCachedIterationTypes(type, resolver.iteratorCacheKey, iterationTypes); } /** * Gets the requested "iteration type" from a type that is either `Iterable`-like, `Iterator`-like, @@ -63015,7 +64143,7 @@ var ts; var sourceConstraint = constraint && getTypeFromTypeNode(constraint); var targetConstraint = getConstraintOfTypeParameter(target); // relax check if later interface augmentation has no constraint, it's more broad and is OK to merge with - // a more constrained interface (this could be generalized to a full heirarchy check, but that's maybe overkill) + // a more constrained interface (this could be generalized to a full hierarchy check, but that's maybe overkill) if (sourceConstraint && targetConstraint && !isTypeIdenticalTo(sourceConstraint, targetConstraint)) { return false; } @@ -63119,7 +64247,7 @@ var ts; checkKindsOfPropertyMemberOverrides(type, baseType_1); } } - var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(node); + var implementedTypeNodes = ts.getEffectiveImplementsTypeNodes(node); if (implementedTypeNodes) { for (var _b = 0, implementedTypeNodes_1 = implementedTypeNodes; _b < implementedTypeNodes_1.length; _b++) { var typeRefNode = implementedTypeNodes_1[_b]; @@ -63444,6 +64572,7 @@ var ts; // Grammar checking checkGrammarDecoratorsAndModifiers(node); checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_alias_name_cannot_be_0); + checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); checkSourceElement(node.type); registerForUnusedIdentifiersCheck(node); @@ -63988,6 +65117,9 @@ var ts; if (!checkGrammarDecoratorsAndModifiers(node) && ts.hasModifiers(node)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); } + if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0 /* ES3 */) { + checkExternalEmitHelpers(node, 1048576 /* CreateBinding */); + } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { // export { x, y } @@ -64025,16 +65157,14 @@ var ts; return !isInAppropriateContext; } function importClauseContainsReferencedImport(importClause) { - return importClause.name && isReferenced(importClause) - || importClause.namedBindings && namedBindingsContainsReferencedImport(importClause.namedBindings); - function isReferenced(declaration) { - return !!getMergedSymbol(getSymbolOfNode(declaration)).isReferenced; - } - function namedBindingsContainsReferencedImport(namedBindings) { - return ts.isNamespaceImport(namedBindings) - ? isReferenced(namedBindings) - : ts.some(namedBindings.elements, isReferenced); - } + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolOfNode(declaration).isReferenced; + }); + } + function importClauseContainsConstEnumUsedAsValue(importClause) { + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolLinks(getSymbolOfNode(declaration)).constEnumReferenced; + }); } function checkImportsForTypeOnlyConversion(sourceFile) { for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { @@ -64043,11 +65173,9 @@ var ts; statement.importClause && !statement.importClause.isTypeOnly && importClauseContainsReferencedImport(statement.importClause) && - !isReferencedAliasDeclaration(statement.importClause, /*checkChildren*/ true)) { - var isError = compilerOptions.importsNotUsedAsValues === 2 /* Error */; - errorOrSuggestion(isError, statement, isError - ? ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error - : ts.Diagnostics.This_import_may_be_converted_to_a_type_only_import); + !isReferencedAliasDeclaration(statement.importClause, /*checkChildren*/ true) && + !importClauseContainsConstEnumUsedAsValue(statement.importClause)) { + error(statement, ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error); } } } @@ -64257,15 +65385,17 @@ var ts; return checkImportType(node); case 307 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 308 /* JSDocImplementsTag */: + return checkJSDocImplementsTag(node); + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: return checkJSDocParameterTag(node); case 300 /* JSDocFunctionType */: checkJSDocFunctionType(node); @@ -64444,6 +65574,16 @@ var ts; currentNode = node; instantiationCount = 0; switch (node.kind) { + case 196 /* CallExpression */: + case 197 /* NewExpression */: + case 198 /* TaggedTemplateExpression */: + case 157 /* Decorator */: + case 268 /* JsxOpeningElement */: + // These node kinds are deferred checked when overload resolution fails + // To save on work, we ensure the arguments are checked just once, in + // a deferred way + resolveUntypedCall(node); + break; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 161 /* MethodDeclaration */: @@ -64513,7 +65653,9 @@ var ts; } }); } - if (!node.isDeclarationFile && ts.isExternalModule(node)) { + if (compilerOptions.importsNotUsedAsValues === 2 /* Error */ && + !node.isDeclarationFile && + ts.isExternalModule(node)) { checkImportsForTypeOnlyConversion(node); } if (ts.isExternalOrCommonJsModule(node)) { @@ -64827,10 +65969,10 @@ var ts; return entityNameSymbol; } } - if (name.parent.kind === 316 /* JSDocParameterTag */) { + if (name.parent.kind === 317 /* JSDocParameterTag */) { return ts.getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 155 /* TypeParameter */ && name.parent.parent.kind === 320 /* JSDocTemplateTag */) { + if (name.parent.kind === 155 /* TypeParameter */ && name.parent.parent.kind === 321 /* JSDocTemplateTag */) { ts.Debug.assert(!ts.isInJSFile(name)); // Otherwise `isDeclarationName` would have been true. var typeParameter = ts.getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -64871,7 +66013,7 @@ var ts; // Do we want to return undefined here? return undefined; } - function getSymbolAtLocation(node) { + function getSymbolAtLocation(node, ignoreErrors) { if (node.kind === 290 /* SourceFile */) { return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } @@ -64944,7 +66086,7 @@ var ts; ((node.parent.kind === 254 /* ImportDeclaration */ || node.parent.kind === 260 /* ExportDeclaration */) && node.parent.moduleSpecifier === node) || ((ts.isInJSFile(node) && ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteralLike*/ false)) || ts.isImportCall(node.parent)) || (ts.isLiteralTypeNode(node.parent) && ts.isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent)) { - return resolveExternalModuleName(node, node); + return resolveExternalModuleName(node, node, ignoreErrors); } if (ts.isCallExpression(parent) && ts.isBindableObjectDefinePropertyCall(parent) && parent.arguments[1] === node) { return getSymbolOfNode(parent); @@ -64964,9 +66106,9 @@ var ts; case 80 /* ClassKeyword */: return getSymbolOfNode(node.parent); case 188 /* ImportType */: - return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal) : undefined; + return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : undefined; case 89 /* ExportKeyword */: - return ts.isExportAssignment(node.parent) ? ts.Debug.assertDefined(node.parent.symbol) : undefined; + return ts.isExportAssignment(node.parent) ? ts.Debug.checkDefined(node.parent.symbol) : undefined; default: return undefined; } @@ -65020,7 +66162,7 @@ var ts; if (isDeclarationNameOrImportPropertyName(node)) { var symbol = getSymbolAtLocation(node); if (symbol) { - return ts.isTypeOnlyImportOrExportName(node) ? getDeclaredTypeOfSymbol(symbol) : getTypeOfSymbol(symbol); + return getTypeOfSymbol(symbol); } return errorType; } @@ -65239,7 +66381,7 @@ var ts; var symbol = getReferencedValueSymbol(node); // We should only get the declaration of an alias if there isn't a local value // declaration for the symbol - if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */)) { + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !getTypeOnlyAliasDeclaration(symbol)) { return getDeclarationOfAliasSymbol(symbol); } } @@ -65320,11 +66462,13 @@ var ts; function isValueAliasDeclaration(node) { switch (node.kind) { case 253 /* ImportEqualsDeclaration */: + return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); case 255 /* ImportClause */: case 256 /* NamespaceImport */: case 258 /* ImportSpecifier */: case 263 /* ExportSpecifier */: - return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); + var symbol = getSymbolOfNode(node) || unknownSymbol; + return isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol); case 260 /* ExportDeclaration */: var exportClause = node.exportClause; return !!exportClause && (ts.isNamespaceExport(exportClause) || @@ -65359,14 +66503,15 @@ var ts; return isConstEnumSymbol(s) || !!s.constEnumOnlyModule; } function isReferencedAliasDeclaration(node, checkChildren) { - if (ts.isAliasSymbolDeclaration(node)) { + if (isAliasSymbolDeclaration(node)) { var symbol = getSymbolOfNode(node); if (symbol && getSymbolLinks(symbol).referenced) { return true; } var target = getSymbolLinks(symbol).target; // TODO: GH#18217 if (target && ts.getModifierFlags(node) & 1 /* Export */ && - target.flags & 111551 /* Value */ && (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { + target.flags & 111551 /* Value */ && + (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { // An `export import ... =` of a value symbol is always considered referenced return true; } @@ -65610,6 +66755,9 @@ var ts; var type = getTypeOfSymbol(getSymbolOfNode(node)); return literalTypeToNode(type, node, tracker); } + function getJsxFactoryEntity(location) { + return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; + } function createResolver() { // this variable and functions that use it are deliberately moved here from the outer scope // to avoid scope pollution @@ -65680,7 +66828,7 @@ var ts; var symbol = node && getSymbolOfNode(node); return !!(symbol && ts.getCheckFlags(symbol) & 4096 /* Late */); }, - getJsxFactoryEntity: function (location) { return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; }, + getJsxFactoryEntity: getJsxFactoryEntity, getAllAccessorDeclarations: function (accessor) { accessor = ts.getParseTreeNode(accessor, ts.isGetOrSetAccessorDeclaration); // TODO: GH#18217 var otherKind = accessor.kind === 164 /* SetAccessor */ ? 163 /* GetAccessor */ : 164 /* SetAccessor */; @@ -65946,7 +67094,7 @@ var ts; var helpersModule = resolveHelpersModule(sourceFile, location); if (helpersModule !== unknownSymbol) { var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (var helper = 1 /* FirstEmitHelper */; helper <= 524288 /* LastEmitHelper */; helper <<= 1) { + for (var helper = 1 /* FirstEmitHelper */; helper <= 1048576 /* LastEmitHelper */; helper <<= 1) { if (uncheckedHelpers & helper) { var name = getHelperName(helper); var symbol = getSymbol(helpersModule.exports, ts.escapeLeadingUnderscores(name), 111551 /* Value */); @@ -65982,6 +67130,7 @@ var ts; case 131072 /* MakeTemplateObject */: return "__makeTemplateObject"; case 262144 /* ClassPrivateFieldGet */: return "__classPrivateFieldGet"; case 524288 /* ClassPrivateFieldSet */: return "__classPrivateFieldSet"; + case 1048576 /* CreateBinding */: return "__createBinding"; default: return ts.Debug.fail("Unrecognized helper"); } } @@ -66065,6 +67214,9 @@ var ts; return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract"); } } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + } flags |= ts.modifierToFlag(modifier.kind); break; case 120 /* StaticKeyword */: @@ -66147,6 +67299,9 @@ var ts; else if ((node.parent.flags & 8388608 /* Ambient */) && node.parent.kind === 250 /* ModuleBlock */) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); + } flags |= 2 /* Ambient */; lastDeclare = modifier; break; @@ -66172,7 +67327,7 @@ var ts; } } if (ts.isNamedDeclaration(node) && node.name.kind === 76 /* PrivateIdentifier */) { - return grammarErrorOnNode(node, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); } flags |= 128 /* Abstract */; break; @@ -66215,9 +67370,6 @@ var ts; else if (node.kind === 156 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } - else if (ts.isNamedDeclaration(node) && (flags & 28 /* AccessibilityModifier */) && node.name.kind === 76 /* PrivateIdentifier */) { - return grammarErrorOnNode(node, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); - } if (flags & 256 /* Async */) { return checkGrammarAsyncModifier(node, lastAsync); } @@ -66750,7 +67902,7 @@ var ts; if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } - var parameter = ts.Debug.assertDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); + var parameter = ts.Debug.checkDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); } @@ -67209,10 +68361,10 @@ var ts; // this has already been reported, and don't report if it has. // if (node.parent.kind === 223 /* Block */ || node.parent.kind === 250 /* ModuleBlock */ || node.parent.kind === 290 /* SourceFile */) { - var links_1 = getNodeLinks(node.parent); + var links_2 = getNodeLinks(node.parent); // Check if the containing block ever report this error - if (!links_1.hasReportedStatementInAmbientContext) { - return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); + if (!links_2.hasReportedStatementInAmbientContext) { + return links_2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); } } else { @@ -67648,6 +68800,9 @@ var ts; ts.getGeneratedNameForNode = getGeneratedNameForNode; // Private Identifiers function createPrivateIdentifier(text) { + if (text[0] !== "#") { + ts.Debug.fail("First character of private identifier must be #: " + text); + } var node = createSynthesizedNode(76 /* PrivateIdentifier */); node.escapedText = ts.escapeLeadingUnderscores(text); return node; @@ -68768,7 +69923,7 @@ var ts; } var token = rawTextScanner.scan(); if (token === 23 /* CloseBracketToken */) { - token = rawTextScanner.reScanTemplateToken(); + token = rawTextScanner.reScanTemplateToken(/* isTaggedTemplate */ false); } if (rawTextScanner.isUnterminated()) { rawTextScanner.setText(undefined); @@ -69619,7 +70774,7 @@ var ts; ts.createJSDocTypeExpression = createJSDocTypeExpression; /* @internal */ function createJSDocTypeTag(typeExpression, comment) { - var tag = createJSDocTag(319 /* JSDocTypeTag */, "type"); + var tag = createJSDocTag(320 /* JSDocTypeTag */, "type"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; @@ -69627,7 +70782,7 @@ var ts; ts.createJSDocTypeTag = createJSDocTypeTag; /* @internal */ function createJSDocReturnTag(typeExpression, comment) { - var tag = createJSDocTag(317 /* JSDocReturnTag */, "returns"); + var tag = createJSDocTag(318 /* JSDocReturnTag */, "returns"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; @@ -69635,14 +70790,14 @@ var ts; ts.createJSDocReturnTag = createJSDocReturnTag; /** @internal */ function createJSDocThisTag(typeExpression) { - var tag = createJSDocTag(318 /* JSDocThisTag */, "this"); + var tag = createJSDocTag(319 /* JSDocThisTag */, "this"); tag.typeExpression = typeExpression; return tag; } ts.createJSDocThisTag = createJSDocThisTag; /* @internal */ function createJSDocParamTag(name, isBracketed, typeExpression, comment) { - var tag = createJSDocTag(316 /* JSDocParameterTag */, "param"); + var tag = createJSDocTag(317 /* JSDocParameterTag */, "param"); tag.typeExpression = typeExpression; tag.name = name; tag.isBracketed = isBracketed; @@ -70017,7 +71172,7 @@ var ts; * @param original The original statement. */ function createNotEmittedStatement(original) { - var node = createSynthesizedNode(324 /* NotEmittedStatement */); + var node = createSynthesizedNode(325 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; @@ -70029,7 +71184,7 @@ var ts; */ /* @internal */ function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(328 /* EndOfDeclarationMarker */); + var node = createSynthesizedNode(329 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -70041,7 +71196,7 @@ var ts; */ /* @internal */ function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(327 /* MergeDeclarationMarker */); + var node = createSynthesizedNode(328 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -70056,7 +71211,7 @@ var ts; * @param location The location for the expression. Defaults to the positions from "original" if provided. */ function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(325 /* PartiallyEmittedExpression */); + var node = createSynthesizedNode(326 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; setTextRange(node, original); @@ -70072,7 +71227,7 @@ var ts; ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function flattenCommaElements(node) { if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) { - if (node.kind === 326 /* CommaListExpression */) { + if (node.kind === 327 /* CommaListExpression */) { return node.elements; } if (ts.isBinaryExpression(node) && node.operatorToken.kind === 27 /* CommaToken */) { @@ -70082,7 +71237,7 @@ var ts; return node; } function createCommaList(elements) { - var node = createSynthesizedNode(326 /* CommaListExpression */); + var node = createSynthesizedNode(327 /* CommaListExpression */); node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements)); return node; } @@ -70095,7 +71250,7 @@ var ts; ts.updateCommaList = updateCommaList; /* @internal */ function createSyntheticReferenceExpression(expression, thisArg) { - var node = createSynthesizedNode(329 /* SyntheticReferenceExpression */); + var node = createSynthesizedNode(330 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; return node; @@ -70141,6 +71296,8 @@ var ts; ts.importDefaultHelper, ts.classPrivateFieldGetHelper, ts.classPrivateFieldSetHelper, + ts.createBindingHelper, + ts.setModuleDefaultHelper ], function (helper) { return helper.name; })); } function createUnparsedSource() { @@ -70169,7 +71326,7 @@ var ts; stripInternal = mapTextOrStripInternal; bundleFileInfo = mapPathOrType === "js" ? textOrInputFiles.buildInfo.bundle.js : textOrInputFiles.buildInfo.bundle.dts; if (node.oldFileOfCurrentEmit) { - parseOldFileOfCurrentEmit(node, ts.Debug.assertDefined(bundleFileInfo)); + parseOldFileOfCurrentEmit(node, ts.Debug.checkDefined(bundleFileInfo)); return node; } } @@ -70334,13 +71491,13 @@ var ts; }; node.javascriptPath = declarationTextOrJavascriptPath; node.javascriptMapPath = javascriptMapPath; - node.declarationPath = ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath); + node.declarationPath = ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath); node.declarationMapPath = declarationMapPath; node.buildInfoPath = declarationMapTextOrBuildInfoPath; Object.defineProperties(node, { javascriptText: { get: function () { return definedTextGetter_1(declarationTextOrJavascriptPath); } }, javascriptMapText: { get: function () { return textGetter_1(javascriptMapPath); } }, - declarationText: { get: function () { return definedTextGetter_1(ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath)); } }, + declarationText: { get: function () { return definedTextGetter_1(ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath)); } }, declarationMapText: { get: function () { return textGetter_1(declarationMapPath); } }, buildInfo: { get: function () { return getAndCacheBuildInfo_1(function () { return textGetter_1(declarationMapTextOrBuildInfoPath); }); } } }); @@ -70923,8 +72080,8 @@ var ts; argumentsList.push(ts.createNull()); } if (children.length > 1) { - for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { - var child = children_1[_i]; + for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { + var child = children_2[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -70943,8 +72100,8 @@ var ts; argumentsList.push(ts.createNull()); if (children && children.length > 0) { if (children.length > 1) { - for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { - var child = children_2[_i]; + for (var _i = 0, children_3 = children; _i < children_3.length; _i++) { + var child = children_3[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -70995,10 +72152,10 @@ var ts; name: "typescript:spread", importName: "__spread", scoped: false, + dependencies: [ts.readHelper], text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };" }; function createSpreadHelper(context, argumentList, location) { - context.requestEmitHelper(ts.readHelper); context.requestEmitHelper(ts.spreadHelper); return ts.setTextRange(ts.createCall(getUnscopedHelperName("__spread"), /*typeArguments*/ undefined, argumentList), location); @@ -71858,7 +73015,7 @@ var ts; case 195 /* ElementAccessExpression */: case 194 /* PropertyAccessExpression */: case 218 /* NonNullExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: node = node.expression; continue; } @@ -71875,7 +73032,7 @@ var ts; ts.parenthesizeConciseBody = parenthesizeConciseBody; function isCommaSequence(node) { return node.kind === 209 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || - node.kind === 326 /* CommaListExpression */; + node.kind === 327 /* CommaListExpression */; } ts.isCommaSequence = isCommaSequence; var OuterExpressionKinds; @@ -71894,7 +73051,7 @@ var ts; case 217 /* AsExpression */: case 218 /* NonNullExpression */: return (kinds & 2 /* Assertions */) !== 0; - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return (kinds & 4 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -71931,7 +73088,7 @@ var ts; case 199 /* TypeAssertionExpression */: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression); case 217 /* AsExpression */: return ts.updateAsExpression(outerExpression, expression, outerExpression.type); case 218 /* NonNullExpression */: return ts.updateNonNullExpression(outerExpression, expression); - case 325 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); + case 326 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); } } /** @@ -72804,9 +73961,9 @@ var ts; case 290 /* SourceFile */: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression)); default: // No need to visit nodes with no children. @@ -72863,7 +74020,7 @@ var ts; case 224 /* EmptyStatement */: case 215 /* OmittedExpression */: case 241 /* DebuggerStatement */: - case 324 /* NotEmittedStatement */: + case 325 /* NotEmittedStatement */: // No need to visit nodes with no children. break; // Names @@ -73247,10 +74404,10 @@ var ts; result = reduceNodes(node.statements, cbNodes, result); break; // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: result = reduceNode(node.expression, cbNode, result); break; - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: result = reduceNodes(node.elements, cbNodes, result); break; default: @@ -74251,10 +75408,12 @@ var ts; // list contains nothing but prologue directives (or empty) - exit return index; } - var statement = statements[index]; - if (statement.kind === 226 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { - result.push(ts.visitNode(statement, visitor, ts.isStatement)); - return index + 1; + var superIndex = ts.findIndex(statements, function (s) { return ts.isExpressionStatement(s) && ts.isSuperCall(s.expression); }, index); + if (superIndex > -1) { + for (var i = index; i <= superIndex; i++) { + result.push(ts.visitNode(statements[i], visitor, ts.isStatement)); + } + return superIndex + 1; } return index; } @@ -74587,7 +75746,7 @@ var ts; && !(element.transformFlags & (8192 /* ContainsRestOrSpread */ | 16384 /* ContainsObjectRestOrSpread */)) && !(ts.getTargetOfBindingOrAssignmentElement(element).transformFlags & (8192 /* ContainsRestOrSpread */ | 16384 /* ContainsObjectRestOrSpread */)) && !ts.isComputedPropertyName(propertyName)) { - bindingElements = ts.append(bindingElements, element); + bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor)); } else { if (bindingElements) { @@ -74805,6 +75964,96 @@ var ts; })(ts || (ts = {})); /*@internal*/ var ts; +(function (ts) { + var ProcessLevel; + (function (ProcessLevel) { + ProcessLevel[ProcessLevel["LiftRestriction"] = 0] = "LiftRestriction"; + ProcessLevel[ProcessLevel["All"] = 1] = "All"; + })(ProcessLevel = ts.ProcessLevel || (ts.ProcessLevel = {})); + function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) { + // Visit the tag expression + var tag = ts.visitNode(node.tag, visitor, ts.isExpression); + // Build up the template arguments and the raw and cooked strings for the template. + // We start out with 'undefined' for the first argument and revisit later + // to avoid walking over the template string twice and shifting all our arguments over after the fact. + var templateArguments = [undefined]; + var cookedStrings = []; + var rawStrings = []; + var template = node.template; + if (level === ProcessLevel.LiftRestriction && !ts.hasInvalidEscape(template)) + return node; + if (ts.isNoSubstitutionTemplateLiteral(template)) { + cookedStrings.push(createTemplateCooked(template)); + rawStrings.push(getRawLiteral(template, currentSourceFile)); + } + else { + cookedStrings.push(createTemplateCooked(template.head)); + rawStrings.push(getRawLiteral(template.head, currentSourceFile)); + for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { + var templateSpan = _a[_i]; + cookedStrings.push(createTemplateCooked(templateSpan.literal)); + rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile)); + templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); + } + } + var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); + // Create a variable to cache the template object if we're in a module. + // Do not do this in the global scope, as any variable we currently generate could conflict with + // variables from outside of the current compilation. In the future, we can revisit this behavior. + if (ts.isExternalModule(currentSourceFile)) { + var tempVar = ts.createUniqueName("templateObject"); + recordTaggedTemplateString(tempVar); + templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); + } + else { + templateArguments[0] = helperCall; + } + return ts.createCall(tag, /*typeArguments*/ undefined, templateArguments); + } + ts.processTaggedTemplateExpression = processTaggedTemplateExpression; + function createTemplateCooked(template) { + return template.templateFlags ? ts.createIdentifier("undefined") : ts.createLiteral(template.text); + } + /** + * Creates an ES5 compatible literal from an ES6 template literal. + * + * @param node The ES6 template literal. + */ + function getRawLiteral(node, currentSourceFile) { + // Find original source text, since we need to emit the raw strings of the tagged template. + // The raw strings contain the (escaped) strings of what the user wrote. + // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". + var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), + // thus we need to remove those characters. + // First template piece starts with "`", others with "}" + // Last template piece ends with "`", others with "${" + var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + // Newline normalization: + // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's + // and LineTerminatorSequences are normalized to for both TV and TRV. + text = text.replace(/\r\n?/g, "\n"); + return ts.setTextRange(ts.createLiteral(text), node); + } + function createTemplateObjectHelper(context, cooked, raw) { + context.requestEmitHelper(ts.templateObjectHelper); + return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), + /*typeArguments*/ undefined, [ + cooked, + raw + ]); + } + ts.templateObjectHelper = { + name: "typescript:makeTemplateObject", + importName: "__makeTemplateObject", + scoped: false, + priority: 0, + text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" + }; +})(ts || (ts = {})); +/*@internal*/ +var ts; (function (ts) { /** * Indicates whether to emit type metadata in the new format. @@ -74829,10 +76078,9 @@ var ts; ClassFacts[ClassFacts["IsNamedExternalExport"] = 16] = "IsNamedExternalExport"; ClassFacts[ClassFacts["IsDefaultExternalExport"] = 32] = "IsDefaultExternalExport"; ClassFacts[ClassFacts["IsDerivedClass"] = 64] = "IsDerivedClass"; - ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 128] = "UseImmediatelyInvokedFunctionExpression"; ClassFacts[ClassFacts["HasAnyDecorators"] = 6] = "HasAnyDecorators"; ClassFacts[ClassFacts["NeedsName"] = 5] = "NeedsName"; - ClassFacts[ClassFacts["MayNeedImmediatelyInvokedFunctionExpression"] = 7] = "MayNeedImmediatelyInvokedFunctionExpression"; + ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 7] = "UseImmediatelyInvokedFunctionExpression"; ClassFacts[ClassFacts["IsExported"] = 56] = "IsExported"; })(ClassFacts || (ClassFacts = {})); function transformTypeScript(context) { @@ -75315,8 +76563,6 @@ var ts; facts |= 32 /* IsDefaultExternalExport */; else if (isNamedExternalModuleExport(node)) facts |= 16 /* IsNamedExternalExport */; - if (languageVersion <= 1 /* ES5 */ && (facts & 7 /* MayNeedImmediatelyInvokedFunctionExpression */)) - facts |= 128 /* UseImmediatelyInvokedFunctionExpression */; return facts; } function hasTypeScriptClassSyntax(node) { @@ -75334,7 +76580,7 @@ var ts; } var staticProperties = ts.getProperties(node, /*requireInitializer*/ true, /*isStatic*/ true); var facts = getClassFacts(node, staticProperties); - if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) { + if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */) { context.startLexicalEnvironment(); } var name = node.name || (facts & 5 /* NeedsName */ ? ts.getGeneratedNameForNode(node) : undefined); @@ -75346,7 +76592,7 @@ var ts; addClassElementDecorationStatements(statements, node, /*isStatic*/ false); addClassElementDecorationStatements(statements, node, /*isStatic*/ true); addConstructorDecorationStatement(statements, node); - if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) { + if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */) { // When we emit a TypeScript class down to ES5, we must wrap it in an IIFE so that the // 'es2015' transformer can properly nest static initializers and decorators. The result // looks something like: @@ -75372,11 +76618,16 @@ var ts; ts.insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment()); var iife = ts.createImmediatelyInvokedArrowFunction(statements); ts.setEmitFlags(iife, 33554432 /* TypeScriptClassWrapper */); + // Class comment is already added by the ES2015 transform when targeting ES5 or below. + // Only add if targetting ES2015+ to prevent duplicates + if (languageVersion > 1 /* ES5 */) { + ts.addSyntheticLeadingComment(iife, 3 /* MultiLineCommentTrivia */, "* @class "); + } var varStatement = ts.createVariableStatement( /*modifiers*/ undefined, ts.createVariableDeclarationList([ ts.createVariableDeclaration(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false), /*type*/ undefined, iife) - ])); + ], languageVersion > 1 /* ES5 */ ? 2 /* Const */ : undefined)); ts.setOriginalNode(varStatement, node); ts.setCommentRange(varStatement, node); ts.setSourceMapRange(varStatement, ts.moveRangePastDecorators(node)); @@ -75389,7 +76640,7 @@ var ts; if (facts & 8 /* IsExportOfNamespace */) { addExportMemberAssignment(statements, node); } - else if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) { + else if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) { if (facts & 32 /* IsDefaultExternalExport */) { statements.push(ts.createExportDefault(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))); } @@ -75416,7 +76667,7 @@ var ts; // ${members} // } // we do not emit modifiers on the declaration if we are emitting an IIFE - var modifiers = !(facts & 128 /* UseImmediatelyInvokedFunctionExpression */) + var modifiers = !(facts & 7 /* UseImmediatelyInvokedFunctionExpression */) ? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier) : undefined; var classDeclaration = ts.createClassDeclaration( @@ -77124,7 +78375,7 @@ var ts; return undefined; } // Elide the export declaration if all of its named exports are elided. - var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedImportBindings); + var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedExportBindings); return exportClause ? ts.updateExportDeclaration(node, /*decorators*/ undefined, @@ -77893,7 +79144,7 @@ var ts; /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass)); if (ts.some(staticProperties) || ts.some(pendingExpressions)) { if (isDecoratedClassDeclaration) { - ts.Debug.assertDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); + ts.Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); // Write any pending expressions from elided or moved computed property names if (pendingStatements && pendingExpressions && ts.some(pendingExpressions)) { pendingStatements.push(ts.createExpressionStatement(ts.inlineExpressions(pendingExpressions))); @@ -78981,6 +80232,8 @@ var ts; var enclosingFunctionFlags; var enclosingSuperContainerFlags = 0; var hasLexicalThis; + var currentSourceFile; + var taggedTemplateStringDeclarations; /** Keeps track of property names accessed on super (`super.x`) within async functions. */ var capturedSuperProperties; /** Whether the async function contains an element access on super (`super[x]`). */ @@ -78988,14 +80241,18 @@ var ts; /** A set of node IDs for generated super accessors. */ var substitutedSuperAccessors = []; return ts.chainBundle(transformSourceFile); + function recordTaggedTemplateString(temp) { + taggedTemplateStringDeclarations = ts.append(taggedTemplateStringDeclarations, ts.createVariableDeclaration(temp)); + } function transformSourceFile(node) { if (node.isDeclarationFile) { return node; } - exportedVariableStatement = false; - hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); - var visited = ts.visitEachChild(node, visitor, context); + currentSourceFile = node; + var visited = visitSourceFile(node); ts.addEmitHelpers(visited, context.readEmitHelpers()); + currentSourceFile = undefined; + taggedTemplateStringDeclarations = undefined; return visited; } function visitor(node) { @@ -79071,6 +80328,8 @@ var ts; return visitExpressionStatement(node); case 200 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, noDestructuringValue); + case 198 /* TaggedTemplateExpression */: + return visitTaggedTemplateExpression(node); case 194 /* PropertyAccessExpression */: if (capturedSuperProperties && ts.isPropertyAccessExpression(node) && node.expression.kind === 102 /* SuperKeyword */) { capturedSuperProperties.set(node.name.escapedText, true); @@ -79193,6 +80452,18 @@ var ts; function visitParenthesizedExpression(node, noDestructuringValue) { return ts.visitEachChild(node, noDestructuringValue ? visitorNoDestructuringValue : visitor, context); } + function visitSourceFile(node) { + exportedVariableStatement = false; + hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); + var visited = ts.visitEachChild(node, visitor, context); + var statement = ts.concatenate(visited.statements, taggedTemplateStringDeclarations && [ + ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList(taggedTemplateStringDeclarations)) + ]); + return ts.updateSourceFileNode(visited, ts.setTextRange(ts.createNodeArray(statement), node.statements)); + } + function visitTaggedTemplateExpression(node) { + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.LiftRestriction); + } /** * Visits a BinaryExpression that contains a destructuring assignment. * @@ -79679,10 +80950,10 @@ var ts; name: "typescript:asyncGenerator", importName: "__asyncGenerator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n 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); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };" }; function createAsyncGeneratorHelper(context, generatorFunc, hasLexicalThis) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncGeneratorHelper); // Mark this node as originally an async function (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* AsyncFunctionBody */; @@ -79697,10 +80968,10 @@ var ts; name: "typescript:asyncDelegator", importName: "__asyncDelegator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n };" }; function createAsyncDelegatorHelper(context, expression, location) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncDelegator); return ts.setTextRange(ts.createCall(ts.getUnscopedHelperName("__asyncDelegator"), /*typeArguments*/ undefined, [expression]), location); @@ -81947,10 +83218,15 @@ var ts; } return ts.visitEachChild(node, visitor, context); } + function isVariableStatementOfTypeScriptClassWrapper(node) { + return node.declarationList.declarations.length === 1 + && !!node.declarationList.declarations[0].initializer + && !!(ts.getEmitFlags(node.declarationList.declarations[0].initializer) & 33554432 /* TypeScriptClassWrapper */); + } function visitVariableStatement(node) { var ancestorFacts = enterSubtree(0 /* None */, ts.hasModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); var updated; - if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0) { + if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { // we are inside a converted loop - hoist variable declarations var assignments = void 0; for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { @@ -83102,7 +84378,11 @@ var ts; // The class statements are the statements generated by visiting the first statement with initializer of the // body (1), while all other statements are added to remainingStatements (2) var isVariableStatementWithInitializer = function (stmt) { return ts.isVariableStatement(stmt) && !!ts.first(stmt.declarationList.declarations).initializer; }; + // visit the class body statements outside of any converted loop body. + var savedConvertedLoopState = convertedLoopState; + convertedLoopState = undefined; var bodyStatements = ts.visitNodes(body.statements, visitor, ts.isStatement); + convertedLoopState = savedConvertedLoopState; var classStatements = ts.filter(bodyStatements, isVariableStatementWithInitializer); var remainingStatements = ts.filter(bodyStatements, function (stmt) { return !isVariableStatementWithInitializer(stmt); }); var varStatement = ts.cast(ts.first(classStatements), ts.isVariableStatement); @@ -83359,67 +84639,7 @@ var ts; * @param node A TaggedTemplateExpression node. */ function visitTaggedTemplateExpression(node) { - // Visit the tag expression - var tag = ts.visitNode(node.tag, visitor, ts.isExpression); - // Build up the template arguments and the raw and cooked strings for the template. - // We start out with 'undefined' for the first argument and revisit later - // to avoid walking over the template string twice and shifting all our arguments over after the fact. - var templateArguments = [undefined]; - var cookedStrings = []; - var rawStrings = []; - var template = node.template; - if (ts.isNoSubstitutionTemplateLiteral(template)) { - cookedStrings.push(ts.createLiteral(template.text)); - rawStrings.push(getRawLiteral(template)); - } - else { - cookedStrings.push(ts.createLiteral(template.head.text)); - rawStrings.push(getRawLiteral(template.head)); - for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { - var templateSpan = _a[_i]; - cookedStrings.push(ts.createLiteral(templateSpan.literal.text)); - rawStrings.push(getRawLiteral(templateSpan.literal)); - templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); - } - } - var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); - // Create a variable to cache the template object if we're in a module. - // Do not do this in the global scope, as any variable we currently generate could conflict with - // variables from outside of the current compilation. In the future, we can revisit this behavior. - if (ts.isExternalModule(currentSourceFile)) { - var tempVar = ts.createUniqueName("templateObject"); - recordTaggedTemplateString(tempVar); - templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); - } - else { - templateArguments[0] = helperCall; - } - return ts.createCall(tag, /*typeArguments*/ undefined, templateArguments); - } - /** - * Creates an ES5 compatible literal from an ES6 template literal. - * - * @param node The ES6 template literal. - */ - function getRawLiteral(node) { - // Find original source text, since we need to emit the raw strings of the tagged template. - // The raw strings contain the (escaped) strings of what the user wrote. - // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". - var text = node.rawText; - if (text === undefined) { - text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), - // thus we need to remove those characters. - // First template piece starts with "`", others with "}" - // Last template piece ends with "`", others with "${" - var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; - text = text.substring(1, text.length - (isLast ? 1 : 2)); - } - // Newline normalization: - // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's - // and LineTerminatorSequences are normalized to for both TV and TRV. - text = text.replace(/\r\n?/g, "\n"); - return ts.setTextRange(ts.createLiteral(text), node); + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.All); } /** * Visits a TemplateExpression node. @@ -83712,14 +84932,6 @@ var ts; ts.createFileLevelUniqueName("_super") ]); } - function createTemplateObjectHelper(context, cooked, raw) { - context.requestEmitHelper(ts.templateObjectHelper); - return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), - /*typeArguments*/ undefined, [ - cooked, - raw - ]); - } ts.extendsHelper = { name: "typescript:extends", importName: "__extends", @@ -83727,13 +84939,6 @@ var ts; priority: 0, text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();" }; - ts.templateObjectHelper = { - name: "typescript:makeTemplateObject", - importName: "__makeTemplateObject", - scoped: false, - priority: 0, - text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" - }; })(ts || (ts = {})); /*@internal*/ var ts; @@ -86547,7 +87752,7 @@ var ts; startLexicalEnvironment(); var statements = []; var ensureUseStrict = ts.getStrictOptionValue(compilerOptions, "alwaysStrict") || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile)); - var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor); + var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict && !ts.isJsonSourceFile(node), sourceElementVisitor); if (shouldEmitUnderscoreUnderscoreESModule()) { ts.append(statements, createUnderscoreUnderscoreESModule()); } @@ -86556,11 +87761,6 @@ var ts; addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false); ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements)); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - ts.addEmitHelper(updated, exportStarHelper); - } ts.addEmitHelpers(updated, context.readEmitHelpers()); return updated; } @@ -86782,11 +87982,6 @@ var ts; // and merge any new lexical declarations. ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var body = ts.createBlock(statements, /*multiLine*/ true); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - ts.addEmitHelper(body, exportStarHelper); - } if (needUMDDynamicImportHelper) { ts.addEmitHelper(body, dynamicImportUMDHelper); } @@ -86843,9 +88038,9 @@ var ts; return visitFunctionDeclaration(node); case 245 /* ClassDeclaration */: return visitClassDeclaration(node); - case 327 /* MergeDeclarationMarker */: + case 328 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 328 /* EndOfDeclarationMarker */: + case 329 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return ts.visitEachChild(node, moduleExpressionElementVisitor, context); @@ -87203,8 +88398,13 @@ var ts; } for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) { var specifier = _a[_i]; - var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); - statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue)), specifier), specifier)); + if (languageVersion === 0 /* ES3 */) { + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createCreateBindingHelper(context, generatedName, ts.createLiteral(specifier.propertyName || specifier.name), specifier.propertyName ? ts.createLiteral(specifier.name) : undefined)), specifier), specifier)); + } + else { + var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue, /* location */ undefined, /* liveBinding */ true)), specifier), specifier)); + } } return ts.singleOrMany(statements); } @@ -87307,7 +88507,6 @@ var ts; if (ts.hasModifier(node, 1 /* Export */)) { var modifiers = void 0; // If we're exporting these variables, then these just become assignments to 'exports.x'. - // We only want to emit assignments for variables with initializers. for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var variable = _a[_i]; if (ts.isIdentifier(variable.name) && ts.isLocalName(variable.name)) { @@ -87316,7 +88515,7 @@ var ts; } variables = ts.append(variables, variable); } - else if (variable.initializer) { + else { expressions = ts.append(expressions, transformInitializedVariable(variable)); } } @@ -87368,7 +88567,7 @@ var ts; } else { return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name), - /*location*/ node.name), ts.visitNode(node.initializer, moduleExpressionElementVisitor)); + /*location*/ node.name), node.initializer ? ts.visitNode(node.initializer, moduleExpressionElementVisitor) : ts.createVoidZero()); } } /** @@ -87446,7 +88645,7 @@ var ts; case 257 /* NamedImports */: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; - statements = appendExportsOfDeclaration(statements, importBinding); + statements = appendExportsOfDeclaration(statements, importBinding, /* liveBinding */ true); } break; } @@ -87543,13 +88742,13 @@ var ts; * appended. * @param decl The declaration to export. */ - function appendExportsOfDeclaration(statements, decl) { + function appendExportsOfDeclaration(statements, decl, liveBinding) { var name = ts.getDeclarationName(decl); var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(ts.idText(name)); if (exportSpecifiers) { for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) { var exportSpecifier = exportSpecifiers_1[_i]; - statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name); + statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name, /* allowComments */ undefined, liveBinding); } } return statements; @@ -87566,8 +88765,8 @@ var ts; * @param location The location to use for source maps and comments for the export. * @param allowComments Whether to allow comments on the export. */ - function appendExportStatement(statements, exportName, expression, location, allowComments) { - statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments)); + function appendExportStatement(statements, exportName, expression, location, allowComments, liveBinding) { + statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); return statements; } function createUnderscoreUnderscoreESModule() { @@ -87596,8 +88795,8 @@ var ts; * @param location The location to use for source maps and comments for the export. * @param allowComments An optional value indicating whether to emit comments for the statement. */ - function createExportStatement(name, value, location, allowComments) { - var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value)), location); + function createExportStatement(name, value, location, allowComments, liveBinding) { + var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value, /* location */ undefined, liveBinding)), location); ts.startOnNewLine(statement); if (!allowComments) { ts.setEmitFlags(statement, 1536 /* NoComments */); @@ -87611,8 +88810,22 @@ var ts; * @param value The exported value. * @param location The location to use for source maps and comments for the export. */ - function createExportExpression(name, value, location) { - return ts.setTextRange(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); + function createExportExpression(name, value, location, liveBinding) { + return ts.setTextRange(liveBinding && languageVersion !== 0 /* ES3 */ ? ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ undefined, [ + ts.createIdentifier("exports"), + ts.createLiteral(name), + ts.createObjectLiteral([ + ts.createPropertyAssignment("enumerable", ts.createLiteral(/*value*/ true)), + ts.createPropertyAssignment("get", ts.createFunctionExpression( + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + /*parameters*/ [], + /*type*/ undefined, ts.createBlock([ts.createReturn(value)]))) + ]) + ]) : ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); } // // Modifier Visitors @@ -87837,17 +89050,36 @@ var ts; } } ts.transformModule = transformModule; + ts.createBindingHelper = { + name: "typescript:commonjscreatebinding", + importName: "__createBinding", + scoped: false, + priority: 1, + text: "\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));" + }; + function createCreateBindingHelper(context, module, inputName, outputName) { + context.requestEmitHelper(ts.createBindingHelper); + return ts.createCall(ts.getUnscopedHelperName("__createBinding"), /*typeArguments*/ undefined, __spreadArrays([ts.createIdentifier("exports"), module, inputName], (outputName ? [outputName] : []))); + } + ts.setModuleDefaultHelper = { + name: "typescript:commonjscreatevalue", + importName: "__setModuleDefault", + scoped: false, + priority: 1, + text: "\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});" + }; // emit output for the __export helper function var exportStarHelper = { name: "typescript:export-star", - scoped: true, - text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }" + importName: "__exportStar", + scoped: false, + dependencies: [ts.createBindingHelper], + priority: 2, + text: "\n var __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p);\n }" }; function createExportStarHelper(context, module) { - var compilerOptions = context.getCompilerOptions(); - return compilerOptions.importHelpers - ? ts.createCall(ts.getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]) - : ts.createCall(ts.createIdentifier("__export"), /*typeArguments*/ undefined, [module]); + context.requestEmitHelper(exportStarHelper); + return ts.createCall(ts.getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]); } // emit helper for dynamic import var dynamicImportUMDHelper = { @@ -87860,7 +89092,9 @@ var ts; name: "typescript:commonjsimportstar", importName: "__importStar", scoped: false, - text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};" + dependencies: [ts.createBindingHelper, ts.setModuleDefaultHelper], + priority: 2, + text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};" }; // emit helper for `import Name from "foo"` ts.importDefaultHelper = { @@ -88324,7 +89558,7 @@ var ts; return ts.singleOrMany(statements); } function visitExportDeclaration(node) { - ts.Debug.assertDefined(node); + ts.Debug.assertIsDefined(node); return undefined; } /** @@ -88820,9 +90054,9 @@ var ts; return visitCatchClause(node); case 223 /* Block */: return visitBlock(node); - case 327 /* MergeDeclarationMarker */: + case 328 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 328 /* EndOfDeclarationMarker */: + case 329 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return destructuringAndImportCallVisitor(node); @@ -89433,7 +90667,9 @@ var ts; */ function onEmitNode(hint, node, emitCallback) { if (ts.isSourceFile(node)) { - helperNameSubstitutions = ts.createMap(); + if ((ts.isExternalModule(node) || compilerOptions.isolatedModules) && compilerOptions.importHelpers) { + helperNameSubstitutions = ts.createMap(); + } previousOnEmitNode(hint, node, emitCallback); helperNameSubstitutions = undefined; } @@ -90231,7 +91467,7 @@ var ts; ts.forEach(sourceFile.libReferenceDirectives, function (ref) { var lib = host.getLibFileFromReference(ref); if (lib) { - ret.set(ref.fileName.toLocaleLowerCase(), true); + ret.set(ts.toFileNameLowerCase(ref.fileName), true); } }); return ret; @@ -91314,7 +92550,7 @@ var ts; * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files. */ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(330 /* Count */); + var enabledSyntaxKindFeatures = new Array(331 /* Count */); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -91387,6 +92623,7 @@ var ts; transformed: transformed, substituteNode: substituteNode, emitNodeWithNotification: emitNodeWithNotification, + isEmitNotificationEnabled: isEmitNotificationEnabled, dispose: dispose, diagnostics: diagnostics }; @@ -91443,6 +92680,8 @@ var ts; function emitNodeWithNotification(hint, node, emitCallback) { ts.Debug.assert(state < 3 /* Disposed */, "Cannot invoke TransformationResult callbacks after the result is disposed."); if (node) { + // TODO: Remove check and unconditionally use onEmitNode when API is breakingly changed + // (see https://github.com/microsoft/TypeScript/pull/36248/files/5062623f39120171b98870c71344b3242eb03d23#r369766739) if (isEmitNotificationEnabled(node)) { onEmitNode(hint, node, emitCallback); } @@ -91549,6 +92788,12 @@ var ts; ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the transformation context during initialization."); ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed."); ts.Debug.assert(!helper.scoped, "Cannot request a scoped emit helper."); + if (helper.dependencies) { + for (var _i = 0, _a = helper.dependencies; _i < _a.length; _i++) { + var h = _a[_i]; + requestEmitHelper(h); + } + } emitHelpers = ts.append(emitHelpers, helper); } function readEmitHelpers() { @@ -91712,7 +92957,7 @@ var ts; } ts.getOutputExtension = getOutputExtension; function rootDirOfOptions(configFile) { - return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.assertDefined(configFile.options.configFilePath)); + return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.checkDefined(configFile.options.configFilePath)); } function getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, outputDir) { return outputDir ? @@ -91734,7 +92979,7 @@ var ts; ts.fileExtensionIs(inputFileName, ".tsx" /* Tsx */) && configFile.options.jsx === 1 /* Preserve */ ? ".jsx" /* Jsx */ : ".js" /* Js */); - return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.assertDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? + return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.checkDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? outputFileName : undefined; } @@ -91809,7 +93054,7 @@ var ts; function getFirstProjectOutput(configFile, ignoreCase) { if (configFile.options.outFile || configFile.options.out) { var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath; - return ts.Debug.assertDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); + return ts.Debug.checkDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); } for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) { var inputFileName = _b[_a]; @@ -91933,6 +93178,7 @@ var ts; hasGlobalName: resolver.hasGlobalName, // transform hooks onEmitNode: transform.emitNodeWithNotification, + isEmitNotificationEnabled: transform.isEmitNotificationEnabled, substituteNode: transform.substituteNode, }); ts.Debug.assert(transform.transformed.length === 1, "Should only see one output from the transform"); @@ -91985,6 +93231,7 @@ var ts; hasGlobalName: resolver.hasGlobalName, // transform hooks onEmitNode: declarationTransform.emitNodeWithNotification, + isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled, substituteNode: declarationTransform.substituteNode, }); var declBlocked = (!!declarationTransform.diagnostics && !!declarationTransform.diagnostics.length) || !!host.isEmitBlocked(declarationFilePath) || !!compilerOptions.noEmit; @@ -92095,7 +93342,7 @@ var ts; var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText); return "data:application/json;base64," + base64SourceMapText; } - var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.assertDefined(sourceMapFilePath))); + var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath))); if (mapOptions.mapRoot) { var sourceMapDir = ts.normalizeSlashes(mapOptions.mapRoot); if (sourceFile) { @@ -92179,7 +93426,7 @@ var ts; sourceFile.statements = ts.createNodeArray(); return sourceFile; }); - var jsBundle = ts.Debug.assertDefined(bundle.js); + var jsBundle = ts.Debug.checkDefined(bundle.js); ts.forEach(jsBundle.sources && jsBundle.sources.prologues, function (prologueInfo) { var sourceFile = sourceFiles[prologueInfo.file]; sourceFile.text = prologueInfo.text; @@ -92196,10 +93443,10 @@ var ts; /*@internal*/ function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) { var _a = getOutputPathsForBundle(config.options, /*forceDtsPaths*/ false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath; - var buildInfoText = host.readFile(ts.Debug.assertDefined(buildInfoPath)); + var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath)); if (!buildInfoText) return buildInfoPath; - var jsFileText = host.readFile(ts.Debug.assertDefined(jsFilePath)); + var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath)); if (!jsFileText) return jsFilePath; var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath); @@ -92297,7 +93544,7 @@ var ts; function createPrinter(printerOptions, handlers) { if (printerOptions === void 0) { printerOptions = {}; } if (handlers === void 0) { handlers = {}; } - var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; + var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, isEmitNotificationEnabled = handlers.isEmitNotificationEnabled, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; var extendedDiagnostics = !!printerOptions.extendedDiagnostics; var newLine = ts.getNewLineCharacter(printerOptions); var moduleKind = ts.getEmitModuleKind(printerOptions); @@ -92315,7 +93562,7 @@ var ts; var write = writeBase; var isOwnFileEmit; var bundleFileInfo = printerOptions.writeBundleFileInfo ? { sections: [] } : undefined; - var relativeToBuildInfo = bundleFileInfo ? ts.Debug.assertDefined(printerOptions.relativeToBuildInfo) : undefined; + var relativeToBuildInfo = bundleFileInfo ? ts.Debug.checkDefined(printerOptions.relativeToBuildInfo) : undefined; var recordInternalSection = printerOptions.recordInternalSection; var sourceFileTextPos = 0; var sourceFileTextKind = "text" /* Text */; @@ -92586,12 +93833,15 @@ var ts; return; return pipelineEmit(1 /* Expression */, node); } + function emitJsxAttributeValue(node) { + return pipelineEmit(ts.isStringLiteral(node) ? 6 /* JsxAttributeValue */ : 4 /* Unspecified */, node); + } function pipelineEmit(emitHint, node) { var savedLastNode = lastNode; var savedLastSubstitution = lastSubstitution; lastNode = node; lastSubstitution = undefined; - var pipelinePhase = getPipelinePhase(0 /* Notification */, node); + var pipelinePhase = getPipelinePhase(0 /* Notification */, emitHint, node); pipelinePhase(emitHint, node); ts.Debug.assert(lastNode === node); var substitute = lastSubstitution; @@ -92599,15 +93849,15 @@ var ts; lastSubstitution = savedLastSubstitution; return substitute || node; } - function getPipelinePhase(phase, node) { + function getPipelinePhase(phase, emitHint, node) { switch (phase) { case 0 /* Notification */: - if (onEmitNode !== ts.noEmitNotification) { + if (onEmitNode !== ts.noEmitNotification && (!isEmitNotificationEnabled || isEmitNotificationEnabled(node))) { return pipelineEmitWithNotification; } // falls through case 1 /* Substitution */: - if (substituteNode !== ts.noEmitSubstitution) { + if (substituteNode !== ts.noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node)) !== node) { return pipelineEmitWithSubstitution; } // falls through @@ -92627,12 +93877,12 @@ var ts; return ts.Debug.assertNever(phase); } } - function getNextPipelinePhase(currentPhase, node) { - return getPipelinePhase(currentPhase + 1, node); + function getNextPipelinePhase(currentPhase, emitHint, node) { + return getPipelinePhase(currentPhase + 1, emitHint, node); } function pipelineEmitWithNotification(hint, node) { ts.Debug.assert(lastNode === node); - var pipelinePhase = getNextPipelinePhase(0 /* Notification */, node); + var pipelinePhase = getNextPipelinePhase(0 /* Notification */, hint, node); onEmitNode(hint, node, pipelinePhase); ts.Debug.assert(lastNode === node); } @@ -92642,6 +93892,8 @@ var ts; return emitSourceFile(ts.cast(node, ts.isSourceFile)); if (hint === 2 /* IdentifierName */) return emitIdentifier(ts.cast(node, ts.isIdentifier)); + if (hint === 6 /* JsxAttributeValue */) + return emitLiteral(ts.cast(node, ts.isStringLiteral), /*jsxAttributeEscape*/ true); if (hint === 3 /* MappedTypeParameter */) return emitMappedTypeParameter(ts.cast(node, ts.isTypeParameterDeclaration)); if (hint === 5 /* EmbeddedStatement */) { @@ -92656,7 +93908,7 @@ var ts; case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: case 17 /* TemplateTail */: - return emitLiteral(node); + return emitLiteral(node, /*jsxAttributeEscape*/ false); case 292 /* UnparsedSource */: case 286 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); @@ -92904,27 +94156,28 @@ var ts; case 284 /* EnumMember */: return emitEnumMember(node); // JSDoc nodes (only used in codefixes currently) - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 318 /* JSDocThisTag */: - case 315 /* JSDocEnumTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 319 /* JSDocThisTag */: + case 316 /* JSDocEnumTag */: return emitJSDocSimpleTypedTag(node); + case 308 /* JSDocImplementsTag */: case 307 /* JSDocAugmentsTag */: - return emitJSDocAugmentsTag(node); - case 320 /* JSDocTemplateTag */: + return emitJSDocHeritageTag(node); + case 321 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 314 /* JSDocCallbackTag */: + case 315 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); case 305 /* JSDocSignature */: return emitJSDocSignature(node); case 304 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 309 /* JSDocClassTag */: + case 310 /* JSDocClassTag */: case 306 /* JSDocTag */: return emitJSDocSimpleTag(node); case 303 /* JSDocComment */: @@ -92950,7 +94203,7 @@ var ts; case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - return emitLiteral(node); + return emitLiteral(node, /*jsxAttributeEscape*/ false); // Identifiers case 75 /* Identifier */: return emitIdentifier(node); @@ -93026,9 +94279,9 @@ var ts; case 270 /* JsxFragment */: return emitJsxFragment(node); // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return emitCommaList(node); } } @@ -93042,8 +94295,7 @@ var ts; } function pipelineEmitWithSubstitution(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(1 /* Substitution */, node); - lastSubstitution = substituteNode(hint, node); + var pipelinePhase = getNextPipelinePhase(1 /* Substitution */, hint, node); pipelinePhase(hint, lastSubstitution); ts.Debug.assert(lastNode === node || lastSubstitution === node); } @@ -93130,7 +94382,7 @@ var ts; // SyntaxKind.NumericLiteral // SyntaxKind.BigIntLiteral function emitNumericOrBigIntLiteral(node) { - emitLiteral(node); + emitLiteral(node, /*jsxAttributeEscape*/ false); } // SyntaxKind.StringLiteral // SyntaxKind.RegularExpressionLiteral @@ -93138,8 +94390,8 @@ var ts; // SyntaxKind.TemplateHead // SyntaxKind.TemplateMiddle // SyntaxKind.TemplateTail - function emitLiteral(node) { - var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape); + function emitLiteral(node, jsxAttributeEscape) { + var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape); if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 10 /* StringLiteral */ || ts.isTemplateLiteralKind(node.kind))) { writeLiteral(text); @@ -93602,7 +94854,7 @@ var ts; expression = ts.skipPartiallyEmittedExpressions(expression); if (ts.isNumericLiteral(expression)) { // check if numeric literal is a decimal literal that was originally written with a dot - var text = getLiteralTextOfNode(expression, /*neverAsciiEscape*/ true); + var text = getLiteralTextOfNode(expression, /*neverAsciiEscape*/ true, /*jsxAttributeEscape*/ false); // If he number will be printed verbatim and it doesn't already contain a dot, add one // if the expression doesn't have any comments that will be emitted. return !expression.numericLiteralFlags && !ts.stringContains(text, ts.tokenToString(24 /* DotToken */)); @@ -93717,18 +94969,77 @@ var ts; emitExpression(node.operand); writeTokenText(node.operator, writeOperator); } + var EmitBinaryExpressionState; + (function (EmitBinaryExpressionState) { + EmitBinaryExpressionState[EmitBinaryExpressionState["EmitLeft"] = 0] = "EmitLeft"; + EmitBinaryExpressionState[EmitBinaryExpressionState["EmitRight"] = 1] = "EmitRight"; + EmitBinaryExpressionState[EmitBinaryExpressionState["FinishEmit"] = 2] = "FinishEmit"; + })(EmitBinaryExpressionState || (EmitBinaryExpressionState = {})); + /** + * emitBinaryExpression includes an embedded work stack to attempt to handle as many nested binary expressions + * as possible without creating any additional stack frames. This can only be done when the emit pipeline does + * not require notification/substitution/comment/sourcemap decorations. + */ function emitBinaryExpression(node) { - var isCommaOperator = node.operatorToken.kind !== 27 /* CommaToken */; - var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); - var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); - emitExpression(node.left); - increaseIndentIf(indentBeforeOperator, isCommaOperator); - emitLeadingCommentsOfPosition(node.operatorToken.pos); - writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 /* InKeyword */ ? writeKeyword : writeOperator); - emitTrailingCommentsOfPosition(node.operatorToken.end, /*prefixSpace*/ true); // Binary operators should have a space before the comment starts - increaseIndentIf(indentAfterOperator, /*writeSpaceIfNotIndenting*/ true); - emitExpression(node.right); - decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + var nodeStack = [node]; + var stateStack = [0 /* EmitLeft */]; + var stackIndex = 0; + while (stackIndex >= 0) { + node = nodeStack[stackIndex]; + switch (stateStack[stackIndex]) { + case 0 /* EmitLeft */: { + maybePipelineEmitExpression(node.left); + break; + } + case 1 /* EmitRight */: { + var isCommaOperator = node.operatorToken.kind !== 27 /* CommaToken */; + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + increaseIndentIf(indentBeforeOperator, isCommaOperator); + emitLeadingCommentsOfPosition(node.operatorToken.pos); + writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 /* InKeyword */ ? writeKeyword : writeOperator); + emitTrailingCommentsOfPosition(node.operatorToken.end, /*prefixSpace*/ true); // Binary operators should have a space before the comment starts + increaseIndentIf(indentAfterOperator, /*writeSpaceIfNotIndenting*/ true); + maybePipelineEmitExpression(node.right); + break; + } + case 2 /* FinishEmit */: { + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + stackIndex--; + break; + } + default: return ts.Debug.fail("Invalid state " + stateStack[stackIndex] + " for emitBinaryExpressionWorker"); + } + } + function maybePipelineEmitExpression(next) { + // Advance the state of this unit of work, + stateStack[stackIndex]++; + // Then actually do the work of emitting the node `next` returned by the prior state + // The following section should be identical to `pipelineEmit` save it assumes EmitHint.Expression and offloads + // binary expression handling, where possible, to the contained work queue + // #region trampolinePipelineEmit + var savedLastNode = lastNode; + var savedLastSubstitution = lastSubstitution; + lastNode = next; + lastSubstitution = undefined; + var pipelinePhase = getPipelinePhase(0 /* Notification */, 1 /* Expression */, next); + if (pipelinePhase === pipelineEmitWithHint && ts.isBinaryExpression(next)) { + // If the target pipeline phase is emit directly, and the next node's also a binary expression, + // skip all the intermediate indirection and push the expression directly onto the work stack + stackIndex++; + stateStack[stackIndex] = 0 /* EmitLeft */; + nodeStack[stackIndex] = next; + } + else { + pipelinePhase(1 /* Expression */, next); + } + ts.Debug.assert(lastNode === next); + lastNode = savedLastNode; + lastSubstitution = savedLastSubstitution; + // #endregion trampolinePipelineEmit + } } function emitConditionalExpression(node) { var indentBeforeQuestion = needsIndentation(node, node.condition, node.questionToken); @@ -93931,11 +95242,11 @@ var ts; var node = ts.getParseTreeNode(contextNode); var isSimilarNode = node && node.kind === contextNode.kind; var startPos = pos; - if (isSimilarNode) { + if (isSimilarNode && currentSourceFile) { pos = ts.skipTrivia(currentSourceFile.text, pos); } if (emitLeadingCommentsOfPosition && isSimilarNode && contextNode.pos !== startPos) { - var needsIndent = indentLeading && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); + var needsIndent = indentLeading && currentSourceFile && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); if (needsIndent) { increaseIndent(); } @@ -94410,7 +95721,7 @@ var ts; } function emitJsxAttribute(node) { emit(node.name); - emitNodeWithPrefix("=", writePunctuation, node.initializer, emit); // TODO: GH#18217 + emitNodeWithPrefix("=", writePunctuation, node.initializer, emitJsxAttributeValue); } function emitJsxSpreadAttribute(node) { writePunctuation("{..."); @@ -94541,7 +95852,7 @@ var ts; } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 319 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 320 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } @@ -94557,7 +95868,7 @@ var ts; emitJSDocTypeExpression(tag.typeExpression); emitJSDocComment(tag.comment); } - function emitJSDocAugmentsTag(tag) { + function emitJSDocHeritageTag(tag) { emitJSDocTagName(tag.tagName); writeSpace(); writePunctuation("{"); @@ -95394,19 +96705,19 @@ var ts; } return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node, includeTrivia); } - function getLiteralTextOfNode(node, neverAsciiEscape) { + function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) { if (node.kind === 10 /* StringLiteral */ && node.textSourceNode) { var textSourceNode = node.textSourceNode; if (ts.isIdentifier(textSourceNode)) { - return neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? - "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : - "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; + return jsxAttributeEscape ? "\"" + ts.escapeJsxAttributeString(getTextOfNode(textSourceNode)) + "\"" : + neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : + "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; } else { - return getLiteralTextOfNode(textSourceNode, neverAsciiEscape); + return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape); } } - return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape); + return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape, jsxAttributeEscape); } /** * Push a new name generation scope. @@ -95776,7 +97087,7 @@ var ts; hasWrittenComment = false; var emitFlags = ts.getEmitFlags(node); var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end; - var isEmittedNode = node.kind !== 324 /* NotEmittedStatement */; + var isEmittedNode = node.kind !== 325 /* NotEmittedStatement */; // We have to explicitly check that the node is JsxText because if the compilerOptions.jsx is "preserve" we will not do any transformation. // It is expensive to walk entire tree just to set one kind of node to have no comments. var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0 || node.kind === 11 /* JsxText */; @@ -95807,7 +97118,7 @@ var ts; } ts.forEach(ts.getSyntheticLeadingComments(node), emitLeadingSynthesizedComment); exitComment(); - var pipelinePhase = getNextPipelinePhase(2 /* Comments */, node); + var pipelinePhase = getNextPipelinePhase(2 /* Comments */, hint, node); if (emitFlags & 2048 /* NoNestedComments */) { commentsDisabled = true; pipelinePhase(hint, node); @@ -96045,7 +97356,7 @@ var ts; } function pipelineEmitWithSourceMap(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, node); + var pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, hint, node); if (ts.isUnparsedSource(node) || ts.isUnparsedPrepend(node)) { pipelinePhase(hint, node); } @@ -96059,7 +97370,7 @@ var ts; else { var _a = ts.getSourceMapRange(node), pos = _a.pos, end = _a.end, _b = _a.source, source = _b === void 0 ? sourceMapSource : _b; var emitFlags = ts.getEmitFlags(node); - if (node.kind !== 324 /* NotEmittedStatement */ + if (node.kind !== 325 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && pos >= 0) { emitSourcePos(source, skipSourceTrivia(source, pos)); @@ -96072,7 +97383,7 @@ var ts; else { pipelinePhase(hint, node); } - if (node.kind !== 324 /* NotEmittedStatement */ + if (node.kind !== 325 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && end >= 0) { emitSourcePos(source, end); @@ -96857,12 +98168,6 @@ var ts; return formatStyle + text + resetEscapeSequence; } ts.formatColorAndReset = formatColorAndReset; - function padLeft(s, length) { - while (s.length < length) { - s = " " + s; - } - return s; - } function formatCodeSpan(file, start, length, indent, squiggleColor, host) { var _a = ts.getLineAndCharacterOfPosition(file, start), firstLine = _a.line, firstLineChar = _a.character; var _b = ts.getLineAndCharacterOfPosition(file, start + length), lastLine = _b.line, lastLineChar = _b.character; @@ -96878,7 +98183,7 @@ var ts; // If the error spans over 5 lines, we'll only show the first 2 and last 2 lines, // so we'll skip ahead to the second-to-last line. if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) { - context += indent + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); + context += indent + formatColorAndReset(ts.padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); i = lastLine - 1; } var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0); @@ -96887,10 +98192,10 @@ var ts; lineContent = lineContent.replace(/\s+$/g, ""); // trim from end lineContent = lineContent.replace("\t", " "); // convert tabs to single spaces // Output the gutter and the actual contents of the line. - context += indent + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; context += lineContent + host.getNewLine(); // Output the gutter and the error span for the line using tildes. - context += indent + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; context += squiggleColor; if (i === firstLine) { // If we're on the last line, then limit it to the last character of the last line. @@ -97049,7 +98354,7 @@ var ts; hasInvalidatedResolution(sourceFile.path); } function sourceFileVersionUptoDate(sourceFile) { - return sourceFile.version === getSourceVersion(sourceFile.resolvedPath); + return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName); } function projectReferenceUptoDate(oldRef, newRef, index) { if (!ts.projectReferenceIsEqualTo(oldRef, newRef)) { @@ -97154,10 +98459,10 @@ var ts; var hasEmitBlockingDiagnostics = ts.createMap(); var _compilerOptionsObjectLiteralSyntax; var moduleResolutionCache; - var resolveModuleNamesWorker; + var actualResolveModuleNamesWorker; var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse; if (host.resolveModuleNames) { - resolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.assertEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { + actualResolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.checkEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. if (!resolved || resolved.extension !== undefined) { return resolved; @@ -97170,15 +98475,15 @@ var ts; else { moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); }, options); var loader_1 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache, redirectedReference).resolvedModule; }; // TODO: GH#18217 - resolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; + actualResolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; } - var resolveTypeReferenceDirectiveNamesWorker; + var actualResolveTypeReferenceDirectiveNamesWorker; if (host.resolveTypeReferenceDirectives) { - resolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.assertEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; } else { var loader_2 = function (typesRef, containingFile, redirectedReference) { return ts.resolveTypeReferenceDirective(typesRef, containingFile, options, host, redirectedReference).resolvedTypeReferenceDirective; }; // TODO: GH#18217 - resolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; } // Map from a stringified PackageId to the source file with that id. // Only one source file may have a given packageId. Others become redirects (see createRedirectSourceFile). @@ -97339,6 +98644,7 @@ var ts; getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); }, getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); }, getTypeCount: function () { return getDiagnosticsProducingTypeChecker().getTypeCount(); }, + getInstantiationCount: function () { return getDiagnosticsProducingTypeChecker().getInstantiationCount(); }, getRelationCacheSizes: function () { return getDiagnosticsProducingTypeChecker().getRelationCacheSizes(); }, getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; }, getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; }, @@ -97366,6 +98672,20 @@ var ts; ts.performance.mark("afterProgram"); ts.performance.measure("Program", "beforeProgram", "afterProgram"); return program; + function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference) { + ts.performance.mark("beforeResolveModule"); + var result = actualResolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference); + ts.performance.mark("afterResolveModule"); + ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule"); + return result; + } + function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference) { + ts.performance.mark("beforeResolveTypeReference"); + var result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference); + ts.performance.mark("afterResolveTypeReference"); + ts.performance.measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"); + return result; + } function compareDefaultLibFiles(a, b) { return ts.compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b)); } @@ -97439,13 +98759,13 @@ var ts; // which per above occurred during the current program creation. // Since we assume the filesystem does not change during program creation, // it is safe to reuse resolutions from the earlier call. - var result_8 = []; + var result_9 = []; for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { var moduleName = moduleNames_1[_i]; var resolvedModule = file.resolvedModules.get(moduleName); - result_8.push(resolvedModule); + result_9.push(resolvedModule); } - return result_8; + return result_9; } // At this point, we know at least one of the following hold: // - file has local declarations for ambient modules @@ -97739,7 +99059,7 @@ var ts; } if (resolveTypeReferenceDirectiveNamesWorker) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); var resolutions_1 = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFilePath, getResolvedProjectReferenceToRedirect(newSourceFile.originalFileName)); // ensure that types resolutions are still correct var resolutionsChanged_1 = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions_1, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo); @@ -98045,10 +99365,10 @@ var ts; function getJSSyntacticDiagnosticsForFile(sourceFile) { return runWithCancellationToken(function () { var diagnostics = []; - var parent = sourceFile; - walk(sourceFile); + walk(sourceFile, sourceFile); + ts.forEachChildRecursively(sourceFile, walk, walkArray); return diagnostics; - function walk(node) { + function walk(node, parent) { // Return directly from the case if the given node doesnt want to visit each child // Otherwise break to visit each child switch (parent.kind) { @@ -98057,7 +99377,7 @@ var ts; case 161 /* MethodDeclaration */: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); - return; + return "skip"; } // falls through case 160 /* MethodSignature */: @@ -98071,70 +99391,66 @@ var ts; // type annotation if (parent.type === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } } switch (node.kind) { case 255 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node.parent, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); - return; + return "skip"; } break; case 260 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); - return; + return "skip"; } break; case 253 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 259 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 279 /* HeritageClause */: var heritageClause = node; if (heritageClause.token === 113 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 246 /* InterfaceDeclaration */: var interfaceKeyword = ts.tokenToString(114 /* InterfaceKeyword */); - ts.Debug.assertDefined(interfaceKeyword); + ts.Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); - return; + return "skip"; case 249 /* ModuleDeclaration */: var moduleKeyword = node.flags & 16 /* Namespace */ ? ts.tokenToString(136 /* NamespaceKeyword */) : ts.tokenToString(135 /* ModuleKeyword */); - ts.Debug.assertDefined(moduleKeyword); + ts.Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); - return; + return "skip"; case 247 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 248 /* EnumDeclaration */: - var enumKeyword = ts.Debug.assertDefined(ts.tokenToString(88 /* EnumKeyword */)); + var enumKeyword = ts.Debug.checkDefined(ts.tokenToString(88 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); - return; + return "skip"; case 218 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 217 /* AsExpression */: diagnostics.push(createDiagnosticForNode(node.type, ts.Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 199 /* TypeAssertionExpression */: ts.Debug.fail(); // Won't parse these in a JS file anyway, as they are interpreted as JSX. } - var prevParent = parent; - parent = node; - ts.forEachChild(node, walk, walkArray); - parent = prevParent; } - function walkArray(nodes) { + function walkArray(nodes, parent) { if (parent.decorators === nodes && !options.experimentalDecorators) { diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)); } @@ -98151,13 +99467,14 @@ var ts; // Check type parameters if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } // falls through case 225 /* VariableStatement */: // Check modifiers if (nodes === parent.modifiers) { - return checkModifiers(parent.modifiers, parent.kind === 225 /* VariableStatement */); + checkModifiers(parent.modifiers, parent.kind === 225 /* VariableStatement */); + return "skip"; } break; case 159 /* PropertyDeclaration */: @@ -98169,14 +99486,14 @@ var ts; diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, ts.tokenToString(modifier.kind))); } } - return; + return "skip"; } break; case 156 /* Parameter */: // Check modifiers of parameter declaration if (nodes === parent.modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 196 /* CallExpression */: @@ -98188,14 +99505,10 @@ var ts; // Check type arguments if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; } - for (var _b = 0, nodes_6 = nodes; _b < nodes_6.length; _b++) { - var node = nodes_6[_b]; - walk(node); - } } function checkModifiers(modifiers, isConstValid) { for (var _i = 0, modifiers_1 = modifiers; _i < modifiers_1.length; _i++) { @@ -98407,7 +99720,7 @@ var ts; } } function getLibFileFromReference(ref) { - var libName = ref.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(ref.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { return getSourceFile(ts.combinePaths(defaultLibraryPath, libFileName)); @@ -98616,7 +99929,7 @@ var ts; file.originalFileName = originalFileName; addFileToRefFileMap(fileName, file, refFile); if (host.useCaseSensitiveFileNames()) { - var pathLowerCase = path.toLowerCase(); + var pathLowerCase = ts.toFileNameLowerCase(path); // for case-sensitive file systems check if we've already seen some file with similar filename ignoring case var existingFile = filesByNameIgnoreCase.get(pathLowerCase); if (existingFile) { @@ -98787,7 +100100,7 @@ var ts; } function processTypeReferenceDirectives(file) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); if (!typeDirectives) { return; } @@ -98796,7 +100109,7 @@ var ts; var ref = file.typeReferenceDirectives[i]; var resolvedTypeReferenceDirective = resolutions[i]; // store resolved type directive on the file - var fileName = ref.fileName.toLocaleLowerCase(); + var fileName = ts.toFileNameLowerCase(ref.fileName); ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective); processTypeReferenceDirective(fileName, resolvedTypeReferenceDirective, { kind: ts.RefFileKind.TypeReferenceDirective, @@ -98858,7 +100171,7 @@ var ts; } function processLibReferenceDirectives(file) { ts.forEach(file.libReferenceDirectives, function (libReference) { - var libName = libReference.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(libReference.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { // we ignore any 'no-default-lib' reference set on this file. @@ -98990,7 +100303,7 @@ var ts; projectReferenceRedirects.set(sourceFilePath, false); return undefined; } - sourceFile = ts.Debug.assertDefined(commandLine.options.configFile); + sourceFile = ts.Debug.checkDefined(commandLine.options.configFile); ts.Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath); addFileToFilesByName(sourceFile, sourceFilePath, /*redirectedPath*/ undefined); } @@ -99055,6 +100368,9 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } + if (!options.listFilesOnly && options.noEmit && ts.isIncrementalCompilation(options)) { + createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); + } verifyProjectReferences(); // List of collected files is complete; validate exhautiveness if this is a project with a file list if (options.composite) { @@ -99233,7 +100549,7 @@ var ts; chain = ts.chainDiagnosticMessages(chain, ts.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file, emitFileName); blockEmittingOfFile(emitFileName, ts.createCompilerDiagnosticFromMessageChain(chain)); } - var emitFileKey = !host.useCaseSensitiveFileNames() ? emitFilePath.toLocaleLowerCase() : emitFilePath; + var emitFileKey = !host.useCaseSensitiveFileNames() ? ts.toFileNameLowerCase(emitFilePath) : emitFilePath; // Report error if multiple files write into same file if (emitFilesSeen.has(emitFileKey)) { // Already seen the same emit file - report error @@ -99251,7 +100567,7 @@ var ts; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } - var refFile = ts.Debug.assertDefined(getSourceFileByPath(refPathToReportErrorOn.file)); + var refFile = ts.Debug.checkDefined(getSourceFileByPath(refPathToReportErrorOn.file)); var kind = refPathToReportErrorOn.kind, index = refPathToReportErrorOn.index; var pos, end; switch (kind) { @@ -99476,7 +100792,7 @@ var ts; return { fileExists: function (f) { return directoryStructureHost.fileExists(f); }, readDirectory: function (root, extensions, excludes, includes, depth) { - ts.Debug.assertDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + ts.Debug.assertIsDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: function (f) { return directoryStructureHost.readFile(f); }, @@ -99694,7 +101010,7 @@ var ts; // Create the reference map, and set the file infos for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) { var sourceFile = _a[_i]; - var version_1 = ts.Debug.assertDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); + var version_1 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined; if (referencedMap) { var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName); @@ -100221,7 +101537,7 @@ var ts; } // With --out or --outFile all outputs go into single file // so operations are performed directly on program, return program - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var compilerOptions = program.getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); @@ -100246,10 +101562,10 @@ var ts; if (affectedFilesPendingEmit) { var seenEmittedFiles = state.seenEmittedFiles || (state.seenEmittedFiles = ts.createMap()); for (var i = state.affectedFilesPendingEmitIndex; i < affectedFilesPendingEmit.length; i++) { - var affectedFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); + var affectedFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); if (affectedFile) { var seenKind = seenEmittedFiles.get(affectedFile.resolvedPath); - var emitKind = ts.Debug.assertDefined(ts.Debug.assertDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); + var emitKind = ts.Debug.checkDefined(ts.Debug.checkDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); if (seenKind === undefined || seenKind < emitKind) { // emit this file state.affectedFilesPendingEmitIndex = i; @@ -100273,7 +101589,7 @@ var ts; if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) { if (!state.cleanedDiagnosticsOfLibFiles) { state.cleanedDiagnosticsOfLibFiles = true; - var program_1 = ts.Debug.assertDefined(state.program); + var program_1 = ts.Debug.checkDefined(state.program); var options_2 = program_1.getCompilerOptions(); ts.forEach(program_1.getSourceFiles(), function (f) { return program_1.isSourceFileDefaultLibrary(f) && @@ -100294,14 +101610,14 @@ var ts; function handleDtsMayChangeOf(state, path, cancellationToken, computeHash) { removeSemanticDiagnosticsOf(state, path); if (!state.changedFilesSet.has(path)) { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var sourceFile = program.getSourceFileByPath(path); if (sourceFile) { // Even though the js emit doesnt change and we are already handling dts emit and semantic diagnostics // we need to update the signature to reflect correctness of the signature(which is output d.ts emit) of this file // This ensures that we dont later during incremental builds considering wrong signature. // Eg where this also is needed to ensure that .tsbuildinfo generated by incremental build should be same as if it was first fresh build - ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.assertDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); + ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); // If not dts emit, nothing more to do if (ts.getEmitDeclarations(state.compilerOptions)) { addToAffectedFilesPendingEmit(state, path, 0 /* DtsOnly */); @@ -100323,8 +101639,8 @@ var ts; return !state.semanticDiagnosticsFromOldState.size; } function isChangedSignagure(state, path) { - var newSignature = ts.Debug.assertDefined(state.currentAffectedFilesSignatures).get(path); - var oldSignagure = ts.Debug.assertDefined(state.fileInfos.get(path)).signature; + var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path); + var oldSignagure = ts.Debug.checkDefined(state.fileInfos.get(path)).signature; return newSignature !== oldSignagure; } /** @@ -100350,7 +101666,7 @@ var ts; seenFileNamesMap.set(currentPath, true); var result = fn(state, currentPath); if (result && isChangedSignagure(state, currentPath)) { - var currentSourceFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(currentPath); + var currentSourceFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(currentPath); queue.push.apply(queue, ts.BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath)); } } @@ -100463,7 +101779,7 @@ var ts; * bindAndCheckDiagnostics (from cache) and program diagnostics */ function getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken) { - return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.assertDefined(state.program).getProgramDiagnostics(sourceFile)); + return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.checkDefined(state.program).getProgramDiagnostics(sourceFile)); } /** * Gets the binder and checker diagnostics either from cache if present, or otherwise from program and caches it @@ -100479,7 +101795,7 @@ var ts; } } // Diagnostics werent cached, get them from program, and cache the result - var diagnostics = ts.Debug.assertDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); + var diagnostics = ts.Debug.checkDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); if (state.semanticDiagnosticsPerFile) { state.semanticDiagnosticsPerFile.set(path, diagnostics); } @@ -100491,7 +101807,7 @@ var ts; function getProgramBuildInfo(state, getCanonicalFileName) { if (state.compilerOptions.outFile || state.compilerOptions.out) return undefined; - var currentDirectory = ts.Debug.assertDefined(state.program).getCurrentDirectory(); + var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory(); var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory)); var fileInfos = {}; state.fileInfos.forEach(function (value, key) { @@ -100657,10 +101973,10 @@ var ts; backupState = cloneBuilderProgramState(state); }; builderProgram.restoreState = function () { - state = ts.Debug.assertDefined(backupState); + state = ts.Debug.checkDefined(backupState); backupState = undefined; }; - builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.assertDefined(state.program), sourceFile); }; + builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); }; builderProgram.getSemanticDiagnostics = getSemanticDiagnostics; builderProgram.emit = emit; builderProgram.releaseProgram = function () { @@ -100694,7 +102010,7 @@ var ts; if (state.emittedBuildInfo) { return undefined; } - var affected_1 = ts.Debug.assertDefined(state.program); + var affected_1 = ts.Debug.checkDefined(state.program); return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file @@ -100706,7 +102022,7 @@ var ts; isPendingEmitFile = true; } else { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); if (state.programEmitComplete) return undefined; affected = program; @@ -100715,7 +102031,7 @@ var ts; return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file - ts.Debug.assertDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */, customTransformers), affected, emitKind, isPendingEmitFile); + ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */, customTransformers), affected, emitKind, isPendingEmitFile); } /** * Emits the JavaScript and declaration files. @@ -100755,7 +102071,7 @@ var ts; }; } } - return ts.Debug.assertDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); + return ts.Debug.checkDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); } /** * Return the semantic diagnostics for the next affected file or undefined if iteration is complete @@ -100795,11 +102111,11 @@ var ts; */ function getSemanticDiagnostics(sourceFile, cancellationToken) { assertSourceFileOkWithoutNextAffectedCall(state, sourceFile); - var compilerOptions = ts.Debug.assertDefined(state.program).getCompilerOptions(); + var compilerOptions = ts.Debug.checkDefined(state.program).getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); // We dont need to cache the diagnostics just return them from program - return ts.Debug.assertDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); + return ts.Debug.checkDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); } if (sourceFile) { return getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken); @@ -100810,7 +102126,7 @@ var ts; while (getSemanticDiagnosticsOfNextAffectedFile(cancellationToken)) { } var diagnostics; - for (var _i = 0, _a = ts.Debug.assertDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { + for (var _i = 0, _a = ts.Debug.checkDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { var sourceFile_1 = _a[_i]; diagnostics = ts.addRange(diagnostics, getSemanticDiagnosticsOfFile(state, sourceFile_1, cancellationToken)); } @@ -100918,7 +102234,7 @@ var ts; close: ts.noop, }; function getProgram() { - return ts.Debug.assertDefined(state.program); + return ts.Debug.checkDefined(state.program); } } ts.createRedirectedBuilderProgram = createRedirectedBuilderProgram; @@ -101025,6 +102341,7 @@ var ts; var directoryWatchesOfFailedLookups = ts.createMap(); var rootDir = rootDirForResolution && ts.removeTrailingDirectorySeparator(ts.getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory())); var rootPath = (rootDir && resolutionHost.toPath(rootDir)); // TODO: GH#18217 + var rootSplitLength = rootPath !== undefined ? rootPath.split(ts.directorySeparator).length : 0; // TypeRoot watches for the types that get added as part of getAutomaticTypeDirectiveNames var typeRootsWatches = ts.createMap(); return { @@ -101126,7 +102443,7 @@ var ts; if (globalCache !== undefined && !ts.isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && ts.extensionIsTS(primaryResult.resolvedModule.extension))) { // create different collection of failed lookup locations for second pass // if it will fail and we've already found something during the first pass - we don't want to pollute its results - var _a = ts.loadModuleFromGlobalCache(ts.Debug.assertDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; + var _a = ts.loadModuleFromGlobalCache(ts.Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; if (resolvedModule) { return { resolvedModule: resolvedModule, failedLookupLocations: ts.addRange(primaryResult.failedLookupLocations, failedLookupLocations) }; } @@ -101235,15 +102552,23 @@ var ts; if (isInDirectoryPath(rootPath, failedLookupLocationPath)) { // Ensure failed look up is normalized path failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory()); - ts.Debug.assert(failedLookupLocation.length === failedLookupLocationPath.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); - var subDirectoryInRoot = failedLookupLocationPath.indexOf(ts.directorySeparator, rootPath.length + 1); - if (subDirectoryInRoot !== -1) { + var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator); + var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator); + ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); + if (failedLookupPathSplit.length > rootSplitLength + 1) { // Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution - return { dir: failedLookupLocation.substr(0, subDirectoryInRoot), dirPath: failedLookupLocationPath.substr(0, subDirectoryInRoot) }; + return { + dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator), + dirPath: failedLookupPathSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator) + }; } else { // Always watch root directory non recursively - return { dir: rootDir, dirPath: rootPath, nonRecursive: false }; // TODO: GH#18217 + return { + dir: rootDir, + dirPath: rootPath, + nonRecursive: false + }; } } return getDirectoryToWatchFromFailedLookupLocationDirectory(ts.getDirectoryPath(ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory())), ts.getDirectoryPath(failedLookupLocationPath)); @@ -101447,7 +102772,7 @@ var ts; resolution.isInvalidated = true; (filesWithInvalidatedResolutions || (filesWithInvalidatedResolutions = ts.createMap())).set(containingFilePath, true); // When its a file with inferred types resolution, invalidate type reference directive resolution - if (containingFilePath.endsWith(ts.inferredTypesContainingFile)) { + if (ts.endsWith(containingFilePath, ts.inferredTypesContainingFile)) { resolutionHost.onChangedAutomaticTypeDirectiveNames(); } } @@ -102301,7 +103626,7 @@ var ts; var getDefaultLibLocation = ts.memoize(function () { return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath())); }); var host = system; // TODO: `host` is unused! - // eslint-disable-next-line no-unused-expressions + // eslint-disable-next-line @typescript-eslint/no-unused-expressions host; return { useCaseSensitiveFileNames: function () { return system.useCaseSensitiveFileNames; }, @@ -102841,7 +104166,7 @@ var ts; return watchDirectory(host, directory, function (fileOrDirectory) { ts.Debug.assert(!!configFileName); var fileOrDirectoryPath = toPath(fileOrDirectory); - // Since the file existance changed, update the sourceFiles cache + // Since the file existence changed, update the sourceFiles cache if (cachedDirectoryStructureHost) { cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); } @@ -103027,7 +104352,7 @@ var ts; if (!compilerHost.resolveModuleNames) { var loader_3 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference).resolvedModule; }; compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference) { - return ts.loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_3); + return ts.loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_3); }; } var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchFilePath = _a.watchFilePath, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog; @@ -103413,7 +104738,7 @@ var ts; if (state.options.verbose) reportStatus(state, ts.Diagnostics.Building_project_0, project); if (config.fileNames.length === 0) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); // Nothing to build - must be a solution file, basically buildResult = BuildResultFlags.None; step = Step.QueueReferencingProjects; @@ -103424,7 +104749,7 @@ var ts; // Update module resolution cache if needed updateModuleResolutionCache(state, project, config); // Create program - program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), config.errors, config.projectReferences); + program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences); step++; } function handleDiagnostics(diagnostics, errorFlags, errorType) { @@ -103437,14 +104762,14 @@ var ts; } } function getSyntaxDiagnostics(cancellationToken) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); handleDiagnostics(__spreadArrays(program.getConfigFileParsingDiagnostics(), program.getOptionsDiagnostics(cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken)), BuildResultFlags.SyntaxErrors, "Syntactic"); } function getSemanticDiagnostics(cancellationToken) { - handleDiagnostics(ts.Debug.assertDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); + handleDiagnostics(ts.Debug.checkDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); } function emit(writeFileCallback, cancellationToken, customTransformers) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); ts.Debug.assert(step === Step.Emit); // Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly program.backupState(); @@ -103578,11 +104903,11 @@ var ts; emitBundle(writeFile, customTransformers); break; case Step.BuildInvalidatedProjectOfBundle: - ts.Debug.assertDefined(invalidatedProjectOfBundle).done(cancellationToken); + ts.Debug.checkDefined(invalidatedProjectOfBundle).done(cancellationToken); step = Step.Done; break; case Step.QueueReferencingProjects: - queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.assertDefined(buildResult)); + queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.checkDefined(buildResult)); step++; break; // Should never be done @@ -103599,7 +104924,7 @@ var ts; if (status.type !== ts.UpToDateStatusType.OutOfDateWithPrepend || options.force) return true; return config.fileNames.length === 0 || - !!config.errors.length || + !!ts.getConfigFileParsingDiagnostics(config).length || !ts.isIncrementalCompilation(config.options); } function getNextInvalidatedProject(state, buildOrder, reportQueue) { @@ -103646,7 +104971,7 @@ var ts; verboseReportProjectStatus(state, project, status); if (!options.force) { if (status.type === ts.UpToDateStatusType.UpToDate) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); // Up to date, skip if (options.dry) { @@ -103656,12 +104981,12 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); return createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder); } } if (status.type === ts.UpToDateStatusType.UpstreamBlocked) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); if (options.verbose) { reportStatus(state, status.upstreamProjectBlocked ? @@ -103671,7 +104996,7 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.ContainerOnly) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); // Do nothing continue; @@ -105091,7 +106416,7 @@ var ts; case 247 /* TypeAliasDeclaration */: case 173 /* TypeLiteral */: return 2 /* Type */; - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: // If it has no name node, it shares the name with the value declaration below it. return node.name === undefined ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; case 284 /* EnumMember */: @@ -105123,6 +106448,7 @@ var ts; } ts.getMeaningFromDeclaration = getMeaningFromDeclaration; function getMeaningFromLocation(node) { + node = getAdjustedReferenceLocation(node); if (node.kind === 290 /* SourceFile */) { return 1 /* Value */; } @@ -105407,8 +106733,8 @@ var ts; return "class" /* classElement */; case 246 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; case 247 /* TypeAliasDeclaration */: - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: return "type" /* typeElement */; case 248 /* EnumDeclaration */: return "enum" /* enumElement */; case 242 /* VariableDeclaration */: @@ -105474,6 +106800,10 @@ var ts; } case 75 /* Identifier */: return ts.isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; + case 259 /* ExportAssignment */: + var scriptKind = getNodeKind(node.expression); + // If the expression didn't come back with something (like it does for an identifiers) + return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: return "" /* unknown */; } @@ -105720,6 +107050,339 @@ var ts; return syntaxList; } ts.findContainingList = findContainingList; + function isDefaultModifier(node) { + return node.kind === 84 /* DefaultKeyword */; + } + function isClassKeyword(node) { + return node.kind === 80 /* ClassKeyword */; + } + function isFunctionKeyword(node) { + return node.kind === 94 /* FunctionKeyword */; + } + function getAdjustedLocationForClass(node) { + if (ts.isNamedDeclaration(node)) { + return node.name; + } + if (ts.isClassDeclaration(node)) { + // for class and function declarations, use the `default` modifier + // when the declaration is unnamed. + var defaultModifier = ts.find(node.modifiers, isDefaultModifier); + if (defaultModifier) + return defaultModifier; + } + if (ts.isClassExpression(node)) { + // for class expressions, use the `class` keyword when the class is unnamed + var classKeyword = ts.find(node.getChildren(), isClassKeyword); + if (classKeyword) + return classKeyword; + } + } + function getAdjustedLocationForFunction(node) { + if (ts.isNamedDeclaration(node)) { + return node.name; + } + if (ts.isFunctionDeclaration(node)) { + // for class and function declarations, use the `default` modifier + // when the declaration is unnamed. + var defaultModifier = ts.find(node.modifiers, isDefaultModifier); + if (defaultModifier) + return defaultModifier; + } + if (ts.isFunctionExpression(node)) { + // for function expressions, use the `function` keyword when the function is unnamed + var functionKeyword = ts.find(node.getChildren(), isFunctionKeyword); + if (functionKeyword) + return functionKeyword; + } + } + function getAdjustedLocationForDeclaration(node, forRename) { + if (!forRename) { + switch (node.kind) { + case 245 /* ClassDeclaration */: + case 214 /* ClassExpression */: + return getAdjustedLocationForClass(node); + case 244 /* FunctionDeclaration */: + case 201 /* FunctionExpression */: + return getAdjustedLocationForFunction(node); + } + } + if (ts.isNamedDeclaration(node)) { + return node.name; + } + } + function getAdjustedLocationForImportDeclaration(node, forRename) { + if (node.importClause) { + if (node.importClause.name && node.importClause.namedBindings) { + // do not adjust if we have both a name and named bindings + return; + } + // /**/import [|name|] from ...; + // import /**/type [|name|] from ...; + if (node.importClause.name) { + return node.importClause.name; + } + // /**/import { [|name|] } from ...; + // /**/import { propertyName as [|name|] } from ...; + // /**/import * as [|name|] from ...; + // import /**/type { [|name|] } from ...; + // import /**/type { propertyName as [|name|] } from ...; + // import /**/type * as [|name|] from ...; + if (node.importClause.namedBindings) { + if (ts.isNamedImports(node.importClause.namedBindings)) { + // do nothing if there is more than one binding + var onlyBinding = ts.singleOrUndefined(node.importClause.namedBindings.elements); + if (!onlyBinding) { + return; + } + return onlyBinding.name; + } + else if (ts.isNamespaceImport(node.importClause.namedBindings)) { + return node.importClause.namedBindings.name; + } + } + } + if (!forRename) { + // /**/import "[|module|]"; + // /**/import ... from "[|module|]"; + // import /**/type ... from "[|module|]"; + return node.moduleSpecifier; + } + } + function getAdjustedLocationForExportDeclaration(node, forRename) { + if (node.exportClause) { + // /**/export { [|name|] } ... + // /**/export { propertyName as [|name|] } ... + // /**/export * as [|name|] ... + // export /**/type { [|name|] } from ... + // export /**/type { propertyName as [|name|] } from ... + // export /**/type * as [|name|] ... + if (ts.isNamedExports(node.exportClause)) { + // do nothing if there is more than one binding + var onlyBinding = ts.singleOrUndefined(node.exportClause.elements); + if (!onlyBinding) { + return; + } + return node.exportClause.elements[0].name; + } + else if (ts.isNamespaceExport(node.exportClause)) { + return node.exportClause.name; + } + } + if (!forRename) { + // /**/export * from "[|module|]"; + // export /**/type * from "[|module|]"; + return node.moduleSpecifier; + } + } + function getAdjustedLocationForHeritageClause(node) { + // /**/extends [|name|] + // /**/implements [|name|] + if (node.types.length === 1) { + return node.types[0].expression; + } + // /**/extends name1, name2 ... + // /**/implements name1, name2 ... + } + function getAdjustedLocation(node, forRename) { + var parent = node.parent; + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/import [|name|] = ... + // + // NOTE: If the node is a modifier, we don't adjust its location if it is the `default` modifier as that is handled + // specially by `getSymbolAtLocation`. + if (ts.isModifier(node) && (forRename || node.kind !== 84 /* DefaultKeyword */) ? ts.contains(parent.modifiers, node) : + node.kind === 80 /* ClassKeyword */ ? ts.isClassDeclaration(parent) || ts.isClassExpression(node) : + node.kind === 94 /* FunctionKeyword */ ? ts.isFunctionDeclaration(parent) || ts.isFunctionExpression(node) : + node.kind === 114 /* InterfaceKeyword */ ? ts.isInterfaceDeclaration(parent) : + node.kind === 88 /* EnumKeyword */ ? ts.isEnumDeclaration(parent) : + node.kind === 145 /* TypeKeyword */ ? ts.isTypeAliasDeclaration(parent) : + node.kind === 136 /* NamespaceKeyword */ || node.kind === 135 /* ModuleKeyword */ ? ts.isModuleDeclaration(parent) : + node.kind === 96 /* ImportKeyword */ ? ts.isImportEqualsDeclaration(parent) : + node.kind === 131 /* GetKeyword */ ? ts.isGetAccessorDeclaration(parent) : + node.kind === 142 /* SetKeyword */ && ts.isSetAccessorDeclaration(parent)) { + var location = getAdjustedLocationForDeclaration(parent, forRename); + if (location) { + return location; + } + } + // /**/ [|name|] ... + if ((node.kind === 109 /* VarKeyword */ || node.kind === 81 /* ConstKeyword */ || node.kind === 115 /* LetKeyword */) && + ts.isVariableDeclarationList(parent) && parent.declarations.length === 1) { + var decl = parent.declarations[0]; + if (ts.isIdentifier(decl.name)) { + return decl.name; + } + } + if (node.kind === 145 /* TypeKeyword */) { + // import /**/type [|name|] from ...; + // import /**/type { [|name|] } from ...; + // import /**/type { propertyName as [|name|] } from ...; + // import /**/type ... from "[|module|]"; + if (ts.isImportClause(parent) && parent.isTypeOnly) { + var location = getAdjustedLocationForImportDeclaration(parent.parent, forRename); + if (location) { + return location; + } + } + // export /**/type { [|name|] } from ...; + // export /**/type { propertyName as [|name|] } from ...; + // export /**/type * from "[|module|]"; + // export /**/type * as ... from "[|module|]"; + if (ts.isExportDeclaration(parent) && parent.isTypeOnly) { + var location = getAdjustedLocationForExportDeclaration(parent, forRename); + if (location) { + return location; + } + } + } + // import { propertyName /**/as [|name|] } ... + // import * /**/as [|name|] ... + // export { propertyName /**/as [|name|] } ... + // export * /**/as [|name|] ... + if (node.kind === 123 /* AsKeyword */) { + if (ts.isImportSpecifier(parent) && parent.propertyName || + ts.isExportSpecifier(parent) && parent.propertyName || + ts.isNamespaceImport(parent) || + ts.isNamespaceExport(parent)) { + return parent.name; + } + if (ts.isExportDeclaration(parent) && parent.exportClause && ts.isNamespaceExport(parent.exportClause)) { + return parent.exportClause.name; + } + } + // /**/import [|name|] from ...; + // /**/import { [|name|] } from ...; + // /**/import { propertyName as [|name|] } from ...; + // /**/import ... from "[|module|]"; + // /**/import "[|module|]"; + if (node.kind === 96 /* ImportKeyword */ && ts.isImportDeclaration(parent)) { + var location = getAdjustedLocationForImportDeclaration(parent, forRename); + if (location) { + return location; + } + } + if (node.kind === 89 /* ExportKeyword */) { + // /**/export { [|name|] } ...; + // /**/export { propertyName as [|name|] } ...; + // /**/export * from "[|module|]"; + // /**/export * as ... from "[|module|]"; + if (ts.isExportDeclaration(parent)) { + var location = getAdjustedLocationForExportDeclaration(parent, forRename); + if (location) { + return location; + } + } + // NOTE: We don't adjust the location of the `default` keyword as that is handled specially by `getSymbolAtLocation`. + // /**/export default [|name|]; + // /**/export = [|name|]; + if (ts.isExportAssignment(parent)) { + return ts.skipOuterExpressions(parent.expression); + } + } + // import name = /**/require("[|module|]"); + if (node.kind === 139 /* RequireKeyword */ && ts.isExternalModuleReference(parent)) { + return parent.expression; + } + // import ... /**/from "[|module|]"; + // export ... /**/from "[|module|]"; + if (node.kind === 149 /* FromKeyword */ && (ts.isImportDeclaration(parent) || ts.isExportDeclaration(parent)) && parent.moduleSpecifier) { + return parent.moduleSpecifier; + } + // class ... /**/extends [|name|] ... + // class ... /**/implements [|name|] ... + // class ... /**/implements name1, name2 ... + // interface ... /**/extends [|name|] ... + // interface ... /**/extends name1, name2 ... + if ((node.kind === 90 /* ExtendsKeyword */ || node.kind === 113 /* ImplementsKeyword */) && ts.isHeritageClause(parent) && parent.token === node.kind) { + var location = getAdjustedLocationForHeritageClause(parent); + if (location) { + return location; + } + } + if (node.kind === 90 /* ExtendsKeyword */) { + // ... ... + if (ts.isTypeParameterDeclaration(parent) && parent.constraint && ts.isTypeReferenceNode(parent.constraint)) { + return parent.constraint.typeName; + } + // ... T /**/extends [|U|] ? ... + if (ts.isConditionalTypeNode(parent) && ts.isTypeReferenceNode(parent.extendsType)) { + return parent.extendsType.typeName; + } + } + // ... T extends /**/infer [|U|] ? ... + if (node.kind === 132 /* InferKeyword */ && ts.isInferTypeNode(parent)) { + return parent.typeParameter.name; + } + // { [ [|K|] /**/in keyof T]: ... } + if (node.kind === 97 /* InKeyword */ && ts.isTypeParameterDeclaration(parent) && ts.isMappedTypeNode(parent.parent)) { + return parent.name; + } + // /**/keyof [|T|] + if (node.kind === 134 /* KeyOfKeyword */ && ts.isTypeOperatorNode(parent) && parent.operator === 134 /* KeyOfKeyword */ && + ts.isTypeReferenceNode(parent.type)) { + return parent.type.typeName; + } + // /**/readonly [|name|][] + if (node.kind === 138 /* ReadonlyKeyword */ && ts.isTypeOperatorNode(parent) && parent.operator === 138 /* ReadonlyKeyword */ && + ts.isArrayTypeNode(parent.type) && ts.isTypeReferenceNode(parent.type.elementType)) { + return parent.type.elementType.typeName; + } + if (!forRename) { + // /**/new [|name|] + // /**/void [|name|] + // /**/void obj.[|name|] + // /**/typeof [|name|] + // /**/typeof obj.[|name|] + // /**/await [|name|] + // /**/await obj.[|name|] + // /**/yield [|name|] + // /**/yield obj.[|name|] + // /**/delete obj.[|name|] + if (node.kind === 99 /* NewKeyword */ && ts.isNewExpression(parent) || + node.kind === 110 /* VoidKeyword */ && ts.isVoidExpression(parent) || + node.kind === 108 /* TypeOfKeyword */ && ts.isTypeOfExpression(parent) || + node.kind === 127 /* AwaitKeyword */ && ts.isAwaitExpression(parent) || + node.kind === 121 /* YieldKeyword */ && ts.isYieldExpression(parent) || + node.kind === 85 /* DeleteKeyword */ && ts.isDeleteExpression(parent)) { + if (parent.expression) { + return ts.skipOuterExpressions(parent.expression); + } + } + // left /**/in [|name|] + // left /**/instanceof [|name|] + if ((node.kind === 97 /* InKeyword */ || node.kind === 98 /* InstanceOfKeyword */) && ts.isBinaryExpression(parent) && parent.operatorToken === node) { + return ts.skipOuterExpressions(parent.right); + } + // left /**/as [|name|] + if (node.kind === 123 /* AsKeyword */ && ts.isAsExpression(parent) && ts.isTypeReferenceNode(parent.type)) { + return parent.type.typeName; + } + // for (... /**/in [|name|]) + // for (... /**/of [|name|]) + if (node.kind === 97 /* InKeyword */ && ts.isForInStatement(parent) || + node.kind === 152 /* OfKeyword */ && ts.isForOfStatement(parent)) { + return ts.skipOuterExpressions(parent.expression); + } + } + return node; + } + /** + * Adjusts the location used for "find references" and "go to definition" when the cursor was not + * on a property name. + */ + function getAdjustedReferenceLocation(node) { + return getAdjustedLocation(node, /*forRename*/ false); + } + ts.getAdjustedReferenceLocation = getAdjustedReferenceLocation; + /** + * Adjusts the location used for "rename" when the cursor was not on a property name. + */ + function getAdjustedRenameLocation(node) { + return getAdjustedLocation(node, /*forRename*/ true); + } + ts.getAdjustedRenameLocation = getAdjustedRenameLocation; /** * Gets the token whose text has range [start, end) and * position >= start and (position < end or (position === end && token is literal or keyword or identifier)) @@ -106116,6 +107779,8 @@ var ts; result.push("export" /* exportedModifier */); if (node.flags & 8388608 /* Ambient */) result.push("declare" /* ambientModifier */); + if (node.kind === 259 /* ExportAssignment */) + result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } ts.getNodeModifiers = getNodeModifiers; @@ -106232,6 +107897,7 @@ var ts; ts.createTextChange = createTextChange; ts.typeKeywords = [ 125 /* AnyKeyword */, + 124 /* AssertsKeyword */, 151 /* BigIntKeyword */, 128 /* BooleanKeyword */, 91 /* FalseKeyword */, @@ -106253,6 +107919,10 @@ var ts; return ts.contains(ts.typeKeywords, kind); } ts.isTypeKeyword = isTypeKeyword; + function isTypeKeywordToken(node) { + return node.kind === 145 /* TypeKeyword */; + } + ts.isTypeKeywordToken = isTypeKeywordToken; /** True if the symbol is for an external module, as opposed to a namespace. */ function isExternalModuleSymbol(moduleSymbol) { return !!(moduleSymbol.flags & 1536 /* Module */) && moduleSymbol.name.charCodeAt(0) === 34 /* doubleQuote */; @@ -106425,16 +108095,21 @@ var ts; return node.modifiers && ts.find(node.modifiers, function (m) { return m.kind === kind; }); } ts.findModifier = findModifier; - function insertImport(changes, sourceFile, importDecl) { + function insertImport(changes, sourceFile, importDecl, blankLineBetween) { var lastImportDeclaration = ts.findLast(sourceFile.statements, ts.isAnyImportSyntax); if (lastImportDeclaration) { changes.insertNodeAfter(sourceFile, lastImportDeclaration, importDecl); } else { - changes.insertNodeAtTopOfFile(sourceFile, importDecl, /*blankLineBetween*/ true); + changes.insertNodeAtTopOfFile(sourceFile, importDecl, blankLineBetween); } } ts.insertImport = insertImport; + function getTypeKeywordOfTypeOnlyImport(importClause, sourceFile) { + ts.Debug.assert(importClause.isTypeOnly); + return ts.cast(importClause.getChildAt(0, sourceFile), isTypeKeywordToken); + } + ts.getTypeKeywordOfTypeOnlyImport = getTypeKeywordOfTypeOnlyImport; function textSpansEqual(a, b) { return !!a && !!b && a.start === b.start && a.length === b.length; } @@ -106946,9 +108621,6 @@ var ts; } ts.getContextualTypeFromParent = getContextualTypeFromParent; function quote(text, preferences) { - if (/^\d+$/.test(text)) { - return text; - } // Editors can pass in undefined or empty string - we want to infer the preference in those cases. var quotePreference = preferences.quotePreference || "auto"; var quoted = JSON.stringify(text); @@ -107335,6 +109007,15 @@ var ts; return ts.isArray(valueOrArray) ? ts.first(valueOrArray) : valueOrArray; } ts.firstOrOnly = firstOrOnly; + function getNameForExportedSymbol(symbol, scriptTarget) { + if (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */) { + // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. + return ts.firstDefined(symbol.declarations, function (d) { return ts.isExportAssignment(d) && ts.isIdentifier(d.expression) ? d.expression.text : undefined; }) + || ts.codefix.moduleSymbolToValidIdentifier(ts.Debug.checkDefined(symbol.parent), scriptTarget); + } + return symbol.name; + } + ts.getNameForExportedSymbol = getNameForExportedSymbol; // #endregion })(ts || (ts = {})); var ts; @@ -107465,7 +109146,7 @@ var ts; if (templateStack.length > 0) { var lastTemplateStackToken = ts.lastOrUndefined(templateStack); if (lastTemplateStackToken === 15 /* TemplateHead */) { - token = scanner.reScanTemplateToken(); + token = scanner.reScanTemplateToken(/* isTaggedTemplate */ false); // Only pop on a TemplateTail; a TemplateMiddle indicates there is more for us. if (token === 17 /* TemplateTail */) { templateStack.pop(); @@ -107996,18 +109677,18 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); // e.g. "param" pos = tag.tagName.end; switch (tag.kind) { - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: processJSDocParameterTag(tag); break; - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; break; - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; break; - case 317 /* JSDocReturnTag */: + case 318 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; break; @@ -108308,9 +109989,10 @@ var ts; return entries && convertPathCompletions(entries); } if (ts.isInString(sourceFile, position, contextToken)) { - return !contextToken || !ts.isStringLiteralLike(contextToken) - ? undefined - : convertStringLiteralCompletions(getStringLiteralCompletionEntries(sourceFile, contextToken, position, checker, options, host), sourceFile, checker, log, preferences); + if (!contextToken || !ts.isStringLiteralLike(contextToken)) + return undefined; + var entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, checker, options, host); + return convertStringLiteralCompletions(entries, sourceFile, checker, log, preferences); } } StringCompletions.getStringLiteralCompletions = getStringLiteralCompletions; @@ -108492,7 +110174,11 @@ var ts; return { kind: 2 /* Types */, types: types, isNewIdentifier: isNewIdentifier }; } function stringLiteralCompletionsFromProperties(type) { - return type && { kind: 1 /* Properties */, symbols: type.getApparentProperties(), hasIndexSignature: ts.hasIndexSignature(type) }; + return type && { + kind: 1 /* Properties */, + symbols: type.getApparentProperties().filter(function (prop) { return !ts.isPrivateIdentifierPropertyDeclaration(prop.valueDeclaration); }), + hasIndexSignature: ts.hasIndexSignature(type) + }; } function getStringLiteralTypes(type, uniques) { if (uniques === void 0) { uniques = ts.createMap(); } @@ -108939,7 +110625,7 @@ var ts; return !!(origin.kind & 2 /* SymbolMember */); } function originIsExport(origin) { - return !!(origin.kind & 4 /* Export */); + return !!(origin && origin.kind & 4 /* Export */); } function originIsPromise(origin) { return !!(origin.kind & 8 /* Promise */); @@ -109089,7 +110775,7 @@ var ts; } for (var _b = 0, literals_1 = literals; _b < literals_1.length; _b++) { var literal = literals_1[_b]; - entries.push(createCompletionEntryForLiteral(literal)); + entries.push(createCompletionEntryForLiteral(literal, preferences)); } return { isGlobalCompletion: isInSnippetScope, isMemberCompletion: isMemberCompletionKind(completionKind), isNewIdentifierLocation: isNewIdentifierLocation, entries: entries }; } @@ -109118,16 +110804,18 @@ var ts; name: realName, kind: "warning" /* warning */, kindModifiers: "", - sortText: SortText.JavascriptIdentifiers + sortText: SortText.JavascriptIdentifiers, + isFromUncheckedFile: true }); } }); } - var completionNameForLiteral = function (literal) { - return typeof literal === "object" ? ts.pseudoBigIntToString(literal) + "n" : JSON.stringify(literal); - }; - function createCompletionEntryForLiteral(literal) { - return { name: completionNameForLiteral(literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; + function completionNameForLiteral(literal, preferences) { + return typeof literal === "object" ? ts.pseudoBigIntToString(literal) + "n" : + ts.isString(literal) ? ts.quote(literal, preferences) : JSON.stringify(literal); + } + function createCompletionEntryForLiteral(literal, preferences) { + return { name: completionNameForLiteral(literal, preferences), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; } function createCompletionEntry(symbol, sortText, location, sourceFile, typeChecker, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, preferences) { var insertText; @@ -109136,13 +110824,13 @@ var ts; var useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess; if (origin && originIsThisType(origin)) { insertText = needsConvertPropertyAccess - ? "this" + (insertQuestionDot ? "?." : "") + "[" + ts.quote(name, preferences) + "]" + ? "this" + (insertQuestionDot ? "?." : "") + "[" + quotePropertyName(name, preferences) + "]" : "this" + (insertQuestionDot ? "?." : ".") + name; } // We should only have needsConvertPropertyAccess if there's a property access to convert. But see #21790. // Somehow there was a global with a non-identifier name. Hopefully someone will complain about getting a "foo bar" global completion and provide a repro. else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) { - insertText = useBraces ? needsConvertPropertyAccess ? "[" + ts.quote(name, preferences) + "]" : "[" + name + "]" : name; + insertText = useBraces ? needsConvertPropertyAccess ? "[" + quotePropertyName(name, preferences) + "]" : "[" + name + "]" : name; if (insertQuestionDot || propertyAccessToConvert.questionDotToken) { insertText = "?." + insertText; } @@ -109191,19 +110879,22 @@ var ts; kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol), sortText: sortText, source: getSourceFromOrigin(origin), - hasAction: trueOrUndefined(!!origin && originIsExport(origin)), - isRecommended: trueOrUndefined(isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker)), + hasAction: origin && originIsExport(origin) || undefined, + isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || undefined, insertText: insertText, replacementSpan: replacementSpan, }; } + function quotePropertyName(name, preferences) { + if (/^\d+$/.test(name)) { + return name; + } + return ts.quote(name, preferences); + } function isRecommendedCompletionMatch(localSymbol, recommendedCompletion, checker) { return localSymbol === recommendedCompletion || !!(localSymbol.flags & 1048576 /* ExportValue */) && checker.getExportSymbolOfSymbol(localSymbol) === recommendedCompletion; } - function trueOrUndefined(b) { - return b ? true : undefined; - } function getSourceFromOrigin(origin) { return origin && originIsExport(origin) ? ts.stripQuotes(origin.moduleSymbol.name) : undefined; } @@ -109269,7 +110960,7 @@ var ts; } return entries; } - function getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host) { + function getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences) { var compilerOptions = program.getCompilerOptions(); var completionData = getCompletionData(program, log, sourceFile, isUncheckedFile(sourceFile, compilerOptions), position, { includeCompletionsForModuleExports: true, includeCompletionsWithInsertText: true }, entryId, host); if (!completionData) { @@ -109278,8 +110969,8 @@ var ts; if (completionData.kind !== 0 /* Data */) { return { type: "request", request: completionData }; } - var symbols = completionData.symbols, literals = completionData.literals, location = completionData.location, completionKind = completionData.completionKind, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, previousToken = completionData.previousToken, isJsxInitializer = completionData.isJsxInitializer; - var literal = ts.find(literals, function (l) { return completionNameForLiteral(l) === entryId.name; }); + var symbols = completionData.symbols, literals = completionData.literals, location = completionData.location, completionKind = completionData.completionKind, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, previousToken = completionData.previousToken, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation; + var literal = ts.find(literals, function (l) { return completionNameForLiteral(l, preferences) === entryId.name; }); if (literal !== undefined) return { type: "literal", literal: literal }; // Find the symbol with the matching entry name. @@ -109290,18 +110981,10 @@ var ts; var origin = symbolToOriginInfoMap[ts.getSymbolId(symbol)]; var info = getCompletionEntryDisplayNameForSymbol(symbol, compilerOptions.target, origin, completionKind); return info && info.name === entryId.name && getSourceFromOrigin(origin) === entryId.source - ? { type: "symbol", symbol: symbol, location: location, symbolToOriginInfoMap: symbolToOriginInfoMap, previousToken: previousToken, isJsxInitializer: isJsxInitializer } + ? { type: "symbol", symbol: symbol, location: location, symbolToOriginInfoMap: symbolToOriginInfoMap, previousToken: previousToken, isJsxInitializer: isJsxInitializer, isTypeOnlyLocation: isTypeOnlyLocation } : undefined; }) || { type: "none" }; } - function getSymbolName(symbol, origin, target) { - return origin && originIsExport(origin) && ((origin.isDefaultExport && symbol.escapedName === "default" /* Default */) || - (symbol.escapedName === "export=" /* ExportEquals */)) - // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. - ? ts.firstDefined(symbol.declarations, function (d) { return ts.isExportAssignment(d) && ts.isIdentifier(d.expression) ? d.expression.text : undefined; }) - || ts.codefix.moduleSymbolToValidIdentifier(origin.moduleSymbol, target) - : symbol.name; - } function getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) { var typeChecker = program.getTypeChecker(); var compilerOptions = program.getCompilerOptions(); @@ -109311,7 +110994,7 @@ var ts; return Completions.StringCompletions.getStringLiteralCompletionDetails(name, sourceFile, position, contextToken, typeChecker, compilerOptions, host, cancellationToken); } // Compute all the completion symbols again. - var symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host); + var symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); switch (symbolCompletion.type) { case "request": { var request = symbolCompletion.request; @@ -109333,7 +111016,7 @@ var ts; } case "literal": { var literal = symbolCompletion.literal; - return createSimpleDetails(completionNameForLiteral(literal), "string" /* string */, typeof literal === "string" ? ts.SymbolDisplayPartKind.stringLiteral : ts.SymbolDisplayPartKind.numericLiteral); + return createSimpleDetails(completionNameForLiteral(literal, preferences), "string" /* string */, typeof literal === "string" ? ts.SymbolDisplayPartKind.stringLiteral : ts.SymbolDisplayPartKind.numericLiteral); } case "none": // Didn't find a symbol with this name. See if we can find a keyword instead. @@ -109364,11 +111047,11 @@ var ts; } var moduleSymbol = symbolOriginInfo.moduleSymbol; var exportedSymbol = checker.getMergedSymbol(ts.skipAlias(symbol.exportSymbol || symbol, checker)); - var _a = ts.codefix.getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, getSymbolName(symbol, symbolOriginInfo, compilerOptions.target), host, program, formatContext, previousToken && ts.isIdentifier(previousToken) ? previousToken.getStart(sourceFile) : position, preferences), moduleSpecifier = _a.moduleSpecifier, codeAction = _a.codeAction; + var _a = ts.codefix.getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, ts.getNameForExportedSymbol(symbol, compilerOptions.target), host, program, formatContext, previousToken && ts.isIdentifier(previousToken) ? previousToken.getStart(sourceFile) : position, preferences), moduleSpecifier = _a.moduleSpecifier, codeAction = _a.codeAction; return { sourceDisplay: [ts.textPart(moduleSpecifier)], codeActions: [codeAction] }; } - function getCompletionEntrySymbol(program, log, sourceFile, position, entryId, host) { - var completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host); + function getCompletionEntrySymbol(program, log, sourceFile, position, entryId, host, preferences) { + var completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); return completion.type === "symbol" ? completion.symbol : undefined; } Completions.getCompletionEntrySymbol = getCompletionEntrySymbol; @@ -109493,7 +111176,7 @@ var ts; currentToken = ts.getTokenAtPosition(sourceFile, position); if (!currentToken || (!ts.isDeclarationName(currentToken) && - (currentToken.parent.kind !== 322 /* JSDocPropertyTag */ || + (currentToken.parent.kind !== 323 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken))) { // Use as type location if inside tag's type expression insideJsDocTagTypeExpression = isCurrentlyEditingNode(tag.typeExpression); @@ -109643,11 +111326,13 @@ var ts; var symbolToOriginInfoMap = []; var symbolToSortTextMap = []; var importSuggestionsCache = host.getImportSuggestionsCache && host.getImportSuggestionsCache(); + var isTypeOnly = isTypeOnlyCompletion(); if (isRightOfDot || isRightOfQuestionDot) { getTypeScriptMemberSymbols(); } else if (isRightOfOpenTag) { - var tagSymbols = ts.Debug.assertEachDefined(typeChecker.getJsxIntrinsicTagNamesAt(location), "getJsxIntrinsicTagNames() should all be defined"); + var tagSymbols = typeChecker.getJsxIntrinsicTagNamesAt(location); + ts.Debug.assertEachIsDefined(tagSymbols, "getJsxIntrinsicTagNames() should all be defined"); tryGetGlobalSymbols(); symbols = tagSymbols.concat(symbols); completionKind = 3 /* MemberLike */; @@ -109689,15 +111374,16 @@ var ts; previousToken: previousToken, isJsxInitializer: isJsxInitializer, insideJsDocTagTypeExpression: insideJsDocTagTypeExpression, - symbolToSortTextMap: symbolToSortTextMap + symbolToSortTextMap: symbolToSortTextMap, + isTypeOnlyLocation: isTypeOnly }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 321 /* JSDocTypedefTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 322 /* JSDocTypedefTag */: return true; default: return false; @@ -109722,7 +111408,8 @@ var ts; symbol = ts.skipAlias(symbol, typeChecker); if (symbol.flags & (1536 /* Module */ | 384 /* Enum */)) { // Extract module or enum members - var exportedSymbols = ts.Debug.assertEachDefined(typeChecker.getExportsOfModule(symbol), "getExportsOfModule() should all be defined"); + var exportedSymbols = typeChecker.getExportsOfModule(symbol); + ts.Debug.assertEachIsDefined(exportedSymbols, "getExportsOfModule() should all be defined"); var isValidValueAccess_1 = function (symbol) { return typeChecker.isValidPropertyAccess(isImportType ? node : (node.parent), symbol.name); }; var isValidTypeAccess_1 = function (symbol) { return symbolCanBeReferencedAtTypeLocation(symbol); }; var isValidAccess = isNamespaceName @@ -109888,8 +111575,8 @@ var ts; var attrsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes); if (!attrsType) return 0 /* Continue */; - var baseType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* BaseConstraint */); - symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, baseType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties); + var completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* Completions */); + symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties); setSortTextToOptionalMember(); completionKind = 3 /* MemberLike */; isNewIdentifierLocation = false; @@ -109933,9 +111620,9 @@ var ts; position; var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; isInSnippetScope = isSnippetScope(scopeNode); - var isTypeOnly = isTypeOnlyCompletion(); var symbolMeanings = (isTypeOnly ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */; - symbols = ts.Debug.assertEachDefined(typeChecker.getSymbolsInScope(scopeNode, symbolMeanings), "getSymbolsInScope() should all be defined"); + symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings); + ts.Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined"); for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) { var symbol = symbols_2[_i]; if (!typeChecker.isArgumentsSymbol(symbol) && @@ -110216,7 +111903,7 @@ var ts; var origin = { kind: 4 /* Export */, moduleSymbol: moduleSymbol, isDefaultExport: isDefaultExport }; results.push({ symbol: symbol, - symbolName: getSymbolName(symbol, origin, target), + symbolName: ts.getNameForExportedSymbol(symbol, target), origin: origin, skipFilter: skipFilter, }); @@ -110359,11 +112046,11 @@ var ts; var existingMembers; if (objectLikeContainer.kind === 193 /* ObjectLiteralExpression */) { var instantiatedType = typeChecker.getContextualType(objectLikeContainer); - var baseType = instantiatedType && typeChecker.getContextualType(objectLikeContainer, 4 /* BaseConstraint */); - if (!instantiatedType || !baseType) + var completionsType = instantiatedType && typeChecker.getContextualType(objectLikeContainer, 4 /* Completions */); + if (!instantiatedType || !completionsType) return 2 /* Fail */; - isNewIdentifierLocation = ts.hasIndexSignature(instantiatedType || baseType); - typeMembers = getPropertiesForObjectExpression(instantiatedType, baseType, objectLikeContainer, typeChecker); + isNewIdentifierLocation = ts.hasIndexSignature(instantiatedType || completionsType); + typeMembers = getPropertiesForObjectExpression(instantiatedType, completionsType, objectLikeContainer, typeChecker); existingMembers = objectLikeContainer.properties; } else { @@ -110405,7 +112092,7 @@ var ts; } if (typeMembers && typeMembers.length > 0) { // Add filtered items to the completion list - symbols = filterObjectMembersList(typeMembers, ts.Debug.assertDefined(existingMembers)); + symbols = filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers)); } setSortTextToOptionalMember(); return 1 /* Success */; @@ -110886,7 +112573,7 @@ var ts; } } function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind) { - var name = getSymbolName(symbol, origin, target); + var name = originIsExport(origin) ? ts.getNameForExportedSymbol(symbol, target) : symbol.name; if (name === undefined // If the symbol is external module, don't show it in the completion list // (i.e declare module "http" { const x; } | // <= request completion here, "http" should not be there) @@ -110950,6 +112637,7 @@ var ts; || kind === 135 /* ModuleKeyword */ || kind === 145 /* TypeKeyword */ || kind === 136 /* NamespaceKeyword */ + || kind === 123 /* AsKeyword */ || ts.isTypeKeyword(kind) && kind !== 146 /* UndefinedKeyword */; case 5 /* FunctionLikeBodyKeywords */: return isFunctionLikeBodyKeyword(kind); @@ -111011,6 +112699,7 @@ var ts; case 131 /* GetKeyword */: case 142 /* SetKeyword */: case 126 /* AsyncKeyword */: + case 130 /* DeclareKeyword */: return true; default: return ts.isClassMemberModifier(kind); @@ -111029,10 +112718,10 @@ var ts; var jsdoc = ts.findAncestor(node, ts.isJSDoc); return jsdoc && jsdoc.tags && (ts.rangeContainsPosition(jsdoc, position) ? ts.findLast(jsdoc.tags, function (tag) { return tag.pos < position; }) : undefined); } - function getPropertiesForObjectExpression(contextualType, baseConstrainedType, obj, checker) { - var hasBaseType = baseConstrainedType && baseConstrainedType !== contextualType; - var type = hasBaseType && !(baseConstrainedType.flags & 3 /* AnyOrUnknown */) - ? checker.getUnionType([contextualType, baseConstrainedType]) + function getPropertiesForObjectExpression(contextualType, completionsType, obj, checker) { + var hasCompletionsType = completionsType && completionsType !== contextualType; + var type = hasCompletionsType && !(completionsType.flags & 3 /* AnyOrUnknown */) + ? checker.getUnionType([contextualType, completionsType]) : contextualType; var properties = type.isUnion() ? checker.getAllPossiblePropertiesOfTypes(type.types.filter(function (memberType) { @@ -111043,7 +112732,7 @@ var ts; checker.isTypeInvalidDueToUnionDiscriminant(memberType, obj)); })) : type.getApparentProperties(); - return hasBaseType ? properties.filter(hasDeclarationOtherThanSelf) : properties; + return hasCompletionsType ? properties.filter(hasDeclarationOtherThanSelf) : properties; // Filter out members whose only declaration is the object literal itself to avoid // self-fulfilling completions like: // @@ -111059,8 +112748,8 @@ var ts; */ function getPropertiesForCompletion(type, checker) { return type.isUnion() - ? ts.Debug.assertEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") - : ts.Debug.assertEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); + ? ts.Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") + : ts.Debug.checkEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); } /** * Returns the immediate owning class declaration of a context token, @@ -111069,7 +112758,7 @@ var ts; function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { // class c { method() { } | method2() { } } switch (location.kind) { - case 323 /* SyntaxList */: + case 324 /* SyntaxList */: return ts.tryCast(location.parent, ts.isObjectTypeDeclaration); case 1 /* EndOfFileToken */: var cls = ts.tryCast(ts.lastOrUndefined(ts.cast(location.parent, ts.isSourceFile).statements), ts.isObjectTypeDeclaration); @@ -111123,6 +112812,8 @@ var ts; case "`": // Only automatically bring up completions if this is an opening quote. return !!contextToken && ts.isStringLiteralOrTemplate(contextToken) && position === contextToken.getStart(sourceFile) + 1; + case "#": + return !!contextToken && ts.isPrivateIdentifier(contextToken) && !!ts.getContainingClass(contextToken); case "<": // Opening JSX tag return !!contextToken && contextToken.kind === 29 /* LessThanToken */ && (!ts.isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent)); @@ -111686,7 +113377,7 @@ var ts; return releaseDocumentWithKey(path, key); } function releaseDocumentWithKey(path, key) { - var bucket = ts.Debug.assertDefined(buckets.get(key)); + var bucket = ts.Debug.checkDefined(buckets.get(key)); var entry = bucket.get(path); entry.languageServiceRefCount--; ts.Debug.assert(entry.languageServiceRefCount >= 0); @@ -112152,7 +113843,7 @@ var ts; } function getExportAssignmentExport(ex) { // Get the symbol for the `export =` node; its parent is the module it's the export of. - var exportingModuleSymbol = ts.Debug.assertDefined(ex.symbol.parent, "Expected export symbol to have a parent"); + var exportingModuleSymbol = ts.Debug.checkDefined(ex.symbol.parent, "Expected export symbol to have a parent"); var exportKind = ex.isExportEquals ? 2 /* ExportEquals */ : 1 /* Default */; return { kind: 1 /* Export */, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: exportKind } }; } @@ -112168,11 +113859,7 @@ var ts; default: return undefined; } - var sym = useLhsSymbol ? checker.getSymbolAtLocation(ts.cast(node.left, ts.isPropertyAccessExpression).name) : symbol; - // Better detection for GH#20803 - if (sym && !(checker.getMergedSymbol(sym.parent).flags & 1536 /* Module */)) { - ts.Debug.fail("Special property assignment kind does not have a module as its parent. Assignment is " + ts.Debug.formatSymbol(sym) + ", parent is " + ts.Debug.formatSymbol(sym.parent)); - } + var sym = useLhsSymbol ? checker.getSymbolAtLocation(ts.getNameOfAccessExpression(ts.cast(node.left, ts.isAccessExpression))) : symbol; return sym && exportInfo(sym, kind); } } @@ -112210,17 +113897,17 @@ var ts; FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol; function getExportEqualsLocalSymbol(importedSymbol, checker) { if (importedSymbol.flags & 2097152 /* Alias */) { - return ts.Debug.assertDefined(checker.getImmediateAliasedSymbol(importedSymbol)); + return ts.Debug.checkDefined(checker.getImmediateAliasedSymbol(importedSymbol)); } var decl = importedSymbol.valueDeclaration; if (ts.isExportAssignment(decl)) { // `export = class {}` - return ts.Debug.assertDefined(decl.expression.symbol); + return ts.Debug.checkDefined(decl.expression.symbol); } else if (ts.isBinaryExpression(decl)) { // `module.exports = class {}` - return ts.Debug.assertDefined(decl.right.symbol); + return ts.Debug.checkDefined(decl.right.symbol); } else if (ts.isSourceFile(decl)) { // json module - return ts.Debug.assertDefined(decl.symbol); + return ts.Debug.checkDefined(decl.symbol); } return ts.Debug.fail(); } @@ -112444,9 +114131,26 @@ var ts; undefined; } FindAllReferences.toContextSpan = toContextSpan; + var FindReferencesUse; + (function (FindReferencesUse) { + /** + * When searching for references to a symbol, the location will not be adjusted (this is the default behavior when not specified). + */ + FindReferencesUse[FindReferencesUse["Other"] = 0] = "Other"; + /** + * When searching for references to a symbol, the location will be adjusted if the cursor was on a keyword. + */ + FindReferencesUse[FindReferencesUse["References"] = 1] = "References"; + /** + * When searching for references to a symbol, the location will be adjusted if the cursor was on a keyword. + * Unlike `References`, the location will only be adjusted keyword belonged to a declaration with a valid name. + * If set, we will find fewer references -- if it is referenced by several different names, we still only find references for the original name. + */ + FindReferencesUse[FindReferencesUse["Rename"] = 2] = "Rename"; + })(FindReferencesUse = FindAllReferences.FindReferencesUse || (FindAllReferences.FindReferencesUse = {})); function findReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position) { var node = ts.getTouchingPropertyName(sourceFile, position); - var referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken); + var referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, { use: 1 /* References */ }); var checker = program.getTypeChecker(); return !referencedSymbols || !referencedSymbols.length ? undefined : ts.mapDefined(referencedSymbols, function (_a) { var definition = _a.definition, references = _a.references; @@ -112485,7 +114189,7 @@ var ts; } else { // Perform "Find all References" and retrieve only those that are implementations - return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true }); + return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true, use: 1 /* References */ }); } } function findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, convertEntry) { @@ -112584,7 +114288,7 @@ var ts; var node = entry.node, kind = entry.kind; var name = originalNode.text; var isShorthandAssignment = ts.isShorthandPropertyAssignment(node.parent); - if (isShorthandAssignment || ts.isObjectBindingElementWithoutPropertyName(node.parent)) { + if (isShorthandAssignment || ts.isObjectBindingElementWithoutPropertyName(node.parent) && node.parent.name === node) { var prefixColon = { prefixText: name + ": " }; var suffixColon = { suffixText: ": " + name }; return kind === 3 /* SearchedLocalFoundProperty */ ? prefixColon @@ -112701,12 +114405,13 @@ var ts; case 253 /* ImportEqualsDeclaration */: case 258 /* ImportSpecifier */: case 246 /* InterfaceDeclaration */: - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: case 273 /* JsxAttribute */: case 249 /* ModuleDeclaration */: case 252 /* NamespaceExportDeclaration */: case 256 /* NamespaceImport */: + case 262 /* NamespaceExport */: case 156 /* Parameter */: case 282 /* ShorthandPropertyAssignment */: case 247 /* TypeAliasDeclaration */: @@ -112727,8 +114432,8 @@ var ts; return !!decl.initializer || ts.isCatchClause(decl.parent); case 160 /* MethodSignature */: case 158 /* PropertySignature */: - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: return false; default: return ts.Debug.failBadSyntaxKind(decl); @@ -112741,6 +114446,12 @@ var ts; function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options, sourceFilesSet) { if (options === void 0) { options = {}; } if (sourceFilesSet === void 0) { sourceFilesSet = ts.arrayToSet(sourceFiles, function (f) { return f.fileName; }); } + if (options.use === 1 /* References */) { + node = ts.getAdjustedReferenceLocation(node); + } + else if (options.use === 2 /* Rename */) { + node = ts.getAdjustedRenameLocation(node); + } if (ts.isSourceFile(node)) { var reference = ts.GoToDefinition.getReferenceAtPosition(node, position, program); var moduleSymbol = reference && program.getTypeChecker().getMergedSymbol(reference.file.symbol); @@ -112903,7 +114614,7 @@ var ts; if (sourceFilesSet.has(sourceFile.fileName)) { // At `module.exports = ...`, reference node is `module` var node = ts.isBinaryExpression(decl) && ts.isPropertyAccessExpression(decl.left) ? decl.left.expression : - ts.isExportAssignment(decl) ? ts.Debug.assertDefined(ts.findChildOfKind(decl, 89 /* ExportKeyword */, sourceFile)) : + ts.isExportAssignment(decl) ? ts.Debug.checkDefined(ts.findChildOfKind(decl, 89 /* ExportKeyword */, sourceFile)) : ts.getNameOfDeclaration(decl) || decl; references.push(nodeEntry(node)); } @@ -112920,6 +114631,10 @@ var ts; /** getReferencedSymbols for special node kinds. */ function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) { if (ts.isTypeKeyword(node.kind)) { + // A void expression (i.e., `void foo()`) is not special, but the `void` type is. + if (node.kind === 110 /* VoidKeyword */ && ts.isVoidExpression(node.parent)) { + return undefined; + } // A modifier readonly (like on a property declaration) is not special; // a readonly type keyword (like `readonly string[]`) is. if (node.kind === 138 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { @@ -112962,10 +114677,10 @@ var ts; } else if (node && node.kind === 84 /* DefaultKeyword */) { addReference(node, symbol, state); - searchForImportsOfExport(node, symbol, { exportingModuleSymbol: ts.Debug.assertDefined(symbol.parent, "Expected export symbol to have a parent"), exportKind: 1 /* Default */ }, state); + searchForImportsOfExport(node, symbol, { exportingModuleSymbol: ts.Debug.checkDefined(symbol.parent, "Expected export symbol to have a parent"), exportKind: 1 /* Default */ }, state); } else { - var search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, !!options.isForRename, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] }); + var search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, options.use === 2 /* Rename */, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] }); getReferencesInContainerOrFiles(symbol, state, search); } return result; @@ -113079,7 +114794,7 @@ var ts; State.prototype.getImportSearches = function (exportSymbol, exportInfo) { if (!this.importTracker) this.importTracker = FindAllReferences.createImportTracker(this.sourceFiles, this.sourceFilesSet, this.checker, this.cancellationToken); - return this.importTracker(exportSymbol, exportInfo, !!this.options.isForRename); + return this.importTracker(exportSymbol, exportInfo, this.options.use === 2 /* Rename */); }; /** @param allSearchSymbols set of additional symbols for use by `includes`. */ State.prototype.createSearch = function (location, symbol, comingFrom, searchOptions) { @@ -113151,7 +114866,7 @@ var ts; break; case 1 /* Default */: // Search for a property access to '.default'. This can't be renamed. - indirectSearch = state.options.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" }); + indirectSearch = state.options.use === 2 /* Rename */ ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" }); break; case 2 /* ExportEquals */: break; @@ -113186,7 +114901,7 @@ var ts; function shouldAddSingleReference(singleRef, state) { if (!hasMatchingMeaning(singleRef, state)) return false; - if (!state.options.isForRename) + if (state.options.use !== 2 /* Rename */) return true; // Don't rename an import type `import("./module-name")` when renaming `name` in `export = name;` if (!ts.isIdentifier(singleRef)) @@ -113309,7 +115024,7 @@ var ts; function eachSignatureCall(signature, sourceFiles, checker, cb) { if (!signature.name || !ts.isIdentifier(signature.name)) return; - var symbol = ts.Debug.assertDefined(checker.getSymbolAtLocation(signature.name)); + var symbol = ts.Debug.checkDefined(checker.getSymbolAtLocation(signature.name)); for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) { var sourceFile = sourceFiles_3[_i]; for (var _a = 0, _b = getPossibleSymbolReferenceNodes(sourceFile, symbol.name); _a < _b.length; _a++) { @@ -113485,7 +115200,7 @@ var ts; } if (!propertyName) { // Don't rename at `export { default } from "m";`. (but do continue to search for imports of the re-export) - if (!(state.options.isForRename && (name.escapedText === "default" /* Default */))) { + if (!(state.options.use === 2 /* Rename */ && (name.escapedText === "default" /* Default */))) { addRef(); } } @@ -113495,8 +115210,8 @@ var ts; if (!exportDeclaration.moduleSpecifier) { addRef(); } - if (addReferencesHere && !state.options.isForRename && state.markSeenReExportRHS(name)) { - addReference(name, ts.Debug.assertDefined(exportSpecifier.symbol), state); + if (addReferencesHere && state.options.use !== 2 /* Rename */ && state.markSeenReExportRHS(name)) { + addReference(name, ts.Debug.checkDefined(exportSpecifier.symbol), state); } } else { @@ -113509,7 +115224,7 @@ var ts; var isDefaultExport = referenceLocation.originalKeywordKind === 84 /* DefaultKeyword */ || exportSpecifier.name.originalKeywordKind === 84 /* DefaultKeyword */; var exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */; - var exportSymbol = ts.Debug.assertDefined(exportSpecifier.symbol); + var exportSymbol = ts.Debug.checkDefined(exportSpecifier.symbol); var exportInfo = FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker); if (exportInfo) { searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); @@ -113604,7 +115319,7 @@ var ts; function addClassStaticThisReferences(referenceLocation, search, state) { addReference(referenceLocation, search.symbol, state); var classLike = referenceLocation.parent; - if (state.options.isForRename || !ts.isClassLike(classLike)) + if (state.options.use === 2 /* Rename */ || !ts.isClassLike(classLike)) return; ts.Debug.assert(classLike.name === referenceLocation); var addRef = state.referenceAdder(search.symbol); @@ -113968,11 +115683,13 @@ var ts; return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); } var exportSpecifier = ts.getDeclarationOfKind(symbol, 263 /* ExportSpecifier */); - var localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); - if (localSymbol) { - var res_3 = cbSymbol(localSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, 1 /* Node */); - if (res_3) - return res_3; + if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { + var localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); + if (localSymbol) { + var res_3 = cbSymbol(localSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, 1 /* Node */); + if (res_3) + return res_3; + } } // symbolAtLocation for a binding element is the local symbol. See if the search symbol is the property. // Don't do this when populating search set for a rename when prefix and suffix text will be provided -- just rename the local. @@ -114019,7 +115736,7 @@ var ts; function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) { var checker = state.checker; return forEachRelatedSymbol(referenceSymbol, referenceLocation, checker, /*isForRenamePopulateSearchSymbolSet*/ false, - /*onlyIncludeBindingElementAtReferenceLocation*/ !state.options.isForRename || !!state.options.providePrefixAndSuffixTextForRename, function (sym, rootSymbol, baseSymbol, kind) { return search.includes(baseSymbol || rootSymbol || sym) + /*onlyIncludeBindingElementAtReferenceLocation*/ state.options.use !== 2 /* Rename */ || !!state.options.providePrefixAndSuffixTextForRename, function (sym, rootSymbol, baseSymbol, kind) { return search.includes(baseSymbol || rootSymbol || sym) // For a base type, use the symbol for the derived type. For a synthetic (e.g. union) property, use the union symbol. ? { symbol: rootSymbol && !(ts.getCheckFlags(sym) & 6 /* Synthetic */) ? rootSymbol : sym, kind: kind } : undefined; }, @@ -114105,7 +115822,7 @@ var ts; return res.length === 0 ? undefined : res; } function isForRenameWithPrefixAndSuffixText(options) { - return options.isForRename && options.providePrefixAndSuffixTextForRename; + return options.use === 2 /* Rename */ && options.providePrefixAndSuffixTextForRename; } })(Core = FindAllReferences.Core || (FindAllReferences.Core = {})); })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {})); @@ -114169,7 +115886,7 @@ var ts; return node.name; if (isConstNamedExpression(node)) return node.parent.name; - return ts.Debug.assertDefined(node.modifiers && ts.find(node.modifiers, isDefaultModifier)); + return ts.Debug.checkDefined(node.modifiers && ts.find(node.modifiers, isDefaultModifier)); } function isDefaultModifier(node) { return node.kind === 84 /* DefaultKeyword */; @@ -114191,7 +115908,7 @@ var ts; } } var declName = isConstNamedExpression(node) ? node.parent.name : - ts.Debug.assertDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); + ts.Debug.checkDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); var text = ts.isIdentifier(declName) ? ts.idText(declName) : ts.isStringOrNumericLiteralLike(declName) ? declName.text : ts.isComputedPropertyName(declName) ? @@ -114330,16 +116047,18 @@ var ts; function isDefined(x) { return x !== undefined; } - function convertEntryToCallSite(entry, _originalNode, typeChecker) { + function convertEntryToCallSite(entry) { if (entry.kind === 1 /* Node */) { - if (ts.isCallOrNewExpressionTarget(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isTaggedTemplateTag(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isDecoratorTarget(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isJsxOpeningLikeElementTagName(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || ts.isRightSideOfPropertyAccess(entry.node) - || ts.isArgumentExpressionOfElementAccess(entry.node)) { - var ancestor = ts.findAncestor(entry.node, isValidCallHierarchyDeclaration) || entry.node.getSourceFile(); - return { declaration: ts.firstOrOnly(findImplementationOrAllInitialDeclarations(typeChecker, ancestor)), range: ts.createTextRangeFromNode(entry.node, entry.node.getSourceFile()) }; + var node = entry.node; + if (ts.isCallOrNewExpressionTarget(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isTaggedTemplateTag(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isDecoratorTarget(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isJsxOpeningLikeElementTagName(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || ts.isRightSideOfPropertyAccess(node) + || ts.isArgumentExpressionOfElementAccess(node)) { + var sourceFile = node.getSourceFile(); + var ancestor = ts.findAncestor(node, isValidCallHierarchyDeclaration) || sourceFile; + return { declaration: ancestor, range: ts.createTextRangeFromNode(node, sourceFile) }; } } } @@ -114359,7 +116078,7 @@ var ts; return []; } var location = getCallHierarchyDeclarationReferenceNode(declaration); - var calls = ts.filter(ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, program.getSourceFiles(), location, /*position*/ 0, /*options*/ undefined, convertEntryToCallSite), isDefined); + var calls = ts.filter(ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, program.getSourceFiles(), location, /*position*/ 0, { use: 1 /* References */ }, convertEntryToCallSite), isDefined); return calls ? ts.group(calls, getCallSiteGroupKey, function (entries) { return convertCallSiteGroupToIncomingCall(program, entries); }) : []; } CallHierarchy.getIncomingCalls = getIncomingCalls; @@ -114596,8 +116315,8 @@ var ts; var includes = ts.mapDefined(property.initializer.elements, function (e) { return ts.isStringLiteral(e) ? e.text : undefined; }); var matchers = ts.getFileMatcherPatterns(configDir, /*excludes*/ [], includes, useCaseSensitiveFileNames, currentDirectory); // If there isn't some include for this, add a new one. - if (ts.getRegexFromPattern(ts.Debug.assertDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && - !ts.getRegexFromPattern(ts.Debug.assertDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { + if (ts.getRegexFromPattern(ts.Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && + !ts.getRegexFromPattern(ts.Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { changeTracker.insertNodeAfter(configFile, ts.last(property.initializer.elements), ts.createStringLiteral(relativePath(newFileOrDirPath))); } } @@ -114959,6 +116678,15 @@ var ts; return aliased; } } + if (symbol && ts.isInJSFile(node)) { + var requireCall = ts.forEach(symbol.declarations, function (d) { return ts.isVariableDeclaration(d) && !!d.initializer && ts.isRequireCall(d.initializer, /*checkArgumentIsStringLiteralLike*/ true) ? d.initializer : undefined; }); + if (requireCall) { + var moduleSymbol = checker.getSymbolAtLocation(requireCall.arguments[0]); + if (moduleSymbol) { + return checker.resolveExternalModuleSymbol(moduleSymbol); + } + } + } return symbol; } // Go to the original declaration for cases: @@ -115185,11 +116913,11 @@ var ts; JsDoc.getJsDocCommentsFromDeclarations = getJsDocCommentsFromDeclarations; function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return [declaration]; - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return ts.getJSDocCommentsAndTags(declaration); @@ -115210,16 +116938,18 @@ var ts; function getCommentText(tag) { var comment = tag.comment; switch (tag.kind) { + case 308 /* JSDocImplementsTag */: + return withNode(tag.class); case 307 /* JSDocAugmentsTag */: return withNode(tag.class); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return withList(tag.typeParameters); - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: return withNode(tag.typeExpression); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: var name = tag.name; return name ? withNode(name) : comment; default: @@ -115427,6 +117157,11 @@ var ts; var parameters_2 = ts.isFunctionLike(be.right) ? be.right.parameters : ts.emptyArray; return { commentOwner: commentOwner, parameters: parameters_2 }; } + case 159 /* PropertyDeclaration */: + var init = commentOwner.initializer; + if (init && (ts.isFunctionExpression(init) || ts.isArrowFunction(init))) { + return { commentOwner: commentOwner, parameters: init.parameters }; + } } } /** @@ -115597,7 +117332,7 @@ var ts; var whiteSpaceRegex = /\s+/g; /** * Maximum amount of characters to return - * The amount was choosen arbitrarily. + * The amount was chosen arbitrarily. */ var maxLength = 150; // Keep sourceFile handy so we don't have to search for it every time we need to call `getText`. @@ -115852,6 +117587,7 @@ var ts; case 249 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; + case 259 /* ExportAssignment */: case 263 /* ExportSpecifier */: case 253 /* ImportEqualsDeclaration */: case 167 /* IndexSignature */: @@ -116189,6 +117925,8 @@ var ts; return ts.isExternalModule(sourceFile) ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\"" : ""; + case 259 /* ExportAssignment */: + return ts.isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; case 202 /* ArrowFunction */: case 244 /* FunctionDeclaration */: case 201 /* FunctionExpression */: @@ -116247,8 +117985,8 @@ var ts; case 249 /* ModuleDeclaration */: case 290 /* SourceFile */: case 247 /* TypeAliasDeclaration */: - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: return true; case 202 /* ArrowFunction */: case 244 /* FunctionDeclaration */: @@ -116566,100 +118304,114 @@ var ts; * @param importGroup a list of ImportDeclarations, all with the same module name. */ function coalesceImports(importGroup) { + var _a; if (importGroup.length === 0) { return importGroup; } - var _a = getCategorizedImports(importGroup), importWithoutClause = _a.importWithoutClause, defaultImports = _a.defaultImports, namespaceImports = _a.namespaceImports, namedImports = _a.namedImports; + var _b = getCategorizedImports(importGroup), importWithoutClause = _b.importWithoutClause, typeOnlyImports = _b.typeOnlyImports, regularImports = _b.regularImports; var coalescedImports = []; if (importWithoutClause) { coalescedImports.push(importWithoutClause); } - // Normally, we don't combine default and namespace imports, but it would be silly to - // produce two import declarations in this special case. - if (defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) { - // Add the namespace import to the existing default ImportDeclaration. - var defaultImport = defaultImports[0]; - coalescedImports.push(updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)); // TODO: GH#18217 - return coalescedImports; - } - var sortedNamespaceImports = ts.stableSort(namespaceImports, function (i1, i2) { - return compareIdentifiers(i1.importClause.namedBindings.name, i2.importClause.namedBindings.name); - }); // TODO: GH#18217 - for (var _i = 0, sortedNamespaceImports_1 = sortedNamespaceImports; _i < sortedNamespaceImports_1.length; _i++) { - var namespaceImport = sortedNamespaceImports_1[_i]; - // Drop the name, if any - coalescedImports.push(updateImportDeclarationAndClause(namespaceImport, /*name*/ undefined, namespaceImport.importClause.namedBindings)); // TODO: GH#18217 - } - if (defaultImports.length === 0 && namedImports.length === 0) { - return coalescedImports; - } - var newDefaultImport; - var newImportSpecifiers = []; - if (defaultImports.length === 1) { - newDefaultImport = defaultImports[0].importClause.name; + for (var _i = 0, _c = [regularImports, typeOnlyImports]; _i < _c.length; _i++) { + var group_2 = _c[_i]; + var isTypeOnly = group_2 === typeOnlyImports; + var defaultImports = group_2.defaultImports, namespaceImports = group_2.namespaceImports, namedImports = group_2.namedImports; + // Normally, we don't combine default and namespace imports, but it would be silly to + // produce two import declarations in this special case. + if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) { + // Add the namespace import to the existing default ImportDeclaration. + var defaultImport = defaultImports[0]; + coalescedImports.push(updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)); // TODO: GH#18217 + continue; + } + var sortedNamespaceImports = ts.stableSort(namespaceImports, function (i1, i2) { + return compareIdentifiers(i1.importClause.namedBindings.name, i2.importClause.namedBindings.name); + }); // TODO: GH#18217 + for (var _d = 0, sortedNamespaceImports_1 = sortedNamespaceImports; _d < sortedNamespaceImports_1.length; _d++) { + var namespaceImport = sortedNamespaceImports_1[_d]; + // Drop the name, if any + coalescedImports.push(updateImportDeclarationAndClause(namespaceImport, /*name*/ undefined, namespaceImport.importClause.namedBindings)); // TODO: GH#18217 + } + if (defaultImports.length === 0 && namedImports.length === 0) { + continue; + } + var newDefaultImport = void 0; + var newImportSpecifiers = []; + if (defaultImports.length === 1) { + newDefaultImport = defaultImports[0].importClause.name; + } + else { + for (var _e = 0, defaultImports_1 = defaultImports; _e < defaultImports_1.length; _e++) { + var defaultImport = defaultImports_1[_e]; + newImportSpecifiers.push(ts.createImportSpecifier(ts.createIdentifier("default"), defaultImport.importClause.name)); // TODO: GH#18217 + } + } + newImportSpecifiers.push.apply(newImportSpecifiers, ts.flatMap(namedImports, function (i) { return i.importClause.namedBindings.elements; })); // TODO: GH#18217 + var sortedImportSpecifiers = sortSpecifiers(newImportSpecifiers); + var importDecl = defaultImports.length > 0 + ? defaultImports[0] + : namedImports[0]; + var newNamedImports = sortedImportSpecifiers.length === 0 + ? newDefaultImport + ? undefined + : ts.createNamedImports(ts.emptyArray) + : namedImports.length === 0 + ? ts.createNamedImports(sortedImportSpecifiers) + : ts.updateNamedImports(namedImports[0].importClause.namedBindings, sortedImportSpecifiers); // TODO: GH#18217 + // Type-only imports are not allowed to mix default, namespace, and named imports in any combination. + // We could rewrite a default import as a named import (`import { default as name }`), but we currently + // choose not to as a stylistic preference. + if (isTypeOnly && newDefaultImport && newNamedImports) { + coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, /*namedBindings*/ undefined)); + coalescedImports.push(updateImportDeclarationAndClause((_a = namedImports[0]) !== null && _a !== void 0 ? _a : importDecl, /*name*/ undefined, newNamedImports)); + } + else { + coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)); + } } - else { - for (var _b = 0, defaultImports_1 = defaultImports; _b < defaultImports_1.length; _b++) { - var defaultImport = defaultImports_1[_b]; - newImportSpecifiers.push(ts.createImportSpecifier(ts.createIdentifier("default"), defaultImport.importClause.name)); // TODO: GH#18217 - } - } - newImportSpecifiers.push.apply(newImportSpecifiers, ts.flatMap(namedImports, function (i) { return i.importClause.namedBindings.elements; })); // TODO: GH#18217 - var sortedImportSpecifiers = sortSpecifiers(newImportSpecifiers); - var importDecl = defaultImports.length > 0 - ? defaultImports[0] - : namedImports[0]; - var newNamedImports = sortedImportSpecifiers.length === 0 - ? newDefaultImport - ? undefined - : ts.createNamedImports(ts.emptyArray) - : namedImports.length === 0 - ? ts.createNamedImports(sortedImportSpecifiers) - : ts.updateNamedImports(namedImports[0].importClause.namedBindings, sortedImportSpecifiers); // TODO: GH#18217 - coalescedImports.push(updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)); return coalescedImports; - /* - * Returns entire import declarations because they may already have been rewritten and - * may lack parent pointers. The desired parts can easily be recovered based on the - * categorization. - * - * NB: There may be overlap between `defaultImports` and `namespaceImports`/`namedImports`. - */ - function getCategorizedImports(importGroup) { - var importWithoutClause; - var defaultImports = []; - var namespaceImports = []; - var namedImports = []; - for (var _i = 0, importGroup_1 = importGroup; _i < importGroup_1.length; _i++) { - var importDeclaration = importGroup_1[_i]; - if (importDeclaration.importClause === undefined) { - // Only the first such import is interesting - the others are redundant. - // Note: Unfortunately, we will lose trivia that was on this node. - importWithoutClause = importWithoutClause || importDeclaration; - continue; - } - var _a = importDeclaration.importClause, name = _a.name, namedBindings = _a.namedBindings; - if (name) { - defaultImports.push(importDeclaration); + } + OrganizeImports.coalesceImports = coalesceImports; + /* + * Returns entire import declarations because they may already have been rewritten and + * may lack parent pointers. The desired parts can easily be recovered based on the + * categorization. + * + * NB: There may be overlap between `defaultImports` and `namespaceImports`/`namedImports`. + */ + function getCategorizedImports(importGroup) { + var importWithoutClause; + var typeOnlyImports = { defaultImports: [], namespaceImports: [], namedImports: [] }; + var regularImports = { defaultImports: [], namespaceImports: [], namedImports: [] }; + for (var _i = 0, importGroup_1 = importGroup; _i < importGroup_1.length; _i++) { + var importDeclaration = importGroup_1[_i]; + if (importDeclaration.importClause === undefined) { + // Only the first such import is interesting - the others are redundant. + // Note: Unfortunately, we will lose trivia that was on this node. + importWithoutClause = importWithoutClause || importDeclaration; + continue; + } + var group_3 = importDeclaration.importClause.isTypeOnly ? typeOnlyImports : regularImports; + var _a = importDeclaration.importClause, name = _a.name, namedBindings = _a.namedBindings; + if (name) { + group_3.defaultImports.push(importDeclaration); + } + if (namedBindings) { + if (ts.isNamespaceImport(namedBindings)) { + group_3.namespaceImports.push(importDeclaration); } - if (namedBindings) { - if (ts.isNamespaceImport(namedBindings)) { - namespaceImports.push(importDeclaration); - } - else { - namedImports.push(importDeclaration); - } + else { + group_3.namedImports.push(importDeclaration); } } - return { - importWithoutClause: importWithoutClause, - defaultImports: defaultImports, - namespaceImports: namespaceImports, - namedImports: namedImports, - }; } + return { + importWithoutClause: importWithoutClause, + typeOnlyImports: typeOnlyImports, + regularImports: regularImports, + }; } - OrganizeImports.coalesceImports = coalesceImports; // Internal for testing /** * @param exportGroup a list of ExportDeclarations, all with the same module name. @@ -116668,21 +118420,24 @@ var ts; if (exportGroup.length === 0) { return exportGroup; } - var _a = getCategorizedExports(exportGroup), exportWithoutClause = _a.exportWithoutClause, namedExports = _a.namedExports; + var _a = getCategorizedExports(exportGroup), exportWithoutClause = _a.exportWithoutClause, namedExports = _a.namedExports, typeOnlyExports = _a.typeOnlyExports; var coalescedExports = []; if (exportWithoutClause) { coalescedExports.push(exportWithoutClause); } - if (namedExports.length === 0) { - return coalescedExports; + for (var _i = 0, _b = [namedExports, typeOnlyExports]; _i < _b.length; _i++) { + var exportGroup_1 = _b[_i]; + if (exportGroup_1.length === 0) { + continue; + } + var newExportSpecifiers = []; + newExportSpecifiers.push.apply(newExportSpecifiers, ts.flatMap(exportGroup_1, function (i) { return i.exportClause && ts.isNamedExports(i.exportClause) ? i.exportClause.elements : ts.emptyArray; })); + var sortedExportSpecifiers = sortSpecifiers(newExportSpecifiers); + var exportDecl = exportGroup_1[0]; + coalescedExports.push(ts.updateExportDeclaration(exportDecl, exportDecl.decorators, exportDecl.modifiers, exportDecl.exportClause && (ts.isNamedExports(exportDecl.exportClause) ? + ts.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : + ts.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), exportDecl.moduleSpecifier, exportDecl.isTypeOnly)); } - var newExportSpecifiers = []; - newExportSpecifiers.push.apply(newExportSpecifiers, ts.flatMap(namedExports, function (i) { return i.exportClause && ts.isNamedExports(i.exportClause) ? i.exportClause.elements : ts.emptyArray; })); - var sortedExportSpecifiers = sortSpecifiers(newExportSpecifiers); - var exportDecl = namedExports[0]; - coalescedExports.push(ts.updateExportDeclaration(exportDecl, exportDecl.decorators, exportDecl.modifiers, exportDecl.exportClause && (ts.isNamedExports(exportDecl.exportClause) ? - ts.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : - ts.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), exportDecl.moduleSpecifier, exportDecl.isTypeOnly)); return coalescedExports; /* * Returns entire export declarations because they may already have been rewritten and @@ -116692,13 +118447,17 @@ var ts; function getCategorizedExports(exportGroup) { var exportWithoutClause; var namedExports = []; - for (var _i = 0, exportGroup_1 = exportGroup; _i < exportGroup_1.length; _i++) { - var exportDeclaration = exportGroup_1[_i]; + var typeOnlyExports = []; + for (var _i = 0, exportGroup_2 = exportGroup; _i < exportGroup_2.length; _i++) { + var exportDeclaration = exportGroup_2[_i]; if (exportDeclaration.exportClause === undefined) { // Only the first such export is interesting - the others are redundant. // Note: Unfortunately, we will lose trivia that was on this node. exportWithoutClause = exportWithoutClause || exportDeclaration; } + else if (exportDeclaration.isTypeOnly) { + typeOnlyExports.push(exportDeclaration); + } else { namedExports.push(exportDeclaration); } @@ -116706,6 +118465,7 @@ var ts; return { exportWithoutClause: exportWithoutClause, namedExports: namedExports, + typeOnlyExports: typeOnlyExports, }; } } @@ -116749,7 +118509,8 @@ var ts; function addNodeOutliningSpans(sourceFile, cancellationToken, out) { var depthRemaining = 40; var current = 0; - var statements = sourceFile.statements; + // Includes the EOF Token so that comments which aren't attached to statements are included + var statements = __spreadArrays(sourceFile.statements, [sourceFile.endOfFileToken]); var n = statements.length; while (current < n) { while (current < n && !ts.isAnyImportSyntax(statements[current])) { @@ -116773,7 +118534,7 @@ var ts; if (depthRemaining === 0) return; cancellationToken.throwIfCancellationRequested(); - if (ts.isDeclaration(n)) { + if (ts.isDeclaration(n) || n.kind === 1 /* EndOfFileToken */) { addOutliningForLeadingCommentsForNode(n, sourceFile, cancellationToken, out); } if (isFunctionExpressionAssignedToVariable(n)) { @@ -116914,7 +118675,9 @@ var ts; return spanForNode(n.parent); } else if (tryStatement.finallyBlock === n) { - return spanForNode(ts.findChildOfKind(tryStatement, 92 /* FinallyKeyword */, sourceFile)); + var node = ts.findChildOfKind(tryStatement, 92 /* FinallyKeyword */, sourceFile); + if (node) + return spanForNode(node); } // falls through default: @@ -117807,11 +119570,14 @@ var ts; var Rename; (function (Rename) { function getRenameInfo(program, sourceFile, position, options) { - var node = ts.getTouchingPropertyName(sourceFile, position); - var renameInfo = node && nodeIsEligibleForRename(node) - ? getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, function (declaration) { return program.isSourceFileDefaultLibrary(declaration.getSourceFile()); }, options) - : undefined; - return renameInfo || getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element); + var node = ts.getAdjustedRenameLocation(ts.getTouchingPropertyName(sourceFile, position)); + if (nodeIsEligibleForRename(node)) { + var renameInfo = getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, function (declaration) { return program.isSourceFileDefaultLibrary(declaration.getSourceFile()); }, options); + if (renameInfo) { + return renameInfo; + } + } + return getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element); } Rename.getRenameInfo = getRenameInfo; function getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile, options) { @@ -117891,6 +119657,7 @@ var ts; function nodeIsEligibleForRename(node) { switch (node.kind) { case 75 /* Identifier */: + case 76 /* PrivateIdentifier */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: case 104 /* ThisKeyword */: @@ -118040,7 +119807,7 @@ var ts; // few keystrokes. if (ts.isMappedTypeNode(node)) { var _a = node.getChildren(), openBraceToken = _a[0], children = _a.slice(1); - var closeBraceToken = ts.Debug.assertDefined(children.pop()); + var closeBraceToken = ts.Debug.checkDefined(children.pop()); ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */); ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */); // Group `-/+readonly` and `-/+?` @@ -118159,7 +119926,7 @@ var ts; } function createSyntaxList(children) { ts.Debug.assertGreaterThanOrEqual(children.length, 1); - var syntaxList = ts.createNode(323 /* SyntaxList */, children[0].pos, ts.last(children).end); + var syntaxList = ts.createNode(324 /* SyntaxList */, children[0].pos, ts.last(children).end); syntaxList._children = children; return syntaxList; } @@ -118852,6 +120619,9 @@ var ts; // obviously invalid map return undefined; } + // Dont support sourcemaps that contain inlined sources + if (map.sourcesContent && map.sourcesContent.some(ts.isString)) + return undefined; return ts.createDocumentPositionMapper(host, map, mapFileName); } function createSourceFileLike(text, lineMap) { @@ -118899,23 +120669,8 @@ var ts; return diags.sort(function (d1, d2) { return d1.start - d2.start; }); function check(node) { if (isJsFile) { - switch (node.kind) { - case 201 /* FunctionExpression */: - var decl = ts.getDeclarationOfExpando(node); - if (decl) { - var symbol_1 = decl.symbol; - if (symbol_1 && (symbol_1.exports && symbol_1.exports.size || symbol_1.members && symbol_1.members.size)) { - diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); - break; - } - } - // falls through if no diagnostic was created - case 244 /* FunctionDeclaration */: - var symbol = node.symbol; - if (symbol.members && (symbol.members.size > 0)) { - diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); - } - break; + if (canBeConvertedToClass(node)) { + diags.push(ts.createDiagnosticForNode(ts.isVariableDeclaration(node.parent) ? node.parent.name : node, ts.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); } } else { @@ -119042,6 +120797,21 @@ var ts; function getKeyFromNode(exp) { return exp.pos.toString() + ":" + exp.end.toString(); } + function canBeConvertedToClass(node) { + var _a, _b, _c, _d; + if (node.kind === 201 /* FunctionExpression */) { + if (ts.isVariableDeclaration(node.parent) && ((_a = node.symbol.members) === null || _a === void 0 ? void 0 : _a.size)) { + return true; + } + var decl = ts.getDeclarationOfExpando(node); + var symbol = decl === null || decl === void 0 ? void 0 : decl.symbol; + return !!(symbol && (((_b = symbol.exports) === null || _b === void 0 ? void 0 : _b.size) || ((_c = symbol.members) === null || _c === void 0 ? void 0 : _c.size))); + } + if (node.kind === 244 /* FunctionDeclaration */) { + return !!((_d = node.symbol.members) === null || _d === void 0 ? void 0 : _d.size); + } + return false; + } })(ts || (ts = {})); /* @internal */ var ts; @@ -119050,9 +120820,6 @@ var ts; (function (SymbolDisplay) { // TODO(drosen): use contextual SemanticMeaning. function getSymbolKind(typeChecker, symbol, location) { - while (ts.isTypeOnlyAlias(symbol)) { - symbol = symbol.immediateTarget; - } var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location); if (result !== "" /* unknown */) { return result; @@ -119170,9 +120937,6 @@ var ts; // TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning, alias) { if (semanticMeaning === void 0) { semanticMeaning = ts.getMeaningFromLocation(location); } - while (ts.isTypeOnlyAlias(symbol)) { - symbol = symbol.immediateTarget; - } var displayParts = []; var documentation = []; var tags = []; @@ -119814,11 +121578,11 @@ var ts; this.options = options; } FormattingContext.prototype.updateContext = function (currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) { - this.currentTokenSpan = ts.Debug.assertDefined(currentRange); - this.currentTokenParent = ts.Debug.assertDefined(currentTokenParent); - this.nextTokenSpan = ts.Debug.assertDefined(nextRange); - this.nextTokenParent = ts.Debug.assertDefined(nextTokenParent); - this.contextNode = ts.Debug.assertDefined(commonParent); + this.currentTokenSpan = ts.Debug.checkDefined(currentRange); + this.currentTokenParent = ts.Debug.checkDefined(currentTokenParent); + this.nextTokenSpan = ts.Debug.checkDefined(nextRange); + this.nextTokenParent = ts.Debug.checkDefined(nextTokenParent); + this.contextNode = ts.Debug.checkDefined(commonParent); // drop cached results this.contextNodeAllOnSameLine = undefined; this.nextNodeAllOnSameLine = undefined; @@ -119973,7 +121737,14 @@ var ts; return false; } function shouldRescanJsxText(node) { - return node.kind === 11 /* JsxText */; + var isJSXText = ts.isJsxText(node); + if (isJSXText) { + var containingElement = ts.findAncestor(node.parent, function (p) { return ts.isJsxElement(p); }); + if (!containingElement) + return false; // should never happen + return !ts.isParenthesizedExpression(containingElement.parent); + } + return false; } function shouldRescanSlashToken(container) { return container.kind === 13 /* RegularExpressionLiteral */; @@ -120062,7 +121833,7 @@ var ts; case 3 /* RescanTemplateToken */: if (token === 19 /* CloseBraceToken */) { lastScanAction = 3 /* RescanTemplateToken */; - return scanner.reScanTemplateToken(); + return scanner.reScanTemplateToken(/* isTaggedTemplate */ false); } break; case 4 /* RescanJsxIdentifier */: @@ -120337,7 +122108,7 @@ var ts; // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses rule("SpaceAfterConstructor", 129 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), rule("NoSpaceAfterConstructor", 129 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("SpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket], 4 /* InsertSpace */), + rule("SpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket, isNextTokenNotCloseParen], 4 /* InsertSpace */), rule("NoSpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext], 16 /* DeleteSpace */), // Insert space after function keyword for anonymous functions rule("SpaceAfterAnonymousFunctionKeyword", [94 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 4 /* InsertSpace */), @@ -120686,6 +122457,9 @@ var ts; function isNextTokenNotCloseBracket(context) { return context.nextTokenSpan.kind !== 23 /* CloseBracketToken */; } + function isNextTokenNotCloseParen(context) { + return context.nextTokenSpan.kind !== 21 /* CloseParenToken */; + } function isArrowFunctionContext(context) { return context.contextNode.kind === 202 /* ArrowFunction */; } @@ -121186,7 +122960,7 @@ var ts; } var error = sorted[index]; if (r.end <= error.start) { - // specified range ends before the error refered by 'index' - no error in range + // specified range ends before the error referred by 'index' - no error in range return false; } if (ts.startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { @@ -121488,6 +123262,11 @@ var ts; if (tokenInfo.token.end > node.end) { break; } + if (node.kind === 11 /* JsxText */) { + // Intentation rules for jsx text are handled by `indentMultilineCommentOrJsxText` inside `processChildNode`; just fastforward past it here + formattingScanner.advance(); + continue; + } consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node); } if (!node.parent && formattingScanner.isOnEOF()) { @@ -121546,7 +123325,19 @@ var ts; processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); if (child.kind === 11 /* JsxText */) { var range = { pos: child.getStart(), end: child.getEnd() }; - indentMultilineCommentOrJsxText(range, childIndentation.indentation, /*firstLineIsIndented*/ true, /*indentFinalLine*/ false); + if (range.pos !== range.end) { // don't indent zero-width jsx text + var siblings = parent.getChildren(sourceFile); + var currentIndex = ts.findIndex(siblings, function (arg) { return arg.pos === child.pos; }); + var previousNode = siblings[currentIndex - 1]; + if (previousNode) { + // The jsx text needs no indentation whatsoever if it ends on the same line the previous sibling ends on + if (sourceFile.getLineAndCharacterOfPosition(range.end).line !== sourceFile.getLineAndCharacterOfPosition(previousNode.end).line) { + // The first line is (already) "indented" if the text starts on the same line as the previous sibling element ends on + var firstLineIsIndented = sourceFile.getLineAndCharacterOfPosition(range.pos).line === sourceFile.getLineAndCharacterOfPosition(previousNode.end).line; + indentMultilineCommentOrJsxText(range, childIndentation.indentation, firstLineIsIndented, /*indentFinalLine*/ false, /*jsxStyle*/ true); + } + } + } } childContextNode = node; if (isFirstListItem && parent.kind === 192 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { @@ -121600,8 +123391,11 @@ var ts; if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(parent); if (tokenInfo.token.kind === 27 /* CommaToken */ && ts.isCallLikeExpression(parent)) { - formattingScanner.advance(); - tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent) : undefined; + var commaTokenLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; + if (startLine !== commaTokenLine) { + formattingScanner.advance(); + tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent) : undefined; + } } // consume the list end token only if it is still belong to the parent // there might be the case when current token matches end token but does not considered as one @@ -121787,7 +123581,7 @@ var ts; function indentationIsDifferent(indentationString, startLinePosition) { return indentationString !== sourceFile.text.substr(startLinePosition, indentationString.length); } - function indentMultilineCommentOrJsxText(commentRange, indentation, firstLineIsIndented, indentFinalLine) { + function indentMultilineCommentOrJsxText(commentRange, indentation, firstLineIsIndented, indentFinalLine, jsxTextStyleIndent) { if (indentFinalLine === void 0) { indentFinalLine = true; } // split comment in lines var startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; @@ -121813,7 +123607,7 @@ var ts; return; var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); var nonWhitespaceColumnInFirstPart = formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); - if (indentation === nonWhitespaceColumnInFirstPart.column) { + if (indentation === nonWhitespaceColumnInFirstPart.column && !jsxTextStyleIndent) { return; } var startIndex = 0; @@ -121828,6 +123622,13 @@ var ts; var nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); + if (jsxTextStyleIndent) { + // skip adding indentation to blank lines + if (ts.isLineBreak(sourceFile.text.charCodeAt(ts.getStartPositionOfLine(startLine, sourceFile)))) + continue; + // reset delta on every line + delta = indentation - nonWhitespaceCharacterAndColumn.column; + } var newIndentation = nonWhitespaceCharacterAndColumn.column + delta; if (newIndentation > 0) { var indentationString = getIndentationString(newIndentation, options); @@ -122389,7 +124190,7 @@ var ts; case 214 /* ClassExpression */: case 246 /* InterfaceDeclaration */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return getList(node.typeParameters); case 197 /* NewExpression */: case 196 /* CallExpression */: @@ -123608,25 +125409,47 @@ var ts; position = shebang.length; advancePastLineBreak(); } - // For a source file, it is possible there are detached comments we should not skip var ranges = ts.getLeadingCommentRanges(text, position); if (!ranges) return position; - // However we should still skip a pinned comment at the top - if (ranges.length && ranges[0].kind === 3 /* MultiLineCommentTrivia */ && ts.isPinnedComment(text, ranges[0].pos)) { - position = ranges[0].end; - advancePastLineBreak(); - ranges = ranges.slice(1); - } - // As well as any triple slash references + // Find the first attached comment to the first node and add before it + var lastComment; + var firstNodeLine; for (var _b = 0, ranges_1 = ranges; _b < ranges_1.length; _b++) { var range = ranges_1[_b]; - if (range.kind === 2 /* SingleLineCommentTrivia */ && ts.isRecognizedTripleSlashComment(text, range.pos, range.end)) { - position = range.end; - advancePastLineBreak(); + if (range.kind === 3 /* MultiLineCommentTrivia */) { + if (ts.isPinnedComment(text, range.pos)) { + lastComment = { range: range, pinnedOrTripleSlash: true }; + continue; + } + } + else if (ts.isRecognizedTripleSlashComment(text, range.pos, range.end)) { + lastComment = { range: range, pinnedOrTripleSlash: true }; continue; } - break; + if (lastComment) { + // Always insert after pinned or triple slash comments + if (lastComment.pinnedOrTripleSlash) + break; + // There was a blank line between the last comment and this comment. + // This comment is not part of the copyright comments + var commentLine = sourceFile.getLineAndCharacterOfPosition(range.pos).line; + var lastCommentEndLine = sourceFile.getLineAndCharacterOfPosition(lastComment.range.end).line; + if (commentLine >= lastCommentEndLine + 2) + break; + } + if (sourceFile.statements.length) { + if (firstNodeLine === undefined) + firstNodeLine = sourceFile.getLineAndCharacterOfPosition(sourceFile.statements[0].getStart()).line; + var commentEndLine = sourceFile.getLineAndCharacterOfPosition(range.end).line; + if (firstNodeLine < commentEndLine + 2) + break; + } + lastComment = { range: range, pinnedOrTripleSlash: false }; + } + if (lastComment) { + position = lastComment.range.end; + advancePastLineBreak(); } return position; function advancePastLineBreak() { @@ -123669,9 +125492,10 @@ var ts; break; } case 254 /* ImportDeclaration */: + var isFirstImport = sourceFile.imports.length && node === ts.first(sourceFile.imports).parent || node === ts.find(sourceFile.statements, ts.isImportDeclaration); deleteNode(changes, sourceFile, node, // For first import, leave header comment in place - node === sourceFile.imports[0].parent ? { leadingTriviaOption: LeadingTriviaOption.Exclude } : undefined); + isFirstImport ? { leadingTriviaOption: LeadingTriviaOption.Exclude } : undefined); break; case 191 /* BindingElement */: var pattern = node.parent; @@ -123738,7 +125562,7 @@ var ts; // Delete named imports while preserving the default import // import d|, * as ns| from './file' // import d|, { a }| from './file' - var previousToken = ts.Debug.assertDefined(ts.getTokenAtPosition(sourceFile, node.pos - 1)); + var previousToken = ts.Debug.checkDefined(ts.getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { @@ -123787,7 +125611,7 @@ var ts; } textChanges_3.deleteNode = deleteNode; function deleteNodeInList(changes, deletedNodesInLists, sourceFile, node) { - var containingList = ts.Debug.assertDefined(ts.formatting.SmartIndenter.getContainingList(node, sourceFile)); + var containingList = ts.Debug.checkDefined(ts.formatting.SmartIndenter.getContainingList(node, sourceFile)); var index = ts.indexOfNode(containingList, node); ts.Debug.assert(index !== -1); if (containingList.length === 1) { @@ -123946,7 +125770,7 @@ var ts; }); function makeChange(changeTracker, sourceFile, pos) { var token = ts.getTokenAtPosition(sourceFile, pos); - var assertion = ts.Debug.assertDefined(ts.findAncestor(token, function (n) { return ts.isAsExpression(n) || ts.isTypeAssertion(n); }), "Expected to find an assertion expression"); + var assertion = ts.Debug.checkDefined(ts.findAncestor(token, function (n) { return ts.isAsExpression(n) || ts.isTypeAssertion(n); }), "Expected to find an assertion expression"); var replacement = ts.isAsExpression(assertion) ? ts.createAsExpression(assertion.expression, ts.createKeywordTypeNode(148 /* UnknownKeyword */)) : ts.createTypeAssertion(ts.createKeywordTypeNode(148 /* UnknownKeyword */), assertion.expression); @@ -123978,6 +125802,87 @@ var ts; })(ts || (ts = {})); /* @internal */ var ts; +(function (ts) { + var codefix; + (function (codefix) { + var fixId = "addMissingAsync"; + var errorCodes = [ + ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + ts.Diagnostics.Type_0_is_not_assignable_to_type_1.code, + ts.Diagnostics.Type_0_is_not_comparable_to_type_1.code + ]; + codefix.registerCodeFix({ + fixIds: [fixId], + errorCodes: errorCodes, + getCodeActions: function (context) { + var sourceFile = context.sourceFile, errorCode = context.errorCode, cancellationToken = context.cancellationToken, program = context.program, span = context.span; + var diagnostic = ts.find(program.getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile, cancellationToken), getIsMatchingAsyncError(span, errorCode)); + var directSpan = diagnostic && diagnostic.relatedInformation && ts.find(diagnostic.relatedInformation, function (r) { return r.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + var decl = getFixableErrorSpanDeclaration(sourceFile, directSpan); + if (!decl) { + return; + } + var trackChanges = function (cb) { return ts.textChanges.ChangeTracker.with(context, cb); }; + return [getFix(context, decl, trackChanges)]; + }, + getAllCodeActions: function (context) { + var sourceFile = context.sourceFile; + var fixedDeclarations = ts.createMap(); + return codefix.codeFixAll(context, errorCodes, function (t, diagnostic) { + var span = diagnostic.relatedInformation && ts.find(diagnostic.relatedInformation, function (r) { return r.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + var decl = getFixableErrorSpanDeclaration(sourceFile, span); + if (!decl) { + return; + } + var trackChanges = function (cb) { return (cb(t), []); }; + return getFix(context, decl, trackChanges, fixedDeclarations); + }); + }, + }); + function getFix(context, decl, trackChanges, fixedDeclarations) { + var changes = trackChanges(function (t) { return makeChange(t, context.sourceFile, decl, fixedDeclarations); }); + return codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_async_modifier_to_containing_function, fixId, ts.Diagnostics.Add_all_missing_async_modifiers); + } + function makeChange(changeTracker, sourceFile, insertionSite, fixedDeclarations) { + if (fixedDeclarations) { + if (fixedDeclarations.has(ts.getNodeId(insertionSite).toString())) { + return; + } + } + fixedDeclarations === null || fixedDeclarations === void 0 ? void 0 : fixedDeclarations.set(ts.getNodeId(insertionSite).toString(), true); + var cloneWithModifier = ts.getSynthesizedDeepClone(insertionSite, /*includeTrivia*/ true); + cloneWithModifier.modifiers = ts.createNodeArray(ts.createModifiersFromModifierFlags(ts.getModifierFlags(insertionSite) | 256 /* Async */)); + cloneWithModifier.modifierFlagsCache = 0; + changeTracker.replaceNode(sourceFile, insertionSite, cloneWithModifier); + } + function getFixableErrorSpanDeclaration(sourceFile, span) { + if (!span) + return undefined; + var token = ts.getTokenAtPosition(sourceFile, span.start); + // Checker has already done work to determine that async might be possible, and has attached + // related info to the node, so start by finding the signature that exactly matches up + // with the diagnostic range. + var decl = ts.findAncestor(token, function (node) { + if (node.getStart(sourceFile) < span.start || node.getEnd() > ts.textSpanEnd(span)) { + return "quit"; + } + return (ts.isArrowFunction(node) || ts.isMethodDeclaration(node) || ts.isFunctionExpression(node) || ts.isFunctionDeclaration(node)) && ts.textSpansEqual(span, ts.createTextSpanFromNode(node, sourceFile)); + }); + return decl; + } + function getIsMatchingAsyncError(span, errorCode) { + return function (_a) { + var start = _a.start, length = _a.length, relatedInformation = _a.relatedInformation, code = _a.code; + return ts.isNumber(start) && ts.isNumber(length) && ts.textSpansEqual({ start: start, length: length }, span) && + code === errorCode && + !!relatedInformation && + ts.some(relatedInformation, function (related) { return related.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; }); + }; + } + })(codefix = ts.codefix || (ts.codefix = {})); +})(ts || (ts = {})); +/* @internal */ +var ts; (function (ts) { var codefix; (function (codefix) { @@ -124496,7 +126401,7 @@ var ts; } } else { - var jsdocType = ts.Debug.assertDefined(ts.getJSDocType(decl), "A JSDocType for this declaration should exist"); // If not defined, shouldn't have been an error to fix + var jsdocType = ts.Debug.checkDefined(ts.getJSDocType(decl), "A JSDocType for this declaration should exist"); // If not defined, shouldn't have been an error to fix ts.Debug.assert(!decl.type, "The JSDocType decl should have a type"); // If defined, shouldn't have been an error to fix. changes.tryInsertTypeAnnotation(sourceFile, decl, transformJSDocType(jsdocType)); } @@ -124635,20 +126540,20 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; + var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, preferences = context.preferences; var token = ts.getTokenAtPosition(sourceFile, start); var declaration; - var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, formatContext, preferences); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, preferences); }); var name = declaration && ts.getNameOfDeclaration(declaration); return !name || changes.length === 0 ? undefined : [codefix.createCodeFixAction(fixId, changes, [getDiagnostic(errorCode, token), name.getText(sourceFile)], fixId, ts.Diagnostics.Infer_all_types_from_usage)]; }, fixIds: [fixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; + var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, preferences = context.preferences; var markSeen = ts.nodeSeenTracker(); return codefix.codeFixAll(context, errorCodes, function (changes, err) { - doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, formatContext, preferences); + doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, preferences); }); }, }); @@ -124688,18 +126593,20 @@ var ts; } return errorCode; } - function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, formatContext, preferences) { + function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, preferences) { if (!ts.isParameterPropertyModifier(token.kind) && token.kind !== 75 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 104 /* ThisKeyword */) { return undefined; } var parent = token.parent; + var importAdder = codefix.createImportAdder(sourceFile, program, preferences, host); errorCode = mapSuggestionDiagnostic(errorCode); switch (errorCode) { // Variable and Property declarations case ts.Diagnostics.Member_0_implicitly_has_an_1_type.code: case ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: if ((ts.isVariableDeclaration(parent) && markSeen(parent)) || ts.isPropertyDeclaration(parent) || ts.isPropertySignature(parent)) { // handle bad location - annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken, formatContext, preferences); + annotateVariableDeclaration(changes, importAdder, sourceFile, parent, program, host, cancellationToken); + importAdder.writeFixes(changes); return parent; } if (ts.isPropertyAccessExpression(parent)) { @@ -124710,13 +126617,15 @@ var ts; var typeTag = ts.createJSDocTypeTag(ts.createJSDocTypeExpression(typeNode), /*comment*/ ""); addJSDocTags(changes, sourceFile, ts.cast(parent.parent.parent, ts.isExpressionStatement), [typeTag]); } + importAdder.writeFixes(changes); return parent; } return undefined; case ts.Diagnostics.Variable_0_implicitly_has_an_1_type.code: { var symbol = program.getTypeChecker().getSymbolAtLocation(token); if (symbol && symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) { - annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken, formatContext, preferences); + annotateVariableDeclaration(changes, importAdder, sourceFile, symbol.valueDeclaration, program, host, cancellationToken); + importAdder.writeFixes(changes); return symbol.valueDeclaration; } return undefined; @@ -124726,53 +126635,57 @@ var ts; if (containingFunction === undefined) { return undefined; } + var declaration; switch (errorCode) { // Parameter declarations case ts.Diagnostics.Parameter_0_implicitly_has_an_1_type.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); - return containingFunction; + annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); + declaration = containingFunction; + break; } // falls through case ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: if (markSeen(containingFunction)) { var param = ts.cast(parent, ts.isParameter); - annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken, formatContext, preferences); - return param; + annotateParameters(changes, importAdder, sourceFile, param, containingFunction, program, host, cancellationToken); + declaration = param; } - return undefined; + break; // Get Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: case ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: if (ts.isGetAccessorDeclaration(containingFunction) && ts.isIdentifier(containingFunction.name)) { - annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host, formatContext, preferences); - return containingFunction; + annotate(changes, importAdder, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host); + declaration = containingFunction; } - return undefined; + break; // Set Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); - return containingFunction; + annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); + declaration = containingFunction; } - return undefined; + break; // Function 'this' case ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: if (ts.textChanges.isThisTypeAnnotatable(containingFunction) && markSeen(containingFunction)) { annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken); - return containingFunction; + declaration = containingFunction; } - return undefined; + break; default: return ts.Debug.fail(String(errorCode)); } + importAdder.writeFixes(changes); + return declaration; } - function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken, formatContext, preferences) { + function annotateVariableDeclaration(changes, importAdder, sourceFile, declaration, program, host, cancellationToken) { if (ts.isIdentifier(declaration.name)) { - annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host); } } - function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken, formatContext, preferences) { + function annotateParameters(changes, importAdder, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) { if (!ts.isIdentifier(parameterDeclaration.name)) { return; } @@ -124788,7 +126701,7 @@ var ts; for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) { var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type; if (declaration && !declaration.type && !declaration.initializer) { - annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, declaration, type, program, host); } } if (needParens) @@ -124817,7 +126730,7 @@ var ts; ts.createJSDocThisTag(ts.createJSDocTypeExpression(typeNode)), ]); } - function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken, formatContext, preferences) { + function annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclaration, program, host, cancellationToken) { var param = ts.firstOrUndefined(setAccessorDeclaration.parameters); if (param && ts.isIdentifier(setAccessorDeclaration.name) && ts.isIdentifier(param.name)) { var type = inferTypeForVariableFromUsage(setAccessorDeclaration.name, program, cancellationToken); @@ -124828,11 +126741,11 @@ var ts; annotateJSDocParameters(changes, sourceFile, [{ declaration: param, type: type }], program, host); } else { - annotate(changes, sourceFile, param, type, program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, param, type, program, host); } } } - function annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences) { + function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { var typeNode = ts.getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { if (ts.isInJSFile(sourceFile) && declaration.kind !== 158 /* PropertySignature */) { @@ -124844,29 +126757,16 @@ var ts; var typeTag = ts.isGetAccessorDeclaration(declaration) ? ts.createJSDocReturnTag(typeExpression, "") : ts.createJSDocTypeTag(typeExpression, ""); addJSDocTags(changes, sourceFile, parent, [typeTag]); } - else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences)) { + else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, type, sourceFile, changes, importAdder, ts.getEmitScriptTarget(program.getCompilerOptions()))) { changes.tryInsertTypeAnnotation(sourceFile, declaration, typeNode); } } } - function tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences) { - var _a; - if (ts.isLiteralImportTypeNode(typeNode) && typeNode.qualifier && type.symbol) { - // Replace 'import("./a").SomeType' with 'SomeType' and an actual import if possible - var moduleSymbol = (_a = ts.find(type.symbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) === null || _a === void 0 ? void 0 : _a.getSourceFile().symbol; - // Symbol for the left-most thing after the dot - if (moduleSymbol) { - var symbol = ts.getFirstIdentifier(typeNode.qualifier).symbol; - var action = codefix.getImportCompletionAction(symbol, moduleSymbol, sourceFile, symbol.name, host, program, formatContext, declaration.pos, preferences); - if (action.codeAction.changes.length && changes.tryInsertTypeAnnotation(sourceFile, declaration, ts.createTypeReferenceNode(typeNode.qualifier, typeNode.typeArguments))) { - for (var _i = 0, _b = action.codeAction.changes; _i < _b.length; _i++) { - var change = _b[_i]; - var file = sourceFile.fileName === change.fileName ? sourceFile : ts.Debug.assertDefined(program.getSourceFile(change.fileName)); - changes.pushRaw(file, change); - } - return true; - } - } + function tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, type, sourceFile, changes, importAdder, scriptTarget) { + var importableReference = codefix.tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget); + if (importableReference && changes.tryInsertTypeAnnotation(sourceFile, declaration, importableReference.typeReference)) { + ts.forEach(importableReference.symbols, function (s) { return importAdder.addImportFromExportedSymbol(s, /*usageIsTypeOnly*/ true); }); + return true; } return false; } @@ -124913,14 +126813,14 @@ var ts; return undefined; } switch (oldTag.kind) { - case 316 /* JSDocParameterTag */: { + case 317 /* JSDocParameterTag */: { var oldParam = oldTag; var newParam = newTag; return ts.isIdentifier(oldParam.name) && ts.isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? ts.createJSDocParamTag(newParam.name, newParam.isBracketed, newParam.typeExpression, oldParam.comment) : undefined; } - case 317 /* JSDocReturnTag */: + case 318 /* JSDocReturnTag */: return ts.createJSDocReturnTag(newTag.typeExpression, oldTag.comment); } } @@ -125443,7 +127343,7 @@ var ts; var callSignatures = usage.calls ? [getSignatureFromCalls(usage.calls)] : []; var constructSignatures = usage.constructs ? [getSignatureFromCalls(usage.constructs)] : []; var stringIndexInfo = usage.stringIndex && checker.createIndexInfo(combineFromUsage(usage.stringIndex), /*isReadonly*/ false); - return checker.createAnonymousType(/*symbol*/ undefined, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined); // TODO: GH#18217 + return checker.createAnonymousType(/*symbol*/ undefined, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined); } function inferNamedTypesFromProperties(usage) { if (!usage.properties || !usage.properties.size) @@ -125543,7 +127443,7 @@ var ts; return types; } function getFunctionFromCalls(calls) { - return checker.createAnonymousType(undefined, ts.createSymbolTable(), [getSignatureFromCalls(calls)], ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); + return checker.createAnonymousType(/*symbol*/ undefined, ts.createSymbolTable(), [getSignatureFromCalls(calls)], ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); } function getSignatureFromCalls(calls) { var parameters = []; @@ -126850,7 +128750,7 @@ var ts; getCodeActions: function (context) { var sourceFile = context.sourceFile, span = context.span; var classDeclaration = getClass(sourceFile, span.start); - return ts.mapDefined(ts.getClassImplementsHeritageClauseElements(classDeclaration), function (implementedTypeNode) { + return ts.mapDefined(ts.getEffectiveImplementsTypeNodes(classDeclaration), function (implementedTypeNode) { var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, t, context.preferences); }); return changes.length === 0 ? undefined : codefix.createCodeFixAction(fixId, changes, [ts.Diagnostics.Implement_interface_0, implementedTypeNode.getText(sourceFile)], fixId, ts.Diagnostics.Implement_all_unimplemented_interfaces); }); @@ -126861,7 +128761,7 @@ var ts; return codefix.codeFixAll(context, errorCodes, function (changes, diag) { var classDeclaration = getClass(diag.file, diag.start); if (ts.addToSeen(seenClassDeclarations, ts.getNodeId(classDeclaration))) { - for (var _i = 0, _a = ts.getClassImplementsHeritageClauseElements(classDeclaration); _i < _a.length; _i++) { + for (var _i = 0, _a = ts.getEffectiveImplementsTypeNodes(classDeclaration); _i < _a.length; _i++) { var implementedTypeNode = _a[_i]; addMissingDeclarations(context, implementedTypeNode, diag.file, classDeclaration, changes, context.preferences); } @@ -126870,7 +128770,7 @@ var ts; }, }); function getClass(sourceFile, pos) { - return ts.Debug.assertDefined(ts.getContainingClass(ts.getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); + return ts.Debug.checkDefined(ts.getContainingClass(ts.getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); } function symbolPointsToNonPrivateMember(symbol) { return !symbol.valueDeclaration || !(ts.getModifierFlags(symbol.valueDeclaration) & 8 /* Private */); @@ -126891,7 +128791,9 @@ var ts; if (!classType.getStringIndexType()) { createMissingIndexSignatureDeclaration(implementedType, 0 /* String */); } - codefix.createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, function (member) { return insertInterfaceMemberNode(sourceFile, classDeclaration, member); }); + var importAdder = codefix.createImportAdder(sourceFile, context.program, preferences, context.host); + codefix.createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, importAdder, function (member) { return insertInterfaceMemberNode(sourceFile, classDeclaration, member); }); + importAdder.writeFixes(changeTracker); function createMissingIndexSignatureDeclaration(type, kind) { var indexInfoOfKind = checker.getIndexInfoOfType(type, kind); if (indexInfoOfKind) { @@ -126947,111 +128849,115 @@ var ts; }, fixIds: [importFixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, preferences = context.preferences; - // Namespace fixes don't conflict, so just build a list. - var addToNamespace = []; - var importType = []; - // Keys are import clause node IDs. - var addToExisting = ts.createMap(); - var newImports = createNewImportMap(); - codefix.eachDiagnostic(context, errorCodes, function (diag) { - var info = getFixesInfo(context, diag.code, diag.start); - if (!info || !info.fixes.length) - return; - var fixes = info.fixes, symbolName = info.symbolName; - var fix = ts.first(fixes); - switch (fix.kind) { - case 0 /* UseNamespace */: - addToNamespace.push(fix); - break; - case 1 /* ImportType */: - importType.push(fix); - break; - case 2 /* AddToExisting */: { - var importClause = fix.importClause, importKind = fix.importKind; - var key = String(ts.getNodeId(importClause)); - var entry = addToExisting.get(key); - if (!entry) { - addToExisting.set(key, entry = { importClause: importClause, defaultImport: undefined, namedImports: [] }); - } - if (importKind === 0 /* Named */) { - ts.pushIfUnique(entry.namedImports, symbolName); - } - else { - ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add to Existing) Default import should be missing or match symbolName"); - entry.defaultImport = symbolName; - } - break; + var sourceFile = context.sourceFile, program = context.program, preferences = context.preferences, host = context.host; + var importAdder = createImportAdder(sourceFile, program, preferences, host); + codefix.eachDiagnostic(context, errorCodes, function (diag) { return importAdder.addImportFromDiagnostic(diag, context); }); + return codefix.createCombinedCodeActions(ts.textChanges.ChangeTracker.with(context, importAdder.writeFixes)); + }, + }); + function createImportAdder(sourceFile, program, preferences, host) { + var compilerOptions = program.getCompilerOptions(); + // Namespace fixes don't conflict, so just build a list. + var addToNamespace = []; + var importType = []; + // Keys are import clause node IDs. + var addToExisting = ts.createMap(); + var newImports = ts.createMap(); + var lastModuleSpecifier; + return { addImportFromDiagnostic: addImportFromDiagnostic, addImportFromExportedSymbol: addImportFromExportedSymbol, writeFixes: writeFixes }; + function addImportFromDiagnostic(diagnostic, context) { + var info = getFixesInfo(context, diagnostic.code, diagnostic.start); + if (!info || !info.fixes.length) + return; + addImport(info); + } + function addImportFromExportedSymbol(exportedSymbol, usageIsTypeOnly) { + var moduleSymbol = ts.Debug.checkDefined(exportedSymbol.parent); + var symbolName = ts.getNameForExportedSymbol(exportedSymbol, ts.getEmitScriptTarget(compilerOptions)); + var checker = program.getTypeChecker(); + var symbol = checker.getMergedSymbol(ts.skipAlias(exportedSymbol, checker)); + var exportInfos = getAllReExportingModules(sourceFile, symbol, moduleSymbol, symbolName, sourceFile, compilerOptions, checker, program.getSourceFiles()); + var preferTypeOnlyImport = !!usageIsTypeOnly && compilerOptions.importsNotUsedAsValues === 2 /* Error */; + var fix = getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, /*position*/ undefined, preferTypeOnlyImport, host, preferences); + addImport({ fixes: [fix], symbolName: symbolName }); + } + function addImport(info) { + var fixes = info.fixes, symbolName = info.symbolName; + var fix = ts.first(fixes); + switch (fix.kind) { + case 0 /* UseNamespace */: + addToNamespace.push(fix); + break; + case 1 /* ImportType */: + importType.push(fix); + break; + case 2 /* AddToExisting */: { + var importClause = fix.importClause, importKind = fix.importKind, canUseTypeOnlyImport = fix.canUseTypeOnlyImport; + var key = String(ts.getNodeId(importClause)); + var entry = addToExisting.get(key); + if (!entry) { + addToExisting.set(key, entry = { importClause: importClause, defaultImport: undefined, namedImports: [], canUseTypeOnlyImport: canUseTypeOnlyImport }); } - case 3 /* AddNew */: { - var moduleSpecifier = fix.moduleSpecifier, importKind = fix.importKind, typeOnly = fix.typeOnly; - var entry = newImports.get(moduleSpecifier, typeOnly); - if (!entry) { - newImports.set(moduleSpecifier, typeOnly, entry = { defaultImport: undefined, namedImports: [], namespaceLikeImport: undefined }); - } - switch (importKind) { - case 1 /* Default */: - ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add new) Default import should be missing or match symbolName"); - entry.defaultImport = symbolName; - break; - case 0 /* Named */: - ts.pushIfUnique(entry.namedImports, symbolName); - break; - case 3 /* Equals */: - case 2 /* Namespace */: - ts.Debug.assert(entry.namespaceLikeImport === undefined || entry.namespaceLikeImport.name === symbolName, "Namespacelike import shoudl be missing or match symbolName"); - entry.namespaceLikeImport = { importKind: importKind, name: symbolName }; - break; - } - break; + if (importKind === 0 /* Named */) { + ts.pushIfUnique(entry.namedImports, symbolName); } - default: - ts.Debug.assertNever(fix, "fix wasn't never - got kind " + fix.kind); + else { + ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add to Existing) Default import should be missing or match symbolName"); + entry.defaultImport = symbolName; + } + break; } + case 3 /* AddNew */: { + var moduleSpecifier = fix.moduleSpecifier, importKind = fix.importKind, typeOnly = fix.typeOnly; + var entry = newImports.get(moduleSpecifier); + if (!entry) { + newImports.set(moduleSpecifier, entry = { defaultImport: undefined, namedImports: [], namespaceLikeImport: undefined, typeOnly: typeOnly }); + lastModuleSpecifier = moduleSpecifier; + } + else { + // An import clause can only be type-only if every import fix contributing to it can be type-only. + entry.typeOnly = entry.typeOnly && typeOnly; + } + switch (importKind) { + case 1 /* Default */: + ts.Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add new) Default import should be missing or match symbolName"); + entry.defaultImport = symbolName; + break; + case 0 /* Named */: + ts.pushIfUnique(entry.namedImports, symbolName); + break; + case 3 /* Equals */: + case 2 /* Namespace */: + ts.Debug.assert(entry.namespaceLikeImport === undefined || entry.namespaceLikeImport.name === symbolName, "Namespacelike import shoudl be missing or match symbolName"); + entry.namespaceLikeImport = { importKind: importKind, name: symbolName }; + break; + } + break; + } + default: + ts.Debug.assertNever(fix, "fix wasn't never - got kind " + fix.kind); + } + } + function writeFixes(changeTracker) { + var quotePreference = ts.getQuotePreference(sourceFile, preferences); + for (var _i = 0, addToNamespace_1 = addToNamespace; _i < addToNamespace_1.length; _i++) { + var fix = addToNamespace_1[_i]; + addNamespaceQualifier(changeTracker, sourceFile, fix); + } + for (var _a = 0, importType_1 = importType; _a < importType_1.length; _a++) { + var fix = importType_1[_a]; + addImportType(changeTracker, sourceFile, fix, quotePreference); + } + addToExisting.forEach(function (_a) { + var importClause = _a.importClause, defaultImport = _a.defaultImport, namedImports = _a.namedImports, canUseTypeOnlyImport = _a.canUseTypeOnlyImport; + doAddExistingFix(changeTracker, sourceFile, importClause, defaultImport, namedImports, canUseTypeOnlyImport); + }); + newImports.forEach(function (imports, moduleSpecifier) { + addNewImports(changeTracker, sourceFile, moduleSpecifier, quotePreference, imports, /*blankLineBetween*/ lastModuleSpecifier === moduleSpecifier); }); - return codefix.createCombinedCodeActions(ts.textChanges.ChangeTracker.with(context, function (changes) { - var quotePreference = ts.getQuotePreference(sourceFile, preferences); - for (var _i = 0, addToNamespace_1 = addToNamespace; _i < addToNamespace_1.length; _i++) { - var fix = addToNamespace_1[_i]; - addNamespaceQualifier(changes, sourceFile, fix); - } - for (var _a = 0, importType_1 = importType; _a < importType_1.length; _a++) { - var fix = importType_1[_a]; - addImportType(changes, sourceFile, fix, quotePreference); - } - addToExisting.forEach(function (_a) { - var importClause = _a.importClause, defaultImport = _a.defaultImport, namedImports = _a.namedImports; - doAddExistingFix(changes, sourceFile, importClause, defaultImport, namedImports); - }); - newImports.forEach(function (imports, moduleSpecifier, typeOnly) { - addNewImports(changes, sourceFile, typeOnly, moduleSpecifier, quotePreference, imports); - }); - })); - }, - }); - function createNewImportMap() { - // Keys are module specifiers. - var newImports = ts.createMap(); - return { - get: function (moduleSpecifier, typeOnly) { - return newImports.get(key(moduleSpecifier, typeOnly)); - }, - set: function (moduleSpecifier, typeOnly, value) { - return newImports.set(key(moduleSpecifier, typeOnly), value); - }, - forEach: function (action) { - newImports.forEach(function (value, key) { - var typeOnly = !!+key[0]; - var moduleSpecifier = key.slice(1); - action(value, moduleSpecifier, typeOnly); - }); - }, - }; - function key(moduleSpecifier, typeOnly) { - var prefix = typeOnly ? "1" : "0"; - return prefix + moduleSpecifier; } } + codefix.createImportAdder = createImportAdder; // Sorted with the preferred fix coming first. var ImportFixKind; (function (ImportFixKind) { @@ -127069,14 +128975,19 @@ var ts; ImportKind[ImportKind["ConstEquals"] = 4] = "ConstEquals"; })(ImportKind || (ImportKind = {})); function getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, symbolName, host, program, formatContext, position, preferences) { - var exportInfos = getAllReExportingModules(sourceFile, exportedSymbol, moduleSymbol, symbolName, sourceFile, program.getCompilerOptions(), program.getTypeChecker(), program.getSourceFiles()); - ts.Debug.assert(exportInfos.some(function (info) { return info.moduleSymbol === moduleSymbol; }), "Some exportInfo should match the specified moduleSymbol"); - // We sort the best codefixes first, so taking `first` is best for completions. - var moduleSpecifier = ts.first(getNewImportInfos(program, sourceFile, position, exportInfos, host, preferences)).moduleSpecifier; - var fix = ts.first(getFixForImport(exportInfos, symbolName, position, program, sourceFile, host, preferences)); + var compilerOptions = program.getCompilerOptions(); + var exportInfos = getAllReExportingModules(sourceFile, exportedSymbol, moduleSymbol, symbolName, sourceFile, compilerOptions, program.getTypeChecker(), program.getSourceFiles()); + var preferTypeOnlyImport = compilerOptions.importsNotUsedAsValues === 2 /* Error */ && ts.isValidTypeOnlyAliasUseSite(ts.getTokenAtPosition(sourceFile, position)); + var moduleSpecifier = ts.first(getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, exportInfos, host, preferences)).moduleSpecifier; + var fix = getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, preferTypeOnlyImport, host, preferences); return { moduleSpecifier: moduleSpecifier, codeAction: codeFixActionToCodeAction(codeActionForFix({ host: host, formatContext: formatContext, preferences: preferences }, sourceFile, symbolName, fix, ts.getQuotePreference(sourceFile, preferences))) }; } codefix.getImportCompletionAction = getImportCompletionAction; + function getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, preferTypeOnlyImport, host, preferences) { + ts.Debug.assert(exportInfos.some(function (info) { return info.moduleSymbol === moduleSymbol; }), "Some exportInfo should match the specified moduleSymbol"); + // We sort the best codefixes first, so taking `first` is best. + return ts.first(getFixForImport(exportInfos, symbolName, position, preferTypeOnlyImport, program, sourceFile, host, preferences)); + } function codeFixActionToCodeAction(_a) { var description = _a.description, changes = _a.changes, commands = _a.commands; return { description: description, changes: changes, commands: commands }; @@ -127104,13 +129015,18 @@ var ts; function isTypeOnlySymbol(s, checker) { return !(ts.skipAlias(s, checker).flags & 111551 /* Value */); } - function getFixForImport(exportInfos, symbolName, position, program, sourceFile, host, preferences) { + function isTypeOnlyPosition(sourceFile, position) { + return ts.isValidTypeOnlyAliasUseSite(ts.getTokenAtPosition(sourceFile, position)); + } + function getFixForImport(exportInfos, symbolName, + /** undefined only for missing JSX namespace */ + position, preferTypeOnlyImport, program, sourceFile, host, preferences) { var checker = program.getTypeChecker(); var existingImports = ts.flatMap(exportInfos, function (info) { return getExistingImportDeclarations(info, checker, sourceFile); }); var useNamespace = position === undefined ? undefined : tryUseExistingNamespaceImport(existingImports, symbolName, position, checker); - var addToExisting = tryAddToExistingImport(existingImports); + var addToExisting = tryAddToExistingImport(existingImports, position !== undefined && isTypeOnlyPosition(sourceFile, position)); // Don't bother providing an action to add a new import if we can add to an existing one. - var addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, host, preferences); + var addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, preferTypeOnlyImport, host, preferences); return __spreadArrays((useNamespace ? [useNamespace] : ts.emptyArray), addImport); } function tryUseExistingNamespaceImport(existingImports, symbolName, position, checker) { @@ -127137,7 +129053,7 @@ var ts; } }); } - function tryAddToExistingImport(existingImports) { + function tryAddToExistingImport(existingImports, canUseTypeOnlyImport) { return ts.firstDefined(existingImports, function (_a) { var declaration = _a.declaration, importKind = _a.importKind; if (declaration.kind !== 254 /* ImportDeclaration */) @@ -127147,7 +129063,7 @@ var ts; return undefined; var name = importClause.name, namedBindings = importClause.namedBindings; return importKind === 1 /* Default */ && !name || importKind === 0 /* Named */ && (!namedBindings || namedBindings.kind === 257 /* NamedImports */) - ? { kind: 2 /* AddToExisting */, importClause: importClause, importKind: importKind } + ? { kind: 2 /* AddToExisting */, importClause: importClause, importKind: importKind, canUseTypeOnlyImport: canUseTypeOnlyImport } : undefined; }); } @@ -127169,7 +129085,7 @@ var ts; && checker.getSymbolAtLocation(moduleSpecifier) === moduleSymbol ? { declaration: i, importKind: importKind, exportedSymbolIsTypeOnly: exportedSymbolIsTypeOnly } : undefined; }); } - function getNewImportInfos(program, sourceFile, position, moduleSymbols, host, preferences) { + function getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, moduleSymbols, host, preferences) { var isJs = ts.isSourceFileJS(sourceFile); var allowsImportingSpecifier = createAutoImportFilter(sourceFile, program, host).allowsImportingSpecifier; var choicesForEachExportingModule = ts.flatMap(moduleSymbols, function (_a) { @@ -127178,8 +129094,8 @@ var ts; .map(function (moduleSpecifier) { // `position` should only be undefined at a missing jsx namespace, in which case we shouldn't be looking for pure types. return exportedSymbolIsTypeOnly && isJs - ? { kind: 1 /* ImportType */, moduleSpecifier: moduleSpecifier, position: ts.Debug.assertDefined(position, "position should be defined") } - : { kind: 3 /* AddNew */, moduleSpecifier: moduleSpecifier, importKind: importKind, typeOnly: exportedSymbolIsTypeOnly }; + ? { kind: 1 /* ImportType */, moduleSpecifier: moduleSpecifier, position: ts.Debug.checkDefined(position, "position should be defined") } + : { kind: 3 /* AddNew */, moduleSpecifier: moduleSpecifier, importKind: importKind, typeOnly: preferTypeOnlyImport }; }); }); // Sort by presence in package.json, then shortest paths first @@ -127195,19 +129111,19 @@ var ts; return a.moduleSpecifier.length - b.moduleSpecifier.length; }); } - function getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, host, preferences) { - var existingDeclaration = ts.firstDefined(existingImports, newImportInfoFromExistingSpecifier); - return existingDeclaration ? [existingDeclaration] : getNewImportInfos(program, sourceFile, position, exportInfos, host, preferences); + function getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, preferTypeOnlyImport, host, preferences) { + var existingDeclaration = ts.firstDefined(existingImports, function (info) { return newImportInfoFromExistingSpecifier(info, preferTypeOnlyImport); }); + return existingDeclaration ? [existingDeclaration] : getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, exportInfos, host, preferences); } - function newImportInfoFromExistingSpecifier(_a) { - var declaration = _a.declaration, importKind = _a.importKind, exportedSymbolIsTypeOnly = _a.exportedSymbolIsTypeOnly; + function newImportInfoFromExistingSpecifier(_a, preferTypeOnlyImport) { + var declaration = _a.declaration, importKind = _a.importKind; var expression = declaration.kind === 254 /* ImportDeclaration */ ? declaration.moduleSpecifier : declaration.moduleReference.kind === 265 /* ExternalModuleReference */ ? declaration.moduleReference.expression : undefined; return expression && ts.isStringLiteral(expression) - ? { kind: 3 /* AddNew */, moduleSpecifier: expression.text, importKind: importKind, typeOnly: exportedSymbolIsTypeOnly } + ? { kind: 3 /* AddNew */, moduleSpecifier: expression.text, importKind: importKind, typeOnly: preferTypeOnlyImport } : undefined; } function getFixesInfo(context, errorCode, pos) { @@ -127226,7 +129142,7 @@ var ts; var symbol = checker.getAliasedSymbol(umdSymbol); var symbolName = umdSymbol.name; var exportInfos = [{ moduleSymbol: symbol, importKind: getUmdImportKind(sourceFile, program.getCompilerOptions()), exportedSymbolIsTypeOnly: false }]; - var fixes = getFixForImport(exportInfos, symbolName, ts.isIdentifier(token) ? token.getStart(sourceFile) : undefined, program, sourceFile, host, preferences); + var fixes = getFixForImport(exportInfos, symbolName, ts.isIdentifier(token) ? token.getStart(sourceFile) : undefined, /*preferTypeOnlyImport*/ false, program, sourceFile, host, preferences); return { fixes: fixes, symbolName: symbolName }; } function getUmdSymbol(token, checker) { @@ -127277,10 +129193,11 @@ var ts; : symbolToken.text; // "default" is a keyword and not a legal identifier for the import, so we don't expect it here ts.Debug.assert(symbolName !== "default" /* Default */, "'default' isn't a legal identifier and couldn't occur here"); + var preferTypeOnlyImport = program.getCompilerOptions().importsNotUsedAsValues === 2 /* Error */ && ts.isValidTypeOnlyAliasUseSite(symbolToken); var exportInfos = getExportInfos(symbolName, ts.getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, checker, program, host); var fixes = ts.arrayFrom(ts.flatMapIterator(exportInfos.entries(), function (_a) { var _ = _a[0], exportInfos = _a[1]; - return getFixForImport(exportInfos, symbolName, symbolToken.getStart(sourceFile), program, sourceFile, host, preferences); + return getFixForImport(exportInfos, symbolName, symbolToken.getStart(sourceFile), preferTypeOnlyImport, program, sourceFile, host, preferences); })); return { fixes: fixes, symbolName: symbolName }; } @@ -127319,28 +129236,32 @@ var ts; if (defaultExport) return { symbol: defaultExport, kind: 1 /* Default */ }; var exportEquals = checker.resolveExternalModuleSymbol(moduleSymbol); - return exportEquals === moduleSymbol ? undefined : { symbol: exportEquals, kind: getExportEqualsImportKind(importingFile, compilerOptions, checker) }; + return exportEquals === moduleSymbol ? undefined : { symbol: exportEquals, kind: getExportEqualsImportKind(importingFile, compilerOptions) }; } - function getExportEqualsImportKind(importingFile, compilerOptions, checker) { + function getExportEqualsImportKind(importingFile, compilerOptions) { + var allowSyntheticDefaults = ts.getAllowSyntheticDefaultImports(compilerOptions); + // 1. 'import =' will not work in es2015+, so the decision is between a default + // and a namespace import, based on allowSyntheticDefaultImports/esModuleInterop. if (ts.getEmitModuleKind(compilerOptions) >= ts.ModuleKind.ES2015) { - return ts.getAllowSyntheticDefaultImports(compilerOptions) ? 1 /* Default */ : 2 /* Namespace */; + return allowSyntheticDefaults ? 1 /* Default */ : 2 /* Namespace */; } + // 2. 'import =' will not work in JavaScript, so the decision is between a default + // and const/require. if (ts.isInJSFile(importingFile)) { return ts.isExternalModule(importingFile) ? 1 /* Default */ : 4 /* ConstEquals */; } + // 3. At this point the most correct choice is probably 'import =', but people + // really hate that, so look to see if the importing file has any precedent + // on how to handle it. for (var _i = 0, _a = importingFile.statements; _i < _a.length; _i++) { var statement = _a[_i]; if (ts.isImportEqualsDeclaration(statement)) { return 3 /* Equals */; } - if (ts.isImportDeclaration(statement) && statement.importClause && statement.importClause.name) { - var moduleSymbol = checker.getImmediateAliasedSymbol(statement.importClause.symbol); - if (moduleSymbol && moduleSymbol.name !== "default" /* Default */) { - return 1 /* Default */; - } - } } - return 3 /* Equals */; + // 4. We have no precedent to go on, so just use a default import if + // allowSyntheticDefaultImports/esModuleInterop is enabled. + return allowSyntheticDefaults ? 1 /* Default */ : 3 /* Equals */; } function getDefaultExportInfoWorker(defaultExport, moduleSymbol, checker, compilerOptions) { var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport); @@ -127351,7 +129272,7 @@ var ts; return { symbolForMeaning: defaultExport, name: name }; if (defaultExport.flags & 2097152 /* Alias */) { var aliased = checker.getImmediateAliasedSymbol(defaultExport); - return aliased && getDefaultExportInfoWorker(aliased, ts.Debug.assertDefined(aliased.parent, "Alias targets of default exports must have a parent"), checker, compilerOptions); + return aliased && getDefaultExportInfoWorker(aliased, ts.Debug.checkDefined(aliased.parent, "Alias targets of default exports must have a parent"), checker, compilerOptions); } if (defaultExport.escapedName !== "default" /* Default */ && defaultExport.escapedName !== "export=" /* ExportEquals */) { @@ -127388,25 +129309,26 @@ var ts; addImportType(changes, sourceFile, fix, quotePreference); return [ts.Diagnostics.Change_0_to_1, symbolName, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName]; case 2 /* AddToExisting */: { - var importClause = fix.importClause, importKind = fix.importKind; - doAddExistingFix(changes, sourceFile, importClause, importKind === 1 /* Default */ ? symbolName : undefined, importKind === 0 /* Named */ ? [symbolName] : ts.emptyArray); + var importClause = fix.importClause, importKind = fix.importKind, canUseTypeOnlyImport = fix.canUseTypeOnlyImport; + doAddExistingFix(changes, sourceFile, importClause, importKind === 1 /* Default */ ? symbolName : undefined, importKind === 0 /* Named */ ? [symbolName] : ts.emptyArray, canUseTypeOnlyImport); var moduleSpecifierWithoutQuotes = ts.stripQuotes(importClause.parent.moduleSpecifier.getText()); return [importKind === 1 /* Default */ ? ts.Diagnostics.Add_default_import_0_to_existing_import_declaration_from_1 : ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, symbolName, moduleSpecifierWithoutQuotes]; // you too! } case 3 /* AddNew */: { - var importKind = fix.importKind, moduleSpecifier = fix.moduleSpecifier; - addNewImports(changes, sourceFile, fix.typeOnly, moduleSpecifier, quotePreference, importKind === 1 /* Default */ ? { defaultImport: symbolName, namedImports: ts.emptyArray, namespaceLikeImport: undefined } - : importKind === 0 /* Named */ ? { defaultImport: undefined, namedImports: [symbolName], namespaceLikeImport: undefined } - : { defaultImport: undefined, namedImports: ts.emptyArray, namespaceLikeImport: { importKind: importKind, name: symbolName } }); + var importKind = fix.importKind, moduleSpecifier = fix.moduleSpecifier, typeOnly = fix.typeOnly; + addNewImports(changes, sourceFile, moduleSpecifier, quotePreference, importKind === 1 /* Default */ ? { defaultImport: symbolName, namedImports: ts.emptyArray, namespaceLikeImport: undefined, typeOnly: typeOnly } + : importKind === 0 /* Named */ ? { defaultImport: undefined, namedImports: [symbolName], namespaceLikeImport: undefined, typeOnly: typeOnly } + : { defaultImport: undefined, namedImports: ts.emptyArray, namespaceLikeImport: { importKind: importKind, name: symbolName }, typeOnly: typeOnly }, /*blankLineBetween*/ true); return [importKind === 1 /* Default */ ? ts.Diagnostics.Import_default_0_from_module_1 : ts.Diagnostics.Import_0_from_module_1, symbolName, moduleSpecifier]; } default: return ts.Debug.assertNever(fix, "Unexpected fix kind " + fix.kind); } } - function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports) { + function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, canUseTypeOnlyImport) { + var convertTypeOnlyToRegular = !canUseTypeOnlyImport && clause.isTypeOnly; if (defaultImport) { - ts.Debug.assert(!clause.name, "Default imports can't have names"); + ts.Debug.assert(!clause.name, "Cannot add a default import to an import clause that already has one"); changes.insertNodeAt(sourceFile, clause.getStart(sourceFile), ts.createIdentifier(defaultImport), { suffix: ", " }); } if (namedImports.length) { @@ -127424,11 +129346,14 @@ var ts; changes.replaceNode(sourceFile, clause.namedBindings, namedImports_1); } else { - changes.insertNodeAfter(sourceFile, ts.Debug.assertDefined(clause.name, "Named import specifiers must have names"), namedImports_1); + changes.insertNodeAfter(sourceFile, ts.Debug.checkDefined(clause.name, "Import clause must have either named imports or a default import"), namedImports_1); } } } } + if (convertTypeOnlyToRegular) { + changes.delete(sourceFile, ts.getTypeKeywordOfTypeOnlyImport(clause, sourceFile)); + } } function addNamespaceQualifier(changes, sourceFile, _a) { var namespacePrefix = _a.namespacePrefix, position = _a.position; @@ -127442,16 +129367,16 @@ var ts; var quote = ts.getQuoteFromPreference(quotePreference); return "import(" + quote + moduleSpecifier + quote + ")."; } - function addNewImports(changes, sourceFile, typeOnly, moduleSpecifier, quotePreference, _a) { - var defaultImport = _a.defaultImport, namedImports = _a.namedImports, namespaceLikeImport = _a.namespaceLikeImport; + function addNewImports(changes, sourceFile, moduleSpecifier, quotePreference, _a, blankLineBetween) { + var defaultImport = _a.defaultImport, namedImports = _a.namedImports, namespaceLikeImport = _a.namespaceLikeImport, typeOnly = _a.typeOnly; var quotedModuleSpecifier = ts.makeStringLiteral(moduleSpecifier, quotePreference); if (defaultImport !== undefined || namedImports.length) { - ts.insertImport(changes, sourceFile, ts.makeImport(defaultImport === undefined ? undefined : ts.createIdentifier(defaultImport), namedImports.map(function (n) { return ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(n)); }), moduleSpecifier, quotePreference, typeOnly)); + ts.insertImport(changes, sourceFile, ts.makeImport(defaultImport === undefined ? undefined : ts.createIdentifier(defaultImport), namedImports.map(function (n) { return ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(n)); }), moduleSpecifier, quotePreference, typeOnly), /*blankLineBetween*/ blankLineBetween); } if (namespaceLikeImport) { ts.insertImport(changes, sourceFile, namespaceLikeImport.importKind === 3 /* Equals */ ? ts.createImportEqualsDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createIdentifier(namespaceLikeImport.name), ts.createExternalModuleReference(quotedModuleSpecifier)) : namespaceLikeImport.importKind === 4 /* ConstEquals */ ? createConstEqualsRequireDeclaration(namespaceLikeImport.name, quotedModuleSpecifier) : - ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(namespaceLikeImport.name)), typeOnly), quotedModuleSpecifier)); + ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(namespaceLikeImport.name)), typeOnly), quotedModuleSpecifier), /*blankLineBetween*/ blankLineBetween); } } function createConstEqualsRequireDeclaration(name, quotedModuleSpecifier) { @@ -127693,19 +129618,19 @@ var ts; // this.speling = 1; // ^^^^^^^ var node = ts.getTokenAtPosition(sourceFile, pos); + var parent = node.parent; var checker = context.program.getTypeChecker(); var suggestedSymbol; - if (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node) { + if (ts.isPropertyAccessExpression(parent) && parent.name === node) { ts.Debug.assert(ts.isIdentifierOrPrivateIdentifier(node), "Expected an identifier for spelling (property access)"); - var containingType = checker.getTypeAtLocation(node.parent.expression); - if (node.parent.flags & 32 /* OptionalChain */) { + var containingType = checker.getTypeAtLocation(parent.expression); + if (parent.flags & 32 /* OptionalChain */) { containingType = checker.getNonNullableType(containingType); } - var name = node; - suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(name, containingType); + suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); } - else if (ts.isImportSpecifier(node.parent) && node.parent.name === node) { - ts.Debug.assert(node.kind === 75 /* Identifier */, "Expected an identifier for spelling (import)"); + else if (ts.isImportSpecifier(parent) && parent.name === node) { + ts.Debug.assertNode(node, ts.isIdentifier, "Expected an identifier for spelling (import)"); var importDeclaration = ts.findAncestor(node, ts.isImportDeclaration); var resolvedSourceFile = getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration); if (resolvedSourceFile && resolvedSourceFile.symbol) { @@ -127786,7 +129711,7 @@ var ts; var parentDeclaration = info.parentDeclaration, declSourceFile = info.declSourceFile, inJs = info.inJs, makeStatic = info.makeStatic, token = info.token, call = info.call; var methodCodeAction = call && getActionForMethodDeclaration(context, declSourceFile, parentDeclaration, token, call, makeStatic, inJs, context.preferences); var addMember = inJs && !ts.isInterfaceDeclaration(parentDeclaration) ? - ts.singleElementArray(getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, parentDeclaration, token.text, makeStatic)) : + ts.singleElementArray(getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, parentDeclaration, token, makeStatic)) : getActionsForAddMissingMemberInTypeScriptFile(context, declSourceFile, parentDeclaration, token, makeStatic); return ts.concatenate(ts.singleElementArray(methodCodeAction), addMember); }, @@ -127832,7 +129757,7 @@ var ts; } else { if (inJs && !ts.isInterfaceDeclaration(parentDeclaration)) { - addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token.text, makeStatic); + addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token, makeStatic); } else { var typeNode = getTypeNode(program.getTypeChecker(), parentDeclaration, token); @@ -127881,17 +129806,16 @@ var ts; var symbol = leftExpressionType.symbol; if (!symbol || !symbol.declarations) return undefined; - var isClass = ts.find(symbol.declarations, ts.isClassLike); + var classDeclaration = ts.find(symbol.declarations, ts.isClassLike); // Don't suggest adding private identifiers to anything other than a class. - if (!isClass && ts.isPrivateIdentifier(token)) { + if (!classDeclaration && ts.isPrivateIdentifier(token)) { return undefined; } // Prefer to change the class instead of the interface if they are merged - var classOrInterface = isClass || ts.find(symbol.declarations, ts.isInterfaceDeclaration); + var classOrInterface = classDeclaration || ts.find(symbol.declarations, ts.isInterfaceDeclaration); if (classOrInterface && !program.isSourceFileFromExternalLibrary(classOrInterface.getSourceFile())) { var makeStatic = (leftExpressionType.target || leftExpressionType) !== checker.getDeclaredTypeOfSymbol(symbol); - // Static private identifier properties are not supported yet. - if (makeStatic && ts.isPrivateIdentifier(token)) { + if (makeStatic && (ts.isPrivateIdentifier(token) || ts.isInterfaceDeclaration(classOrInterface))) { return undefined; } var declSourceFile = classOrInterface.getSourceFile(); @@ -127905,12 +129829,17 @@ var ts; } return undefined; } - function getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, classDeclaration, tokenName, makeStatic) { - var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingMemberInJs(t, declSourceFile, classDeclaration, tokenName, makeStatic); }); - return changes.length === 0 ? undefined - : codefix.createCodeFixAction(fixName, changes, [makeStatic ? ts.Diagnostics.Initialize_static_property_0 : ts.Diagnostics.Initialize_property_0_in_the_constructor, tokenName], fixId, ts.Diagnostics.Add_all_missing_members); + function getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, classDeclaration, token, makeStatic) { + var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingMemberInJs(t, declSourceFile, classDeclaration, token, makeStatic); }); + if (changes.length === 0) { + return undefined; + } + var diagnostic = makeStatic ? ts.Diagnostics.Initialize_static_property_0 : + ts.isPrivateIdentifier(token) ? ts.Diagnostics.Declare_a_private_field_named_0 : ts.Diagnostics.Initialize_property_0_in_the_constructor; + return codefix.createCodeFixAction(fixName, changes, [diagnostic, token.text], fixId, ts.Diagnostics.Add_all_missing_members); } - function addMissingMemberInJs(changeTracker, declSourceFile, classDeclaration, tokenName, makeStatic) { + function addMissingMemberInJs(changeTracker, declSourceFile, classDeclaration, token, makeStatic) { + var tokenName = token.text; if (makeStatic) { if (classDeclaration.kind === 214 /* ClassExpression */) { return; @@ -127919,6 +129848,21 @@ var ts; var staticInitialization = initializePropertyToUndefined(ts.createIdentifier(className), tokenName); changeTracker.insertNodeAfter(declSourceFile, classDeclaration, staticInitialization); } + else if (ts.isPrivateIdentifier(token)) { + var property = ts.createProperty( + /*decorators*/ undefined, + /*modifiers*/ undefined, tokenName, + /*questionToken*/ undefined, + /*type*/ undefined, + /*initializer*/ undefined); + var lastProp = getNodeToInsertPropertyAfter(classDeclaration); + if (lastProp) { + changeTracker.insertNodeAfter(declSourceFile, lastProp, property); + } + else { + changeTracker.insertNodeAtClassStart(declSourceFile, classDeclaration, property); + } + } else { var classConstructor = ts.getFirstConstructorWithBody(classDeclaration); if (!classConstructor) { @@ -128164,7 +130108,9 @@ var ts; // Note that this is ultimately derived from a map indexed by symbol names, // so duplicates cannot occur. var abstractAndNonPrivateExtendsSymbols = checker.getPropertiesOfType(instantiatedExtendsType).filter(symbolPointsToNonPrivateAndAbstractMember); - codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, context, preferences, function (member) { return changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, member); }); + var importAdder = codefix.createImportAdder(sourceFile, context.program, preferences, context.host); + codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, context, preferences, importAdder, function (member) { return changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, member); }); + importAdder.writeFixes(changeTracker); } function symbolPointsToNonPrivateAndAbstractMember(symbol) { // See `codeFixClassExtendAbstractProtectedProperty.ts` in https://github.com/Microsoft/TypeScript/pull/11547/files @@ -128252,7 +130198,7 @@ var ts; }); function getNode(sourceFile, pos) { var token = ts.getTokenAtPosition(sourceFile, pos); - ts.Debug.assert(token.kind === 129 /* ConstructorKeyword */, "token should be at the constructor keyword"); + ts.Debug.assert(ts.isConstructorDeclaration(token.parent), "token should be at the constructor declaration"); return token.parent; } function doChange(changes, sourceFile, ctr) { @@ -128435,6 +130381,7 @@ var ts; var didYouMeanStaticMemberCode = ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code; var errorCodes = [ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, + ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies.code, didYouMeanStaticMemberCode, ]; codefix.registerCodeFix({ @@ -128457,9 +130404,9 @@ var ts; }); function getInfo(sourceFile, pos, diagCode) { var node = ts.getTokenAtPosition(sourceFile, pos); - if (!ts.isIdentifier(node)) - return undefined; - return { node: node, className: diagCode === didYouMeanStaticMemberCode ? ts.getContainingClass(node).name.text : undefined }; + if (ts.isIdentifier(node)) { + return { node: node, className: diagCode === didYouMeanStaticMemberCode ? ts.getContainingClass(node).name.text : undefined }; + } } function doChange(changes, sourceFile, _a) { var node = _a.node, className = _a.className; @@ -128471,6 +130418,47 @@ var ts; })(ts || (ts = {})); /* @internal */ var ts; +(function (ts) { + var codefix; + (function (codefix) { + var fixIdHtmlEntity = "invalidJsxCharactersConvertToHtmlEntity"; + var fixIdExpression = "invalidJsxCharactersConvertToExpression"; + var errorCodes = [ts.Diagnostics.Unexpected_token_Did_you_mean_or_gt.code, ts.Diagnostics.Unexpected_token_Did_you_mean_or_rbrace.code]; + codefix.registerCodeFix({ + errorCodes: errorCodes, + getCodeActions: function (context) { + var sourceFile = context.sourceFile, span = context.span; + var changeToExpression = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, span.start, /* useHtmlEntity */ false); }); + var changeToHtmlEntity = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, span.start, /* useHtmlEntity */ true); }); + return [ + codefix.createCodeFixActionWithoutFixAll(fixIdExpression, changeToExpression, ts.Diagnostics.Wrap_invalid_character_in_an_expression_container), + codefix.createCodeFixAction(fixIdHtmlEntity, changeToHtmlEntity, ts.Diagnostics.Convert_invalid_character_to_its_html_entity_code, fixIdHtmlEntity, ts.Diagnostics.Convert_invalid_character_to_its_html_entity_code), + ]; + }, + fixIds: [fixIdExpression, fixIdHtmlEntity], + }); + var htmlEntity = { + ">": ">", + "}": "}", + }; + function isValidCharacter(character) { + return ts.hasProperty(htmlEntity, character); + } + function doChange(changes, sourceFile, start, useHtmlEntity) { + var character = sourceFile.getText()[start]; + // sanity check + if (!isValidCharacter(character)) { + return; + } + var replacement = useHtmlEntity + ? htmlEntity[character] + : "{'" + character + "'}"; + changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement); + } + })(codefix = ts.codefix || (ts.codefix = {})); +})(ts || (ts = {})); +/* @internal */ +var ts; (function (ts) { var codefix; (function (codefix) { @@ -128585,7 +130573,7 @@ var ts; return codefix.createCodeFixAction(fixName, changes, diag, fixIdDelete, ts.Diagnostics.Delete_all_unused_declarations); } function deleteTypeParameters(changes, sourceFile, token) { - changes.delete(sourceFile, ts.Debug.assertDefined(ts.cast(token.parent, ts.isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); + changes.delete(sourceFile, ts.Debug.checkDefined(ts.cast(token.parent, ts.isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } // Sometimes the diagnostic span is an entire ImportDeclaration, so we should remove the whole thing. function tryGetFullImport(token) { @@ -128724,16 +130712,25 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, context.span.start, context.span.length); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, context.span.start, context.span.length, context.errorCode); }); return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Remove_unreachable_code, fixId, ts.Diagnostics.Remove_all_unreachable_code)]; }, fixIds: [fixId], - getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return doChange(changes, diag.file, diag.start, diag.length); }); }, + getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return doChange(changes, diag.file, diag.start, diag.length, diag.code); }); }, }); - function doChange(changes, sourceFile, start, length) { + function doChange(changes, sourceFile, start, length, errorCode) { var token = ts.getTokenAtPosition(sourceFile, start); var statement = ts.findAncestor(token, ts.isStatement); - ts.Debug.assert(statement.getStart(sourceFile) === token.getStart(sourceFile), "token and statement should start at the same point"); + if (statement.getStart(sourceFile) !== token.getStart(sourceFile)) { + var logData = JSON.stringify({ + statementKind: ts.Debug.formatSyntaxKind(statement.kind), + tokenKind: ts.Debug.formatSyntaxKind(token.kind), + errorCode: errorCode, + start: start, + length: length + }); + ts.Debug.fail("Token and statement should start at the same point. " + logData); + } var container = (ts.isBlock(statement.parent) ? statement.parent : statement).parent; if (!ts.isBlock(statement.parent) || statement === ts.first(statement.parent.statements)) { switch (container.kind) { @@ -128756,7 +130753,7 @@ var ts; } if (ts.isBlock(statement.parent)) { var end_3 = start + length; - var lastStatement = ts.Debug.assertDefined(lastWhere(ts.sliceAfter(statement.parent.statements, statement), function (s) { return s.pos < end_3; }), "Some statement should be last"); + var lastStatement = ts.Debug.checkDefined(lastWhere(ts.sliceAfter(statement.parent.statements, statement), function (s) { return s.pos < end_3; }), "Some statement should be last"); changes.deleteNodeRange(sourceFile, statement, lastStatement); } else { @@ -129020,14 +131017,15 @@ var ts; * Finds members of the resolved type that are missing in the class pointed to by class decl * and generates source code for the missing members. * @param possiblyMissingSymbols The collection of symbols to filter and then get insertions for. + * @param importAdder If provided, type annotations will use identifier type references instead of ImportTypeNodes, and the missing imports will be added to the importAdder. * @returns Empty string iff there are no member insertions. */ - function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, context, preferences, out) { + function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, context, preferences, importAdder, addClassElement) { var classMembers = classDeclaration.symbol.members; for (var _i = 0, possiblyMissingSymbols_1 = possiblyMissingSymbols; _i < possiblyMissingSymbols_1.length; _i++) { var symbol = possiblyMissingSymbols_1[_i]; if (!classMembers.has(symbol.escapedName)) { - addNewNodeForMemberSymbol(symbol, classDeclaration, context, preferences, out); + addNewNodeForMemberSymbol(symbol, classDeclaration, context, preferences, importAdder, addClassElement); } } } @@ -129053,12 +131051,13 @@ var ts; /** * @returns Empty string iff there we can't figure out a representation for `symbol` in `enclosingDeclaration`. */ - function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, context, preferences, out) { + function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, context, preferences, importAdder, addClassElement) { var declarations = symbol.getDeclarations(); if (!(declarations && declarations.length)) { return undefined; } var checker = context.program.getTypeChecker(); + var scriptTarget = ts.getEmitScriptTarget(context.program.getCompilerOptions()); var declaration = declarations[0]; var name = ts.getSynthesizedDeepClone(ts.getNameOfDeclaration(declaration), /*includeTrivia*/ false); var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration)); @@ -129069,29 +131068,44 @@ var ts; switch (declaration.kind) { case 158 /* PropertySignature */: case 159 /* PropertyDeclaration */: - var typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); - out(ts.createProperty( + var flags = preferences.quotePreference === "single" ? 268435456 /* UseSingleQuotesForStringLiteralType */ : undefined; + var typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); + if (importAdder) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget); + if (importableReference) { + typeNode = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + addClassElement(ts.createProperty( /*decorators*/ undefined, modifiers, name, optional ? ts.createToken(57 /* QuestionToken */) : undefined, typeNode, /*initializer*/ undefined)); break; case 163 /* GetAccessor */: case 164 /* SetAccessor */: { - var allAccessors = ts.getAllAccessorDeclarations(declarations, declaration); var typeNode_1 = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); + var allAccessors = ts.getAllAccessorDeclarations(declarations, declaration); var orderedAccessors = allAccessors.secondAccessor ? [allAccessors.firstAccessor, allAccessors.secondAccessor] : [allAccessors.firstAccessor]; + if (importAdder) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode_1, type, scriptTarget); + if (importableReference) { + typeNode_1 = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } for (var _i = 0, orderedAccessors_1 = orderedAccessors; _i < orderedAccessors_1.length; _i++) { var accessor = orderedAccessors_1[_i]; if (ts.isGetAccessorDeclaration(accessor)) { - out(ts.createGetAccessor( + addClassElement(ts.createGetAccessor( /*decorators*/ undefined, modifiers, name, ts.emptyArray, typeNode_1, ambient ? undefined : createStubbedMethodBody(preferences))); } else { ts.Debug.assertNode(accessor, ts.isSetAccessorDeclaration, "The counterpart to a getter should be a setter"); var parameter = ts.getSetAccessorValueParameter(accessor); var parameterName = parameter && ts.isIdentifier(parameter.name) ? ts.idText(parameter.name) : undefined; - out(ts.createSetAccessor( + addClassElement(ts.createSetAccessor( /*decorators*/ undefined, modifiers, name, createDummyParameters(1, [parameterName], [typeNode_1], 1, /*inJs*/ false), ambient ? undefined : createStubbedMethodBody(preferences))); } } @@ -129128,23 +131142,61 @@ var ts; } else { ts.Debug.assert(declarations.length === signatures.length, "Declarations and signatures should match count"); - out(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); + addClassElement(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); } } break; } function outputMethod(signature, modifiers, name, body) { - var method = signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body); + var method = signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body, importAdder); if (method) - out(method); + addClassElement(method); } } - function signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body) { + function signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body, importAdder) { var program = context.program; - var signatureDeclaration = program.getTypeChecker().signatureToSignatureDeclaration(signature, 161 /* MethodDeclaration */, enclosingDeclaration, 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */, getNoopSymbolTrackerWithResolver(context)); + var checker = program.getTypeChecker(); + var scriptTarget = ts.getEmitScriptTarget(program.getCompilerOptions()); + var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 161 /* MethodDeclaration */, enclosingDeclaration, 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */, getNoopSymbolTrackerWithResolver(context)); if (!signatureDeclaration) { return undefined; } + if (importAdder) { + if (signatureDeclaration.typeParameters) { + ts.forEach(signatureDeclaration.typeParameters, function (typeParameterDecl, i) { + var typeParameter = signature.typeParameters[i]; + if (typeParameterDecl.constraint) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeParameterDecl.constraint, typeParameter.constraint, scriptTarget); + if (importableReference) { + typeParameterDecl.constraint = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + if (typeParameterDecl.default) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeParameterDecl.default, typeParameter.default, scriptTarget); + if (importableReference) { + typeParameterDecl.default = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + }); + } + ts.forEach(signatureDeclaration.parameters, function (parameterDecl, i) { + var parameter = signature.parameters[i]; + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(parameterDecl.type, checker.getTypeAtLocation(parameter.valueDeclaration), scriptTarget); + if (importableReference) { + parameterDecl.type = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + }); + if (signatureDeclaration.type) { + var importableReference = tryGetAutoImportableReferenceFromImportTypeNode(signatureDeclaration.type, signature.resolvedReturnType, scriptTarget); + if (importableReference) { + signatureDeclaration.type = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + } signatureDeclaration.decorators = undefined; signatureDeclaration.modifiers = modifiers; signatureDeclaration.name = name; @@ -129288,6 +131340,49 @@ var ts; return ts.find(obj.properties, function (p) { return ts.isPropertyAssignment(p) && !!p.name && ts.isStringLiteral(p.name) && p.name.text === name; }); } codefix.findJsonProperty = findJsonProperty; + /** + * Given an ImportTypeNode 'import("./a").SomeType>', + * returns an equivalent type reference node with any nested ImportTypeNodes also replaced + * with type references, and a list of symbols that must be imported to use the type reference. + */ + function tryGetAutoImportableReferenceFromImportTypeNode(importTypeNode, type, scriptTarget) { + if (importTypeNode && ts.isLiteralImportTypeNode(importTypeNode) && importTypeNode.qualifier && (!type || type.symbol)) { + // Symbol for the left-most thing after the dot + var firstIdentifier = ts.getFirstIdentifier(importTypeNode.qualifier); + var name = ts.getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget); + var qualifier = name !== firstIdentifier.text + ? replaceFirstIdentifierOfEntityName(importTypeNode.qualifier, ts.createIdentifier(name)) + : importTypeNode.qualifier; + var symbols_4 = [firstIdentifier.symbol]; + var typeArguments_1 = []; + if (importTypeNode.typeArguments) { + importTypeNode.typeArguments.forEach(function (arg) { + var ref = tryGetAutoImportableReferenceFromImportTypeNode(arg, /*undefined*/ type, scriptTarget); + if (ref) { + symbols_4.push.apply(symbols_4, ref.symbols); + typeArguments_1.push(ref.typeReference); + } + else { + typeArguments_1.push(arg); + } + }); + } + return { + symbols: symbols_4, + typeReference: ts.createTypeReferenceNode(qualifier, typeArguments_1) + }; + } + } + codefix.tryGetAutoImportableReferenceFromImportTypeNode = tryGetAutoImportableReferenceFromImportTypeNode; + function replaceFirstIdentifierOfEntityName(name, newIdentifier) { + if (name.kind === 75 /* Identifier */) { + return newIdentifier; + } + return ts.createQualifiedName(replaceFirstIdentifierOfEntityName(name.left, newIdentifier), name.right); + } + function importSymbols(importAdder, symbols) { + symbols.forEach(function (s) { return importAdder.addImportFromExportedSymbol(s, /*usageIsTypeOnly*/ true); }); + } })(codefix = ts.codefix || (ts.codefix = {})); })(ts || (ts = {})); /* @internal */ @@ -129751,7 +131846,7 @@ var ts; if (!importDeclaration) { return; } - var importClause = ts.Debug.assertDefined(importDeclaration.importClause); + var importClause = ts.Debug.checkDefined(importDeclaration.importClause); changes.replaceNode(context.sourceFile, importDeclaration, ts.updateImportDeclaration(importDeclaration, importDeclaration.decorators, importDeclaration.modifiers, ts.updateImportClause(importClause, importClause.name, /*namedBindings*/ undefined, importClause.isTypeOnly), importDeclaration.moduleSpecifier)); changes.insertNodeAfter(context.sourceFile, importDeclaration, ts.createImportDeclaration( /*decorators*/ undefined, @@ -129812,7 +131907,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === actionNameDefaultToNamed || actionName === actionNameNamedToDefault, "Unexpected action name"); - var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, ts.Debug.assertDefined(getInfo(context), "context must have info"), t, context.cancellationToken); }); + var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, ts.Debug.checkDefined(getInfo(context), "context must have info"), t, context.cancellationToken); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; }, }); @@ -129864,10 +131959,10 @@ var ts; function changeExport(exportingSourceFile, _a, changes, checker) { var wasDefault = _a.wasDefault, exportNode = _a.exportNode, exportName = _a.exportName; if (wasDefault) { - changes.delete(exportingSourceFile, ts.Debug.assertDefined(ts.findModifier(exportNode, 84 /* DefaultKeyword */), "Should find a default keyword in modifier list")); + changes.delete(exportingSourceFile, ts.Debug.checkDefined(ts.findModifier(exportNode, 84 /* DefaultKeyword */), "Should find a default keyword in modifier list")); } else { - var exportKeyword = ts.Debug.assertDefined(ts.findModifier(exportNode, 89 /* ExportKeyword */), "Should find an export keyword in modifier list"); + var exportKeyword = ts.Debug.checkDefined(ts.findModifier(exportNode, 89 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { case 244 /* FunctionDeclaration */: case 245 /* ClassDeclaration */: @@ -129878,7 +131973,7 @@ var ts; // If 'x' isn't used in this file, `export const x = 0;` --> `export default 0;` if (!ts.FindAllReferences.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile)) { // We checked in `getInfo` that an initializer exists. - changes.replaceNode(exportingSourceFile, exportNode, ts.createExportDefault(ts.Debug.assertDefined(ts.first(exportNode.declarationList.declarations).initializer, "Initializer was previously known to be present"))); + changes.replaceNode(exportingSourceFile, exportNode, ts.createExportDefault(ts.Debug.checkDefined(ts.first(exportNode.declarationList.declarations).initializer, "Initializer was previously known to be present"))); break; } // falls through @@ -129897,7 +131992,7 @@ var ts; function changeImports(program, _a, changes, cancellationToken) { var wasDefault = _a.wasDefault, exportName = _a.exportName, exportingModuleSymbol = _a.exportingModuleSymbol; var checker = program.getTypeChecker(); - var exportSymbol = ts.Debug.assertDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); + var exportSymbol = ts.Debug.checkDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); ts.FindAllReferences.Core.eachExportReference(program.getSourceFiles(), checker, cancellationToken, exportSymbol, exportingModuleSymbol, exportName.text, wasDefault, function (ref) { var importingSourceFile = ref.getSourceFile(); if (wasDefault) { @@ -130008,7 +132103,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === actionNameNamespaceToNamed || actionName === actionNameNamedToNamespace, "Unexpected action name"); - var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, t, ts.Debug.assertDefined(getImportToConvert(context), "Context must provide an import to convert")); }); + var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, t, ts.Debug.checkDefined(getImportToConvert(context), "Context must provide an import to convert")); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; } }); @@ -130487,6 +132582,7 @@ var ts; permittedJumps = 4 /* Return */; } break; + case 278 /* DefaultClause */: case 277 /* CaseClause */: // allow unlabeled break inside case clauses permittedJumps |= 1 /* Break */; @@ -131265,7 +133361,7 @@ var ts; return curr.parent.parent; } // There must be at least one statement since we started in one. - return ts.Debug.assertDefined(prevStatement, "prevStatement failed to get set"); + return ts.Debug.checkDefined(prevStatement, "prevStatement failed to get set"); } ts.Debug.assert(curr !== scope, "Didn't encounter a block-like before encountering scope"); } @@ -131710,7 +133806,7 @@ var ts; }, getEditsForAction: function (context, actionName) { var file = context.file; - var info = ts.Debug.assertDefined(getRangeToExtract(context), "Expected to find a range to extract"); + var info = ts.Debug.checkDefined(getRangeToExtract(context), "Expected to find a range to extract"); var name = ts.getUniqueName("NewType", file); var edits = ts.textChanges.ChangeTracker.with(context, function (changes) { switch (actionName) { @@ -131741,7 +133837,7 @@ var ts; if (!selection || !ts.isTypeNode(selection)) return undefined; var checker = context.program.getTypeChecker(); - var firstStatement = ts.Debug.assertDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); + var firstStatement = ts.Debug.checkDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); var typeParameters = collectTypeParameters(checker, selection, firstStatement, file); if (!typeParameters) return undefined; @@ -131837,7 +133933,7 @@ var ts; } function doTypedefChange(changes, file, name, info) { var firstStatement = info.firstStatement, selection = info.selection, typeParameters = info.typeParameters; - var node = ts.createNode(321 /* JSDocTypedefTag */); + var node = ts.createNode(322 /* JSDocTypedefTag */); node.tagName = ts.createIdentifier("typedef"); // TODO: jsdoc factory https://github.com/Microsoft/TypeScript/pull/29539 node.fullName = ts.createIdentifier(name); node.name = node.fullName; @@ -131845,7 +133941,7 @@ var ts; var templates = []; ts.forEach(typeParameters, function (typeParameter) { var constraint = ts.getEffectiveConstraintOfTypeParameter(typeParameter); - var template = ts.createNode(320 /* JSDocTemplateTag */); + var template = ts.createNode(321 /* JSDocTemplateTag */); template.tagName = ts.createIdentifier("template"); template.constraint = constraint && ts.cast(constraint, ts.isJSDocTypeExpression); var parameter = ts.createNode(155 /* TypeParameter */); @@ -132049,7 +134145,7 @@ var ts; }, getEditsForAction: function (context, actionName) { ts.Debug.assert(actionName === refactorName, "Wrong refactor invoked"); - var statements = ts.Debug.assertDefined(getStatementsToMove(context)); + var statements = ts.Debug.checkDefined(getStatementsToMove(context)); var edits = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(context.file, context.program, statements, t, context.host, context.preferences); }); return { edits: edits, renameFilename: undefined, renameLocation: undefined }; } @@ -132139,7 +134235,7 @@ var ts; var quotePreference = ts.getQuotePreference(oldFile, preferences); var importsFromNewFile = createOldFileImportsFromNewFile(usage.oldFileImportsFromNewFile, newModuleName, useEs6ModuleSyntax, quotePreference); if (importsFromNewFile) { - ts.insertImport(changes, oldFile, importsFromNewFile); + ts.insertImport(changes, oldFile, importsFromNewFile, /*blankLineBetween*/ true); } deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker); deleteMovedStatements(oldFile, toMove.ranges, changes); @@ -132306,7 +134402,7 @@ var ts; return ts.flatMap(toMove, function (statement) { if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && - forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.assertDefined(d.symbol)); })) { + forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { var exports = addExport(statement, useEs6Exports); if (exports) return exports; @@ -132443,7 +134539,7 @@ var ts; for (var _i = 0, toMove_1 = toMove; _i < toMove_1.length; _i++) { var statement = toMove_1[_i]; forEachTopLevelDeclaration(statement, function (decl) { - movedSymbols.add(ts.Debug.assertDefined(ts.isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); + movedSymbols.add(ts.Debug.checkDefined(ts.isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); }); } for (var _a = 0, toMove_2 = toMove; _a < toMove_2.length; _a++) { @@ -133273,7 +135369,7 @@ var ts; return [classDeclaration.name]; // If the class declaration doesn't have a name, it should have a default modifier. // We validated this in `isValidFunctionDeclaration` through `hasNameOrDefault` - var defaultModifier = ts.Debug.assertDefined(ts.findModifier(classDeclaration, 84 /* DefaultKeyword */), "Nameless class declaration should be a default export"); + var defaultModifier = ts.Debug.checkDefined(ts.findModifier(classDeclaration, 84 /* DefaultKeyword */), "Nameless class declaration should be a default export"); return [defaultModifier]; case 214 /* ClassExpression */: var classExpression = constructorDeclaration.parent; @@ -133291,12 +135387,12 @@ var ts; return [functionDeclaration.name]; // If the function declaration doesn't have a name, it should have a default modifier. // We validated this in `isValidFunctionDeclaration` through `hasNameOrDefault` - var defaultModifier = ts.Debug.assertDefined(ts.findModifier(functionDeclaration, 84 /* DefaultKeyword */), "Nameless function declaration should be a default export"); + var defaultModifier = ts.Debug.checkDefined(ts.findModifier(functionDeclaration, 84 /* DefaultKeyword */), "Nameless function declaration should be a default export"); return [defaultModifier]; case 161 /* MethodDeclaration */: return [functionDeclaration.name]; case 162 /* Constructor */: - var ctrKeyword = ts.Debug.assertDefined(ts.findChildOfKind(functionDeclaration, 129 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword"); + var ctrKeyword = ts.Debug.checkDefined(ts.findChildOfKind(functionDeclaration, 129 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword"); if (functionDeclaration.parent.kind === 214 /* ClassExpression */) { var variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; @@ -133330,7 +135426,7 @@ var ts; var node = getNodeOrParentOfParentheses(file, startPosition); var maybeBinary = getParentBinaryExpression(node); var refactorInfo = { name: refactorName, description: refactorDescription, actions: [] }; - if ((ts.isBinaryExpression(maybeBinary) || ts.isStringLiteral(maybeBinary)) && isStringConcatenationValid(maybeBinary)) { + if (ts.isBinaryExpression(maybeBinary) && isStringConcatenationValid(maybeBinary)) { refactorInfo.actions.push({ name: refactorName, description: refactorDescription }); return [refactorInfo]; } @@ -133555,7 +135651,7 @@ var ts; if (!children.length) { return undefined; } - var child = ts.find(children, function (kid) { return kid.kind < 294 /* FirstJSDocNode */ || kid.kind > 322 /* LastJSDocNode */; }); + var child = ts.find(children, function (kid) { return kid.kind < 294 /* FirstJSDocNode */ || kid.kind > 323 /* LastJSDocNode */; }); return child.kind < 153 /* FirstNode */ ? child : child.getFirstToken(sourceFile); @@ -133625,7 +135721,7 @@ var ts; } } function createSyntaxList(nodes, parent) { - var list = createNode(323 /* SyntaxList */, nodes.pos, nodes.end, parent); + var list = createNode(324 /* SyntaxList */, nodes.pos, nodes.end, parent); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { @@ -134238,10 +136334,6 @@ var ts; }); return names; }; - HostCache.prototype.getVersion = function (path) { - var file = this.getHostFileInformation(path); - return (file && file.version); // TODO: GH#18217 - }; HostCache.prototype.getScriptSnapshot = function (path) { var file = this.getHostFileInformation(path); return (file && file.scriptSnapshot); // TODO: GH#18217 @@ -134448,7 +136540,7 @@ var ts; var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse; var projectReferences = hostCache.getProjectReferences(); // If the program is already up-to-date, we can reuse it - if (ts.isProgramUptoDate(program, rootFileNames, hostCache.compilationSettings(), function (path) { return hostCache.getVersion(path); }, fileExists, hasInvalidatedResolution, !!host.hasChangedAutomaticTypeDirectiveNames, projectReferences)) { + if (ts.isProgramUptoDate(program, rootFileNames, hostCache.compilationSettings(), function (_path, fileName) { return host.getScriptVersion(fileName); }, fileExists, hasInvalidatedResolution, !!host.hasChangedAutomaticTypeDirectiveNames, projectReferences)) { return; } // IMPORTANT - It is critical from this moment onward that we do not check @@ -134478,7 +136570,7 @@ var ts; return host.getDirectories ? host.getDirectories(path) : []; }, readDirectory: function (path, extensions, exclude, include, depth) { - ts.Debug.assertDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + ts.Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return host.readDirectory(path, extensions, exclude, include, depth); }, onReleaseOldSourceFile: onReleaseOldSourceFile, @@ -134670,9 +136762,10 @@ var ts; return ts.Completions.getCompletionEntryDetails(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host, (formattingOptions && ts.formatting.getFormatContext(formattingOptions)), // TODO: GH#18217 preferences, cancellationToken); } - function getCompletionEntrySymbol(fileName, position, name, source) { + function getCompletionEntrySymbol(fileName, position, name, source, preferences) { + if (preferences === void 0) { preferences = ts.emptyOptions; } synchronizeHostData(); - return ts.Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host); + return ts.Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name: name, source: source }, host, preferences); } function getQuickInfoAtPosition(fileName, position) { synchronizeHostData(); @@ -134763,7 +136856,7 @@ var ts; function findRenameLocations(fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); + var node = ts.getAdjustedRenameLocation(ts.getTouchingPropertyName(sourceFile, position)); if (ts.isIdentifier(node) && (ts.isJsxOpeningElement(node.parent) || ts.isJsxClosingElement(node.parent)) && ts.isIntrinsicJsxName(node.escapedText)) { var _a = node.parent.parent, openingElement = _a.openingElement, closingElement = _a.closingElement; return [openingElement, closingElement].map(function (node) { @@ -134772,17 +136865,17 @@ var ts; }); } else { - return getReferencesWorker(node, position, { findInStrings: findInStrings, findInComments: findInComments, providePrefixAndSuffixTextForRename: providePrefixAndSuffixTextForRename, isForRename: true }, function (entry, originalNode, checker) { return ts.FindAllReferences.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false); }); + return getReferencesWorker(node, position, { findInStrings: findInStrings, findInComments: findInComments, providePrefixAndSuffixTextForRename: providePrefixAndSuffixTextForRename, use: 2 /* Rename */ }, function (entry, originalNode, checker) { return ts.FindAllReferences.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false); }); } } function getReferencesAtPosition(fileName, position) { synchronizeHostData(); - return getReferencesWorker(ts.getTouchingPropertyName(getValidSourceFile(fileName), position), position, {}, ts.FindAllReferences.toReferenceEntry); + return getReferencesWorker(ts.getTouchingPropertyName(getValidSourceFile(fileName), position), position, { use: 1 /* References */ }, ts.FindAllReferences.toReferenceEntry); } function getReferencesWorker(node, position, options, cb) { synchronizeHostData(); // Exclude default library when renaming as commonly user don't want to change that file. - var sourceFiles = options && options.isForRename + var sourceFiles = options && options.use === 2 /* Rename */ ? program.getSourceFiles().filter(function (sourceFile) { return !program.isSourceFileDefaultLibrary(sourceFile); }) : program.getSourceFiles(); return ts.FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, cb); @@ -135283,6 +137376,7 @@ var ts; getEditsForRefactor: getEditsForRefactor, toLineColumnOffset: sourceMapper.toLineColumnOffset, getSourceMapper: function () { return sourceMapper; }, + clearSourceMapperCache: function () { return sourceMapper.clearCache(); }, prepareCallHierarchy: prepareCallHierarchy, provideCallHierarchyIncomingCalls: provideCallHierarchyIncomingCalls, provideCallHierarchyOutgoingCalls: provideCallHierarchyOutgoingCalls @@ -136524,8 +138618,8 @@ var ts; return this.forwardJSONCall("getDocumentHighlights('" + fileName + "', " + position + ")", function () { var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch)); // workaround for VS document highlighting issue - keep only items from the initial file - var normalizedName = ts.normalizeSlashes(fileName).toLowerCase(); - return ts.filter(results, function (r) { return ts.normalizeSlashes(r.fileName).toLowerCase() === normalizedName; }); + var normalizedName = ts.toFileNameLowerCase(ts.normalizeSlashes(fileName)); + return ts.filter(results, function (r) { return ts.toFileNameLowerCase(ts.normalizeSlashes(r.fileName)) === normalizedName; }); }); }; /// COMPLETION LISTS @@ -136821,7 +138915,7 @@ var ts; }()); ts.TypeScriptServicesFactory = TypeScriptServicesFactory; })(ts || (ts = {})); -/* eslint-enable no-in-operator */ +/* eslint-enable no-in-operator */ // We polyfill `globalThis` here so re can reliably patch the global scope // in the contexts we want to in the same way across script and module formats /* eslint-enable no-var */ diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index c4ee140de7483..9722528d7efaa 100644 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ @@ -81,7 +81,7 @@ var ts; (function (ts) { // WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configurePrerelease` too. - ts.versionMajorMinor = "3.8"; + ts.versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ ts.version = ts.versionMajorMinor + ".0-dev"; /** @@ -1378,6 +1378,46 @@ var ts; /** Returns lower case string */ function toLowerCase(x) { return x.toLowerCase(); } ts.toLowerCase = toLowerCase; + // We convert the file names to lower case as key for file name on case insensitive file system + // While doing so we need to handle special characters (eg \u0130) to ensure that we dont convert + // it to lower case, fileName with its lowercase form can exist along side it. + // Handle special characters and make those case sensitive instead + // + // |-#--|-Unicode--|-Char code-|-Desc-------------------------------------------------------------------| + // | 1. | i | 105 | Ascii i | + // | 2. | I | 73 | Ascii I | + // |-------- Special characters ------------------------------------------------------------------------| + // | 3. | \u0130 | 304 | Uppper case I with dot above | + // | 4. | i,\u0307 | 105,775 | i, followed by 775: Lower case of (3rd item) | + // | 5. | I,\u0307 | 73,775 | I, followed by 775: Upper case of (4th item), lower case is (4th item) | + // | 6. | \u0131 | 305 | Lower case i without dot, upper case is I (2nd item) | + // | 7. | \u00DF | 223 | Lower case sharp s | + // + // Because item 3 is special where in its lowercase character has its own + // upper case form we cant convert its case. + // Rest special characters are either already in lower case format or + // they have corresponding upper case character so they dont need special handling + // + // But to avoid having to do string building for most common cases, also ignore + // a-z, 0-9, \u0131, \u00DF, \, /, ., : and space + var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; + /** + * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - \u0130) + * This function is used in places where we want to make file name as a key on these systems + * It is possible on mac to be able to refer to file name with I with dot on top as a fileName with its lower case form + * But on windows we cannot. Windows can have fileName with I with dot on top next to its lower case and they can not each be referred with the lowercase forms + * Technically we would want this function to be platform sepcific as well but + * our api has till now only taken caseSensitive as the only input and just for some characters we dont want to update API and ensure all customers use those api + * We could use upper case and we would still need to deal with the descripencies but + * we want to continue using lower case since in most cases filenames are lowercasewe and wont need any case changes and avoid having to store another string for the key + * So for this function purpose, we go ahead and assume character I with dot on top it as case sensitive since its very unlikely to use lower case form of that special character + */ + function toFileNameLowerCase(x) { + return fileNameLowerCaseRegExp.test(x) ? + x.replace(fileNameLowerCaseRegExp, toLowerCase) : + x; + } + ts.toFileNameLowerCase = toFileNameLowerCase; /** Throws an error because a function is not implemented. */ function notImplemented() { throw new Error("Not implemented"); @@ -1806,7 +1846,7 @@ var ts; return false; } function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toLowerCase; + return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; } ts.createGetCanonicalFileName = createGetCanonicalFileName; function patternText(_a) { @@ -1963,84 +2003,192 @@ var ts; } } } + function padLeft(s, length) { + while (s.length < length) { + s = " " + s; + } + return s; + } + ts.padLeft = padLeft; + function padRight(s, length) { + while (s.length < length) { + s = s + " "; + } + return s; + } + ts.padRight = padRight; })(ts || (ts = {})); /* @internal */ var ts; (function (ts) { var Debug; (function (Debug) { - /* eslint-disable prefer-const */ - Debug.currentAssertionLevel = 0 /* None */; + var currentAssertionLevel = 0 /* None */; + // eslint-disable-next-line prefer-const Debug.isDebugging = false; - /* eslint-enable prefer-const */ + var assertionCache = {}; + function getAssertionLevel() { + return currentAssertionLevel; + } + Debug.getAssertionLevel = getAssertionLevel; + function setAssertionLevel(level) { + var prevAssertionLevel = currentAssertionLevel; + currentAssertionLevel = level; + if (level > prevAssertionLevel) { + // restore assertion functions for the current assertion level (see `shouldAssertFunction`). + for (var _i = 0, _a = ts.getOwnKeys(assertionCache); _i < _a.length; _i++) { + var key = _a[_i]; + var cachedFunc = assertionCache[key]; + if (cachedFunc !== undefined && Debug[key] !== cachedFunc.assertion && level >= cachedFunc.level) { + Debug[key] = cachedFunc; + assertionCache[key] = undefined; + } + } + } + } + Debug.setAssertionLevel = setAssertionLevel; function shouldAssert(level) { - return Debug.currentAssertionLevel >= level; + return currentAssertionLevel >= level; } Debug.shouldAssert = shouldAssert; + /** + * Tests whether an assertion function should be executed. If it shouldn't, it is cached and replaced with `ts.noop`. + * Replaced assertion functions are restored when `Debug.setAssertionLevel` is set to a high enough level. + * @param level The minimum assertion level required. + * @param name The name of the current assertion function. + */ + function shouldAssertFunction(level, name) { + if (!shouldAssert(level)) { + assertionCache[name] = { level: level, assertion: Debug[name] }; + Debug[name] = ts.noop; + return false; + } + return true; + } + function fail(message, stackCrawlMark) { + debugger; + var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); + if (Error.captureStackTrace) { + Error.captureStackTrace(e, stackCrawlMark || fail); + } + throw e; + } + Debug.fail = fail; + function failBadSyntaxKind(node, message, stackCrawlMark) { + return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", stackCrawlMark || failBadSyntaxKind); + } + Debug.failBadSyntaxKind = failBadSyntaxKind; function assert(expression, message, verboseDebugInfo, stackCrawlMark) { if (!expression) { + message = message ? "False expression: " + message : "False expression."; if (verboseDebugInfo) { message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); } - fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert); + fail(message, stackCrawlMark || assert); } } Debug.assert = assert; - function assertEqual(a, b, msg, msg2) { + function assertEqual(a, b, msg, msg2, stackCrawlMark) { if (a !== b) { var message = msg ? msg2 ? msg + " " + msg2 : msg : ""; - fail("Expected " + a + " === " + b + ". " + message); + fail("Expected " + a + " === " + b + ". " + message, stackCrawlMark || assertEqual); } } Debug.assertEqual = assertEqual; - function assertLessThan(a, b, msg) { + function assertLessThan(a, b, msg, stackCrawlMark) { if (a >= b) { - fail("Expected " + a + " < " + b + ". " + (msg || "")); + fail("Expected " + a + " < " + b + ". " + (msg || ""), stackCrawlMark || assertLessThan); } } Debug.assertLessThan = assertLessThan; - function assertLessThanOrEqual(a, b) { + function assertLessThanOrEqual(a, b, stackCrawlMark) { if (a > b) { - fail("Expected " + a + " <= " + b); + fail("Expected " + a + " <= " + b, stackCrawlMark || assertLessThanOrEqual); } } Debug.assertLessThanOrEqual = assertLessThanOrEqual; - function assertGreaterThanOrEqual(a, b) { + function assertGreaterThanOrEqual(a, b, stackCrawlMark) { if (a < b) { - fail("Expected " + a + " >= " + b); + fail("Expected " + a + " >= " + b, stackCrawlMark || assertGreaterThanOrEqual); } } Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual; - function fail(message, stackCrawlMark) { - debugger; - var e = new Error(message ? "Debug Failure. " + message : "Debug Failure."); - if (Error.captureStackTrace) { - Error.captureStackTrace(e, stackCrawlMark || fail); + function assertIsDefined(value, message, stackCrawlMark) { + // eslint-disable-next-line no-null/no-null + if (value === undefined || value === null) { + fail(message, stackCrawlMark || assertIsDefined); } - throw e; } - Debug.fail = fail; - function assertDefined(value, message) { - // eslint-disable-next-line no-null/no-null - if (value === undefined || value === null) - return fail(message); + Debug.assertIsDefined = assertIsDefined; + function checkDefined(value, message, stackCrawlMark) { + assertIsDefined(value, message, stackCrawlMark || checkDefined); return value; } - Debug.assertDefined = assertDefined; - function assertEachDefined(value, message) { + Debug.checkDefined = checkDefined; + /** + * @deprecated Use `checkDefined` to check whether a value is defined inline. Use `assertIsDefined` to check whether + * a value is defined at the statement level. + */ + Debug.assertDefined = checkDefined; + function assertEachIsDefined(value, message, stackCrawlMark) { for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { var v = value_1[_i]; - assertDefined(v, message); + assertIsDefined(v, message, stackCrawlMark || assertEachIsDefined); } + } + Debug.assertEachIsDefined = assertEachIsDefined; + function checkEachDefined(value, message, stackCrawlMark) { + assertEachIsDefined(value, message, stackCrawlMark || checkEachDefined); return value; } - Debug.assertEachDefined = assertEachDefined; + Debug.checkEachDefined = checkEachDefined; + /** + * @deprecated Use `checkEachDefined` to check whether the elements of an array are defined inline. Use `assertEachIsDefined` to check whether + * the elements of an array are defined at the statement level. + */ + Debug.assertEachDefined = checkEachDefined; function assertNever(member, message, stackCrawlMark) { if (message === void 0) { message = "Illegal value:"; } var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member); return fail(message + " " + detail, stackCrawlMark || assertNever); } Debug.assertNever = assertNever; + function assertEachNode(nodes, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) { + assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertEachNode); + } + } + Debug.assertEachNode = assertEachNode; + function assertNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertNode")) { + assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNode); + } + } + Debug.assertNode = assertNode; + function assertNotNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) { + assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNotNode); + } + } + Debug.assertNotNode = assertNotNode; + function assertOptionalNode(node, test, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) { + assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertOptionalNode); + } + } + Debug.assertOptionalNode = assertOptionalNode; + function assertOptionalToken(node, kind, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) { + assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, stackCrawlMark || assertOptionalToken); + } + } + Debug.assertOptionalToken = assertOptionalToken; + function assertMissingNode(node, message, stackCrawlMark) { + if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) { + assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, stackCrawlMark || assertMissingNode); + } + } + Debug.assertMissingNode = assertMissingNode; function getFunctionName(func) { if (typeof func !== "function") { return ""; @@ -2138,28 +2286,6 @@ var ts; return formatEnum(flags, ts.ObjectFlags, /*isFlags*/ true); } Debug.formatObjectFlags = formatObjectFlags; - function failBadSyntaxKind(node, message) { - return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", failBadSyntaxKind); - } - Debug.failBadSyntaxKind = failBadSyntaxKind; - Debug.assertEachNode = shouldAssert(1 /* Normal */) - ? function (nodes, test, message) { return assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertEachNode); } - : ts.noop; - Debug.assertNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertNotNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, Debug.assertNode); } - : ts.noop; - Debug.assertOptionalNode = shouldAssert(1 /* Normal */) - ? function (node, test, message) { return assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, Debug.assertOptionalNode); } - : ts.noop; - Debug.assertOptionalToken = shouldAssert(1 /* Normal */) - ? function (node, kind, message) { return assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, Debug.assertOptionalToken); } - : ts.noop; - Debug.assertMissingNode = shouldAssert(1 /* Normal */) - ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } - : ts.noop; var isDebugInfoEnabled = false; var extendedDebugModule; function extendedDebug() { @@ -2445,7 +2571,7 @@ var ts; if (prerelease === void 0) { prerelease = ""; } if (build === void 0) { build = ""; } if (typeof major === "string") { - var result = ts.Debug.assertDefined(tryParseComponents(major), "Invalid version"); + var result = ts.Debug.checkDefined(tryParseComponents(major), "Invalid version"); (major = result.major, minor = result.minor, patch = result.patch, prerelease = result.prerelease, build = result.build); } ts.Debug.assert(major >= 0, "Invalid argument: major"); @@ -2576,7 +2702,7 @@ var ts; */ var VersionRange = /** @class */ (function () { function VersionRange(spec) { - this._alternatives = spec ? ts.Debug.assertDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; + this._alternatives = spec ? ts.Debug.checkDefined(parseRange(spec), "Invalid range spec.") : ts.emptyArray; } VersionRange.tryParse = function (text) { var sets = parseRange(text); @@ -3116,32 +3242,33 @@ var ts; SyntaxKind[SyntaxKind["JSDocSignature"] = 305] = "JSDocSignature"; SyntaxKind[SyntaxKind["JSDocTag"] = 306] = "JSDocTag"; SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 307] = "JSDocAugmentsTag"; - SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 308] = "JSDocAuthorTag"; - SyntaxKind[SyntaxKind["JSDocClassTag"] = 309] = "JSDocClassTag"; - SyntaxKind[SyntaxKind["JSDocPublicTag"] = 310] = "JSDocPublicTag"; - SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 311] = "JSDocPrivateTag"; - SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 312] = "JSDocProtectedTag"; - SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 313] = "JSDocReadonlyTag"; - SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 314] = "JSDocCallbackTag"; - SyntaxKind[SyntaxKind["JSDocEnumTag"] = 315] = "JSDocEnumTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 316] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 317] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocThisTag"] = 318] = "JSDocThisTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 319] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 320] = "JSDocTemplateTag"; - SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 321] = "JSDocTypedefTag"; - SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 322] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 308] = "JSDocImplementsTag"; + SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 309] = "JSDocAuthorTag"; + SyntaxKind[SyntaxKind["JSDocClassTag"] = 310] = "JSDocClassTag"; + SyntaxKind[SyntaxKind["JSDocPublicTag"] = 311] = "JSDocPublicTag"; + SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 312] = "JSDocPrivateTag"; + SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 313] = "JSDocProtectedTag"; + SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 314] = "JSDocReadonlyTag"; + SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 315] = "JSDocCallbackTag"; + SyntaxKind[SyntaxKind["JSDocEnumTag"] = 316] = "JSDocEnumTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 317] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 318] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocThisTag"] = 319] = "JSDocThisTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 320] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 321] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 322] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 323] = "JSDocPropertyTag"; // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 323] = "SyntaxList"; + SyntaxKind[SyntaxKind["SyntaxList"] = 324] = "SyntaxList"; // Transformation nodes - SyntaxKind[SyntaxKind["NotEmittedStatement"] = 324] = "NotEmittedStatement"; - SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 325] = "PartiallyEmittedExpression"; - SyntaxKind[SyntaxKind["CommaListExpression"] = 326] = "CommaListExpression"; - SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 327] = "MergeDeclarationMarker"; - SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 328] = "EndOfDeclarationMarker"; - SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 329] = "SyntheticReferenceExpression"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 325] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 326] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["CommaListExpression"] = 327] = "CommaListExpression"; + SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 328] = "MergeDeclarationMarker"; + SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 329] = "EndOfDeclarationMarker"; + SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 330] = "SyntheticReferenceExpression"; // Enum value count - SyntaxKind[SyntaxKind["Count"] = 330] = "Count"; + SyntaxKind[SyntaxKind["Count"] = 331] = "Count"; // Markers SyntaxKind[SyntaxKind["FirstAssignment"] = 62] = "FirstAssignment"; SyntaxKind[SyntaxKind["LastAssignment"] = 74] = "LastAssignment"; @@ -3171,9 +3298,9 @@ var ts; SyntaxKind[SyntaxKind["LastStatement"] = 241] = "LastStatement"; SyntaxKind[SyntaxKind["FirstNode"] = 153] = "FirstNode"; SyntaxKind[SyntaxKind["FirstJSDocNode"] = 294] = "FirstJSDocNode"; - SyntaxKind[SyntaxKind["LastJSDocNode"] = 322] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 323] = "LastJSDocNode"; SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 306] = "FirstJSDocTagNode"; - SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 322] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 323] = "LastJSDocTagNode"; /* @internal */ SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 122] = "FirstContextualKeyword"; /* @internal */ SyntaxKind[SyntaxKind["LastContextualKeyword"] = 152] = "LastContextualKeyword"; })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {})); @@ -3306,6 +3433,8 @@ var ts; /* @internal */ TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape"; /* @internal */ + TokenFlags[TokenFlags["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape"; + /* @internal */ TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; /* @internal */ TokenFlags[TokenFlags["NumericLiteralFlags"] = 1008] = "NumericLiteralFlags"; @@ -3323,10 +3452,9 @@ var ts; FlowFlags[FlowFlags["SwitchClause"] = 128] = "SwitchClause"; FlowFlags[FlowFlags["ArrayMutation"] = 256] = "ArrayMutation"; FlowFlags[FlowFlags["Call"] = 512] = "Call"; - FlowFlags[FlowFlags["Referenced"] = 1024] = "Referenced"; - FlowFlags[FlowFlags["Shared"] = 2048] = "Shared"; - FlowFlags[FlowFlags["PreFinally"] = 4096] = "PreFinally"; - FlowFlags[FlowFlags["AfterFinally"] = 8192] = "AfterFinally"; + FlowFlags[FlowFlags["ReduceLabel"] = 1024] = "ReduceLabel"; + FlowFlags[FlowFlags["Referenced"] = 2048] = "Referenced"; + FlowFlags[FlowFlags["Shared"] = 4096] = "Shared"; FlowFlags[FlowFlags["Label"] = 12] = "Label"; FlowFlags[FlowFlags["Condition"] = 96] = "Condition"; })(FlowFlags = ts.FlowFlags || (ts.FlowFlags = {})); @@ -3381,7 +3509,7 @@ var ts; ContextFlags[ContextFlags["None"] = 0] = "None"; ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; - ContextFlags[ContextFlags["BaseConstraint"] = 4] = "BaseConstraint"; + ContextFlags[ContextFlags["Completions"] = 4] = "Completions"; })(ContextFlags = ts.ContextFlags || (ts.ContextFlags = {})); // NOTE: If modifying this enum, must modify `TypeFormatFlags` too! var NodeBuilderFlags; @@ -3403,6 +3531,7 @@ var ts; NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; // Error handling NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; NodeBuilderFlags[NodeBuilderFlags["AllowQualifedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifedNameInPlaceOfIdentifier"; @@ -3440,6 +3569,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; TypeFormatFlags[TypeFormatFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; TypeFormatFlags[TypeFormatFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + TypeFormatFlags[TypeFormatFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; // Error Handling TypeFormatFlags[TypeFormatFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; // TypeFormatFlags exclusive @@ -3451,7 +3581,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 4194304] = "InFirstTypeArgument"; TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 8388608] = "InTypeAlias"; /** @deprecated */ TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 0] = "WriteOwnNameForAnyLike"; - TypeFormatFlags[TypeFormatFlags["NodeBuilderFlagsMask"] = 9469291] = "NodeBuilderFlagsMask"; + TypeFormatFlags[TypeFormatFlags["NodeBuilderFlagsMask"] = 277904747] = "NodeBuilderFlagsMask"; })(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {})); var SymbolFormatFlags; (function (SymbolFormatFlags) { @@ -3745,6 +3875,8 @@ var ts; TypeFlags[TypeFlags["ObjectFlagsType"] = 3899393] = "ObjectFlagsType"; /* @internal */ TypeFlags[TypeFlags["Simplifiable"] = 25165824] = "Simplifiable"; + /* @internal */ + TypeFlags[TypeFlags["Substructure"] = 66584576] = "Substructure"; // 'Narrowable' types are types where narrowing actually narrows. // This *should* be every type other than null, undefined, void, and never TypeFlags[TypeFlags["Narrowable"] = 133970943] = "Narrowable"; @@ -3763,9 +3895,6 @@ var ts; TypeFlags[TypeFlags["IncludesWildcard"] = 4194304] = "IncludesWildcard"; /* @internal */ TypeFlags[TypeFlags["IncludesEmptyObject"] = 8388608] = "IncludesEmptyObject"; - // The following flag is used for different purposes by maybeTypeOfKind - /* @internal */ - TypeFlags[TypeFlags["GenericMappedType"] = 131072] = "GenericMappedType"; })(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {})); var ObjectFlags; (function (ObjectFlags) { @@ -3795,6 +3924,18 @@ var ts; ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 1048576] = "ContainsObjectOrArrayLiteral"; /* @internal */ ObjectFlags[ObjectFlags["NonInferrableType"] = 2097152] = "NonInferrableType"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericObjectTypeComputed"] = 4194304] = "IsGenericObjectTypeComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericIndexTypeComputed"] = 16777216] = "IsGenericIndexTypeComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["IsGenericIndexType"] = 33554432] = "IsGenericIndexType"; + /* @internal */ + ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 67108864] = "CouldContainTypeVariablesComputed"; + /* @internal */ + ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 134217728] = "CouldContainTypeVariables"; ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; /* @internal */ ObjectFlags[ObjectFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; @@ -3970,12 +4111,12 @@ var ts; JsxEmit[JsxEmit["React"] = 2] = "React"; JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative"; })(JsxEmit = ts.JsxEmit || (ts.JsxEmit = {})); - var importsNotUsedAsValues; - (function (importsNotUsedAsValues) { - importsNotUsedAsValues[importsNotUsedAsValues["Remove"] = 0] = "Remove"; - importsNotUsedAsValues[importsNotUsedAsValues["Preserve"] = 1] = "Preserve"; - importsNotUsedAsValues[importsNotUsedAsValues["Error"] = 2] = "Error"; - })(importsNotUsedAsValues = ts.importsNotUsedAsValues || (ts.importsNotUsedAsValues = {})); + var ImportsNotUsedAsValues; + (function (ImportsNotUsedAsValues) { + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Remove"] = 0] = "Remove"; + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Preserve"] = 1] = "Preserve"; + ImportsNotUsedAsValues[ImportsNotUsedAsValues["Error"] = 2] = "Error"; + })(ImportsNotUsedAsValues = ts.ImportsNotUsedAsValues || (ts.ImportsNotUsedAsValues = {})); var NewLineKind; (function (NewLineKind) { NewLineKind[NewLineKind["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed"; @@ -4294,8 +4435,9 @@ var ts; ExternalEmitHelpers[ExternalEmitHelpers["MakeTemplateObject"] = 131072] = "MakeTemplateObject"; ExternalEmitHelpers[ExternalEmitHelpers["ClassPrivateFieldGet"] = 262144] = "ClassPrivateFieldGet"; ExternalEmitHelpers[ExternalEmitHelpers["ClassPrivateFieldSet"] = 524288] = "ClassPrivateFieldSet"; + ExternalEmitHelpers[ExternalEmitHelpers["CreateBinding"] = 1048576] = "CreateBinding"; ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper"; - ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 524288] = "LastEmitHelper"; + ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 1048576] = "LastEmitHelper"; // Helpers included by ES2015 for..of ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes"; // Helpers included by ES2017 for..await..of @@ -4315,6 +4457,7 @@ var ts; EmitHint[EmitHint["MappedTypeParameter"] = 3] = "MappedTypeParameter"; EmitHint[EmitHint["Unspecified"] = 4] = "Unspecified"; EmitHint[EmitHint["EmbeddedStatement"] = 5] = "EmbeddedStatement"; + EmitHint[EmitHint["JsxAttributeValue"] = 6] = "JsxAttributeValue"; })(EmitHint = ts.EmitHint || (ts.EmitHint = {})); /*@internal*/ var BundleFileSectionKind; @@ -4777,7 +4920,7 @@ var ts; callbacksCache.add(path, callback); return { close: function () { - var watcher = ts.Debug.assertDefined(cache.get(path)); + var watcher = ts.Debug.checkDefined(cache.get(path)); callbacksCache.remove(path, callback); watcher.refCount--; if (watcher.refCount) @@ -4875,7 +5018,7 @@ var ts; return { dirName: dirName, close: function () { - var directoryWatcher = ts.Debug.assertDefined(cache.get(dirPath)); + var directoryWatcher = ts.Debug.checkDefined(cache.get(dirPath)); if (callbackToAdd) callbackCache.remove(dirPath, callbackToAdd); directoryWatcher.refCount--; @@ -5062,7 +5205,7 @@ var ts; }; function watchFile(fileName, callback, pollingInterval, options) { options = updateOptionsForWatchFile(options, useNonPollingWatchers); - var watchFileKind = ts.Debug.assertDefined(options.watchFile); + var watchFileKind = ts.Debug.checkDefined(options.watchFile); switch (watchFileKind) { case ts.WatchFileKind.FixedPollingInterval: return pollingWatchFile(fileName, callback, PollingInterval.Low, /*options*/ undefined); @@ -5142,7 +5285,7 @@ var ts; function nonRecursiveWatchDirectory(directoryName, callback, recursive, options) { ts.Debug.assert(!recursive); options = updateOptionsForWatchDirectory(options); - var watchDirectoryKind = ts.Debug.assertDefined(options.watchDirectory); + var watchDirectoryKind = ts.Debug.checkDefined(options.watchDirectory); switch (watchDirectoryKind) { case ts.WatchDirectoryKind.FixedPollingInterval: return pollingWatchFile(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium, @@ -5748,48 +5891,8 @@ var ts; return hash.digest("hex"); } } - function getChakraSystem() { - var realpath = ChakraHost.realpath && (function (path) { return ChakraHost.realpath(path); }); - return { - newLine: ChakraHost.newLine || "\r\n", - args: ChakraHost.args, - useCaseSensitiveFileNames: !!ChakraHost.useCaseSensitiveFileNames, - write: ChakraHost.echo, - readFile: function (path, _encoding) { - // encoding is automatically handled by the implementation in ChakraHost - return ChakraHost.readFile(path); - }, - writeFile: function (path, data, writeByteOrderMark) { - // If a BOM is required, emit one - if (writeByteOrderMark) { - data = byteOrderMarkIndicator + data; - } - ChakraHost.writeFile(path, data); - }, - resolvePath: ChakraHost.resolvePath, - fileExists: ChakraHost.fileExists, - deleteFile: ChakraHost.deleteFile, - getModifiedTime: ChakraHost.getModifiedTime, - setModifiedTime: ChakraHost.setModifiedTime, - directoryExists: ChakraHost.directoryExists, - createDirectory: ChakraHost.createDirectory, - getExecutingFilePath: function () { return ChakraHost.executingFile; }, - getCurrentDirectory: function () { return ChakraHost.currentDirectory; }, - getDirectories: ChakraHost.getDirectories, - getEnvironmentVariable: ChakraHost.getEnvironmentVariable || (function () { return ""; }), - readDirectory: function (path, extensions, excludes, includes, _depth) { - var pattern = ts.getFileMatcherPatterns(path, excludes, includes, !!ChakraHost.useCaseSensitiveFileNames, ChakraHost.currentDirectory); - return ChakraHost.readDirectory(path, extensions, pattern.basePaths, pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern); - }, - exit: ChakraHost.quit, - realpath: realpath - }; - } var sys; - if (typeof ChakraHost !== "undefined") { - sys = getChakraSystem(); - } - else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { + if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { // process and process.nextTick checks if current environment is node-like // process.browser check excludes webpack and browserify sys = getNodeSystem(); @@ -5802,9 +5905,9 @@ var ts; })(); if (ts.sys && ts.sys.getEnvironmentVariable) { setCustomPollingValues(ts.sys); - ts.Debug.currentAssertionLevel = /^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) + ts.Debug.setAssertionLevel(/^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ - : 0 /* None */; + : 0 /* None */); } if (ts.sys && ts.sys.debugMode) { ts.Debug.isDebugging = true; @@ -6750,8 +6853,9 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), - Type_only_0_must_reference_a_type_but_1_is_a_value: diag(1361, ts.DiagnosticCategory.Error, "Type_only_0_must_reference_a_type_but_1_is_a_value_1361", "Type-only {0} must reference a type, but '{1}' is a value."), - Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported: diag(1362, ts.DiagnosticCategory.Error, "Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported_1362", "Enum '{0}' cannot be used as a value because only its type has been imported."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), + _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), + _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, ts.DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), Convert_to_type_only_export: diag(1364, ts.DiagnosticCategory.Message, "Convert_to_type_only_export_1364", "Convert to type-only export"), Convert_all_re_exported_types_to_type_only_exports: diag(1365, ts.DiagnosticCategory.Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), @@ -6761,11 +6865,16 @@ var ts; Did_you_mean_0: diag(1369, ts.DiagnosticCategory.Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"), Only_ECMAScript_imports_may_use_import_type: diag(1370, ts.DiagnosticCategory.Error, "Only_ECMAScript_imports_may_use_import_type_1370", "Only ECMAScript imports may use 'import type'."), This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error: diag(1371, ts.DiagnosticCategory.Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371", "This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'."), - This_import_may_be_converted_to_a_type_only_import: diag(1372, ts.DiagnosticCategory.Suggestion, "This_import_may_be_converted_to_a_type_only_import_1372", "This import may be converted to a type-only import."), Convert_to_type_only_import: diag(1373, ts.DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"), Convert_all_imports_not_used_as_a_value_to_type_only_imports: diag(1374, ts.DiagnosticCategory.Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"), await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1376, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1376", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + _0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."), + _0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."), + Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."), + An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), + An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), + Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), + Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), @@ -6926,6 +7035,8 @@ var ts; Type_alias_0_circularly_references_itself: diag(2456, ts.DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), Type_alias_name_cannot_be_0: diag(2457, ts.DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, ts.DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Module_0_declares_1_locally_but_it_is_not_exported: diag(2459, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), + Module_0_declares_1_locally_but_it_is_exported_as_2: diag(2460, ts.DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), Type_0_is_not_an_array_type: diag(2461, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, ts.DiagnosticCategory.Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, ts.DiagnosticCategory.Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), @@ -7149,7 +7260,7 @@ var ts; Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, ts.DiagnosticCategory.Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, ts.DiagnosticCategory.Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension"), Property_0_was_also_declared_here: diag(2733, ts.DiagnosticCategory.Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), - It_is_highly_likely_that_you_are_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "It_is_highly_likely_that_you_are_missing_a_semicolon_2734", "It is highly likely that you are missing a semicolon."), + Are_you_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, ts.DiagnosticCategory.Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), Operator_0_cannot_be_applied_to_type_1: diag(2736, ts.DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: diag(2737, ts.DiagnosticCategory.Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), @@ -7198,6 +7309,7 @@ var ts; The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: diag(2780, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: diag(2781, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), _0_needs_an_explicit_type_annotation: diag(2782, ts.DiagnosticCategory.Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), + _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: diag(2783, ts.DiagnosticCategory.Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), @@ -7385,7 +7497,7 @@ var ts; File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, ts.DiagnosticCategory.Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, ts.DiagnosticCategory.Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), NEWLINE: diag(6061, ts.DiagnosticCategory.Message, "NEWLINE_6061", "NEWLINE"), - Option_0_can_only_be_specified_in_tsconfig_json_file: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_6064", "Option '{0}' can only be specified in 'tsconfig.json' file."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), Enables_experimental_support_for_ES7_decorators: diag(6065, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), Enables_experimental_support_for_ES7_async_functions: diag(6068, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_async_functions_6068", "Enables experimental support for ES7 async functions."), @@ -7546,6 +7658,8 @@ var ts; Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling: diag(6226, ts.DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'."), Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority: diag(6227, ts.DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'."), Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6228, ts.DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228", "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively."), + Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, ts.DiagnosticCategory.Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), Projects_to_reference: diag(6300, ts.DiagnosticCategory.Message, "Projects_to_reference_6300", "Projects to reference"), Enable_project_compilation: diag(6302, ts.DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"), Composite_projects_may_not_disable_declaration_emit: diag(6304, ts.DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), @@ -7742,6 +7856,7 @@ var ts; Import_default_0_from_module_1: diag(90032, ts.DiagnosticCategory.Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""), Add_default_import_0_to_existing_import_declaration_from_1: diag(90033, ts.DiagnosticCategory.Message, "Add_default_import_0_to_existing_import_declaration_from_1_90033", "Add default import '{0}' to existing import declaration from \"{1}\""), Add_parameter_name: diag(90034, ts.DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"), + Declare_a_private_field_named_0: diag(90053, ts.DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), Convert_function_to_an_ES2015_class: diag(95001, ts.DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), Convert_function_0_to_class: diag(95002, ts.DiagnosticCategory.Message, "Convert_function_0_to_class_95002", "Convert function '{0}' to class"), Extract_to_0_in_1: diag(95004, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), @@ -7837,6 +7952,8 @@ var ts; Add_export_to_make_this_file_into_a_module: diag(95097, ts.DiagnosticCategory.Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), Set_the_target_option_in_your_configuration_file_to_0: diag(95098, ts.DiagnosticCategory.Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), Set_the_module_option_in_your_configuration_file_to_0: diag(95099, ts.DiagnosticCategory.Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), + Convert_invalid_character_to_its_html_entity_code: diag(95100, ts.DiagnosticCategory.Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), + Wrap_invalid_character_in_an_expression_container: diag(95101, ts.DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95101", "Wrap invalid character in an expression container"), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), @@ -8201,6 +8318,12 @@ var ts; function isDigit(ch) { return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; } + function isHexDigit(ch) { + return isDigit(ch) || ch >= 65 /* A */ && ch <= 70 /* F */ || ch >= 97 /* a */ && ch <= 102 /* f */; + } + function isCodePoint(code) { + return code <= 0x10FFFF; + } /* @internal */ function isOctalDigit(ch) { return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; @@ -8588,6 +8711,7 @@ var ts; reScanGreaterToken: reScanGreaterToken, reScanSlashToken: reScanSlashToken, reScanTemplateToken: reScanTemplateToken, + reScanTemplateHeadOrNoSubstitutionTemplate: reScanTemplateHeadOrNoSubstitutionTemplate, scanJsxIdentifier: scanJsxIdentifier, scanJsxAttributeValue: scanJsxAttributeValue, reScanJsxAttributeValue: reScanJsxAttributeValue, @@ -8836,7 +8960,7 @@ var ts; * Sets the current 'tokenValue' and returns a NoSubstitutionTemplateLiteral or * a literal component of a TemplateExpression. */ - function scanTemplateAndSetTokenValue() { + function scanTemplateAndSetTokenValue(isTaggedTemplate) { var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; pos++; var start = pos; @@ -8868,7 +8992,7 @@ var ts; // Escape character if (currChar === 92 /* backslash */) { contents += text.substring(start, pos); - contents += scanEscapeSequence(); + contents += scanEscapeSequence(isTaggedTemplate); start = pos; continue; } @@ -8890,7 +9014,8 @@ var ts; tokenValue = contents; return resultingToken; } - function scanEscapeSequence() { + function scanEscapeSequence(isTaggedTemplate) { + var start = pos; pos++; if (pos >= end) { error(ts.Diagnostics.Unexpected_end_of_text); @@ -8900,6 +9025,12 @@ var ts; pos++; switch (ch) { case 48 /* _0 */: + // '\01' + if (isTaggedTemplate && pos < end && isDigit(text.charCodeAt(pos))) { + pos++; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } return "\0"; case 98 /* b */: return "\b"; @@ -8918,16 +9049,55 @@ var ts; case 34 /* doubleQuote */: return "\""; case 117 /* u */: + if (isTaggedTemplate) { + // '\u' or '\u0' or '\u00' or '\u000' + for (var escapePos = pos; escapePos < pos + 4; escapePos++) { + if (escapePos < end && !isHexDigit(text.charCodeAt(escapePos)) && text.charCodeAt(escapePos) !== 123 /* openBrace */) { + pos = escapePos; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + } + } // '\u{DDDDDDDD}' if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) { - tokenFlags |= 8 /* ExtendedUnicodeEscape */; pos++; + // '\u{' + if (isTaggedTemplate && !isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + if (isTaggedTemplate) { + var savePos = pos; + var escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false); + var escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + // '\u{Not Code Point' or '\u{CodePoint' + if (!isCodePoint(escapedValue) || text.charCodeAt(pos) !== 125 /* closeBrace */) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + else { + pos = savePos; + } + } + tokenFlags |= 8 /* ExtendedUnicodeEscape */; return scanExtendedUnicodeEscape(); } tokenFlags |= 1024 /* UnicodeEscape */; // '\uDDDD' return scanHexadecimalEscape(/*numDigits*/ 4); case 120 /* x */: + if (isTaggedTemplate) { + if (!isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + else if (!isHexDigit(text.charCodeAt(pos + 1))) { + pos++; + tokenFlags |= 2048 /* ContainsInvalidEscape */; + return text.substring(start, pos); + } + } // '\xDD' return scanHexadecimalEscape(/*numDigits*/ 2); // when encountering a LineContinuation (i.e. a backslash and a line terminator sequence), @@ -9201,7 +9371,7 @@ var ts; tokenValue = scanString(); return token = 10 /* StringLiteral */; case 96 /* backtick */: - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ false); case 37 /* percent */: if (text.charCodeAt(pos + 1) === 61 /* equals */) { return pos += 2, token = 68 /* PercentEqualsToken */; @@ -9531,11 +9701,12 @@ var ts; if (ch === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } - return token = 76 /* PrivateIdentifier */; } - error(ts.Diagnostics.Invalid_character); - // no `pos++` because already advanced past the '#' - return token = 0 /* Unknown */; + else { + tokenValue = "#"; + error(ts.Diagnostics.Invalid_character); + } + return token = 76 /* PrivateIdentifier */; default: if (isIdentifierStart(ch, languageVersion)) { pos += charSize(ch); @@ -9637,10 +9808,14 @@ var ts; /** * Unconditionally back up and scan a template expression portion. */ - function reScanTemplateToken() { + function reScanTemplateToken(isTaggedTemplate) { ts.Debug.assert(token === 19 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + pos = tokenPos; + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ true); } function reScanJsxToken() { pos = tokenPos = startPos; @@ -9678,9 +9853,15 @@ var ts; } // First non-whitespace character on this line. var firstNonWhitespace = 0; + var lastNonWhitespace = -1; // These initial values are special because the first line is: // firstNonWhitespace = 0 to indicate that we want leading whitespace, while (pos < end) { + // We want to keep track of the last non-whitespace (but including + // newlines character for hitting the end of the JSX Text region) + if (!isWhiteSpaceSingleLine(char)) { + lastNonWhitespace = pos; + } char = text.charCodeAt(pos); if (char === 123 /* openBrace */) { break; @@ -9692,6 +9873,14 @@ var ts; } break; } + if (char === 62 /* greaterThan */) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); + } + if (char === 125 /* closeBrace */) { + error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); + } + if (lastNonWhitespace > 0) + lastNonWhitespace++; // FirstNonWhitespace is 0, then we only see whitespaces so far. If we see a linebreak, we want to ignore that whitespaces. // i.e (- : whitespace) //
---- @@ -9706,7 +9895,8 @@ var ts; } pos++; } - tokenValue = text.substring(startPos, pos); + var endPosition = lastNonWhitespace === -1 ? pos : lastNonWhitespace; + tokenValue = text.substring(startPos, endPosition); return firstNonWhitespace === -1 ? 12 /* JsxTextAllWhiteSpaces */ : 11 /* JsxText */; } // Scans a JSX identifier; these differ from normal identifiers in that @@ -10437,8 +10627,8 @@ var ts; switch (declaration.kind) { case 75 /* Identifier */: return declaration; - case 322 /* JSDocPropertyTag */: - case 316 /* JSDocParameterTag */: { + case 323 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: { var name = declaration.name; if (name.kind === 153 /* QualifiedName */) { return name.right; @@ -10462,9 +10652,9 @@ var ts; return undefined; } } - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 315 /* JSDocEnumTag */: + case 316 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); case 259 /* ExportAssignment */: { var expression = declaration.expression; @@ -10568,6 +10758,11 @@ var ts; return getFirstJSDocTag(node, isJSDocAugmentsTag); } ts.getJSDocAugmentsTag = getJSDocAugmentsTag; + /** Gets the JSDoc implements tags for the node if present */ + function getJSDocImplementsTags(node) { + return getAllJSDocTags(node, isJSDocImplementsTag); + } + ts.getJSDocImplementsTags = getJSDocImplementsTags; /** Gets the JSDoc class tag for the node if present */ function getJSDocClassTag(node) { return getFirstJSDocTag(node, isJSDocClassTag); @@ -10682,7 +10877,12 @@ var ts; function getFirstJSDocTag(node, predicate) { return ts.find(getJSDocTags(node), predicate); } - /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + /** Gets all JSDoc tags that match a specified predicate */ + function getAllJSDocTags(node, predicate) { + return getJSDocTags(node).filter(predicate); + } + ts.getAllJSDocTags = getAllJSDocTags; + /** Gets all JSDoc tags of a specified kind */ function getAllJSDocTagsOfKind(node, kind) { return getJSDocTags(node).filter(function (doc) { return doc.kind === kind; }); } @@ -11028,7 +11228,7 @@ var ts; } ts.isParenthesizedExpression = isParenthesizedExpression; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 325 /* PartiallyEmittedExpression */) { + while (node.kind === 326 /* PartiallyEmittedExpression */) { node = node.expression; } return node; @@ -11452,67 +11652,71 @@ var ts; } ts.isJSDoc = isJSDoc; function isJSDocAuthorTag(node) { - return node.kind === 308 /* JSDocAuthorTag */; + return node.kind === 309 /* JSDocAuthorTag */; } ts.isJSDocAuthorTag = isJSDocAuthorTag; function isJSDocAugmentsTag(node) { return node.kind === 307 /* JSDocAugmentsTag */; } ts.isJSDocAugmentsTag = isJSDocAugmentsTag; + function isJSDocImplementsTag(node) { + return node.kind === 308 /* JSDocImplementsTag */; + } + ts.isJSDocImplementsTag = isJSDocImplementsTag; function isJSDocClassTag(node) { - return node.kind === 309 /* JSDocClassTag */; + return node.kind === 310 /* JSDocClassTag */; } ts.isJSDocClassTag = isJSDocClassTag; function isJSDocPublicTag(node) { - return node.kind === 310 /* JSDocPublicTag */; + return node.kind === 311 /* JSDocPublicTag */; } ts.isJSDocPublicTag = isJSDocPublicTag; function isJSDocPrivateTag(node) { - return node.kind === 311 /* JSDocPrivateTag */; + return node.kind === 312 /* JSDocPrivateTag */; } ts.isJSDocPrivateTag = isJSDocPrivateTag; function isJSDocProtectedTag(node) { - return node.kind === 312 /* JSDocProtectedTag */; + return node.kind === 313 /* JSDocProtectedTag */; } ts.isJSDocProtectedTag = isJSDocProtectedTag; function isJSDocReadonlyTag(node) { - return node.kind === 313 /* JSDocReadonlyTag */; + return node.kind === 314 /* JSDocReadonlyTag */; } ts.isJSDocReadonlyTag = isJSDocReadonlyTag; function isJSDocEnumTag(node) { - return node.kind === 315 /* JSDocEnumTag */; + return node.kind === 316 /* JSDocEnumTag */; } ts.isJSDocEnumTag = isJSDocEnumTag; function isJSDocThisTag(node) { - return node.kind === 318 /* JSDocThisTag */; + return node.kind === 319 /* JSDocThisTag */; } ts.isJSDocThisTag = isJSDocThisTag; function isJSDocParameterTag(node) { - return node.kind === 316 /* JSDocParameterTag */; + return node.kind === 317 /* JSDocParameterTag */; } ts.isJSDocParameterTag = isJSDocParameterTag; function isJSDocReturnTag(node) { - return node.kind === 317 /* JSDocReturnTag */; + return node.kind === 318 /* JSDocReturnTag */; } ts.isJSDocReturnTag = isJSDocReturnTag; function isJSDocTypeTag(node) { - return node.kind === 319 /* JSDocTypeTag */; + return node.kind === 320 /* JSDocTypeTag */; } ts.isJSDocTypeTag = isJSDocTypeTag; function isJSDocTemplateTag(node) { - return node.kind === 320 /* JSDocTemplateTag */; + return node.kind === 321 /* JSDocTemplateTag */; } ts.isJSDocTemplateTag = isJSDocTemplateTag; function isJSDocTypedefTag(node) { - return node.kind === 321 /* JSDocTypedefTag */; + return node.kind === 322 /* JSDocTypedefTag */; } ts.isJSDocTypedefTag = isJSDocTypedefTag; function isJSDocPropertyTag(node) { - return node.kind === 322 /* JSDocPropertyTag */; + return node.kind === 323 /* JSDocPropertyTag */; } ts.isJSDocPropertyTag = isJSDocPropertyTag; function isJSDocPropertyLikeTag(node) { - return node.kind === 322 /* JSDocPropertyTag */ || node.kind === 316 /* JSDocParameterTag */; + return node.kind === 323 /* JSDocPropertyTag */ || node.kind === 317 /* JSDocParameterTag */; } ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag; function isJSDocTypeLiteral(node) { @@ -11520,7 +11724,7 @@ var ts; } ts.isJSDocTypeLiteral = isJSDocTypeLiteral; function isJSDocCallbackTag(node) { - return node.kind === 314 /* JSDocCallbackTag */; + return node.kind === 315 /* JSDocCallbackTag */; } ts.isJSDocCallbackTag = isJSDocCallbackTag; function isJSDocSignature(node) { @@ -11535,7 +11739,7 @@ var ts; // they may be used with transformations. /* @internal */ function isSyntaxList(n) { - return n.kind === 323 /* SyntaxList */; + return n.kind === 324 /* SyntaxList */; } ts.isSyntaxList = isSyntaxList; /* @internal */ @@ -11593,21 +11797,20 @@ var ts; return isImportSpecifier(node) || isExportSpecifier(node); } ts.isImportOrExportSpecifier = isImportOrExportSpecifier; - function isTypeOnlyImportOrExportName(node) { - if (node.kind !== 75 /* Identifier */) { - return false; - } - switch (node.parent.kind) { + function isTypeOnlyImportOrExportDeclaration(node) { + switch (node.kind) { case 258 /* ImportSpecifier */: case 263 /* ExportSpecifier */: - return node.parent.parent.parent.isTypeOnly; - case 255 /* ImportClause */: + return node.parent.parent.isTypeOnly; + case 256 /* NamespaceImport */: return node.parent.isTypeOnly; + case 255 /* ImportClause */: + return node.isTypeOnly; default: return false; } } - ts.isTypeOnlyImportOrExportName = isTypeOnlyImportOrExportName; + ts.isTypeOnlyImportOrExportDeclaration = isTypeOnlyImportOrExportDeclaration; function isStringTextContainingNode(node) { return node.kind === 10 /* StringLiteral */ || isTemplateLiteralKind(node.kind); } @@ -12008,8 +12211,8 @@ var ts; case 213 /* SpreadElement */: case 217 /* AsExpression */: case 215 /* OmittedExpression */: - case 326 /* CommaListExpression */: - case 325 /* PartiallyEmittedExpression */: + case 327 /* CommaListExpression */: + case 326 /* PartiallyEmittedExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -12023,17 +12226,17 @@ var ts; ts.isAssertionExpression = isAssertionExpression; /* @internal */ function isPartiallyEmittedExpression(node) { - return node.kind === 325 /* PartiallyEmittedExpression */; + return node.kind === 326 /* PartiallyEmittedExpression */; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; /* @internal */ function isNotEmittedStatement(node) { - return node.kind === 324 /* NotEmittedStatement */; + return node.kind === 325 /* NotEmittedStatement */; } ts.isNotEmittedStatement = isNotEmittedStatement; /* @internal */ function isSyntheticReference(node) { - return node.kind === 329 /* SyntheticReferenceExpression */; + return node.kind === 330 /* SyntheticReferenceExpression */; } ts.isSyntheticReference = isSyntheticReference; /* @internal */ @@ -12166,9 +12369,9 @@ var ts; || kind === 247 /* TypeAliasDeclaration */ || kind === 155 /* TypeParameter */ || kind === 242 /* VariableDeclaration */ - || kind === 321 /* JSDocTypedefTag */ - || kind === 314 /* JSDocCallbackTag */ - || kind === 322 /* JSDocPropertyTag */; + || kind === 322 /* JSDocTypedefTag */ + || kind === 315 /* JSDocCallbackTag */ + || kind === 323 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { return kind === 244 /* FunctionDeclaration */ @@ -12203,14 +12406,14 @@ var ts; || kind === 225 /* VariableStatement */ || kind === 229 /* WhileStatement */ || kind === 236 /* WithStatement */ - || kind === 324 /* NotEmittedStatement */ - || kind === 328 /* EndOfDeclarationMarker */ - || kind === 327 /* MergeDeclarationMarker */; + || kind === 325 /* NotEmittedStatement */ + || kind === 329 /* EndOfDeclarationMarker */ + || kind === 328 /* MergeDeclarationMarker */; } /* @internal */ function isDeclaration(node) { if (node.kind === 155 /* TypeParameter */) { - return (node.parent && node.parent.kind !== 320 /* JSDocTemplateTag */) || ts.isInJSFile(node); + return (node.parent && node.parent.kind !== 321 /* JSDocTemplateTag */) || ts.isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -12305,18 +12508,18 @@ var ts; /** True if node is of some JSDoc syntax kind. */ /* @internal */ function isJSDocNode(node) { - return node.kind >= 294 /* FirstJSDocNode */ && node.kind <= 322 /* LastJSDocNode */; + return node.kind >= 294 /* FirstJSDocNode */ && node.kind <= 323 /* LastJSDocNode */; } ts.isJSDocNode = isJSDocNode; /** True if node is of a kind that may contain comment text. */ function isJSDocCommentContainingNode(node) { - return node.kind === 303 /* JSDocComment */ || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 303 /* JSDocComment */ || node.kind === 302 /* JSDocNamepathType */ || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode; // TODO: determine what this does before making it public. /* @internal */ function isJSDocTag(node) { - return node.kind >= 306 /* FirstJSDocTagNode */ && node.kind <= 322 /* LastJSDocTagNode */; + return node.kind >= 306 /* FirstJSDocTagNode */ && node.kind <= 323 /* LastJSDocTagNode */; } ts.isJSDocTag = isJSDocTag; function isSetAccessor(node) { @@ -12348,9 +12551,19 @@ var ts; } ts.hasInitializer = hasInitializer; /** True if has initializer node attached to it. */ - /* @internal */ function hasOnlyExpressionInitializer(node) { - return hasInitializer(node) && !isForStatement(node) && !isForInStatement(node) && !isForOfStatement(node) && !isJsxAttribute(node); + switch (node.kind) { + case 242 /* VariableDeclaration */: + case 156 /* Parameter */: + case 191 /* BindingElement */: + case 158 /* PropertySignature */: + case 159 /* PropertyDeclaration */: + case 281 /* PropertyAssignment */: + case 284 /* EnumMember */: + return true; + default: + return false; + } } ts.hasOnlyExpressionInitializer = hasOnlyExpressionInitializer; function isObjectLiteralElement(node) { @@ -12438,14 +12651,6 @@ var ts; return (symbol.flags & 33554432 /* Transient */) !== 0; } ts.isTransientSymbol = isTransientSymbol; - function isTypeOnlyAlias(symbol) { - return isTransientSymbol(symbol) && !!symbol.immediateTarget; - } - ts.isTypeOnlyAlias = isTypeOnlyAlias; - function isTypeOnlyEnumAlias(symbol) { - return isTypeOnlyAlias(symbol) && !!(symbol.immediateTarget.flags & 384 /* Enum */); - } - ts.isTypeOnlyEnumAlias = isTypeOnlyEnumAlias; var stringWriter = createSingleLineStringWriter(); function createSingleLineStringWriter() { var str = ""; @@ -12841,7 +13046,7 @@ var ts; // the syntax list itself considers them as normal trivia. Therefore if we simply skip // trivia for the list, we may have skipped the JSDocComment as well. So we should process its // first child to determine the actual position of its first token. - if (node.kind === 323 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 324 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); @@ -12860,7 +13065,7 @@ var ts; } ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; function isJSDocTypeExpressionOrChild(node) { - return node.kind === 294 /* JSDocTypeExpression */ || (node.parent && isJSDocTypeExpressionOrChild(node.parent)); + return !!findAncestor(node, ts.isJSDocTypeExpression); } function getTextOfNodeFromSourceText(sourceText, node, includeTrivia) { if (includeTrivia === void 0) { includeTrivia = false; } @@ -12899,30 +13104,35 @@ var ts; return emitNode && emitNode.flags || 0; } ts.getEmitFlags = getEmitFlags; - function getLiteralText(node, sourceFile, neverAsciiEscape) { + function getLiteralText(node, sourceFile, neverAsciiEscape, jsxAttributeEscape) { // If we don't need to downlevel and we can reach the original source text using // the node's parent reference, then simply get the text as it was originally written. if (!nodeIsSynthesized(node) && node.parent && !((ts.isNumericLiteral(node) && node.numericLiteralFlags & 512 /* ContainsSeparator */) || ts.isBigIntLiteral(node))) { return getSourceTextOfNodeFromSourceFile(sourceFile, node); } - // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text - // had to include a backslash: `not \${a} substitution`. - var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : escapeNonAsciiString; // If we can't reach the original source text, use the canonical form if it's a number, // or a (possibly escaped) quoted form of the original text if it's string-like. switch (node.kind) { - case 10 /* StringLiteral */: + case 10 /* StringLiteral */: { + var escapeText = jsxAttributeEscape ? escapeJsxAttributeString : + neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : + escapeNonAsciiString; if (node.singleQuote) { return "'" + escapeText(node.text, 39 /* singleQuote */) + "'"; } else { return '"' + escapeText(node.text, 34 /* doubleQuote */) + '"'; } + } case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: - case 17 /* TemplateTail */: + case 17 /* TemplateTail */: { + // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text + // had to include a backslash: `not \${a} substitution`. + var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : + escapeNonAsciiString; var rawText = node.rawText || escapeTemplateSubstitution(escapeText(node.text, 96 /* backtick */)); switch (node.kind) { case 14 /* NoSubstitutionTemplateLiteral */: @@ -12935,6 +13145,7 @@ var ts; return "}" + rawText + "`"; } break; + } case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 13 /* RegularExpressionLiteral */: @@ -13093,8 +13304,8 @@ var ts; ts.isBlockScope = isBlockScope; function isDeclarationWithTypeParameters(node) { switch (node.kind) { - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: case 305 /* JSDocSignature */: return true; default: @@ -13116,7 +13327,7 @@ var ts; case 214 /* ClassExpression */: case 246 /* InterfaceDeclaration */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: case 244 /* FunctionDeclaration */: case 161 /* MethodDeclaration */: case 162 /* Constructor */: @@ -13199,12 +13410,15 @@ var ts; ts.getTextOfPropertyName = getTextOfPropertyName; function entityNameToString(name) { switch (name.kind) { + case 104 /* ThisKeyword */: + return "this"; + case 76 /* PrivateIdentifier */: case 75 /* Identifier */: return getFullWidth(name) === 0 ? ts.idText(name) : getTextOfNode(name); case 153 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); case 194 /* PropertyAccessExpression */: - if (ts.isIdentifier(name.name)) { + if (ts.isIdentifier(name.name) || ts.isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { @@ -13454,7 +13668,7 @@ var ts; return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); case 155 /* TypeParameter */: return node === parent.constraint; - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return node === parent.constraint; case 159 /* PropertyDeclaration */: case 158 /* PropertySignature */: @@ -14073,6 +14287,13 @@ var ts; } } ts.isInExpressionContext = isInExpressionContext; + function isPartOfTypeQuery(node) { + while (node.kind === 153 /* QualifiedName */ || node.kind === 75 /* Identifier */) { + node = node.parent; + } + return node.kind === 172 /* TypeQuery */; + } + ts.isPartOfTypeQuery = isPartOfTypeQuery; function isExternalModuleImportEqualsDeclaration(node) { return node.kind === 253 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 265 /* ExternalModuleReference */; } @@ -14558,6 +14779,21 @@ var ts; return node.kind === 254 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } ts.isDefaultImport = isDefaultImport; + function forEachImportClauseDeclaration(node, action) { + if (node.name) { + var result = action(node); + if (result) + return result; + } + if (node.namedBindings) { + var result = ts.isNamespaceImport(node.namedBindings) + ? action(node.namedBindings) + : ts.forEach(node.namedBindings.elements, action); + if (result) + return result; + } + } + ts.forEachImportClauseDeclaration = forEachImportClauseDeclaration; function hasQuestionToken(node) { if (node) { switch (node.kind) { @@ -14581,7 +14817,7 @@ var ts; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function isJSDocTypeAlias(node) { - return node.kind === 321 /* JSDocTypedefTag */ || node.kind === 314 /* JSDocCallbackTag */ || node.kind === 315 /* JSDocEnumTag */; + return node.kind === 322 /* JSDocTypedefTag */ || node.kind === 315 /* JSDocCallbackTag */ || node.kind === 316 /* JSDocEnumTag */; } ts.isJSDocTypeAlias = isJSDocTypeAlias; function isTypeAlias(node) { @@ -14710,7 +14946,7 @@ var ts; } ts.getHostSignatureFromJSDocHost = getHostSignatureFromJSDocHost; function getJSDocHost(node) { - return ts.Debug.assertDefined(findAncestor(node.parent, ts.isJSDoc)).parent; + return ts.Debug.checkDefined(findAncestor(node.parent, ts.isJSDoc)).parent; } ts.getJSDocHost = getJSDocHost; function getTypeParameterFromJsDoc(node) { @@ -14972,9 +15208,27 @@ var ts; node.kind === 281 /* PropertyAssignment */ && isAliasableExpression(node.initializer); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; + function getAliasDeclarationFromName(node) { + switch (node.parent.kind) { + case 255 /* ImportClause */: + case 258 /* ImportSpecifier */: + case 256 /* NamespaceImport */: + case 263 /* ExportSpecifier */: + case 259 /* ExportAssignment */: + case 253 /* ImportEqualsDeclaration */: + return node.parent; + case 153 /* QualifiedName */: + do { + node = node.parent; + } while (node.parent.kind === 153 /* QualifiedName */); + return getAliasDeclarationFromName(node); + } + } + ts.getAliasDeclarationFromName = getAliasDeclarationFromName; function isAliasableExpression(e) { return isEntityNameExpression(e) || ts.isClassExpression(e); } + ts.isAliasableExpression = isAliasableExpression; function exportAssignmentIsAlias(node) { var e = getExportAssignmentExpression(node); return isAliasableExpression(e); @@ -15006,15 +15260,20 @@ var ts; return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } ts.getClassExtendsHeritageElement = getClassExtendsHeritageElement; - function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 113 /* ImplementsKeyword */); - return heritageClause ? heritageClause.types : undefined; + function getEffectiveImplementsTypeNodes(node) { + if (isInJSFile(node)) { + return ts.getJSDocImplementsTags(node).map(function (n) { return n.class; }); + } + else { + var heritageClause = getHeritageClause(node.heritageClauses, 113 /* ImplementsKeyword */); + return heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.types; + } } - ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; + ts.getEffectiveImplementsTypeNodes = getEffectiveImplementsTypeNodes; /** Returns the node in an `extends` or `implements` clause of a class or interface. */ function getAllSuperTypeNodes(node) { return ts.isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || ts.emptyArray : - ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getClassImplementsHeritageClauseElements(node)) || ts.emptyArray : + ts.isClassLike(node) ? ts.concatenate(ts.singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || ts.emptyArray : ts.emptyArray; } ts.getAllSuperTypeNodes = getAllSuperTypeNodes; @@ -15337,7 +15596,7 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return 0; case 213 /* SpreadElement */: return 1; @@ -15529,6 +15788,13 @@ var ts; function escapeTemplateSubstitution(str) { return str.replace(templateSubstitutionRegExp, "\\${"); } + /** @internal */ + function hasInvalidEscape(template) { + return template && !!(ts.isNoSubstitutionTemplateLiteral(template) + ? template.templateFlags + : (template.head.templateFlags || ts.some(template.templateSpans, function (span) { return !!span.literal.templateFlags; }))); + } + ts.hasInvalidEscape = hasInvalidEscape; // This consists of the first 19 unprintable ASCII characters, canonical escapes, lineSeparator, // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in // the language service. These characters should be escaped when printing, and if any characters are added, @@ -15553,6 +15819,23 @@ var ts; "\u2029": "\\u2029", "\u0085": "\\u0085" // nextLine }); + function encodeUtf16EscapeSequence(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + var paddedHexCode = ("0000" + hexCharCode).slice(-4); + return "\\u" + paddedHexCode; + } + function getReplacement(c, offset, input) { + if (c.charCodeAt(0) === 0 /* nullCharacter */) { + var lookAhead = input.charCodeAt(offset + c.length); + if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) { + // If the null character is followed by digits, print as a hex escape to prevent the result from parsing as an octal (which is forbidden in strict mode) + return "\\x00"; + } + // Otherwise, keep printing a literal \0 for the null character + return "\\0"; + } + return escapedCharsMap.get(c) || encodeUtf16EscapeSequence(c.charCodeAt(0)); + } /** * Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), * but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) @@ -15565,6 +15848,42 @@ var ts; return s.replace(escapedCharsRegExp, getReplacement); } ts.escapeString = escapeString; + var nonAsciiCharacters = /[^\u0000-\u007F]/g; + function escapeNonAsciiString(s, quoteChar) { + s = escapeString(s, quoteChar); + // Replace non-ASCII characters with '\uNNNN' escapes if any exist. + // Otherwise just return the original string. + return nonAsciiCharacters.test(s) ? + s.replace(nonAsciiCharacters, function (c) { return encodeUtf16EscapeSequence(c.charCodeAt(0)); }) : + s; + } + ts.escapeNonAsciiString = escapeNonAsciiString; + // This consists of the first 19 unprintable ASCII characters, JSX canonical escapes, lineSeparator, + // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in + // the language service. These characters should be escaped when printing, and if any characters are added, + // the map below must be updated. + var jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g; + var jsxEscapedCharsMap = ts.createMapFromTemplate({ + "\"": """, + "\'": "'" + }); + function encodeJsxCharacterEntity(charCode) { + var hexCharCode = charCode.toString(16).toUpperCase(); + return "&#x" + hexCharCode + ";"; + } + function getJsxAttributeStringReplacement(c) { + if (c.charCodeAt(0) === 0 /* nullCharacter */) { + return "�"; + } + return jsxEscapedCharsMap.get(c) || encodeJsxCharacterEntity(c.charCodeAt(0)); + } + function escapeJsxAttributeString(s, quoteChar) { + var escapedCharsRegExp = quoteChar === 39 /* singleQuote */ ? jsxSingleQuoteEscapedCharsRegExp : + jsxDoubleQuoteEscapedCharsRegExp; + return s.replace(escapedCharsRegExp, getJsxAttributeStringReplacement); + } + ts.escapeJsxAttributeString = escapeJsxAttributeString; /** * Strip off existed surrounding single quotes, double quotes, or backticks from a given string * @@ -15583,38 +15902,11 @@ var ts; charCode === 34 /* doubleQuote */ || charCode === 96 /* backtick */; } - function getReplacement(c, offset, input) { - if (c.charCodeAt(0) === 0 /* nullCharacter */) { - var lookAhead = input.charCodeAt(offset + c.length); - if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) { - // If the null character is followed by digits, print as a hex escape to prevent the result from parsing as an octal (which is forbidden in strict mode) - return "\\x00"; - } - // Otherwise, keep printing a literal \0 for the null character - return "\\0"; - } - return escapedCharsMap.get(c) || get16BitUnicodeEscapeSequence(c.charCodeAt(0)); - } function isIntrinsicJsxName(name) { var ch = name.charCodeAt(0); return (ch >= 97 /* a */ && ch <= 122 /* z */) || ts.stringContains(name, "-"); } ts.isIntrinsicJsxName = isIntrinsicJsxName; - function get16BitUnicodeEscapeSequence(charCode) { - var hexCharCode = charCode.toString(16).toUpperCase(); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - var nonAsciiCharacters = /[^\u0000-\u007F]/g; - function escapeNonAsciiString(s, quoteChar) { - s = escapeString(s, quoteChar); - // Replace non-ASCII characters with '\uNNNN' escapes if any exist. - // Otherwise just return the original string. - return nonAsciiCharacters.test(s) ? - s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) : - s; - } - ts.escapeNonAsciiString = escapeNonAsciiString; var indentStrings = ["", " "]; function getIndentString(level) { if (indentStrings[level] === undefined) { @@ -16271,6 +16563,9 @@ var ts; } ts.getSelectedModifierFlags = getSelectedModifierFlags; function getModifierFlags(node) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 152 /* LastToken */) { + return 0 /* None */; + } if (node.modifierFlagsCache & 536870912 /* HasComputedFlags */) { return node.modifierFlagsCache & ~536870912 /* HasComputedFlags */; } @@ -16386,7 +16681,7 @@ var ts; } ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { - return node.kind === 75 /* Identifier */ || node.kind === 104 /* ThisKeyword */ || + return node.kind === 75 /* Identifier */ || node.kind === 104 /* ThisKeyword */ || node.kind === 102 /* SuperKeyword */ || node.kind === 194 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 200 /* ParenthesizedExpression */ && isDottedName(node.expression); } @@ -17004,6 +17299,14 @@ var ts; return node.kind === 194 /* PropertyAccessExpression */ || node.kind === 195 /* ElementAccessExpression */; } ts.isAccessExpression = isAccessExpression; + function getNameOfAccessExpression(node) { + if (node.kind === 194 /* PropertyAccessExpression */) { + return node.name; + } + ts.Debug.assert(node.kind === 195 /* ElementAccessExpression */); + return node.argumentExpression; + } + ts.getNameOfAccessExpression = getNameOfAccessExpression; function isBundleFileTextLike(section) { switch (section.kind) { case "text" /* Text */: @@ -17054,6 +17357,26 @@ var ts; this.parent = undefined; this.original = undefined; } + function Token(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0 /* None */; + this.transformFlags = 0 /* None */; + this.parent = undefined; + } + function Identifier(kind, pos, end) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = 0 /* None */; + this.transformFlags = 0 /* None */; + this.parent = undefined; + this.original = undefined; + this.flowNode = undefined; + } function SourceMapSource(fileName, text, skipTrivia) { this.fileName = fileName; this.text = text; @@ -17062,8 +17385,8 @@ var ts; // eslint-disable-next-line prefer-const ts.objectAllocator = { getNodeConstructor: function () { return Node; }, - getTokenConstructor: function () { return Node; }, - getIdentifierConstructor: function () { return Node; }, + getTokenConstructor: function () { return Token; }, + getIdentifierConstructor: function () { return Identifier; }, getPrivateIdentifierConstructor: function () { return Node; }, getSourceFileConstructor: function () { return Node; }, getSymbolConstructor: function () { return Symbol; }, @@ -17077,7 +17400,7 @@ var ts; ts.setObjectAllocator = setObjectAllocator; function formatStringFromArgs(text, args, baseIndex) { if (baseIndex === void 0) { baseIndex = 0; } - return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.assertDefined(args[+index + baseIndex]); }); + return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.checkDefined(args[+index + baseIndex]); }); } ts.formatStringFromArgs = formatStringFromArgs; /* @internal */ @@ -18074,6 +18397,34 @@ var ts; return (negative && base10Value !== "0" ? "-" : "") + base10Value; } ts.pseudoBigIntToString = pseudoBigIntToString; + function isValidTypeOnlyAliasUseSite(useSite) { + return !!(useSite.flags & 8388608 /* Ambient */) + || isPartOfTypeQuery(useSite) + || isFirstIdentifierOfNonEmittingHeritageClause(useSite) + || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) + || !isExpressionNode(useSite); + } + ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite; + function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { + while (node.kind === 75 /* Identifier */ || node.kind === 194 /* PropertyAccessExpression */) { + node = node.parent; + } + if (node.kind !== 154 /* ComputedPropertyName */) { + return false; + } + if (hasModifier(node.parent, 128 /* Abstract */)) { + return true; + } + var containerKind = node.parent.parent.kind; + return containerKind === 246 /* InterfaceDeclaration */ || containerKind === 173 /* TypeLiteral */; + } + /** Returns true for the first identifier of 1) an `implements` clause, and 2) an `extends` clause of an interface. */ + function isFirstIdentifierOfNonEmittingHeritageClause(node) { + var _a, _b; + // Number of parents to climb from identifier is 2 for `implements I`, 3 for `implements x.I` + var heritageClause = (_a = ts.tryCast(node.parent.parent, ts.isHeritageClause)) !== null && _a !== void 0 ? _a : ts.tryCast((_b = node.parent.parent) === null || _b === void 0 ? void 0 : _b.parent, ts.isHeritageClause); + return (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.token) === 113 /* ImplementsKeyword */ || (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.parent.kind) === 246 /* InterfaceDeclaration */; + } })(ts || (ts = {})); var ts; (function (ts) { @@ -18502,7 +18853,7 @@ var ts; return visitNode(cbNode, node.expression); case 264 /* MissingDeclaration */: return visitNodes(cbNode, cbNodes, node.decorators); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return visitNodes(cbNode, cbNodes, node.elements); case 266 /* JsxElement */: return visitNode(cbNode, node.openingElement) || @@ -18542,24 +18893,27 @@ var ts; visitNode(cbNode, node.type); case 303 /* JSDocComment */: return visitNodes(cbNode, cbNodes, node.tags); - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return visitNode(cbNode, node.tagName) || (node.isNameFirst ? visitNode(cbNode, node.name) || visitNode(cbNode, node.typeExpression) : visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name)); - case 308 /* JSDocAuthorTag */: + case 309 /* JSDocAuthorTag */: return visitNode(cbNode, node.tagName); + case 308 /* JSDocImplementsTag */: + return visitNode(cbNode, node.tagName) || + visitNode(cbNode, node.class); case 307 /* JSDocAugmentsTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.class); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters); - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return visitNode(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 294 /* JSDocTypeExpression */ @@ -18567,14 +18921,14 @@ var ts; visitNode(cbNode, node.fullName) : visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression)); - case 314 /* JSDocCallbackTag */: + case 315 /* JSDocCallbackTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression); - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 318 /* JSDocThisTag */: - case 315 /* JSDocEnumTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 319 /* JSDocThisTag */: + case 316 /* JSDocEnumTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.typeExpression); case 305 /* JSDocSignature */: @@ -18584,17 +18938,85 @@ var ts; case 304 /* JSDocTypeLiteral */: return ts.forEach(node.jsDocPropertyTags, cbNode); case 306 /* JSDocTag */: - case 309 /* JSDocClassTag */: - case 310 /* JSDocPublicTag */: - case 311 /* JSDocPrivateTag */: - case 312 /* JSDocProtectedTag */: - case 313 /* JSDocReadonlyTag */: + case 310 /* JSDocClassTag */: + case 311 /* JSDocPublicTag */: + case 312 /* JSDocPrivateTag */: + case 313 /* JSDocProtectedTag */: + case 314 /* JSDocReadonlyTag */: return visitNode(cbNode, node.tagName); - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return visitNode(cbNode, node.expression); } } ts.forEachChild = forEachChild; + /** @internal */ + /** + * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes + * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; additionally, + * unlike `forEachChild`, embedded arrays are flattened and the 'cbNode' callback is invoked for each element. + * If a callback returns a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. + * + * @param node a given node to visit its children + * @param cbNode a callback to be invoked for all child nodes + * @param cbNodes a callback to be invoked for embedded array + * + * @remarks Unlike `forEachChild`, `forEachChildRecursively` handles recursively invoking the traversal on each child node found, + * and while doing so, handles traversing the structure without relying on the callstack to encode the tree structure. + */ + function forEachChildRecursively(rootNode, cbNode, cbNodes) { + var stack = [rootNode]; + while (stack.length) { + var parent = stack.pop(); + var res = visitAllPossibleChildren(parent, gatherPossibleChildren(parent)); + if (res) { + return res; + } + } + return; + function gatherPossibleChildren(node) { + var children = []; + forEachChild(node, addWorkItem, addWorkItem); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal + return children; + function addWorkItem(n) { + children.unshift(n); + } + } + function visitAllPossibleChildren(parent, children) { + for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { + var child = children_1[_i]; + if (ts.isArray(child)) { + if (cbNodes) { + var res = cbNodes(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + for (var i = child.length - 1; i >= 0; i--) { + var realChild = child[i]; + var res = cbNode(realChild, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + stack.push(realChild); + } + } + else { + stack.push(child); + var res = cbNode(child, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + } + } + } + ts.forEachChildRecursively = forEachChildRecursively; function createSourceFile(fileName, sourceText, languageVersion, setParentNodes, scriptKind) { if (setParentNodes === void 0) { setParentNodes = false; } ts.performance.mark("beforeParse"); @@ -18945,27 +19367,15 @@ var ts; // a syntax tree, and no semantic features, then the binding process is an unnecessary // overhead. This functions allows us to set all the parents, without all the expense of // binding. - var parent = rootNode; - forEachChild(rootNode, visitNode); - return; - function visitNode(n) { - // walk down setting parents that differ from the parent we think it should be. This - // allows us to quickly bail out of setting parents for subtrees during incremental - // parsing - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; - forEachChild(n, visitNode); - if (ts.hasJSDocNodes(n)) { - for (var _i = 0, _a = n.jsDoc; _i < _a.length; _i++) { - var jsDoc = _a[_i]; - jsDoc.parent = n; - parent = jsDoc; - forEachChild(jsDoc, visitNode); - } + forEachChildRecursively(rootNode, bindParentToChild); + function bindParentToChild(child, parent) { + child.parent = parent; + if (ts.hasJSDocNodes(child)) { + for (var _i = 0, _a = child.jsDoc; _i < _a.length; _i++) { + var doc = _a[_i]; + bindParentToChild(doc, child); + forEachChildRecursively(doc, bindParentToChild); } - parent = saveParent; } } } @@ -19136,8 +19546,11 @@ var ts; function reScanSlashToken() { return currentToken = scanner.reScanSlashToken(); } - function reScanTemplateToken() { - return currentToken = scanner.reScanTemplateToken(); + function reScanTemplateToken(isTaggedTemplate) { + return currentToken = scanner.reScanTemplateToken(isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + return currentToken = scanner.reScanTemplateHeadOrNoSubstitutionTemplate(); } function reScanLessThanToken() { return currentToken = scanner.reScanLessThanToken(); @@ -19357,7 +19770,7 @@ var ts; // An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues // with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for // each identifier in order to reduce memory consumption. - function createIdentifier(isIdentifier, diagnosticMessage) { + function createIdentifier(isIdentifier, diagnosticMessage, privateIdentifierDiagnosticMessage) { identifierCount++; if (isIdentifier) { var node = createNode(75 /* Identifier */); @@ -19369,6 +19782,10 @@ var ts; nextTokenWithoutCheck(); return finishNode(node); } + if (token() === 76 /* PrivateIdentifier */) { + parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + return createIdentifier(/*isIdentifier*/ true); + } // Only for end of file because the error gets reported incorrectly on embedded script tags. var reportAtCurrentPosition = token() === 1 /* EndOfFileToken */; var isReservedWord = scanner.isReservedWord(); @@ -19378,8 +19795,8 @@ var ts; ts.Diagnostics.Identifier_expected; return createMissingNode(75 /* Identifier */, reportAtCurrentPosition, diagnosticMessage || defaultMessage, msgArg); } - function parseIdentifier(diagnosticMessage) { - return createIdentifier(isIdentifier(), diagnosticMessage); + function parseIdentifier(diagnosticMessage, privateIdentifierDiagnosticMessage) { + return createIdentifier(isIdentifier(), diagnosticMessage, privateIdentifierDiagnosticMessage); } function parseIdentifierName(diagnosticMessage) { return createIdentifier(ts.tokenIsIdentifierOrKeyword(token()), diagnosticMessage); @@ -19555,9 +19972,9 @@ var ts; return isIdentifier() && !isHeritageClauseExtendsOrImplementsKeyword(); } case 8 /* VariableDeclarations */: - return isIdentifierOrPattern(); + return isIdentifierOrPrivateIdentifierOrPattern(); case 10 /* ArrayBindingElements */: - return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isIdentifierOrPattern(); + return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isIdentifierOrPrivateIdentifierOrPattern(); case 19 /* TypeParameters */: return isIdentifier(); case 15 /* ArrayLiteralMembers */: @@ -20153,24 +20570,24 @@ var ts; } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } - function parseTemplateExpression() { + function parseTemplateExpression(isTaggedTemplate) { var template = createNode(211 /* TemplateExpression */); - template.head = parseTemplateHead(); + template.head = parseTemplateHead(isTaggedTemplate); ts.Debug.assert(template.head.kind === 15 /* TemplateHead */, "Template head has wrong token kind"); var list = []; var listPos = getNodePos(); do { - list.push(parseTemplateSpan()); + list.push(parseTemplateSpan(isTaggedTemplate)); } while (ts.last(list).literal.kind === 16 /* TemplateMiddle */); template.templateSpans = createNodeArray(list, listPos); return finishNode(template); } - function parseTemplateSpan() { + function parseTemplateSpan(isTaggedTemplate) { var span = createNode(221 /* TemplateSpan */); span.expression = allowInAnd(parseExpression); var literal; if (token() === 19 /* CloseBraceToken */) { - reScanTemplateToken(); + reScanTemplateToken(isTaggedTemplate); literal = parseTemplateMiddleOrTemplateTail(); } else { @@ -20182,7 +20599,10 @@ var ts; function parseLiteralNode() { return parseLiteralLikeNode(token()); } - function parseTemplateHead() { + function parseTemplateHead(isTaggedTemplate) { + if (isTaggedTemplate) { + reScanTemplateHeadOrNoSubstitutionTemplate(); + } var fragment = parseLiteralLikeNode(token()); ts.Debug.assert(fragment.kind === 15 /* TemplateHead */, "Template head has wrong token kind"); return fragment; @@ -20220,6 +20640,9 @@ var ts; if (node.kind === 8 /* NumericLiteral */) { node.numericLiteralFlags = scanner.getTokenFlags() & 1008 /* NumericLiteralFlags */; } + if (ts.isTemplateLiteralKind(node.kind)) { + node.templateFlags = scanner.getTokenFlags() & 2048 /* ContainsInvalidEscape */; + } nextToken(); finishNode(node); return node; @@ -20403,7 +20826,7 @@ var ts; } function isStartOfParameter(isJSDocParameter) { return token() === 25 /* DotDotDotToken */ || - isIdentifierOrPattern() || + isIdentifierOrPrivateIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 59 /* AtToken */ || isStartOfType(/*inStartOfParameter*/ !isJSDocParameter); @@ -20420,7 +20843,7 @@ var ts; node.dotDotDotToken = parseOptionalToken(25 /* DotDotDotToken */); // FormalParameter [Yield,Await]: // BindingElement[?Yield,?Await] - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_cannot_be_used_as_parameters); if (ts.getFullWidth(node.name) === 0 && !node.modifiers && ts.isModifierKind(token())) { // in cases like // 'use strict' @@ -21157,6 +21580,7 @@ var ts; case 29 /* LessThanToken */: case 127 /* AwaitKeyword */: case 121 /* YieldKeyword */: + case 76 /* PrivateIdentifier */: // Yield/await always starts an expression. Either it is an identifier (in which case // it is definitely an expression). Or it's a keyword (either because we're in // a generator or async function, or in strict mode (or both)) and it started a yield or await expression. @@ -22340,8 +22764,8 @@ var ts; tagExpression.questionDotToken = questionDotToken; tagExpression.typeArguments = typeArguments; tagExpression.template = token() === 14 /* NoSubstitutionTemplateLiteral */ - ? parseLiteralNode() - : parseTemplateExpression(); + ? (reScanTemplateHeadOrNoSubstitutionTemplate(), parseLiteralNode()) + : parseTemplateExpression(/*isTaggedTemplate*/ true); if (questionDotToken || tag.flags & 32 /* OptionalChain */) { tagExpression.flags |= 32 /* OptionalChain */; } @@ -22502,7 +22926,7 @@ var ts; } break; case 15 /* TemplateHead */: - return parseTemplateExpression(); + return parseTemplateExpression(/* isTaggedTemplate */ false); } return parseIdentifier(ts.Diagnostics.Expression_expected); } @@ -23266,24 +23690,27 @@ var ts; parseExpected(23 /* CloseBracketToken */); return finishNode(node); } - function isIdentifierOrPattern() { - return token() === 18 /* OpenBraceToken */ || token() === 22 /* OpenBracketToken */ || isIdentifier(); + function isIdentifierOrPrivateIdentifierOrPattern() { + return token() === 18 /* OpenBraceToken */ + || token() === 22 /* OpenBracketToken */ + || token() === 76 /* PrivateIdentifier */ + || isIdentifier(); } - function parseIdentifierOrPattern() { + function parseIdentifierOrPattern(privateIdentifierDiagnosticMessage) { if (token() === 22 /* OpenBracketToken */) { return parseArrayBindingPattern(); } if (token() === 18 /* OpenBraceToken */) { return parseObjectBindingPattern(); } - return parseIdentifier(); + return parseIdentifier(/*diagnosticMessage*/ undefined, privateIdentifierDiagnosticMessage); } function parseVariableDeclarationAllowExclamation() { return parseVariableDeclaration(/*allowExclamation*/ true); } function parseVariableDeclaration(allowExclamation) { var node = createNode(242 /* VariableDeclaration */); - node.name = parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_are_not_allowed_in_variable_declarations); if (allowExclamation && node.name.kind === 75 /* Identifier */ && token() === 53 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) { node.exclamationToken = parseTokenNode(); @@ -23917,17 +24344,18 @@ var ts; } return finishNode(node); } - function parseNamespaceExport() { - var node = createNode(262 /* NamespaceExport */); + function parseNamespaceExport(pos) { + var node = createNode(262 /* NamespaceExport */, pos); node.name = parseIdentifier(); return finishNode(node); } function parseExportDeclaration(node) { node.kind = 260 /* ExportDeclaration */; node.isTypeOnly = parseOptional(145 /* TypeKeyword */); + var namespaceExportPos = scanner.getStartPos(); if (parseOptional(41 /* AsteriskToken */)) { if (parseOptional(123 /* AsKeyword */)) { - node.exportClause = parseNamespaceExport(); + node.exportClause = parseNamespaceExport(namespaceExportPos); } parseExpected(149 /* FromKeyword */); node.moduleSpecifier = parseModuleSpecifier(); @@ -24259,25 +24687,28 @@ var ts; case "author": tag = parseAuthorTag(start, tagName, margin); break; + case "implements": + tag = parseImplementsTag(start, tagName); + break; case "augments": case "extends": tag = parseAugmentsTag(start, tagName); break; case "class": case "constructor": - tag = parseSimpleTag(start, 309 /* JSDocClassTag */, tagName); + tag = parseSimpleTag(start, 310 /* JSDocClassTag */, tagName); break; case "public": - tag = parseSimpleTag(start, 310 /* JSDocPublicTag */, tagName); + tag = parseSimpleTag(start, 311 /* JSDocPublicTag */, tagName); break; case "private": - tag = parseSimpleTag(start, 311 /* JSDocPrivateTag */, tagName); + tag = parseSimpleTag(start, 312 /* JSDocPrivateTag */, tagName); break; case "protected": - tag = parseSimpleTag(start, 312 /* JSDocProtectedTag */, tagName); + tag = parseSimpleTag(start, 313 /* JSDocProtectedTag */, tagName); break; case "readonly": - tag = parseSimpleTag(start, 313 /* JSDocReadonlyTag */, tagName); + tag = parseSimpleTag(start, 314 /* JSDocReadonlyTag */, tagName); break; case "this": tag = parseThisTag(start, tagName); @@ -24329,10 +24760,12 @@ var ts; comments.push(text); indent += text.length; } - if (initialMargin) { + if (initialMargin !== undefined) { // jump straight to saving comments if there is some initial indentation - pushComment(initialMargin); - state = 2 /* SavingComments */; + if (initialMargin !== "") { + pushComment(initialMargin); + } + state = 1 /* SawAsterisk */; } var tok = token(); loop: while (true) { @@ -24460,7 +24893,7 @@ var ts; case 174 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: - return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object"; + return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; } } function parseParameterOrPropertyTag(start, tagName, target, indent) { @@ -24473,8 +24906,8 @@ var ts; typeExpression = tryParseTypeExpression(); } var result = target === 1 /* Property */ ? - createNode(322 /* JSDocPropertyTag */, start) : - createNode(316 /* JSDocParameterTag */, start); + createNode(323 /* JSDocPropertyTag */, start) : + createNode(317 /* JSDocParameterTag */, start); var comment = parseTagComments(indent + scanner.getStartPos() - start); var nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent); if (nestedTypeLiteral) { @@ -24497,7 +24930,7 @@ var ts; var start_3 = scanner.getStartPos(); var children = void 0; while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) { - if (child.kind === 316 /* JSDocParameterTag */ || child.kind === 322 /* JSDocPropertyTag */) { + if (child.kind === 317 /* JSDocParameterTag */ || child.kind === 323 /* JSDocPropertyTag */) { children = ts.append(children, child); } } @@ -24516,7 +24949,7 @@ var ts; if (ts.some(tags, ts.isJSDocReturnTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(317 /* JSDocReturnTag */, start); + var result = createNode(318 /* JSDocReturnTag */, start); result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); @@ -24525,13 +24958,13 @@ var ts; if (ts.some(tags, ts.isJSDocTypeTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(319 /* JSDocTypeTag */, start); + var result = createNode(320 /* JSDocTypeTag */, start); result.tagName = tagName; result.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); return finishNode(result); } function parseAuthorTag(start, tagName, indent) { - var result = createNode(308 /* JSDocAuthorTag */, start); + var result = createNode(309 /* JSDocAuthorTag */, start); result.tagName = tagName; var authorInfoWithEmail = tryParse(function () { return tryParseAuthorNameAndEmail(); }); if (!authorInfoWithEmail) { @@ -24584,6 +25017,12 @@ var ts; return comments.length === 0 ? undefined : comments.join(""); } } + function parseImplementsTag(start, tagName) { + var result = createNode(308 /* JSDocImplementsTag */, start); + result.tagName = tagName; + result.class = parseExpressionWithTypeArgumentsForAugments(); + return finishNode(result); + } function parseAugmentsTag(start, tagName) { var result = createNode(307 /* JSDocAugmentsTag */, start); result.tagName = tagName; @@ -24617,14 +25056,14 @@ var ts; return finishNode(tag); } function parseThisTag(start, tagName) { - var tag = createNode(318 /* JSDocThisTag */, start); + var tag = createNode(319 /* JSDocThisTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); return finishNode(tag); } function parseEnumTag(start, tagName) { - var tag = createNode(315 /* JSDocEnumTag */, start); + var tag = createNode(316 /* JSDocEnumTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); @@ -24633,7 +25072,7 @@ var ts; function parseTypedefTag(start, tagName, indent) { var typeExpression = tryParseTypeExpression(); skipWhitespaceOrAsterisk(); - var typedefTag = createNode(321 /* JSDocTypedefTag */, start); + var typedefTag = createNode(322 /* JSDocTypedefTag */, start); typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(); typedefTag.name = getJSDocTypeAliasName(typedefTag.fullName); @@ -24649,7 +25088,7 @@ var ts; if (!jsdocTypeLiteral) { jsdocTypeLiteral = createNode(304 /* JSDocTypeLiteral */, start); } - if (child.kind === 319 /* JSDocTypeTag */) { + if (child.kind === 320 /* JSDocTypeTag */) { if (childTypeTag) { break; } @@ -24695,7 +25134,7 @@ var ts; return typeNameOrNamespaceName; } function parseCallbackTag(start, tagName, indent) { - var callbackTag = createNode(314 /* JSDocCallbackTag */, start); + var callbackTag = createNode(315 /* JSDocCallbackTag */, start); callbackTag.tagName = tagName; callbackTag.fullName = parseJSDocTypeNameWithNamespace(); callbackTag.name = getJSDocTypeAliasName(callbackTag.fullName); @@ -24710,7 +25149,7 @@ var ts; var returnTag = tryParse(function () { if (parseOptionalJsdoc(59 /* AtToken */)) { var tag = parseTag(indent); - if (tag && tag.kind === 317 /* JSDocReturnTag */) { + if (tag && tag.kind === 318 /* JSDocReturnTag */) { return tag; } } @@ -24755,7 +25194,7 @@ var ts; case 59 /* AtToken */: if (canParseTag) { var child = tryParseChildTag(target, indent); - if (child && (child.kind === 316 /* JSDocParameterTag */ || child.kind === 322 /* JSDocPropertyTag */) && + if (child && (child.kind === 317 /* JSDocParameterTag */ || child.kind === 323 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; @@ -24822,10 +25261,10 @@ var ts; var typeParameter = createNode(155 /* TypeParameter */); typeParameter.name = parseJSDocIdentifierName(ts.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces); finishNode(typeParameter); - skipWhitespace(); + skipWhitespaceOrAsterisk(); typeParameters.push(typeParameter); } while (parseOptionalJsdoc(27 /* CommaToken */)); - var result = createNode(320 /* JSDocTemplateTag */, start); + var result = createNode(321 /* JSDocTemplateTag */, start); result.tagName = tagName; result.constraint = constraint; result.typeParameters = createNodeArray(typeParameters, typeParametersPos); @@ -26381,6 +26820,7 @@ var ts; { name: "noErrorTruncation", type: "boolean", + affectsSemanticDiagnostics: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Do_not_truncate_error_messages }, @@ -26510,6 +26950,7 @@ var ts; { name: "forceConsistentCasingInFileNames", type: "boolean", + affectsModuleResolution: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file }, @@ -26711,6 +27152,7 @@ var ts; createDiagnostics(diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnostics(diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption); } + /*@internal*/ function parseCommandLineWorker(diagnostics, commandLine, readFile) { var options = {}; var watchOptions; @@ -26787,50 +27229,78 @@ var ts; parseStrings(args); } } + ts.parseCommandLineWorker = parseCommandLineWorker; function parseOptionValue(args, i, diagnostics, opt, options, errors) { if (opt.isTSConfigOnly) { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name)); + var optValue = args[i]; + if (optValue === "null") { + options[opt.name] = undefined; + i++; + } + else if (opt.type === "boolean") { + if (optValue === "false") { + options[opt.name] = false; + i++; + } + else { + if (optValue === "true") + i++; + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, opt.name)); + } + } + else { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, opt.name)); + if (optValue && !ts.startsWith(optValue, "-")) + i++; + } } else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). if (!args[i] && opt.type !== "boolean") { errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name, getCompilerOptionValueTypeString(opt))); } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i]); - i++; - break; - case "boolean": - // boolean flag has optional value true, false, others - var optValue = args[i]; - options[opt.name] = optValue !== "false"; - // consume next argument as boolean flag value - if (optValue === "false" || optValue === "true") { + if (args[i] !== "null") { + switch (opt.type) { + case "number": + options[opt.name] = parseInt(args[i]); i++; - } - break; - case "string": - options[opt.name] = args[i] || ""; - i++; - break; - case "list": - var result = parseListTypeOption(opt, args[i], errors); - options[opt.name] = result || []; - if (result) { + break; + case "boolean": + // boolean flag has optional value true, false, others + var optValue = args[i]; + options[opt.name] = optValue !== "false"; + // consume next argument as boolean flag value + if (optValue === "false" || optValue === "true") { + i++; + } + break; + case "string": + options[opt.name] = args[i] || ""; i++; - } - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - options[opt.name] = parseCustomTypeOption(opt, args[i], errors); - i++; - break; + break; + case "list": + var result = parseListTypeOption(opt, args[i], errors); + options[opt.name] = result || []; + if (result) { + i++; + } + break; + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + options[opt.name] = parseCustomTypeOption(opt, args[i], errors); + i++; + break; + } + } + else { + options[opt.name] = undefined; + i++; } } return i; } - var compilerOptionsDidYouMeanDiagnostics = { + /*@internal*/ + ts.compilerOptionsDidYouMeanDiagnostics = { getOptionsNameMap: getOptionsNameMap, optionDeclarations: ts.optionDeclarations, unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, @@ -26838,7 +27308,7 @@ var ts; optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); + return parseCommandLineWorker(ts.compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; /** @internal */ @@ -27015,7 +27485,7 @@ var ts; name: "compilerOptions", type: "object", elementOptions: getCommandLineCompilerOptionsMap(), - extraKeyDiagnostics: compilerOptionsDidYouMeanDiagnostics, + extraKeyDiagnostics: ts.compilerOptionsDidYouMeanDiagnostics, }, { name: "watchOptions", @@ -27493,7 +27963,7 @@ var ts; } ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { - if (option) { + if (option && !isNullOrUndefined(value)) { if (option.type === "list") { var values = value; if (option.element.isFilePath && values.length) { @@ -27844,7 +28314,7 @@ var ts; } function getExtendedConfig(sourceFile, extendedConfigPath, host, basePath, resolutionStack, errors, extendedConfigCache) { var _a; - var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toLowerCase(extendedConfigPath); + var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toFileNameLowerCase(extendedConfigPath); var value; var extendedResult; var extendedConfig; @@ -27914,7 +28384,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, compilerOptionsDidYouMeanDiagnostics, errors); + convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, ts.compilerOptionsDidYouMeanDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -28101,7 +28571,7 @@ var ts; function getFileNamesFromConfigSpecs(spec, basePath, options, host, extraFileExtensions) { if (extraFileExtensions === void 0) { extraFileExtensions = []; } basePath = ts.normalizePath(basePath); - var keyMapper = host.useCaseSensitiveFileNames ? ts.identity : ts.toLowerCase; + var keyMapper = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); // Literal file names (provided via the "files" array in tsconfig.json) are stored in a // file map with a possibly case insensitive key. We use this map later when when including // wildcard paths. @@ -28260,7 +28730,7 @@ var ts; var match = wildcardDirectoryPattern.exec(spec); if (match) { return { - key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(), + key: useCaseSensitiveFileNames ? match[0] : ts.toFileNameLowerCase(match[0]), flags: watchRecursivePattern.test(spec) ? 1 /* Recursive */ : 0 /* None */ }; } @@ -29980,7 +30450,7 @@ var ts; } } function getDisplayName(node) { - return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.assertDefined(getDeclarationName(node))); + return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.checkDefined(getDeclarationName(node))); } /** * Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. @@ -30381,9 +30851,9 @@ var ts; case 196 /* CallExpression */: bindCallExpressionFlow(node); break; - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime @@ -30490,9 +30960,12 @@ var ts; function createLoopLabel() { return initFlowNode({ flags: 8 /* LoopLabel */, antecedents: undefined }); } + function createReduceLabel(target, antecedents, antecedent) { + return initFlowNode({ flags: 1024 /* ReduceLabel */, target: target, antecedents: antecedents, antecedent: antecedent }); + } function setFlowNodeReferenced(flow) { // On first reference we set the Referenced flag, thereafter we set the Shared flag - flow.flags |= flow.flags & 1024 /* Referenced */ ? 2048 /* Shared */ : 1024 /* Referenced */; + flow.flags |= flow.flags & 2048 /* Referenced */ ? 4096 /* Shared */ : 2048 /* Referenced */; } function addAntecedent(label, antecedent) { if (!(antecedent.flags & 1 /* Unreachable */) && !ts.contains(label.antecedents, antecedent)) { @@ -30723,35 +31196,36 @@ var ts; } } function bindTryStatement(node) { - var preFinallyLabel = createBranchLabel(); // We conservatively assume that *any* code in the try block can cause an exception, but we only need // to track code that causes mutations (because only mutations widen the possible control flow type of - // a variable). The currentExceptionTarget is the target label for control flows that result from - // exceptions. We add all mutation flow nodes as antecedents of this label such that we can analyze them - // as possible antecedents of the start of catch or finally blocks. Furthermore, we add the current - // control flow to represent exceptions that occur before any mutations. + // a variable). The exceptionLabel is the target label for control flows that result from exceptions. + // We add all mutation flow nodes as antecedents of this label such that we can analyze them as possible + // antecedents of the start of catch or finally blocks. Furthermore, we add the current control flow to + // represent exceptions that occur before any mutations. var saveReturnTarget = currentReturnTarget; var saveExceptionTarget = currentExceptionTarget; - currentReturnTarget = createBranchLabel(); - currentExceptionTarget = node.catchClause ? createBranchLabel() : currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + var normalExitLabel = createBranchLabel(); + var returnLabel = createBranchLabel(); + var exceptionLabel = createBranchLabel(); + if (node.finallyBlock) { + currentReturnTarget = returnLabel; + } + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.tryBlock); - addAntecedent(preFinallyLabel, currentFlow); - var flowAfterTry = currentFlow; - var flowAfterCatch = unreachableFlow; + addAntecedent(normalExitLabel, currentFlow); if (node.catchClause) { // Start of catch clause is the target of exceptions from try block. - currentFlow = finishFlowLabel(currentExceptionTarget); + currentFlow = finishFlowLabel(exceptionLabel); // The currentExceptionTarget now represents control flows from exceptions in the catch clause. // Effectively, in a try-catch-finally, if an exception occurs in the try block, the catch block // acts like a second try block. - currentExceptionTarget = currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + exceptionLabel = createBranchLabel(); + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.catchClause); - addAntecedent(preFinallyLabel, currentFlow); - flowAfterCatch = currentFlow; + addAntecedent(normalExitLabel, currentFlow); } - var exceptionTarget = finishFlowLabel(currentExceptionTarget); currentReturnTarget = saveReturnTarget; currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { @@ -30764,35 +31238,33 @@ var ts; // When analyzing a control flow graph that starts inside a finally block we want to consider all // five possibilities above. However, when analyzing a control flow graph that starts outside (past) // the finally block, we only want to consider the first two (if we're past a finally block then it - // must have completed normally). To make this possible, we inject two extra nodes into the control - // flow graph: An after-finally with an antecedent of the control flow at the end of the finally - // block, and a pre-finally with an antecedent that represents all exceptional control flows. The - // 'lock' property of the pre-finally references the after-finally, and the after-finally has a - // boolean 'locked' property that we set to true when analyzing a control flow that contained the - // the after-finally node. When the lock associated with a pre-finally is locked, the antecedent of - // the pre-finally (i.e. the exceptional control flows) are skipped. - var preFinallyFlow = initFlowNode({ flags: 4096 /* PreFinally */, antecedent: exceptionTarget, lock: {} }); - addAntecedent(preFinallyLabel, preFinallyFlow); - currentFlow = finishFlowLabel(preFinallyLabel); + // must have completed normally). Likewise, when analyzing a control flow graph from return statements + // in try or catch blocks in an IIFE, we only want to consider the third. To make this possible, we + // inject a ReduceLabel node into the control flow graph. This node contains an alternate reduced + // set of antecedents for the pre-finally label. As control flow analysis passes by a ReduceLabel + // node, the pre-finally label is temporarily switched to the reduced antecedent set. + var finallyLabel = createBranchLabel(); + finallyLabel.antecedents = ts.concatenate(ts.concatenate(normalExitLabel.antecedents, exceptionLabel.antecedents), returnLabel.antecedents); + currentFlow = finallyLabel; bind(node.finallyBlock); - // If the end of the finally block is reachable, but the end of the try and catch blocks are not, - // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should - // result in an unreachable current control flow. - if (!(currentFlow.flags & 1 /* Unreachable */)) { - if ((flowAfterTry.flags & 1 /* Unreachable */) && (flowAfterCatch.flags & 1 /* Unreachable */)) { - currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow - ? reportedUnreachableFlow - : unreachableFlow; - } + if (currentFlow.flags & 1 /* Unreachable */) { + // If the end of the finally block is unreachable, the end of the entire try statement is unreachable. + currentFlow = unreachableFlow; } - if (!(currentFlow.flags & 1 /* Unreachable */)) { - var afterFinallyFlow = initFlowNode({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); - preFinallyFlow.lock = afterFinallyFlow; - currentFlow = afterFinallyFlow; + else { + // If we have an IIFE return target and return statements in the try or catch blocks, add a control + // flow that goes back through the finally block and back through only the return statements. + if (currentReturnTarget && returnLabel.antecedents) { + addAntecedent(currentReturnTarget, createReduceLabel(finallyLabel, returnLabel.antecedents, currentFlow)); + } + // If the end of the finally block is reachable, but the end of the try and catch blocks are not, + // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should + // result in an unreachable current control flow. + currentFlow = normalExitLabel.antecedents ? createReduceLabel(finallyLabel, normalExitLabel.antecedents, currentFlow) : unreachableFlow; } } else { - currentFlow = finishFlowLabel(preFinallyLabel); + currentFlow = finishFlowLabel(normalExitLabel); } } function bindSwitchStatement(node) { @@ -30950,28 +31422,145 @@ var ts; bindAssignmentTargetFlow(node.operand); } } + var BindBinaryExpressionFlowState; + (function (BindBinaryExpressionFlowState) { + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindThenBindChildren"] = 0] = "BindThenBindChildren"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["MaybeBindLeft"] = 1] = "MaybeBindLeft"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindToken"] = 2] = "BindToken"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["BindRight"] = 3] = "BindRight"; + BindBinaryExpressionFlowState[BindBinaryExpressionFlowState["FinishBind"] = 4] = "FinishBind"; + })(BindBinaryExpressionFlowState || (BindBinaryExpressionFlowState = {})); function bindBinaryExpressionFlow(node) { - var operator = node.operatorToken.kind; - if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { - if (isTopLevelLogicalExpression(node)) { - var postExpressionLabel = createBranchLabel(); - bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); - currentFlow = finishFlowLabel(postExpressionLabel); + var workStacks = { + expr: [node], + state: [1 /* MaybeBindLeft */], + inStrictMode: [undefined], + parent: [undefined], + subtreeFlags: [undefined] + }; + var stackIndex = 0; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0 /* BindThenBindChildren */: { + // This state is used only when recuring, to emulate the work that `bind` does before + // reaching `bindChildren`. A normal call to `bindBinaryExpressionFlow` will already have done this work. + node.parent = parent; + var saveInStrictMode = inStrictMode; + bindWorker(node); + var saveParent = parent; + parent = node; + var subtreeFlagsState = void 0; + // While this next part does the work of `bindChildren` before it descends into `bindChildrenWorker` + // and uses `subtreeFlagsState` to queue up the work that needs to be done once the node is bound. + if (skipTransformFlagAggregation) { + // do nothing extra + } + else if (node.transformFlags & 536870912 /* HasComputedFlags */) { + skipTransformFlagAggregation = true; + subtreeFlagsState = -1; + } + else { + var savedSubtreeTransformFlags = subtreeTransformFlags; + subtreeTransformFlags = 0; + subtreeFlagsState = savedSubtreeTransformFlags; + } + advanceState(1 /* MaybeBindLeft */, saveInStrictMode, saveParent, subtreeFlagsState); + break; + } + case 1 /* MaybeBindLeft */: { + var operator = node.operatorToken.kind; + // TODO: bindLogicalExpression is recursive - if we want to handle deeply nested `&&` expressions + // we'll need to handle the `bindLogicalExpression` scenarios in this state machine, too + // For now, though, since the common cases are chained `+`, leaving it recursive is fine + if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { + if (isTopLevelLogicalExpression(node)) { + var postExpressionLabel = createBranchLabel(); + bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); + currentFlow = finishFlowLabel(postExpressionLabel); + } + else { + bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + completeNode(); + } + else { + advanceState(2 /* BindToken */); + maybeBind(node.left); + } + break; + } + case 2 /* BindToken */: { + advanceState(3 /* BindRight */); + maybeBind(node.operatorToken); + break; + } + case 3 /* BindRight */: { + advanceState(4 /* FinishBind */); + maybeBind(node.right); + break; + } + case 4 /* FinishBind */: { + var operator = node.operatorToken.kind; + if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { + bindAssignmentTargetFlow(node.left); + if (operator === 62 /* EqualsToken */ && node.left.kind === 195 /* ElementAccessExpression */) { + var elementAccess = node.left; + if (isNarrowableOperand(elementAccess.expression)) { + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); + } + } + } + completeNode(); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for bindBinaryExpressionFlow"); } - else { - bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + /** + * Note that `advanceState` sets the _current_ head state, and that `maybeBind` potentially pushes on a new + * head state; so `advanceState` must be called before any `maybeBind` during a state's execution. + */ + function advanceState(state, isInStrictMode, parent, subtreeFlags) { + workStacks.state[stackIndex] = state; + if (isInStrictMode !== undefined) { + workStacks.inStrictMode[stackIndex] = isInStrictMode; + } + if (parent !== undefined) { + workStacks.parent[stackIndex] = parent; + } + if (subtreeFlags !== undefined) { + workStacks.subtreeFlags[stackIndex] = subtreeFlags; } } - else { - bindEachChild(node); - if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) { - bindAssignmentTargetFlow(node.left); - if (operator === 62 /* EqualsToken */ && node.left.kind === 195 /* ElementAccessExpression */) { - var elementAccess = node.left; - if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); - } + function completeNode() { + if (workStacks.inStrictMode[stackIndex] !== undefined) { + if (workStacks.subtreeFlags[stackIndex] === -1) { + skipTransformFlagAggregation = false; + subtreeTransformFlags |= node.transformFlags & ~getTransformFlagsSubtreeExclusions(node.kind); + } + else if (workStacks.subtreeFlags[stackIndex] !== undefined) { + subtreeTransformFlags = workStacks.subtreeFlags[stackIndex] | computeTransformFlagsForNode(node, subtreeTransformFlags); } + inStrictMode = workStacks.inStrictMode[stackIndex]; + parent = workStacks.parent[stackIndex]; + } + stackIndex--; + } + /** + * If `node` is a BinaryExpression, adds it to the local work stack, otherwise recursively binds it + */ + function maybeBind(node) { + if (node && ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0 /* BindThenBindChildren */; + workStacks.inStrictMode[stackIndex] = undefined; + workStacks.parent[stackIndex] = undefined; + workStacks.subtreeFlags[stackIndex] = undefined; + } + else { + bind(node); } } } @@ -31016,7 +31605,7 @@ var ts; } function bindJSDocTypeAlias(node) { node.tagName.parent = node; - if (node.kind !== 315 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 316 /* JSDocEnumTag */ && node.fullName) { setParentPointers(node, node.fullName); } } @@ -31232,8 +31821,8 @@ var ts; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 300 /* JSDocFunctionType */: - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: case 247 /* TypeAliasDeclaration */: case 186 /* MappedType */: // All the children of these container types are never visible through another @@ -31438,7 +32027,9 @@ var ts; container = declName.parent.expression.name; break; case 5 /* Property */: - container = ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression; + container = isExportsOrModuleExportsOrAlias(file, declName.parent.expression) ? file + : ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name + : declName.parent.expression; break; case 0 /* None */: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); @@ -31853,7 +32444,7 @@ var ts; case 304 /* JSDocTypeLiteral */: case 186 /* MappedType */: return bindAnonymousTypeWorker(node); - case 309 /* JSDocClassTag */: + case 310 /* JSDocClassTag */: return bindJSDocClassTag(node); case 193 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); @@ -31921,7 +32512,7 @@ var ts; // falls through case 250 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: if (node.parent.kind === 305 /* JSDocSignature */) { return bindParameter(node); } @@ -31929,15 +32520,15 @@ var ts; break; } // falls through - case 322 /* JSDocPropertyTag */: + case 323 /* JSDocPropertyTag */: var propTag = node; var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 299 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -32009,6 +32600,9 @@ var ts; declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* ExportStar */, 0 /* None */); } else if (ts.isNamespaceExport(node.exportClause)) { + // declareSymbol walks up parents to find name text, parent _must_ be set + // but won't be set by the normal binder walk until `bindChildren` later on. + node.exportClause.parent = node; declareSymbol(container.symbol.exports, container.symbol, node.exportClause, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } } @@ -32444,7 +33038,7 @@ var ts; } } function bindParameter(node) { - if (node.kind === 316 /* JSDocParameterTag */ && container.kind !== 305 /* JSDocSignature */) { + if (node.kind === 317 /* JSDocParameterTag */ && container.kind !== 305 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 8388608 /* Ambient */)) { @@ -33161,7 +33755,7 @@ var ts; break; case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: // These nodes are TypeScript syntax. transformFlags |= 1 /* AssertTypeScript */; excludeFlags = 536870912 /* OuterExpressionExcludes */; @@ -33198,8 +33792,18 @@ var ts; case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: case 17 /* TemplateTail */: - case 211 /* TemplateExpression */: + if (node.templateFlags) { + transformFlags |= 32 /* AssertES2018 */; + break; + } + // falls through case 198 /* TaggedTemplateExpression */: + if (ts.hasInvalidEscape(node.template)) { + transformFlags |= 32 /* AssertES2018 */; + break; + } + // falls through + case 211 /* TemplateExpression */: case 282 /* ShorthandPropertyAssignment */: case 120 /* StaticKeyword */: case 219 /* MetaProperty */: @@ -33426,7 +34030,7 @@ var ts; return 536879104 /* BindingPatternExcludes */; case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: case 200 /* ParenthesizedExpression */: case 102 /* SuperKeyword */: return 536870912 /* OuterExpressionExcludes */; @@ -33760,8 +34364,7 @@ var ts; TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType"; TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; - TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; - TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 7] = "ResolvedTypeArguments"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 6] = "ResolvedTypeArguments"; })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); var CheckMode; (function (CheckMode) { @@ -33888,6 +34491,7 @@ var ts; var typeCount = 0; var symbolCount = 0; var enumCount = 0; + var totalInstantiationCount = 0; var instantiationCount = 0; var instantiationDepth = 0; var constraintDepth = 0; @@ -33930,6 +34534,7 @@ var ts; getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount") + symbolCount; }, getTypeCount: function () { return typeCount; }, + getInstantiationCount: function () { return totalInstantiationCount; }, getRelationCacheSizes: function () { return ({ assignable: assignableRelation.size, identity: identityRelation.size, @@ -33997,7 +34602,8 @@ var ts; }, getSymbolAtLocation: function (node) { node = ts.getParseTreeNode(node); - return node ? getSymbolAtLocation(node) : undefined; + // set ignoreErrors: true because any lookups invoked by the API shouldn't cause any new errors + return node ? getSymbolAtLocation(node, /*ignoreErrors*/ true) : undefined; }, getShorthandAssignmentValueSymbol: function (node) { node = ts.getParseTreeNode(node); @@ -34050,7 +34656,29 @@ var ts; getRootSymbols: getRootSymbols, getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node, contextFlags) : undefined; + if (!node) { + return undefined; + } + var containingCall = ts.findAncestor(node, ts.isCallLikeExpression); + var containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; + if (contextFlags & 4 /* Completions */ && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = true; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = undefined; + } + var result = getContextualType(node, contextFlags); + if (contextFlags & 4 /* Completions */ && containingCall) { + var toMarkSkip = node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = undefined; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + } + return result; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -34290,9 +34918,9 @@ var ts; var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); var iterationTypesCache = ts.createMap(); // cache for common IterationTypes instances var noIterationTypes = { - get yieldType() { throw new Error("Not supported"); }, - get returnType() { throw new Error("Not supported"); }, - get nextType() { throw new Error("Not supported"); }, + get yieldType() { return ts.Debug.fail("Not supported"); }, + get returnType() { return ts.Debug.fail("Not supported"); }, + get nextType() { return ts.Debug.fail("Not supported"); }, }; var anyIterationTypes = createIterationTypes(anyType, anyType, anyType); var anyIterationTypesExceptNext = createIterationTypes(anyType, anyType, unknownType); @@ -34440,6 +35068,7 @@ var ts; if (jsxPragma) { var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); + ts.visitNode(file.localJsxFactory, markAsSynthetic); if (file.localJsxFactory) { return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } @@ -34450,6 +35079,7 @@ var ts; _jsxNamespace = "React"; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); + ts.visitNode(_jsxFactoryEntity, markAsSynthetic); if (_jsxFactoryEntity) { _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } @@ -34458,7 +35088,15 @@ var ts; _jsxNamespace = ts.escapeLeadingUnderscores(compilerOptions.reactNamespace); } } + if (!_jsxFactoryEntity) { + _jsxFactoryEntity = ts.createQualifiedName(ts.createIdentifier(ts.unescapeLeadingUnderscores(_jsxNamespace)), "createElement"); + } return _jsxNamespace; + function markAsSynthetic(node) { + node.pos = -1; + node.end = -1; + return ts.visitEachChild(node, markAsSynthetic, ts.nullTransformationContext); + } } function getEmitResolver(sourceFile, cancellationToken) { // Ensure we have all the type information in place for this file so that all the @@ -34847,7 +35485,14 @@ var ts; } else if (ts.isPropertyDeclaration(declaration)) { // still might be illegal if a self-referencing property initializer (eg private x = this.x) - return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage); + return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, /*stopAtAnyPropertyDeclaration*/ false); + } + else if (ts.isParameterPropertyDeclaration(declaration, declaration.parent)) { + var container_3 = ts.getEnclosingBlockScopeContainer(declaration.parent); + // foo = this.bar is illegal in esnext+useDefineForClassFields when bar is a parameter property + return !(compilerOptions.target === 99 /* ESNext */ && !!compilerOptions.useDefineForClassFields + && ts.getContainingClass(declaration) === ts.getContainingClass(usage) + && isUsedInFunctionOrInstanceProperty(usage, declaration, container_3)); } return true; } @@ -34855,6 +35500,7 @@ var ts; // 1. inside an export specifier // 2. inside a function // 3. inside an instance property initializer, a reference to a non-instance property + // (except when target: "esnext" and useDefineForClassFields: true and the reference is to a parameter property) // 4. inside a static property initializer, a reference to a static method in the same class // 5. inside a TS export= declaration (since we will move the export statement during emit to avoid TDZ) // or if usage is in a type context: @@ -34869,7 +35515,19 @@ var ts; return true; } var container = ts.getEnclosingBlockScopeContainer(declaration); - return !!(usage.flags & 4194304 /* JSDoc */) || isInTypeQuery(usage) || isUsedInFunctionOrInstanceProperty(usage, declaration, container); + if (!!(usage.flags & 4194304 /* JSDoc */) || isInTypeQuery(usage)) { + return true; + } + if (isUsedInFunctionOrInstanceProperty(usage, declaration, container)) { + if (compilerOptions.target === 99 /* ESNext */ && !!compilerOptions.useDefineForClassFields) { + return (ts.isPropertyDeclaration(declaration) || ts.isParameterPropertyDeclaration(declaration, declaration.parent)) && + !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, /*stopAtAnyPropertyDeclaration*/ true); + } + else { + return true; + } + } + return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); switch (declaration.parent.parent.kind) { @@ -34914,7 +35572,8 @@ var ts; return false; }); } - function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage) { + /** stopAtAnyPropertyDeclaration is used for detecting ES-standard class field use-before-def errors */ + function isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, stopAtAnyPropertyDeclaration) { // always legal if usage is after declaration if (usage.end > declaration.end) { return false; @@ -34927,8 +35586,13 @@ var ts; } switch (node.kind) { case 202 /* ArrowFunction */: - case 159 /* PropertyDeclaration */: return true; + case 159 /* PropertyDeclaration */: + // even when stopping at any property declaration, they need to come from the same class + return stopAtAnyPropertyDeclaration && + (ts.isPropertyDeclaration(declaration) && node.parent === declaration.parent + || ts.isParameterPropertyDeclaration(declaration, declaration.parent) && node.parent === declaration.parent.parent) + ? "quit" : true; case 223 /* Block */: switch (node.parent.kind) { case 163 /* GetAccessor */: @@ -35206,9 +35870,9 @@ var ts; location = location.parent; } break; - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: // js type aliases do not resolve names from their host, so skip past it location = ts.getJSDocHost(location); break; @@ -35262,6 +35926,7 @@ var ts; !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && + !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { @@ -35286,9 +35951,10 @@ var ts; } // Perform extra checks only if error reporting was requested if (nameNotFoundMessage) { - if (propertyWithInvalidInitializer) { + if (propertyWithInvalidInitializer && !(compilerOptions.target === 99 /* ESNext */ && compilerOptions.useDefineForClassFields)) { // We have a match, but the reference occurred within a property initializer and the identifier also binds - // to a local variable in the constructor where the code will be emitted. + // to a local variable in the constructor where the code will be emitted. Note that this is actually allowed + // with ESNext+useDefineForClassFields because the scope semantics are different. var propertyName = propertyWithInvalidInitializer.name; error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), diagnosticName(nameArg)); return undefined; @@ -35332,9 +35998,27 @@ var ts; error(errorLocation, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(associatedDeclarationForContainingInitializer.name), ts.declarationNameToString(errorLocation)); } } + if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */) { + checkSymbolUsageInExpressionContext(result, name, errorLocation); + } } return result; } + function checkSymbolUsageInExpressionContext(symbol, name, useSite) { + if (!ts.isValidTypeOnlyAliasUseSite(useSite)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol); + if (typeOnlyDeclaration) { + var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type + : ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + var unescapedName = ts.unescapeLeadingUnderscores(name); + ts.addRelatedInfo(error(useSite, message, unescapedName), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, unescapedName)); + } + } + } function getIsDeferredContext(location, lastLocation) { if (location.kind !== 202 /* ArrowFunction */ && location.kind !== 201 /* FunctionExpression */) { // initializers in instance property declaration of class like entities are executed in constructor and thus deferred @@ -35467,9 +36151,19 @@ var ts; } return false; } + function isPrimitiveTypeName(name) { + return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; + } + function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 263 /* ExportSpecifier */) { + error(errorLocation, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); + return true; + } + return false; + } function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) { if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */)) { - if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") { + if (isPrimitiveTypeName(name)) { error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name)); return true; } @@ -35500,9 +36194,7 @@ var ts; if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */ & ~788968 /* Type */)) { var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 /* NamespaceModule */ & ~111551 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); if (symbol) { - error(errorLocation, ts.isTypeOnlyEnumAlias(symbol) - ? ts.Diagnostics.Enum_0_cannot_be_used_as_a_value_because_only_its_type_has_been_imported - : ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); + error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); return true; } } @@ -35570,19 +36262,78 @@ var ts; } } function getDeclarationOfAliasSymbol(symbol) { - return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration); + return ts.find(symbol.declarations, isAliasSymbolDeclaration); + } + /** + * An alias symbol is created by one of the following declarations: + * import = ... + * import from ... + * import * as from ... + * import { x as } from ... + * export { x as } from ... + * export * as ns from ... + * export = + * export default + * module.exports = + * {} + * {name: } + */ + function isAliasSymbolDeclaration(node) { + return node.kind === 253 /* ImportEqualsDeclaration */ || + node.kind === 252 /* NamespaceExportDeclaration */ || + node.kind === 255 /* ImportClause */ && !!node.name || + node.kind === 256 /* NamespaceImport */ || + node.kind === 262 /* NamespaceExport */ || + node.kind === 258 /* ImportSpecifier */ || + node.kind === 263 /* ExportSpecifier */ || + node.kind === 259 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node) || + ts.isBinaryExpression(node) && ts.getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && ts.exportAssignmentIsAlias(node) || + ts.isPropertyAccessExpression(node) + && ts.isBinaryExpression(node.parent) + && node.parent.left === node + && node.parent.operatorToken.kind === 62 /* EqualsToken */ + && isAliasableOrJsExpression(node.parent.right) || + node.kind === 282 /* ShorthandPropertyAssignment */ || + node.kind === 281 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer); + } + function isAliasableOrJsExpression(e) { + return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { if (node.moduleReference.kind === 265 /* ExternalModuleReference */) { - return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); + var immediate = resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)); + var resolved_4 = resolveExternalModuleSymbol(immediate); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved_4, /*overwriteEmpty*/ false); + return resolved_4; } - return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); + var resolved = getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); + checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved); + return resolved; } - function resolveExportByName(moduleSymbol, name, dontResolveAlias) { + function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) { + if (markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false)) { + var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node)); + var message = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type + : ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; + var relatedMessage = typeOnlyDeclaration.kind === 263 /* ExportSpecifier */ + ? ts.Diagnostics._0_was_exported_here + : ts.Diagnostics._0_was_imported_here; + // Non-null assertion is safe because the optionality comes from ImportClause, + // but if an ImportClause was the typeOnlyDeclaration, it had to have a `name`. + var name = ts.unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + ts.addRelatedInfo(error(node.moduleReference, message), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); + } + } + function resolveExportByName(moduleSymbol, name, sourceNode, dontResolveAlias) { var exportValue = moduleSymbol.exports.get("export=" /* ExportEquals */); - return exportValue - ? getPropertyOfType(getTypeOfSymbol(exportValue), name) - : resolveSymbol(moduleSymbol.exports.get(name), dontResolveAlias); + if (exportValue) { + return getPropertyOfType(getTypeOfSymbol(exportValue), name); + } + var exportSymbol = moduleSymbol.exports.get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(sourceNode, exportSymbol, resolved, /*overwriteEmpty*/ false); + return resolved; } function isSyntacticDefault(node) { return ((ts.isExportAssignment(node) && !node.isExportEquals) || ts.hasModifier(node, 512 /* Default */) || ts.isExportSpecifier(node)); @@ -35594,13 +36345,13 @@ var ts; // Declaration files (and ambient modules) if (!file || file.isDeclarationFile) { // Definitely cannot have a synthetic default if they have a syntactic default member specified - var defaultExportSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, /*dontResolveAlias*/ true); // Dont resolve alias because we want the immediately exported symbol's declaration + var defaultExportSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, /*sourceNode*/ undefined, /*dontResolveAlias*/ true); // Dont resolve alias because we want the immediately exported symbol's declaration if (defaultExportSymbol && ts.some(defaultExportSymbol.declarations, isSyntacticDefault)) { return false; } // It _might_ still be incorrect to assume there is no __esModule marker on the import at runtime, even if there is no `default` member // So we check a bit more, - if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias)) { + if (resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), /*sourceNode*/ undefined, dontResolveAlias)) { // If there is an `__esModule` specified in the declaration (meaning someone explicitly added it or wrote it in their code), // it definitely is a module and does not have a synthetic default return false; @@ -35615,7 +36366,7 @@ var ts; return hasExportAssignmentSymbol(moduleSymbol); } // JS files have a synthetic default if they do not contain ES2015+ module syntax (export = is not valid in js) _and_ do not have an __esModule marker - return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), dontResolveAlias); + return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), /*sourceNode*/ undefined, dontResolveAlias); } function getTargetOfImportClause(node, dontResolveAlias) { var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier); @@ -35625,7 +36376,7 @@ var ts; exportDefaultSymbol = moduleSymbol; } else { - exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, dontResolveAlias); + exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, node, dontResolveAlias); } var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); var hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias); @@ -35648,26 +36399,27 @@ var ts; } else if (hasSyntheticDefault) { // per emit behavior, a synthetic default overrides a "real" .default member if `__esModule` is not present - return maybeTypeOnly(resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || - resolveSymbol(moduleSymbol, dontResolveAlias)); - } - return maybeTypeOnly(exportDefaultSymbol); - } - function maybeTypeOnly(symbol) { - if (symbol && node.isTypeOnly && node.name) { - return createTypeOnlyImportOrExport(node.name, symbol); + var resolved = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, moduleSymbol, resolved, /*overwriteTypeOnly*/ false); + return resolved; } - return symbol; + markSymbolOfAliasDeclarationIfTypeOnly(node, exportDefaultSymbol, /*finalTarget*/ undefined, /*overwriteTypeOnly*/ false); + return exportDefaultSymbol; } } function getTargetOfNamespaceImport(node, dontResolveAlias) { var moduleSpecifier = node.parent.parent.moduleSpecifier; - var moduleSymbol = resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); - return moduleSymbol && node.parent.isTypeOnly ? createTypeOnlySymbol(moduleSymbol) : moduleSymbol; + var immediate = resolveExternalModuleName(node, moduleSpecifier); + var resolved = resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfNamespaceExport(node, dontResolveAlias) { var moduleSpecifier = node.parent.moduleSpecifier; - return moduleSpecifier && resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + var immediate = moduleSpecifier && resolveExternalModuleName(node, moduleSpecifier); + var resolved = moduleSpecifier && resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); + return resolved; } // This function creates a synthetic symbol that combines the value side of one symbol with the // type/namespace side of another symbol. Consider this example: @@ -35700,14 +36452,19 @@ var ts; if (valueSymbol.valueDeclaration) result.valueDeclaration = valueSymbol.valueDeclaration; if (typeSymbol.members) - result.members = typeSymbol.members; + result.members = ts.cloneMap(typeSymbol.members); if (valueSymbol.exports) - result.exports = valueSymbol.exports; + result.exports = ts.cloneMap(valueSymbol.exports); return result; } - function getExportOfModule(symbol, name, dontResolveAlias) { + function getExportOfModule(symbol, specifier, dontResolveAlias) { + var _a; if (symbol.flags & 1536 /* Module */) { - return resolveSymbol(getExportsOfSymbol(symbol).get(name), dontResolveAlias); + var name = ((_a = specifier.propertyName) !== null && _a !== void 0 ? _a : specifier.name).escapedText; + var exportSymbol = getExportsOfSymbol(symbol).get(name); + var resolved = resolveSymbol(exportSymbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(specifier, exportSymbol, resolved, /*overwriteEmpty*/ false); + return resolved; } } function getPropertyOfVariable(symbol, name) { @@ -35720,6 +36477,7 @@ var ts; } function getExternalModuleMember(node, specifier, dontResolveAlias) { if (dontResolveAlias === void 0) { dontResolveAlias = false; } + var _a; var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); // TODO: GH#18217 var name = specifier.propertyName || specifier.name; var suppressInteropError = name.escapedText === "default" /* Default */ && !!(compilerOptions.allowSyntheticDefaultImports || compilerOptions.esModuleInterop); @@ -35739,7 +36497,7 @@ var ts; } // if symbolFromVariable is export - get its final target symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias); - var symbolFromModule = getExportOfModule(targetSymbol, name.escapedText, dontResolveAlias); + var symbolFromModule = getExportOfModule(targetSymbol, specifier, dontResolveAlias); if (symbolFromModule === undefined && name.escapedText === "default" /* Default */) { var file = ts.find(moduleSymbol.declarations, ts.isSourceFile); if (canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias)) { @@ -35761,11 +36519,11 @@ var ts; } } else { - if (moduleSymbol.exports && moduleSymbol.exports.has("default" /* Default */)) { + if ((_a = moduleSymbol.exports) === null || _a === void 0 ? void 0 : _a.has("default" /* Default */)) { error(name, ts.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, declarationName); } else { - error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + reportNonExportedMember(name, declarationName, moduleSymbol, moduleName); } } } @@ -35773,90 +36531,47 @@ var ts; } } } + function reportNonExportedMember(name, declarationName, moduleSymbol, moduleName) { + var _a; + var localSymbol = (_a = moduleSymbol.valueDeclaration.locals) === null || _a === void 0 ? void 0 : _a.get(name.escapedText); + var exports = moduleSymbol.exports; + if (localSymbol) { + var exportedSymbol = exports && !exports.has("export=" /* ExportEquals */) + ? ts.find(symbolsToArray(exports), function (symbol) { return !!getSymbolIfSameReference(symbol, localSymbol); }) + : undefined; + var diagnostic = exportedSymbol + ? error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) + : error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); + ts.addRelatedInfo.apply(void 0, __spreadArrays([diagnostic], ts.map(localSymbol.declarations, function (decl, index) { + return ts.createDiagnosticForNode(decl, index === 0 ? ts.Diagnostics._0_is_declared_here : ts.Diagnostics.and_here, declarationName); + }))); + } + else { + error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + } + } function getTargetOfImportSpecifier(node, dontResolveAlias) { var resolved = getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias); - if (resolved && node.parent.parent.isTypeOnly) { - return createTypeOnlyImportOrExport(node.name, resolved); - } + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); return resolved; } function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) { - return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); - } - /** - * Creates a type alias symbol with a target symbol for type-only imports and exports. - * The symbol for `A` in `export type { A }` or `export type { A } from "./mod"` has - * `TypeFlags.Alias` so that alias resolution works as usual, but once the target `A` - * has been resolved, we essentially want to pretend we have a type alias to that target. - */ - function createTypeOnlyImportOrExport(sourceNode, target) { - var _a, _b; - var symbol = createTypeOnlySymbol(target); - if (!symbol && target !== unknownSymbol) { - var identifier = ts.isExportSpecifier(sourceNode) ? sourceNode.name : sourceNode; - var nameText = ts.idText(identifier); - var diagnostic = error(identifier, ts.Diagnostics.Type_only_0_must_reference_a_type_but_1_is_a_value, ts.isExportSpecifier(sourceNode) ? "export" : "import", nameText); - var targetDeclaration = (_a = target.valueDeclaration) !== null && _a !== void 0 ? _a : (_b = target.declarations) === null || _b === void 0 ? void 0 : _b[0]; - if (targetDeclaration) { - ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(targetDeclaration, ts.Diagnostics._0_is_declared_here, nameText)); - } - } - return symbol; - } - function createTypeOnlySymbol(target) { - if (target.flags & 512 /* ValueModule */) { - return createNamespaceModuleForModule(target); - } - if (target.flags & 384 /* Enum */) { - return createNamespaceModuleForEnum(target); - } - if (!(target.flags & 111551 /* Value */)) { - return target; - } - if (target.flags & 788968 /* Type */) { - var alias = createSymbol(524288 /* TypeAlias */, target.escapedName); - alias.declarations = ts.emptyArray; - alias.immediateTarget = target; - return alias; - } - } - function createNamespaceModuleForEnum(enumSymbol) { - ts.Debug.assert(!!(enumSymbol.flags & 384 /* Enum */)); - var symbol = createSymbol(1024 /* NamespaceModule */ | 524288 /* TypeAlias */, enumSymbol.escapedName); - symbol.immediateTarget = enumSymbol; - symbol.declarations = enumSymbol.declarations; - if (enumSymbol.exports) { - symbol.exports = ts.createSymbolTable(); - enumSymbol.exports.forEach(function (exportSymbol, key) { - symbol.exports.set(key, ts.Debug.assertDefined(createTypeOnlySymbol(exportSymbol))); - }); - } - return symbol; - } - function createNamespaceModuleForModule(moduleSymbol) { - ts.Debug.assert(!!(moduleSymbol.flags & 512 /* ValueModule */)); - var filtered = createSymbol(1024 /* NamespaceModule */, moduleSymbol.escapedName); - filtered.declarations = moduleSymbol.declarations; - if (moduleSymbol.exports) { - filtered.exports = ts.createSymbolTable(); - moduleSymbol.exports.forEach(function (exportSymbol, key) { - var typeOnlyExport = createTypeOnlySymbol(exportSymbol); - if (typeOnlyExport) { - filtered.exports.set(key, typeOnlyExport); - } - }); - } - return filtered; + var resolved = resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) { - var target = node.parent.parent.moduleSpecifier ? + var resolved = node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node, dontResolveAlias) : resolveEntityName(node.propertyName || node.name, meaning, /*ignoreErrors*/ false, dontResolveAlias); - return target && node.parent.parent.isTypeOnly ? createTypeOnlyImportOrExport(node, target) : target; + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfExportAssignment(node, dontResolveAlias) { var expression = (ts.isExportAssignment(node) ? node.expression : node.right); - return getTargetOfAliasLikeExpression(expression, dontResolveAlias); + var resolved = getTargetOfAliasLikeExpression(expression, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfAliasLikeExpression(expression, dontResolveAlias) { if (ts.isClassExpression(expression)) { @@ -35946,12 +36661,64 @@ var ts; } return links.target; } + /** + * Marks a symbol as type-only if its declaration is syntactically type-only. + * If it is not itself marked type-only, but resolves to a type-only alias + * somewhere in its resolution chain, save a reference to the type-only alias declaration + * so the alias _not_ marked type-only can be identified as _transitively_ type-only. + * + * This function is called on each alias declaration that could be type-only or resolve to + * another type-only alias during `resolveAlias`, so that later, when an alias is used in a + * JS-emitting expression, we can quickly determine if that symbol is effectively type-only + * and issue an error if so. + * + * @param aliasDeclaration The alias declaration not marked as type-only + * has already been marked as not resolving to a type-only alias. Used when recursively resolving qualified + * names of import aliases, e.g. `import C = a.b.C`. If namespace `a` is not found to be type-only, the + * import declaration will initially be marked as not resolving to a type-only symbol. But, namespace `b` + * must still be checked for a type-only marker, overwriting the previous negative result if found. + * @param immediateTarget The symbol to which the alias declaration immediately resolves + * @param finalTarget The symbol to which the alias declaration ultimately resolves + * @param overwriteEmpty Checks `resolvesToSymbol` for type-only declarations even if `aliasDeclaration` + */ + function markSymbolOfAliasDeclarationIfTypeOnly(aliasDeclaration, immediateTarget, finalTarget, overwriteEmpty) { + if (!aliasDeclaration) + return false; + // If the declaration itself is type-only, mark it and return. + // No need to check what it resolves to. + var sourceSymbol = getSymbolOfNode(aliasDeclaration); + if (ts.isTypeOnlyImportOrExportDeclaration(aliasDeclaration)) { + var links_1 = getSymbolLinks(sourceSymbol); + links_1.typeOnlyDeclaration = aliasDeclaration; + return true; + } + var links = getSymbolLinks(sourceSymbol); + return markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, immediateTarget, overwriteEmpty) + || markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, finalTarget, overwriteEmpty); + } + function markSymbolOfAliasDeclarationIfTypeOnlyWorker(aliasDeclarationLinks, target, overwriteEmpty) { + var _a, _b, _c; + if (target && (aliasDeclarationLinks.typeOnlyDeclaration === undefined || overwriteEmpty && aliasDeclarationLinks.typeOnlyDeclaration === false)) { + var exportSymbol = (_b = (_a = target.exports) === null || _a === void 0 ? void 0 : _a.get("export=" /* ExportEquals */)) !== null && _b !== void 0 ? _b : target; + var typeOnly = exportSymbol.declarations && ts.find(exportSymbol.declarations, ts.isTypeOnlyImportOrExportDeclaration); + aliasDeclarationLinks.typeOnlyDeclaration = (_c = typeOnly !== null && typeOnly !== void 0 ? typeOnly : getSymbolLinks(exportSymbol).typeOnlyDeclaration) !== null && _c !== void 0 ? _c : false; + } + return !!aliasDeclarationLinks.typeOnlyDeclaration; + } + /** Indicates that a symbol directly or indirectly resolves to a type-only import or export. */ + function getTypeOnlyAliasDeclaration(symbol) { + if (!(symbol.flags & 2097152 /* Alias */)) { + return undefined; + } + var links = getSymbolLinks(symbol); + return links.typeOnlyDeclaration || undefined; + } function markExportAsReferenced(node) { var symbol = getSymbolOfNode(node); var target = resolveAlias(symbol); if (target) { var markAlias = target === unknownSymbol || - ((target.flags & 111551 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target)); + ((target.flags & 111551 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol)); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -35979,6 +36746,14 @@ var ts; } } } + // Aliases that resolve to const enums are not marked as referenced because they are not emitted, + // but their usage in value positions must be tracked to determine if the import can be type-only. + function markConstEnumAliasAsReferenced(symbol) { + var links = getSymbolLinks(symbol); + if (!links.constEnumReferenced) { + links.constEnumReferenced = true; + } + } // This function is only for imports with entity names function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) { // There are three things we might try to look for. In the following examples, @@ -36014,8 +36789,8 @@ var ts; var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 111551 /* Value */ : 0); var symbol; if (name.kind === 75 /* Identifier */) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); - var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; + var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); + var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true); if (!symbol) { return symbolFromJSPrototype; @@ -36058,6 +36833,9 @@ var ts; throw ts.Debug.assertNever(name, "Unknown entity name kind."); } ts.Debug.assert((ts.getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); + if (!ts.nodeIsSynthesized(name) && ts.isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 259 /* ExportAssignment */)) { + markSymbolOfAliasDeclarationIfTypeOnly(ts.getAliasDeclarationFromName(name), symbol, /*finalTarget*/ undefined, /*overwriteEmpty*/ true); + } return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol); } /** @@ -36122,7 +36900,7 @@ var ts; */ function getExpandoSymbol(symbol) { var decl = symbol.valueDeclaration; - if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */) { + if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */ || ts.getExpandoInitializer(decl, /*isPrototypeAssignment*/ false)) { return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); @@ -36558,7 +37336,7 @@ var ts; return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 ? symbol.exportSymbol : symbol); } function symbolIsValue(symbol) { - return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */); + return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */ && !getTypeOnlyAliasDeclaration(symbol)); } function findConstructorDeclaration(node) { var members = node.members; @@ -36661,7 +37439,7 @@ var ts; // `sym` may not have exports if this module declaration is backed by the symbol for a `const` that's being rewritten // into a namespace - in such cases, it's best to just let the namespace appear empty (the const members couldn't have referred // to one another anyway) - if (result = callback(sym.exports || emptySymbols)) { + if (result = callback((sym === null || sym === void 0 ? void 0 : sym.exports) || emptySymbols)) { return { value: result }; } break; @@ -36834,6 +37612,7 @@ var ts; if (!ts.length(symbols)) return; var hadAccessibleChain; + var earlyModuleBail = false; for (var _i = 0, _a = symbols; _i < _a.length; _i++) { var symbol = _a[_i]; // Symbol is accessible if it by itself is accessible @@ -36847,6 +37626,14 @@ var ts; } else { if (ts.some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { + if (shouldComputeAliasesToMakeVisible) { + earlyModuleBail = true; + // Generally speaking, we want to use the aliases that already exist to refer to a module, if present + // In order to do so, we need to find those aliases in order to retain them in declaration emit; so + // if we are in declaration emit, we cannot use the fast path for module visibility until we've exhausted + // all other visibility options (in order to capture the possible aliases used to reference the module) + continue; + } // Any meaning of a module symbol is always accessible via an `import` type return { accessibility: 0 /* Accessible */ @@ -36880,6 +37667,11 @@ var ts; return parentResult; } } + if (earlyModuleBail) { + return { + accessibility: 0 /* Accessible */ + }; + } if (hadAccessibleChain) { return { accessibility: 1 /* NotAccessible */, @@ -37079,7 +37871,7 @@ var ts; } function toNodeBuilderFlags(flags) { if (flags === void 0) { flags = 0 /* None */; } - return flags & 9469291 /* NodeBuilderFlagsMask */; + return flags & 277904747 /* NodeBuilderFlagsMask */; } function createNodeBuilder() { return { @@ -37183,7 +37975,7 @@ var ts; } if (type.flags & 128 /* StringLiteral */) { context.approximateLength += (type.value.length + 2); - return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value), 16777216 /* NoAsciiEscaping */)); + return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value, !!(context.flags & 268435456 /* UseSingleQuotesForStringLiteralType */)), 16777216 /* NoAsciiEscaping */)); } if (type.flags & 256 /* NumberLiteral */) { var value = type.value; @@ -37681,8 +38473,8 @@ var ts; typeElements.push(preserveCommentsOn(propertySignature)); } function preserveCommentsOn(node) { - if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 322 /* JSDocPropertyTag */; })) { - var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 322 /* JSDocPropertyTag */; }); + if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 323 /* JSDocPropertyTag */; })) { + var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 323 /* JSDocPropertyTag */; }); var commentText = d.comment; if (commentText) { ts.setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -37806,7 +38598,7 @@ var ts; function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags) { var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 156 /* Parameter */); if (!parameterDeclaration && !ts.isTransientSymbol(parameterSymbol)) { - parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 316 /* JSDocParameterTag */); + parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 317 /* JSDocParameterTag */); } var parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -37863,7 +38655,7 @@ var ts; var chain; var isTypeParameter = symbol.flags & 262144 /* TypeParameter */; if (!isTypeParameter && (context.enclosingDeclaration || context.flags & 64 /* UseFullyQualifiedType */) && !(context.flags & 134217728 /* DoNotIncludeSymbolChain */)) { - chain = ts.Debug.assertDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); + chain = ts.Debug.checkDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); ts.Debug.assert(chain && chain.length > 0); } else { @@ -38238,7 +39030,7 @@ var ts; } // See getNameForSymbolFromNameType for a stringy equivalent function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; @@ -38513,7 +39305,7 @@ var ts; symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */; var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); - if (symbol.flags & 16 /* Function */ || isConstMergedWithNSPrintableAsSignatureMerge) { + if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288 /* TypeAlias */) { @@ -38572,7 +39364,7 @@ var ts; function includePrivateSymbol(symbol) { if (ts.some(symbol.declarations, ts.isParameterDeclaration)) return; - ts.Debug.assertDefined(deferredPrivates); + ts.Debug.assertIsDefined(deferredPrivates); getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol deferredPrivates.set("" + getSymbolId(symbol), symbol); } @@ -38713,7 +39505,7 @@ var ts; // function g() {} // module.exports.g = g // ``` - // In such a situation, we have a local variable named `g`, and a seperate exported variable named `g`. + // In such a situation, we have a local variable named `g`, and a separate exported variable named `g`. // Naively, we would emit // ``` // function g() {} @@ -38804,18 +39596,19 @@ var ts; var typeParamDecls = ts.map(localParams, function (p) { return typeParameterToDeclaration(p, context); }); var classType = getDeclaredTypeOfClassOrInterface(symbol); var baseTypes = getBaseTypes(classType); + var implementsTypes = getImplementsTypes(classType); var staticType = getTypeOfSymbol(symbol); var staticBaseType = getBaseConstructorTypeOfClass(staticType); - var heritageClauses = !ts.length(baseTypes) ? undefined : [ts.createHeritageClause(90 /* ExtendsKeyword */, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]; + var heritageClauses = __spreadArrays(!ts.length(baseTypes) ? [] : [ts.createHeritageClause(90 /* ExtendsKeyword */, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))], !ts.length(implementsTypes) ? [] : [ts.createHeritageClause(113 /* ImplementsKeyword */, ts.map(implementsTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]); var symbolProps = getPropertiesOfType(classType); var publicSymbolProps = ts.filter(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return !(ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name)); }); var hasPrivateIdentifier = ts.some(symbolProps, function (s) { var valueDecl = s.valueDeclaration; - ts.Debug.assertDefined(valueDecl); + ts.Debug.assertIsDefined(valueDecl); return ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name); }); // Boil down all private properties into a single one. @@ -38847,8 +39640,8 @@ var ts; } function serializeAsAlias(symbol, localName, modifierFlags) { // synthesize an alias, eg `export { symbolName as Name }` - // need to mark the alias `symbol` points - // at as something we need to serialize as a private declaration as well + // need to mark the alias `symbol` points at + // as something we need to serialize as a private declaration as well var node = getDeclarationOfAliasSymbol(symbol); if (!node) return ts.Debug.fail(); @@ -39051,7 +39844,7 @@ var ts; && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName)))) { return []; } - var flag = modifierFlags | (isStatic ? 32 /* Static */ : 0); + var flag = (modifierFlags & ~256 /* Async */) | (isStatic ? 32 /* Static */ : 0); var name = getPropertyNameNodeForSymbol(p, context); var firstPropertyLikeDecl = ts.find(p.declarations, ts.or(ts.isPropertyDeclaration, ts.isAccessor, ts.isVariableDeclaration, ts.isPropertySignature, ts.isBinaryExpression, ts.isPropertyAccessExpression)); if (p.flags & 98304 /* Accessor */ && useAccessors) { @@ -39115,7 +39908,7 @@ var ts; return serializePropertySymbolForInterfaceWorker(p, /*isStatic*/ false, baseType); } function getDeclarationWithTypeAnnotation(symbol) { - return ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); + return symbol.declarations && ts.find(symbol.declarations, function (s) { return !!ts.getEffectiveTypeAnnotationNode(s) && !!ts.findAncestor(s, function (n) { return n === enclosingDeclaration; }); }); } /** * Unlike `typeToTypeNodeHelper`, this handles setting up the `AllowUniqueESSymbolType` flag @@ -39433,7 +40226,7 @@ var ts; return location.kind === 290 /* SourceFile */ || ts.isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { - var nameType = symbol.nameType; + var nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; @@ -39474,11 +40267,14 @@ var ts; if (ts.isCallExpression(declaration) && ts.isBindableObjectDefinePropertyCall(declaration)) { return ts.symbolName(symbol); } - if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096 /* Late */) && symbol.nameType && symbol.nameType.flags & 384 /* StringOrNumberLiteral */) { - // Computed property name isn't late bound, but has a well-known name type - use name type to generate a symbol name - var result = getNameOfSymbolFromNameType(symbol, context); - if (result !== undefined) { - return result; + if (ts.isComputedPropertyName(name_2) && !(ts.getCheckFlags(symbol) & 4096 /* Late */)) { + var nameType = getSymbolLinks(symbol).nameType; + if (nameType && nameType.flags & 384 /* StringOrNumberLiteral */) { + // Computed property name isn't late bound, but has a well-known name type - use name type to generate a symbol name + var result = getNameOfSymbolFromNameType(symbol, context); + if (result !== undefined) { + return result; + } } } return ts.declarationNameToString(name_2); @@ -39513,9 +40309,9 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 314 /* JSDocCallbackTag */: - case 321 /* JSDocTypedefTag */: - case 315 /* JSDocEnumTag */: + case 315 /* JSDocCallbackTag */: + case 322 /* JSDocTypedefTag */: + case 316 /* JSDocEnumTag */: // Top-level jsdoc type aliases are considered exported // First parent is comment node, second is hosting declaration or token; we only care about those tokens or declarations whose parent is a source file return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent)); @@ -39687,9 +40483,7 @@ var ts; return !!target.resolvedReturnType; case 4 /* ImmediateBaseConstraint */: return !!target.immediateBaseConstraint; - case 6 /* JSDocTypeReference */: - return !!getSymbolLinks(target).resolvedJSDocType; - case 7 /* ResolvedTypeArguments */: + case 6 /* ResolvedTypeArguments */: return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); @@ -39929,11 +40723,6 @@ var ts; if (optional === void 0) { optional = true; } return strictNullChecks && optional ? getOptionalType(type) : type; } - function isParameterOfContextuallyTypedFunction(node) { - return node.kind === 156 /* Parameter */ && - (node.parent.kind === 201 /* FunctionExpression */ || node.parent.kind === 202 /* ArrowFunction */) && - !!getContextualType(node.parent); - } // Return the inferred type for a variable, parameter, or property declaration function getTypeForVariableLikeDeclaration(declaration, includeOptionality) { // A variable declared in a for..in statement is of type string, or of type keyof T when the @@ -39998,7 +40787,7 @@ var ts; } } // Use contextual parameter type if one is available - var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration, /*forCache*/ true); + var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration); if (type) { return addOptionality(type, isOptional); } @@ -40011,7 +40800,7 @@ var ts; } // Use the type of the initializer expression if one is present and the declaration is // not a parameter of a contextually typed function - if (declaration.initializer && !isParameterOfContextuallyTypedFunction(declaration)) { + if (declaration.initializer) { var type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration)); return addOptionality(type, isOptional); } @@ -40022,7 +40811,7 @@ var ts; } // If the declaration specifies a binding pattern and is not a parameter of a contextually // typed function, use the type implied by the binding pattern - if (ts.isBindingPattern(declaration.name) && !isParameterOfContextuallyTypedFunction(declaration)) { + if (ts.isBindingPattern(declaration.name)) { return getTypeFromBindingPattern(declaration.name, /*includePatternInType*/ false, /*reportErrors*/ true); } // No type specified and nothing can be inferred @@ -40662,8 +41451,8 @@ var ts; function getTypeOfSymbolWithDeferredType(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); links.type = links.deferralParent.flags & 1048576 /* Union */ ? getUnionType(links.deferralConstituents) : getIntersectionType(links.deferralConstituents); } return links.type; @@ -40760,10 +41549,10 @@ var ts; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 247 /* TypeAliasDeclaration */: - case 320 /* JSDocTemplateTag */: - case 321 /* JSDocTypedefTag */: - case 315 /* JSDocEnumTag */: - case 314 /* JSDocCallbackTag */: + case 321 /* JSDocTemplateTag */: + case 322 /* JSDocTypedefTag */: + case 316 /* JSDocEnumTag */: + case 315 /* JSDocCallbackTag */: case 186 /* MappedType */: case 180 /* ConditionalType */: var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); @@ -40894,6 +41683,28 @@ var ts; } return type.resolvedBaseConstructorType; } + function getImplementsTypes(type) { + var resolvedImplementsTypes = ts.emptyArray; + for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + var implementsTypeNodes = ts.getEffectiveImplementsTypeNodes(declaration); + if (!implementsTypeNodes) + continue; + for (var _b = 0, implementsTypeNodes_1 = implementsTypeNodes; _b < implementsTypeNodes_1.length; _b++) { + var node = implementsTypeNodes_1[_b]; + var implementsType = getTypeFromTypeNode(node); + if (implementsType !== errorType) { + if (resolvedImplementsTypes === ts.emptyArray) { + resolvedImplementsTypes = [implementsType]; + } + else { + resolvedImplementsTypes.push(implementsType); + } + } + } + } + return resolvedImplementsTypes; + } function getBaseTypes(type) { if (!type.resolvedBaseTypes) { if (type.objectFlags & 8 /* Tuple */) { @@ -41089,20 +41900,10 @@ var ts; if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { return errorType; } - var type = void 0; - var declaration = void 0; - if (ts.isTypeOnlyAlias(symbol)) { - // Symbol is synthetic type alias for type-only import or export. - // See `createSyntheticTypeAlias`. - type = getDeclaredTypeOfSymbol(symbol.immediateTarget); - declaration = symbol.valueDeclaration; - } - else { - declaration = ts.Debug.assertDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); - var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; - // If typeNode is missing, we will error in checkJSDocTypedefTag. - type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; - } + var declaration = ts.Debug.checkDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found"); + var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; + // If typeNode is missing, we will error in checkJSDocTypedefTag. + var type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; if (popTypeResolution()) { var typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); if (typeParameters) { @@ -42095,7 +42896,7 @@ var ts; var checkFlags = 8192 /* ReverseMapped */ | (readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0); var inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.escapedName, checkFlags); inferredProp.declarations = prop.declarations; - inferredProp.nameType = prop.nameType; + inferredProp.nameType = getSymbolLinks(prop).nameType; inferredProp.propertyType = getTypeOfSymbol(prop); inferredProp.mappedType = type.mappedType; inferredProp.constraintType = type.constraintType; @@ -42183,7 +42984,7 @@ var ts; // When creating an optional property in strictNullChecks mode, if 'undefined' isn't assignable to the // type, we include 'undefined' in the type. Similarly, when creating a non-optional property in strictNullChecks // mode, if the underlying property is optional we remove 'undefined' from the type. - prop.type = strictNullChecks && isOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + prop.type = strictNullChecks && isOptional && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType) : strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */ ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType; if (modifiersProp) { @@ -42746,7 +43547,7 @@ var ts; var type = getTypeOfSymbol(prop); if (!firstType) { firstType = type; - nameType = prop.nameType; + nameType = getSymbolLinks(prop).nameType; } else if (type !== firstType) { checkFlags |= 64 /* HasNonUniformType */; @@ -43510,7 +44311,7 @@ var ts; function getTypeArguments(type) { var _a, _b; if (!type.resolvedTypeArguments) { - if (!pushTypeResolution(type, 7 /* ResolvedTypeArguments */)) { + if (!pushTypeResolution(type, 6 /* ResolvedTypeArguments */)) { return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; } var node = type.node; @@ -43560,7 +44361,7 @@ var ts; return errorType; } } - if (node.kind === 169 /* TypeReference */ && isAliasedType(node)) { + if (node.kind === 169 /* TypeReference */ && isDeferredTypeReferenceNode(node, ts.length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference(type, node, /*mapper*/ undefined); } // In a type reference, the outer type parameters of the referenced class or interface are automatically @@ -43632,9 +44433,6 @@ var ts; if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) { return getTypeFromClassOrInterfaceReference(node, symbol); } - if (ts.isTypeOnlyAlias(symbol)) { - return getTypeReferenceType(node, symbol.immediateTarget); - } if (symbol.flags & 524288 /* TypeAlias */) { return getTypeFromTypeAliasReference(node, symbol); } @@ -43664,26 +44462,30 @@ var ts; * but this function's special-case code fakes alias resolution as well. */ function getTypeFromJSDocValueReference(node, symbol) { - var valueType = getTypeOfSymbol(symbol); - var typeType = valueType; - if (symbol.valueDeclaration) { - var decl = ts.getRootDeclaration(symbol.valueDeclaration); - var isRequireAlias = false; - if (ts.isVariableDeclaration(decl) && decl.initializer) { - var expr = decl.initializer; - // skip past entity names, eg `require("x").a.b.c` - while (ts.isPropertyAccessExpression(expr)) { - expr = expr.expression; + var links = getNodeLinks(node); + if (!links.resolvedJSDocType) { + var valueType = getTypeOfSymbol(symbol); + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + // skip past entity names, eg `require("x").a.b.c` + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 188 /* ImportType */ && node.qualifier; + // valueType might not have a symbol, eg, {import('./b').STRING_LITERAL} + if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { + typeType = getTypeReferenceType(node, valueType.symbol); } - isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; - } - var isImportTypeWithQualifier = node.kind === 188 /* ImportType */ && node.qualifier; - // valueType might not have a symbol, eg, {import('./b').STRING_LITERAL} - if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { - typeType = getTypeReferenceType(node, valueType.symbol); } + links.resolvedJSDocType = typeType; } - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + return links.resolvedJSDocType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === typeVariable) { @@ -43784,6 +44586,11 @@ var ts; function getTypeFromTypeReference(node) { var links = getNodeLinks(node); if (!links.resolvedType) { + // handle LS queries on the `const` in `x as const` by resolving to the type of `x` + if (ts.isConstTypeReference(node) && ts.isAssertionExpression(node.parent)) { + links.resolvedSymbol = unknownSymbol; + return links.resolvedType = checkExpressionCached(node.parent.expression); + } var symbol = void 0; var type = void 0; var meaning = 788968 /* Type */; @@ -43962,10 +44769,17 @@ var ts; var minLength = ts.findLastIndex(node.elementTypes, function (n) { return n.kind !== 176 /* OptionalType */ && n !== restElement; }) + 1; return getTupleTypeOfArity(node.elementTypes.length, minLength, !!restElement, readonly, /*associatedNames*/ undefined); } + // Return true if the given type reference node is directly aliased or if it needs to be deferred + // because it is possibly contained in a circular chain of eagerly resolved types. + function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 174 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : + node.kind === 175 /* TupleType */ ? ts.some(node.elementTypes, mayResolveTypeAlias) : + hasDefaultTypeArguments || ts.some(node.typeArguments, mayResolveTypeAlias)); + } // Return true when the given node is transitively contained in type constructs that eagerly // resolve their constituent types. We include SyntaxKind.TypeReference because type arguments // of type aliases are eagerly resolved. - function isAliasedType(node) { + function isResolvedByTypeAlias(node) { var parent = node.parent; switch (parent.kind) { case 182 /* ParenthesizedType */: @@ -43975,12 +44789,42 @@ var ts; case 185 /* IndexedAccessType */: case 180 /* ConditionalType */: case 184 /* TypeOperator */: - return isAliasedType(parent); + return isResolvedByTypeAlias(parent); case 247 /* TypeAliasDeclaration */: return true; } return false; } + // Return true if resolving the given node (i.e. getTypeFromTypeNode) possibly causes resolution + // of a type alias. + function mayResolveTypeAlias(node) { + switch (node.kind) { + case 169 /* TypeReference */: + return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node.typeName, 788968 /* Type */).flags & 524288 /* TypeAlias */); + case 172 /* TypeQuery */: + return true; + case 184 /* TypeOperator */: + return node.operator !== 147 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); + case 182 /* ParenthesizedType */: + case 176 /* OptionalType */: + case 299 /* JSDocOptionalType */: + case 297 /* JSDocNullableType */: + case 298 /* JSDocNonNullableType */: + case 294 /* JSDocTypeExpression */: + return mayResolveTypeAlias(node.type); + case 177 /* RestType */: + return node.type.kind !== 174 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 178 /* UnionType */: + case 179 /* IntersectionType */: + return ts.some(node.types, mayResolveTypeAlias); + case 185 /* IndexedAccessType */: + return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); + case 180 /* ConditionalType */: + return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || + mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); + } + return false; + } function getTypeFromArrayOrTupleTypeNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { @@ -43988,7 +44832,7 @@ var ts; if (target === emptyGenericType) { links.resolvedType = emptyObjectType; } - else if (isAliasedType(node)) { + else if (isDeferredTypeReferenceNode(node)) { links.resolvedType = node.kind === 175 /* TupleType */ && node.elementTypes.length === 0 ? target : createDeferredTypeReference(target, node, /*mapper*/ undefined); } @@ -44561,7 +45405,7 @@ var ts; } function getLiteralTypeFromProperty(prop, include) { if (!(ts.getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */)) { - var type = getLateBoundSymbol(prop).nameType; + var type = getSymbolLinks(getLateBoundSymbol(prop)).nameType; if (!type && !ts.isKnownSymbol(prop)) { if (prop.escapedName === "default" /* Default */) { type = getLiteralType("default"); @@ -44818,10 +45662,24 @@ var ts; accessNode; } function isGenericObjectType(type) { - return maybeTypeOfKind(type, 58982400 /* InstantiableNonPrimitive */ | 131072 /* GenericMappedType */); + if (type.flags & 3145728 /* UnionOrIntersection */) { + if (!(type.objectFlags & 4194304 /* IsGenericObjectTypeComputed */)) { + type.objectFlags |= 4194304 /* IsGenericObjectTypeComputed */ | + (ts.some(type.types, isGenericObjectType) ? 8388608 /* IsGenericObjectType */ : 0); + } + return !!(type.objectFlags & 8388608 /* IsGenericObjectType */); + } + return !!(type.flags & 58982400 /* InstantiableNonPrimitive */) || isGenericMappedType(type); } function isGenericIndexType(type) { - return maybeTypeOfKind(type, 58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */); + if (type.flags & 3145728 /* UnionOrIntersection */) { + if (!(type.objectFlags & 16777216 /* IsGenericIndexTypeComputed */)) { + type.objectFlags |= 16777216 /* IsGenericIndexTypeComputed */ | + (ts.some(type.types, isGenericIndexType) ? 33554432 /* IsGenericIndexType */ : 0); + } + return !!(type.objectFlags & 33554432 /* IsGenericIndexType */); + } + return !!(type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */)); } function isThisTypeParameter(type) { return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType); @@ -44848,6 +45706,12 @@ var ts; return writing ? getIntersectionType(types) : getUnionType(types); } } + function unwrapSubstitution(type) { + if (type.flags & 33554432 /* Substitution */) { + return type.substitute; + } + return type; + } // Transform an indexed access to a simpler form, if possible. Return the simpler form, or return // the type itself if no transformation is possible. The writing flag indicates that the type is // the target of an assignment. @@ -44859,7 +45723,7 @@ var ts; type[cache] = circularConstraintType; // We recursively simplify the object type as it may in turn be an indexed access type. For example, with // '{ [P in T]: { [Q in U]: number } }[T][U]' we want to first simplify the inner indexed access type. - var objectType = getSimplifiedType(type.objectType, writing); + var objectType = unwrapSubstitution(getSimplifiedType(type.objectType, writing)); var indexType = getSimplifiedType(type.indexType, writing); // T[A | B] -> T[A] | T[B] (reading) // T[A | B] -> T[A] & T[B] (writing) @@ -45024,11 +45888,15 @@ var ts; if (checkType === wildcardType || extendsType === wildcardType) { return wildcardType; } - var checkTypeInstantiable = maybeTypeOfKind(checkType, 63176704 /* Instantiable */ | 131072 /* GenericMappedType */); + var checkTypeInstantiable = isGenericObjectType(checkType) || isGenericIndexType(checkType); var combinedMapper; if (root.inferTypeParameters) { var context = createInferenceContext(root.inferTypeParameters, /*signature*/ undefined, 0 /* None */); - if (!checkTypeInstantiable) { + // We skip inference of the possible `infer` types unles the `extendsType` _is_ an infer type + // if it was, it's trivial to say that extendsType = checkType, however such a pattern is used to + // "reset" the type being build up during constraint calculation and avoid making an apparently "infinite" constraint + // so in those cases we refain from performing inference and retain the uninfered type parameter + if (!checkTypeInstantiable || !ts.some(root.inferTypeParameters, function (t) { return t === extendsType; })) { // We don't want inferences from constraints as they may cause us to eagerly resolve the // conditional type instead of deferring resolution. Also, we always want strict function // types rules (i.e. proper contravariance) for inferences. @@ -45039,7 +45907,7 @@ var ts; // Instantiate the extends type including inferences for 'infer T' type parameters var inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType; // We attempt to resolve the conditional type only when the check and extends types are non-generic - if (!checkTypeInstantiable && !maybeTypeOfKind(inferredExtendsType, 63176704 /* Instantiable */ | 131072 /* GenericMappedType */)) { + if (!checkTypeInstantiable && !isGenericObjectType(inferredExtendsType) && !isGenericIndexType(inferredExtendsType)) { if (inferredExtendsType.flags & 3 /* AnyOrUnknown */) { return instantiateType(root.trueType, combinedMapper || mapper); } @@ -45272,7 +46140,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 /* Readonly */ : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; members.set(prop.escapedName, result); } @@ -45287,7 +46155,7 @@ var 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, right, symbol, objectFlags, readonly) { + function getSpreadType(left, right, symbol, objectFlags, readonly, isParentTypeNullable) { if (left.flags & 1 /* Any */ || right.flags & 1 /* Any */) { return anyType; } @@ -45303,16 +46171,16 @@ var ts; if (left.flags & 1048576 /* Union */) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(left, readonly); if (merged) { - return getSpreadType(merged, right, symbol, objectFlags, readonly); + return getSpreadType(merged, right, symbol, objectFlags, readonly, isParentTypeNullable); } - return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly); }); + return mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly, isParentTypeNullable); }); } if (right.flags & 1048576 /* Union */) { var merged = tryMergeUnionOfObjectTypeAndEmptyObject(right, readonly); if (merged) { - return getSpreadType(left, merged, symbol, objectFlags, readonly); + return getSpreadType(left, merged, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304 /* Nullable */)); } - return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly); }); + return mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly, maybeTypeOfKind(right, 98304 /* Nullable */)); }); } if (right.flags & (528 /* BooleanLike */ | 296 /* NumberLike */ | 2112 /* BigIntLike */ | 132 /* StringLike */ | 1056 /* EnumLike */ | 67108864 /* NonPrimitive */ | 4194304 /* Index */)) { return left; @@ -45371,9 +46239,17 @@ var ts; result.leftSpread = leftProp; result.rightSpread = rightProp; result.declarations = declarations; - result.nameType = leftProp.nameType; + result.nameType = getSymbolLinks(leftProp).nameType; members.set(leftProp.escapedName, result); } + else if (strictNullChecks && + !isParentTypeNullable && + symbol && + !isFromSpreadAssignment(leftProp, symbol) && + isFromSpreadAssignment(rightProp, symbol) && + !maybeTypeOfKind(rightType, 98304 /* Nullable */)) { + error(leftProp.valueDeclaration, ts.Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, ts.unescapeLeadingUnderscores(leftProp.escapedName)); + } } else { members.set(leftProp.escapedName, getSpreadSymbol(leftProp, readonly)); @@ -45398,7 +46274,7 @@ var ts; var result = createSymbol(flags, prop.escapedName, readonly ? 8 /* Readonly */ : 0); result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); result.declarations = prop.declarations; - result.nameType = prop.nameType; + result.nameType = getSymbolLinks(prop).nameType; result.syntheticOrigin = prop; return result; } @@ -45724,8 +46600,8 @@ var ts; if (symbol.valueDeclaration) { result.valueDeclaration = symbol.valueDeclaration; } - if (symbol.nameType) { - result.nameType = symbol.nameType; + if (links.nameType) { + result.nameType = links.nameType; } return result; } @@ -45877,7 +46753,7 @@ var ts; var templateMapper = combineTypeMappers(mapper, createTypeMapper([getTypeParameterFromMappedType(type)], [key])); var propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper); var modifiers = getMappedTypeModifiers(type); - return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType) : strictNullChecks && modifiers & 8 /* ExcludeOptional */ && isOptional ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType; } @@ -45940,6 +46816,7 @@ var ts; error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } + totalInstantiationCount++; instantiationCount++; instantiationDepth++; var result = instantiateTypeWorker(type, mapper); @@ -45973,15 +46850,17 @@ var ts; } return type; } - if (flags & 1048576 /* Union */ && !(flags & 131068 /* Primitive */)) { - var types = type.types; - var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getUnionType(newTypes, 1 /* Literal */, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; - } - if (flags & 2097152 /* Intersection */) { + if ((flags & 2097152 /* Intersection */) || (flags & 1048576 /* Union */ && !(flags & 131068 /* Primitive */))) { + if (!couldContainTypeVariables(type)) { + return type; + } var types = type.types; var newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; + return newTypes === types + ? type + : (flags & 2097152 /* Intersection */) + ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) + : getUnionType(newTypes, 1 /* Literal */, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)); } if (flags & 4194304 /* Index */) { return getIndexType(instantiateType(type.type, mapper)); @@ -46070,30 +46949,30 @@ var ts; return false; } function isContextSensitiveFunctionLikeDeclaration(node) { - if (ts.isFunctionDeclaration(node) && (!ts.isInJSFile(node) || !getTypeForDeclarationFromJSDocComment(node))) { - return false; - } + return (!ts.isFunctionDeclaration(node) || ts.isInJSFile(node) && !!getTypeForDeclarationFromJSDocComment(node)) && + (hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node)); + } + function hasContextSensitiveParameters(node) { // Functions with type parameters are not context sensitive. - if (node.typeParameters) { - return false; - } - // Functions with any parameters that lack type annotations are context sensitive. - if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { - return true; - } - if (node.kind !== 202 /* ArrowFunction */) { - // If the first parameter is not an explicit 'this' parameter, then the function has - // an implicit 'this' parameter which is subject to contextual typing. - var parameter = ts.firstOrUndefined(node.parameters); - if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + if (!node.typeParameters) { + // Functions with any parameters that lack type annotations are context sensitive. + if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) { return true; } + if (node.kind !== 202 /* ArrowFunction */) { + // If the first parameter is not an explicit 'this' parameter, then the function has + // an implicit 'this' parameter which is subject to contextual typing. + var parameter = ts.firstOrUndefined(node.parameters); + if (!(parameter && ts.parameterIsThisKeyword(parameter))) { + return true; + } + } } - return hasContextSensitiveReturnExpression(node); + return false; } function hasContextSensitiveReturnExpression(node) { // TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value. - return !!node.body && node.body.kind !== 223 /* Block */ && isContextSensitive(node.body); + return !ts.getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 223 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (ts.isInJSFile(func) && ts.isFunctionDeclaration(func) || isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) && @@ -46266,6 +47145,13 @@ var ts; if (target.symbol && ts.length(target.symbol.declarations)) { ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(target.symbol.declarations[0], ts.Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature)); } + if ((ts.getFunctionFlags(node) & 2 /* Async */) === 0 + // exclude cases where source itself is promisy - this way we don't make a suggestion when relating + // an IPromise and a Promise that are slightly different + && !getTypeOfPropertyOfType(sourceReturn, "then") + && checkTypeRelatedTo(createPromiseType(sourceReturn), targetReturn, relation, /*errorNode*/ undefined)) { + ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async)); + } return true; } } @@ -46523,11 +47409,20 @@ var ts; return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); } // recreate a tuple from the elements, if possible - var tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, /*forceTuple*/ true); - if (isTupleLikeType(tupleizedType)) { - return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + // Since we're re-doing the expression type, we need to reapply the contextual type + var oldContext = node.contextualType; + node.contextualType = target; + try { + var tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, /*forceTuple*/ true); + node.contextualType = oldContext; + if (isTupleLikeType(tupleizedType)) { + return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + } + return false; + } + finally { + node.contextualType = oldContext; } - return false; } function generateObjectLiteralElements(node) { var _i, _a, prop, type, _b; @@ -46873,11 +47768,18 @@ var ts; if (isFreshLiteralType(target)) { target = target.regularType; } - if (source === target || - relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || - relation !== identityRelation && isSimpleTypeRelatedTo(source, target, relation)) { + if (source === target) { return true; } + if (relation !== identityRelation) { + if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation)) { + return true; + } + } + else { + if (!(source.flags === target.flags && source.flags & 66584576 /* Substructure */)) + return false; + } if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) { var related = relation.get(getRelationKey(source, target, 0 /* None */, relation)); if (related !== undefined) { @@ -46893,11 +47795,17 @@ var ts; return ts.getObjectFlags(source) & 4096 /* JsxAttributes */ && !isUnhyphenatedJsxName(sourceProp.escapedName); } function getNormalizedType(type, writing) { - return isFreshLiteralType(type) ? type.regularType : - ts.getObjectFlags(type) & 4 /* Reference */ && type.node ? createTypeReference(type.target, getTypeArguments(type)) : - type.flags & 33554432 /* Substitution */ ? writing ? type.typeVariable : type.substitute : - type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : - type; + do { + var t = isFreshLiteralType(type) ? type.regularType : + ts.getObjectFlags(type) & 4 /* Reference */ && type.node ? createTypeReference(type.target, getTypeArguments(type)) : + type.flags & 33554432 /* Substitution */ ? writing ? type.typeVariable : type.substitute : + type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : + type; + if (t === type) + break; + type = t; + } while (true); + return type; } /** * Checks if 'source' is related to 'target' (e.g.: is a assignable to). @@ -47185,6 +48093,11 @@ var ts; // side) or the type variable (on the target side). var source = getNormalizedType(originalSource, /*writing*/ false); var target = getNormalizedType(originalTarget, /*writing*/ true); + if (source === target) + return -1 /* True */; + if (relation === identityRelation) { + return isIdenticalTo(source, target); + } // Try to see if we're relating something like `Foo` -> `Bar | null | undefined`. // If so, reporting the `null` and `undefined` in the type is hardly useful. // First, see if we're even relating an object type to a union. @@ -47198,15 +48111,11 @@ var ts; target.types.length <= 3 && maybeTypeOfKind(target, 98304 /* Nullable */)) { var nullStrippedTarget = extractTypesOfKind(target, ~98304 /* Nullable */); if (!(nullStrippedTarget.flags & (1048576 /* Union */ | 131072 /* Never */))) { + if (source === nullStrippedTarget) + return -1 /* True */; target = nullStrippedTarget; } } - // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases - if (source === target) - return -1 /* True */; - if (relation === identityRelation) { - return isIdenticalTo(source, target); - } if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation, reportErrors ? reportError : undefined)) return -1 /* True */; @@ -47347,19 +48256,18 @@ var ts; return result; } function isIdenticalTo(source, target) { - var result; var flags = source.flags & target.flags; - if (flags & 524288 /* Object */ || flags & 8388608 /* IndexedAccess */ || flags & 16777216 /* Conditional */ || flags & 4194304 /* Index */ || flags & 33554432 /* Substitution */) { - return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, 0 /* None */); + if (!(flags & 66584576 /* Substructure */)) { + return 0 /* False */; } - if (flags & (1048576 /* Union */ | 2097152 /* Intersection */)) { - if (result = eachTypeRelatedToSomeType(source, target)) { - if (result &= eachTypeRelatedToSomeType(target, source)) { - return result; - } + if (flags & 3145728 /* UnionOrIntersection */) { + var result_3 = eachTypeRelatedToSomeType(source, target); + if (result_3) { + result_3 &= eachTypeRelatedToSomeType(target, source); } + return result_3; } - return 0 /* False */; + return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, 0 /* None */); } function getTypeOfPropertyInTypes(types, name) { var appendPropType = function (propTypes, type) { @@ -47386,7 +48294,7 @@ var ts; checkTypes = reducedTarget.flags & 1048576 /* Union */ ? reducedTarget.types : [reducedTarget]; } var _loop_11 = function (prop) { - if (shouldCheckAsExcessProperty(prop, source.symbol)) { + if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) { if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) { if (reportErrors) { // Report error in terms of object types in the target as those are the only ones @@ -47676,21 +48584,21 @@ var ts; if (flags & 4194304 /* Index */) { return isRelatedTo(source.type, target.type, /*reportErrors*/ false); } - var result_3 = 0 /* False */; + var result_4 = 0 /* False */; if (flags & 8388608 /* IndexedAccess */) { - if (result_3 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { + return result_4; } } } if (flags & 16777216 /* Conditional */) { if (source.root.isDistributive === target.root.isDistributive) { - if (result_3 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { + return result_4; } } } @@ -47969,11 +48877,11 @@ var ts; // with respect to T. We do not report errors here, as we will use the existing // error result from checking each constituent of the union. if (source.flags & (524288 /* Object */ | 2097152 /* Intersection */) && target.flags & 1048576 /* Union */) { - var objectOnlyTarget = extractTypesOfKind(target, 524288 /* Object */); + var objectOnlyTarget = extractTypesOfKind(target, 524288 /* Object */ | 2097152 /* Intersection */ | 33554432 /* Substitution */); if (objectOnlyTarget.flags & 1048576 /* Union */) { - var result_4 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); - if (result_4) { - return result_4; + var result_5 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); + if (result_5) { + return result_5; } } } @@ -48040,12 +48948,12 @@ var ts; var modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source) === getMappedTypeModifiers(target) : getCombinedMappedTypeOptionality(source) <= getCombinedMappedTypeOptionality(target)); if (modifiersRelated) { - var result_5; + var result_6; var targetConstraint = getConstraintTypeFromMappedType(target); var sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMarkers : reportUnreliableMarkers); - if (result_5 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { + if (result_6 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]); - return result_5 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); + return result_6 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); } } return 0 /* False */; @@ -48060,7 +48968,7 @@ var ts; // // NOTE: See ~/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts // for examples. - var sourceProperties = getPropertiesOfObjectType(source); + var sourceProperties = getPropertiesOfType(source); var sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target); if (!sourcePropertiesFiltered) return 0 /* False */; @@ -48099,7 +49007,7 @@ var ts; var type = _a[_i]; var _loop_13 = function (i) { var sourceProperty = sourcePropertiesFiltered[i]; - var targetProperty = getPropertyOfObjectType(type, sourceProperty.escapedName); + var targetProperty = getPropertyOfType(type, sourceProperty.escapedName); if (!targetProperty) return "continue-outer"; if (sourceProperty === targetProperty) @@ -48176,10 +49084,10 @@ var ts; if (ts.getCheckFlags(targetProp) & 65536 /* DeferredType */ && !getSymbolLinks(targetProp).type) { // Rather than resolving (and normalizing) the type, relate constituent-by-constituent without performing normalization or seconadary passes var links = getSymbolLinks(targetProp); - ts.Debug.assertDefined(links.deferralParent); - ts.Debug.assertDefined(links.deferralConstituents); + ts.Debug.assertIsDefined(links.deferralParent); + ts.Debug.assertIsDefined(links.deferralConstituents); var unionParent = !!(links.deferralParent.flags & 1048576 /* Union */); - var result_6 = unionParent ? 0 /* False */ : -1 /* True */; + var result_7 = unionParent ? 0 /* False */ : -1 /* True */; var targetTypes = links.deferralConstituents; for (var _i = 0, targetTypes_3 = targetTypes; _i < targetTypes_3.length; _i++) { var targetType = targetTypes_3[_i]; @@ -48189,7 +49097,7 @@ var ts; // Can't assign to a target individually - have to fallback to assigning to the _whole_ intersection (which forces normalization) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - result_6 &= related; + result_7 &= related; } else { if (related) { @@ -48197,17 +49105,17 @@ var ts; } } } - if (unionParent && !result_6 && targetIsOptional) { - result_6 = isRelatedTo(source, undefinedType); + if (unionParent && !result_7 && targetIsOptional) { + result_7 = isRelatedTo(source, undefinedType); } - if (unionParent && !result_6 && reportErrors) { + if (unionParent && !result_7 && reportErrors) { // The easiest way to get the right errors here is to un-defer (which may be costly) // If it turns out this is too costly too often, we can replicate the error handling logic within // typeRelatedToSomeType without the discriminatable type branch (as that requires a manifest union // type on which to hand discriminable properties, which we are expressly trying to avoid here) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - return result_6; + return result_7; } else { return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors, /*headMessage*/ undefined, intersectionState); @@ -48280,13 +49188,14 @@ var ts; if (unmatchedProperty.valueDeclaration && ts.isNamedDeclaration(unmatchedProperty.valueDeclaration) && ts.isPrivateIdentifier(unmatchedProperty.valueDeclaration.name) - && ts.isClassDeclaration(source.symbol.valueDeclaration)) { + && source.symbol + && source.symbol.flags & 32 /* Class */) { var privateIdentifierDescription = unmatchedProperty.valueDeclaration.name.escapedText; var symbolTableKey = ts.getSymbolNameForPrivateIdentifier(source.symbol, privateIdentifierDescription); - if (symbolTableKey && !!getPropertyOfType(source, symbolTableKey)) { - var sourceName = source.symbol.valueDeclaration.name; - var targetName = ts.isClassDeclaration(target.symbol.valueDeclaration) ? target.symbol.valueDeclaration.name : undefined; - reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName || anon), diagnosticName(targetName || anon)); + if (symbolTableKey && getPropertyOfType(source, symbolTableKey)) { + var sourceName = ts.getDeclarationName(source.symbol.valueDeclaration); + var targetName = ts.getDeclarationName(target.symbol.valueDeclaration); + reportError(ts.Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, diagnosticName(privateIdentifierDescription), diagnosticName(sourceName.escapedText === "" ? anon : sourceName), diagnosticName(targetName.escapedText === "" ? anon : targetName)); return; } } @@ -48533,7 +49442,11 @@ var ts; for (var _i = 0, props_2 = props; _i < props_2.length; _i++) { var prop = props_2[_i]; // Skip over ignored JSX and symbol-named members - if (isIgnoredJsxProperty(source, prop) || prop.nameType && prop.nameType.flags & 8192 /* UniqueESSymbol */) { + if (isIgnoredJsxProperty(source, prop)) { + continue; + } + var nameType = getSymbolLinks(prop).nameType; + if (nameType && nameType.flags & 8192 /* UniqueESSymbol */) { continue; } if (kind === 0 /* String */ || isNumericLiteralName(prop.escapedName)) { @@ -48656,6 +49569,10 @@ var ts; // make sure exactly 1 matches before returning it return match === -1 || discriminable.indexOf(/*searchElement*/ true, match + 1) !== -1 ? defaultValue : target.types[match]; } + function isFromSpreadAssignment(prop, container) { + var _a; + return ((_a = prop.valueDeclaration) === null || _a === void 0 ? void 0 : _a.parent) !== container.valueDeclaration; + } /** * A type is 'weak' if it is an object type with at least one optional property * and no required properties, call/construct signatures or index signatures @@ -49153,7 +50070,7 @@ var ts; } /** * Check if a Type was written as a tuple type literal. - * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. + * Prefer using isTupleLikeType() unless the use of `elementTypes`/`getTypeArguments` is required. */ function isTupleType(type) { return !!(ts.getObjectFlags(type) & 4 /* Reference */ && type.target.objectFlags & 8 /* Tuple */); @@ -49299,8 +50216,9 @@ var ts; if (source.valueDeclaration) { symbol.valueDeclaration = source.valueDeclaration; } - if (source.nameType) { - symbol.nameType = source.nameType; + var nameType = getSymbolLinks(source).nameType; + if (nameType) { + symbol.nameType = nameType; } return symbol; } @@ -49682,17 +50600,18 @@ var ts; // results for union and intersection types for performance reasons. function couldContainTypeVariables(type) { var objectFlags = ts.getObjectFlags(type); - return !!(type.flags & 63176704 /* Instantiable */ || + if (objectFlags & 67108864 /* CouldContainTypeVariablesComputed */) { + return !!(objectFlags & 134217728 /* CouldContainTypeVariables */); + } + var result = !!(type.flags & 63176704 /* Instantiable */ || objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 131072 /* ObjectRestType */) || - type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && couldUnionOrIntersectionContainTypeVariables(type)); - } - function couldUnionOrIntersectionContainTypeVariables(type) { - if (type.couldContainTypeVariables === undefined) { - type.couldContainTypeVariables = ts.some(type.types, couldContainTypeVariables); + type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && ts.some(type.types, couldContainTypeVariables)); + if (type.flags & 3899393 /* ObjectFlagsType */) { + type.objectFlags |= 67108864 /* CouldContainTypeVariablesComputed */ | (result ? 134217728 /* CouldContainTypeVariables */ : 0); } - return type.couldContainTypeVariables; + return result; } function isTypeParameterAtTopLevel(type, typeParameter) { return !!(type === typeParameter || @@ -49838,6 +50757,12 @@ var ts; inference.contraCandidates ? getIntersectionType(inference.contraCandidates) : undefined; } + function hasSkipDirectInferenceFlag(node) { + return !!getNodeLinks(node).skipDirectInference; + } + function isFromInferenceBlockedSource(type) { + return !!(type.symbol && ts.some(type.symbol.declarations, hasSkipDirectInferenceFlag)); + } function inferTypes(inferences, originalSource, originalTarget, priority, contravariant) { if (priority === void 0) { priority = 0; } if (contravariant === void 0) { contravariant = false; } @@ -49929,7 +50854,7 @@ var ts; // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). if (ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ || source === nonInferrableAnyType || source === silentNeverType || - (priority & 32 /* ReturnType */ && (source === autoType || source === autoArrayType))) { + (priority & 32 /* ReturnType */ && (source === autoType || source === autoArrayType)) || isFromInferenceBlockedSource(source)) { return; } var inference = getInferenceInfoForType(target); @@ -50050,6 +50975,12 @@ var ts; invokeOnce(source, target, inferFromObjectTypes); } } + if (source.flags & 25165824 /* Simplifiable */) { + var simplified = getSimplifiedType(source, contravariant); + if (simplified !== source) { + inferFromTypes(simplified, target); + } + } } function inferWithPriority(source, target, newPriority) { var savePriority = priority; @@ -50227,7 +51158,7 @@ var ts; // type and then make a secondary inference from that type to T. We make a secondary inference // such that direct inferences to T get priority over inferences to Partial, for example. var inference = getInferenceInfoForType(constraintType.type); - if (inference && !inference.isFixed) { + if (inference && !inference.isFixed && !isFromInferenceBlockedSource(source)) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { // We assign a lower priority to inferences made from types containing non-inferrable @@ -50389,7 +51320,7 @@ var ts; } } function isTypeOrBaseIdenticalTo(s, t) { - return isTypeIdenticalTo(s, t) || !!(s.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) && isTypeIdenticalTo(getBaseTypeOfLiteralType(s), t); + return isTypeIdenticalTo(s, t) || !!(t.flags & 4 /* String */ && s.flags & 128 /* StringLiteral */ || t.flags & 8 /* Number */ && s.flags & 256 /* NumberLiteral */); } function isTypeCloselyMatchedBy(s, t) { return !!(s.flags & 524288 /* Object */ && t.flags & 524288 /* Object */ && s.symbol && s.symbol === t.symbol || @@ -51159,6 +52090,8 @@ var ts; return getExplicitTypeOfSymbol(symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol, diagnostic); case 104 /* ThisKeyword */: return getExplicitThisType(node); + case 102 /* SuperKeyword */: + return checkSuperExpression(node); case 194 /* PropertyAccessExpression */: var type = getTypeOfDottedName(node.expression, diagnostic); var prop = type && getPropertyOfType(type, node.name.escapedText); @@ -51214,14 +52147,11 @@ var ts; diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis)); } function isReachableFlowNode(flow) { - var result = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); + var result = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ false); lastFlowNode = flow; lastFlowNodeReachable = result; return result; } - function isUnlockedReachableFlowNode(flow) { - return !(flow.flags & 4096 /* PreFinally */ && flow.lock.locked) && isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); - } function isFalseExpression(expr) { var node = ts.skipParentheses(expr); return node.kind === 91 /* FalseKeyword */ || node.kind === 209 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || @@ -51233,15 +52163,15 @@ var ts; return lastFlowNodeReachable; } var flags = flow.flags; - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { if (!noCacheCheck) { var id = getFlowNodeId(flow); var reachable = flowNodeReachable[id]; - return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ true)); + return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ true)); } noCacheCheck = false; } - if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */ | 4096 /* PreFinally */)) { + if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */)) { flow = flow.antecedent; } else if (flags & 512 /* Call */) { @@ -51262,7 +52192,7 @@ var ts; } else if (flags & 4 /* BranchLabel */) { // A branching point is reachable if any branch is reachable. - return ts.some(flow.antecedents, isUnlockedReachableFlowNode); + return ts.some(flow.antecedents, function (f) { return isReachableFlowNodeWorker(f, /*noCacheCheck*/ false); }); } else if (flags & 8 /* LoopLabel */) { // A loop is reachable if the control flow path that leads to the top is reachable. @@ -51276,12 +52206,14 @@ var ts; } flow = flow.antecedent; } - else if (flags & 8192 /* AfterFinally */) { - // Cache is unreliable once we start locking nodes + else if (flags & 1024 /* ReduceLabel */) { + // Cache is unreliable once we start adjusting labels lastFlowNode = undefined; - flow.locked = true; - var result = isReachableFlowNodeWorker(flow.antecedent, /*skipCacheCheck*/ false); - flow.locked = false; + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; + var result = isReachableFlowNodeWorker(flow.antecedent, /*noCacheCheck*/ false); + target.antecedents = saveAntecedents; return result; } else { @@ -51331,7 +52263,7 @@ var ts; flowDepth++; while (true) { var flags = flow.flags; - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { // We cache results of flow type resolution for shared nodes that were previously visited in // the same getFlowTypeOfReference invocation. A node is considered shared when it is the // antecedent of more than one node. @@ -51343,19 +52275,7 @@ var ts; } } var type = void 0; - if (flags & 8192 /* AfterFinally */) { - // block flow edge: finally -> pre-try (for larger explanation check comment in binder.ts - bindTryStatement - flow.locked = true; - type = getTypeAtFlowNode(flow.antecedent); - flow.locked = false; - } - else if (flags & 4096 /* PreFinally */) { - // locked pre-finally flows are filtered out in getTypeAtFlowBranchLabel - // so here just redirect to antecedent - flow = flow.antecedent; - continue; - } - else if (flags & 16 /* Assignment */) { + if (flags & 16 /* Assignment */) { type = getTypeAtFlowAssignment(flow); if (!type) { flow = flow.antecedent; @@ -51391,6 +52311,13 @@ var ts; continue; } } + else if (flags & 1024 /* ReduceLabel */) { + var target = flow.target; + var saveAntecedents = target.antecedents; + target.antecedents = flow.antecedents; + type = getTypeAtFlowNode(flow.antecedent); + target.antecedents = saveAntecedents; + } else if (flags & 2 /* Start */) { // Check if we should continue with the control flow of the containing function. var container = flow.node; @@ -51409,7 +52336,7 @@ var ts; // simply return the non-auto declared type to reduce follow-on errors. type = convertAutoToAny(declaredType); } - if (flags & 2048 /* Shared */) { + if (flags & 4096 /* Shared */) { // Record visited node and the associated type in the cache. sharedFlowNodes[sharedFlowCount] = flow; sharedFlowTypes[sharedFlowCount] = type; @@ -51593,12 +52520,6 @@ var ts; var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; - if (antecedent.flags & 4096 /* PreFinally */ && antecedent.lock.locked) { - // if flow correspond to branch from pre-try to finally and this branch is locked - this means that - // we initially have started following the flow outside the finally block. - // in this case we should ignore this branch. - continue; - } if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.clauseStart === antecedent.clauseEnd) { // The antecedent is the bypass branch of a potentially exhaustive switch statement. bypassFlow = antecedent; @@ -52278,12 +53199,19 @@ var ts; } /** remove undefined from the annotated type of a parameter when there is an initializer (that doesn't include undefined) */ function removeOptionalityFromDeclaredType(declaredType, declaration) { - var annotationIncludesUndefined = strictNullChecks && - declaration.kind === 156 /* Parameter */ && - declaration.initializer && - getFalsyFlags(declaredType) & 32768 /* Undefined */ && - !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768 /* Undefined */); - return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; + if (pushTypeResolution(declaration.symbol, 2 /* DeclaredType */)) { + var annotationIncludesUndefined = strictNullChecks && + declaration.kind === 156 /* Parameter */ && + declaration.initializer && + getFalsyFlags(declaredType) & 32768 /* Undefined */ && + !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768 /* Undefined */); + popTypeResolution(); + return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; + } + else { + reportCircularityError(declaration.symbol); + return declaredType; + } } function isConstraintPosition(node) { var parent = node.parent; @@ -52309,8 +53237,13 @@ var ts; return !!ts.findAncestor(location, function (e) { return e.parent && ts.isExportAssignment(e.parent) && e.parent.expression === e && ts.isEntityNameExpression(e); }); } function markAliasReferenced(symbol, location) { - if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && ((compilerOptions.preserveConstEnums && isExportOrExportExpression(location)) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol)))) { - markAliasSymbolAsReferenced(symbol); + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol)) { + if (compilerOptions.preserveConstEnums && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + markAliasSymbolAsReferenced(symbol); + } + else { + markConstEnumAliasAsReferenced(symbol); + } } } function checkIdentifier(node) { @@ -52649,7 +53582,7 @@ var ts; break; case 159 /* PropertyDeclaration */: case 158 /* PropertySignature */: - if (ts.hasModifier(container, 32 /* Static */)) { + if (ts.hasModifier(container, 32 /* Static */) && !(compilerOptions.target === 99 /* ESNext */ && compilerOptions.useDefineForClassFields)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks } @@ -53055,7 +53988,7 @@ var ts; } // In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the // contextual type for 'this' is 'obj'. - var parent = func.parent; + var parent = ts.walkUpParenthesizedExpressions(func.parent); if (parent.kind === 209 /* BinaryExpression */ && parent.operatorToken.kind === 62 /* EqualsToken */) { var target = parent.left; if (ts.isAccessExpression(target)) { @@ -53074,7 +54007,7 @@ var ts; return undefined; } // Return contextual type of parameter or undefined if no contextual type is available - function getContextuallyTypedParameterType(parameter, forCache) { + function getContextuallyTypedParameterType(parameter) { var func = parameter.parent; if (!isContextSensitiveFunctionOrObjectLiteralMethod(func)) { return undefined; @@ -53097,19 +54030,6 @@ var ts; } var contextualSignature = getContextualSignature(func); if (contextualSignature) { - if (forCache) { - // Calling the below guarantees the types are primed and assigned in the same way - // as when the parameter is reached via `checkFunctionExpressionOrObjectLiteralMethod`. - // This should prevent any uninstantiated inference variables in the contextual signature - // from leaking, and should lock in cached parameter types via `assignContextualParameterTypes` - // which we will then immediately use the results of below. - contextuallyCheckFunctionExpressionOrObjectLiteralMethod(func); - var type = getTypeOfSymbol(getMergedSymbol(func.symbol)); - if (isTypeAny(type)) { - return type; - } - contextualSignature = getSignaturesOfType(type, 0 /* Call */)[0]; - } var index = func.parameters.indexOf(parameter) - (ts.getThisParameter(func) ? 1 : 0); return parameter.dotDotDotToken && ts.lastOrUndefined(func.parameters) === parameter ? getRestTypeAtPosition(contextualSignature, index) : @@ -53123,7 +54043,7 @@ var ts; } switch (declaration.kind) { case 156 /* Parameter */: - return getContextuallyTypedParameterType(declaration, /*forCache*/ false); + return getContextuallyTypedParameterType(declaration); case 191 /* BindingElement */: return getContextualTypeForBindingElement(declaration); // By default, do nothing and return undefined - only parameters and binding elements have context implied by a parent @@ -53240,18 +54160,15 @@ var ts; return undefined; } // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg, contextFlags) { + function getContextualTypeForArgument(callTarget, arg) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); // -1 for e.g. the expression of a CallExpression, or the tag of a TaggedTemplateExpression - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { // If we're already in the process of resolving the given signature, don't resolve again as // that could cause infinite recursion. Instead, return anySignature. var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); - if (contextFlags && contextFlags & 4 /* BaseConstraint */ && signature.target && !ts.hasTypeArguments(callTarget)) { - signature = getBaseSignature(signature.target); - } if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } @@ -53613,7 +54530,7 @@ var ts; } /* falls through */ case 197 /* NewExpression */: - return getContextualTypeForArgument(parent, node, contextFlags); + return getContextualTypeForArgument(parent, node); case 199 /* TypeAssertionExpression */: case 217 /* AsExpression */: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -53655,13 +54572,13 @@ var ts; return ancestor && ancestor.inferenceContext; } function getContextualJsxElementAttributesType(node, contextFlags) { - if (ts.isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== 4 /* BaseConstraint */) { + if (ts.isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== 4 /* Completions */) { // Contextually applied type is moved from attributes up to the outer jsx attributes so when walking up from the children they get hit // _However_ to hit them from the _attributes_ we must look for them here; otherwise we'll used the declared type // (as below) instead! return node.parent.contextualType; } - return getContextualTypeForArgumentAtIndex(node, 0, contextFlags); + return getContextualTypeForArgumentAtIndex(node, 0); } function getEffectiveFirstArgumentForJsxSignature(signature, node) { return getJsxReferenceKind(node) !== 0 /* Component */ @@ -53867,58 +54784,73 @@ var ts; function checkArrayLiteral(node, checkMode, forceTuple) { var elements = node.elements; var elementCount = elements.length; - var hasNonEndingSpreadElement = false; var elementTypes = []; - var inDestructuringPattern = ts.isAssignmentTarget(node); + var hasEndingSpreadElement = false; + var hasNonEndingSpreadElement = false; var contextualType = getApparentTypeOfContextualType(node); + var inDestructuringPattern = ts.isAssignmentTarget(node); var inConstContext = isConstContext(node); - for (var index = 0; index < elementCount; index++) { - var e = elements[index]; - if (inDestructuringPattern && e.kind === 213 /* SpreadElement */) { - // Given the following situation: - // var c: {}; - // [...c] = ["", 0]; - // - // c is represented in the tree as a spread element in an array literal. - // But c really functions as a rest element, and its purpose is to provide - // a contextual type for the right hand side of the assignment. Therefore, - // instead of calling checkExpression on "...c", which will give an error - // if c is not iterable/array-like, we need to act as if we are trying to - // get the contextual element type from it. So we do something similar to - // getContextualTypeForElementExpression, which will crucially not error - // if there is no index type / iterated type. - var restArrayType = checkExpression(e.expression, checkMode, forceTuple); - var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) || - getIteratedTypeOrElementType(65 /* Destructuring */, restArrayType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); - if (restElementType) { - elementTypes.push(restElementType); + for (var i = 0; i < elementCount; i++) { + var e = elements[i]; + var spread = e.kind === 213 /* SpreadElement */ && e.expression; + var spreadType = spread && checkExpression(spread, checkMode, forceTuple); + if (spreadType && isTupleType(spreadType)) { + elementTypes.push.apply(elementTypes, getTypeArguments(spreadType)); + if (spreadType.target.hasRestElement) { + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; } } else { - var elementContextualType = getContextualTypeForElementExpression(contextualType, index); - var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); - elementTypes.push(type); - } - if (index < elementCount - 1 && e.kind === 213 /* SpreadElement */) { - hasNonEndingSpreadElement = true; + if (inDestructuringPattern && spreadType) { + // Given the following situation: + // var c: {}; + // [...c] = ["", 0]; + // + // c is represented in the tree as a spread element in an array literal. + // But c really functions as a rest element, and its purpose is to provide + // a contextual type for the right hand side of the assignment. Therefore, + // instead of calling checkExpression on "...c", which will give an error + // if c is not iterable/array-like, we need to act as if we are trying to + // get the contextual element type from it. So we do something similar to + // getContextualTypeForElementExpression, which will crucially not error + // if there is no index type / iterated type. + var restElementType = getIndexTypeOfType(spreadType, 1 /* Number */) || + getIteratedTypeOrElementType(65 /* Destructuring */, spreadType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); + if (restElementType) { + elementTypes.push(restElementType); + } + } + else { + var elementContextualType = getContextualTypeForElementExpression(contextualType, elementTypes.length); + var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); + elementTypes.push(type); + } + if (spread) { // tuples are done above, so these are only arrays + if (i === elementCount - 1) + hasEndingSpreadElement = true; + else + hasNonEndingSpreadElement = true; + } } } if (!hasNonEndingSpreadElement) { - var hasRestElement = elementCount > 0 && elements[elementCount - 1].kind === 213 /* SpreadElement */; - var minLength = elementCount - (hasRestElement ? 1 : 0); + var minLength = elementTypes.length - (hasEndingSpreadElement ? 1 : 0); // If array literal is actually a destructuring pattern, mark it as an implied type. We do this such // that we get the same behavior for "var [x, y] = []" and "[x, y] = []". var tupleResult = void 0; if (inDestructuringPattern && minLength > 0) { - var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasRestElement)); + var type = cloneTypeReference(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); type.pattern = node; return type; } - else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasRestElement, elementCount, inConstContext)) { + else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasEndingSpreadElement, elementTypes.length, inConstContext)) { return createArrayLiteralType(tupleResult); } else if (forceTuple) { - return createArrayLiteralType(createTupleType(elementTypes, minLength, hasRestElement)); + return createArrayLiteralType(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); } } return createArrayLiteralType(createArrayType(elementTypes.length ? @@ -54155,10 +55087,12 @@ var ts; } // If object literal is contextually typed by the implied type of a binding pattern, augment the result // type with those properties for which the binding pattern specifies a default value. - if (contextualTypeHasPattern) { + // If the object literal is spread into another object literal, skip this step and let the top-level object + // literal handle it instead. + if (contextualTypeHasPattern && node.parent.kind !== 283 /* SpreadAssignment */) { for (var _i = 0, _a = getPropertiesOfType(contextualType); _i < _a.length; _i++) { var prop = _a[_i]; - if (!propertiesTable.get(prop.escapedName) && !(spread && getPropertyOfType(spread, prop.escapedName))) { + if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } @@ -54209,6 +55143,7 @@ var ts; } function checkJsxSelfClosingElementDeferred(node) { checkJsxOpeningLikeElementOrOpeningFragment(node); + resolveUntypedCall(node); // ensure type arguments and parameters are typechecked, even if there is an arity error } function checkJsxSelfClosingElement(node, _checkMode) { checkNodeDeferred(node); @@ -54650,7 +55585,7 @@ var ts; // if jsx emit was not react as there wont be error being emitted reactSym.isReferenced = 67108863 /* All */; // If react symbol is alias, mark it as refereced - if (reactSym.flags & 2097152 /* Alias */) { + if (reactSym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(reactSym)) { markAliasSymbolAsReferenced(reactSym); } } @@ -54818,7 +55753,7 @@ var ts; return false; } var thisType = getTypeFromTypeNode(thisParameter.type); - enclosingClass = ((thisType.flags & 262144 /* TypeParameter */) ? getConstraintOfTypeParameter(thisType) : thisType); + enclosingClass = ((thisType.flags & 262144 /* TypeParameter */) ? getConstraintOfTypeParameter(thisType) : thisType).target; } // No further restrictions for static properties if (flags & 32 /* Static */) { @@ -55776,8 +56711,83 @@ var ts; // can be specified by users through attributes property. var paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); var attributesType = checkExpressionWithContextualType(node.attributes, paramType, /*inferenceContext*/ undefined, checkMode); - return checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, + return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, /*headMessage*/ undefined, containingMessageChain, errorOutputContainer); + function checkTagNameDoesNotExpectTooManyArguments() { + var _a; + var tagType = ts.isJsxOpeningElement(node) || ts.isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : undefined; + if (!tagType) { + return true; + } + var tagCallSignatures = getSignaturesOfType(tagType, 0 /* Call */); + if (!ts.length(tagCallSignatures)) { + return true; + } + var factory = getJsxFactoryEntity(node); + if (!factory) { + return true; + } + var factorySymbol = resolveEntityName(factory, 111551 /* Value */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, node); + if (!factorySymbol) { + return true; + } + var factoryType = getTypeOfSymbol(factorySymbol); + var callSignatures = getSignaturesOfType(factoryType, 0 /* Call */); + if (!ts.length(callSignatures)) { + return true; + } + var hasFirstParamSignatures = false; + var maxParamCount = 0; + // Check that _some_ first parameter expects a FC-like thing, and that some overload of the SFC expects an acceptable number of arguments + for (var _i = 0, callSignatures_1 = callSignatures; _i < callSignatures_1.length; _i++) { + var sig = callSignatures_1[_i]; + var firstparam = getTypeAtPosition(sig, 0); + var signaturesOfParam = getSignaturesOfType(firstparam, 0 /* Call */); + if (!ts.length(signaturesOfParam)) + continue; + for (var _b = 0, signaturesOfParam_1 = signaturesOfParam; _b < signaturesOfParam_1.length; _b++) { + var paramSig = signaturesOfParam_1[_b]; + hasFirstParamSignatures = true; + if (hasEffectiveRestParameter(paramSig)) { + return true; // some signature has a rest param, so function components can have an arbitrary number of arguments + } + var paramCount = getParameterCount(paramSig); + if (paramCount > maxParamCount) { + maxParamCount = paramCount; + } + } + } + if (!hasFirstParamSignatures) { + // Not a single signature had a first parameter which expected a signature - for back compat, and + // to guard against generic factories which won't have signatures directly, do not error + return true; + } + var absoluteMinArgCount = Infinity; + for (var _c = 0, tagCallSignatures_1 = tagCallSignatures; _c < tagCallSignatures_1.length; _c++) { + var tagSig = tagCallSignatures_1[_c]; + var tagRequiredArgCount = getMinArgumentCount(tagSig); + if (tagRequiredArgCount < absoluteMinArgCount) { + absoluteMinArgCount = tagRequiredArgCount; + } + } + if (absoluteMinArgCount <= maxParamCount) { + return true; // some signature accepts the number of arguments the function component provides + } + if (reportErrors) { + var diag = ts.createDiagnosticForNode(node.tagName, ts.Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, ts.entityNameToString(node.tagName), absoluteMinArgCount, ts.entityNameToString(factory), maxParamCount); + var tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) === null || _a === void 0 ? void 0 : _a.valueDeclaration; + if (tagNameDeclaration) { + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(tagNameDeclaration, ts.Diagnostics._0_is_declared_here, ts.entityNameToString(node.tagName))); + } + if (errorOutputContainer && errorOutputContainer.skipLogging) { + (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); + } + if (!errorOutputContainer.skipLogging) { + diagnostics.add(diag); + } + } + return false; + } } function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors, containingMessageChain) { var errorOutputContainer = { errors: undefined, skipLogging: true }; @@ -56258,7 +57268,7 @@ var ts; } } } - return produceDiagnostics || !args ? resolveErrorCall(node) : getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); + return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); function chooseOverload(candidates, relation, signatureHelpTrailingComma) { if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; } candidatesForArgumentError = undefined; @@ -56340,9 +57350,9 @@ var ts; } } // No signature was applicable. We have already reported the errors for the invalid signature. - // If this is a type resolution session, e.g. Language Service, try to get better information than anySignature. function getCandidateForOverloadFailure(node, candidates, args, hasCandidatesOutArray) { ts.Debug.assert(candidates.length > 0); // Else should not have called this. + checkNodeDeferred(node); // Normally we will combine overloads. Skip this if they have type parameters since that's hard to combine. // Don't do this if there is a `candidatesOutArray`, // because then we want the chosen best candidate to be one of the overloads, not a combination. @@ -56517,7 +57527,7 @@ var ts; if (node.arguments.length === 1) { var text = ts.getSourceFileOfNode(node).text; if (ts.isLineBreak(text.charCodeAt(ts.skipTrivia(text, node.expression.end, /* stopAfterLineBreak */ true) - 1))) { - relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.It_is_highly_likely_that_you_are_missing_a_semicolon); + relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.Are_you_missing_a_semicolon); } } invocationError(node.expression, apparentType, 0 /* Call */, relatedInformation); @@ -57406,15 +58416,15 @@ var ts; if (!parameter) { signature.thisParameter = createSymbolWithType(context.thisParameter, /*type*/ undefined); } - assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); + assignParameterType(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { - var contextualParameterType = getTypeAtPosition(context, i); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + var contextualParameterType = tryGetTypeAtPosition(context, i); + assignParameterType(parameter, contextualParameterType); } } if (signatureHasRestParameter(signature)) { @@ -57422,7 +58432,30 @@ var ts; var parameter = ts.last(signature.parameters); if (ts.isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { var contextualParameterType = getRestTypeAtPosition(context, len); - assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); + assignParameterType(parameter, contextualParameterType); + } + } + } + function assignNonContextualParameterTypes(signature) { + if (signature.thisParameter) { + assignParameterType(signature.thisParameter); + } + for (var _i = 0, _a = signature.parameters; _i < _a.length; _i++) { + var parameter = _a[_i]; + assignParameterType(parameter); + } + } + function assignParameterType(parameter, type) { + var links = getSymbolLinks(parameter); + if (!links.type) { + var declaration = parameter.valueDeclaration; + links.type = type || getWidenedTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true); + if (declaration.name.kind !== 75 /* Identifier */) { + // if inference didn't come up with anything but unknown, fall back to the binding pattern if present. + if (links.type === unknownType) { + links.type = getTypeFromBindingPattern(declaration.name); + } + assignBindingElementTypes(declaration.name); } } } @@ -57441,20 +58474,6 @@ var ts; } } } - function assignTypeToParameterAndFixTypeParameters(parameter, contextualType) { - var links = getSymbolLinks(parameter); - if (!links.type) { - links.type = contextualType; - var decl = parameter.valueDeclaration; - if (decl.name.kind !== 75 /* Identifier */) { - // if inference didn't come up with anything but unknown, fall back to the binding pattern if present. - if (links.type === unknownType) { - links.type = getTypeFromBindingPattern(decl.name); - } - assignBindingElementTypes(decl.name); - } - } - } function createPromiseType(promisedType) { // creates a `Promise` type where `T` is the promisedType argument var globalPromiseType = getGlobalPromiseType(/*reportErrors*/ true); @@ -57816,7 +58835,7 @@ var ts; // The identityMapper object is used to indicate that function expressions are wildcards if (checkMode && checkMode & 4 /* SkipContextSensitive */ && isContextSensitive(node)) { // Skip parameters, return signature with return type that retains noncontextual parts so inferences can still be drawn in an early stage - if (!ts.getEffectiveReturnTypeNode(node) && hasContextSensitiveReturnExpression(node)) { + if (!ts.getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) { // Return plain anyFunctionType if there is no possibility we'll make inferences from the return type var contextualSignature = getContextualSignature(node); if (contextualSignature && couldContainTypeVariables(getReturnTypeOfSignature(contextualSignature))) { @@ -57838,12 +58857,8 @@ var ts; if (!hasGrammarError && node.kind === 201 /* FunctionExpression */) { checkGrammarForGenerator(node); } - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return type; - } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); - return type; + return getTypeOfSymbol(getSymbolOfNode(node)); } function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) { var links = getNodeLinks(node); @@ -57855,13 +58870,12 @@ var ts; // already assigned contextual types. if (!(links.flags & 1024 /* ContextChecked */)) { links.flags |= 1024 /* ContextChecked */; - if (contextualSignature) { - var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); - if (isTypeAny(type)) { - return; - } - var signature = getSignaturesOfType(type, 0 /* Call */)[0]; - if (isContextSensitive(node)) { + var signature = ts.firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfNode(node)), 0 /* Call */)); + if (!signature) { + return; + } + if (isContextSensitive(node)) { + if (contextualSignature) { var inferenceContext = getInferenceContext(node); if (checkMode && checkMode & 2 /* Inferential */) { inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext); @@ -57870,11 +58884,15 @@ var ts; instantiateSignature(contextualSignature, inferenceContext.mapper) : contextualSignature; assignContextualParameterTypes(signature, instantiatedContextualSignature); } - if (!getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { - var returnType = getReturnTypeFromBody(node, checkMode); - if (!signature.resolvedReturnType) { - signature.resolvedReturnType = returnType; - } + else { + // Force resolution of all parameter types such that the absence of a contextual type is consistently reflected. + assignNonContextualParameterTypes(signature); + } + } + if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { + var returnType = getReturnTypeFromBody(node, checkMode); + if (!signature.resolvedReturnType) { + signature.resolvedReturnType = returnType; } } checkSignatureDeclaration(node); @@ -58190,7 +59208,7 @@ var ts; // Return true if type might be of the given kind. A union or intersection type might be of a given // kind if at least one constituent type is of the given kind. function maybeTypeOfKind(type, kind) { - if (type.flags & kind & ~131072 /* GenericMappedType */ || kind & 131072 /* GenericMappedType */ && isGenericMappedType(type)) { + if (type.flags & kind) { return true; } if (type.flags & 3145728 /* UnionOrIntersection */) { @@ -58487,12 +59505,81 @@ var ts; function isTypeEqualityComparableTo(source, target) { return (target.flags & 98304 /* Nullable */) !== 0 || isTypeComparableTo(source, target); } + var CheckBinaryExpressionState; + (function (CheckBinaryExpressionState) { + CheckBinaryExpressionState[CheckBinaryExpressionState["MaybeCheckLeft"] = 0] = "MaybeCheckLeft"; + CheckBinaryExpressionState[CheckBinaryExpressionState["CheckRight"] = 1] = "CheckRight"; + CheckBinaryExpressionState[CheckBinaryExpressionState["FinishCheck"] = 2] = "FinishCheck"; + })(CheckBinaryExpressionState || (CheckBinaryExpressionState = {})); function checkBinaryExpression(node, checkMode) { - if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { - return checkExpression(node.right, checkMode); + var workStacks = { + expr: [node], + state: [0 /* MaybeCheckLeft */], + leftType: [undefined] + }; + var stackIndex = 0; + var lastResult; + while (stackIndex >= 0) { + node = workStacks.expr[stackIndex]; + switch (workStacks.state[stackIndex]) { + case 0 /* MaybeCheckLeft */: { + if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) { + finishInvocation(checkExpression(node.right, checkMode)); + break; + } + checkGrammarNullishCoalesceWithLogicalExpression(node); + var operator = node.operatorToken.kind; + if (operator === 62 /* EqualsToken */ && (node.left.kind === 193 /* ObjectLiteralExpression */ || node.left.kind === 192 /* ArrayLiteralExpression */)) { + finishInvocation(checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 104 /* ThisKeyword */)); + break; + } + advanceState(1 /* CheckRight */); + maybeCheckExpression(node.left); + break; + } + case 1 /* CheckRight */: { + var leftType = lastResult; + workStacks.leftType[stackIndex] = leftType; + var operator = node.operatorToken.kind; + if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { + checkTruthinessOfType(leftType, node.left); + } + advanceState(2 /* FinishCheck */); + maybeCheckExpression(node.right); + break; + } + case 2 /* FinishCheck */: { + var leftType = workStacks.leftType[stackIndex]; + var rightType = lastResult; + finishInvocation(checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node)); + break; + } + default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for checkBinaryExpression"); + } + } + return lastResult; + function finishInvocation(result) { + lastResult = result; + stackIndex--; + } + /** + * Note that `advanceState` sets the _current_ head state, and that `maybeCheckExpression` potentially pushes on a new + * head state; so `advanceState` must be called before any `maybeCheckExpression` during a state's execution. + */ + function advanceState(nextState) { + workStacks.state[stackIndex] = nextState; + } + function maybeCheckExpression(node) { + if (ts.isBinaryExpression(node)) { + stackIndex++; + workStacks.expr[stackIndex] = node; + workStacks.state[stackIndex] = 0 /* MaybeCheckLeft */; + workStacks.leftType[stackIndex] = undefined; + } + else { + lastResult = checkExpression(node, checkMode); + } } - checkGrammarNullishCoalesceWithLogicalExpression(node); - return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, checkMode, node); } function checkGrammarNullishCoalesceWithLogicalExpression(node) { var left = node.left, operatorToken = node.operatorToken, right = node.right; @@ -58505,6 +59592,8 @@ var ts; } } } + // Note that this and `checkBinaryExpression` above should behave mostly the same, except this elides some + // expression-wide checks and does not use a work stack to fold nested binary expressions into the same callstack frame function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { var operator = operatorToken.kind; if (operator === 62 /* EqualsToken */ && (left.kind === 193 /* ObjectLiteralExpression */ || left.kind === 192 /* ArrayLiteralExpression */)) { @@ -58518,6 +59607,10 @@ var ts; leftType = checkExpression(left, checkMode); } var rightType = checkExpression(right, checkMode); + return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode); + } + function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode) { + var operator = operatorToken.kind; switch (operator) { case 41 /* AsteriskToken */: case 42 /* AsteriskAsteriskToken */: @@ -58888,7 +59981,8 @@ var ts; return getContextualIterationType(2 /* Next */, func) || anyType; } function checkConditionalExpression(node, checkMode) { - checkTruthinessExpression(node.condition); + var type = checkTruthinessExpression(node.condition); + checkTestingKnownTruthyCallableType(node.condition, node.whenTrue, type); var type1 = checkExpression(node.whenTrue, checkMode); var type2 = checkExpression(node.whenFalse, checkMode); return getUnionType([type1, type2], 2 /* Subtype */); @@ -58916,17 +60010,24 @@ var ts; var context = getContextNode(node); var saveContextualType = context.contextualType; var saveInferenceContext = context.inferenceContext; - context.contextualType = contextualType; - context.inferenceContext = inferenceContext; - var type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0)); - // We strip literal freshness when an appropriate contextual type is present such that contextually typed - // literals always preserve their literal types (otherwise they might widen during type inference). An alternative - // here would be to not mark contextually typed literals as fresh in the first place. - var result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? - getRegularTypeOfLiteralType(type) : type; - context.contextualType = saveContextualType; - context.inferenceContext = saveInferenceContext; - return result; + try { + context.contextualType = contextualType; + context.inferenceContext = inferenceContext; + var type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0)); + // We strip literal freshness when an appropriate contextual type is present such that contextually typed + // literals always preserve their literal types (otherwise they might widen during type inference). An alternative + // here would be to not mark contextually typed literals as fresh in the first place. + var result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node)) ? + getRegularTypeOfLiteralType(type) : type; + return result; + } + finally { + // In the event our operation is canceled or some other exception occurs, reset the contextual type + // so that we do not accidentally hold onto an instance of the checker, as a Type created in the services layer + // may hold onto the checker that created it. + context.contextualType = saveContextualType; + context.inferenceContext = saveInferenceContext; + } } function checkExpressionCached(node, checkMode) { var links = getNodeLinks(node); @@ -59248,9 +60349,16 @@ var ts; } var saveContextualType = node.contextualType; node.contextualType = anyType; - var type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */); - node.contextualType = saveContextualType; - return type; + try { + var type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */); + return type; + } + finally { + // In the event our operation is canceled or some other exception occurs, reset the contextual type + // so that we do not accidentally hold onto an instance of the checker, as a Type created in the services layer + // may hold onto the checker that created it. + node.contextualType = saveContextualType; + } } function checkExpression(node, checkMode, forceTuple) { var saveCurrentNode = currentNode; @@ -60112,7 +61220,7 @@ var ts; getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return ts.hasModifier(node, 8 /* Private */) && !!(node.flags & 8388608 /* Ambient */); + return (ts.hasModifier(node, 8 /* Private */) || ts.isPrivateIdentifierPropertyDeclaration(node)) && !!(node.flags & 8388608 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedModifierFlags(n); @@ -60405,9 +61513,9 @@ var ts; case 247 /* TypeAliasDeclaration */: // A jsdoc typedef and callback are, by definition, type aliases. // falls through - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return 2 /* ExportType */; case 249 /* ModuleDeclaration */: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ @@ -60415,6 +61523,7 @@ var ts; : 4 /* ExportNamespace */; case 245 /* ClassDeclaration */: case 248 /* EnumDeclaration */: + case 284 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; case 290 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; @@ -60429,10 +61538,10 @@ var ts; case 253 /* ImportEqualsDeclaration */: case 256 /* NamespaceImport */: case 255 /* ImportClause */: - var result_7 = 0 /* None */; + var result_8 = 0 /* None */; var target = resolveAlias(getSymbolOfNode(d)); - ts.forEach(target.declarations, function (d) { result_7 |= getDeclarationSpaces(d); }); - return result_7; + ts.forEach(target.declarations, function (d) { result_8 |= getDeclarationSpaces(d); }); + return result_8; case 242 /* VariableDeclaration */: case 191 /* BindingElement */: case 244 /* FunctionDeclaration */: @@ -60755,7 +61864,8 @@ var ts; if (rootSymbol && rootSymbol.flags & 2097152 /* Alias */ && symbolIsValue(rootSymbol) - && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol))) { + && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol)) + && !getTypeOnlyAliasDeclaration(rootSymbol)) { markAliasSymbolAsReferenced(rootSymbol); } } @@ -60949,6 +62059,13 @@ var ts; } checkSignatureDeclaration(node); } + function checkJSDocImplementsTag(node) { + var classLike = ts.getJSDocHost(node); + if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { + error(classLike, ts.Diagnostics.JSDoc_0_is_not_attached_to_a_class, ts.idText(node.tagName)); + return; + } + } function checkJSDocAugmentsTag(node) { var classLike = ts.getJSDocHost(node); if (!ts.isClassDeclaration(classLike) && !ts.isClassExpression(classLike)) { @@ -61121,7 +62238,9 @@ var ts; break; } var symbol = getSymbolOfNode(member); - if (!symbol.isReferenced && (ts.hasModifier(member, 8 /* Private */) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name))) { + if (!symbol.isReferenced + && (ts.hasModifier(member, 8 /* Private */) || ts.isNamedDeclaration(member) && ts.isPrivateIdentifier(member.name)) + && !(member.flags & 8388608 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, ts.createDiagnosticForNode(member.name, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; @@ -61686,21 +62805,21 @@ var ts; // Grammar checking checkGrammarStatementInAmbientContext(node); var type = checkTruthinessExpression(node.expression); - checkTestingKnownTruthyCallableType(node, type); + checkTestingKnownTruthyCallableType(node.expression, node.thenStatement, type); checkSourceElement(node.thenStatement); if (node.thenStatement.kind === 224 /* EmptyStatement */) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); } - function checkTestingKnownTruthyCallableType(ifStatement, type) { + function checkTestingKnownTruthyCallableType(condExpr, body, type) { if (!strictNullChecks) { return; } - var testedNode = ts.isIdentifier(ifStatement.expression) - ? ifStatement.expression - : ts.isPropertyAccessExpression(ifStatement.expression) - ? ifStatement.expression.name + var testedNode = ts.isIdentifier(condExpr) + ? condExpr + : ts.isPropertyAccessExpression(condExpr) + ? condExpr.name : undefined; if (!testedNode) { return; @@ -61722,7 +62841,7 @@ var ts; if (!testedFunctionSymbol) { return; } - var functionIsUsedInBody = ts.forEachChild(ifStatement.thenStatement, function check(childNode) { + var functionIsUsedInBody = ts.forEachChild(body, function check(childNode) { if (ts.isIdentifier(childNode)) { var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol.id === testedFunctionSymbol.id) { @@ -61732,7 +62851,7 @@ var ts; return ts.forEachChild(childNode, check); }); if (!functionIsUsedInBody) { - error(ifStatement.expression, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); + error(condExpr, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); } } function checkDoStatement(node) { @@ -61747,13 +62866,15 @@ var ts; checkTruthinessExpression(node.expression); checkSourceElement(node.statement); } - function checkTruthinessExpression(node, checkMode) { - var type = checkExpression(node, checkMode); + function checkTruthinessOfType(type, node) { if (type.flags & 16384 /* Void */) { error(node, ts.Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); } return type; } + function checkTruthinessExpression(node, checkMode) { + return checkTruthinessOfType(checkExpression(node, checkMode), node); + } function checkForStatement(node) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { @@ -62053,6 +63174,12 @@ var ts; } return noIterationTypes; } + function getCachedIterationTypes(type, cacheKey) { + return type[cacheKey]; + } + function setCachedIterationTypes(type, cacheKey, cachedTypes) { + return type[cacheKey] = cachedTypes; + } /** * Gets the *yield*, *return*, and *next* types from an `Iterable`-like or `AsyncIterable`-like type. * @@ -62089,7 +63216,7 @@ var ts; return iterationTypes_1; } var cacheKey = use & 2 /* AllowsAsyncIterablesFlag */ ? "iterationTypesOfAsyncIterable" : "iterationTypesOfIterable"; - var cachedTypes = type[cacheKey]; + var cachedTypes = getCachedIterationTypes(type, cacheKey); if (cachedTypes) return cachedTypes === noIterationTypes ? undefined : cachedTypes; var allIterationTypes; @@ -62107,7 +63234,7 @@ var ts; } } var iterationTypes = allIterationTypes ? combineIterationTypes(allIterationTypes) : noIterationTypes; - type[cacheKey] = iterationTypes; + setCachedIterationTypes(type, cacheKey, iterationTypes); return iterationTypes === noIterationTypes ? undefined : iterationTypes; } function getAsyncFromSyncIterationTypes(iterationTypes, errorNode) { @@ -62146,7 +63273,7 @@ var ts; if (use & 2 /* AllowsAsyncIterablesFlag */) { // for a sync iterable in an async context, only use the cached types if they are valid. if (iterationTypes !== noIterationTypes) { - return type.iterationTypesOfAsyncIterable = getAsyncFromSyncIterationTypes(iterationTypes, errorNode); + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", getAsyncFromSyncIterationTypes(iterationTypes, errorNode)); } } else { @@ -62164,9 +63291,9 @@ var ts; var iterationTypes = getIterationTypesOfIterableSlow(type, syncIterationTypesResolver, errorNode); if (iterationTypes !== noIterationTypes) { if (use & 2 /* AllowsAsyncIterablesFlag */) { - return type.iterationTypesOfAsyncIterable = iterationTypes + return setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", iterationTypes ? getAsyncFromSyncIterationTypes(iterationTypes, errorNode) - : noIterationTypes; + : noIterationTypes); } else { return iterationTypes; @@ -62183,7 +63310,7 @@ var ts; * `getIterationTypesOfIterable` instead. */ function getIterationTypesOfIterableCached(type, resolver) { - return type[resolver.iterableCacheKey]; + return getCachedIterationTypes(type, resolver.iterableCacheKey); } function getIterationTypesOfGlobalIterableType(globalType, resolver) { var globalIterationTypes = getIterationTypesOfIterableCached(globalType, resolver) || @@ -62216,14 +63343,14 @@ var ts; // While we define these as `any` and `undefined` in our libs by default, a custom lib *could* use // different definitions. var _a = getIterationTypesOfGlobalIterableType(globalType, resolver), returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } // As an optimization, if the type is an instantiation of the following global type, then // just grab its related type arguments: // - `Generator` or `AsyncGenerator` if (isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } /** @@ -62237,18 +63364,19 @@ var ts; * `getIterationTypesOfIterable` instead. */ function getIterationTypesOfIterableSlow(type, resolver, errorNode) { + var _a; var method = getPropertyOfType(type, ts.getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName)); var methodType = method && !(method.flags & 16777216 /* Optional */) ? getTypeOfSymbol(method) : undefined; if (isTypeAny(methodType)) { - return type[resolver.iterableCacheKey] = anyIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes); } var signatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : undefined; if (!ts.some(signatures)) { - return type[resolver.iterableCacheKey] = noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes); } var iteratorType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), 2 /* Subtype */); - var iterationTypes = getIterationTypesOfIterator(iteratorType, resolver, errorNode) || noIterationTypes; - return type[resolver.iterableCacheKey] = iterationTypes; + var iterationTypes = (_a = getIterationTypesOfIterator(iteratorType, resolver, errorNode)) !== null && _a !== void 0 ? _a : noIterationTypes; + return setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes); } function reportTypeNotIterableError(errorNode, type, allowAsyncIterables) { var message = allowAsyncIterables @@ -62279,7 +63407,7 @@ var ts; * `getIterationTypesOfIterator` instead. */ function getIterationTypesOfIteratorCached(type, resolver) { - return type[resolver.iteratorCacheKey]; + return getCachedIterationTypes(type, resolver.iteratorCacheKey); } /** * Gets the iteration types of an `Iterator`-like or `AsyncIterator`-like type from the @@ -62308,12 +63436,12 @@ var ts; var globalIterationTypes = getIterationTypesOfIteratorCached(globalType, resolver) || getIterationTypesOfIteratorSlow(globalType, resolver, /*errorNode*/ undefined); var _a = globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes, returnType = _a.returnType, nextType = _a.nextType; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } if (isReferenceToType(type, resolver.getGlobalIteratorType(/*reportErrors*/ false)) || isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2]; - return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } } function isIteratorResult(type, kind) { @@ -62341,7 +63469,7 @@ var ts; if (isTypeAny(type)) { return anyIterationTypes; } - var cachedTypes = type.iterationTypesOfIteratorResult; + var cachedTypes = getCachedIterationTypes(type, "iterationTypesOfIteratorResult"); if (cachedTypes) { return cachedTypes; } @@ -62349,11 +63477,11 @@ var ts; // or `IteratorReturnResult` types, then just grab its type argument. if (isReferenceToType(type, getGlobalIteratorYieldResultType(/*reportErrors*/ false))) { var yieldType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType_1, /*returnType*/ undefined, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType_1, /*returnType*/ undefined, /*nextType*/ undefined)); } if (isReferenceToType(type, getGlobalIteratorReturnResultType(/*reportErrors*/ false))) { var returnType_1 = getTypeArguments(type)[0]; - return type.iterationTypesOfIteratorResult = createIterationTypes(/*yieldType*/ undefined, returnType_1, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(/*yieldType*/ undefined, returnType_1, /*nextType*/ undefined)); } // Choose any constituents that can produce the requested iteration type. var yieldIteratorResult = filterType(type, isYieldIteratorResult); @@ -62361,13 +63489,13 @@ var ts; var returnIteratorResult = filterType(type, isReturnIteratorResult); var returnType = returnIteratorResult !== neverType ? getTypeOfPropertyOfType(returnIteratorResult, "value") : undefined; if (!yieldType && !returnType) { - return type.iterationTypesOfIteratorResult = noIterationTypes; + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", noIterationTypes); } // From https://tc39.github.io/ecma262/#sec-iteratorresult-interface // > ... If the iterator does not have a return value, `value` is `undefined`. In that case, the // > `value` property may be absent from the conforming object if it does not inherit an explicit // > `value` property. - return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType, returnType || voidType, /*nextType*/ undefined); + return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes(yieldType, returnType || voidType, /*nextType*/ undefined)); } /** * Gets the *yield*, *return*, and *next* types of a the `next()`, `return()`, or @@ -62460,7 +63588,7 @@ var ts; getIterationTypesOfMethod(type, resolver, "return", errorNode), getIterationTypesOfMethod(type, resolver, "throw", errorNode), ]); - return type[resolver.iteratorCacheKey] = iterationTypes; + return setCachedIterationTypes(type, resolver.iteratorCacheKey, iterationTypes); } /** * Gets the requested "iteration type" from a type that is either `Iterable`-like, `Iterator`-like, @@ -62854,7 +63982,7 @@ var ts; var sourceConstraint = constraint && getTypeFromTypeNode(constraint); var targetConstraint = getConstraintOfTypeParameter(target); // relax check if later interface augmentation has no constraint, it's more broad and is OK to merge with - // a more constrained interface (this could be generalized to a full heirarchy check, but that's maybe overkill) + // a more constrained interface (this could be generalized to a full hierarchy check, but that's maybe overkill) if (sourceConstraint && targetConstraint && !isTypeIdenticalTo(sourceConstraint, targetConstraint)) { return false; } @@ -62958,7 +64086,7 @@ var ts; checkKindsOfPropertyMemberOverrides(type, baseType_1); } } - var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(node); + var implementedTypeNodes = ts.getEffectiveImplementsTypeNodes(node); if (implementedTypeNodes) { for (var _b = 0, implementedTypeNodes_1 = implementedTypeNodes; _b < implementedTypeNodes_1.length; _b++) { var typeRefNode = implementedTypeNodes_1[_b]; @@ -63283,6 +64411,7 @@ var ts; // Grammar checking checkGrammarDecoratorsAndModifiers(node); checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_alias_name_cannot_be_0); + checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); checkSourceElement(node.type); registerForUnusedIdentifiersCheck(node); @@ -63827,6 +64956,9 @@ var ts; if (!checkGrammarDecoratorsAndModifiers(node) && ts.hasModifiers(node)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); } + if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0 /* ES3 */) { + checkExternalEmitHelpers(node, 1048576 /* CreateBinding */); + } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { // export { x, y } @@ -63864,16 +64996,14 @@ var ts; return !isInAppropriateContext; } function importClauseContainsReferencedImport(importClause) { - return importClause.name && isReferenced(importClause) - || importClause.namedBindings && namedBindingsContainsReferencedImport(importClause.namedBindings); - function isReferenced(declaration) { - return !!getMergedSymbol(getSymbolOfNode(declaration)).isReferenced; - } - function namedBindingsContainsReferencedImport(namedBindings) { - return ts.isNamespaceImport(namedBindings) - ? isReferenced(namedBindings) - : ts.some(namedBindings.elements, isReferenced); - } + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolOfNode(declaration).isReferenced; + }); + } + function importClauseContainsConstEnumUsedAsValue(importClause) { + return ts.forEachImportClauseDeclaration(importClause, function (declaration) { + return !!getSymbolLinks(getSymbolOfNode(declaration)).constEnumReferenced; + }); } function checkImportsForTypeOnlyConversion(sourceFile) { for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { @@ -63882,11 +65012,9 @@ var ts; statement.importClause && !statement.importClause.isTypeOnly && importClauseContainsReferencedImport(statement.importClause) && - !isReferencedAliasDeclaration(statement.importClause, /*checkChildren*/ true)) { - var isError = compilerOptions.importsNotUsedAsValues === 2 /* Error */; - errorOrSuggestion(isError, statement, isError - ? ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error - : ts.Diagnostics.This_import_may_be_converted_to_a_type_only_import); + !isReferencedAliasDeclaration(statement.importClause, /*checkChildren*/ true) && + !importClauseContainsConstEnumUsedAsValue(statement.importClause)) { + error(statement, ts.Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error); } } } @@ -64096,15 +65224,17 @@ var ts; return checkImportType(node); case 307 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 321 /* JSDocTypedefTag */: - case 314 /* JSDocCallbackTag */: - case 315 /* JSDocEnumTag */: + case 308 /* JSDocImplementsTag */: + return checkJSDocImplementsTag(node); + case 322 /* JSDocTypedefTag */: + case 315 /* JSDocCallbackTag */: + case 316 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 320 /* JSDocTemplateTag */: + case 321 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 319 /* JSDocTypeTag */: + case 320 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 316 /* JSDocParameterTag */: + case 317 /* JSDocParameterTag */: return checkJSDocParameterTag(node); case 300 /* JSDocFunctionType */: checkJSDocFunctionType(node); @@ -64283,6 +65413,16 @@ var ts; currentNode = node; instantiationCount = 0; switch (node.kind) { + case 196 /* CallExpression */: + case 197 /* NewExpression */: + case 198 /* TaggedTemplateExpression */: + case 157 /* Decorator */: + case 268 /* JsxOpeningElement */: + // These node kinds are deferred checked when overload resolution fails + // To save on work, we ensure the arguments are checked just once, in + // a deferred way + resolveUntypedCall(node); + break; case 201 /* FunctionExpression */: case 202 /* ArrowFunction */: case 161 /* MethodDeclaration */: @@ -64352,7 +65492,9 @@ var ts; } }); } - if (!node.isDeclarationFile && ts.isExternalModule(node)) { + if (compilerOptions.importsNotUsedAsValues === 2 /* Error */ && + !node.isDeclarationFile && + ts.isExternalModule(node)) { checkImportsForTypeOnlyConversion(node); } if (ts.isExternalOrCommonJsModule(node)) { @@ -64666,10 +65808,10 @@ var ts; return entityNameSymbol; } } - if (name.parent.kind === 316 /* JSDocParameterTag */) { + if (name.parent.kind === 317 /* JSDocParameterTag */) { return ts.getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 155 /* TypeParameter */ && name.parent.parent.kind === 320 /* JSDocTemplateTag */) { + if (name.parent.kind === 155 /* TypeParameter */ && name.parent.parent.kind === 321 /* JSDocTemplateTag */) { ts.Debug.assert(!ts.isInJSFile(name)); // Otherwise `isDeclarationName` would have been true. var typeParameter = ts.getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -64710,7 +65852,7 @@ var ts; // Do we want to return undefined here? return undefined; } - function getSymbolAtLocation(node) { + function getSymbolAtLocation(node, ignoreErrors) { if (node.kind === 290 /* SourceFile */) { return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } @@ -64783,7 +65925,7 @@ var ts; ((node.parent.kind === 254 /* ImportDeclaration */ || node.parent.kind === 260 /* ExportDeclaration */) && node.parent.moduleSpecifier === node) || ((ts.isInJSFile(node) && ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteralLike*/ false)) || ts.isImportCall(node.parent)) || (ts.isLiteralTypeNode(node.parent) && ts.isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent)) { - return resolveExternalModuleName(node, node); + return resolveExternalModuleName(node, node, ignoreErrors); } if (ts.isCallExpression(parent) && ts.isBindableObjectDefinePropertyCall(parent) && parent.arguments[1] === node) { return getSymbolOfNode(parent); @@ -64803,9 +65945,9 @@ var ts; case 80 /* ClassKeyword */: return getSymbolOfNode(node.parent); case 188 /* ImportType */: - return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal) : undefined; + return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : undefined; case 89 /* ExportKeyword */: - return ts.isExportAssignment(node.parent) ? ts.Debug.assertDefined(node.parent.symbol) : undefined; + return ts.isExportAssignment(node.parent) ? ts.Debug.checkDefined(node.parent.symbol) : undefined; default: return undefined; } @@ -64859,7 +66001,7 @@ var ts; if (isDeclarationNameOrImportPropertyName(node)) { var symbol = getSymbolAtLocation(node); if (symbol) { - return ts.isTypeOnlyImportOrExportName(node) ? getDeclaredTypeOfSymbol(symbol) : getTypeOfSymbol(symbol); + return getTypeOfSymbol(symbol); } return errorType; } @@ -65078,7 +66220,7 @@ var ts; var symbol = getReferencedValueSymbol(node); // We should only get the declaration of an alias if there isn't a local value // declaration for the symbol - if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */)) { + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !getTypeOnlyAliasDeclaration(symbol)) { return getDeclarationOfAliasSymbol(symbol); } } @@ -65159,11 +66301,13 @@ var ts; function isValueAliasDeclaration(node) { switch (node.kind) { case 253 /* ImportEqualsDeclaration */: + return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); case 255 /* ImportClause */: case 256 /* NamespaceImport */: case 258 /* ImportSpecifier */: case 263 /* ExportSpecifier */: - return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol); + var symbol = getSymbolOfNode(node) || unknownSymbol; + return isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol); case 260 /* ExportDeclaration */: var exportClause = node.exportClause; return !!exportClause && (ts.isNamespaceExport(exportClause) || @@ -65198,14 +66342,15 @@ var ts; return isConstEnumSymbol(s) || !!s.constEnumOnlyModule; } function isReferencedAliasDeclaration(node, checkChildren) { - if (ts.isAliasSymbolDeclaration(node)) { + if (isAliasSymbolDeclaration(node)) { var symbol = getSymbolOfNode(node); if (symbol && getSymbolLinks(symbol).referenced) { return true; } var target = getSymbolLinks(symbol).target; // TODO: GH#18217 if (target && ts.getModifierFlags(node) & 1 /* Export */ && - target.flags & 111551 /* Value */ && (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { + target.flags & 111551 /* Value */ && + (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { // An `export import ... =` of a value symbol is always considered referenced return true; } @@ -65449,6 +66594,9 @@ var ts; var type = getTypeOfSymbol(getSymbolOfNode(node)); return literalTypeToNode(type, node, tracker); } + function getJsxFactoryEntity(location) { + return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; + } function createResolver() { // this variable and functions that use it are deliberately moved here from the outer scope // to avoid scope pollution @@ -65519,7 +66667,7 @@ var ts; var symbol = node && getSymbolOfNode(node); return !!(symbol && ts.getCheckFlags(symbol) & 4096 /* Late */); }, - getJsxFactoryEntity: function (location) { return location ? (getJsxNamespace(location), (ts.getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; }, + getJsxFactoryEntity: getJsxFactoryEntity, getAllAccessorDeclarations: function (accessor) { accessor = ts.getParseTreeNode(accessor, ts.isGetOrSetAccessorDeclaration); // TODO: GH#18217 var otherKind = accessor.kind === 164 /* SetAccessor */ ? 163 /* GetAccessor */ : 164 /* SetAccessor */; @@ -65785,7 +66933,7 @@ var ts; var helpersModule = resolveHelpersModule(sourceFile, location); if (helpersModule !== unknownSymbol) { var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (var helper = 1 /* FirstEmitHelper */; helper <= 524288 /* LastEmitHelper */; helper <<= 1) { + for (var helper = 1 /* FirstEmitHelper */; helper <= 1048576 /* LastEmitHelper */; helper <<= 1) { if (uncheckedHelpers & helper) { var name = getHelperName(helper); var symbol = getSymbol(helpersModule.exports, ts.escapeLeadingUnderscores(name), 111551 /* Value */); @@ -65821,6 +66969,7 @@ var ts; case 131072 /* MakeTemplateObject */: return "__makeTemplateObject"; case 262144 /* ClassPrivateFieldGet */: return "__classPrivateFieldGet"; case 524288 /* ClassPrivateFieldSet */: return "__classPrivateFieldSet"; + case 1048576 /* CreateBinding */: return "__createBinding"; default: return ts.Debug.fail("Unrecognized helper"); } } @@ -65904,6 +67053,9 @@ var ts; return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract"); } } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + } flags |= ts.modifierToFlag(modifier.kind); break; case 120 /* StaticKeyword */: @@ -65986,6 +67138,9 @@ var ts; else if ((node.parent.flags & 8388608 /* Ambient */) && node.parent.kind === 250 /* ModuleBlock */) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } + else if (ts.isPrivateIdentifierPropertyDeclaration(node)) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); + } flags |= 2 /* Ambient */; lastDeclare = modifier; break; @@ -66011,7 +67166,7 @@ var ts; } } if (ts.isNamedDeclaration(node) && node.name.kind === 76 /* PrivateIdentifier */) { - return grammarErrorOnNode(node, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); } flags |= 128 /* Abstract */; break; @@ -66054,9 +67209,6 @@ var ts; else if (node.kind === 156 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) { return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } - else if (ts.isNamedDeclaration(node) && (flags & 28 /* AccessibilityModifier */) && node.name.kind === 76 /* PrivateIdentifier */) { - return grammarErrorOnNode(node, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); - } if (flags & 256 /* Async */) { return checkGrammarAsyncModifier(node, lastAsync); } @@ -66589,7 +67741,7 @@ var ts; if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } - var parameter = ts.Debug.assertDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); + var parameter = ts.Debug.checkDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); } @@ -67048,10 +68200,10 @@ var ts; // this has already been reported, and don't report if it has. // if (node.parent.kind === 223 /* Block */ || node.parent.kind === 250 /* ModuleBlock */ || node.parent.kind === 290 /* SourceFile */) { - var links_1 = getNodeLinks(node.parent); + var links_2 = getNodeLinks(node.parent); // Check if the containing block ever report this error - if (!links_1.hasReportedStatementInAmbientContext) { - return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); + if (!links_2.hasReportedStatementInAmbientContext) { + return links_2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); } } else { @@ -67487,6 +68639,9 @@ var ts; ts.getGeneratedNameForNode = getGeneratedNameForNode; // Private Identifiers function createPrivateIdentifier(text) { + if (text[0] !== "#") { + ts.Debug.fail("First character of private identifier must be #: " + text); + } var node = createSynthesizedNode(76 /* PrivateIdentifier */); node.escapedText = ts.escapeLeadingUnderscores(text); return node; @@ -68607,7 +69762,7 @@ var ts; } var token = rawTextScanner.scan(); if (token === 23 /* CloseBracketToken */) { - token = rawTextScanner.reScanTemplateToken(); + token = rawTextScanner.reScanTemplateToken(/* isTaggedTemplate */ false); } if (rawTextScanner.isUnterminated()) { rawTextScanner.setText(undefined); @@ -69458,7 +70613,7 @@ var ts; ts.createJSDocTypeExpression = createJSDocTypeExpression; /* @internal */ function createJSDocTypeTag(typeExpression, comment) { - var tag = createJSDocTag(319 /* JSDocTypeTag */, "type"); + var tag = createJSDocTag(320 /* JSDocTypeTag */, "type"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; @@ -69466,7 +70621,7 @@ var ts; ts.createJSDocTypeTag = createJSDocTypeTag; /* @internal */ function createJSDocReturnTag(typeExpression, comment) { - var tag = createJSDocTag(317 /* JSDocReturnTag */, "returns"); + var tag = createJSDocTag(318 /* JSDocReturnTag */, "returns"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; @@ -69474,14 +70629,14 @@ var ts; ts.createJSDocReturnTag = createJSDocReturnTag; /** @internal */ function createJSDocThisTag(typeExpression) { - var tag = createJSDocTag(318 /* JSDocThisTag */, "this"); + var tag = createJSDocTag(319 /* JSDocThisTag */, "this"); tag.typeExpression = typeExpression; return tag; } ts.createJSDocThisTag = createJSDocThisTag; /* @internal */ function createJSDocParamTag(name, isBracketed, typeExpression, comment) { - var tag = createJSDocTag(316 /* JSDocParameterTag */, "param"); + var tag = createJSDocTag(317 /* JSDocParameterTag */, "param"); tag.typeExpression = typeExpression; tag.name = name; tag.isBracketed = isBracketed; @@ -69856,7 +71011,7 @@ var ts; * @param original The original statement. */ function createNotEmittedStatement(original) { - var node = createSynthesizedNode(324 /* NotEmittedStatement */); + var node = createSynthesizedNode(325 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; @@ -69868,7 +71023,7 @@ var ts; */ /* @internal */ function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(328 /* EndOfDeclarationMarker */); + var node = createSynthesizedNode(329 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -69880,7 +71035,7 @@ var ts; */ /* @internal */ function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(327 /* MergeDeclarationMarker */); + var node = createSynthesizedNode(328 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -69895,7 +71050,7 @@ var ts; * @param location The location for the expression. Defaults to the positions from "original" if provided. */ function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(325 /* PartiallyEmittedExpression */); + var node = createSynthesizedNode(326 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; setTextRange(node, original); @@ -69911,7 +71066,7 @@ var ts; ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function flattenCommaElements(node) { if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) { - if (node.kind === 326 /* CommaListExpression */) { + if (node.kind === 327 /* CommaListExpression */) { return node.elements; } if (ts.isBinaryExpression(node) && node.operatorToken.kind === 27 /* CommaToken */) { @@ -69921,7 +71076,7 @@ var ts; return node; } function createCommaList(elements) { - var node = createSynthesizedNode(326 /* CommaListExpression */); + var node = createSynthesizedNode(327 /* CommaListExpression */); node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements)); return node; } @@ -69934,7 +71089,7 @@ var ts; ts.updateCommaList = updateCommaList; /* @internal */ function createSyntheticReferenceExpression(expression, thisArg) { - var node = createSynthesizedNode(329 /* SyntheticReferenceExpression */); + var node = createSynthesizedNode(330 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; return node; @@ -69980,6 +71135,8 @@ var ts; ts.importDefaultHelper, ts.classPrivateFieldGetHelper, ts.classPrivateFieldSetHelper, + ts.createBindingHelper, + ts.setModuleDefaultHelper ], function (helper) { return helper.name; })); } function createUnparsedSource() { @@ -70008,7 +71165,7 @@ var ts; stripInternal = mapTextOrStripInternal; bundleFileInfo = mapPathOrType === "js" ? textOrInputFiles.buildInfo.bundle.js : textOrInputFiles.buildInfo.bundle.dts; if (node.oldFileOfCurrentEmit) { - parseOldFileOfCurrentEmit(node, ts.Debug.assertDefined(bundleFileInfo)); + parseOldFileOfCurrentEmit(node, ts.Debug.checkDefined(bundleFileInfo)); return node; } } @@ -70173,13 +71330,13 @@ var ts; }; node.javascriptPath = declarationTextOrJavascriptPath; node.javascriptMapPath = javascriptMapPath; - node.declarationPath = ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath); + node.declarationPath = ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath); node.declarationMapPath = declarationMapPath; node.buildInfoPath = declarationMapTextOrBuildInfoPath; Object.defineProperties(node, { javascriptText: { get: function () { return definedTextGetter_1(declarationTextOrJavascriptPath); } }, javascriptMapText: { get: function () { return textGetter_1(javascriptMapPath); } }, - declarationText: { get: function () { return definedTextGetter_1(ts.Debug.assertDefined(javascriptMapTextOrDeclarationPath)); } }, + declarationText: { get: function () { return definedTextGetter_1(ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath)); } }, declarationMapText: { get: function () { return textGetter_1(declarationMapPath); } }, buildInfo: { get: function () { return getAndCacheBuildInfo_1(function () { return textGetter_1(declarationMapTextOrBuildInfoPath); }); } } }); @@ -70762,8 +71919,8 @@ var ts; argumentsList.push(ts.createNull()); } if (children.length > 1) { - for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { - var child = children_1[_i]; + for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { + var child = children_2[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -70782,8 +71939,8 @@ var ts; argumentsList.push(ts.createNull()); if (children && children.length > 0) { if (children.length > 1) { - for (var _i = 0, children_2 = children; _i < children_2.length; _i++) { - var child = children_2[_i]; + for (var _i = 0, children_3 = children; _i < children_3.length; _i++) { + var child = children_3[_i]; startOnNewLine(child); argumentsList.push(child); } @@ -70834,10 +71991,10 @@ var ts; name: "typescript:spread", importName: "__spread", scoped: false, + dependencies: [ts.readHelper], text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };" }; function createSpreadHelper(context, argumentList, location) { - context.requestEmitHelper(ts.readHelper); context.requestEmitHelper(ts.spreadHelper); return ts.setTextRange(ts.createCall(getUnscopedHelperName("__spread"), /*typeArguments*/ undefined, argumentList), location); @@ -71697,7 +72854,7 @@ var ts; case 195 /* ElementAccessExpression */: case 194 /* PropertyAccessExpression */: case 218 /* NonNullExpression */: - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: node = node.expression; continue; } @@ -71714,7 +72871,7 @@ var ts; ts.parenthesizeConciseBody = parenthesizeConciseBody; function isCommaSequence(node) { return node.kind === 209 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || - node.kind === 326 /* CommaListExpression */; + node.kind === 327 /* CommaListExpression */; } ts.isCommaSequence = isCommaSequence; var OuterExpressionKinds; @@ -71733,7 +72890,7 @@ var ts; case 217 /* AsExpression */: case 218 /* NonNullExpression */: return (kinds & 2 /* Assertions */) !== 0; - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return (kinds & 4 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -71770,7 +72927,7 @@ var ts; case 199 /* TypeAssertionExpression */: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression); case 217 /* AsExpression */: return ts.updateAsExpression(outerExpression, expression, outerExpression.type); case 218 /* NonNullExpression */: return ts.updateNonNullExpression(outerExpression, expression); - case 325 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); + case 326 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); } } /** @@ -72643,9 +73800,9 @@ var ts; case 290 /* SourceFile */: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression)); default: // No need to visit nodes with no children. @@ -72702,7 +73859,7 @@ var ts; case 224 /* EmptyStatement */: case 215 /* OmittedExpression */: case 241 /* DebuggerStatement */: - case 324 /* NotEmittedStatement */: + case 325 /* NotEmittedStatement */: // No need to visit nodes with no children. break; // Names @@ -73086,10 +74243,10 @@ var ts; result = reduceNodes(node.statements, cbNodes, result); break; // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: result = reduceNode(node.expression, cbNode, result); break; - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: result = reduceNodes(node.elements, cbNodes, result); break; default: @@ -74090,10 +75247,12 @@ var ts; // list contains nothing but prologue directives (or empty) - exit return index; } - var statement = statements[index]; - if (statement.kind === 226 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { - result.push(ts.visitNode(statement, visitor, ts.isStatement)); - return index + 1; + var superIndex = ts.findIndex(statements, function (s) { return ts.isExpressionStatement(s) && ts.isSuperCall(s.expression); }, index); + if (superIndex > -1) { + for (var i = index; i <= superIndex; i++) { + result.push(ts.visitNode(statements[i], visitor, ts.isStatement)); + } + return superIndex + 1; } return index; } @@ -74426,7 +75585,7 @@ var ts; && !(element.transformFlags & (8192 /* ContainsRestOrSpread */ | 16384 /* ContainsObjectRestOrSpread */)) && !(ts.getTargetOfBindingOrAssignmentElement(element).transformFlags & (8192 /* ContainsRestOrSpread */ | 16384 /* ContainsObjectRestOrSpread */)) && !ts.isComputedPropertyName(propertyName)) { - bindingElements = ts.append(bindingElements, element); + bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor)); } else { if (bindingElements) { @@ -74644,6 +75803,96 @@ var ts; })(ts || (ts = {})); /*@internal*/ var ts; +(function (ts) { + var ProcessLevel; + (function (ProcessLevel) { + ProcessLevel[ProcessLevel["LiftRestriction"] = 0] = "LiftRestriction"; + ProcessLevel[ProcessLevel["All"] = 1] = "All"; + })(ProcessLevel = ts.ProcessLevel || (ts.ProcessLevel = {})); + function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) { + // Visit the tag expression + var tag = ts.visitNode(node.tag, visitor, ts.isExpression); + // Build up the template arguments and the raw and cooked strings for the template. + // We start out with 'undefined' for the first argument and revisit later + // to avoid walking over the template string twice and shifting all our arguments over after the fact. + var templateArguments = [undefined]; + var cookedStrings = []; + var rawStrings = []; + var template = node.template; + if (level === ProcessLevel.LiftRestriction && !ts.hasInvalidEscape(template)) + return node; + if (ts.isNoSubstitutionTemplateLiteral(template)) { + cookedStrings.push(createTemplateCooked(template)); + rawStrings.push(getRawLiteral(template, currentSourceFile)); + } + else { + cookedStrings.push(createTemplateCooked(template.head)); + rawStrings.push(getRawLiteral(template.head, currentSourceFile)); + for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { + var templateSpan = _a[_i]; + cookedStrings.push(createTemplateCooked(templateSpan.literal)); + rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile)); + templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); + } + } + var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); + // Create a variable to cache the template object if we're in a module. + // Do not do this in the global scope, as any variable we currently generate could conflict with + // variables from outside of the current compilation. In the future, we can revisit this behavior. + if (ts.isExternalModule(currentSourceFile)) { + var tempVar = ts.createUniqueName("templateObject"); + recordTaggedTemplateString(tempVar); + templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); + } + else { + templateArguments[0] = helperCall; + } + return ts.createCall(tag, /*typeArguments*/ undefined, templateArguments); + } + ts.processTaggedTemplateExpression = processTaggedTemplateExpression; + function createTemplateCooked(template) { + return template.templateFlags ? ts.createIdentifier("undefined") : ts.createLiteral(template.text); + } + /** + * Creates an ES5 compatible literal from an ES6 template literal. + * + * @param node The ES6 template literal. + */ + function getRawLiteral(node, currentSourceFile) { + // Find original source text, since we need to emit the raw strings of the tagged template. + // The raw strings contain the (escaped) strings of what the user wrote. + // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". + var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), + // thus we need to remove those characters. + // First template piece starts with "`", others with "}" + // Last template piece ends with "`", others with "${" + var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + // Newline normalization: + // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's + // and LineTerminatorSequences are normalized to for both TV and TRV. + text = text.replace(/\r\n?/g, "\n"); + return ts.setTextRange(ts.createLiteral(text), node); + } + function createTemplateObjectHelper(context, cooked, raw) { + context.requestEmitHelper(ts.templateObjectHelper); + return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), + /*typeArguments*/ undefined, [ + cooked, + raw + ]); + } + ts.templateObjectHelper = { + name: "typescript:makeTemplateObject", + importName: "__makeTemplateObject", + scoped: false, + priority: 0, + text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" + }; +})(ts || (ts = {})); +/*@internal*/ +var ts; (function (ts) { /** * Indicates whether to emit type metadata in the new format. @@ -74668,10 +75917,9 @@ var ts; ClassFacts[ClassFacts["IsNamedExternalExport"] = 16] = "IsNamedExternalExport"; ClassFacts[ClassFacts["IsDefaultExternalExport"] = 32] = "IsDefaultExternalExport"; ClassFacts[ClassFacts["IsDerivedClass"] = 64] = "IsDerivedClass"; - ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 128] = "UseImmediatelyInvokedFunctionExpression"; ClassFacts[ClassFacts["HasAnyDecorators"] = 6] = "HasAnyDecorators"; ClassFacts[ClassFacts["NeedsName"] = 5] = "NeedsName"; - ClassFacts[ClassFacts["MayNeedImmediatelyInvokedFunctionExpression"] = 7] = "MayNeedImmediatelyInvokedFunctionExpression"; + ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 7] = "UseImmediatelyInvokedFunctionExpression"; ClassFacts[ClassFacts["IsExported"] = 56] = "IsExported"; })(ClassFacts || (ClassFacts = {})); function transformTypeScript(context) { @@ -75154,8 +76402,6 @@ var ts; facts |= 32 /* IsDefaultExternalExport */; else if (isNamedExternalModuleExport(node)) facts |= 16 /* IsNamedExternalExport */; - if (languageVersion <= 1 /* ES5 */ && (facts & 7 /* MayNeedImmediatelyInvokedFunctionExpression */)) - facts |= 128 /* UseImmediatelyInvokedFunctionExpression */; return facts; } function hasTypeScriptClassSyntax(node) { @@ -75173,7 +76419,7 @@ var ts; } var staticProperties = ts.getProperties(node, /*requireInitializer*/ true, /*isStatic*/ true); var facts = getClassFacts(node, staticProperties); - if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) { + if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */) { context.startLexicalEnvironment(); } var name = node.name || (facts & 5 /* NeedsName */ ? ts.getGeneratedNameForNode(node) : undefined); @@ -75185,7 +76431,7 @@ var ts; addClassElementDecorationStatements(statements, node, /*isStatic*/ false); addClassElementDecorationStatements(statements, node, /*isStatic*/ true); addConstructorDecorationStatement(statements, node); - if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) { + if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */) { // When we emit a TypeScript class down to ES5, we must wrap it in an IIFE so that the // 'es2015' transformer can properly nest static initializers and decorators. The result // looks something like: @@ -75211,11 +76457,16 @@ var ts; ts.insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment()); var iife = ts.createImmediatelyInvokedArrowFunction(statements); ts.setEmitFlags(iife, 33554432 /* TypeScriptClassWrapper */); + // Class comment is already added by the ES2015 transform when targeting ES5 or below. + // Only add if targetting ES2015+ to prevent duplicates + if (languageVersion > 1 /* ES5 */) { + ts.addSyntheticLeadingComment(iife, 3 /* MultiLineCommentTrivia */, "* @class "); + } var varStatement = ts.createVariableStatement( /*modifiers*/ undefined, ts.createVariableDeclarationList([ ts.createVariableDeclaration(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false), /*type*/ undefined, iife) - ])); + ], languageVersion > 1 /* ES5 */ ? 2 /* Const */ : undefined)); ts.setOriginalNode(varStatement, node); ts.setCommentRange(varStatement, node); ts.setSourceMapRange(varStatement, ts.moveRangePastDecorators(node)); @@ -75228,7 +76479,7 @@ var ts; if (facts & 8 /* IsExportOfNamespace */) { addExportMemberAssignment(statements, node); } - else if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) { + else if (facts & 7 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) { if (facts & 32 /* IsDefaultExternalExport */) { statements.push(ts.createExportDefault(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))); } @@ -75255,7 +76506,7 @@ var ts; // ${members} // } // we do not emit modifiers on the declaration if we are emitting an IIFE - var modifiers = !(facts & 128 /* UseImmediatelyInvokedFunctionExpression */) + var modifiers = !(facts & 7 /* UseImmediatelyInvokedFunctionExpression */) ? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier) : undefined; var classDeclaration = ts.createClassDeclaration( @@ -76963,7 +78214,7 @@ var ts; return undefined; } // Elide the export declaration if all of its named exports are elided. - var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedImportBindings); + var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedExportBindings); return exportClause ? ts.updateExportDeclaration(node, /*decorators*/ undefined, @@ -77732,7 +78983,7 @@ var ts; /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass)); if (ts.some(staticProperties) || ts.some(pendingExpressions)) { if (isDecoratedClassDeclaration) { - ts.Debug.assertDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); + ts.Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); // Write any pending expressions from elided or moved computed property names if (pendingStatements && pendingExpressions && ts.some(pendingExpressions)) { pendingStatements.push(ts.createExpressionStatement(ts.inlineExpressions(pendingExpressions))); @@ -78820,6 +80071,8 @@ var ts; var enclosingFunctionFlags; var enclosingSuperContainerFlags = 0; var hasLexicalThis; + var currentSourceFile; + var taggedTemplateStringDeclarations; /** Keeps track of property names accessed on super (`super.x`) within async functions. */ var capturedSuperProperties; /** Whether the async function contains an element access on super (`super[x]`). */ @@ -78827,14 +80080,18 @@ var ts; /** A set of node IDs for generated super accessors. */ var substitutedSuperAccessors = []; return ts.chainBundle(transformSourceFile); + function recordTaggedTemplateString(temp) { + taggedTemplateStringDeclarations = ts.append(taggedTemplateStringDeclarations, ts.createVariableDeclaration(temp)); + } function transformSourceFile(node) { if (node.isDeclarationFile) { return node; } - exportedVariableStatement = false; - hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); - var visited = ts.visitEachChild(node, visitor, context); + currentSourceFile = node; + var visited = visitSourceFile(node); ts.addEmitHelpers(visited, context.readEmitHelpers()); + currentSourceFile = undefined; + taggedTemplateStringDeclarations = undefined; return visited; } function visitor(node) { @@ -78910,6 +80167,8 @@ var ts; return visitExpressionStatement(node); case 200 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, noDestructuringValue); + case 198 /* TaggedTemplateExpression */: + return visitTaggedTemplateExpression(node); case 194 /* PropertyAccessExpression */: if (capturedSuperProperties && ts.isPropertyAccessExpression(node) && node.expression.kind === 102 /* SuperKeyword */) { capturedSuperProperties.set(node.name.escapedText, true); @@ -79032,6 +80291,18 @@ var ts; function visitParenthesizedExpression(node, noDestructuringValue) { return ts.visitEachChild(node, noDestructuringValue ? visitorNoDestructuringValue : visitor, context); } + function visitSourceFile(node) { + exportedVariableStatement = false; + hasLexicalThis = !ts.isEffectiveStrictModeSourceFile(node, compilerOptions); + var visited = ts.visitEachChild(node, visitor, context); + var statement = ts.concatenate(visited.statements, taggedTemplateStringDeclarations && [ + ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList(taggedTemplateStringDeclarations)) + ]); + return ts.updateSourceFileNode(visited, ts.setTextRange(ts.createNodeArray(statement), node.statements)); + } + function visitTaggedTemplateExpression(node) { + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.LiftRestriction); + } /** * Visits a BinaryExpression that contains a destructuring assignment. * @@ -79518,10 +80789,10 @@ var ts; name: "typescript:asyncGenerator", importName: "__asyncGenerator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n 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); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };" }; function createAsyncGeneratorHelper(context, generatorFunc, hasLexicalThis) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncGeneratorHelper); // Mark this node as originally an async function (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* AsyncFunctionBody */; @@ -79536,10 +80807,10 @@ var ts; name: "typescript:asyncDelegator", importName: "__asyncDelegator", scoped: false, + dependencies: [ts.awaitHelper], text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n };" }; function createAsyncDelegatorHelper(context, expression, location) { - context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncDelegator); return ts.setTextRange(ts.createCall(ts.getUnscopedHelperName("__asyncDelegator"), /*typeArguments*/ undefined, [expression]), location); @@ -81786,10 +83057,15 @@ var ts; } return ts.visitEachChild(node, visitor, context); } + function isVariableStatementOfTypeScriptClassWrapper(node) { + return node.declarationList.declarations.length === 1 + && !!node.declarationList.declarations[0].initializer + && !!(ts.getEmitFlags(node.declarationList.declarations[0].initializer) & 33554432 /* TypeScriptClassWrapper */); + } function visitVariableStatement(node) { var ancestorFacts = enterSubtree(0 /* None */, ts.hasModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); var updated; - if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0) { + if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { // we are inside a converted loop - hoist variable declarations var assignments = void 0; for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { @@ -82941,7 +84217,11 @@ var ts; // The class statements are the statements generated by visiting the first statement with initializer of the // body (1), while all other statements are added to remainingStatements (2) var isVariableStatementWithInitializer = function (stmt) { return ts.isVariableStatement(stmt) && !!ts.first(stmt.declarationList.declarations).initializer; }; + // visit the class body statements outside of any converted loop body. + var savedConvertedLoopState = convertedLoopState; + convertedLoopState = undefined; var bodyStatements = ts.visitNodes(body.statements, visitor, ts.isStatement); + convertedLoopState = savedConvertedLoopState; var classStatements = ts.filter(bodyStatements, isVariableStatementWithInitializer); var remainingStatements = ts.filter(bodyStatements, function (stmt) { return !isVariableStatementWithInitializer(stmt); }); var varStatement = ts.cast(ts.first(classStatements), ts.isVariableStatement); @@ -83198,67 +84478,7 @@ var ts; * @param node A TaggedTemplateExpression node. */ function visitTaggedTemplateExpression(node) { - // Visit the tag expression - var tag = ts.visitNode(node.tag, visitor, ts.isExpression); - // Build up the template arguments and the raw and cooked strings for the template. - // We start out with 'undefined' for the first argument and revisit later - // to avoid walking over the template string twice and shifting all our arguments over after the fact. - var templateArguments = [undefined]; - var cookedStrings = []; - var rawStrings = []; - var template = node.template; - if (ts.isNoSubstitutionTemplateLiteral(template)) { - cookedStrings.push(ts.createLiteral(template.text)); - rawStrings.push(getRawLiteral(template)); - } - else { - cookedStrings.push(ts.createLiteral(template.head.text)); - rawStrings.push(getRawLiteral(template.head)); - for (var _i = 0, _a = template.templateSpans; _i < _a.length; _i++) { - var templateSpan = _a[_i]; - cookedStrings.push(ts.createLiteral(templateSpan.literal.text)); - rawStrings.push(getRawLiteral(templateSpan.literal)); - templateArguments.push(ts.visitNode(templateSpan.expression, visitor, ts.isExpression)); - } - } - var helperCall = createTemplateObjectHelper(context, ts.createArrayLiteral(cookedStrings), ts.createArrayLiteral(rawStrings)); - // Create a variable to cache the template object if we're in a module. - // Do not do this in the global scope, as any variable we currently generate could conflict with - // variables from outside of the current compilation. In the future, we can revisit this behavior. - if (ts.isExternalModule(currentSourceFile)) { - var tempVar = ts.createUniqueName("templateObject"); - recordTaggedTemplateString(tempVar); - templateArguments[0] = ts.createLogicalOr(tempVar, ts.createAssignment(tempVar, helperCall)); - } - else { - templateArguments[0] = helperCall; - } - return ts.createCall(tag, /*typeArguments*/ undefined, templateArguments); - } - /** - * Creates an ES5 compatible literal from an ES6 template literal. - * - * @param node The ES6 template literal. - */ - function getRawLiteral(node) { - // Find original source text, since we need to emit the raw strings of the tagged template. - // The raw strings contain the (escaped) strings of what the user wrote. - // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". - var text = node.rawText; - if (text === undefined) { - text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), - // thus we need to remove those characters. - // First template piece starts with "`", others with "}" - // Last template piece ends with "`", others with "${" - var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; - text = text.substring(1, text.length - (isLast ? 1 : 2)); - } - // Newline normalization: - // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's - // and LineTerminatorSequences are normalized to for both TV and TRV. - text = text.replace(/\r\n?/g, "\n"); - return ts.setTextRange(ts.createLiteral(text), node); + return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.All); } /** * Visits a TemplateExpression node. @@ -83551,14 +84771,6 @@ var ts; ts.createFileLevelUniqueName("_super") ]); } - function createTemplateObjectHelper(context, cooked, raw) { - context.requestEmitHelper(ts.templateObjectHelper); - return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), - /*typeArguments*/ undefined, [ - cooked, - raw - ]); - } ts.extendsHelper = { name: "typescript:extends", importName: "__extends", @@ -83566,13 +84778,6 @@ var ts; priority: 0, text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();" }; - ts.templateObjectHelper = { - name: "typescript:makeTemplateObject", - importName: "__makeTemplateObject", - scoped: false, - priority: 0, - text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" - }; })(ts || (ts = {})); /*@internal*/ var ts; @@ -86386,7 +87591,7 @@ var ts; startLexicalEnvironment(); var statements = []; var ensureUseStrict = ts.getStrictOptionValue(compilerOptions, "alwaysStrict") || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile)); - var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor); + var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict && !ts.isJsonSourceFile(node), sourceElementVisitor); if (shouldEmitUnderscoreUnderscoreESModule()) { ts.append(statements, createUnderscoreUnderscoreESModule()); } @@ -86395,11 +87600,6 @@ var ts; addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false); ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements)); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - ts.addEmitHelper(updated, exportStarHelper); - } ts.addEmitHelpers(updated, context.readEmitHelpers()); return updated; } @@ -86621,11 +87821,6 @@ var ts; // and merge any new lexical declarations. ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); var body = ts.createBlock(statements, /*multiLine*/ true); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - ts.addEmitHelper(body, exportStarHelper); - } if (needUMDDynamicImportHelper) { ts.addEmitHelper(body, dynamicImportUMDHelper); } @@ -86682,9 +87877,9 @@ var ts; return visitFunctionDeclaration(node); case 245 /* ClassDeclaration */: return visitClassDeclaration(node); - case 327 /* MergeDeclarationMarker */: + case 328 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 328 /* EndOfDeclarationMarker */: + case 329 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return ts.visitEachChild(node, moduleExpressionElementVisitor, context); @@ -87042,8 +88237,13 @@ var ts; } for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) { var specifier = _a[_i]; - var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); - statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue)), specifier), specifier)); + if (languageVersion === 0 /* ES3 */) { + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createCreateBindingHelper(context, generatedName, ts.createLiteral(specifier.propertyName || specifier.name), specifier.propertyName ? ts.createLiteral(specifier.name) : undefined)), specifier), specifier)); + } + else { + var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name); + statements.push(ts.setOriginalNode(ts.setTextRange(ts.createExpressionStatement(createExportExpression(ts.getExportName(specifier), exportedValue, /* location */ undefined, /* liveBinding */ true)), specifier), specifier)); + } } return ts.singleOrMany(statements); } @@ -87146,7 +88346,6 @@ var ts; if (ts.hasModifier(node, 1 /* Export */)) { var modifiers = void 0; // If we're exporting these variables, then these just become assignments to 'exports.x'. - // We only want to emit assignments for variables with initializers. for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var variable = _a[_i]; if (ts.isIdentifier(variable.name) && ts.isLocalName(variable.name)) { @@ -87155,7 +88354,7 @@ var ts; } variables = ts.append(variables, variable); } - else if (variable.initializer) { + else { expressions = ts.append(expressions, transformInitializedVariable(variable)); } } @@ -87207,7 +88406,7 @@ var ts; } else { return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name), - /*location*/ node.name), ts.visitNode(node.initializer, moduleExpressionElementVisitor)); + /*location*/ node.name), node.initializer ? ts.visitNode(node.initializer, moduleExpressionElementVisitor) : ts.createVoidZero()); } } /** @@ -87285,7 +88484,7 @@ var ts; case 257 /* NamedImports */: for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { var importBinding = _a[_i]; - statements = appendExportsOfDeclaration(statements, importBinding); + statements = appendExportsOfDeclaration(statements, importBinding, /* liveBinding */ true); } break; } @@ -87382,13 +88581,13 @@ var ts; * appended. * @param decl The declaration to export. */ - function appendExportsOfDeclaration(statements, decl) { + function appendExportsOfDeclaration(statements, decl, liveBinding) { var name = ts.getDeclarationName(decl); var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(ts.idText(name)); if (exportSpecifiers) { for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) { var exportSpecifier = exportSpecifiers_1[_i]; - statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name); + statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name, /* allowComments */ undefined, liveBinding); } } return statements; @@ -87405,8 +88604,8 @@ var ts; * @param location The location to use for source maps and comments for the export. * @param allowComments Whether to allow comments on the export. */ - function appendExportStatement(statements, exportName, expression, location, allowComments) { - statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments)); + function appendExportStatement(statements, exportName, expression, location, allowComments, liveBinding) { + statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); return statements; } function createUnderscoreUnderscoreESModule() { @@ -87435,8 +88634,8 @@ var ts; * @param location The location to use for source maps and comments for the export. * @param allowComments An optional value indicating whether to emit comments for the statement. */ - function createExportStatement(name, value, location, allowComments) { - var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value)), location); + function createExportStatement(name, value, location, allowComments, liveBinding) { + var statement = ts.setTextRange(ts.createExpressionStatement(createExportExpression(name, value, /* location */ undefined, liveBinding)), location); ts.startOnNewLine(statement); if (!allowComments) { ts.setEmitFlags(statement, 1536 /* NoComments */); @@ -87450,8 +88649,22 @@ var ts; * @param value The exported value. * @param location The location to use for source maps and comments for the export. */ - function createExportExpression(name, value, location) { - return ts.setTextRange(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); + function createExportExpression(name, value, location, liveBinding) { + return ts.setTextRange(liveBinding && languageVersion !== 0 /* ES3 */ ? ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ undefined, [ + ts.createIdentifier("exports"), + ts.createLiteral(name), + ts.createObjectLiteral([ + ts.createPropertyAssignment("enumerable", ts.createLiteral(/*value*/ true)), + ts.createPropertyAssignment("get", ts.createFunctionExpression( + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + /*parameters*/ [], + /*type*/ undefined, ts.createBlock([ts.createReturn(value)]))) + ]) + ]) : ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location); } // // Modifier Visitors @@ -87676,17 +88889,36 @@ var ts; } } ts.transformModule = transformModule; + ts.createBindingHelper = { + name: "typescript:commonjscreatebinding", + importName: "__createBinding", + scoped: false, + priority: 1, + text: "\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));" + }; + function createCreateBindingHelper(context, module, inputName, outputName) { + context.requestEmitHelper(ts.createBindingHelper); + return ts.createCall(ts.getUnscopedHelperName("__createBinding"), /*typeArguments*/ undefined, __spreadArrays([ts.createIdentifier("exports"), module, inputName], (outputName ? [outputName] : []))); + } + ts.setModuleDefaultHelper = { + name: "typescript:commonjscreatevalue", + importName: "__setModuleDefault", + scoped: false, + priority: 1, + text: "\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});" + }; // emit output for the __export helper function var exportStarHelper = { name: "typescript:export-star", - scoped: true, - text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }" + importName: "__exportStar", + scoped: false, + dependencies: [ts.createBindingHelper], + priority: 2, + text: "\n var __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p);\n }" }; function createExportStarHelper(context, module) { - var compilerOptions = context.getCompilerOptions(); - return compilerOptions.importHelpers - ? ts.createCall(ts.getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]) - : ts.createCall(ts.createIdentifier("__export"), /*typeArguments*/ undefined, [module]); + context.requestEmitHelper(exportStarHelper); + return ts.createCall(ts.getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]); } // emit helper for dynamic import var dynamicImportUMDHelper = { @@ -87699,7 +88931,9 @@ var ts; name: "typescript:commonjsimportstar", importName: "__importStar", scoped: false, - text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};" + dependencies: [ts.createBindingHelper, ts.setModuleDefaultHelper], + priority: 2, + text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};" }; // emit helper for `import Name from "foo"` ts.importDefaultHelper = { @@ -88163,7 +89397,7 @@ var ts; return ts.singleOrMany(statements); } function visitExportDeclaration(node) { - ts.Debug.assertDefined(node); + ts.Debug.assertIsDefined(node); return undefined; } /** @@ -88659,9 +89893,9 @@ var ts; return visitCatchClause(node); case 223 /* Block */: return visitBlock(node); - case 327 /* MergeDeclarationMarker */: + case 328 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 328 /* EndOfDeclarationMarker */: + case 329 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return destructuringAndImportCallVisitor(node); @@ -89272,7 +90506,9 @@ var ts; */ function onEmitNode(hint, node, emitCallback) { if (ts.isSourceFile(node)) { - helperNameSubstitutions = ts.createMap(); + if ((ts.isExternalModule(node) || compilerOptions.isolatedModules) && compilerOptions.importHelpers) { + helperNameSubstitutions = ts.createMap(); + } previousOnEmitNode(hint, node, emitCallback); helperNameSubstitutions = undefined; } @@ -90070,7 +91306,7 @@ var ts; ts.forEach(sourceFile.libReferenceDirectives, function (ref) { var lib = host.getLibFileFromReference(ref); if (lib) { - ret.set(ref.fileName.toLocaleLowerCase(), true); + ret.set(ts.toFileNameLowerCase(ref.fileName), true); } }); return ret; @@ -91153,7 +92389,7 @@ var ts; * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files. */ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(330 /* Count */); + var enabledSyntaxKindFeatures = new Array(331 /* Count */); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -91226,6 +92462,7 @@ var ts; transformed: transformed, substituteNode: substituteNode, emitNodeWithNotification: emitNodeWithNotification, + isEmitNotificationEnabled: isEmitNotificationEnabled, dispose: dispose, diagnostics: diagnostics }; @@ -91282,6 +92519,8 @@ var ts; function emitNodeWithNotification(hint, node, emitCallback) { ts.Debug.assert(state < 3 /* Disposed */, "Cannot invoke TransformationResult callbacks after the result is disposed."); if (node) { + // TODO: Remove check and unconditionally use onEmitNode when API is breakingly changed + // (see https://github.com/microsoft/TypeScript/pull/36248/files/5062623f39120171b98870c71344b3242eb03d23#r369766739) if (isEmitNotificationEnabled(node)) { onEmitNode(hint, node, emitCallback); } @@ -91388,6 +92627,12 @@ var ts; ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the transformation context during initialization."); ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed."); ts.Debug.assert(!helper.scoped, "Cannot request a scoped emit helper."); + if (helper.dependencies) { + for (var _i = 0, _a = helper.dependencies; _i < _a.length; _i++) { + var h = _a[_i]; + requestEmitHelper(h); + } + } emitHelpers = ts.append(emitHelpers, helper); } function readEmitHelpers() { @@ -91551,7 +92796,7 @@ var ts; } ts.getOutputExtension = getOutputExtension; function rootDirOfOptions(configFile) { - return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.assertDefined(configFile.options.configFilePath)); + return configFile.options.rootDir || ts.getDirectoryPath(ts.Debug.checkDefined(configFile.options.configFilePath)); } function getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, outputDir) { return outputDir ? @@ -91573,7 +92818,7 @@ var ts; ts.fileExtensionIs(inputFileName, ".tsx" /* Tsx */) && configFile.options.jsx === 1 /* Preserve */ ? ".jsx" /* Jsx */ : ".js" /* Js */); - return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.assertDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? + return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.checkDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? outputFileName : undefined; } @@ -91648,7 +92893,7 @@ var ts; function getFirstProjectOutput(configFile, ignoreCase) { if (configFile.options.outFile || configFile.options.out) { var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath; - return ts.Debug.assertDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); + return ts.Debug.checkDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output"); } for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) { var inputFileName = _b[_a]; @@ -91772,6 +93017,7 @@ var ts; hasGlobalName: resolver.hasGlobalName, // transform hooks onEmitNode: transform.emitNodeWithNotification, + isEmitNotificationEnabled: transform.isEmitNotificationEnabled, substituteNode: transform.substituteNode, }); ts.Debug.assert(transform.transformed.length === 1, "Should only see one output from the transform"); @@ -91824,6 +93070,7 @@ var ts; hasGlobalName: resolver.hasGlobalName, // transform hooks onEmitNode: declarationTransform.emitNodeWithNotification, + isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled, substituteNode: declarationTransform.substituteNode, }); var declBlocked = (!!declarationTransform.diagnostics && !!declarationTransform.diagnostics.length) || !!host.isEmitBlocked(declarationFilePath) || !!compilerOptions.noEmit; @@ -91934,7 +93181,7 @@ var ts; var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText); return "data:application/json;base64," + base64SourceMapText; } - var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.assertDefined(sourceMapFilePath))); + var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath))); if (mapOptions.mapRoot) { var sourceMapDir = ts.normalizeSlashes(mapOptions.mapRoot); if (sourceFile) { @@ -92018,7 +93265,7 @@ var ts; sourceFile.statements = ts.createNodeArray(); return sourceFile; }); - var jsBundle = ts.Debug.assertDefined(bundle.js); + var jsBundle = ts.Debug.checkDefined(bundle.js); ts.forEach(jsBundle.sources && jsBundle.sources.prologues, function (prologueInfo) { var sourceFile = sourceFiles[prologueInfo.file]; sourceFile.text = prologueInfo.text; @@ -92035,10 +93282,10 @@ var ts; /*@internal*/ function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) { var _a = getOutputPathsForBundle(config.options, /*forceDtsPaths*/ false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath; - var buildInfoText = host.readFile(ts.Debug.assertDefined(buildInfoPath)); + var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath)); if (!buildInfoText) return buildInfoPath; - var jsFileText = host.readFile(ts.Debug.assertDefined(jsFilePath)); + var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath)); if (!jsFileText) return jsFilePath; var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath); @@ -92136,7 +93383,7 @@ var ts; function createPrinter(printerOptions, handlers) { if (printerOptions === void 0) { printerOptions = {}; } if (handlers === void 0) { handlers = {}; } - var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; + var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, isEmitNotificationEnabled = handlers.isEmitNotificationEnabled, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken; var extendedDiagnostics = !!printerOptions.extendedDiagnostics; var newLine = ts.getNewLineCharacter(printerOptions); var moduleKind = ts.getEmitModuleKind(printerOptions); @@ -92154,7 +93401,7 @@ var ts; var write = writeBase; var isOwnFileEmit; var bundleFileInfo = printerOptions.writeBundleFileInfo ? { sections: [] } : undefined; - var relativeToBuildInfo = bundleFileInfo ? ts.Debug.assertDefined(printerOptions.relativeToBuildInfo) : undefined; + var relativeToBuildInfo = bundleFileInfo ? ts.Debug.checkDefined(printerOptions.relativeToBuildInfo) : undefined; var recordInternalSection = printerOptions.recordInternalSection; var sourceFileTextPos = 0; var sourceFileTextKind = "text" /* Text */; @@ -92425,12 +93672,15 @@ var ts; return; return pipelineEmit(1 /* Expression */, node); } + function emitJsxAttributeValue(node) { + return pipelineEmit(ts.isStringLiteral(node) ? 6 /* JsxAttributeValue */ : 4 /* Unspecified */, node); + } function pipelineEmit(emitHint, node) { var savedLastNode = lastNode; var savedLastSubstitution = lastSubstitution; lastNode = node; lastSubstitution = undefined; - var pipelinePhase = getPipelinePhase(0 /* Notification */, node); + var pipelinePhase = getPipelinePhase(0 /* Notification */, emitHint, node); pipelinePhase(emitHint, node); ts.Debug.assert(lastNode === node); var substitute = lastSubstitution; @@ -92438,15 +93688,15 @@ var ts; lastSubstitution = savedLastSubstitution; return substitute || node; } - function getPipelinePhase(phase, node) { + function getPipelinePhase(phase, emitHint, node) { switch (phase) { case 0 /* Notification */: - if (onEmitNode !== ts.noEmitNotification) { + if (onEmitNode !== ts.noEmitNotification && (!isEmitNotificationEnabled || isEmitNotificationEnabled(node))) { return pipelineEmitWithNotification; } // falls through case 1 /* Substitution */: - if (substituteNode !== ts.noEmitSubstitution) { + if (substituteNode !== ts.noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node)) !== node) { return pipelineEmitWithSubstitution; } // falls through @@ -92466,12 +93716,12 @@ var ts; return ts.Debug.assertNever(phase); } } - function getNextPipelinePhase(currentPhase, node) { - return getPipelinePhase(currentPhase + 1, node); + function getNextPipelinePhase(currentPhase, emitHint, node) { + return getPipelinePhase(currentPhase + 1, emitHint, node); } function pipelineEmitWithNotification(hint, node) { ts.Debug.assert(lastNode === node); - var pipelinePhase = getNextPipelinePhase(0 /* Notification */, node); + var pipelinePhase = getNextPipelinePhase(0 /* Notification */, hint, node); onEmitNode(hint, node, pipelinePhase); ts.Debug.assert(lastNode === node); } @@ -92481,6 +93731,8 @@ var ts; return emitSourceFile(ts.cast(node, ts.isSourceFile)); if (hint === 2 /* IdentifierName */) return emitIdentifier(ts.cast(node, ts.isIdentifier)); + if (hint === 6 /* JsxAttributeValue */) + return emitLiteral(ts.cast(node, ts.isStringLiteral), /*jsxAttributeEscape*/ true); if (hint === 3 /* MappedTypeParameter */) return emitMappedTypeParameter(ts.cast(node, ts.isTypeParameterDeclaration)); if (hint === 5 /* EmbeddedStatement */) { @@ -92495,7 +93747,7 @@ var ts; case 15 /* TemplateHead */: case 16 /* TemplateMiddle */: case 17 /* TemplateTail */: - return emitLiteral(node); + return emitLiteral(node, /*jsxAttributeEscape*/ false); case 292 /* UnparsedSource */: case 286 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); @@ -92743,27 +93995,28 @@ var ts; case 284 /* EnumMember */: return emitEnumMember(node); // JSDoc nodes (only used in codefixes currently) - case 316 /* JSDocParameterTag */: - case 322 /* JSDocPropertyTag */: + case 317 /* JSDocParameterTag */: + case 323 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 317 /* JSDocReturnTag */: - case 319 /* JSDocTypeTag */: - case 318 /* JSDocThisTag */: - case 315 /* JSDocEnumTag */: + case 318 /* JSDocReturnTag */: + case 320 /* JSDocTypeTag */: + case 319 /* JSDocThisTag */: + case 316 /* JSDocEnumTag */: return emitJSDocSimpleTypedTag(node); + case 308 /* JSDocImplementsTag */: case 307 /* JSDocAugmentsTag */: - return emitJSDocAugmentsTag(node); - case 320 /* JSDocTemplateTag */: + return emitJSDocHeritageTag(node); + case 321 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 321 /* JSDocTypedefTag */: + case 322 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 314 /* JSDocCallbackTag */: + case 315 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); case 305 /* JSDocSignature */: return emitJSDocSignature(node); case 304 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 309 /* JSDocClassTag */: + case 310 /* JSDocClassTag */: case 306 /* JSDocTag */: return emitJSDocSimpleTag(node); case 303 /* JSDocComment */: @@ -92789,7 +94042,7 @@ var ts; case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - return emitLiteral(node); + return emitLiteral(node, /*jsxAttributeEscape*/ false); // Identifiers case 75 /* Identifier */: return emitIdentifier(node); @@ -92865,9 +94118,9 @@ var ts; case 270 /* JsxFragment */: return emitJsxFragment(node); // Transformation nodes - case 325 /* PartiallyEmittedExpression */: + case 326 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 326 /* CommaListExpression */: + case 327 /* CommaListExpression */: return emitCommaList(node); } } @@ -92881,8 +94134,7 @@ var ts; } function pipelineEmitWithSubstitution(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(1 /* Substitution */, node); - lastSubstitution = substituteNode(hint, node); + var pipelinePhase = getNextPipelinePhase(1 /* Substitution */, hint, node); pipelinePhase(hint, lastSubstitution); ts.Debug.assert(lastNode === node || lastSubstitution === node); } @@ -92969,7 +94221,7 @@ var ts; // SyntaxKind.NumericLiteral // SyntaxKind.BigIntLiteral function emitNumericOrBigIntLiteral(node) { - emitLiteral(node); + emitLiteral(node, /*jsxAttributeEscape*/ false); } // SyntaxKind.StringLiteral // SyntaxKind.RegularExpressionLiteral @@ -92977,8 +94229,8 @@ var ts; // SyntaxKind.TemplateHead // SyntaxKind.TemplateMiddle // SyntaxKind.TemplateTail - function emitLiteral(node) { - var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape); + function emitLiteral(node, jsxAttributeEscape) { + var text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape); if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 10 /* StringLiteral */ || ts.isTemplateLiteralKind(node.kind))) { writeLiteral(text); @@ -93441,7 +94693,7 @@ var ts; expression = ts.skipPartiallyEmittedExpressions(expression); if (ts.isNumericLiteral(expression)) { // check if numeric literal is a decimal literal that was originally written with a dot - var text = getLiteralTextOfNode(expression, /*neverAsciiEscape*/ true); + var text = getLiteralTextOfNode(expression, /*neverAsciiEscape*/ true, /*jsxAttributeEscape*/ false); // If he number will be printed verbatim and it doesn't already contain a dot, add one // if the expression doesn't have any comments that will be emitted. return !expression.numericLiteralFlags && !ts.stringContains(text, ts.tokenToString(24 /* DotToken */)); @@ -93556,18 +94808,77 @@ var ts; emitExpression(node.operand); writeTokenText(node.operator, writeOperator); } + var EmitBinaryExpressionState; + (function (EmitBinaryExpressionState) { + EmitBinaryExpressionState[EmitBinaryExpressionState["EmitLeft"] = 0] = "EmitLeft"; + EmitBinaryExpressionState[EmitBinaryExpressionState["EmitRight"] = 1] = "EmitRight"; + EmitBinaryExpressionState[EmitBinaryExpressionState["FinishEmit"] = 2] = "FinishEmit"; + })(EmitBinaryExpressionState || (EmitBinaryExpressionState = {})); + /** + * emitBinaryExpression includes an embedded work stack to attempt to handle as many nested binary expressions + * as possible without creating any additional stack frames. This can only be done when the emit pipeline does + * not require notification/substitution/comment/sourcemap decorations. + */ function emitBinaryExpression(node) { - var isCommaOperator = node.operatorToken.kind !== 27 /* CommaToken */; - var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); - var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); - emitExpression(node.left); - increaseIndentIf(indentBeforeOperator, isCommaOperator); - emitLeadingCommentsOfPosition(node.operatorToken.pos); - writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 /* InKeyword */ ? writeKeyword : writeOperator); - emitTrailingCommentsOfPosition(node.operatorToken.end, /*prefixSpace*/ true); // Binary operators should have a space before the comment starts - increaseIndentIf(indentAfterOperator, /*writeSpaceIfNotIndenting*/ true); - emitExpression(node.right); - decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + var nodeStack = [node]; + var stateStack = [0 /* EmitLeft */]; + var stackIndex = 0; + while (stackIndex >= 0) { + node = nodeStack[stackIndex]; + switch (stateStack[stackIndex]) { + case 0 /* EmitLeft */: { + maybePipelineEmitExpression(node.left); + break; + } + case 1 /* EmitRight */: { + var isCommaOperator = node.operatorToken.kind !== 27 /* CommaToken */; + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + increaseIndentIf(indentBeforeOperator, isCommaOperator); + emitLeadingCommentsOfPosition(node.operatorToken.pos); + writeTokenNode(node.operatorToken, node.operatorToken.kind === 97 /* InKeyword */ ? writeKeyword : writeOperator); + emitTrailingCommentsOfPosition(node.operatorToken.end, /*prefixSpace*/ true); // Binary operators should have a space before the comment starts + increaseIndentIf(indentAfterOperator, /*writeSpaceIfNotIndenting*/ true); + maybePipelineEmitExpression(node.right); + break; + } + case 2 /* FinishEmit */: { + var indentBeforeOperator = needsIndentation(node, node.left, node.operatorToken); + var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right); + decreaseIndentIf(indentBeforeOperator, indentAfterOperator); + stackIndex--; + break; + } + default: return ts.Debug.fail("Invalid state " + stateStack[stackIndex] + " for emitBinaryExpressionWorker"); + } + } + function maybePipelineEmitExpression(next) { + // Advance the state of this unit of work, + stateStack[stackIndex]++; + // Then actually do the work of emitting the node `next` returned by the prior state + // The following section should be identical to `pipelineEmit` save it assumes EmitHint.Expression and offloads + // binary expression handling, where possible, to the contained work queue + // #region trampolinePipelineEmit + var savedLastNode = lastNode; + var savedLastSubstitution = lastSubstitution; + lastNode = next; + lastSubstitution = undefined; + var pipelinePhase = getPipelinePhase(0 /* Notification */, 1 /* Expression */, next); + if (pipelinePhase === pipelineEmitWithHint && ts.isBinaryExpression(next)) { + // If the target pipeline phase is emit directly, and the next node's also a binary expression, + // skip all the intermediate indirection and push the expression directly onto the work stack + stackIndex++; + stateStack[stackIndex] = 0 /* EmitLeft */; + nodeStack[stackIndex] = next; + } + else { + pipelinePhase(1 /* Expression */, next); + } + ts.Debug.assert(lastNode === next); + lastNode = savedLastNode; + lastSubstitution = savedLastSubstitution; + // #endregion trampolinePipelineEmit + } } function emitConditionalExpression(node) { var indentBeforeQuestion = needsIndentation(node, node.condition, node.questionToken); @@ -93770,11 +95081,11 @@ var ts; var node = ts.getParseTreeNode(contextNode); var isSimilarNode = node && node.kind === contextNode.kind; var startPos = pos; - if (isSimilarNode) { + if (isSimilarNode && currentSourceFile) { pos = ts.skipTrivia(currentSourceFile.text, pos); } if (emitLeadingCommentsOfPosition && isSimilarNode && contextNode.pos !== startPos) { - var needsIndent = indentLeading && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); + var needsIndent = indentLeading && currentSourceFile && !ts.positionsAreOnSameLine(startPos, pos, currentSourceFile); if (needsIndent) { increaseIndent(); } @@ -94249,7 +95560,7 @@ var ts; } function emitJsxAttribute(node) { emit(node.name); - emitNodeWithPrefix("=", writePunctuation, node.initializer, emit); // TODO: GH#18217 + emitNodeWithPrefix("=", writePunctuation, node.initializer, emitJsxAttributeValue); } function emitJsxSpreadAttribute(node) { writePunctuation("{..."); @@ -94380,7 +95691,7 @@ var ts; } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 319 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 320 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } @@ -94396,7 +95707,7 @@ var ts; emitJSDocTypeExpression(tag.typeExpression); emitJSDocComment(tag.comment); } - function emitJSDocAugmentsTag(tag) { + function emitJSDocHeritageTag(tag) { emitJSDocTagName(tag.tagName); writeSpace(); writePunctuation("{"); @@ -95233,19 +96544,19 @@ var ts; } return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node, includeTrivia); } - function getLiteralTextOfNode(node, neverAsciiEscape) { + function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) { if (node.kind === 10 /* StringLiteral */ && node.textSourceNode) { var textSourceNode = node.textSourceNode; if (ts.isIdentifier(textSourceNode)) { - return neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? - "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : - "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; + return jsxAttributeEscape ? "\"" + ts.escapeJsxAttributeString(getTextOfNode(textSourceNode)) + "\"" : + neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" : + "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\""; } else { - return getLiteralTextOfNode(textSourceNode, neverAsciiEscape); + return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape); } } - return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape); + return ts.getLiteralText(node, currentSourceFile, neverAsciiEscape, jsxAttributeEscape); } /** * Push a new name generation scope. @@ -95615,7 +96926,7 @@ var ts; hasWrittenComment = false; var emitFlags = ts.getEmitFlags(node); var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end; - var isEmittedNode = node.kind !== 324 /* NotEmittedStatement */; + var isEmittedNode = node.kind !== 325 /* NotEmittedStatement */; // We have to explicitly check that the node is JsxText because if the compilerOptions.jsx is "preserve" we will not do any transformation. // It is expensive to walk entire tree just to set one kind of node to have no comments. var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0 || node.kind === 11 /* JsxText */; @@ -95646,7 +96957,7 @@ var ts; } ts.forEach(ts.getSyntheticLeadingComments(node), emitLeadingSynthesizedComment); exitComment(); - var pipelinePhase = getNextPipelinePhase(2 /* Comments */, node); + var pipelinePhase = getNextPipelinePhase(2 /* Comments */, hint, node); if (emitFlags & 2048 /* NoNestedComments */) { commentsDisabled = true; pipelinePhase(hint, node); @@ -95884,7 +97195,7 @@ var ts; } function pipelineEmitWithSourceMap(hint, node) { ts.Debug.assert(lastNode === node || lastSubstitution === node); - var pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, node); + var pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, hint, node); if (ts.isUnparsedSource(node) || ts.isUnparsedPrepend(node)) { pipelinePhase(hint, node); } @@ -95898,7 +97209,7 @@ var ts; else { var _a = ts.getSourceMapRange(node), pos = _a.pos, end = _a.end, _b = _a.source, source = _b === void 0 ? sourceMapSource : _b; var emitFlags = ts.getEmitFlags(node); - if (node.kind !== 324 /* NotEmittedStatement */ + if (node.kind !== 325 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && pos >= 0) { emitSourcePos(source, skipSourceTrivia(source, pos)); @@ -95911,7 +97222,7 @@ var ts; else { pipelinePhase(hint, node); } - if (node.kind !== 324 /* NotEmittedStatement */ + if (node.kind !== 325 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && end >= 0) { emitSourcePos(source, end); @@ -96696,12 +98007,6 @@ var ts; return formatStyle + text + resetEscapeSequence; } ts.formatColorAndReset = formatColorAndReset; - function padLeft(s, length) { - while (s.length < length) { - s = " " + s; - } - return s; - } function formatCodeSpan(file, start, length, indent, squiggleColor, host) { var _a = ts.getLineAndCharacterOfPosition(file, start), firstLine = _a.line, firstLineChar = _a.character; var _b = ts.getLineAndCharacterOfPosition(file, start + length), lastLine = _b.line, lastLineChar = _b.character; @@ -96717,7 +98022,7 @@ var ts; // If the error spans over 5 lines, we'll only show the first 2 and last 2 lines, // so we'll skip ahead to the second-to-last line. if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) { - context += indent + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); + context += indent + formatColorAndReset(ts.padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); i = lastLine - 1; } var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0); @@ -96726,10 +98031,10 @@ var ts; lineContent = lineContent.replace(/\s+$/g, ""); // trim from end lineContent = lineContent.replace("\t", " "); // convert tabs to single spaces // Output the gutter and the actual contents of the line. - context += indent + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; context += lineContent + host.getNewLine(); // Output the gutter and the error span for the line using tildes. - context += indent + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent + formatColorAndReset(ts.padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; context += squiggleColor; if (i === firstLine) { // If we're on the last line, then limit it to the last character of the last line. @@ -96888,7 +98193,7 @@ var ts; hasInvalidatedResolution(sourceFile.path); } function sourceFileVersionUptoDate(sourceFile) { - return sourceFile.version === getSourceVersion(sourceFile.resolvedPath); + return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName); } function projectReferenceUptoDate(oldRef, newRef, index) { if (!ts.projectReferenceIsEqualTo(oldRef, newRef)) { @@ -96993,10 +98298,10 @@ var ts; var hasEmitBlockingDiagnostics = ts.createMap(); var _compilerOptionsObjectLiteralSyntax; var moduleResolutionCache; - var resolveModuleNamesWorker; + var actualResolveModuleNamesWorker; var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse; if (host.resolveModuleNames) { - resolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.assertEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { + actualResolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.checkEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. if (!resolved || resolved.extension !== undefined) { return resolved; @@ -97009,15 +98314,15 @@ var ts; else { moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); }, options); var loader_1 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache, redirectedReference).resolvedModule; }; // TODO: GH#18217 - resolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; + actualResolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_1); }; } - var resolveTypeReferenceDirectiveNamesWorker; + var actualResolveTypeReferenceDirectiveNamesWorker; if (host.resolveTypeReferenceDirectives) { - resolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.assertEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; } else { var loader_2 = function (typesRef, containingFile, redirectedReference) { return ts.resolveTypeReferenceDirective(typesRef, containingFile, options, host, redirectedReference).resolvedTypeReferenceDirective; }; // TODO: GH#18217 - resolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.assertEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; + actualResolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); }; } // Map from a stringified PackageId to the source file with that id. // Only one source file may have a given packageId. Others become redirects (see createRedirectSourceFile). @@ -97178,6 +98483,7 @@ var ts; getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); }, getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); }, getTypeCount: function () { return getDiagnosticsProducingTypeChecker().getTypeCount(); }, + getInstantiationCount: function () { return getDiagnosticsProducingTypeChecker().getInstantiationCount(); }, getRelationCacheSizes: function () { return getDiagnosticsProducingTypeChecker().getRelationCacheSizes(); }, getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; }, getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; }, @@ -97205,6 +98511,20 @@ var ts; ts.performance.mark("afterProgram"); ts.performance.measure("Program", "beforeProgram", "afterProgram"); return program; + function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference) { + ts.performance.mark("beforeResolveModule"); + var result = actualResolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference); + ts.performance.mark("afterResolveModule"); + ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule"); + return result; + } + function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference) { + ts.performance.mark("beforeResolveTypeReference"); + var result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference); + ts.performance.mark("afterResolveTypeReference"); + ts.performance.measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"); + return result; + } function compareDefaultLibFiles(a, b) { return ts.compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b)); } @@ -97278,13 +98598,13 @@ var ts; // which per above occurred during the current program creation. // Since we assume the filesystem does not change during program creation, // it is safe to reuse resolutions from the earlier call. - var result_8 = []; + var result_9 = []; for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { var moduleName = moduleNames_1[_i]; var resolvedModule = file.resolvedModules.get(moduleName); - result_8.push(resolvedModule); + result_9.push(resolvedModule); } - return result_8; + return result_9; } // At this point, we know at least one of the following hold: // - file has local declarations for ambient modules @@ -97578,7 +98898,7 @@ var ts; } if (resolveTypeReferenceDirectiveNamesWorker) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); var resolutions_1 = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFilePath, getResolvedProjectReferenceToRedirect(newSourceFile.originalFileName)); // ensure that types resolutions are still correct var resolutionsChanged_1 = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions_1, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo); @@ -97884,10 +99204,10 @@ var ts; function getJSSyntacticDiagnosticsForFile(sourceFile) { return runWithCancellationToken(function () { var diagnostics = []; - var parent = sourceFile; - walk(sourceFile); + walk(sourceFile, sourceFile); + ts.forEachChildRecursively(sourceFile, walk, walkArray); return diagnostics; - function walk(node) { + function walk(node, parent) { // Return directly from the case if the given node doesnt want to visit each child // Otherwise break to visit each child switch (parent.kind) { @@ -97896,7 +99216,7 @@ var ts; case 161 /* MethodDeclaration */: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); - return; + return "skip"; } // falls through case 160 /* MethodSignature */: @@ -97910,70 +99230,66 @@ var ts; // type annotation if (parent.type === node) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } } switch (node.kind) { case 255 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node.parent, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); - return; + return "skip"; } break; case 260 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); - return; + return "skip"; } break; case 253 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 259 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 279 /* HeritageClause */: var heritageClause = node; if (heritageClause.token === 113 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 246 /* InterfaceDeclaration */: var interfaceKeyword = ts.tokenToString(114 /* InterfaceKeyword */); - ts.Debug.assertDefined(interfaceKeyword); + ts.Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); - return; + return "skip"; case 249 /* ModuleDeclaration */: var moduleKeyword = node.flags & 16 /* Namespace */ ? ts.tokenToString(136 /* NamespaceKeyword */) : ts.tokenToString(135 /* ModuleKeyword */); - ts.Debug.assertDefined(moduleKeyword); + ts.Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); - return; + return "skip"; case 247 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 248 /* EnumDeclaration */: - var enumKeyword = ts.Debug.assertDefined(ts.tokenToString(88 /* EnumKeyword */)); + var enumKeyword = ts.Debug.checkDefined(ts.tokenToString(88 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); - return; + return "skip"; case 218 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 217 /* AsExpression */: diagnostics.push(createDiagnosticForNode(node.type, ts.Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case 199 /* TypeAssertionExpression */: ts.Debug.fail(); // Won't parse these in a JS file anyway, as they are interpreted as JSX. } - var prevParent = parent; - parent = node; - ts.forEachChild(node, walk, walkArray); - parent = prevParent; } - function walkArray(nodes) { + function walkArray(nodes, parent) { if (parent.decorators === nodes && !options.experimentalDecorators) { diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)); } @@ -97990,13 +99306,14 @@ var ts; // Check type parameters if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } // falls through case 225 /* VariableStatement */: // Check modifiers if (nodes === parent.modifiers) { - return checkModifiers(parent.modifiers, parent.kind === 225 /* VariableStatement */); + checkModifiers(parent.modifiers, parent.kind === 225 /* VariableStatement */); + return "skip"; } break; case 159 /* PropertyDeclaration */: @@ -98008,14 +99325,14 @@ var ts; diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, ts.tokenToString(modifier.kind))); } } - return; + return "skip"; } break; case 156 /* Parameter */: // Check modifiers of parameter declaration if (nodes === parent.modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case 196 /* CallExpression */: @@ -98027,14 +99344,10 @@ var ts; // Check type arguments if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; } - for (var _b = 0, nodes_6 = nodes; _b < nodes_6.length; _b++) { - var node = nodes_6[_b]; - walk(node); - } } function checkModifiers(modifiers, isConstValid) { for (var _i = 0, modifiers_1 = modifiers; _i < modifiers_1.length; _i++) { @@ -98246,7 +99559,7 @@ var ts; } } function getLibFileFromReference(ref) { - var libName = ref.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(ref.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { return getSourceFile(ts.combinePaths(defaultLibraryPath, libFileName)); @@ -98455,7 +99768,7 @@ var ts; file.originalFileName = originalFileName; addFileToRefFileMap(fileName, file, refFile); if (host.useCaseSensitiveFileNames()) { - var pathLowerCase = path.toLowerCase(); + var pathLowerCase = ts.toFileNameLowerCase(path); // for case-sensitive file systems check if we've already seen some file with similar filename ignoring case var existingFile = filesByNameIgnoreCase.get(pathLowerCase); if (existingFile) { @@ -98626,7 +99939,7 @@ var ts; } function processTypeReferenceDirectives(file) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); }); if (!typeDirectives) { return; } @@ -98635,7 +99948,7 @@ var ts; var ref = file.typeReferenceDirectives[i]; var resolvedTypeReferenceDirective = resolutions[i]; // store resolved type directive on the file - var fileName = ref.fileName.toLocaleLowerCase(); + var fileName = ts.toFileNameLowerCase(ref.fileName); ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective); processTypeReferenceDirective(fileName, resolvedTypeReferenceDirective, { kind: ts.RefFileKind.TypeReferenceDirective, @@ -98697,7 +100010,7 @@ var ts; } function processLibReferenceDirectives(file) { ts.forEach(file.libReferenceDirectives, function (libReference) { - var libName = libReference.fileName.toLocaleLowerCase(); + var libName = ts.toFileNameLowerCase(libReference.fileName); var libFileName = ts.libMap.get(libName); if (libFileName) { // we ignore any 'no-default-lib' reference set on this file. @@ -98829,7 +100142,7 @@ var ts; projectReferenceRedirects.set(sourceFilePath, false); return undefined; } - sourceFile = ts.Debug.assertDefined(commandLine.options.configFile); + sourceFile = ts.Debug.checkDefined(commandLine.options.configFile); ts.Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath); addFileToFilesByName(sourceFile, sourceFilePath, /*redirectedPath*/ undefined); } @@ -98894,6 +100207,9 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } + if (!options.listFilesOnly && options.noEmit && ts.isIncrementalCompilation(options)) { + createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); + } verifyProjectReferences(); // List of collected files is complete; validate exhautiveness if this is a project with a file list if (options.composite) { @@ -99072,7 +100388,7 @@ var ts; chain = ts.chainDiagnosticMessages(chain, ts.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file, emitFileName); blockEmittingOfFile(emitFileName, ts.createCompilerDiagnosticFromMessageChain(chain)); } - var emitFileKey = !host.useCaseSensitiveFileNames() ? emitFilePath.toLocaleLowerCase() : emitFilePath; + var emitFileKey = !host.useCaseSensitiveFileNames() ? ts.toFileNameLowerCase(emitFilePath) : emitFilePath; // Report error if multiple files write into same file if (emitFilesSeen.has(emitFileKey)) { // Already seen the same emit file - report error @@ -99090,7 +100406,7 @@ var ts; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } - var refFile = ts.Debug.assertDefined(getSourceFileByPath(refPathToReportErrorOn.file)); + var refFile = ts.Debug.checkDefined(getSourceFileByPath(refPathToReportErrorOn.file)); var kind = refPathToReportErrorOn.kind, index = refPathToReportErrorOn.index; var pos, end; switch (kind) { @@ -99315,7 +100631,7 @@ var ts; return { fileExists: function (f) { return directoryStructureHost.fileExists(f); }, readDirectory: function (root, extensions, excludes, includes, depth) { - ts.Debug.assertDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + ts.Debug.assertIsDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: function (f) { return directoryStructureHost.readFile(f); }, @@ -99533,7 +100849,7 @@ var ts; // Create the reference map, and set the file infos for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) { var sourceFile = _a[_i]; - var version_1 = ts.Debug.assertDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); + var version_1 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined; if (referencedMap) { var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName); @@ -100060,7 +101376,7 @@ var ts; } // With --out or --outFile all outputs go into single file // so operations are performed directly on program, return program - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var compilerOptions = program.getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); @@ -100085,10 +101401,10 @@ var ts; if (affectedFilesPendingEmit) { var seenEmittedFiles = state.seenEmittedFiles || (state.seenEmittedFiles = ts.createMap()); for (var i = state.affectedFilesPendingEmitIndex; i < affectedFilesPendingEmit.length; i++) { - var affectedFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); + var affectedFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); if (affectedFile) { var seenKind = seenEmittedFiles.get(affectedFile.resolvedPath); - var emitKind = ts.Debug.assertDefined(ts.Debug.assertDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); + var emitKind = ts.Debug.checkDefined(ts.Debug.checkDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); if (seenKind === undefined || seenKind < emitKind) { // emit this file state.affectedFilesPendingEmitIndex = i; @@ -100112,7 +101428,7 @@ var ts; if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) { if (!state.cleanedDiagnosticsOfLibFiles) { state.cleanedDiagnosticsOfLibFiles = true; - var program_1 = ts.Debug.assertDefined(state.program); + var program_1 = ts.Debug.checkDefined(state.program); var options_2 = program_1.getCompilerOptions(); ts.forEach(program_1.getSourceFiles(), function (f) { return program_1.isSourceFileDefaultLibrary(f) && @@ -100133,14 +101449,14 @@ var ts; function handleDtsMayChangeOf(state, path, cancellationToken, computeHash) { removeSemanticDiagnosticsOf(state, path); if (!state.changedFilesSet.has(path)) { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); var sourceFile = program.getSourceFileByPath(path); if (sourceFile) { // Even though the js emit doesnt change and we are already handling dts emit and semantic diagnostics // we need to update the signature to reflect correctness of the signature(which is output d.ts emit) of this file // This ensures that we dont later during incremental builds considering wrong signature. // Eg where this also is needed to ensure that .tsbuildinfo generated by incremental build should be same as if it was first fresh build - ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.assertDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); + ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap); // If not dts emit, nothing more to do if (ts.getEmitDeclarations(state.compilerOptions)) { addToAffectedFilesPendingEmit(state, path, 0 /* DtsOnly */); @@ -100162,8 +101478,8 @@ var ts; return !state.semanticDiagnosticsFromOldState.size; } function isChangedSignagure(state, path) { - var newSignature = ts.Debug.assertDefined(state.currentAffectedFilesSignatures).get(path); - var oldSignagure = ts.Debug.assertDefined(state.fileInfos.get(path)).signature; + var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path); + var oldSignagure = ts.Debug.checkDefined(state.fileInfos.get(path)).signature; return newSignature !== oldSignagure; } /** @@ -100189,7 +101505,7 @@ var ts; seenFileNamesMap.set(currentPath, true); var result = fn(state, currentPath); if (result && isChangedSignagure(state, currentPath)) { - var currentSourceFile = ts.Debug.assertDefined(state.program).getSourceFileByPath(currentPath); + var currentSourceFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(currentPath); queue.push.apply(queue, ts.BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath)); } } @@ -100302,7 +101618,7 @@ var ts; * bindAndCheckDiagnostics (from cache) and program diagnostics */ function getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken) { - return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.assertDefined(state.program).getProgramDiagnostics(sourceFile)); + return ts.concatenate(getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), ts.Debug.checkDefined(state.program).getProgramDiagnostics(sourceFile)); } /** * Gets the binder and checker diagnostics either from cache if present, or otherwise from program and caches it @@ -100318,7 +101634,7 @@ var ts; } } // Diagnostics werent cached, get them from program, and cache the result - var diagnostics = ts.Debug.assertDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); + var diagnostics = ts.Debug.checkDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); if (state.semanticDiagnosticsPerFile) { state.semanticDiagnosticsPerFile.set(path, diagnostics); } @@ -100330,7 +101646,7 @@ var ts; function getProgramBuildInfo(state, getCanonicalFileName) { if (state.compilerOptions.outFile || state.compilerOptions.out) return undefined; - var currentDirectory = ts.Debug.assertDefined(state.program).getCurrentDirectory(); + var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory(); var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory)); var fileInfos = {}; state.fileInfos.forEach(function (value, key) { @@ -100496,10 +101812,10 @@ var ts; backupState = cloneBuilderProgramState(state); }; builderProgram.restoreState = function () { - state = ts.Debug.assertDefined(backupState); + state = ts.Debug.checkDefined(backupState); backupState = undefined; }; - builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.assertDefined(state.program), sourceFile); }; + builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); }; builderProgram.getSemanticDiagnostics = getSemanticDiagnostics; builderProgram.emit = emit; builderProgram.releaseProgram = function () { @@ -100533,7 +101849,7 @@ var ts; if (state.emittedBuildInfo) { return undefined; } - var affected_1 = ts.Debug.assertDefined(state.program); + var affected_1 = ts.Debug.checkDefined(state.program); return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file @@ -100545,7 +101861,7 @@ var ts; isPendingEmitFile = true; } else { - var program = ts.Debug.assertDefined(state.program); + var program = ts.Debug.checkDefined(state.program); if (state.programEmitComplete) return undefined; affected = program; @@ -100554,7 +101870,7 @@ var ts; return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file - ts.Debug.assertDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */, customTransformers), affected, emitKind, isPendingEmitFile); + ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */, customTransformers), affected, emitKind, isPendingEmitFile); } /** * Emits the JavaScript and declaration files. @@ -100594,7 +101910,7 @@ var ts; }; } } - return ts.Debug.assertDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); + return ts.Debug.checkDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); } /** * Return the semantic diagnostics for the next affected file or undefined if iteration is complete @@ -100634,11 +101950,11 @@ var ts; */ function getSemanticDiagnostics(sourceFile, cancellationToken) { assertSourceFileOkWithoutNextAffectedCall(state, sourceFile); - var compilerOptions = ts.Debug.assertDefined(state.program).getCompilerOptions(); + var compilerOptions = ts.Debug.checkDefined(state.program).getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { ts.Debug.assert(!state.semanticDiagnosticsPerFile); // We dont need to cache the diagnostics just return them from program - return ts.Debug.assertDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); + return ts.Debug.checkDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); } if (sourceFile) { return getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken); @@ -100649,7 +101965,7 @@ var ts; while (getSemanticDiagnosticsOfNextAffectedFile(cancellationToken)) { } var diagnostics; - for (var _i = 0, _a = ts.Debug.assertDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { + for (var _i = 0, _a = ts.Debug.checkDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { var sourceFile_1 = _a[_i]; diagnostics = ts.addRange(diagnostics, getSemanticDiagnosticsOfFile(state, sourceFile_1, cancellationToken)); } @@ -100757,7 +102073,7 @@ var ts; close: ts.noop, }; function getProgram() { - return ts.Debug.assertDefined(state.program); + return ts.Debug.checkDefined(state.program); } } ts.createRedirectedBuilderProgram = createRedirectedBuilderProgram; @@ -100864,6 +102180,7 @@ var ts; var directoryWatchesOfFailedLookups = ts.createMap(); var rootDir = rootDirForResolution && ts.removeTrailingDirectorySeparator(ts.getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory())); var rootPath = (rootDir && resolutionHost.toPath(rootDir)); // TODO: GH#18217 + var rootSplitLength = rootPath !== undefined ? rootPath.split(ts.directorySeparator).length : 0; // TypeRoot watches for the types that get added as part of getAutomaticTypeDirectiveNames var typeRootsWatches = ts.createMap(); return { @@ -100965,7 +102282,7 @@ var ts; if (globalCache !== undefined && !ts.isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && ts.extensionIsTS(primaryResult.resolvedModule.extension))) { // create different collection of failed lookup locations for second pass // if it will fail and we've already found something during the first pass - we don't want to pollute its results - var _a = ts.loadModuleFromGlobalCache(ts.Debug.assertDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; + var _a = ts.loadModuleFromGlobalCache(ts.Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; if (resolvedModule) { return { resolvedModule: resolvedModule, failedLookupLocations: ts.addRange(primaryResult.failedLookupLocations, failedLookupLocations) }; } @@ -101074,15 +102391,23 @@ var ts; if (isInDirectoryPath(rootPath, failedLookupLocationPath)) { // Ensure failed look up is normalized path failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory()); - ts.Debug.assert(failedLookupLocation.length === failedLookupLocationPath.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); - var subDirectoryInRoot = failedLookupLocationPath.indexOf(ts.directorySeparator, rootPath.length + 1); - if (subDirectoryInRoot !== -1) { + var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator); + var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator); + ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath); + if (failedLookupPathSplit.length > rootSplitLength + 1) { // Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution - return { dir: failedLookupLocation.substr(0, subDirectoryInRoot), dirPath: failedLookupLocationPath.substr(0, subDirectoryInRoot) }; + return { + dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator), + dirPath: failedLookupPathSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator) + }; } else { // Always watch root directory non recursively - return { dir: rootDir, dirPath: rootPath, nonRecursive: false }; // TODO: GH#18217 + return { + dir: rootDir, + dirPath: rootPath, + nonRecursive: false + }; } } return getDirectoryToWatchFromFailedLookupLocationDirectory(ts.getDirectoryPath(ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory())), ts.getDirectoryPath(failedLookupLocationPath)); @@ -101286,7 +102611,7 @@ var ts; resolution.isInvalidated = true; (filesWithInvalidatedResolutions || (filesWithInvalidatedResolutions = ts.createMap())).set(containingFilePath, true); // When its a file with inferred types resolution, invalidate type reference directive resolution - if (containingFilePath.endsWith(ts.inferredTypesContainingFile)) { + if (ts.endsWith(containingFilePath, ts.inferredTypesContainingFile)) { resolutionHost.onChangedAutomaticTypeDirectiveNames(); } } @@ -102140,7 +103465,7 @@ var ts; var getDefaultLibLocation = ts.memoize(function () { return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath())); }); var host = system; // TODO: `host` is unused! - // eslint-disable-next-line no-unused-expressions + // eslint-disable-next-line @typescript-eslint/no-unused-expressions host; return { useCaseSensitiveFileNames: function () { return system.useCaseSensitiveFileNames; }, @@ -102680,7 +104005,7 @@ var ts; return watchDirectory(host, directory, function (fileOrDirectory) { ts.Debug.assert(!!configFileName); var fileOrDirectoryPath = toPath(fileOrDirectory); - // Since the file existance changed, update the sourceFiles cache + // Since the file existence changed, update the sourceFiles cache if (cachedDirectoryStructureHost) { cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); } @@ -102866,7 +104191,7 @@ var ts; if (!compilerHost.resolveModuleNames) { var loader_3 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference).resolvedModule; }; compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference) { - return ts.loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_3); + return ts.loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_3); }; } var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchFilePath = _a.watchFilePath, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog; @@ -103252,7 +104577,7 @@ var ts; if (state.options.verbose) reportStatus(state, ts.Diagnostics.Building_project_0, project); if (config.fileNames.length === 0) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); // Nothing to build - must be a solution file, basically buildResult = BuildResultFlags.None; step = Step.QueueReferencingProjects; @@ -103263,7 +104588,7 @@ var ts; // Update module resolution cache if needed updateModuleResolutionCache(state, project, config); // Create program - program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), config.errors, config.projectReferences); + program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences); step++; } function handleDiagnostics(diagnostics, errorFlags, errorType) { @@ -103276,14 +104601,14 @@ var ts; } } function getSyntaxDiagnostics(cancellationToken) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); handleDiagnostics(__spreadArrays(program.getConfigFileParsingDiagnostics(), program.getOptionsDiagnostics(cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken)), BuildResultFlags.SyntaxErrors, "Syntactic"); } function getSemanticDiagnostics(cancellationToken) { - handleDiagnostics(ts.Debug.assertDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); + handleDiagnostics(ts.Debug.checkDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); } function emit(writeFileCallback, cancellationToken, customTransformers) { - ts.Debug.assertDefined(program); + ts.Debug.assertIsDefined(program); ts.Debug.assert(step === Step.Emit); // Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly program.backupState(); @@ -103417,11 +104742,11 @@ var ts; emitBundle(writeFile, customTransformers); break; case Step.BuildInvalidatedProjectOfBundle: - ts.Debug.assertDefined(invalidatedProjectOfBundle).done(cancellationToken); + ts.Debug.checkDefined(invalidatedProjectOfBundle).done(cancellationToken); step = Step.Done; break; case Step.QueueReferencingProjects: - queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.assertDefined(buildResult)); + queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.checkDefined(buildResult)); step++; break; // Should never be done @@ -103438,7 +104763,7 @@ var ts; if (status.type !== ts.UpToDateStatusType.OutOfDateWithPrepend || options.force) return true; return config.fileNames.length === 0 || - !!config.errors.length || + !!ts.getConfigFileParsingDiagnostics(config).length || !ts.isIncrementalCompilation(config.options); } function getNextInvalidatedProject(state, buildOrder, reportQueue) { @@ -103485,7 +104810,7 @@ var ts; verboseReportProjectStatus(state, project, status); if (!options.force) { if (status.type === ts.UpToDateStatusType.UpToDate) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); // Up to date, skip if (options.dry) { @@ -103495,12 +104820,12 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); return createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder); } } if (status.type === ts.UpToDateStatusType.UpstreamBlocked) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); if (options.verbose) { reportStatus(state, status.upstreamProjectBlocked ? @@ -103510,7 +104835,7 @@ var ts; continue; } if (status.type === ts.UpToDateStatusType.ContainerOnly) { - reportAndStoreErrors(state, projectPath, config.errors); + reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); // Do nothing continue; diff --git a/lib/watchGuard.js b/lib/watchGuard.js index c89356b0dc3ad..387443cbcf2ca 100644 --- a/lib/watchGuard.js +++ b/lib/watchGuard.js @@ -1,14 +1,14 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ diff --git a/lib/zh-cn/diagnosticMessages.generated.json b/lib/zh-cn/diagnosticMessages.generated.json index 062df5844c921..479efa299562d 100644 --- a/lib/zh-cn/diagnosticMessages.generated.json +++ b/lib/zh-cn/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "“{0}”修饰符不能与导入声明一起使用。", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "“{0}”修饰符不能与接口声明一起使用。", "A_0_parameter_must_be_the_first_parameter_2680": "“{0}”参数必须是第一个参数。", + "A_bigint_literal_cannot_use_exponential_notation_1352": "bigint 文本不能使用指数符号。", + "A_bigint_literal_must_be_an_integer_1353": "bigint 文本必须是整数。", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "绑定模式参数在实现签名中不能为可选参数。", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "\"break\" 语句只能在封闭迭代或 switch 语句内使用。", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "\"break\" 语句只能跳转到封闭语句的标签。", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "类只能实现具有可选类型参数的标识符/限定名称。", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "类只能实现具有静态已知成员的对象类型或对象类型的交集。", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "不带 \"default\" 修饰符的类声明必须具有名称。", "A_class_may_only_extend_another_class_2311": "类只能扩展其他类。", - "A_class_may_only_implement_another_class_or_interface_2422": "类只能实现其他类或接口。", "A_class_member_cannot_have_the_0_keyword_1248": "类成员不可具有“{0}”关键字。", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "计算属性名中不允许逗号表达式。", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "计算属性名无法从其包含的类型引用类型参数。", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "接口中的计算属性名称必须引用必须引用类型为文本类型或 \"unique symbol\" 的表达式。", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "计算属性名的类型必须为 \"string\"、\"number\"、\"symbol\" 或 \"any\"。", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "窗体“{0}”的计算属性名必须是 \"symbol\" 类型。", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "\"const\" 断言只能用于引用枚举成员、字符串、数字、布尔值、数组或对象文本。", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "只有使用字符串文本才能访问常数枚举成员。", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "环境上下文中的 \"const\" 初始化表达式必须为字符串或数字参数。", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "环境上下文中的 \"const\" 初始化表达式必须为字符串、数字文本或文本枚举引用。", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "当构造函数的类扩展 \"null\" 时,它不能包含 \"super\" 调用。", "A_constructor_cannot_have_a_this_parameter_2681": "构造函数不可具有 \"this\" 参数。", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "\"continue\" 语句只能在封闭迭代语句内使用。", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "\"continue\" 语句只能跳转到封闭迭代语句的标签。", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "不能在已有的环境上下文中使用 \"declare\" 修饰符。", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": "在 .d.ts 文件中的顶层声明需要 \"declare\" 修饰符。", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "修饰器仅可修饰方法实现,而不可修饰重载。", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "\"default\" 子句在 \"switch\" 语句中只能出现一次。", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "默认导出只能在 ECMAScript-style 模块中使用。", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "生成器不能具有 \"void\" 类型批注。", "A_get_accessor_cannot_have_parameters_1054": "\"get\" 访问器不能具有参数。", "A_get_accessor_must_return_a_value_2378": "\"get\" 访问器必须返回值。", + "A_label_is_not_allowed_here_1344": "此处不允许使用 'A 标签。", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "枚举声明中的成员初始化表达式不能引用在其后声明的成员(包括在其他枚举中定义的成员)。", + "A_method_cannot_be_named_with_a_private_identifier_18022": "不能用专用标识符命名方法。", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "mixin 类必须具有单个 rest 参数为类型 \"any[]\" 的构造函数。", "A_module_cannot_have_multiple_default_exports_2528": "一个模块不能具有多个默认导出。", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "命名空间声明必须位于与之合并的类或函数所在的相同文件内。", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "命名空间声明不能位于与之合并的类或函数前", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "只允许在命名空间或模块中使用命名空间声明。", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "命名空间样式导入不能调用或构造,并将在运行时导致失败。", "A_non_dry_build_would_build_project_0_6357": "非 -dry 生成将生成项目“{0}”", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "非 -dry 生成将删除以下文件: {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "非干燥生成将更新项目 \"{0}\" 的输出", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "非干燥生成将更新项目 \"{0}\" 的输出的时间戳", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "只允许在函数或构造函数实现中使用参数初始化表达式。", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "不能使用 rest 参数声明参数属性。", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "只允许在构造函数实现中使用参数属性。", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "承诺必须具有 \"then\" 方法。", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "类型为 \"unique symbol\" 的类的属性必须同时为 \"static\" 和 \"readonly\"。", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "类型为 \"unique symbol\" 的接口或类型文本的属性必须为 \"readonly\"。", + "A_required_element_cannot_follow_an_optional_element_1257": "必选元素不能位于可选元素后。", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "必选参数不能位于可选参数后。", "A_rest_element_cannot_contain_a_binding_pattern_2501": "rest 元素不能包含绑定模式。", "A_rest_element_cannot_have_a_property_name_2566": "其余元素不能具有属性名。", "A_rest_element_cannot_have_an_initializer_1186": "rest 元素不能具有初始化表达式。", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "rest 元素必须在析构模式中位于最末。", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "rest 元素必须在元组类型中位于最末。", + "A_rest_element_type_must_be_an_array_type_2574": "rest 元素类型必须是数组类型。", "A_rest_parameter_cannot_be_optional_1047": "rest 参数不能为可选参数。", "A_rest_parameter_cannot_have_an_initializer_1048": "rest 参数不能具有初始化表达式。", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "rest 参数必须是参数列表中的最后一个参数。", @@ -77,13 +85,13 @@ "A_set_accessor_must_have_exactly_one_parameter_1049": "\"set\" 访问器必须正好具有一个参数。", "A_set_accessor_parameter_cannot_have_an_initializer_1052": "\"set\" 访问器参数不能包含初始化表达式。", "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381": "具有实现的签名不能使用字符串文本类型。", - "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "当类包含初始化的属性或参数属性时,\"super\" 调用必须是构造函数中的第一个语句。", + "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "当类包含初始化的属性、参数属性或专用标识符时,\"super\" 调用必须是构造函数中的第一个语句。", "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "基于 \"this\" 的类型防护与基于参数的类型防护不兼容。", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "\"this\" 类型仅在类或接口的非静态成员中可用。", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "已在“{0}”中定义了 \"tsconfig.json\" 文件。", - "A_tuple_type_element_list_cannot_be_empty_1122": "元组类型元素列表不能为空。", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "乘方表达式的左侧不允许出现类型断言表达式。请考虑用括号将表达式括起。", "A_type_literal_property_cannot_have_an_initializer_1247": "类型文字数据不可具有初始化表达式。", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "仅类型导入可以指定默认导入或命名绑定,但不能同时指定这两者。", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "类型谓词无法引用 rest 参数。", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "类型谓词无法在绑定模式中引用元素“{0}”。", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "只允许在函数和方法的返回类型位置使用类型谓词。", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "将“{0}”从“{1}”添加到现有导入声明", "Add_0_to_unresolved_variable_90008": "将“{0}.”添加到未解析的变量", "Add_all_missing_async_modifiers_95041": "添加所有缺失的 \"async\" 修饰符", + "Add_all_missing_imports_95064": "添加所有缺少的导入", "Add_all_missing_members_95022": "添加所有缺少的成员", "Add_all_missing_super_calls_95039": "添加所有缺失的超级调用", "Add_async_modifier_to_containing_function_90029": "将异步修饰符添加到包含函数", + "Add_await_95083": "添加 \"await\"", + "Add_await_to_initializer_for_0_95084": "将 \"await\" 添加到 \"{0}\" 的初始值设定项", + "Add_await_to_initializers_95089": "将 \"await\" 添加到初始值设定项", "Add_braces_to_arrow_function_95059": "向箭头函数添加大括号", + "Add_const_to_all_unresolved_variables_95082": "将 \"const\" 添加到所有未解析变量", + "Add_const_to_unresolved_variable_95081": "将 \"const\" 添加到未解析的变量", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "将默认导入 \"{0}\" 从 \"{1}\" 添加到现有导入声明。", "Add_definite_assignment_assertion_to_property_0_95020": "向属性“{0}”添加明确的赋值断言", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "将明确赋值断言添加到未初始化的所有属性", + "Add_export_to_make_this_file_into_a_module_95097": "添加 \"export {}\" 以将此文件变为模块", "Add_index_signature_for_property_0_90017": "为属性“{0}”添加索引签名", "Add_initializer_to_property_0_95019": "向属性“{0}”添加初始值设定项", "Add_initializers_to_all_uninitialized_properties_95027": "将初始化表达式添加到未初始化的所有属性", + "Add_missing_enum_member_0_95063": "添加缺少的枚举成员 \"{0}\"", + "Add_missing_new_operator_to_all_calls_95072": "将缺少的 \"new\" 运算符添加到所有调用", + "Add_missing_new_operator_to_call_95071": "将缺少的 \"new\" 运算符添加到调用", "Add_missing_super_call_90001": "添加缺失的 \"super()\" 调用", "Add_missing_typeof_95052": "添加缺少的 \"typeof\"", + "Add_names_to_all_parameters_without_names_95073": "将名称添加到没有名称的所有参数", "Add_or_remove_braces_in_an_arrow_function_95058": "添加或删除箭头函数中的大括号", + "Add_parameter_name_90034": "添加参数名称", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "将限定符添加到匹配成员名称的所有未解析变量", "Add_to_all_uncalled_decorators_95044": "将 \"()\" 添加到所有未调用的修饰器", "Add_ts_ignore_to_all_error_messages_95042": "将 \"@ts-ignore\" 添加到所有错误消息", "Add_undefined_type_to_all_uninitialized_properties_95029": "将未定义的类型添加到未初始化的所有属性", "Add_undefined_type_to_property_0_95018": "向属性“{0}”添加“未定义”类型", + "Add_unknown_conversion_for_non_overlapping_types_95069": "为非重叠类型添加 \"unknown\" 转换", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "将 \"unknown\" 添加到非重叠类型的所有转换", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "添加 tsconfig.json 文件有助于组织包含 TypeScript 和 JavaScript 文件的项目。有关详细信息,请访问 https://aka.ms/tsconfig。", "Additional_Checks_6176": "其他检查", "Advanced_Options_6178": "高级选项", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "“{0}”的所有声明都必须具有相同的类型参数。", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "抽象方法的所有声明必须是连续的。", "All_destructured_elements_are_unused_6198": "未取消使用任何解构元素。", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "提供 \"--isolatedModules\" 标志时,所有文件都必须是模块。", "All_imports_in_import_declaration_are_unused_6192": "未使用导入声明中的所有导入。", + "All_type_parameters_are_unused_6205": "未使用任何类型参数", "All_variables_are_unused_6199": "所有变量均未使用。", + "Allow_accessing_UMD_globals_from_modules_95076": "允许从模块访问 UMD 变量全局。", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "允许从不带默认输出的模块中默认输入。这不会影响代码发出,只是类型检查。", "Allow_javascript_files_to_be_compiled_6102": "允许编译 JavaScript 文件。", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "提供 \"--isolatedModules\" 标志的情况下不允许使用环境常数枚举。", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "已包含的文件名 \"{0}\" 仅大小写与文件名 \"{1}\" 不同。", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "环境模块声明无法指定相对模块名。", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "环境模块不能嵌套在其他模块或命名空间中。", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "AMD 模块无法拥有多个名称分配。", "An_abstract_accessor_cannot_have_an_implementation_1318": "抽象访问器不能有实现。", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "不能在环境上下文中声明访问器。", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "可访问性修饰符不能与专用标识符一起使用。", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "不能用专用标识符命名访问器。", "An_accessor_cannot_have_type_parameters_1094": "访问器不能具有类型参数。", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "只允许在文件的顶层中使用环境模块声明。", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "算术操作数必须为类型 \"any\"、\"number\" 或枚举类型。", + "An_argument_for_0_was_not_provided_6210": "未提供 \"{0}\" 的自变量。", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "未提供与此绑定模式匹配的自变量。", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "算术操作数必须为类型 \"any\"、\"number\"、\"bigint\" 或枚举类型。", + "An_arrow_function_cannot_have_a_this_parameter_2730": "箭头函数不能包含 \"this\" 参数。", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "ES5/ES3 中的异步函数或方法需要 \"Promise\" 构造函数。确保对 \"Promise\" 构造函数进行了声明或在 \"--lib\" 选项中包含了 \"ES2015\"。", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "异步函数或方法必须具有有效的可等待返回类型。", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "异步函数或方法必须返回 \"Promise\"。请确保具有对 \"Promise\" 的声明或在 `--lib` 选项中包括 \"ES2015\"。", "An_async_iterator_must_have_a_next_method_2519": "异步迭代器必须具有 \"next()\" 方法。", "An_element_access_expression_should_take_an_argument_1011": "元素访问表达式应采用参数。", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "不能用专用标识符命名枚举成员。", "An_enum_member_cannot_have_a_numeric_name_2452": "枚举成员不能具有数值名。", + "An_enum_member_name_must_be_followed_by_a_or_1357": "枚举成员名称的后面必须跟有 \",\"、\"=\" 或 \"}\"。", "An_export_assignment_can_only_be_used_in_a_module_1231": "导出分配只能在模块中使用。", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "不能在具有其他导出元素的模块中使用导出分配。", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "不能在命名空间中使用导出分配。", "An_export_assignment_cannot_have_modifiers_1120": "导出分配不能具有修饰符。", "An_export_declaration_can_only_be_used_in_a_module_1233": "导出声明只能在模块中使用。", "An_export_declaration_cannot_have_modifiers_1193": "导出声明不能有修饰符。", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "无法测试 \"void\" 类型表达式的真实性", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "扩展的 Unicode 转义值必须介于(含) 0x0 和 0x10FFFF 之间。", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "标识符或关键字不能紧跟在数字文本之后。", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "不能在环境上下文中声明实现。", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "导入别名不能引用使用 \"export type\" 导出的声明。", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "导入别名不能引用使用 \"import type\" 导入的声明。", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "导入声明只能在命名空间或模块中使用。", "An_import_declaration_cannot_have_modifiers_1191": "导入声明不能有修饰符。", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "导入路径不能以“{0}”扩展名结束。考虑改为导入“{1}”。", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "索引签名参数必须具有类型批注。", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "索引签名参数类型不能为类型别名。请考虑改为编写“[{0}: {1}]:{2}”。", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "索引签名参数类型不能为联合类型。请考虑改用映射的对象类型。", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "索引签名参数类型必须为 \"string\" 或 \"number\"。", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "索引签名参数类型必须为 \"string\" 或 \"number\"。", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "接口只能扩展具有可选类型参数的标识符/限定名称。", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "接口只能扩展类或其他接口。", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "接口只能扩展使用静态已知成员的对象类型或对象类型的交集。", "An_interface_property_cannot_have_an_initializer_1246": "接口函数不能具有初始化表达式。", "An_iterator_must_have_a_next_method_2489": "迭代器必须具有 \"next()\" 方法。", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "对象文字不能具有多个具有相同名称的 get/set 访问器。", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "严格模式下,对象文字不能包含多个具有相同名称的属性。", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "对象文字不能包含具有相同名称的属性和访问器。", "An_object_member_cannot_be_declared_optional_1162": "对象成员无法声明为可选。", + "An_optional_chain_cannot_contain_private_identifiers_18030": "可选链不能包含专用标识符。", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "此容器隐藏了 \"this\" 的外部值。", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "重载签名无法声明为生成器。", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "乘方表达式的左侧不允许存在具有“{0}”运算符的一元表达式。请考虑用括号将表达式括起。", "Annotate_everything_with_types_from_JSDoc_95043": "使用 JSDoc 中的类型批注所有内容", "Annotate_with_type_from_JSDoc_95009": "通过 JSDoc 类型批注", "Annotate_with_types_from_JSDoc_95010": "使用 JSDoc 中的类型批注", + "Another_export_default_is_here_2753": "这里是其他导出默认值。", + "Are_you_missing_a_semicolon_2734": "是否缺少分号?", "Argument_expression_expected_1135": "应为参数表达式。", "Argument_for_0_option_must_be_Colon_1_6046": "“{0}”选项的参数必须为 {1}。", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "类型“{0}”的参数不能赋给类型“{1}”的参数。", "Array_element_destructuring_pattern_expected_1181": "应为数组元素析构模式。", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "断言要求使用显式类型注释声明调用目标中的每个名称。", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "断言要求调用目标为标识符或限定名。", "Asterisk_Slash_expected_1010": "应为 \"*/\"。", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "全局范围的扩大仅可直接嵌套在外部模块中或环境模块声明中。", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "全局范围的扩大应具有 \"declare\" 修饰符,除非它们显示在已有的环境上下文中。", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "项目“{0}”中启用了键入内容的自动发现。使用缓存位置“{2}”运行模块“{1}”的额外解决传递。", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "基类表达式无法引用类类型参数。", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "基构造函数返回类型“{0}”不是类或接口类型。", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "基构造函数返回类型 \"{0}\" 不是具有静态已知成员的对象类型或对象类型的交集。", "Base_constructors_must_all_have_the_same_return_type_2510": "所有的基构造函数必须具有相同的返回类型。", "Base_directory_to_resolve_non_absolute_module_names_6083": "用于解析非绝对模块名的基目录。", "Basic_Options_6172": "基本选项", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "目标低于 ES2020 时,bigInt 文本不可用。", "Binary_digit_expected_1177": "需要二进制数字。", "Binding_element_0_implicitly_has_an_1_type_7031": "绑定元素“{0}”隐式具有“{1}”类型。", "Block_scoped_variable_0_used_before_its_declaration_2448": "声明之前已使用的块范围变量“{0}”。", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "生成所有项目,包括那些似乎已是最新的项目", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "生成一个或多个项目及其依赖项(如果已过期)", + "Build_option_0_requires_a_value_of_type_1_5073": "生成选项 \"{0}\" 需要类型 {1} 的值。", "Building_project_0_6358": "正在生成项目“{0}”...", "Call_decorator_expression_90028": "调用修饰器表达式", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "调用签名返回类型 \"{0}\" 和 \"{1}\" 不兼容。", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "缺少返回类型批注的调用签名隐式具有返回类型 \"any\"。", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "没有参数的调用签名具有不兼容的返回类型 \"{0}\" 和 \"{1}\"。", "Call_target_does_not_contain_any_signatures_2346": "调用目标不包含任何签名。", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "无法访问“{0}.{1}”,因为“{0}”是类型,不是命名空间。是否要使用“{0}[\"{1}\"]”检索“{0}”中“{1}”属性的类型?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "提供 \"--isolatedModules\" 标志时,无法访问环境常量枚举。", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "不可将“{0}”构造函数类型分配给“{1}”构造函数类型。", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "无法将抽象构造函数类型分配给非抽象构造函数类型。", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "无法分配到“{0}”,因为它是常数或只读属性。", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "无法分配到 \"{0}\" ,因为它是常数。", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "无法分配到 \"{0}\" ,因为它是只读属性。", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "无法分配到“{0}”,因为它不是变量。", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "无法扩大模块“{0}”,因为它解析为非模块实体。", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "无法扩充具有值导出的模块“{0}”,因为它解析为一个非模块的实体。", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "无法使用选项“{0}”来编译模块,除非 \"--module\" 标记为 \"amd\" 或 \"system\"。", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "提供 \"--isolatedModules\" 标志时无法编译命名空间。", "Cannot_create_an_instance_of_an_abstract_class_2511": "无法创建抽象类的实例。", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "无法将迭代委托到值,因为其迭代器的 \"next\" 方法需要类型 \"{1}\",但包含它的生成器将始终发送 \"{0}\"。", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "无法导出“{0}”。仅可从模块中导出本地声明。", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "无法扩展类“{0}”。类构造函数标记为私有。", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "无法扩展接口‘{0}’。您的意思是‘实施’吗?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "无法在当前目录找到 tsconfig.json 文件: {0}。", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "无法在指定目录找到 tsconfig.json 文件:“{0}”。", "Cannot_find_global_type_0_2318": "找不到全局类型“{0}”。", "Cannot_find_global_value_0_2468": "找不到全局值“{0}”。", "Cannot_find_lib_definition_for_0_2726": "找不到“{0}”的 LIB 定义。", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "找不到“{0}”的 LIB 定义。你是指“{1}”?", "Cannot_find_module_0_2307": "找不到模块“{0}”。", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "找不到模块 \"{0}\"。请考虑使用 \"--resolveJsonModule\" 导入带 \".json\" 扩展的模块", "Cannot_find_name_0_2304": "找不到名称“{0}”。", "Cannot_find_name_0_Did_you_mean_1_2552": "找不到名称“{0}”。你是否指的是“{1}”?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "找不到名称“{0}”。你的意思是实例成员“this.{0}”?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "找不到名称“{0}”。你的意思是静态成员“{1}.{0}”?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "找不到名称 \"{0}\"。是否需要更改目标库? 请尝试将 `lib` 编译器选项更改为 es2015 或更高版本。", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "找不到名称 \"{0}\"。是否需要更改目标库? 请尝试将 `lib` 编译器选项更改为包含 \"dom\"。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "找不到名称 \"{0}\"。是否需要安装测试运行程序的类型定义? 请尝试使用 `npm i @types/jest` 或 `npm i @types/mocha`。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "找不到名称 \"{0}\"。是否需要安装测试运行程序的类型定义? 请尝试使用 `npm i @types/jest` 或 `npm i @types/mocha`,然后在 tsconfig 的 types 字段中添加 `jest` 或 `mocha`。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "找不到名称 \"{0}\"。是否需要安装 jQuery 的类型定义? 请尝试 `npm i @types/jquery`。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "找不到名称 \"{0}\"。是否需要安装 jQuery 的类型定义? 请尝试使用 `npm i @types/jquery`,然后在 tsconfig 中将 `jquery` 添加到 types 字段。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "找不到名称 \"{0}\"。是否需要为节点安装类型定义? 请尝试使用 `npm i @types/node`。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "找不到名称 \"{0}\"。是否需要为节点安装类型定义? 请尝试使用 `npm i @types/node`,然后在 tsconfig 中将 \"node\" 添加到 types 字段。", "Cannot_find_namespace_0_2503": "找不到命名空间“{0}”。", "Cannot_find_parameter_0_1225": "找不到参数“{0}”。", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "找不到输入文件的公共子目录路径。", "Cannot_find_type_definition_file_for_0_2688": "找不到“{0}”的类型定义文件。", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "无法导入类型声明文件。请考虑导入“{0}”,而不是“{1}”。", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "无法在块范围声明“{1}”所在的范围内初始化外部范围变量“{0}”。", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "无法调用类型缺少调用签名的表达式。类型“{0}”没有兼容的调用签名。", "Cannot_invoke_an_object_which_is_possibly_null_2721": "不能调用可能是 \"null\" 的对象。", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "不能调用可能是 \"null\" 或“未定义”的对象。", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "不能调用可能是“未定义”的对象。", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "无法迭代值,因为其迭代器的 \"next\" 方法需要类型 \"{1}\",但数组析构将始终发送 \"{0}\"。", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "无法迭代值,因为其迭代器的 \"next\" 方法需要类型 \"{1}\",但数组扩张将始终发送 \"{0}\"。", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "无法迭代值,因为其迭代器的 \"next\" 方法需要类型 \"{1}\",但 for-of 将始终发送 \"{0}\"。", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "无法为项目“{0}”添加前缀,因为它未设置 \"outFile\"", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "提供 \"--isolatedModules\" 标记时无法重新导出类型。", "Cannot_read_file_0_Colon_1_5012": "无法读取文件“{0}”: {1}。", "Cannot_redeclare_block_scoped_variable_0_2451": "无法重新声明块范围变量“{0}”。", "Cannot_redeclare_exported_variable_0_2323": "无法重新声明导出的变量“{0}”。", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "无法在 catch 子句中重新声明标识符“{0}”。", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "无法更新项目 \"{0}\" 的输出,因为读取文件 \"{1}\" 时出错", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "无法使用 JSX,除非提供了 \"--jsx\" 标志。", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "当 \"--module\" 为 \"none\" 时无法使用导入、导出或模块扩大。", "Cannot_use_namespace_0_as_a_type_2709": "不能将命名空间“{0}”用作类型。", "Cannot_use_namespace_0_as_a_value_2708": "不能将命名空间“{0}”用作值。", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "其类型缺少调用或构造签名的表达式无法使用 \"new\"。", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "无法写入文件 \"{0}\",因为它将覆盖由引用的项目 \"{1}\" 生成的 \".tsbuildinfo\" 文件", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "无法写入文件“{0}”,因为它会被多个输入文件覆盖。", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "无法写入文件“{0}”,因为它会覆盖输入文件。", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "Catch 子句变量不能有类型批注。", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "检查“{0}”是否是“{1}”-“{2}”的最长匹配前缀。", "Circular_definition_of_import_alias_0_2303": "导入别名“{0}”的循环定义。", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "解析配置时检测到循环: {0}", + "Circularity_originates_in_type_at_this_location_2751": "循环源自此位置的类型。", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "类“{0}”将“{1}”定义为实例成员访问器,但扩展类“{2}”将其定义为实例成员函数。", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "类“{0}”将“{1}”定义为实例成员函数,但扩展类“{2}”将其定义为实例成员访问器。", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "类“{0}”将“{1}”定义为实例成员函数,但扩展类“{2}”将其定义为实例成员属性。", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "类“{0}”将“{1}”定义为实例成员属性,但扩展类“{2}”将其定义为实例成员函数。", "Class_0_incorrectly_extends_base_class_1_2415": "类“{0}”错误扩展基类“{1}”。", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "类“{0}”错误实现类“{1}”。你是想扩展“{1}”并将其成员作为子类继承吗?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "类静态侧“{0}”错误扩展基类静态侧“{1}”。", "Classes_can_only_extend_a_single_class_1174": "类只能扩展一个类。", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "包含抽象方法的类必须标记为抽象。", + "Classes_may_not_have_a_field_named_constructor_18006": "类不能具有名为 \"constructor\" 的字段。", "Command_line_Options_6171": "命令行选项", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "编译给定了其配置文件路径或带 \"tsconfig.json\" 的文件夹路径的项目。", "Compiler_option_0_expects_an_argument_6044": "编译器选项“{0}”需要参数。", "Compiler_option_0_requires_a_value_of_type_1_5024": "编译器选项“{0}”需要类型 {1} 的值。", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "当发出专用标识符下层时,编译器预留名称 \"{0}\"。", "Composite_projects_may_not_disable_declaration_emit_6304": "复合项目可能不会禁用声明发出。", + "Composite_projects_may_not_disable_incremental_compilation_6379": "复合项目不能禁用增量编译。", "Computed_property_names_are_not_allowed_in_enums_1164": "枚举中不允许计算属性名。", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "含字符串值成员的枚举中不允许使用计算值。", "Concatenate_and_emit_output_to_single_file_6001": "连接输出并将其发出到单个文件。", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "“{1}”和“{2}”处找到的“{0}”的定义具有冲突。考虑安装此库的特定版本以解决冲突。", + "Conflicts_are_in_this_file_6201": "此文件中存在冲突。", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "构造签名返回类型 \"{0}\" 和 \"{1}\" 不兼容。", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "缺少返回类型批注的构造签名隐式具有返回类型 \"any\"。", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "不带参数的构造签名具有不兼容的返回类型 \"{0}\" 和 \"{1}\"。", "Constructor_implementation_is_missing_2390": "缺少构造函数实现。", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "类“{0}”的构造函数是私有的,仅可在类声明中访问。", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "类“{0}”的构造函数是受保护的,仅可在类声明中访问。", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "派生类的构造函数必须包含 \"super\" 调用。", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "未指定包含文件,并且无法确定根目录,正在跳过在 \"node_modules\" 文件夹中查找。", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "类型 \"{0}\" 到类型 \"{1}\" 的转换可能是错误的,因为两种类型不能充分重叠。如果这是有意的,请先将表达式转换为 \"unknown\"。", "Convert_0_to_mapped_object_type_95055": "将“{0}”转换为映射对象类型", "Convert_all_constructor_functions_to_classes_95045": "将所有构造函数都转换为类", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "将不用作值的所有导入转换为仅类型导入", + "Convert_all_re_exported_types_to_type_only_exports_1365": "将所有重新导出的类型转换为仅类型导出", "Convert_all_require_to_import_95048": "将所有 \"require\" 转换为 \"import\"", + "Convert_all_to_async_functions_95066": "全部转换为异步函数", + "Convert_all_to_bigint_numeric_literals_95092": "全部转换为 bigint 数字文本", "Convert_all_to_default_imports_95035": "全部转换为默认导入", + "Convert_const_to_let_95093": "将 \"const\" 转换为 \"let\"", + "Convert_default_export_to_named_export_95061": "将默认导出转换为命名导出", "Convert_function_0_to_class_95002": "将函数“{0}”转换为类", "Convert_function_to_an_ES2015_class_95001": "将函数转换为 ES2015 类", + "Convert_invalid_character_to_its_html_entity_code_95100": "将无效字符转换为其 HTML 实体代码", + "Convert_named_export_to_default_export_95062": "将命名导出转换为默认导出", "Convert_named_imports_to_namespace_import_95057": "将命名导入转换为命名空间导入", "Convert_namespace_import_to_named_imports_95056": "将命名空间导入转换为命名导入", + "Convert_parameters_to_destructured_object_95075": "将参数转换为析构对象", "Convert_require_to_import_95047": "将 \"require\" 转换为 \"import\"", "Convert_to_ES6_module_95017": "转换为 ES6 模块", + "Convert_to_a_bigint_numeric_literal_95091": "转换为 bigint 数字文本", + "Convert_to_async_function_95065": "转换为异步函数", "Convert_to_default_import_95013": "转换为默认导入", + "Convert_to_template_string_95096": "转换为模板字符串", + "Convert_to_type_only_export_1364": "转换为仅类型导出", + "Convert_to_type_only_import_1373": "转换为仅类型导入", "Corrupted_locale_file_0_6051": "区域设置文件 {0} 已损坏。", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "无法找到模块“{0}”的声明文件。“{1}”隐式拥有 \"any\" 类型。", "Could_not_write_file_0_Colon_1_5033": "无法写入文件“{0}”: {1}。", "DIRECTORY_6038": "目录", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "此文件的声明发出要求使用专用名称 \"{0}\"。显式类型注释可能取消阻止声明发出。", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "此文件的声明发出要求使用模块 \"{1}\" 中的专用名称 \"{0}\"。显式类型注释可能取消阻止声明发出。", "Declaration_expected_1146": "应为声明。", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "声明名称与内置全局标识符“{0}”冲突。", "Declaration_or_statement_expected_1128": "应为声明或语句。", + "Declare_a_private_field_named_0_90053": "声明名为 \"{0}\" 的专用字段。", "Declare_method_0_90023": "声明方法“{0}”", "Declare_property_0_90016": "声明属性“{0}”", "Declare_static_method_0_90024": "声明静态方法“{0}”", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "修饰器在此处无效。", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "不能向多个同名的 get/set 访问器应用修饰器。", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "模块的默认导出具有或正在使用专用名称“{0}”。", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "明确赋值断言只能与类型注释一起使用。", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "以下标识符的定义与另一个文件中的定义冲突: {0}", "Delete_all_unused_declarations_95024": "删除未使用的所有声明", "Delete_the_outputs_of_all_projects_6365": "删除所有项目的输出", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[已弃用] 请改用 \"--jsxFactory\"。已 \"react\" JSX 发出设为目标时,请指定要为 createElement 调用的对象", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[已弃用] 请改用 \"--outFile\"。连接并发出到单个文件的输出", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[已弃用] 请改用 \"--skipLibCheck\"。请跳过默认库声明文件的类型检查。", + "Did_you_forget_to_use_await_2773": "是否忘记使用 \"await\"?", + "Did_you_mean_0_1369": "你是想使用 \"{0}\" 吗?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "你是想将 \"{0}\" 限制为类型 \"new (...args: any[]) => {1}\" 吗?", + "Did_you_mean_to_call_this_expression_6212": "你是想调用此表达式吗?", + "Did_you_mean_to_mark_this_function_as_async_1356": "你是想将此函数标记为 \"async\" 吗?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "你是想将此函数类型放在括号中吗?", + "Did_you_mean_to_use_new_with_this_expression_6213": "你是想将 \"new\" 用于此表达式吗?", "Digit_expected_1124": "应为数字。", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "目录“{0}”不存在,正在跳过该目录中的所有查找。", "Disable_checking_for_this_file_90018": "禁用检查此文件", "Disable_size_limitations_on_JavaScript_projects_6162": "禁用对 JavaScript 项目的大小限制。", + "Disable_solution_searching_for_this_project_6224": "对此项目禁用解决方案搜索。", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "禁止严格检查函数类型中的通用签名。", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "禁止使用源文件而不是引用项目中的声明文件。", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "不允许对同一文件采用大小不一致的引用。", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "请勿将三斜杠引用或导入的模块添加到已编译文件列表中。", "Do_not_emit_comments_to_output_6009": "请勿将注释发出到输出。", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "不报告有关未使用的标签的错误。", "Do_not_resolve_the_real_path_of_symlinks_6013": "不要解析 symlink 的真实路径。", "Do_not_truncate_error_messages_6165": "请勿删除错误消息。", - "Duplicate_declaration_0_2718": "重复声明“{0}”。", "Duplicate_function_implementation_2393": "函数实现重复。", "Duplicate_identifier_0_2300": "标识符“{0}”重复。", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "标识符“{0}”重复。编译器在模块的顶层范围中保留名称“{1}”。", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "标识符 \"_this\" 重复。编译器使用变量声明 \"_this\" 来捕获 \"this\" 引用。", "Duplicate_label_0_1114": "标签“{0}”重复。", "Duplicate_number_index_signature_2375": "数字索引签名重复。", + "Duplicate_property_0_2718": "重复的属性 \"{0}\"。", "Duplicate_string_index_signature_2374": "字符串索引签名重复。", "Dynamic_import_cannot_have_type_arguments_1326": "动态导入不能含有类型参数", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "仅当 \"--module\" 标志为 \"commonjs\" 或 \"esNext\" 时,才支持动态导入。", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "动态导入必须具有一个说明符作为参数。", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "动态导入的说明符类型必须是 \"string\",但此处类型是 \"{0}\"。", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "仅当 \"--module\" 标志设置为 \"es2020\"、\"esnext\"、\"commonjs\"、\"amd\"、\"system\" 或 \"umd\" 时,才支持动态导入。", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "联合类型 \"{0}\" 的每个成员都有构造签名,但这些签名都不能互相兼容。", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "联合类型 \"{0}\" 的每个成员都有签名,但这些签名都不能互相兼容。", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "元素隐式具有 \"any\" 类型,因为类型为 \"{0}\" 的表达式不能用于索引类型 \"{1}\"。", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "元素隐式具有 \"any\" 类型,因为索引表达式的类型不为 \"number\"。", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "元素隐式具有 \"any\" 类型,因为类型“{0}”没有索引签名。", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "元素隐式具有 \"any\" 类型,因为类型 \"{0}\" 没有索引签名。你是想调用 \"{1}\" 吗?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "在输出文件的开头发出一个 UTF-8 字节顺序标记(BOM)。", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "发出包含源映射而非包含单独文件的单个文件。", + "Emit_class_fields_with_Define_instead_of_Set_6222": "使用 Define 而不是 Set 发出类字段。", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "在单个文件内发出源以及源映射;需要设置 \"--inlineSourceMap\" 或 \"--sourceMap\"。", "Enable_all_strict_type_checking_options_6180": "启用所有严格类型检查选项。", + "Enable_incremental_compilation_6378": "启用增量编译", "Enable_project_compilation_6302": "启用项目编译", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "对函数启用严格的 \"bind\"、\"call\" 和 \"apply\" 方法。", "Enable_strict_checking_of_function_types_6186": "对函数类型启用严格检查。", "Enable_strict_checking_of_property_initialization_in_classes_6187": "启用类中属性初始化的严格检查。", "Enable_strict_null_checks_6113": "启用严格的 NULL 检查。", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "在配置文件中启用 \"experimentalDecorators\" 选项", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "在配置文件中启用 \"--jsx\" 标志", "Enable_tracing_of_the_name_resolution_process_6085": "启用名称解析过程的跟踪。", "Enable_verbose_logging_6366": "启用详细日志记录", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "通过为所有导入创建命名空间对象来启用 CommonJS 和 ES 模块之间的发出互操作性。表示 \"allowSyntheticDefaultImports\"。", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "应为枚举成员。", "Enum_member_must_have_initializer_1061": "枚举成员必须具有初始化表达式。", "Enum_name_cannot_be_0_2431": "枚举名不能为“{0}”。", + "Enum_type_0_circularly_references_itself_2586": "枚举类型 \"{0}\" 循环引用自身。", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "枚举类型“{0}”包含具有不是文本的初始值设定项的成员。", "Examples_Colon_0_6026": "示例: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "与类型“{0}”和“{1}”相比,堆栈深度过高。", @@ -385,9 +490,9 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "应有至少 {0} 个参数,但获得的数量大于等于 {1}。", "Expected_corresponding_JSX_closing_tag_for_0_17002": "“{0}”预期的相应 JSX 结束标记。", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "预期的 JSX 片段的相应结束标记。", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "\"package.json\" 中“{0}”字段的类型应为 \"string\",但实际为“{1}”。", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "\"package.json\" 中 \"{0}\" 字段的类型应为 \"{1}\",但实际为 \"{2}\" 。", "Experimental_Options_6177": "实验性选项", - "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "对修饰器的实验支持是一项将在将来版本中更改的功能。设置 \"experimentalDecorators\" 选项以删除此警告。", + "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "对修饰器的实验支持功能在将来的版本中可能更改。在 \"tsconfig\" 或 \"jsconfig\" 中设置 \"experimentalDecorators\" 选项以删除此警告。", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "显示指定了模块解析类型:“{0}”。", "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "面向 ECMAScript 模块时,不能使用导出分配。请考虑改用 \"export default\" 或另一种模块格式。", "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "当 \"--module\" 标志是 \"system\" 时不支持导出分配。", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "模块扩大中不允许导出和导出分配。", "Expression_expected_1109": "应为表达式。", "Expression_or_comma_expected_1137": "应为表达式或逗号。", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "表达式生成的联合类型过于复杂,无法表示。", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "表达式解析为 \"_super\",编译器使用 \"_super\" 获取基类引用。", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "表达式解析为编译器用于支持异步函数的变量声明“{0}”。", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "表达式解析为编辑器用于捕获 \"new.target\" 元属性引用的变量声明 \"_newTarget\"。", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "提取到 {1} 中的 {0}", "Extract_to_0_in_1_scope_95008": "提取到 {1} 范围中的 {0}", "Extract_to_0_in_enclosing_scope_95007": "提取到封闭范围中的 {0}", + "Extract_to_interface_95090": "提取到接口", + "Extract_to_type_alias_95078": "提取到类型别名", + "Extract_to_typedef_95079": "提取到类型引用", + "Extract_type_95077": "提取类型", "FILE_6035": "文件", "FILE_OR_DIRECTORY_6040": "文件或目录", "Failed_to_parse_file_0_Colon_1_5014": "未能分析文件“{0}”: {1}。", "Fallthrough_case_in_switch_7029": "switch 语句中的 Fallthrough 情况。", "File_0_does_not_exist_6096": "文件“{0}”不存在。", "File_0_exist_use_it_as_a_name_resolution_result_6097": "文件“{0}”存在 - 将其用作名称解析结果。", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "文件 \"{0}\" 具有不受支持的扩展名。支持的扩展名只有 {1}。", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "文件“{0}”的扩展名不受支持,正在跳过。", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "不支持文件“{0}”的扩展名。唯一支持的扩展名为 {1}。", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "文件 \"{0}\" 是 JavaScript 文件。你是想启用 \"allowJs\" 选项吗?", "File_0_is_not_a_module_2306": "文件“{0}”不是模块。", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "文件“{0}”不在项目文件列表中。项目必须列出的所有文件,或使用“包含”模式。", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "文件 \"{0}\" 不在项目 \"{1}\" 的文件列表中。项目必须列出所有文件,或使用 \"include\" 模式。", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "文件“{0}”不在 \"rootDir\"“{1}”下。\"rootDir\" 应包含所有源文件。", "File_0_not_found_6053": "找不到文件“{0}”。", "File_change_detected_Starting_incremental_compilation_6032": "检测到文件更改。正在启动增量编译...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "文件规范不能包含出现在递归目录通配符(\"*\"): “{0}”后的父目录(\"..\")。", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "文件规范不能以递归目录通配符结尾(\"**\"):“{0}”。", "Fix_all_detected_spelling_errors_95026": "修复检测到的所有拼写错误", + "Fix_all_expressions_possibly_missing_await_95085": "修复可能缺少 \"await\" 的所有表达式", + "Found_0_errors_6217": "找到 {0} 个错误。", "Found_0_errors_Watching_for_file_changes_6194": "找到 {0} 个错误。注意文件更改。", + "Found_1_error_6216": "找到 1 个错误。", "Found_1_error_Watching_for_file_changes_6193": "找到 1 个错误。注意文件更改。", "Found_package_json_at_0_6099": "在“{0}”处找到了 \"package.json\"。", - "Found_package_json_at_0_Package_ID_is_1_6190": "在“{0}”找到了 \"package.json\"。包 ID 为“{1}”。", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "面向 \"ES3\" 或 \"ES5\" 时,在严格模式下,块内不允许函数声明。", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "面向 \"ES3\" 或 \"ES5\" 时,在严格模式下,块内不允许函数声明。类定义自动处于严格模式。", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "面向 \"ES3\" 或 \"ES5\" 时,在严格模式下,块内不允许函数声明。模块自动处于严格模式。", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "函数缺少结束 return 语句,返回类型不包括 \"undefined\"。", "Function_overload_must_be_static_2387": "函数重载必须为静态。", "Function_overload_must_not_be_static_2388": "函数重载不能为静态。", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "缺少返回类型注释的函数类型隐式具有 \"{0}\" 返回类型。", "Generate_get_and_set_accessors_95046": "生成 \"get\" 和 \"set\" 访问器", + "Generates_a_CPU_profile_6223": "生成 CPU 配置文件。", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "为每个相应的 \".d.ts\" 文件生成源映射。", "Generates_corresponding_d_ts_file_6002": "生成相应的 \".d.ts\" 文件。", "Generates_corresponding_map_file_6043": "生成相应的 \".map\" 文件。", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "生成器隐式具有类型“{0}”,因为它不生成任何值。请考虑提供一个返回类型。", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "生成器隐式具有产出类型 \"{0}\" ,因为它不生成任何值。请考虑提供一个返回类型注释。", "Generators_are_not_allowed_in_an_ambient_context_1221": "不允许在环境上下文中使用生成器。", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "仅当面向 ECMAScript 2015 或更高版本时,生成器才可用。", "Generic_type_0_requires_1_type_argument_s_2314": "泛型类型“{0}”需要 {1} 个类型参数。", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "泛型类型“{0}”需要介于 {1} 和 {2} 类型参数之间。", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "泛型类型实例化过深,且可能无限。", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Getter 和 Setter 访问器在可见性上不一致。", "Global_module_exports_may_only_appear_at_top_level_1316": "全局模块导出仅可出现在顶层级别中。", "Global_module_exports_may_only_appear_in_declaration_files_1315": "全局模块导出仅可出现声明文件中。", "Global_module_exports_may_only_appear_in_module_files_1314": "全局模块导出仅可出现模块文件中。", "Global_type_0_must_be_a_class_or_interface_type_2316": "全局类型“{0}”必须为类或接口类型。", "Global_type_0_must_have_1_type_parameter_s_2317": "全局类型“{0}”必须具有 {1} 个类型参数。", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "在 \"--incremental\" 和 \"--watch\" 中有重新编译,假定文件中的更改只会影响直接依赖它的文件。", "Hexadecimal_digit_expected_1125": "应为十六进制数字。", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "应为标识符。“{0}”在严格模式下是保留字。", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "应为标识符。“{0}”在严格模式下是保留字。类定义自动处于严格模式。", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "应为标识符。“{0}”是严格模式下的保留字。模块自动处于严格模式。", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "应为标识符。\"{0}\" 是保留字,不能在此处使用。", "Identifier_expected_1003": "应为标识符。", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "应为标识符。转换 ECMAScript 模块时,\"__esModule\" 保留为导出标记。", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "如果 \"{0}\" 包实际上公开此模块,请考虑发送拉取请求来修正 \"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}\"", "Ignore_this_error_message_90019": "忽略此错误信息", "Implement_all_inherited_abstract_classes_95040": "实现继承的所有抽象类", "Implement_all_unimplemented_interfaces_95032": "实现未实现的所有接口", "Implement_inherited_abstract_class_90007": "实现已继承的抽象类", "Implement_interface_0_90006": "实现接口“{0}”", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "导出的类“{0}”的 Implements 子句具有或正在使用专用名称“{1}”。", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "\"symbol\" 到 \"string\" 的隐式转换将在运行时失败。请考虑在 \"String(...)\" 中包装此表达式。", "Import_0_from_module_1_90013": "从模块“{1}”导入“{0}”", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "面向 ECMAScript 模块时,不能使用导入分配。请考虑改用 \"import * as ns from \"mod\"\"、\"import {a} from \"mod\"\"、\"import d from \"mod\"\" 或另一种模块格式。", "Import_declaration_0_is_using_private_name_1_4000": "导入声明“{0}”使用的是专用名称“{1}”。", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "导入声明与“{0}”的局部声明冲突。", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "命名空间中的导入声明不能引用模块。", + "Import_default_0_from_module_1_90032": "从模块 \"{1}\" 导入默认的 \"{0}\"", "Import_emit_helpers_from_tslib_6139": "从 \"tslib\" 导入发出帮助程序。", "Import_may_be_converted_to_a_default_import_80003": "导入可能会转换为默认导入。", "Import_name_cannot_be_0_2438": "导入名称不能为“{0}”。", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "模块扩大中不允许导入。请考虑将它们移动到封闭的外部模块。", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "在环境枚举声明中,成员初始化表达式必须是常数表达式。", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "在包含多个声明的枚举中,只有一个声明可以省略其第一个枚举元素的初始化表达式。", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "在 \"const\" 枚举声明中,成员初始化表达式必须是常数表达式。", "Include_modules_imported_with_json_extension_6197": "包括通过 \".json\" 扩展导入的模块", "Index_signature_in_type_0_only_permits_reading_2542": "类型“{0}”中的索引签名仅允许读取。", "Index_signature_is_missing_in_type_0_2329": "类型“{0}”中缺少索引签名。", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "合并声明“{0}”中的单独声明必须全为导出或全为局部声明。", "Infer_all_types_from_usage_95023": "从使用情况推导所有类型", "Infer_parameter_types_from_usage_95012": "根据使用情况推断参数类型", + "Infer_this_type_of_0_from_usage_95080": "从用法中推断出 \"{0}\" 的 \"this\" 类型", "Infer_type_of_0_from_usage_95011": "根据使用情况推断“{0}”的类型", "Initialize_property_0_in_the_constructor_90020": "初始化构造函数中的属性“{0}”", "Initialize_static_property_0_90021": "初始化静态属性“{0}”", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "JSDoc \"...\" 可能仅出现在签名的最后一个参数中。", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "JSDoc \"@param\" 标记具有名称 \"{0}\",但不存在具有该名称的参数。", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "JSDoc \"@param\" 标记的名称为“{0}”,但该名称没有参数。如果它为数组类型,将匹配 \"arguments\"。", + "JSDoc_type_0_circularly_references_itself_2587": "JSDoc 类型 \"{0}\" 循环引用自身。", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "JSDoc \"@typedef\" 标记应具有类型注释,或其后跟有 \"@property\" 或 \"@member\" 标记。", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "JSDoc 类型只能在文档注释内部使用。", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "JSDoc 类型可能会移到 TypeScript 类型。", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "JSX 元素类型“{0}”不具有任何构造签名或调用签名。", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "JSX 元素类型“{0}”不是 JSX 元素的构造函数。", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "JSX 元素不能具有多个名称相同的特性。", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "JSX 表达式不能使用逗号运算符。你是想写入数组吗?", "JSX_expressions_must_have_one_parent_element_2657": "JSX 表达式必须具有一个父元素。", "JSX_fragment_has_no_corresponding_closing_tag_17014": "JSX 片段没有相应的结束标记。", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "使用内联 JSX 工厂 pragma 时,不支持 JSX 片段", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "JSX 扩展子属性必须为数组类型。", "Jump_target_cannot_cross_function_boundary_1107": "跳转目标不能跨越函数边界。", "KIND_6034": "种类", + "Keywords_cannot_contain_escape_characters_1260": "关键字不能包含转义字符。", "LOCATION_6037": "位置", "Language_service_is_disabled_9004": "语言服务已禁用。", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "逗号运算符的左侧未使用,没有任何副作用。", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "在构造函数中,使 \"super()\" 调用第一个语句", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "映射的对象类型隐式地含有 \"any\" 模板类型。", "Member_0_implicitly_has_an_1_type_7008": "成员“{0}”隐式包含类型“{1}”。", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "成员 \"{0}\" 隐式具有 \"{1}\" 类型,但可以从用法中推断出更好的类型。", "Merge_conflict_marker_encountered_1185": "遇到合并冲突标记。", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "合并声明“{0}”不能包含默认导出声明。请考虑改为添加一个独立的“导出默认 {0}”声明。", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "元属性“{0}”只能在函数声明、函数表达式或构造函数的主体中使用。", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "导出接口的方法“{0}”具有或正在使用私有模块“{2}”中的名称“{1}”。", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "导出接口的方法“{0}”具有或正在使用专用名称“{1}”。", "Modifiers_cannot_appear_here_1184": "修饰符不能出现在此处。", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "模块“{0}”不引用类型,但在此处用作类型。", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "模块 \"{0}\" 只能使用 \"{1}\" 标志进行默认导入", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "模块 \"{0}\" 在本地声明 \"{1}\",但它被导出为 \"{2}\"。", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "模块 \"{0}\" 在本地声明 \"{1}\",但未导出它。", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "模块 \"{0}\" 不引用类型,但在此处用作类型。你是想使用 \"typeof import('{0}')\" 吗?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "模块“{0}”不引用值,但在此处用作值。", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "模块 {0} 已导出一个名为“{1}”的成员。请考虑重新显式导出以解决歧义。", "Module_0_has_no_default_export_1192": "模块“{0}”没有默认导出。", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "模块 \"{0}\" 没有默认导出。你是想改为使用 \"import { {1} } from {0}\" 吗?", "Module_0_has_no_exported_member_1_2305": "模块“{0}”没有导出的成员“{1}”。", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "模块“{0}”没有导出的成员“{1}”。你是否指的是“{2}”?", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "模块 \"{0}\" 没有导出的成员 \"{1}\"。你是想改用 \"import {1} from {0}\" 吗?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "模块“{0}”被具有相同名称的局部声明隐藏。", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "模块“{0}”解析为非模块实体,且不能使用此构造导入。", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "模块“{0}”使用 \"export =\" 且无法与 \"export *\" 一起使用。", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "模块“{0}”解析为“{1}”中声明的环境模块,因为未修改此文件。", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "模块“{0}”解析为文件“{1}”中本地声明的环境模块。", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "模块“{0}”已解析为“{1}”,但尚未设置 \"--jsx\"。", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "模块 \"{0}\" 已解析为 \"{1}\",但未使用 \"--resolveJsonModule\"。", "Module_Resolution_Options_6174": "模块分辨率选项", "Module_name_0_matched_pattern_1_6092": "模块名“{0}”,匹配的模式“{1}”。", "Module_name_0_was_not_resolved_6090": "======== 未解析模块名“{0}”。========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== 模块名“{0}”已成功解析为“{1}”。========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== 模块名 \"{0}\" 已成功解析为 \"{1}\",包 ID 为 \"{2}\"。========", "Module_resolution_kind_is_not_specified_using_0_6088": "未指定模块解析类型,正在使用“{0}”。", "Module_resolution_using_rootDirs_has_failed_6111": "使用 \"rootDirs\" 的模块解析失败。", "Move_to_a_new_file_95049": "移动到新的文件", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "“{1}”和“{2}”类型的命名属性“{0}”不完全相同。", "Namespace_0_has_no_exported_member_1_2694": "命名空间“{0}”没有已导出的成员“{1}”。", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "没有任何基构造函数具有指定数量的类型参数。", + "No_constituent_of_type_0_is_callable_2755": "不可调用 \"{0}\" 类型的任何组成部分。", + "No_constituent_of_type_0_is_constructable_2759": "不可构造 \"{0}\" 类型的任何组成部分。", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "在类型 \"{1}\" 上找不到具有类型为 \"{0}\" 的参数的索引签名。", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "在配置文件“{0}”中找不到任何输入。指定的 \"include\" 路径为“{1}”,\"exclude\" 路径为“{2}”。", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "没有需要 {0} 参数的重载,但存在需要 {1} 或 {2} 参数的重载。", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "没有需要 {0} 类型参数的重载,但存在需要 {1} 或 {2} 类型参数的重载。", + "No_overload_matches_this_call_2769": "没有与此调用匹配的重载。", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "速记属性 \"{0}\" 的范围内不存在任何值。请声明一个值或提供一个初始值设定项。", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "非抽象类“{0}”不会实现继承自“{2}”类的抽象成员“{1}”。", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "非抽象类表达式不会实现继承自“{1}”类的抽象成员“{0}”。", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "非 null 断言只能在 TypeScript 文件中使用。", + "Non_simple_parameter_declared_here_1348": "此处声明了非简单参数。", "Not_all_code_paths_return_a_value_7030": "并非所有代码路径都返回值。", + "Not_all_constituents_of_type_0_are_callable_2756": "\"{0}\" 类型的部分要素不可调用。", + "Not_all_constituents_of_type_0_are_constructable_2760": "\"{0}\" 类型的部分要素不可构造。", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "数字索引类型“{0}”不能赋给字符串索引类型“{1}”。", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "绝对值大于或等于 2^53 的数值文本过大,无法用整数准确表示。", "Numeric_separators_are_not_allowed_here_6188": "此处不允许使用数字分隔符。", "Object_is_of_type_unknown_2571": "对象的类型为 \"unknown\"。", "Object_is_possibly_null_2531": "对象可能为 \"null\"。", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "枚举成员初始值设定项中不允许有八进制文本。请使用语法“{0}”。", "Octal_literals_are_not_allowed_in_strict_mode_1121": "严格模式下不允许使用八进制文本。", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "当面向 ECMAScript 5 及更高版本时,不能使用八进制文本。请使用语法“{0}”。", + "Only_ECMAScript_imports_may_use_import_type_1370": "仅 ECMAScript 导入可使用 \"import type\"。", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "\"for...in\" 语句中只允许单个变量声明。", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "\"for...of\" 语句中只允许单个变量声明。", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "使用 \"new\" 关键字只能调用 void 函数。", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "仅发出 \".d.ts\" 声明文件。 ", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "类 \"extends\" 子句当前仅支持具有可选类型参数的标识符/限定名称。", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "通过 \"super\" 关键字只能访问基类的公共方法和受保护方法。", + "Operator_0_cannot_be_applied_to_type_1_2736": "运算符 \"{0}\" 不能应用于类型 \"{1}\"。", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "运算符“{0}”不能应用于类型“{1}”和“{2}”。", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "仅可在 \"tsconfig.json\" 文件中指定选项“{0}”。", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "仅当提供了选项 \"--inlineSourceMap\" 或选项 \"--sourceMap\" 时,才能使用选项“{0}”。", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "选项 \"target\" 为 \"ES3\" 时,不能指定选项 \"{0}\"。", "Option_0_cannot_be_specified_with_option_1_5053": "选项“{0}”不能与选项“{1}”同时指定。", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "无法在不指定选项“{1}”的情况下指定选项“{0}”。", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "无法在不指定选项 {1} 或选项 {2} 的情况下指定选项 {0}。", "Option_0_should_have_array_of_strings_as_a_value_6103": "选项“{0}”应将字符串数组作为一个值。", "Option_build_must_be_the_first_command_line_argument_6369": "选项 '--build' 必须是第一个命令行参数。", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "选项 \"--incremental\" 只能使用 tsconfig 指定,在发出到单个文件时指定,或在指定了选项 \"--tsBuildInfoFile\" 时指定。", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "选项 \"isolatedModules\" 只可在提供了选项 \"--module\" 或者选项 \"target\" 是 \"ES2015\" 或更高版本时使用。", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "在未指定 \"--baseUrl\" 选项的情况下,无法使用选项 \"paths\"。", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "选项 \"project\" 在命令行上不能与源文件混合使用。", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "仅当模块代码生成为 \"commonjs\"、\"amd\"、\"es2015\" 或 \"esNext\" 时,才能指定选项 \"--resolveJsonModule\"。", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "在没有 \"node\" 模块解析策略的情况下,无法指定选项 \"-resolveJsonModule\"。", "Options_0_and_1_cannot_be_combined_6370": "选项“{0}”与“{1}”不能组合在一起。", "Options_Colon_6027": "选项:", "Output_directory_for_generated_declaration_files_6166": "已生成声明文件的输出目录。", "Output_file_0_from_project_1_does_not_exist_6309": "来自项目“{1}”的输出文件“{0}”不存在", "Output_file_0_has_not_been_built_from_source_file_1_6305": "未从源文件“{1}”生成输出文件“{0}”。", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "重载签名与函数实现不兼容。", + "Overload_0_of_1_2_gave_the_following_error_2772": "{1} 个重载 中的第 {0} 个(\"{2}\")出现了以下错误。", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "重载签名必须都是抽象的或都是非抽象的。", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "重载签名必须全部为环境签名或非环境签名。", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "重载签名必须均导出或均不导出。", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "重载签名必须全部是公共签名、私有签名或受保护签名。", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "参数“{0}”的初始化表达式中不能引用该参数自身。", "Parameter_0_implicitly_has_an_1_type_7006": "参数“{0}”隐式具有“{1}”类型。", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "参数 \"{0}\" 隐式具有 \"{1}\" 类型,但可以从用法中推断出更好的类型。", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "参数“{0}”和参数“{1}”的位置不一样。", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "访问器的参数 \"{0}\" 具有或正在使用外部模块 \"{2}\" 中的名称 \"{1}\" ,但不能为其命名。", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "访问器的参数 \"{0}\" 具有或正在使用专用模块 \"{2}\" 中的名称 \"{1}\" 。", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "访问器的参数 \"{0}\" 具有或正在使用专用名称 \"{1}\"。", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "导出接口中的调用签名的参数“{0}”具有或正在使用私有模块“{2}”中的名称“{1}”。", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "导出接口中的调用签名的参数“{0}”具有或正在使用专用名称“{1}”。", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "导出类中的构造函数的参数“{0}”具有或正在使用外部模块“{2}”中的名称“{1}”,但不能为其命名。", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "导出类中的公共静态方法的参数“{0}”具有或正在使用专用名称“{1}”。", "Parameter_cannot_have_question_mark_and_initializer_1015": "参数不能包含问号和初始化表达式。", "Parameter_declaration_expected_1138": "应为参数声明。", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "参数具有名称,但不具有类型。你是想使用 \"{0}: {1}\" 吗?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "参数修饰符只能在 TypeScript 文件中使用。", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "导出类中的公共 setter“{0}”的参数类型具有或正在使用私有模块“{2}”中的名称“{1}”。", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "导出类中的公共 setter“{0}”的参数类型具有或正在使用专用名称“{1}”。", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "导出类中的公共静态 setter“{0}”的参数类型具有或正在使用私有模块“{2}”中的名称“{1}”。", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "以严格模式进行分析,并为每个源文件发出 \"use strict\" 指令。", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "模式“{0}”最多只可具有一个 \"*\" 字符。", "Prefix_0_with_an_underscore_90025": "带下划线的前缀“{0}”", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "使用 \"declare\" 作为所有错误的属性声明的前缀", "Prefix_all_unused_declarations_with_where_possible_95025": "尽可能在所有未使用的声明前添加前缀 \"_\"", + "Prefix_with_declare_95094": "使用 \"declare\" 前缀", "Print_names_of_files_part_of_the_compilation_6155": "属于编译一部分的文件的打印名称。", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "打印作为编译一部分的文件的名称,然后停止处理。", "Print_names_of_generated_files_part_of_the_compilation_6154": "属于编译一部分的已生成文件的打印名称。", "Print_the_compiler_s_version_6019": "打印编译器的版本。", + "Print_the_final_configuration_instead_of_building_1350": "打印最终配置而不是生成。", "Print_this_message_6017": "打印此消息。", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "不允许在变量声明中使用专用标识符。", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "不允许在类主体之外使用专用标识符。", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "专用标识符仅在面向 ECMAScript 2015 和更高版本时可用。", + "Private_identifiers_cannot_be_used_as_parameters_18009": "不能将专用标识符用作参数", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "不能在类型参数上访问专用或受保护的成员 \"{0}\"。", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "无法生成项目“{0}”,因为其依赖项“{1}”有错误", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "无法生成项目 \"{0}\" ,因为未生成其依赖项 \"{1}\"", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "项目“{0}”已过期,因为其依赖项“{1}”已过期", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "项目“{0}”已过期,因为最早的输出“{1}”早于最新的输入“{2}”", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "项目“{0}”已过期,因为输出文件“{1}”不存在", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "项目 \"{0}\" 已过期,因为其输出是使用与当前版本 \"{2}\" 不同的版本 \"{1}\" 生成的", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "项目 \"{0}\" 已过期,因为其依赖项 \"{1}\" 的输出已更改", "Project_0_is_up_to_date_6361": "“{0}”项目已是最新", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "项目“{0}”已是最新,因为最新的输入“{1}”早于最早的输出“{2}”", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "项目“{0}”已是最新,拥有来自其依赖项的 .d.ts 文件", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "要引用的项目", "Property_0_does_not_exist_on_const_enum_1_2479": "\"const\" 枚举“{1}”上不存在属性“{0}”。", "Property_0_does_not_exist_on_type_1_2339": "类型“{1}”上不存在属性“{0}”。", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "类型“{1}”上不存在属性“{0}”。是否忘记使用 \"await\"?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "属性“{0}”在类型“{1}”上不存在。你是否指的是“{2}”?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "属性“{0}”的声明发生冲突,并且在类型“{1}”中不可访问此属性。", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "属性“{0}”没有初始化表达式,且未在构造函数中明确赋值。", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "属性“{0}”隐式具有类型 \"any\",因为其 get 访问器缺少返回类型批注。", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "属性“{0}”隐式具有类型 \"any\",因为其 set 访问器缺少参数类型批注。", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "属性 \"{0}\" 隐式具有类型 \"any\",但可从用法为其 get 访问器推断出更好类型。", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "属性 \"{0}\" 隐式具有类型 \"any\",但可从用法为其 set 访问器推断出更好类型。", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "类型“{1}”中的属性“{0}”不可分配给基类型“{2}”中的同一属性。", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "类型“{1}”中的属性“{0}”不可分配给类型“{2}”。", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "类型 \"{1}\" 中的属性 \"{0}\" 引用了不能从类型 \"{2}\" 内访问的其他成员。", + "Property_0_is_a_static_member_of_type_1_2576": "属性 \"{0}\" 不是类型为 \"{1}\" 的静态成员", "Property_0_is_declared_but_its_value_is_never_read_6138": "已声明属性“{0}”,但从未读取其值。", "Property_0_is_incompatible_with_index_signature_2530": "属性“{0}”与索引签名不兼容。", + "Property_0_is_incompatible_with_rest_element_type_2573": "属性 \"{0}\" 与 rest 元素类型不兼容。", "Property_0_is_missing_in_type_1_2324": "类型“{1}”中缺少属性“{0}”。", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "类型 \"{1}\" 中缺少属性 \"{0}\",但类型 \"{2}\" 中需要该属性。", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "属性 \"{0}\" 在类 \"{1}\" 外部不可访问,因为它具有专用标识符。", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "属性“{0}”在类型“{1}”中为可选,但在类型“{2}”中为必选。", "Property_0_is_private_and_only_accessible_within_class_1_2341": "属性“{0}”为私有属性,只能在类“{1}”中访问。", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "属性“{0}”在类型“{1}”中是私有属性,但在类型“{2}”中不是。", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "属性“{0}”受保护,但类型“{1}”并不是从“{2}”派生的类。", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "属性“{0}”在类型“{1}”中受保护,但在类型“{2}”中为公共属性。", "Property_0_is_used_before_being_assigned_2565": "在赋值前使用了属性“{0}”。", + "Property_0_is_used_before_its_initialization_2729": "属性 \"{0}\" 在其初始化前已被使用。", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "JSX 展开特性的“{0}”属性不能分配给目标属性。", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "导出类表达式的属性“{0}”可能不是私密或受保护的属性。", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "导出接口的属性“{0}”具有或正在使用私有模块“{2}”中的名称“{1}”。", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "导出接口的属性“{0}”具有或正在使用专用名称“{1}”。", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "类型“{1}”的属性“{0}”不能赋给数值索引类型“{2}”。", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "类型“{1}”的属性“{0}”不能赋给字符串索引类型“{2}”。", + "Property_0_was_also_declared_here_2733": "属性 \"{0}\" 也在此处声明。", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "属性 \"{0}\" 将覆盖 \"{1}\" 中的基属性。如果是有意的,请添加初始值设定项。否则,请添加 \"declare\" 修饰符或删除多余的声明。", "Property_assignment_expected_1136": "应为属性分配。", "Property_destructuring_pattern_expected_1180": "应为属性析构模式。", "Property_or_signature_expected_1131": "应为属性或签名。", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "导出类的公共静态属性“{0}”具有或正在使用外部模块“{2}”中的名称“{1}”,但不能为其命名。", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "导出类的公共静态属性“{0}”具有或正在使用外部模块“{2}”中的名称“{1}”。", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "导出类的公共静态属性“{0}”具有或正在使用专用名称“{1}”。", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "不允许使用限定名 \"{0}\",因为没有前导 \"@param {object} {1}\"。", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "对具有隐式 \"any\" 类型的表达式和声明引发错误。", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "在带隐式“any\" 类型的 \"this\" 表达式上引发错误。", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "提供 \"--isolatedModules\" 标志时,需要使用 \"export type\" 才能重新导出类型。", "Redirect_output_structure_to_the_directory_6006": "将输出结构重定向到目录。", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "引用的项目“{0}”必须拥有设置 \"composite\": true。", + "Remove_all_unnecessary_uses_of_await_95087": "删除 \"await\" 的所有不必要的使用", "Remove_all_unreachable_code_95051": "删除所有无法访问的代码", "Remove_all_unused_labels_95054": "删除所有未使用的标签", "Remove_braces_from_arrow_function_95060": "从箭头函数中删除大括号", - "Remove_declaration_for_Colon_0_90004": "删除“{0}”的声明", "Remove_destructuring_90009": "删除解构", "Remove_import_from_0_90005": "从“{0}”删除导入", + "Remove_template_tag_90011": "删除模板标记", + "Remove_type_parameters_90012": "删除类型参数", + "Remove_unnecessary_await_95086": "删除不必要的 \"await\"", "Remove_unreachable_code_95050": "删除无法访问的代码", + "Remove_unused_declaration_for_Colon_0_90004": "为 \"{0}\" 删除未使用的声明", "Remove_unused_label_95053": "删除未使用的标签", "Remove_variable_statement_90010": "删除变量语句", + "Replace_all_unused_infer_with_unknown_90031": "将所有未使用的 \"infer\" 替换为 \"unknown\"", "Replace_import_with_0_95015": "用“{0}”替换导入。", + "Replace_infer_0_with_unknown_90030": "将 \"infer {0}\" 替换为 \"unknown\"", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "在函数中的所有代码路径并非都返回值时报告错误。", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "报告 switch 语句中遇到 fallthrough 情况的错误。", "Report_errors_in_js_files_8019": ".js 文件中的报表出错。", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "正在使用主搜索路径解析...", "Resolving_with_primary_search_path_0_6121": "正在使用主搜索路径“{0}”解析。", "Rest_parameter_0_implicitly_has_an_any_type_7019": "Rest 参数“{0}”隐式具有 \"any[]\" 类型。", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "Rest 参数 \"{0}\" 隐式具有 \"any[]\" 类型,但可从用法中推断出更好的类型。", + "Rest_signatures_are_incompatible_2572": "Rest 签名不兼容。", "Rest_types_may_only_be_created_from_object_types_2700": "rest 类型只能从对象类型创建。", + "Return_type_annotation_circularly_references_itself_2577": "返回类型注释循环引用自身。", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "导出接口中的调用签名的返回类型具有或正在使用私有模块“{1}”中的名称“{0}”。", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "导出接口中的调用签名的返回类型具有或正在使用专用名称“{0}”。", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "导出接口中的构造函数签名的返回类型具有或正在使用私有模块“{1}”中的名称“{0}”。", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "无法确定根目录,正在跳过主搜索路径。", "STRATEGY_6039": "策略", "Scoped_package_detected_looking_in_0_6182": "检测到范围包,请在“{0}”中查看", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "将配置文件中的 \"module\" 选项设置为 \"{0}\"", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "将配置文件中的 \"target\" 选项设置为 \"{0}\"", "Setters_cannot_return_a_value_2408": "Setter 不能返回值。", "Show_all_compiler_options_6169": "显示所有编译器选项。", "Show_diagnostic_information_6149": "显示诊断信息。", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "签名“{0}”必须为类型谓词。", "Skip_type_checking_of_declaration_files_6012": "跳过声明文件的类型检查。", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "正在跳过项目“{0}”的生成,因为其依赖项“{1}”有错误", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "正在跳过清理,因为并非所有项目都可找到", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "即将跳过项目 \"{0}\" 的生成,因为未生成其依赖项 \"{1}\"", "Source_Map_Options_6175": "源映射选项", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "指定的重载签名不可分配给任何非专用化签名。", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "动态导入的说明符不能是扩散元素。", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "指定 ECMAScript 目标版本: \"ES3\" (默认)、\"ES5\"、\"ES2015\"、\"ES2016\"、\"ES2017\"、\"ES2018\" 或 \"ESNEXT\"。", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "指定 ECMAScript 目标版本: \"ES3\" (默认)、\"ES5\"、\"ES2015\"、\"ES2016\"、\"ES2017\"、\"ES2018\"、\"ES2019\"、\"ES2020\" 或 \"ESNEXT\"", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "指定 JSX 代码生成: \"preserve\"、\"react-native\" 或 \"react\"。", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "指定仅用于类型的导入的发出/检查行为", + "Specify_file_to_store_incremental_compilation_information_6380": "指定用于存储增量编译信息的文件", "Specify_library_files_to_be_included_in_the_compilation_6079": "指定要在编译中包括的库文件。", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "指定模块代码生成: \"none\"、\"commonjs\"、\"amd\"、\"system\"、\"umd\"、\"es2015\"或 \"ESNext\"。", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "指定模块代码生成: \"none\"、\"commonjs\"、\"amd\"、\"system\"、\"umd\"、\"es2015\"、\"es2020\" 或 \"ESNext\"。", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "指定模块解析策略: \"node\" (Node.js)或 \"classic\" (TypeScript pre-1.6)。", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "指定在使用文件系统事件创建轮询监视失败时创建轮询监视的策略: \"FixedInterval\" (默认)、\"PriorityInterval\"、\"DynamicPriority\"。", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "指定在不支持本机递归监视的平台上监视目录的策略: \"UseFsEvents\" (默认)、\"FixedPollingInterval\"、\"DynamicPriorityPolling\"。", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "指定监视文件的策略: \"FixedPollingInterval\" (默认)、\"PriorityPollingInterval\"、\"DynamicPriorityPolling\"、\"UseFsEvents\"、\"UseFsEventsOnParentDirectory\"。", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "指定在设定 \"react\" JSX 发出目标时要使用的 JSX 工厂函数,例如 \"react.createElement\" 或 \"h\"。", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "指定发出文件时要使用的行序列结尾: \"CRLF\" (dos)或 \"LF\" (unix)。", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "指定调试调试程序应将 TypeScript 文件放置到的位置而不是源位置。", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "指定调试程序应将映射文件放置到的位置而不是生成的位置。", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "指定输入文件的根目录。与 --outDir 一起用于控制输出目录结构。", + "Split_all_invalid_type_only_imports_1367": "拆分所有无效的仅类型导入", + "Split_into_two_separate_import_declarations_1366": "拆分为两个单独的导入声明", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "仅当面向 ECMAScript 5 和更高版本时,\"new\" 表达式中的展开运算符才可用。", "Spread_types_may_only_be_created_from_object_types_2698": "spread 类型只能从对象类型创建。", "Starting_compilation_in_watch_mode_6031": "在监视模式下开始编译...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "后续属性声明必须属于同一类型。属性“{0}”的类型必须为“{1}”,但此处却为类型“{2}”。", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "后续变量声明必须属于同一类型。变量“{0}”必须属于类型“{1}”,但此处却为类型“{2}”。", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "模式“{1}”的替换“{0}”类型不正确,应为 \"string\",实际为“{2}”。", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "模式“{1}”中的替换“{0}”最多只可具有一个 \"*\" 字符。", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "模式 \"{1}\" 中的替代项 \"{0}\" 最多只能有一个 \"*\" 字符", "Substitutions_for_pattern_0_should_be_an_array_5063": "模式“{0}”的替代应为数组。", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "模式“{0}”的替换模式不应为空数组。", "Successfully_created_a_tsconfig_json_file_6071": "已成功创建 tsconfig.json 文件。", @@ -840,78 +1033,121 @@ "Suppress_excess_property_checks_for_object_literals_6072": "取消对象文字的多余属性检查。", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "抑制缺少索引签名的索引对象的 noImplicitAny 错误。", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "\"Symbol\" 引用不是指全局符号构造函数对象。", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "在不支持本机递归监视的平台上同步调用回调并更新目录观察程序的状态。", "Syntax_Colon_0_6023": "语法: {0}", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "可选链中不允许使用带有标记的模板表达式。", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "\"{0}\" 修饰符只能在 TypeScript 文件中使用。", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "“{0}”运算符不能应用于类型 \"symbol\"。", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "“{0}”运算符不允许用于布尔类型。请考虑改用“{1}”。", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "异步迭代器的 \"{0}\" 属性必须是方法。", + "The_0_property_of_an_iterator_must_be_a_method_2767": "迭代器的 \"{0}\" 属性必须是方法。", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "\"Object\" 类型可分配给极少数其他类型。是否想要改用“任意”类型?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "ES3 和 ES5 中的箭头函数不能引用 \"arguments\" 对象。请考虑使用标准函数表达式。", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "ES3 和 ES5 中的异步函数或方法不能引用“参数”对象。请考虑使用标准函数或方法。", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "\"if\" 语句的正文不能为空语句。", "The_character_set_of_the_input_files_6163": "输入文件的字符集。", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "包含箭头函数捕获 \"this\" 的全局值。", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "包含函数或模块体对于控制流分析而言太大。", "The_current_host_does_not_support_the_0_option_5001": "当前主机不支持“{0}”选项。", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "你可能打算使用的 \"{0}\" 的声明在此处定义", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "所需类型来自属性 \"{0}\",在此处的 \"{1}\" 类型上声明该属性", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "所需类型来自此签名的返回类型。", + "The_expected_type_comes_from_this_index_signature_6501": "所需类型来自此索引签名。", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "导出分配的表达式必须是环境上下文中的标识符或限定的名称。", "The_files_list_in_config_file_0_is_empty_18002": "配置文件“{0}”中的 \"files\" 列表为空。", + "The_first_export_default_is_here_2752": "在此处显示第一个导出默认值。", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "承诺的 \"then\" 方法的第一个参数必须是回调。", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "全局类型 \"JSX.{0}\" 不可具有多个属性。", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "\"import.meta\" 元属性仅允许对 \"target\" 和 \"module\" 编译器选项使用 \"ESNext\"。", + "The_implementation_signature_is_declared_here_2750": "在此处声明实现签名。", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "仅当 \"--module\" 选项为 \"esnext\" 或 \"system\" 时,才允许使用 \"import. meta\" 元属性。", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "如果没有引用 \"{1}\",则无法命名 \"{0}\" 的推断类型。这很可能不可移植。需要类型注释。", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "“{0}”的推断类型引用不可访问的“{1}”类型。需要类型批注。", + "The_last_overload_gave_the_following_error_2770": "最后一个重载给出了以下错误。", + "The_last_overload_is_declared_here_2771": "在此处声明最后一个重载。", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "\"for...in\" 语句的左侧不能为析构模式。", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "\"for...in\" 语句的左侧不能使用类型批注。", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "\"for…in\" 语句的左侧不能是可选属性访问。", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "\"for...in\" 语句的左侧必须是变量或属性访问。", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "\"for...in\" 语句的左侧必须是 \"string\" 或 \"any\" 类型。", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "\"for...of\" 语句的左侧不能使用类型批注。", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "\"for…of\" 语句的左侧不能是可选属性访问。", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "\"for...of\" 语句的左侧必须是变量或属性访问。", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "算术运算左侧必须是 \"any\"、\"number\" 或枚举类型。", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "算术运算左侧必须是 \"any\"、\"number\"、\"bigint\" 或枚举类型。", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "赋值表达式的左侧不能是可选属性访问。", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "赋值表达式的左侧必须是变量或属性访问。", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "\"in\" 表达式左侧的类型必须为 \"any\"、\"string\"、\"number\" 或 \"symbol\"。", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "\"instanceof\" 表达式左侧必须是 \"any\" 类型、对象类型或类型参数。", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "向用户显示消息时所用的区域设置(例如,\"en-us\")", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "用于搜索 node_modules 和加载 JavaScript 文件的最大依赖项深度。", - "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "删除运算符的操作数不能是只读属性。", - "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "删除运算符的操作数必须是属性引用。", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "\"delete\" 运算符的操作数不能是专用标识符。", + "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "\"delete\" 运算符的操作数不能是只读属性。", + "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "\"delete\" 运算符的操作数必须是属性引用。", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "增量或减量运算符的操作数不能是可选属性访问。", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "递增或递减运算符的操作数必须是变量或属性访问。", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "分析器预期在这里找到与 \"{\" 标记匹配的 \"}\"。", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "无法在此类中的类型 \"{1}\" 上访问属性 \"{0}\",因为具有相同拼写的另一个专用标识符隐藏了它。", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "JSX 元素构造函数的返回类型必须返回对象类型。", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "参数修饰器函数的返回类型必须为 \"void\" 或 \"any\"。", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "属性修饰器函数的返回类型必须为 \"void\" 或 \"any\"。", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "异步函数的返回类型必须是有效承诺,或不得包含可调用的 \"then\" 成员。 ", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "异步函数或方法的返回类型必须为全局 Promise 类型。", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "\"for...in\" 语句右侧必须是 \"any\" 类型、对象类型或类型参数,但此处的类型为“{0}”。", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "算术运算右侧必须是 \"any\"、\"number\" 或枚举类型。", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "算术运算右侧必须是 \"any\"、\"number\"、\"bigint\" 或枚举类型。", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "\"in\" 表达式的右侧必须是 \"any\" 类型、对象类型或类型参数。", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "\"instanceof\" 表达式的右侧必须属于类型 \"any\",或属于可分配给 \"Function\" 接口类型的类型。", + "The_shadowing_declaration_of_0_is_defined_here_18017": "在此处定义了 \"{0}\" 的隐藏声明", "The_specified_path_does_not_exist_Colon_0_5058": "指定的路径不存在:“{0}”。", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "赋值的目标必须是变量或属性访问。", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "对象 rest 分配的目标不能是可选属性访问。", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "对象 rest 分配的目标必须是变量或属性访问。", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "类型为“{0}”的 \"this\" 上下文不能分配给类型为“{1}”的方法的 \"this\"。", "The_this_types_of_each_signature_are_incompatible_2685": "每个签名的 \"this\" 类型不兼容。", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "类型 \"{0}\" 为 \"readonly\",不能分配给可变类型 \"{1}\"。", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "无法从用法推断类型形参“{0}”的类型实参。可以考虑显式指定类型实参。", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "异步迭代器的 \"next()\" 方法返回的类型必须是具有 \"value\" 属性的类型的承诺。", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "迭代器的 \"next()\" 方法返回的类型必须具有 \"value\" 属性。", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "函数声明的类型必须与函数的签名匹配。", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "异步迭代器的 \"{0}()\" 方法返回的类型必须是具有 \"value\" 属性的类型的承诺。", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "迭代器的 \"{0}()\" 方法返回的类型必须具有 \"value\" 属性。", + "The_types_of_0_are_incompatible_between_these_types_2200": "在这些类型中,\"{0}\" 的类型不兼容。", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "在这些类型中,\"{0}\" 返回的类型不兼容。", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "\"for...in\" 语句的变量声明不能有初始化表达式。", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "\"for...of\" 语句的变量声明不能有初始化表达式。", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "不支持 \"with\" 语句。\"with\" 程序块中的所有符号都将具有类型 \"any\"。", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "此 JSX 标记的 \"{0}\" 属性需要 \"{1}\" 类型的子级,但提供了多个子级。", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "此 JSX 标记的 \"{0}\" 属性需要类型 \"{1}\",该类型需要多个子级,但仅提供了一个子级。", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "此条件将始终返回 \"{0}\",因为类型 \"{1}\" 和 \"{2}\" 没有重叠。", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "此条件将始终返回 true,因为始终定义了函数。你是想改为调用它吗?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "此构造函数可能会转换为类声明。", + "This_expression_is_not_callable_2349": "此表达式不可调用。", + "This_expression_is_not_constructable_2351": "此表达式不可构造。", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "此导入从不用作值,必须使用 \"import type\" ,因为 \"importsNotUsedAsValues\" 设置为 \"error\"。", + "This_may_be_converted_to_an_async_function_80006": "可将此转换为异步函数。", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "只能通过启用 \"{0}\" 标志并引用其默认导出,使用 ECMAScript 导入/导出来引用此模块。", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "此模块是使用 \"export =\" 声明的,在使用 \"{0}\" 标志时只能与默认导入一起使用。", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "此重载签名与其实现签名不兼容。", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "此参数不允许与 \"use strict\" 指令一起使用。", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "此语法需要一个导入的帮助程序,但找不到模块“{0}”。", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "此语法需要一个名为“{1}”的导入帮助程序,但模块“{0}”没有导出的成员“{1}”。", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "此语法需要名为 \"{1}\" 的导入帮助器,\"{0}\" 中不存在该帮助器。请考虑升级 \"{0}\" 的版本。", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "仅当 \"module\" 选项设置为 \"esnext\" 或 \"system\",并且 \"target\" 选项设置为 \"es2017\" 或更高版本时,才允许使用顶级 \"await\" 表达式。", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": ".d.ts 文件中的顶级声明必须以 \"declare\" 或 \"export\" 修饰符开头。", "Trailing_comma_not_allowed_1009": "不允许使用尾随逗号。", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "将每个文件转换为单独的模块(类似 \"ts.transpileModule\")。", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "尝试 \"npm install @types/{0}\" (如果存在),或者添加一个包含“声明模块‘{0}’”的新声明文件(.d.ts);", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "尝试 `npm install @types/{1}` (如果存在),或者添加一个包含 `declare module '{0}';` 的新声明(.d.ts)文件", "Trying_other_entries_in_rootDirs_6110": "正在尝试 \"rootDirs\" 中的其他条目。", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "正在尝试替换“{0}”,候选模块位置:“{1}”。", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "不能将长度为“{1}”的元组类型“{0}”分配给长度为“{2}”的元组。", - "Type_0_cannot_be_converted_to_type_1_2352": "类型“{0}”不可转换为类型“{1}”。", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "长度为 \"{1}\" 的元组类型 \"{0}\" 在索引 \"{2}\" 处没有元素。", + "Tuple_type_arguments_circularly_reference_themselves_4110": "元组类型参数循环引用自身。", "Type_0_cannot_be_used_as_an_index_type_2538": "类型“{0}”不能作为索引类型使用。", "Type_0_cannot_be_used_to_index_type_1_2536": "类型“{0}”无法用于索引类型“{1}”。", "Type_0_does_not_satisfy_the_constraint_1_2344": "类型“{0}”不满足约束“{1}”。", + "Type_0_has_no_call_signatures_2757": "类型 \"{0}\" 没有调用签名。", + "Type_0_has_no_construct_signatures_2761": "类型 \"{0}\" 没有构造签名。", "Type_0_has_no_matching_index_signature_for_type_1_2537": "类型“{0}”没有匹配的类型“{1}”的索引签名。", "Type_0_has_no_properties_in_common_with_type_1_2559": "类型“{0}”与类型“{1}”不具有相同的属性。", - "Type_0_has_no_property_1_2460": "类型“{0}”不具有属性“{1}”。", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "类型“{0}”不具有属性“{1}”和字符串索引签名。", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "类型 \"{0}\" 缺少类型 \"{1}\" 中的以下属性: {2}", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "类型 \"{0}\" 缺少类型 \"{1}\" 的以下属性: {2} 及其他 {3} 项。", "Type_0_is_not_a_constructor_function_type_2507": "类型“{0}”不是构造函数类型。", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "类型“{0}”不是 ES5/ES3 中的有效异步函数返回类型,因为其未引用与 Promise 相符的构造函数值。", "Type_0_is_not_an_array_type_2461": "类型“{0}”不是数组类型。", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "类型“{0}”不是数组类型。请使用编译器选项 \"--downlevelIteration\" 允许迭代器进行迭代。", "Type_0_is_not_an_array_type_or_a_string_type_2495": "类型“{0}”不是数组类型或字符串类型。", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "类型“{0}”不是数组类型或字符串类型。请使用编译器选项 \"--downlevelIteration\" 允许迭代器进行迭代。", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "类型“{0}”不是数组类型或字符串类型,或者没有返回迭代器的 \"[Symbol.iterator]()\" 方法。", @@ -926,17 +1162,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "类型“{0}”以递归方式将自身引用为基类。", "Type_alias_0_circularly_references_itself_2456": "类型别名“{0}”循环引用自身。", "Type_alias_name_cannot_be_0_2457": "类型别名不能为“{0}”。", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "类型别名只能在 TypeScript 文件中使用。", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "类型批注不能出现在构造函数声明中。", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "类型注释只能在 TypeScript 文件中使用。", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "候选类型参数“{1}”不是有效的类型参数,因为它不是候选“{0}”的超类型。", "Type_argument_expected_1140": "应为类型参数。", "Type_argument_list_cannot_be_empty_1099": "类型参数列表不能为空。", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "类型参数只能在 TypeScript 文件中使用。", "Type_arguments_cannot_be_used_here_1342": "无法在此处使用类型参数。", + "Type_arguments_for_0_circularly_reference_themselves_4109": "\"{0}\" 的类型参数循环引用自身。", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "类型断言表达式只能在 TypeScript 文件中使用。", "Type_declaration_files_to_be_included_in_compilation_6124": "要包含在编译中类型声明文件。", "Type_expected_1110": "应为类型。", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "类型实例化过深,且可能无限。", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "类型在其自身的 \"then\" 方法的 fulfillment 回调中被直接或间接引用。", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "\"await\" 操作数的类型必须是有效承诺,或不得包含可调用的 \"then\" 成员。", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "计算属性类型的值为 \"{0}\",该值不能赋给 \"{1}\" 类型。", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "\"yield*\" 操作数的迭代元素的类型必须是有效承诺,或不得包含可调用的 \"then\" 成员。", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "异步生成器中 \"yield\" 操作数的类型必须是有效承诺,或不得包含可调用的 \"then\" 成员。", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "此导入产生的类型。无法调用或构造命名空间样式的导入,这类导入将在运行时导致失败。请考虑改为使用默认导入或这里需要的导入。", "Type_parameter_0_has_a_circular_constraint_2313": "类型参数“{0}”具有循环约束。", "Type_parameter_0_has_a_circular_default_2716": "类型参数“{0}”具有循环默认值。", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "导出接口中的调用签名的类型参数“{0}”具有或正在使用专用名称“{1}”。", @@ -944,17 +1188,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "导出类的类型参数“{0}”具有或正在使用专用名称“{1}”。", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "导出函数的类型参数“{0}”具有或正在使用专用名称“{1}”。", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "导出接口的类型参数“{0}”具有或正在使用专用名称“{1}”。", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "已导出映射对象类型的类型参数 \"{0}\" 使用专用名称 \"{1}\" 。", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "已导出类型别名的类型参数“{0}”具有或正使用专用名称“{1}”。", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "导出接口中的方法的类型参数“{0}”具有或正在使用专用名称“{1}”。", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "导出类中的公共方法的类型参数“{0}”具有或正在使用专用名称“{1}”。", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "导出类中的公共静态方法的类型参数“{0}”具有或正在使用专用名称“{1}”。", "Type_parameter_declaration_expected_1139": "应为类型参数声明。", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "类型参数声明只能在 TypeScript 文件中使用。", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "类型参数默认值只能引用以前声明的类型参数。", "Type_parameter_list_cannot_be_empty_1098": "类型参数列表不能为空。", "Type_parameter_name_cannot_be_0_2368": "类型参数名称不能为“{0}”。", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "类型参数不能出现在构造函数声明中。", "Type_predicate_0_is_not_assignable_to_1_1226": "类型谓词“{0}”不可分配给“{1}”。", "Type_reference_directive_0_was_not_resolved_6120": "======== 未解析类型引用指令“{0}”。========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== 类型引用指令“{0}”已成功解析为“{1}”,主要: {2}。========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== 类型引用指令 \"{0}\" 已成功解析为 \"{1}\" ,包 ID 为 \"{2}\",主要: {3}。========", "Types_have_separate_declarations_of_a_private_property_0_2442": "类型具有私有属性“{0}”的单独声明。", "Types_of_parameters_0_and_1_are_incompatible_2328": "参数“{0}”和“{1}” 的类型不兼容。", "Types_of_property_0_are_incompatible_2326": "属性“{0}”的类型不兼容。", @@ -967,10 +1215,18 @@ "Unexpected_token_1012": "意外的标记。", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "意外的标记。应为构造函数、方法、访问器或属性。", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "意外的标记。类型参数名不应包含大括号。", + "Unexpected_token_Did_you_mean_or_gt_1382": "意外的标记。你是想使用 `{'>'}` 还是 `>`?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "意外的标记。你是想使用 `{'}'}` 还是 `}`?", "Unexpected_token_expected_1179": "意外标记。应为 \"{\"。", + "Unknown_build_option_0_5072": "未知的生成选项 \"{0}\"。", + "Unknown_build_option_0_Did_you_mean_1_5077": "未知的生成选项 \"{0}\"。你是想使用 \"{1}\" 吗?", "Unknown_compiler_option_0_5023": "未知的编译器选项“{0}”。", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "未知的编译器选项 \"{0}\"。你是想使用 \"{1}\" 吗?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "未知的 \"excludes\" 选项。你的意思是 \"exclude\"?", "Unknown_type_acquisition_option_0_17010": "未知类型获取选项“{0}”。", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "未知的类型获取选项 \"{0}\"。你是想使用 \"{1}\" 吗?", + "Unknown_watch_option_0_5078": "未知观察选项 \"{0}\"。", + "Unknown_watch_option_0_Did_you_mean_1_5079": "未知的监视选项 \"{0}\"。你是想使用 \"{1}\" 吗?", "Unreachable_code_detected_7027": "检测到无法访问的代码。", "Unsupported_locale_0_6049": "区域设置“{0}”不受支持。", "Unterminated_Unicode_escape_sequence_1199": "未终止的 Unicode 转义序列。", @@ -980,34 +1236,52 @@ "Unterminated_template_literal_1160": "未终止的模板文本。", "Untyped_function_calls_may_not_accept_type_arguments_2347": "非类型化函数调用不能接受类型参数。", "Unused_label_7028": "未使用的标签。", + "Updating_output_of_project_0_6373": "正在更新项目 \"{0}\" 的输出…", "Updating_output_timestamps_of_project_0_6359": "正在更新项目“{0}”的输出时间戳...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "正在更新项目 \"{0}\" 未更改的输出时间戳…", "Use_synthetic_default_member_95016": "使用综合的“默认”成员。", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "仅 ECMAScript 5 和更高版本支持在 \"for...of\" 语句中使用字符串。", + "Using_compiler_options_of_project_reference_redirect_0_6215": "使用项目引用重定向 \"{0}\" 的编译器选项。", "VERSION_6036": "版本", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "类型“{0}”的值没有与类型“{1}”相同的属性。你是想调用它吗?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "类型“{0}”的值不可调用。是否希望包括 \"new\"?", "Variable_0_implicitly_has_an_1_type_7005": "变量“{0}”隐式具有“{1}”类型。", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "变量 \"{0}\" 隐式具有 \"{1}\" 类型,但可以从用法中推断出更好的类型。", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "变量 \"{0}\" 在某些位置隐式具有类型 \"{1}\",但可以从使用情况推断出更好的类型。", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "变量“{0}”在某些无法确定其类型的位置处隐式具有类型“{1}”。", "Variable_0_is_used_before_being_assigned_2454": "在赋值前使用了变量“{0}”。", "Variable_declaration_expected_1134": "应为变量声明。", "Variable_declaration_list_cannot_be_empty_1123": "变量声明列表不能为空。", "Version_0_6029": "版本 {0}", "Watch_input_files_6005": "监视输入文件。", + "Watch_option_0_requires_a_value_of_type_1_5080": "观察选项 \"{0}\" 需要 {1} 类型的值。", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "是否在监视模式下保留过时的控制台输出,而不是清除屏幕。", + "Wrap_invalid_character_in_an_expression_container_95101": "包装表达式容器中的无效字符", + "You_cannot_rename_a_module_via_a_global_import_8031": "不能通过全局导入对模块进行重命名。", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "不能重命名标准 TypeScript 库中定义的元素。", "You_cannot_rename_this_element_8000": "无法重命名此元素。", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "“{0}”收到的参数过少,无法在此处充当修饰器。你是要先调用它,然后再写入 \"@{0}()\" 吗?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "不能在不使用括号的情况下混用 \"{0}\" 和 \"{1}\" 操作。", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "“{0}”被指定了两次。将覆盖名为“{0}”的特性。", - "_0_can_only_be_used_in_a_ts_file_8009": "“{0}”只能在 .ts 文件中使用。", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "\"{0}\" 是使用 \"export type\" 导出的,因此不能用作值。", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "\"{0}\" 是使用 \"import type\" 导入的,因此不能用作值。", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "\"{0}\" 组件不接受文本作为子元素。JSX 中的文本类型为 \"string\",但 \"{1}\" 的预期类型为 \"{2}\"。", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "\"{0}\" 声明只能在 TypeScript 文件中使用。", "_0_expected_1005": "应为“{0}”。", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "\"{0}\" 隐式具有 \"{1}\" 返回类型,但可以从用法中推断出更好的类型。", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "由于“{0}'”不具有返回类型批注并且在它的一个返回表达式中得到直接或间接引用,因此它隐式具有返回类型 \"any\"。", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "“{0}”隐式具有类型 \"any\",因为它不具有类型批注,且在其自身的初始化表达式中得到直接或间接引用。", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "“{0}”是基元,但“{1}”是包装器对象。如可能首选使用“{0}”。", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "\"{0}\" 可赋给 \"{1}\" 类型的约束,但可以使用约束 \"{2}\" 的其他子类型实例化 \"{1}\"。", "_0_is_declared_but_its_value_is_never_read_6133": "已声明“{0}”,但从未读取其值。", "_0_is_declared_but_never_used_6196": "“{0}”已声明,但从未使用过。", + "_0_is_declared_here_2728": "在此处声明了 \"{0}\"。", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "\"{0}\" 在类 \"{1}\" 中定义为属性,但这里在 \"{2}\" 中重写为访问器。", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "\"{0}\" 在类 \"{1}\" 中定义为访问器,但这里在 \"{2}\" 中重写为实例属性。", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "“{0}”不是关键字“{1}”的有效元属性。是否是指“{2}”?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "“{0}”在其自身的基表达式中得到直接或间接引用。", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "“{0}”在其自身的类型批注中得到直接或间接引用。", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "多次指定了 \"{0}\",因此将重写此用法。", "_0_list_cannot_be_empty_1097": "“{0}”列表不能为空。", "_0_modifier_already_seen_1030": "已看到“{0}”修饰符。", "_0_modifier_cannot_appear_on_a_class_element_1031": "“{0}”修饰符不能出现在类元素上。", @@ -1021,17 +1295,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "“{0}”修饰符不能在环境上下文中使用。", "_0_modifier_cannot_be_used_with_1_modifier_1243": "“{0}”修饰符不能与“{1}”修饰符一起使用。", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "“{0}”修饰符不能与类声明一起使用。", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "\"{0}\" 修饰符不能与专用标识符一起使用。", "_0_modifier_must_precede_1_modifier_1029": "“{0}”修饰符必须位于“{1}”修饰符之前。", + "_0_needs_an_explicit_type_annotation_2782": "\"{0}\" 需要显式类型注释。", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "“{0}”仅指类型,但在此用作命名空间。", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "“{0}”仅表示类型,但在此处却作为值使用。", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "\"{0}\" 仅指类型,但在此处用作值。是否需要更改目标库?请尝试将 `lib` 编译器选项更改为 es2015 或更高版本。", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "“{0}”指 UMD 全局,但当前文件是模块。请考虑改为添加导入。", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "\"{0}\" 表示值,但在此处用作类型。", "_0_tag_already_specified_1223": "已指定“{0}”标记。", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "“{0}”标记无法单独用作顶级 JSDoc 标记。", + "_0_was_also_declared_here_6203": "此处也声明了 \"{0}\"。", + "_0_was_exported_here_1377": "在此处导出了 \"{0}\"。", + "_0_was_imported_here_1376": "此处导入了 \"{0}\"。", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "缺少返回类型批注的“{0}”隐式具有“{1}”返回类型。", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "缺少返回类型批注的 \"{0}\" 隐式具有 \"{1}\" 产出类型。", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "\"abstract\" 修饰符仅可出现在类、方法或属性声明中。", - "await_expression_is_only_allowed_within_an_async_function_1308": "只允许在异步函数中使用 \"await\" 表达式。", + "and_here_6204": "并在这里。", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "仅当文件是模块时,才允许在该文件的顶层使用 \"await\" 表达式,但此文件没有导入或导出。请考虑添加空的 \"export {}\" 以将此文件变为模块。", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "仅允许在异步函数和模块顶级使用 \"await\" 表达式。", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "不能在参数初始化表达式中使用 \"await\" 表达式。", + "await_has_no_effect_on_the_type_of_this_expression_80007": "\"await\" 对此表达式的类型没有影响。", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "\"baseUrl\" 选项设置为“{0}”,可使用此值解析非相关模块名称“{1}”。", + "can_only_be_used_at_the_start_of_a_file_18026": "\"#!\" 只能用在文件的开头。", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "\"=\" 只可在重构赋值内部的对象文字属性中使用。", "case_or_default_expected_1130": "应为 \"case\" 或 \"default\"。", "class_expressions_are_not_currently_supported_9003": "当前不支持 \"class\" 表达式。", @@ -1039,11 +1325,12 @@ "const_declarations_must_be_initialized_1155": "必须初始化 \"const\" 声明。", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "\"const\" 枚举成员初始化表达式的求值结果为非有限值。", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "\"const\" 枚举成员初始化表达式的求值结果为不允许使用的值 \"NaN\"。", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "常量枚举成员初始值设定项只能包含文字值和其他计算的枚举值。", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "\"const\" 枚举仅可在属性、索引访问表达式、导入声明的右侧、导出分配或类型查询中使用。", + "constructor_is_a_reserved_word_18012": "\"#constructor\" 是保留字。", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "在严格模式下,无法对标识符调用 \"delete\"。", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "删除此 - 项目“{0}”已是最新,因为它是以前生成的", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "\"enum declarations\" 只能在 .ts 文件中使用。", - "export_can_only_be_used_in_a_ts_file_8003": "\"export=\" 只能在 .ts 文件中使用。", + "export_can_only_be_used_in_TypeScript_files_8003": "\"export =\" 只能在 TypeScript 文件中使用。", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "\"export\" 修饰符不可用于环境模块和模块扩大,因为它们始终可见。", "extends_clause_already_seen_1172": "已看到 \"extends\" 子句。", "extends_clause_must_precede_implements_clause_1173": "\"extends\" 子句必须位于 \"implements\" 子句之前。", @@ -1053,23 +1340,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "\"get\" 和 \"set\" 访问器必须拥有相同的 \"this\" 类型。", "get_and_set_accessor_must_have_the_same_type_2380": "\"get\" 和 \"set\" 访问器必须属于同一类型。", "implements_clause_already_seen_1175": "已看到 \"implements\" 子句。", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "\"implements clauses\" 只能在 .ts 文件中使用。", - "import_can_only_be_used_in_a_ts_file_8002": "\"import ... =\" 只能在 .ts 文件中使用。", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "\"implements\" 子句只能在 TypeScript 文件中使用。", + "import_can_only_be_used_in_TypeScript_files_8002": "\"import ... =\" 只能在 TypeScript 文件中使用。", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "仅条件类型的 \"extends\" 子句中才允许 \"infer\" 声明。", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "\"interface declarations\" 只能在 .ts 文件中使用。", "let_declarations_can_only_be_declared_inside_a_block_1157": "\"let\" 声明只能在块的内部声明。", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "\"let\" 不能用作 \"let\" 或 \"const\" 声明中的名称。", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "\"module declarations\" 只能在 .ts 文件中使用。", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "\"new T[]\" 不能用于创建数组。请改用 \"new Array()\"。", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "其目标缺少构造签名的 \"new\" 表达式隐式具有 \"any\" 类型。", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "\"non-null assertions\" 只能在 .ts 文件中使用。", "options_6024": "选项", "or_expected_1144": "应为 \"{\" 或 \";\"。", "package_json_does_not_have_a_0_field_6100": "\"package.json\" 没有“{0}”字段。", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "\"package. json\" 没有与版本 \"{0}\" 匹配的 \"typesVersions\" 项。", + "package_json_had_a_falsy_0_field_6220": "\"package. json\" 具有错误的 \"{0}\" 字段。", "package_json_has_0_field_1_that_references_2_6101": "\"package.json\" 具有引用“{2}”的“{0}”字段“{1}”。", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "\"parameter modifiers\" 只能在 .ts 文件中使用。", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "\"package. json\" 具有 \"typesVersions\" 项 \"{0}\",它不是有效的 semver 范围。", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "\"package. json\" 具有与编译器版本 \"{1}\" 匹配的 \"typesVersions\" 项 \"{0}\",它需要与模块名称 \"{2}\" 匹配的模式。", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "\"package. json\" 具有 \"typesVersions\" 字段,它具有特定于版本的路径映射。", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "指定了 \"paths“ 选项,正在查找模式以匹配模块名“{0}”。", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "\"readonly\" 修饰符仅可出现在属性声明或索引签名中。", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "仅允许对数组和元组文本类型使用 \"readonly\" 类型修饰符。", "require_call_may_be_converted_to_an_import_80005": "可将“要求”调用转换为导入。", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "设置了 \"rootDirs\" 选项,可将其用于解析相对模块名称“{0}”。", "super_can_only_be_referenced_in_a_derived_class_2335": "只能在派生类中引用 \"super\"。", @@ -1077,6 +1365,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "不能在计算属性名中引用 \"super\"。", "super_cannot_be_referenced_in_constructor_arguments_2336": "不能在构造函数参数中引用 \"super\"。", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "\"target\" 选项为 \"ES2015\" 或更高版本时,仅对象文字表达式的成员中允许 \"super\"。", + "super_may_not_use_type_arguments_2754": "\"super\" 不能使用类型参数。", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "访问派生类构造函数中的 \"super\" 属性前,必须调用 \"super\"。", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "访问派生类的构造函数中的 \"this\" 前,必须调用 \"super\"。", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "\"super\" 的后面必须是参数列表或成员访问。", @@ -1087,14 +1376,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "不能在构造函数参数中引用 \"this\"。", "this_cannot_be_referenced_in_current_location_2332": "不能在当前位置引用 \"this\"。", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "\"this\" 隐式具有类型 \"any\",因为它没有类型注释。", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "\"type aliases\" 只能在 .ts 文件中使用。", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "\"type arguments\" 只能在 .ts 文件中使用。", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "\"type assertion expressions\" 只能在 .ts 文件中使用。", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "\"type parameter declarations\" 只能在 .ts 文件中使用。", - "types_can_only_be_used_in_a_ts_file_8010": "\"types\" 只能在 .ts 文件中使用。", "unique_symbol_types_are_not_allowed_here_1335": "此处不允许使用 \"unique symbol\" 类型。", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "\"unique symbol\" 类型仅可用于变量语句中的变量。", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "不可在具有绑定名称的变量声明中使用 \"unique symbol\" 类型。", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "\"use strict\" 指令不能与非简单参数列表一起使用。", + "use_strict_directive_used_here_1349": "此处使用了 \"use strict\" 指令。", "with_statements_are_not_allowed_in_an_async_function_block_1300": "不允许在异步函数块中使用 \"with\" 语句。", "with_statements_are_not_allowed_in_strict_mode_1101": "严格模式下不允许使用 \"with\" 语句。", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "不能在参数初始化表达式中使用 \"yield\" 表达式。" diff --git a/lib/zh-tw/diagnosticMessages.generated.json b/lib/zh-tw/diagnosticMessages.generated.json index 44e599285ae31..c04972e3a7bb9 100644 --- a/lib/zh-tw/diagnosticMessages.generated.json +++ b/lib/zh-tw/diagnosticMessages.generated.json @@ -2,13 +2,15 @@ "A_0_modifier_cannot_be_used_with_an_import_declaration_1079": "'{0}' 修飾元無法與匯入宣告並用。", "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045": "'{0}' 修飾元無法與介面宣告並用。", "A_0_parameter_must_be_the_first_parameter_2680": "'{0}' 參數必須為第一個參數。", + "A_bigint_literal_cannot_use_exponential_notation_1352": "Bigint 常值不可使用指數標記法。", + "A_bigint_literal_must_be_an_integer_1353": "Bigint 常值必須為整數。", "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463": "實作簽章中不得省略繫結模式參數。", "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105": "'break' 陳述式只可在封入的反覆項目或 switch 陳述式內使用。", "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116": "'break' 陳述式只可跳至封入之陳述式的標籤。", "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500": "類別只能實作具有選擇性型別引數的識別碼/限定名稱。", + "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422": "類別只能使用靜態已知成員來實作物件類型或物件類型的交集。", "A_class_declaration_without_the_default_modifier_must_have_a_name_1211": "不具 'default' 修飾元的類別宣告必須要有名稱。", "A_class_may_only_extend_another_class_2311": "每個類別只可擴充另一個類別。", - "A_class_may_only_implement_another_class_or_interface_2422": "每個類別只可實作另一個類別或介面。", "A_class_member_cannot_have_the_0_keyword_1248": "類別成員不能含有 '{0}' 關鍵字。", "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171": "計算的屬性名稱中不可有逗點運算式。", "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467": "計算的屬性名稱不得參考其包含類型中的型別參數。", @@ -19,14 +21,14 @@ "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "介面中的計算屬性名稱必須參考型別為常值型別或 'unique symbol' 型別的運算式。", "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "計算的屬性名稱必須是 'string'、'number'、'symbol' 或 'any' 類型。", "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471": "格式為 '{0}' 之計算的屬性名稱必須是 'symbol' 類型。", + "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "'const' 判斷提示只可套用至列舉成員、字串、數字、布林值、陣列或物件常值的參考。", "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "若要存取常數列舉成員,必須透過字串常值。", - "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254": "環境內容中的 'const' 初始設定式必須為字串或數字常值。", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "環境內容中的 'const' 初始設定式必須為字串、數字常值或常值列舉參考。", "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "當建構函式的類別擴充為 'null' 時,不得包含 'super' 呼叫。", "A_constructor_cannot_have_a_this_parameter_2681": "建構函式不能含有 'this' 參數。", "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104": "'continue' 陳述式只可在封入的反覆項目陳述式內使用。", "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115": "'continue' 陳述式只可跳至封入之反覆項目陳述式的標籤。", "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038": "不得在現有環境內容中使用 'declare' 修飾元。", - "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046": ".d.ts 檔案中的最上層宣告需要 'declare' 修飾元。", "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "一個裝飾項目只能裝飾一項方法實作,而不能多載。", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "'default' 子句在 'switch' 陳述式中不得出現一次以上。", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "預設匯出只能在 ECMAScript 樣式的模組中使用。", @@ -42,15 +44,18 @@ "A_generator_cannot_have_a_void_type_annotation_2505": "產生器不得有 'void' 類型註釋。", "A_get_accessor_cannot_have_parameters_1054": "'get' 存取子不得有參數。", "A_get_accessor_must_return_a_value_2378": "'get' 存取子必須傳回值。", + "A_label_is_not_allowed_here_1344": "此處不允許標籤。", "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "列舉宣告中的成員初始設定式,不得參考在它之後宣告的成員,包括在其他列舉中所定義的成員。", + "A_method_cannot_be_named_with_a_private_identifier_18022": "無法以私人識別碼命名方法。", "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "mixin 類別必須具備建構函式,且該建構函式必須指定一個類型為 'any[]' 的 rest 參數。", "A_module_cannot_have_multiple_default_exports_2528": "一個模組不得有多個預設匯出。", "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "命名空間宣告的所在檔案位置,不得與其要合併的類別或函式不同。", "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "命名空間宣告的位置不得先於其要合併的類別或函式。", "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "只有命名空間或模組才允許命名空間宣告。", - "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "命名空間樣式的匯入無法加以呼叫或建構,而且會導致執行階段失敗。", "A_non_dry_build_would_build_project_0_6357": "非 -dry 組建會建置專案 '{0}'", "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "非 -dry 組建會刪除下列檔案: {0}", + "A_non_dry_build_would_update_output_of_project_0_6375": "非 DRY 組建將會更新專案 '{0}' 的輸出", + "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "非 DRY 組建將會更新專案 '{0}' 輸出的時間戳記", "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "只有函式或建構函式實作才可使用參數初始設定式。", "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "無法使用剩餘參數宣告參數屬性。", "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "建構函式實作中只可有一個參數屬性。", @@ -59,11 +64,14 @@ "A_promise_must_have_a_then_method_1059": "Promise 必須有 'then' 方法。", "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331": "類型為 'unique symbol' 類型的類別屬性,必須為 'static' 和 'readonly'。", "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330": "類型為 'unique symbol' 類型之介面或常值型別的屬性,必須是 'readonly'。", + "A_required_element_cannot_follow_an_optional_element_1257": "必要項目不可接在選擇性項目後面。", "A_required_parameter_cannot_follow_an_optional_parameter_1016": "必要參數不得接在選擇性參數之後。", "A_rest_element_cannot_contain_a_binding_pattern_2501": "剩餘項目不得包含繫結模式。", "A_rest_element_cannot_have_a_property_name_2566": "REST 元素不得有屬性名稱。", "A_rest_element_cannot_have_an_initializer_1186": "剩餘項目不得有初始設定式。", "A_rest_element_must_be_last_in_a_destructuring_pattern_2462": "Rest 項目必須保持在解構模式。", + "A_rest_element_must_be_last_in_a_tuple_type_1256": "其餘項目必須是元組類型中的最後一項。", + "A_rest_element_type_must_be_an_array_type_2574": "其餘項目類型必須為陣列類型。", "A_rest_parameter_cannot_be_optional_1047": "剩餘參數不得為選擇性參數。", "A_rest_parameter_cannot_have_an_initializer_1048": "剩餘參數不得有初始設定式。", "A_rest_parameter_must_be_last_in_a_parameter_list_1014": "剩餘參數必須是參數清單中的最後一個參數。", @@ -77,13 +85,13 @@ "A_set_accessor_must_have_exactly_one_parameter_1049": "'set' 存取子只可有一個參數。", "A_set_accessor_parameter_cannot_have_an_initializer_1052": "'set' 存取子參數不得有初始設定式。", "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381": "包含實作的簽章不得使用字串常值類型。", - "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "當類別包含已初始化的屬性或參數屬性時,'super' 呼叫必須是建構函式中的第一個陳述式。", + "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "當類別包含已初始化的屬性、參數屬性或私人識別碼時,'super' 呼叫必須為建構函式中的第一個陳述式。", "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "以 'this' 為基礎的類型成立條件,和以參數為基礎的類型成立條件不相容。", "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "'this' 類型只適用於類別或介面的非靜態成員。", "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "'tsconfig.json' 檔案已定義於: '{0}'。", - "A_tuple_type_element_list_cannot_be_empty_1122": "元組類型項目清單不得為空白。", "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007": "乘冪運算式左邊不允許類型宣告運算式。請考慮以括弧括住運算式。", "A_type_literal_property_cannot_have_an_initializer_1247": "類型常值屬性不得有初始設定式。", + "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363": "僅限類型的匯入可以指定預設匯入或具名繫結,但不能同時指定兩者。", "A_type_predicate_cannot_reference_a_rest_parameter_1229": "型別述詞不得參考剩餘參數。", "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230": "型別述詞不得參考繫結模式的項目 '{0}'。", "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228": "只有函式及方法的傳回型別位置才允許型別述詞。", @@ -99,23 +107,38 @@ "Add_0_to_existing_import_declaration_from_1_90015": "從 \"{1}\" 將 '{0}' 新增至現有的匯入宣告", "Add_0_to_unresolved_variable_90008": "對未解析的變數新增 '{0}.'", "Add_all_missing_async_modifiers_95041": "新增缺少的所有 'async' 修飾元", + "Add_all_missing_imports_95064": "新增所有缺少的匯入", "Add_all_missing_members_95022": "新增遺漏的所有成員", "Add_all_missing_super_calls_95039": "新增缺少的所有 super 呼叫", "Add_async_modifier_to_containing_function_90029": "將 async 修飾元新增至包含的函式", + "Add_await_95083": "新增 'await'", + "Add_await_to_initializer_for_0_95084": "將 'await' 新增至 '{0}' 的初始設定式", + "Add_await_to_initializers_95089": "將 'await' 新增至初始設定式", "Add_braces_to_arrow_function_95059": "將大括號新增至箭號函式", + "Add_const_to_all_unresolved_variables_95082": "將 'const' 新增至所有未解析的變數", + "Add_const_to_unresolved_variable_95081": "將 'const' 新增至未解析的變數", + "Add_default_import_0_to_existing_import_declaration_from_1_90033": "從 \"{1}\" 將預設匯入 '{0}' 新增至現有的匯入宣告", "Add_definite_assignment_assertion_to_property_0_95020": "將明確指派判斷提示新增至屬性 '{0}'", "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "為所有未初始化的屬性新增明確的指派判斷提示", + "Add_export_to_make_this_file_into_a_module_95097": "新增 'export {}' 以將此檔案設為模組", "Add_index_signature_for_property_0_90017": "為屬性 '{0}' 新增索引簽章", "Add_initializer_to_property_0_95019": "將初始設定式新增至屬性 '{0}'", "Add_initializers_to_all_uninitialized_properties_95027": "為所有未初始化的屬性新增初始設定式", + "Add_missing_enum_member_0_95063": "新增缺少的列舉成員 '{0}'", + "Add_missing_new_operator_to_all_calls_95072": "將缺少的 'new' 運算子新增至所有呼叫", + "Add_missing_new_operator_to_call_95071": "缺少的 'new' 運算子新增至呼叫", "Add_missing_super_call_90001": "新增遺漏的 'super()' 呼叫", "Add_missing_typeof_95052": "新增遺漏的 'typeof'", + "Add_names_to_all_parameters_without_names_95073": "將名稱新增至所有沒有名稱的參數", "Add_or_remove_braces_in_an_arrow_function_95058": "在箭號函式中新增或移除大括號", + "Add_parameter_name_90034": "新增參數名稱", "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "對所有比對成員名稱的未解析變數新增限定詞", "Add_to_all_uncalled_decorators_95044": "為所有未呼叫的裝飾項目新增 '()'", "Add_ts_ignore_to_all_error_messages_95042": "為所有錯誤訊息新增 '@ts-ignore'", "Add_undefined_type_to_all_uninitialized_properties_95029": "為所有未初始化的屬性新增未定義的類型", "Add_undefined_type_to_property_0_95018": "將 'undefined' 類型新增至屬性 '{0}'", + "Add_unknown_conversion_for_non_overlapping_types_95069": "新增非重疊類型的 'unknown' 轉換", + "Add_unknown_to_all_conversions_of_non_overlapping_types_95070": "將 'unknown' 新增至非重疊類型的所有轉換", "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068": "新增 tsconfig.json 檔案有助於組織同時包含 TypeScript 及 JavaScript 檔案的專案。若要深入了解,請前往 https://aka.ms/tsconfig。", "Additional_Checks_6176": "其他檢查", "Advanced_Options_6178": "進階選項", @@ -123,33 +146,46 @@ "All_declarations_of_0_must_have_identical_type_parameters_2428": "'{0}' 的所有宣告都必須具有相同的類型參數。", "All_declarations_of_an_abstract_method_must_be_consecutive_2516": "抽象方法的所有宣告必須連續。", "All_destructured_elements_are_unused_6198": "不會使用所有未經結構化的項目。", + "All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208": "當提供 '--isolatedModules' 旗標時,所有檔案都必須為模組。", "All_imports_in_import_declaration_are_unused_6192": "匯入宣告中的所有匯入皆未使用。", + "All_type_parameters_are_unused_6205": "所有型別參數皆未使用", "All_variables_are_unused_6199": "所有變數都未使用。", + "Allow_accessing_UMD_globals_from_modules_95076": "允許從模組存取 UMD 全域。", "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "允許從沒有預設匯出的模組進行預設匯入。這不會影響程式碼發出,僅為類型檢查。", "Allow_javascript_files_to_be_compiled_6102": "允許編譯 JavaScript 檔案。", - "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "提供 '--isolatedModules' 旗標時,不可使用環境常數列舉。", + "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261": "已包含的檔案名稱 '{0}' 與檔案名稱 '{1}' 僅大小寫不同。", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "環境模組宣告不可指定相對模組名稱。", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "環境模組不得以巢狀方式置於其他模組或命名空間中。", "An_AMD_module_cannot_have_multiple_name_assignments_2458": "AMD 模組不能有多個名稱指派。", "An_abstract_accessor_cannot_have_an_implementation_1318": "抽象存取子無法實作。", - "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "不得在環境內容中宣告存取子", + "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "協助工具修飾元不可搭配私人識別碼使用。", + "An_accessor_cannot_be_named_with_a_private_identifier_18023": "存取子不可以私人識別碼命名。", "An_accessor_cannot_have_type_parameters_1094": "存取子不得有類型參數。", "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "環境模組宣告只可出現在檔案的最上層。", - "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356": "算術運算元必須是 'any'、'number' 或列舉類型。", + "An_argument_for_0_was_not_provided_6210": "未提供 '{0}' 的引數。", + "An_argument_matching_this_binding_pattern_was_not_provided_6211": "未提供符合此繫結模式的引數。", + "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356": "算術運算元必須屬於 'any'、'number'、'bigint' 或列舉類型。", + "An_arrow_function_cannot_have_a_this_parameter_2730": "箭號函式不可具有 'this' 參數。", "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705": "ES5/ES3 中的非同步函式或方法需要 'Promise' 建構函式。請確認您有 'Promise' 建構函式的宣告,或在 `--lib` 選項中納入 'ES2015'。", "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057": "非同步函式或方法必須包含有效可等候的傳回型別。", "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697": "非同步函式或方法必須傳回 'Promise'。請確定您有 'Promise' 的宣告或將 'ES2015' 納入您的 '-lib' 選項。", "An_async_iterator_must_have_a_next_method_2519": "非同步迭代器必須有 'next()' 方法。", "An_element_access_expression_should_take_an_argument_1011": "項目存取運算式應接受一個引數。", + "An_enum_member_cannot_be_named_with_a_private_identifier_18024": "列舉成員不能以私人識別碼命名。", "An_enum_member_cannot_have_a_numeric_name_2452": "列舉成員不得有數值名稱。", + "An_enum_member_name_must_be_followed_by_a_or_1357": "列舉成員名稱必須尾隨 ','、'=' 或 '}'。", "An_export_assignment_can_only_be_used_in_a_module_1231": "匯出指派只可用於模組中。", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "匯出指派不得用於具有其他匯出項目的模組中。", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "命名空間中不可使用匯出指派。", "An_export_assignment_cannot_have_modifiers_1120": "匯出指派不得有修飾元。", "An_export_declaration_can_only_be_used_in_a_module_1233": "匯出宣告只可用於模組中。", "An_export_declaration_cannot_have_modifiers_1193": "匯出宣告不得有修飾元。", + "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "無法對 'void' 類型的運算式測試真實性", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "擴充的 Unicode 逸出值必須介於 0x0 與 0x10FFFF (不含) 之間。", + "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351": "識別碼或關鍵字不可直接接在數字常值後面。", "An_implementation_cannot_be_declared_in_ambient_contexts_1183": "不得在環境內容中宣告實作。", + "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "匯入別名不能參考使用 'export type' 匯出的宣告。", + "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "匯入別名不能參考使用 'import type' 匯入的宣告。", "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "匯入宣告只可用於命名空間或模組中。", "An_import_declaration_cannot_have_modifiers_1191": "匯入宣告不得有修飾元。", "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "匯入路徑的結尾不得為 '{0}' 副檔名。請考慮改為匯入 '{1}'。", @@ -163,86 +199,110 @@ "An_index_signature_parameter_must_have_a_type_annotation_1022": "索引簽章參數必須有類型註釋。", "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336": "索引簽章參數類型不能是類型別名。請考慮改為撰寫 '[{0}: {1}]: {2}'。", "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337": "索引簽章參數類型不能是等位型別。請考慮改用對應的物件類型。", - "An_index_signature_parameter_type_must_be_string_or_number_1023": "索引簽章參數類型必須是 'string' 或 'number'。", + "An_index_signature_parameter_type_must_be_either_string_or_number_1023": "索引簽章參數類型必須為 'string' 或 'number'。", "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "介面只能擴充具有選擇性型別引數的識別碼/限定名稱。", - "An_interface_may_only_extend_a_class_or_another_interface_2312": "每個介面只可擴充一個類別或另一個介面。", + "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "介面只能延伸物件類型或具有靜態已知成員的物件類型交集。", "An_interface_property_cannot_have_an_initializer_1246": "介面屬性不得有初始設定式。", "An_iterator_must_have_a_next_method_2489": "迭代器必須要有 'next()' 方法。", "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "物件常值不得有多個同名的 get/set 存取子。", "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "在 strict 模式中,物件常值不得有多個同名的屬性。", "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "物件常值不得有同名的屬性與存取子。", "An_object_member_cannot_be_declared_optional_1162": "不得將物件成員宣告為選擇性。", + "An_optional_chain_cannot_contain_private_identifiers_18030": "選擇性鏈結不能包含私人識別碼。", + "An_outer_value_of_this_is_shadowed_by_this_container_2738": "此容器已陰影 'this' 的外部值。", "An_overload_signature_cannot_be_declared_as_a_generator_1222": "不可將多載簽章宣告為產生器。", "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006": "乘冪運算式左邊不允許具 '{0}' 運算子的一元運算式。請考慮以括弧括住運算式。", "Annotate_everything_with_types_from_JSDoc_95043": "標註具備 JSDoc 之類型的所有項目 ", "Annotate_with_type_from_JSDoc_95009": "為來自 JSDoc 的類型標註", "Annotate_with_types_from_JSDoc_95010": "為來自 JSDoc 的類型標註", + "Another_export_default_is_here_2753": "其他匯出預設位於此處。", + "Are_you_missing_a_semicolon_2734": "缺少分號嗎?", "Argument_expression_expected_1135": "必須是引數運算式。", "Argument_for_0_option_must_be_Colon_1_6046": "'{0}' 選項的引數必須是: {1}。", "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345": "類型 '{0}' 的引數不可指派給類型 '{1}' 的參數。", "Array_element_destructuring_pattern_expected_1181": "必須是陣列項目解構模式。", + "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775": "判斷提示要求必須以明確的型別註解宣告呼叫目標中的每個名稱。", + "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776": "判斷提示要求呼叫目標必須為識別碼或限定名稱。", "Asterisk_Slash_expected_1010": "必須是 '*/'。", "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669": "全域範圍的增強指定只能在外部模組宣告或環境模組宣告直接巢狀。", "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670": "除非全域範圍的增強指定已顯示在環境內容中,否則應含有 'declare' 修飾元。", "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140": "專案 '{0}' 中已啟用鍵入的自動探索。正在使用快取位置 '{2}' 執行模組 '{1}' 的額外解析傳遞。", "Base_class_expressions_cannot_reference_class_type_parameters_2562": "基底類別運算式無法參考類別型別參數。", - "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509": "基底建構函式傳回型別 '{0}' 不是類別或介面類型。", + "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509": "基底建構函式傳回型別 '{0}' 不是物件類型或具有靜態已知成員的物件類型交集。", "Base_constructors_must_all_have_the_same_return_type_2510": "基底建構函式的傳回型別必須全部相同。", "Base_directory_to_resolve_non_absolute_module_names_6083": "要解析非絕對模組名稱的基底目錄。", "Basic_Options_6172": "基本選項", + "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737": "當目標低於 ES2020 時,無法使用 BigInt 常值。", "Binary_digit_expected_1177": "必須是二進位數字。", "Binding_element_0_implicitly_has_an_1_type_7031": "繫結元素 '{0}' 隱含擁有 '{1}' 類型。", "Block_scoped_variable_0_used_before_its_declaration_2448": "已在其宣告之前使用區塊範圍變數 '{0}'。", "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "建置包括似乎已是最新狀態的所有專案", "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "若已過期,則建置一或多個專案及其相依性", + "Build_option_0_requires_a_value_of_type_1_5073": "組建選項 '{0}' 需要 {1} 類型的值。", "Building_project_0_6358": "正在建置專案 '{0}'...", "Call_decorator_expression_90028": "呼叫裝飾項目運算式", + "Call_signature_return_types_0_and_1_are_incompatible_2202": "呼叫簽章傳回型別 '{0}' 與 '{1}' 不相容。", "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "缺少傳回型別註解的呼叫簽章隱含了 'any' 傳回型別。", + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204": "無引數呼叫簽章的傳回型別 '{0}' 與 '{1}' 不相容。", "Call_target_does_not_contain_any_signatures_2346": "呼叫目標未包含任何特徵標記。", "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713": "因為 '{0}' 是類型而非命名空間,所以無法存取 '{0}.{1}'。您要在 '{0}' 中使用 '{0}[\"{1}\"]' 擷取屬性 '{1}' 的類型嗎?", + "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748": "當提供 '--isolatedModules' 旗標時,則無法存取環境常數列舉。", "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672": "無法將 '{0}' 建構函式類型指派至 '{1}' 建構函式類型。", "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517": "無法將抽象建構函式類型指派給非抽象建構函式類型。", - "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540": "無法指派至 '{0}',因為它是常數或唯讀屬性。", + "Cannot_assign_to_0_because_it_is_a_constant_2588": "因為 '{0}' 為常數,所以無法指派至 '{0}'。", + "Cannot_assign_to_0_because_it_is_a_read_only_property_2540": "因為 '{0}' 為唯讀屬性,所以無法指派至 '{0}'。", "Cannot_assign_to_0_because_it_is_not_a_variable_2539": "無法指派至 '{0}',因為它不是變數。", "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671": "因為模組 '{0}' 會解析為非模組實體,所以無法加以增強。", "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649": "無法使用值匯出擴充模組 '{0}',因為其會解析為非模組實體。", "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131": "除非 '--module' 旗標為 'amd' 或 'system',否則無法使用選項 '{0}' 編譯模組。", - "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208": "提供 '--isolatedModules' 旗標時,無法編譯命名空間。", "Cannot_create_an_instance_of_an_abstract_class_2511": "無法建立抽象類別的執行個體。", + "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766": "因為值的迭代器 'next' 方法需要類型 '{1}',但所包含的產生器永遠會傳送 '{0}',所以無法將反覆項目委派給值。", "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661": "無法匯出 '{0}'。只有區域宣告可以從模組匯出。", "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675": "無法延伸類別 '{0}'。類別建構函式已標記為私用。", "Cannot_extend_an_interface_0_Did_you_mean_implements_2689": "無法擴充介面 '{0}',您意指「實作」嗎?", + "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081": "在目前的目錄中找不到 tsconfig.json 檔案: {0}。", "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "在指定的目錄 '{0}' 中找不到 tsconfig.json 檔案。", "Cannot_find_global_type_0_2318": "找不到全域類型 '{0}'。", "Cannot_find_global_value_0_2468": "找不到全域值 '{0}'。", "Cannot_find_lib_definition_for_0_2726": "找不到 '{0}' 的 lib 定義。", "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "找不到 '{0}' 的 lib 定義。您是指 '{1}' 嗎?", "Cannot_find_module_0_2307": "找不到模組 '{0}'。", + "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "找不到模組 '{0}'。請考慮使用 '--resolveJsonModule' 以匯入副檔名為 '.json' 的模組", "Cannot_find_name_0_2304": "找不到名稱 '{0}'。", "Cannot_find_name_0_Did_you_mean_1_2552": "找不到名稱 '{0}'。您指的是 '{1}' 嗎?", "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "找不到名稱 '{0}'。您要找的是此執行個體成員 'this.{0}' 嗎?", "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "找不到名稱 '{0}'。您要找的是此靜態成員 '{1}.{0}' 嗎?", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "找不到名稱 '{0}'。需要變更您的目標程式庫嗎? 請嘗試將 `lib` 編譯器選項變更為 es2015 或更新版本。", + "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "找不到名稱 '{0}'。需要變更您的目標程式庫嗎? 請嘗試將 `lib` 編譯器選項變更為包含 'dom'。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582": "找不到名稱 '{0}'。需要安裝測試執行器的類型定義嗎? 請嘗試 `npm i @types/jest` 或 `npm i @types/mocha`。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593": "找不到名稱 '{0}'。需要安裝測試執行器的類型定義嗎? 請嘗試 `npm i @types/jest` 或 `npm i @types/mocha`,然後將 `jest` 或 `mocha` 新增至 tsconfig 中的類型欄位。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581": "找不到名稱 '{0}'。需要安裝 jQuery 的類型定義嗎? 請嘗試 `npm i @types/jquery`。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592": "找不到名稱 '{0}'。您需要安裝 jQuery 的類型定義嗎? 請嘗試 `npm i @types/jquery`,然後將 `jquery` 新增至 tsconfig 中的類型欄位。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580": "找不到名稱 '{0}'。需要安裝節點的類型定義嗎? 請嘗試 `npm i @types/node`。", + "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591": "找不到名稱 '{0}'。需要安裝節點的類型定義嗎? 請嘗試 `npm i @types/node`,然後將 `node` 新增至 tsconfig 中的類型欄位。", "Cannot_find_namespace_0_2503": "找不到命名空間 '{0}'。", "Cannot_find_parameter_0_1225": "找不到參數 '{0}'。", "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009": "找不到輸入檔的一般子目錄路徑。", "Cannot_find_type_definition_file_for_0_2688": "找不到 '{0}' 的類型定義檔案。", "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137": "無法匯入型別宣告檔案。請考慮匯入 '{0}' 而不是 '{1}'。", "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481": "無法初始化區塊範圍宣告 '{1}' 之同一範圍中的外部範圍變數 '{0}'。", - "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349": "無法叫用類型缺少呼叫簽章的運算式。類型 '{0}' 不含相容的呼叫簽章。", "Cannot_invoke_an_object_which_is_possibly_null_2721": "無法叫用可能為 'null' 的物件。", "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723": "無法叫用可能為 'null' 或 'undefined' 的物件。", "Cannot_invoke_an_object_which_is_possibly_undefined_2722": "無法叫用可能為 'undefined' 的物件。", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765": "因為值的迭代器 'next' 方法需要類型 '{1}',但陣列解構永遠會傳送 '{0}',所以無法逐一查看值。", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764": "因為值的迭代器 'next' 方法需要類型 '{1}',但陣列擴張永遠會傳送 '{0}',所以無法逐一查看值。", + "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763": "因為值的迭代器 'next' 方法需要類型 '{1}',但 for-of 永遠會傳送 '{0}',所以無法逐一查看值。", "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308": "因為專案 '{0}' 未設定 'outFile',所以無法於其前面加上任何內容", - "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205": "如有提供 '--isolatedModules' 旗標,即無法重新匯出類型。", "Cannot_read_file_0_Colon_1_5012": "無法讀取檔案 '{0}': {1}。", "Cannot_redeclare_block_scoped_variable_0_2451": "無法重新宣告區塊範圍變數 '{0}'。", "Cannot_redeclare_exported_variable_0_2323": "無法重新宣告匯出的變數 '{0}'。", "Cannot_redeclare_identifier_0_in_catch_clause_2492": "無法在 Catch 子句中重新宣告識別碼 '{0}'。", + "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "因為讀取檔案 '{1}' 時發生錯誤,所以無法更新專案 '{0}' 的輸出", "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "除非有提供 '--jsx' 旗標,否則無法使用 JSX。", "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "當 '--module' 為 'none' 時,無法使用匯入、匯出或模組增強指定。", "Cannot_use_namespace_0_as_a_type_2709": "不得使用命名空間 '{0}' 作為類型。", "Cannot_use_namespace_0_as_a_value_2708": "不得使用命名空間 '{0}' 作為值。", - "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351": "類型缺少呼叫或建構簽章的運算式,不得與 'new' 一起使用。", + "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377": "因為檔案 '{0}' 會覆寫所參考專案 '{1}' 產生的 '.tsbuildinfo' 檔案,所以無法寫入該檔案", "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056": "無法寫入檔案 '{0}',原因是其會由多個輸入檔覆寫。", "Cannot_write_file_0_because_it_would_overwrite_input_file_5055": "無法寫入檔案 '{0}',原因是其會覆寫輸入檔。", "Catch_clause_variable_cannot_have_a_type_annotation_1196": "Catch 子句變數不得有類型註釋。", @@ -256,9 +316,9 @@ "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104": "檢查 '{0}' 是否為 '{1}' - '{2}' 的最長相符前置詞。", "Circular_definition_of_import_alias_0_2303": "匯入別名 '{0}' 的循環定義。", "Circularity_detected_while_resolving_configuration_Colon_0_18000": "解析組態時偵測到循環性: {0}", + "Circularity_originates_in_type_at_this_location_2751": "循環源於此位置的類型。", "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426": "類別 '{0}' 已定義執行個體成員存取子 '{1}',但是擴充類別 '{2}' 卻將其定義為執行個體成員函式。", "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423": "類別 '{0}' 已定義執行個體成員函式 '{1}',但是擴充類別 '{2}' 卻將其定義為執行個體成員存取子。", - "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424": "類別 '{0}' 已定義執行個體成員函式 '{1}',但是擴充類別 '{2}' 卻將其定義為執行個體成員屬性。", "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425": "類別 '{0}' 已定義執行個體成員屬性 '{1}',但是擴充類別 '{2}' 卻將其定義為執行個體成員函式。", "Class_0_incorrectly_extends_base_class_1_2415": "類別 '{0}' 不正確地擴充基底類別 '{1}'。", "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "類別 '{0}' 不當實作類別 '{1}'。您是否要擴充 '{1}',並繼承其成員以成為子類別?", @@ -270,39 +330,63 @@ "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "類別靜態端 '{0}' 不正確地擴充基底類別靜態端 '{1}'。", "Classes_can_only_extend_a_single_class_1174": "類別只能擴充一個類別。", "Classes_containing_abstract_methods_must_be_marked_abstract_2514": "包含抽象方法的類別必須標記為抽象。", + "Classes_may_not_have_a_field_named_constructor_18006": "類別不能具有名為 'constructor' 的欄位。", "Command_line_Options_6171": "命令列選項", "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020": "當路徑為專案組態檔或為 'tsconfig.json' 所在的資料夾時編譯專案。", "Compiler_option_0_expects_an_argument_6044": "編譯器選項 '{0}' 必須要有一個引數。", "Compiler_option_0_requires_a_value_of_type_1_5024": "編譯器選項 '{0}' 需要類型 {1} 的值。", + "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "在下層發出私人識別碼時,編譯器會保留名稱 '{0}'。", "Composite_projects_may_not_disable_declaration_emit_6304": "複合式專案可能未停用宣告發出。", + "Composite_projects_may_not_disable_incremental_compilation_6379": "複合專案可能不會停用累加編譯。", "Computed_property_names_are_not_allowed_in_enums_1164": "列舉中不能有計算的屬性名稱。", "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553": "具有字串值成員的列舉中不允許計算值。", "Concatenate_and_emit_output_to_single_file_6001": "串連並發出輸出至單一檔案。", "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090": "在 '{1}' 和 '{2}' 找到衝突的 '{0}' 定義。請考慮安裝此程式庫的特定版本以解決衝突。", + "Conflicts_are_in_this_file_6201": "此檔案中有衝突。", + "Construct_signature_return_types_0_and_1_are_incompatible_2203": "建構簽章傳回型別 '{0}' 與 '{1}' 不相容。", "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013": "缺少傳回型別註解的建構簽章,隱含有 'any' 傳回型別。", + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205": "無引數建構簽章的傳回型別 '{0}' 與 '{1}' 不相容。", "Constructor_implementation_is_missing_2390": "缺少建構函式實作。", "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673": "類別 '{0}' 的建構函式為私用,並且只能在類別宣告內存取。", "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "類別 '{0}' 的建構函式受到保護,並且只能在類別宣告內存取。", "Constructors_for_derived_classes_must_contain_a_super_call_2377": "衍生類別的建構函式必須包含 'super' 呼叫。", "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "未指定包含檔案,因此無法決定根目錄,而將略過 'node_modules' 中的查閱。", + "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352": "將類型 '{0}' 轉換為類型 '{1}' 可能會發生錯誤,原因是這兩個類型彼此並未充分重疊。如果是故意轉換的,請先將運算式轉換為 'unknown'。", "Convert_0_to_mapped_object_type_95055": "將 '{0}' 轉換為對應的物件類型", "Convert_all_constructor_functions_to_classes_95045": "將所有建構函式轉換為類別", + "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374": "將所有未作為值使用的匯入轉換為僅限類型的匯入", + "Convert_all_re_exported_types_to_type_only_exports_1365": "將所有重新匯出的類型轉換為僅限類型的匯出", "Convert_all_require_to_import_95048": "將所有 'require' 轉換至 'import'", + "Convert_all_to_async_functions_95066": "全部轉換為非同步函式", + "Convert_all_to_bigint_numeric_literals_95092": "全部轉換為 Bigint 數字常值", "Convert_all_to_default_imports_95035": "全部轉換為預設匯入", + "Convert_const_to_let_95093": "將 'const' 轉換為 'let'", + "Convert_default_export_to_named_export_95061": "將預設匯出轉換為具名匯出", "Convert_function_0_to_class_95002": "將函式 '{0}' 轉換為類別", "Convert_function_to_an_ES2015_class_95001": "將函式轉換為 ES2015 類別", + "Convert_invalid_character_to_its_html_entity_code_95100": "將無效字元轉換為其 HTML 實體代碼", + "Convert_named_export_to_default_export_95062": "將具名匯出轉換為預設匯出", "Convert_named_imports_to_namespace_import_95057": "將具名匯入轉換為命名空間匯入", "Convert_namespace_import_to_named_imports_95056": "將命名空間匯入轉換為具名匯入", + "Convert_parameters_to_destructured_object_95075": "將參數轉換為解構的物件", "Convert_require_to_import_95047": "將 'require' 轉換至 'import'", "Convert_to_ES6_module_95017": "轉換為 ES6 模組", + "Convert_to_a_bigint_numeric_literal_95091": "轉換為 Bigint 數字常值", + "Convert_to_async_function_95065": "轉換為非同步函式", "Convert_to_default_import_95013": "轉換為預設匯入", + "Convert_to_template_string_95096": "轉換為範本字串", + "Convert_to_type_only_export_1364": "轉換為僅限類型的匯出", + "Convert_to_type_only_import_1373": "轉換為僅限類型的匯入", "Corrupted_locale_file_0_6051": "地區設定檔 {0} 已損毀。", "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016": "找不到模組 '{0}' 的宣告檔案。'{1}' 隱含具有 'any' 類型。", "Could_not_write_file_0_Colon_1_5033": "無法編寫檔案 '{0}': {1}。", "DIRECTORY_6038": "目錄", + "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005": "此檔案的宣告發出必須使用私人名稱 '{0}'。明確的型別註解可能會解除封鎖宣告發出。", + "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006": "此檔案的宣告發出必須使用來自模組 '{1}' 的私人名稱 '{0}'。明確的型別註解可能會解除封鎖宣告發出。", "Declaration_expected_1146": "必須是宣告。", "Declaration_name_conflicts_with_built_in_global_identifier_0_2397": "宣告名稱與內建全域識別碼 '{0}' 衝突。", "Declaration_or_statement_expected_1128": "必須是宣告或陳述式。", + "Declare_a_private_field_named_0_90053": "宣告名為 '{0}' 的私人欄位。", "Declare_method_0_90023": "宣告方法 '{0}'", "Declare_property_0_90016": "宣告屬性 '{0}'", "Declare_static_method_0_90024": "宣告靜態方法 '{0}'", @@ -310,16 +394,27 @@ "Decorators_are_not_valid_here_1206": "裝飾項目在此處無效。", "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "無法將裝飾項目套用至多個同名的 get/set 存取子。", "Default_export_of_the_module_has_or_is_using_private_name_0_4082": "模組的預設匯出具有或正在使用私用名稱 '{0}'。", + "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258": "明確的指派判斷提示只可搭配型別註解使用。", + "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "下列識別碼的定義與其他檔案中的定義衝突: {0}", "Delete_all_unused_declarations_95024": "刪除所有未使用的宣告", "Delete_the_outputs_of_all_projects_6365": "刪除所有專案的輸出", "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[即將淘汰] 請改用 '--jsxFactory'。當目標為 'react' JSX 發出時,為 createElement 指定所叫用的物件", "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[即將淘汰] 請改用 '--outFile'。 串連輸出並將其發出到單一檔案", "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[即將淘汰] 請改用 '--skipLibCheck'。跳過預設程式庫宣告檔案的類型檢查。", + "Did_you_forget_to_use_await_2773": "忘了要使用 'await' 嗎?", + "Did_you_mean_0_1369": "您指 '{0}' 嗎?", + "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735": "您是要將 '{0}' 限制為類型 'new (...args: any[]) => {1}' 嗎?", + "Did_you_mean_to_call_this_expression_6212": "您是要呼叫此運算式嗎?", + "Did_you_mean_to_mark_this_function_as_async_1356": "您是要將此函式標記為 'async' 嗎?", + "Did_you_mean_to_parenthesize_this_function_type_1360": "您是要為此函式類型加上括號?", + "Did_you_mean_to_use_new_with_this_expression_6213": "您是要對此運算式使用 'new' 嗎?", "Digit_expected_1124": "必須是數字。", "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148": "目錄 '{0}' 不存在,將會跳過其中所有查閱。", "Disable_checking_for_this_file_90018": "停用此檔案的檢查", "Disable_size_limitations_on_JavaScript_projects_6162": "停用 JavaScript 專案的大小限制。", + "Disable_solution_searching_for_this_project_6224": "停用此專案的解決方案搜尋。", "Disable_strict_checking_of_generic_signatures_in_function_types_6185": "停用函式類型中一般簽章的 Strict 檢查。", + "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221": "停用來源檔案,而非所參考專案中的宣告檔案。", "Disallow_inconsistently_cased_references_to_the_same_file_6078": "不允許相同檔案大小寫不一致的參考。", "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159": "不要在編譯後的檔案清單中新增三道斜線的參考或匯入的模組。", "Do_not_emit_comments_to_output_6009": "請勿將註解發出到輸出。", @@ -334,7 +429,6 @@ "Do_not_report_errors_on_unused_labels_6074": "請勿回報未使用之標籤的錯誤。", "Do_not_resolve_the_real_path_of_symlinks_6013": "請勿解析符號連結的真實路徑。", "Do_not_truncate_error_messages_6165": "不要截斷錯誤訊息。", - "Duplicate_declaration_0_2718": "重複宣告 '{0}'。", "Duplicate_function_implementation_2393": "函式實作重複。", "Duplicate_identifier_0_2300": "識別碼 '{0}' 重複。", "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441": "識別碼 '{0}' 重複。編譯器會將名稱 '{1}' 保留在模組的最上層範圍中。", @@ -346,21 +440,31 @@ "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399": "識別碼 '_this' 重複。編譯器會使用變數宣告 '_this' 來擷取 'this' 參考。", "Duplicate_label_0_1114": "標籤 '{0}' 重複。", "Duplicate_number_index_signature_2375": "數字索引簽章重複。", + "Duplicate_property_0_2718": "屬性 '{0}' 重複。", "Duplicate_string_index_signature_2374": "字串索引簽章重複。", "Dynamic_import_cannot_have_type_arguments_1326": "動態匯入不能有型別引數", - "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "只有當 '--module' 旗標是 'commonjs' 或 'esNext' 時,才支援動態匯入。", "Dynamic_import_must_have_one_specifier_as_an_argument_1324": "動態匯入必須有一個指定名稱作為引數。", "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "動態匯入的指定名稱必須屬於類型 'string',但這裡的類型為 '{0}'。", + "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323": "只有在 '--module' 旗標設定為 'es2020'、'esnext'、'commonjs'、'amd'、'system' 或 'umd' 時,才支援動態匯入。", + "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "等位型別 '{0}' 的每個成員都有建構簽章,但這些簽章都互不相容。", + "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "等位型別 '{0}' 的每個成員都有簽章,但這些簽章都互不相容。", + "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053": "因為 '{0}' 類型的運算式無法用於索引類型 '{1}',所以項目隱含 'any' 類型。", "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "因為索引運算式不屬於類型 'number',所以元素具有隱含 'any' 類型。", "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017": "元素隱含地擁有 'any' 類型,因為類型 '{0}' 不具索引簽章。", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052": "因為類型 '{0}' 沒有索引簽章,所以項目隱含 'any' 類型。您是要呼叫 '{1}' 嗎?", "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164": "在輸出檔的開頭發出 UTF-8 位元組順序標記 (BOM)。", "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151": "發出單一檔案包含來源對應,而不要使用個別的檔案。", + "Emit_class_fields_with_Define_instead_of_Set_6222": "使用 Define 而非 Set 發出類別欄位。", "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "使用單一檔案發出來源與來源對應。必須設定 '--inlineSourceMap' 或 '--sourceMap'。", "Enable_all_strict_type_checking_options_6180": "啟用所有 Strict 類型檢查選項。", + "Enable_incremental_compilation_6378": "啟用累加編譯", "Enable_project_compilation_6302": "啟用專案編譯", + "Enable_strict_bind_call_and_apply_methods_on_functions_6214": "對函式啟用嚴格的 'bind'、'call' 及 'apply' 方法。", "Enable_strict_checking_of_function_types_6186": "啟用嚴格檢查函式類型。", "Enable_strict_checking_of_property_initialization_in_classes_6187": "啟用類別中屬性初始化的 strict 檢查。", "Enable_strict_null_checks_6113": "啟用嚴格 null 檢查。", + "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074": "在您的組態檔中啟用 'experimentalDecorators' 選項", + "Enable_the_jsx_flag_in_your_configuration_file_95088": "在您的組態檔中啟用 '--jsx' 旗標", "Enable_tracing_of_the_name_resolution_process_6085": "啟用名稱解析流程的追蹤。", "Enable_verbose_logging_6366": "啟用詳細資訊記錄", "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "透過為所有匯入建立命名空間物件,讓 CommonJS 和 ES 模組之間的產出有互通性。意指 'allowSyntheticDefaultImports'。", @@ -373,6 +477,7 @@ "Enum_member_expected_1132": "必須是列舉成員。", "Enum_member_must_have_initializer_1061": "列舉成員必須有初始設定式。", "Enum_name_cannot_be_0_2431": "列舉名稱不得為 '{0}'。", + "Enum_type_0_circularly_references_itself_2586": "列舉類型 '{0}' 會循環參考自身。", "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "列舉類型 '{0}' 有初始設定式非常值的成員。", "Examples_Colon_0_6026": "範例: {0}", "Excessive_stack_depth_comparing_types_0_and_1_2321": "比較類型 '{0}' 與 '{1}' 的堆疊深度過深。", @@ -385,9 +490,9 @@ "Expected_at_least_0_arguments_but_got_1_or_more_2557": "應有至少 {0} 個引數,但得到 {1} 個或更多。", "Expected_corresponding_JSX_closing_tag_for_0_17002": "'{0}' 需要對應的 JSX 結尾標記。", "Expected_corresponding_closing_tag_for_JSX_fragment_17015": "JSX 片段必須有對應的結尾標記。", - "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105": "在 'package.json' 中 '{0}' 欄位的類型必須為 'string',但得到 '{1}'。", + "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105": "在 'package.json' 中 '{0}' 欄位的類型必須為 '{1}',但取得 '{2}'。", "Experimental_Options_6177": "實驗性選項", - "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "裝飾項目的實驗性支援這項功能可能在未來版本中變更。設定 'experimentalDecorators' 選項可移除此警告。", + "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "裝飾項目的實驗性支援是未來版本中可能會變更的功能。在 'tsconfig' 或 'jsconfig' 中設定 'experimentalDecorators' 選項可移除此警告。", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "明確指定的模組解析種類: '{0}'。", "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "當目標為 ECMAScript 模組時,無法使用匯出指派。請考慮改用 'export default' 或其他模組格式。", "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "當 '--module' 旗標為 'system' 時,不支援匯出指派。", @@ -402,6 +507,7 @@ "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "模組增強指定中不允許匯出及匯出指派。", "Expression_expected_1109": "必須是運算式。", "Expression_or_comma_expected_1137": "必須是運算式或逗號。", + "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590": "運算式產生的等位型別過於複雜而無法表示。", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "運算式會解析成 '_super',而編譯器會使用其來擷取基底類別參考。", "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521": "運算式會解析成變數宣告 '{0}',而編譯器會使用此宣告支援非同步函式。", "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544": "運算式將解析成變數宣告 '_newTarget',而供編譯器用來擷取 'new.target' 中繼屬性參考。", @@ -411,16 +517,21 @@ "Extract_to_0_in_1_95004": "擷取至 {1} 中的 {0}", "Extract_to_0_in_1_scope_95008": "擷取至 {1} 範圍中的 {0}", "Extract_to_0_in_enclosing_scope_95007": "擷取至封閉式範圍中的 {0}", + "Extract_to_interface_95090": "擷取至介面", + "Extract_to_type_alias_95078": "擷取至類型別名", + "Extract_to_typedef_95079": "擷取至 typedef", + "Extract_type_95077": "擷取類型", "FILE_6035": "檔案", "FILE_OR_DIRECTORY_6040": "檔案或目錄", "Failed_to_parse_file_0_Colon_1_5014": "無法剖析檔案 '{0}': {1}。", "Fallthrough_case_in_switch_7029": "參數中的 fallthrough 案例。", "File_0_does_not_exist_6096": "檔案 '{0}' 不存在。", "File_0_exist_use_it_as_a_name_resolution_result_6097": "檔案 '{0}' 存在 - 將其作為名稱解析結果使用。", + "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054": "不支援檔案 '{0}' 的副檔名。支援的副檔名只有 {1}。", "File_0_has_an_unsupported_extension_so_skipping_it_6081": "因為不支援檔案 '{0}' 的副檔名,所以將其跳過。", - "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054": "檔案 '{0}' 的附檔名不受支援。僅支援副檔名 {1}。", + "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504": "檔案 '{0}' 為 JavaScript 檔案。您是要啟用 'allowJs' 選項嗎?", "File_0_is_not_a_module_2306": "檔案 '{0}' 不是模組。", - "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307": "檔案 '{0}' 不在專案檔案清單內。專案必須列出所有檔案,或使用 'include' 模式。", + "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307": "檔案 '{0}' 未列於專案 '{1}' 的檔案清單內。專案必須列出所有檔案,或使用 'include' 模式。", "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059": "檔案 '{0}' 不在 'rootDir' '{1}' 之下。'rootDir' 必須包含所有原始程式檔。", "File_0_not_found_6053": "找不到檔案 '{0}'。", "File_change_detected_Starting_incremental_compilation_6032": "偵測到檔案變更。正在啟動累加編譯...", @@ -430,10 +541,12 @@ "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065": "檔案規格不得包含出現在遞迴目錄萬用字元 ('**') 之後的父目錄 ('..'): '{0}'。", "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010": "檔案規格不能以遞迴目錄萬用字元 ('**') 結尾: '{0}'。", "Fix_all_detected_spelling_errors_95026": "修正偵測到的所有拼字錯誤", + "Fix_all_expressions_possibly_missing_await_95085": "修正所有可能缺少 'await' 的運算式", + "Found_0_errors_6217": "找到 {0} 個錯誤。", "Found_0_errors_Watching_for_file_changes_6194": "找到 {0} 個錯誤。正在監看檔案變更。", + "Found_1_error_6216": "找到 1 個錯誤。", "Found_1_error_Watching_for_file_changes_6193": "找到 1 個錯誤。正在監看檔案變更。", "Found_package_json_at_0_6099": "在 '{0}' 找到 'package.json'。", - "Found_package_json_at_0_Package_ID_is_1_6190": "於 '{0}' 找到 'package.json'。套件識別碼為 '{1}'。", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "以 'ES3' 或 'ES5' 為目標時,strict 模式下的區塊中不允許函式宣告。", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "以 'ES3' 或 'ES5' 為目標時,strict 模式下的區塊中不允許函式宣告。類別定義會自動進入 strict 模式。", "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252": "以 'ES3' 或 'ES5' 為目標時,strict 模式下的區塊中不允許函式宣告。模組會自動進入 strict 模式。", @@ -444,39 +557,45 @@ "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "函式缺少結束 return 陳述式,且傳回類型不包括 'undefined'。", "Function_overload_must_be_static_2387": "函式多載必須為靜態。", "Function_overload_must_not_be_static_2388": "函式多載不可為靜態。", + "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014": "缺少傳回型別註解的函式類型隱含 '{0}' 傳回型別。", "Generate_get_and_set_accessors_95046": "產生 'get' 與 'set' 存取子", + "Generates_a_CPU_profile_6223": "產生 CPU 設定檔。", "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000": "為每個相對應的 '.d.ts' 檔案產生 sourcemap。", "Generates_corresponding_d_ts_file_6002": "產生對應的 '.d.ts' 檔案。", "Generates_corresponding_map_file_6043": "產生對應的 '.map' 檔案。", - "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025": "產生器因為沒有產生任何值,所以隱含有類型 '{0}'。請考慮提供傳回型別。", + "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025": "因為產生器未產生任何值,所以其隱含產生類型 '{0}'。請考慮提供傳回型別註解。", "Generators_are_not_allowed_in_an_ambient_context_1221": "環境內容中不允許產生器。", "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "只有在目標為 ECMAScript 2015 或更高版本時,才可使用產生器。", "Generic_type_0_requires_1_type_argument_s_2314": "泛型類型 '{0}' 需要 {1} 個型別引數。", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "泛型型別 '{0}' 需要介於 {1} 和 {2} 之間的型別引數。", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "泛型類型具現化的深度過深,而且可能是無限深。", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "getter 和 setter 存取子的可見度不符。", "Global_module_exports_may_only_appear_at_top_level_1316": "全域模組匯出只能顯示在最上層。", "Global_module_exports_may_only_appear_in_declaration_files_1315": "全域模組匯出只能顯示在宣告檔案中。", "Global_module_exports_may_only_appear_in_module_files_1314": "全域模組匯出只能顯示在模組檔案中。", "Global_type_0_must_be_a_class_or_interface_type_2316": "全域類型 '{0}' 必須是類別或介面類型。", "Global_type_0_must_have_1_type_parameter_s_2317": "全域類型 '{0}' 必須要有 {1} 個型別參數。", + "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384": "於 '--incremental' 與 '--watch' 中重新編譯時,會假設檔案中的變更只會影響直接相依於重新編譯的檔案。", "Hexadecimal_digit_expected_1125": "必須適十六進位數字。", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212": "必須是識別碼。'{0}' 在 strict 模式中為保留字。", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213": "必須是識別碼。'{0}' 是 strict 模式中的保留字。類別定義會自動採用 strict 模式。", "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214": "需要識別碼。'{0}' 是 strict 模式中的保留字。模組會自動採用 strict 模式。", + "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359": "必須為識別碼。'{0}' 為保留字,此處不可使用。", "Identifier_expected_1003": "必須是識別碼。", "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216": "必須有識別碼。'__esModule' 已保留為轉換 ECMAScript 模組時匯出的標記。", + "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "如果 '{0}' 套件的確公開了此模組,請考慮傳送提取要求以修改 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`", "Ignore_this_error_message_90019": "略過此錯誤訊息", "Implement_all_inherited_abstract_classes_95040": "實作所有繼承的抽象類別", "Implement_all_unimplemented_interfaces_95032": "實作所有未實作的介面", "Implement_inherited_abstract_class_90007": "實作已繼承的抽象類別", "Implement_interface_0_90006": "實作介面 '{0}'", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "匯出類別 '{0}' 的 Implements 子句具有或使用私用名稱 '{1}'。", + "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "在執行階段中無法將 'symbol' 隱含轉換為 'string'。請考慮將此運算式包裝在 'String(...)' 中。", "Import_0_from_module_1_90013": "從模組 \"{1}\" 匯入 '{0}'", "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "當目標為 ECMAScript 模組時,無法使用匯入指派。請考慮改用 'import * as ns from \"mod\"'、'import {a} from \"mod\"'、'import d from \"mod\"' 或其他模組格式。", "Import_declaration_0_is_using_private_name_1_4000": "匯入宣告 '{0}' 使用私用名稱 '{1}'。", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "匯入宣告與 '{0}' 的區域宣告衝突。", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "命名空間中的匯入宣告不得參考模組。", + "Import_default_0_from_module_1_90032": "從模組 \"{1}\" 匯入預設 '{0}'", "Import_emit_helpers_from_tslib_6139": "從 'tslib' 匯入發出協助程式。", "Import_may_be_converted_to_a_default_import_80003": "匯入可轉換成預設匯入。", "Import_name_cannot_be_0_2438": "匯入名稱不得為 '{0}'。", @@ -484,7 +603,6 @@ "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667": "模組增強指定中不允許匯入。請考慮將其移至封入外部模組。", "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066": "在環境列舉宣告中,成員初始設定式必須是常數運算式。", "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432": "在具有多個宣告的列舉中,只有一個宣告可以在其第一個列舉項目中省略初始設定式。", - "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474": "在 'const' 列舉宣告中,成員初始設定式必須是常數運算式。", "Include_modules_imported_with_json_extension_6197": "包含匯入有 '.json' 延伸模組的模組", "Index_signature_in_type_0_only_permits_reading_2542": "類型 '{0}' 中的索引簽章只允許讀取。", "Index_signature_is_missing_in_type_0_2329": "類型 '{0}' 中遺漏索引簽章。", @@ -492,6 +610,7 @@ "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395": "合併宣告 '{0}' 中的個別宣告必須全部匯出或全在本機上。", "Infer_all_types_from_usage_95023": "從用法推斷所有類型", "Infer_parameter_types_from_usage_95012": "從使用方式推斷參數類型", + "Infer_this_type_of_0_from_usage_95080": "從使用方式推斷 '{0}' 的 'this' 類型", "Infer_type_of_0_from_usage_95011": "從使用方式推斷 '{0}' 的類型", "Initialize_property_0_in_the_constructor_90020": "將建構函式中的屬性 '{0}' 初始化", "Initialize_static_property_0_90021": "將靜態屬性 '{0}' 初始化", @@ -521,6 +640,7 @@ "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028": "JSDoc '...' 只能出現在特徵標記的最後一個參數中。", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024": "JSDoc '@param' 標記的名稱為 '{0}',但沒有為該名稱的參數。", "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029": "JSDoc '@param' 標籤的名稱為 '{0}',但沒有任何參數使用該名稱。如有陣列類型,則會與 'arguments' 相符。", + "JSDoc_type_0_circularly_references_itself_2587": "JSDoc 類型 '{0}' 會循環參考自身。", "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "JSDoc '@typedef' 標記應具有類型註解,或者其後接著 '@property' 或 '@member' 標記。", "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "JSDoc 類型只能在文件註解中使用。", "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "JSDoc 類型可移為 TypeScript 類型。", @@ -534,6 +654,7 @@ "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604": "JSX 項目類型 '{0}' 沒有任何建構或呼叫簽章。", "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605": "JSX 項目類型 '{0}' 不是 JSX 項目的建構函式。", "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "JSX 項目不得有多個同名的屬性。", + "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007": "JSX 運算式不可使用逗號運算子。您是要寫入陣列嗎?", "JSX_expressions_must_have_one_parent_element_2657": "JSX 運算式必須具有一個父元素。", "JSX_fragment_has_no_corresponding_closing_tag_17014": "JSX 片段沒有對應的結尾標記。", "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "使用內嵌 JSX 處理站 pragma 時,不支援 JSX 片段", @@ -541,6 +662,7 @@ "JSX_spread_child_must_be_an_array_type_2609": "JSX 擴張子系必須為陣列類型。", "Jump_target_cannot_cross_function_boundary_1107": "跳躍目標不得跨越函式界限。", "KIND_6034": "類型", + "Keywords_cannot_contain_escape_characters_1260": "關鍵字不可包含逸出字元。", "LOCATION_6037": "位置", "Language_service_is_disabled_9004": "已停用語言服務。", "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695": "逗號運算子左側未使用,而且沒有任何不良影響。", @@ -559,6 +681,7 @@ "Make_super_call_the_first_statement_in_the_constructor_90002": "使 'super()' 呼叫成為建構函式中的第一個陳述式", "Mapped_object_type_implicitly_has_an_any_template_type_7039": "對應的物件類型隱含具有 'any' 範本類型。", "Member_0_implicitly_has_an_1_type_7008": "成員 '{0}' 隱含了 '{1}' 類型。", + "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "成員 '{0}' 隱含 '{1}' 類型,但可從使用方式推斷更適合的類型。", "Merge_conflict_marker_encountered_1185": "偵測到合併衝突標記。", "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652": "合併宣告 '{0}' 不得包含預設匯出宣告。請考慮改為加入獨立型 'export default {0}' 宣告。", "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013": "只有函式宣告、函式運算式或建構函式的主體中允許中繼屬性 '{0}'。", @@ -566,22 +689,28 @@ "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101": "匯出介面的方法 '{0}' 具有或使用私用模組 '{2}' 的名稱 '{1}'。", "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102": "匯出介面的方法 '{0}' 具有或使用私用名稱 '{1}'。", "Modifiers_cannot_appear_here_1184": "此處不得出現修飾元。", - "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340": "模組 '{0}' 未參考任何類型,但在此用為類型。", + "Module_0_can_only_be_default_imported_using_the_1_flag_1259": "模組 '{0}' 只能依預設使用 '{1}' 旗標匯入", + "Module_0_declares_1_locally_but_it_is_exported_as_2_2460": "模組 '{0}' 區域性地宣告 '{1}',但卻將該模組匯出為 '{2}'。", + "Module_0_declares_1_locally_but_it_is_not_exported_2459": "模組 '{0}' 區域性地宣告 '{1}',但並未匯出該模組。", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340": "模組 '{0}' 不是類型,但在此處卻作為類型使用。您是指 'typeof import('{0}')' 嗎?", "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339": "模組 '{0}' 未參考任何值,但在此用為值。", "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308": "模組 {0} 已匯出名為 '{1}' 的成員。請考慮明確重新匯出項目以解決模稜兩可的情形。", "Module_0_has_no_default_export_1192": "模組 '{0}' 沒有預設匯出。", + "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613": "模組 '{0}' 沒有預設匯出。您是要改用 'import { {1} } from {0}' 嗎?", "Module_0_has_no_exported_member_1_2305": "模組 '{0}' 沒有匯出的成員 '{1}'。", "Module_0_has_no_exported_member_1_Did_you_mean_2_2724": "模組 '{0}' 沒有任何匯出的成員 '{1}'。您是否指的是 '{2}'?", + "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614": "模組 '{0}' 沒有匯出的成員 '{1}'。您是要改用 'import {1} from {0}' 嗎?", "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437": "同名的區域宣告隱藏了模組 '{0}'。", - "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497": "模組 '{0}' 會解析成非模組實體,且不可使用這個建構加以匯入。", "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498": "模組 '{0}' 使用 'export =',因而無法以 'export *' 的方式使用。", "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145": "此檔案未修改,因此模組 '{0}' 已解析為在 '{1}' 中所宣告的環境模組。", "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144": "模組 '{0}' 在檔案 '{1}' 中已解析為本機宣告的環境模組。", "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142": "模組 '{0}' 已解析為 '{1}',但未設定 '--jsx'。", + "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042": "模組 '{0}' 已解析為 '{1}',但未使用 '--resolveJsonModule'。", "Module_Resolution_Options_6174": "模組解析選項", "Module_name_0_matched_pattern_1_6092": "模組名稱 '{0}',符合的模式 '{1}'。", "Module_name_0_was_not_resolved_6090": "======== 模組名稱 '{0}' 未解析。========", "Module_name_0_was_successfully_resolved_to_1_6089": "======== 模組名稱 '{0}' 已成功解析為 '{1}'。========", + "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218": "======== 模組名稱 '{0}' 已成功解析為 '{1}',套件識別碼為 '{2}'。========", "Module_resolution_kind_is_not_specified_using_0_6088": "未指定模組解析種類,將使用 '{0}'。", "Module_resolution_using_rootDirs_has_failed_6111": "使用 'rootDirs' 解析模組失敗。", "Move_to_a_new_file_95049": "移至新檔", @@ -591,11 +720,23 @@ "Named_property_0_of_types_1_and_2_are_not_identical_2319": "類型 '{1}' 及 '{2}' 的具名屬性 '{0}' 不一致。", "Namespace_0_has_no_exported_member_1_2694": "命名空間 '{0}' 沒有匯出的成員 '{1}'。", "No_base_constructor_has_the_specified_number_of_type_arguments_2508": "沒有任何基底建構函式具有指定的類型引數數量。", + "No_constituent_of_type_0_is_callable_2755": "無法呼叫 '{0}' 類型的任何構件。", + "No_constituent_of_type_0_is_constructable_2759": "無法建構 '{0}' 類型的任何構件。", + "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054": "在類型 '{1}' 中找不到任何具有 '{0}' 類型之參數的索引簽章。", "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "在設定檔 '{0}' 中找不到任何輸入。指定的 'include' 路徑為 '{1}','exclude' 路徑為 '{2}'。", + "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575": "沒有任何多載需要 {0} 引數,但有多載需要 {1} 或 {2} 引數。", + "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743": "沒有任何多載需要 {0} 類型引數,但有多載需要 {1} 或 {2} 類型引數。", + "No_overload_matches_this_call_2769": "沒有任何多載符合此呼叫。", + "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004": "速記屬性 '{0}' 的範圍中不存在任何值。請宣告一個值或提供初始設定式。", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "非抽象類別 '{0}' 未實作從類別 '{2}' 繼承而來的抽象成員 '{1}'。", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "非抽象類別運算式未實作從類別 '{1}' 繼承而來的抽象成員 '{0}'。", + "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013": "非 Null 的判斷提示只可用於 TypeScript 檔案中。", + "Non_simple_parameter_declared_here_1348": "非簡易參數已宣告於此處。", "Not_all_code_paths_return_a_value_7030": "部分程式碼路徑並未傳回值。", + "Not_all_constituents_of_type_0_are_callable_2756": "'{0}' 類型的構件並非都可呼叫。", + "Not_all_constituents_of_type_0_are_constructable_2760": "'{0}' 類型的構件並非都可構建。", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "數值索引類型 '{0}' 不可指派給字串索引類型 '{1}'。", + "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008": "絕對值等於或大於 2^53 的數字常值過大,無法準確地表示為整數。", "Numeric_separators_are_not_allowed_here_6188": "這裡不允許數字分隔符號。", "Object_is_of_type_unknown_2571": "物件的類型為 '未知'。", "Object_is_possibly_null_2531": "物件可能為「null」。", @@ -609,6 +750,7 @@ "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018": "列舉成員初始設定式中不允許八進位常值。請使用語法 '{0}'。", "Octal_literals_are_not_allowed_in_strict_mode_1121": "strict 模式中不允許八進位常值。", "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085": "當目標為 ECMAScript 5 及更高版本時,不可使用八進位的常值。請使用語法 '{0}'。", + "Only_ECMAScript_imports_may_use_import_type_1370": "只有 ECMAScript 匯入可以使用 'import type'。", "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091": "'for...in' 陳述式中只可包含一個變數宣告。", "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188": "'for...of' 陳述式只能包含一個變數宣告。", "Only_a_void_function_can_be_called_with_the_new_keyword_2350": "只有 void 函式可以使用 'new' 關鍵字進行呼叫。", @@ -617,24 +759,28 @@ "Only_emit_d_ts_declaration_files_6014": "只發出 '.d.ts' 宣告檔案。", "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002": "類別 'extends' 子句中,目前只支援具有選擇性型別引數的識別碼/限定名稱。", "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340": "只有基底類別之公開且受保護的方法,才可透過 'super' 關鍵字存取。", + "Operator_0_cannot_be_applied_to_type_1_2736": "無法將運算子 '{0}' 套用至類型 '{1}'。", "Operator_0_cannot_be_applied_to_types_1_and_2_2365": "無法將運算子 '{0}' 套用至類型 '{1}' 和 '{2}'。", "Option_0_can_only_be_specified_in_tsconfig_json_file_6064": "只能在 'tsconfig.json' 檔案中指定選項 '{0}'。", "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "只有在已提供選項 '--inlineSourceMap' 或選項 '--sourceMap' 時,才可使用選項 '{0}'。", + "Option_0_cannot_be_specified_when_option_target_is_ES3_5048": "當選項 'target' 為 'ES3' 時,無法指定選項 '{0}'。", "Option_0_cannot_be_specified_with_option_1_5053": "不得同時指定選項 '{0}' 與選項 '{1}'。", "Option_0_cannot_be_specified_without_specifying_option_1_5052": "必須指定選項 '{1}' 才可指定選項 '{0}'。", "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "指定選項 '{0}' 時,必須指定選項 '{1}' 或選項 '{2}'。", "Option_0_should_have_array_of_strings_as_a_value_6103": "選項 '{0}' 應以字串陣列作為值。", "Option_build_must_be_the_first_command_line_argument_6369": "選項 '--build' 必須是第一個命令列引數。", + "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "只有在使用 tsconfig、發出至單一檔案,或指定選項 `--tsBuildInfoFile` 時,才可指定選項 '--incremental'。", "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "只有在提供選項 '--module' 或是 'target' 為 'ES2015' 或更高項目時,才可使用選項 'isolatedModules'。", "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "必須指定 '--baseUrl' 選項才能使用選項 'paths'。", "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "在命令列上,'project' 選項不得與原始程式檔並用。", + "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071": "只有在模組程式碼產生為 'commonjs'、'amd'、'es2015' 或 'esNext' 時,才可指定選項 '--resolveJsonModule'。", "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "指定選項 '-resolveJsonModule' 時,不可沒有 'node' 模組解析策略。", "Options_0_and_1_cannot_be_combined_6370": "無法合併選項 '{0}' 與 '{1}'。", "Options_Colon_6027": "選項:", "Output_directory_for_generated_declaration_files_6166": "所產生之宣告檔案的輸出目錄。", "Output_file_0_from_project_1_does_not_exist_6309": "沒有來自專案 '{1}' 的輸出檔 '{0}'", "Output_file_0_has_not_been_built_from_source_file_1_6305": "輸出檔 '{0}' 並非從原始程式檔 '{1}' 建置。", - "Overload_signature_is_not_compatible_with_function_implementation_2394": "多載簽章與函式實作不相容。", + "Overload_0_of_1_2_gave_the_following_error_2772": "{1} 的多載 {0},'{2}',發生下列錯誤。", "Overload_signatures_must_all_be_abstract_or_non_abstract_2512": "多載簽章必須全為抽象或非抽象。", "Overload_signatures_must_all_be_ambient_or_non_ambient_2384": "多載簽章都必須是環境或非環境簽章。", "Overload_signatures_must_all_be_exported_or_non_exported_2383": "多載簽章必須全部匯出或不匯出。", @@ -642,7 +788,11 @@ "Overload_signatures_must_all_be_public_private_or_protected_2385": "多載簽章必須是公用、私用或受保護。", "Parameter_0_cannot_be_referenced_in_its_initializer_2372": "無法在參數 '{0}' 的初始設定式中參考此參數。", "Parameter_0_implicitly_has_an_1_type_7006": "參數 '{0}' 隱含了 '{1}' 類型。", + "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044": "參數 '{0}' 隱含 '{1}' 類型,但可從使用方式推斷更適合的類型。", "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227": "參數 '{0}' 與參數 '{1}' 不在同一個位置。", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108": "存取子的參數 '{0}' 具有 (或正在使用) 來自外部模組 '{2}' 的名稱 '{1}',但無法予以命名。", + "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107": "存取子的參數 '{0}' 具有 (或正在使用) 來自私人模組 '{2}' 的名稱 '{1}'。", + "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106": "存取子的參數 '{0}' 具有 (或正在使用) 私人名稱 '{1}'。", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066": "匯出介面之呼叫簽章的參數 '{0}' 具有或使用私用模組 '{2}' 中的名稱 '{1}'。", "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067": "匯出介面之呼叫簽章的參數 '{0}' 具有或使用私用名稱 '{1}'。", "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061": "匯出類別中建構函式的參數 '{0}' 具有或使用外部模組 {2} 中的名稱 '{1}',但無法命名。", @@ -665,6 +815,8 @@ "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070": "匯出類別中公用靜態方法的參數 '{0}' 具有或使用私用名稱 '{1}'。", "Parameter_cannot_have_question_mark_and_initializer_1015": "參數不得有問號及初始設定式。", "Parameter_declaration_expected_1138": "必須是參數宣告。", + "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051": "參數具有名稱但沒有類型。您是指 '{0}: {1}' 嗎?", + "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012": "參數修飾元只可用於 TypeScript 檔案中。", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036": "匯出類別中公用 setter '{0}' 的參數類型具有或是正在使用私用模組 '{2}' 中的名稱 '{1}'。", "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037": "匯出類別中公用 setter '{0}' 的參數類型具有或正在使用私用名稱 '{1}'。", "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034": "匯出類別中公用靜態 setter '{0}' 的參數類型具有或正在使用私用模組 '{2}' 中的名稱 '{1}'。", @@ -672,15 +824,27 @@ "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141": "在 strict 模式中進行剖析,並為每個來源檔案發出 \"use strict\"。", "Pattern_0_can_have_at_most_one_Asterisk_character_5061": "模式 '{0}' 最多只可有一個 '*' 字元。", "Prefix_0_with_an_underscore_90025": "具有底線的前置詞 '{0}'", + "Prefix_all_incorrect_property_declarations_with_declare_95095": "在所有不正確屬性宣告的開頭放置 'declare'", "Prefix_all_unused_declarations_with_where_possible_95025": "若可行,為所有未使用的宣告加上前置詞 '_'", + "Prefix_with_declare_95094": "在開頭放置 'declare'", "Print_names_of_files_part_of_the_compilation_6155": "列印編譯時檔案部分的名稱。", + "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503": "列印屬於編譯一部分的檔案名稱,然後停止處理。", "Print_names_of_generated_files_part_of_the_compilation_6154": "列印編譯時所產生之檔案部分的名稱。", "Print_the_compiler_s_version_6019": "列印編譯器的版本。", + "Print_the_final_configuration_instead_of_building_1350": "列印而非建置最終組態。", "Print_this_message_6017": "列印這則訊息。", + "Private_identifiers_are_not_allowed_in_variable_declarations_18029": "變數宣告中不允許私人識別碼。", + "Private_identifiers_are_not_allowed_outside_class_bodies_18016": "不允許私人識別碼位於類別主體外。", + "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028": "只有當目標為 ECMAScript 2015 及更新版本時,才可使用私人識別碼。", + "Private_identifiers_cannot_be_used_as_parameters_18009": "私人識別碼不可用作參數", + "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105": "無法在型別參數上存取私人或受保護的成員 '{0}'。", "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "因為專案 '{0}' 的相依性 '{1}' 發生錯誤,所以無法建置該專案", + "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "因為未建置專案 '{0}' 的相依性 '{1}',所以無法建置該專案", "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "因為專案 '{0}' 的相依性 '{1}' 已過期,所以該專案已過期", "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "因為最舊的輸出 '{1}' 早於最新的輸入 '{2}',所以專案 '{0}' 已過期", "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "因為輸出檔案 '{1}' 不存在,所以專案 '{0}' 已過期", + "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "因為專案 '{0}' 的輸出使用版本 '{1}' 產生而成,與目前的版本 '{2}' 不同,所以該專案已過期", + "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "因為專案 '{0}' 的相依性 '{1}' 輸出已變更,所以該專案已過期", "Project_0_is_up_to_date_6361": "專案 '{0}' 為最新狀態", "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "因為最新的輸入 '{1}' 早於最舊的輸出 '{2}',所以專案 '{0}' 為最新狀態", "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "專案 '{0}' 為最新狀態,且有來自其相依性的 .d.ts 檔案", @@ -689,17 +853,23 @@ "Projects_to_reference_6300": "專案至參考", "Property_0_does_not_exist_on_const_enum_1_2479": "'const' 列舉 '{1}' 上並沒有屬性 '{0}'。", "Property_0_does_not_exist_on_type_1_2339": "類型 '{1}' 沒有屬性 '{0}'。", - "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570": "類型 '{1}' 不存在屬性 '{0}'。是否忘記要使用 'await'?", "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551": "類型 '{1}' 沒有屬性 '{0}'。您指的是 '{2}' 嗎?", "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546": "屬性 '{0}' 有衝突的宣告,在類型 '{1}' 中無法存取。", "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564": "屬性 '{0}' 沒有初始設定式,且未在建構函式中明確指派。", "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033": "因為屬性 '{0}' 的 get 存取子沒有傳回類型註釋,致使該屬性意味著類型 'any'。", "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032": "因為屬性 '{0}' 的 set 存取子沒有參數類型註釋,致使該屬性意味著類型 'any'。", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048": "屬性 '{0}' 隱含類型 'any',但可從使用方式推斷更適合其 get 存取子的類型。", + "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049": "屬性 '{0}' 隱含類型 'any',但可從使用方式推斷更適合其 set 存取子的類型。", "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416": "類型 '{1}' 中的屬性 '{0}' 無法指派給基底類型 '{2}' 中的相同屬性。", "Property_0_in_type_1_is_not_assignable_to_type_2_2603": "不得將類型 '{1}' 的屬性 '{0}' 指派給類型 '{2}'。", + "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015": "類型 '{1}' 中的屬性 '{0}' 是無法從類型 '{2}' 中存取的其他成員。", + "Property_0_is_a_static_member_of_type_1_2576": "屬性 '{0}' 為 '{1}' 類型的靜態成員", "Property_0_is_declared_but_its_value_is_never_read_6138": "屬性 '{0}' 已宣告但從未讀取其值。", "Property_0_is_incompatible_with_index_signature_2530": "屬性 '{0}' 和索引簽章不相容。", + "Property_0_is_incompatible_with_rest_element_type_2573": "屬性 '{0}' 與其餘項目類型不相容。", "Property_0_is_missing_in_type_1_2324": "類型 '{1}' 遺漏屬性 '{0}'。", + "Property_0_is_missing_in_type_1_but_required_in_type_2_2741": "類型 '{1}' 缺少屬性 '{0}',但類型 '{2}' 必須有該屬性。", + "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013": "因為屬性 '{0}' 具有私人識別碼,所以無法在類別 '{1}' 外存取該屬性。", "Property_0_is_optional_in_type_1_but_required_in_type_2_2327": "在類型 '{1}' 中,'{0}' 是選擇性屬性,但在類型 '{2}' 中則為必要屬性。", "Property_0_is_private_and_only_accessible_within_class_1_2341": "'{0}' 是私用屬性,只可從類別 '{1}' 中存取。", "Property_0_is_private_in_type_1_but_not_in_type_2_2325": "在類型 '{1}' 中,'{0}' 是私用屬性,但在類型 '{2}' 中不是。", @@ -708,12 +878,15 @@ "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443": "'{0}' 是受保護屬性,但類型 '{1}' 不是衍生自 '{2}' 的類別。", "Property_0_is_protected_in_type_1_but_public_in_type_2_2444": "在類型 '{1}' 中,'{0}' 是受保護屬性,但在類型 '{2}' 中是公用屬性。", "Property_0_is_used_before_being_assigned_2565": "屬性 '{0}' 已在指派之前使用。", + "Property_0_is_used_before_its_initialization_2729": "將屬性 '{0}' 初始化前已使用該屬性。", "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606": "JSX 擴張屬性 (Attribute) 的屬性 (Property) '{0}' 不可指派給目標屬性 (Property)。", "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094": "匯出之類別運算式的屬性 '{0}' 可能為私人或受保護。", "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032": "匯出介面的屬性 '{0}' 具有或使用私用模組 '{2}' 中的名稱 '{1}'。", "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "匯出介面的屬性 '{0}' 具有或使用私用名稱 '{1}'。", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "類型 '{1}' 的屬性 '{0}' 不可指派給數值索引類型 '{2}'。", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "類型 '{1}' 的屬性 '{0}' 不可指派給字串索引類型 '{2}'。", + "Property_0_was_also_declared_here_2733": "屬性 '{0}' 也已定義於此處。", + "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612": "屬性 '{0}' 將會覆寫 '{1}' 中的基底屬性。如果是故意覆寫的,請新增初始設定式。否則,請新增 'declare' 修飾元或移除多餘的宣告。", "Property_assignment_expected_1136": "必須是屬性指派。", "Property_destructuring_pattern_expected_1180": "必須是屬性解構模式。", "Property_or_signature_expected_1131": "必須是屬性或簽章。", @@ -731,20 +904,28 @@ "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026": "匯出類別的公用靜態屬性 '{0}' 具有或使用外部模組 {2} 中的名稱 '{1}',但無法命名。", "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027": "匯出類別的公用靜態屬性 '{0}' 具有或使用私用模組 '{2}' 中的名稱 '{1}'。", "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028": "匯出類別的公用靜態屬性 '{0}' 具有或使用私用名稱 '{1}'。", + "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032": "限定名稱 '{0}' 必須以 '@param {object} {1}' 開頭。", "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052": "當運算式及宣告包含隱含的 'any' 類型時顯示錯誤。", "Raise_error_on_this_expressions_with_an_implied_any_type_6115": "對具有隱含 'any' 類型的 'this' 運算式引發錯誤。", + "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205": "提供 '--isolatedModules' 旗標時,必須使用 'export type' 重新匯出類型。", "Redirect_output_structure_to_the_directory_6006": "將輸出結構重新導向至目錄。", "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "參考的專案 '{0}' 之設定 \"composite\" 必須為 true。", + "Remove_all_unnecessary_uses_of_await_95087": "移除所有不必要的 'await' 使用方式", "Remove_all_unreachable_code_95051": "移除所有無法連線的程式碼", "Remove_all_unused_labels_95054": "移除所有未使用的標籤", "Remove_braces_from_arrow_function_95060": "從箭號函式移除大括號", - "Remove_declaration_for_Colon_0_90004": "移除 '{0}' 的宣告", "Remove_destructuring_90009": "移除解構", "Remove_import_from_0_90005": "從 '{0}' 移除匯入", + "Remove_template_tag_90011": "移除範本標籤", + "Remove_type_parameters_90012": "移除型別參數", + "Remove_unnecessary_await_95086": "移除不必要的 'await'", "Remove_unreachable_code_95050": "移除無法連線的程式碼", + "Remove_unused_declaration_for_Colon_0_90004": "移除下列項目未使用的宣告: '{0}'", "Remove_unused_label_95053": "移除未使用的標籤", "Remove_variable_statement_90010": "移除變數陳述式", + "Replace_all_unused_infer_with_unknown_90031": "以 'unknown' 取代所有未使用的 'infer'", "Replace_import_with_0_95015": "以 '{0}' 取代匯入。", + "Replace_infer_0_with_unknown_90030": "以 'unknown' 取代 'infer {0}'", "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "當函式中的部分程式碼路徑並未傳回值時回報錯誤。", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "回報 switch 陳述式內 fallthrough 案例的錯誤。", "Report_errors_in_js_files_8019": "報告 .js 檔案中的錯誤。", @@ -764,7 +945,10 @@ "Resolving_using_primary_search_paths_6117": "正在使用主要搜尋路徑進行解析...", "Resolving_with_primary_search_path_0_6121": "正在解析主要搜尋路徑 '{0}'。", "Rest_parameter_0_implicitly_has_an_any_type_7019": "剩餘參數 '{0}' 隱含了 'any[]' 類型。", + "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047": "其餘參數 '{0}' 隱含 'any[]' 類型,但可從使用方式推斷更適合的類型。", + "Rest_signatures_are_incompatible_2572": "其餘簽章不相容。", "Rest_types_may_only_be_created_from_object_types_2700": "Rest 類型只能從物件類型建立。", + "Return_type_annotation_circularly_references_itself_2577": "傳回型別註解會循環參考自身。", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046": "匯出介面中呼叫簽章的傳回型別具有或使用私用模組 '{1}' 中的名稱 '{0}'。", "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047": "匯出介面中呼叫簽章的傳回型別具有或使用私用名稱 '{0}'。", "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044": "匯出介面中建構函式簽章的傳回型別具有或使用私用模組 '{1}' 中的名稱 '{0}'。", @@ -796,6 +980,8 @@ "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122": "無法判斷根目錄,將略過主要搜尋路徑。", "STRATEGY_6039": "策略", "Scoped_package_detected_looking_in_0_6182": "偵測到範圍套件,正於 '{0}' 尋找", + "Set_the_module_option_in_your_configuration_file_to_0_95099": "將組態檔中的 'module' 選項設定為 '{0}'", + "Set_the_target_option_in_your_configuration_file_to_0_95098": "將組態檔中的 'target' 選項設定為 '{0}'", "Setters_cannot_return_a_value_2408": "setter 無法傳回值。", "Show_all_compiler_options_6169": "顯示所有的編譯器選項。", "Show_diagnostic_information_6149": "顯示診斷資訊。", @@ -804,20 +990,27 @@ "Signature_0_must_be_a_type_predicate_1224": "簽章 '{0}' 必須是型別述詞。", "Skip_type_checking_of_declaration_files_6012": "跳過宣告檔案的類型檢查。", "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "因為專案 '{0}' 的相依性 '{1}' 發生錯誤,所以跳過建置該專案", - "Skipping_clean_because_not_all_projects_could_be_located_6371": "因為並非所有專案都可找到,所以跳過清理", + "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382": "因為未建置專案 '{0}' 的相依性 '{1}',所以正在跳過該專案的組建", "Source_Map_Options_6175": "來源對應選項", "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "特製化的多載簽章不可指派給任何非特製化的簽章。", "Specifier_of_dynamic_import_cannot_be_spread_element_1325": "動態匯入的指定名稱不能是展開元素。", - "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015": "指定 ECMAScript 目標版本: 'ES3' (預設)、'ES5'、'ES2015'、'ES2016'、'ES2017'、'ES2018' 或 'ESNEXT'。", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015": "指定 ECMAScript 目標版本: 'ES3' (預設)、'ES5'、'ES2015'、'ES2016'、'ES2017'、'ES2018'、'ES2019'、'ES2020' 或 'ESNEXT'。", "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080": "指定 JSX 程式碼產生: 'preserve'、'react-native' 或 'react'。", + "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368": "指定僅用於類型之匯入的發出/檢查行為", + "Specify_file_to_store_incremental_compilation_information_6380": "指定要儲存累加編譯資訊的檔案", "Specify_library_files_to_be_included_in_the_compilation_6079": "請指定要併入編譯中的程式庫檔案。", - "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016": "指定模組程式碼產生: 'none'、'commonjs'、'amd'、'system'、'umd'、'es2015' 或 'ESNext'。", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016": "指定模組程式碼產生: 'none'、'commonjs'、'amd'、'system'、'umd'、'es2015'、'es2020' 或 'ESNext'。", "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069": "指定模組解決方案策略: 'node' (Node.js) 或 'classic' (TypeScript 1.6 前)。", + "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227": "指定當無法使用下列檔案系統事件建立時,建立輪詢監看的策略: 'FixedInterval' (預設)、'PriorityInterval'、'DynamicPriority'。", + "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226": "指定在不支援原生遞迴監看的平台上,監看目錄的策略: 'UseFsEvents' (預設)、'FixedPollingInterval'、'DynamicPriorityPolling'。", + "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225": "指定監看檔案的策略: 'FixedPollingInterval' (預設)、'PriorityPollingInterval'、'DynamicPriorityPolling'、'UseFsEvents'、'UseFsEventsOnParentDirectory'。", "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146": "請指定要在以 'react' JSX 發出為目標時使用的 JSX factory 函式。例如 'React.createElement' 或 'h'。", "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060": "指定發出檔案時要用的行尾順序: 'CRLF' (DOS) 或 'LF' (UNIX)。", "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004": "指定偵錯工具尋找 TypeScript 檔案的位置,而非原始檔位置。", "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003": "指定偵錯工具尋找對應檔的位置,而非產生的位置。", "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058": "指定輸入檔的根目錄。用以控制具有 --outDir 的輸出目錄結構。", + "Split_all_invalid_type_only_imports_1367": "分割所有無效的僅限類型匯入", + "Split_into_two_separate_import_declarations_1366": "分割為兩個獨立的匯入宣告", "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472": "只有當目標為 ECMAScript 5 及更高版本時,才可使用 'new' 運算式中的擴張運算子。", "Spread_types_may_only_be_created_from_object_types_2698": "Spread 類型只能從物件類型建立。", "Starting_compilation_in_watch_mode_6031": "在監看模式中開始編譯...", @@ -832,7 +1025,7 @@ "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717": "後續的屬性宣告必須具有相同的類型。屬性 '{0}' 的類型必須是 '{1}',但此處卻是類型 '{2}'。", "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403": "後續的變數宣告必須具有相同的類型。變數 '{0}' 的類型必須是 '{1}' 但卻是 '{2}'。", "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064": "模式 '{1}' 的替代 '{0}' 類型不正確,必須為 'string',但得到 '{2}'。", - "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062": "模式 '{1}' 中的替代 '{0}' 最多只可有一個 '*' 字元。", + "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062": "模式 '{1}' 中的替代 '{0}' 最多可有一個 '*' 字元。", "Substitutions_for_pattern_0_should_be_an_array_5063": "模式 '{0}' 的替代應為陣列。", "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066": "模式 '{0}' 的替代項目不應為空陣列。", "Successfully_created_a_tsconfig_json_file_6071": "已成功建立 tsconfig.json 檔案。", @@ -840,78 +1033,122 @@ "Suppress_excess_property_checks_for_object_literals_6072": "不對物件常值進行多餘的屬性檢查。", "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055": "針對缺少索引簽章的索引物件隱藏 noImplicitAny 錯誤。", "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470": "'Symbol' 參考不是參考全域 Symbol 建構函式物件。", + "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228": "呼叫回呼,並更新不支援原生遞迴監看之平台上的目錄監控程式狀態。", "Syntax_Colon_0_6023": "語法: {0}", + "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229": "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'.", + "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358": "選擇性鏈結中不允許已標記的範本運算式。", + "The_0_modifier_can_only_be_used_in_TypeScript_files_8009": "'{0}' 修飾元只可用於 TypeScript 檔案中。", "The_0_operator_cannot_be_applied_to_type_symbol_2469": "無法將 '{0}' 運算子套用至類型 'symbol'。", "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447": "布林類型不允許有 '{0}' 運算子。請考慮改用 '{1}'。", + "The_0_property_of_an_async_iterator_must_be_a_method_2768": "非同步迭代器的 '{0}' 屬性必須為方法。", + "The_0_property_of_an_iterator_must_be_a_method_2767": "迭代器的 '{0}' 屬性必須為方法。", "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696": "'Object' 類型可指派給極少數的其他類型。要改用 'any' 類型嗎?", "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496": "無法在 ES3 和 ES5 的箭號函式中參考 'arguments' 物件。請考慮使用標準函式運算式。", "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522": "在 ES3 與 ES5 的非同步函式或方法中,無法參考 'arguments' 物件。請考慮使用標準函式或方法。", "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313": "'if' 陳述式的主體不能是空白陳述式。", "The_character_set_of_the_input_files_6163": "輸入檔的字元集。", + "The_containing_arrow_function_captures_the_global_value_of_this_7041": "包含的箭號函式會擷取 'this' 的全域值。", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "內含的函式或模組主體對控制流程分析而言過大。", "The_current_host_does_not_support_the_0_option_5001": "目前的主機不支援 '{0}' 選項。", + "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018": "您可能要使用的 '{0}' 宣告定義於此處", + "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500": "所需類型來自屬性 '{0}',該屬性宣告於此處的類型 '{1}' 上", + "The_expected_type_comes_from_the_return_type_of_this_signature_6502": "所需類型來自此簽章的傳回型別。", + "The_expected_type_comes_from_this_index_signature_6501": "所需類型來自此索引簽章。", "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "匯出指派的運算式必須是環境內容中的識別碼或完整名稱。", "The_files_list_in_config_file_0_is_empty_18002": "設定檔 '{0}' 中的 'files' 清單是空的。", + "The_first_export_default_is_here_2752": "第一個匯出預設位於此處。", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "Promise 的 'then' 方法第一個參數必須為回撥。", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "全域類型 'JSX.{0}' 的屬性不得超過一個。", - "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343": "只有在為 'target' 及 'module' 編譯器選項使用 'ESNext' 時,才允許 'import.meta' 中繼屬性。", + "The_implementation_signature_is_declared_here_2750": "實作簽章宣告於此處。", + "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343": "只有當 '--module' 選項為 'esnext' 或 'system' 時,才允許 'import.meta' 中繼屬性。", + "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742": "'{0}' 的推斷類型無法在沒有 '{1}' 參考的情況下命名。其可能非可攜式。必須有型別註解。", "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527": "'{0}' 的推斷型別參考了無法存取的 '{1}' 型別。必須有型別註解。", + "The_last_overload_gave_the_following_error_2770": "最後一個多載出現下列錯誤。", + "The_last_overload_is_declared_here_2771": "最後一個多載宣告於此處。", "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491": "'for...in' 陳述式的左側不得為解構模式。", "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404": "'for...in' 陳述式左側不得使用類型註釋。", + "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780": "'for...in' 陳述式的左側不可為選擇性屬性存取。", "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406": "'for...in' 陳述式的左邊必須是變數或屬性存取。", "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405": "'for...in' 陳述式的左側必須是類型 'string' 或 'any'。", "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483": "'for...of' 陳述式的左側不得使用類型註釋。", + "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781": "'for...of' 陳述式的左側不可為選擇性屬性存取。", "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487": "'for...of' 陳述式的左邊必須是變數或屬性存取。", - "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362": "算術運算的左側必須是類型 'any'、'number' 或列舉類型。", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "算術運算的左側內容必須屬於 'any'、'number'、'bigint' 或列舉類型。", + "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "指派運算式的左側不可為選擇性屬性存取。", "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "指派運算式的左邊必須是變數或屬性存取。", "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360": "'in' 運算式的左側必須是 'any'、'string'、'number' 或 'symbol' 類型。", "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "'instanceof' 運算式左側必須是類型 'any'、物件類型或型別參數。", "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "對使用者顯示訊息時所使用的地區設定 (例如 'zh-tw')", "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "在 node_modules 及載入 JavaScript 檔案下搜尋時的最大相依性深度。", - "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "刪除運算子的運算元不得為唯讀屬性。", - "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "刪除運算子的運算元必須是屬性參考。", + "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011": "'delete' 運算子的運算元不可為私人識別碼。", + "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704": "'delete' 運算子的運算元不可為唯讀屬性。", + "The_operand_of_a_delete_operator_must_be_a_property_reference_2703": "'delete' 運算子的運算元必須為屬性參考。", + "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777": "遞增或遞減運算子的運算元不可為選擇性屬性存取。", "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357": "遞增或遞減運算子的運算元必須是變數或屬性存取。", + "The_parser_expected_to_find_a_to_match_the_token_here_1007": "剖析器需找到可與此處 '{' 語彙基元搭配的 '}'。", + "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014": "無法在此類別內的類型 '{1}' 上存取屬性 '{0}',原因是另一個拼字相同的私人識別碼已將其陰影。", "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601": "JSX 項目建構函式的傳回型別必須傳回物件類型。", "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237": "參數裝飾項目函式的傳回型別必須是 'void' 或 'any'。", "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236": "屬性裝飾項目函式的傳回型別必須是 'void' 或 'any'。", "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058": "非同步函式的傳回型別必須是有效的 Promise,或不得包含可呼叫的 'then' 成員。", "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064": "非同步函式或方法的傳回類型必須為全域 Promise 類型。", "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "'for...in' 陳述式的右方必須是類型 'any'、物件類型或型別參數,但此處為類型 '{0}'。", - "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363": "算術運算的右側必須是 'any'、'number' 或列舉類型。", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "算術運算的右側內容必須屬於 'any'、'number'、'bigint' 或列舉類型。", "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361": "'in' 運算式的右側必須是類型 'any'、物件類型或型別參數。", "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "'instanceof' 運算式的右側必須是 'any' 類型,或是可指派給 'Function' 介面類型的類型。", + "The_shadowing_declaration_of_0_is_defined_here_18017": "'{0}' 的陰影宣告定義於此處", "The_specified_path_does_not_exist_Colon_0_5058": "指定的路徑不存在: '{0}'。", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "指派的目標必須是變數或屬性存取。", + "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778": "物件其餘指派的目標不可為選擇性屬性存取。", "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "物件剩餘指派的目標必須為變數或屬性存取。", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "類型 '{0}' 的 'this' 內容無法指派給方法之類型 '{1}' 的 'this'。", "The_this_types_of_each_signature_are_incompatible_2685": "各個簽章的 'this' 類型不相容。", + "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104": "類型 '{0}' 為 'readonly',因此無法指派給可變動的類型 '{1}'。", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "無法從使用方式推斷型別參數 '{0}' 的型別引數。請考慮明確地指定型別引數。", - "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547": "非同步迭代器的 'next()' 方法傳回的類型,對具有 'value' 屬性的類型必須為 Promise。", - "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490": "迭代器之 'next()' 方法傳回的類型必須具有 'value' 屬性。", + "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "函式宣告的類型必須與函式的簽章相符。", + "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "非同步迭代器 '{0}()' 方法所傳回的類型,對具有 'value' 屬性的類型必須為 Promise。", + "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "迭代器 '{0}()' 方法所傳回的類型必須具有 'value' 屬性。", + "The_types_of_0_are_incompatible_between_these_types_2200": "'{0}' 的類型在這些類型之間不相容。", + "The_types_returned_by_0_are_incompatible_between_these_types_2201": "'{0}' 所傳回的類型在這些類型之間不相容。", "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189": "'for...in' 陳述式的變數宣告不得有初始設定式。", "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190": "'for...of' 陳述式的變數宣告不得有初始設定式。", "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "不支援 'with' 陳述式。'with' 區塊中的所有符號都會有類型 'any'。", + "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "此 JSX 標籤的 '{0}' 屬性只能有一個 '{1}' 類型的子系,但提供的子系卻有多個。", + "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "此 JSX 標籤的 '{0}' 屬性需要必須有多個子系的類型 '{1}',但僅提供的子系只有一個。", + "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "因為類型 '{1}' 與 '{2}' 未重疊,所以此條件永遠會傳回 '{0}'。", + "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774": "因為永遠會定義函式,所以此條件永遠會傳回 true。您是要改為呼叫該條件嗎?", "This_constructor_function_may_be_converted_to_a_class_declaration_80002": "此建構函式可轉換為類別宣告。", + "This_expression_is_not_callable_2349": "無法呼叫此運算式。", + "This_expression_is_not_constructable_2351": "無法建構此運算式。", + "This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371": "因為 'importsNotUsedAsValues' 設定為 'error',所以此匯入永遠不會作為值使用,而且必須使用 'import type'。", + "This_may_be_converted_to_an_async_function_80006": "這可以轉換為非同步函式。", + "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "只能以 ECMAScript 匯入/匯出來參考此模組,方法為開啟 '{0}' 旗標並參考其預設匯出。", + "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "此模組使用 'export =' 宣告,而且在使用 '{0}' 旗標時,只能搭配預設匯入使用。", + "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "此多載簽章與其實作簽章不相容。", + "This_parameter_is_not_allowed_with_use_strict_directive_1346": "不允許此參數搭配 'use strict' 指示詞使用。", "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "此語法需要已匯入的協助程式,但找不到模組 '{0}'。", - "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343": "此語法需要名為 '{1}' 的已匯入協助程式,但模組 '{0}' 沒有匯出的成員 '{1}'。", + "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "此語法需要名為 '{1}' 的已匯入協助程式,但其不存在於 '{0}' 中。請考慮升級您的 '{0}' 版本。", + "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378": "只有在 'module' 選項設定為 'esnext' 或 'system',而且 'target' 選項設定為 'es2017' 或更高版本時,才允許最上層的 'await' 運算式。", + "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": ".d.ts 檔案中的最上層宣告必須以 'declare' 或 'export' 修飾元開頭。", "Trailing_comma_not_allowed_1009": "尾端不得為逗號。", "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153": "以個別模組的形式轉換每個檔案的語言 (類似於 'ts.transpileModule')。", - "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "如有 'npm install @types/{0}',請試用,否則請新增內含 'declare module '{0}';' 的宣告 (.d.ts) 檔案", + "Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035": "如有 `npm install @types/{1}`,請嘗試使用,或新增包含 `declare module '{0}';` 的宣告 (.d.ts) 檔案", "Trying_other_entries_in_rootDirs_6110": "正在嘗試 'rootDirs' 中的其他項目。", "Trying_substitution_0_candidate_module_location_Colon_1_6093": "正在嘗試替代 '{0}',候選模組位置: '{1}'。", - "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493": "無法將長度為 '{1}' 的元組類型 '{0}' 指派給長度為 '{2}' 的元組。", - "Type_0_cannot_be_converted_to_type_1_2352": "類型 '{0}' 無法轉換為類型 '{1}'。", + "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493": "長度為 '{1}' 的元組類型 '{0}' 在索引 '{2}' 沒有項目。", + "Tuple_type_arguments_circularly_reference_themselves_4110": "元組類型引數會循環參考自身。", "Type_0_cannot_be_used_as_an_index_type_2538": "類型 '{0}' 無法作為索引類型。", "Type_0_cannot_be_used_to_index_type_1_2536": "類型 '{0}' 無法用來為類型 '{1}' 編制索引。", "Type_0_does_not_satisfy_the_constraint_1_2344": "類型 '{0}' 不符合條件約束 '{1}'。", + "Type_0_has_no_call_signatures_2757": "類型 '{0}' 沒有任何呼叫簽章。", + "Type_0_has_no_construct_signatures_2761": "類型 '{0}' 沒有任何建構簽章。", "Type_0_has_no_matching_index_signature_for_type_1_2537": "類型 '{0}' 沒有與類型 '{1}' 相符的索引簽章。", "Type_0_has_no_properties_in_common_with_type_1_2559": "類型 '{0}' 與類型 '{1}' 沒有任何共通的屬性。", - "Type_0_has_no_property_1_2460": "類型 '{0}' 沒有屬性 '{1}'。", - "Type_0_has_no_property_1_and_no_string_index_signature_2459": "類型 '{0}' 沒有屬性 '{1}',也沒有字串索引簽章。", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739": "類型 '{0}' 缺少類型 '{1}' 中的下列屬性: {2}", + "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740": "類型 '{0}' 缺少類型 '{1}' 中的下列屬性: {2},以及另外 {3} 個。", "Type_0_is_not_a_constructor_function_type_2507": "類型 '{0}' 不是建構函式類型。", "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055": "類型 '{0}' 不是 ES5/ES3 中的有效非同步函式傳回型別,因為它不是指與 Promise 相容的建構函式值。", "Type_0_is_not_an_array_type_2461": "類型 '{0}' 不是陣列類型。", - "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568": "類型 '{0}' 不是陣列類型。請使用編譯器選項 '-downlevelIteration' 允許逐一查看迭代器。", "Type_0_is_not_an_array_type_or_a_string_type_2495": "類型 '{0}' 不是陣列類型或字串類型。", "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569": "類型 '{0}' 不是陣列類型或字串類型。請使用編譯器選項 '-downlevelIteration' 允許逐一查看迭代器。", "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "類型 '{0}' 不是陣列類型或字串類型,或沒有會傳回迭代器的 '[Symbol.iterator]()' 方法。", @@ -926,17 +1163,25 @@ "Type_0_recursively_references_itself_as_a_base_type_2310": "類型 '{0}' 將自己當做基底類型遞迴參考。", "Type_alias_0_circularly_references_itself_2456": "類型別名 '{0}' 會循環參考自己。", "Type_alias_name_cannot_be_0_2457": "類型別名不得為 '{0}'。", + "Type_aliases_can_only_be_used_in_TypeScript_files_8008": "類型別名只可用於 TypeScript 檔案中。", "Type_annotation_cannot_appear_on_a_constructor_declaration_1093": "建構函式宣告不得有類型註釋。", + "Type_annotations_can_only_be_used_in_TypeScript_files_8010": "型別註解只可用於 TypeScript 檔案中。", "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455": "因為型別引數候選項 '{1}' 不是候選項 '{0}' 的超級類型,所以不是有效的型別引數。", "Type_argument_expected_1140": "必須是型別引數。", "Type_argument_list_cannot_be_empty_1099": "型別引數清單不得為空白。", + "Type_arguments_can_only_be_used_in_TypeScript_files_8011": "類型引數只可用於 TypeScript 檔案中。", "Type_arguments_cannot_be_used_here_1342": "此處不得使用型別引數。", + "Type_arguments_for_0_circularly_reference_themselves_4109": "'{0}' 的類型引數會循環參考自身。", + "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016": "類型判斷提示運算式只可用於 TypeScript 檔案中。", "Type_declaration_files_to_be_included_in_compilation_6124": "要包含在編譯內的類型宣告檔案。", "Type_expected_1110": "必須是類型。", + "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "類型具現化過深,可能會有無限深度。", "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "類型在其本身 'then' 方法的完成回撥中直接或間接受到參考。", "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320": "'await' 運算元類型必須是有效的 Promise,或不得包含可呼叫的 'then' 成員。", + "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418": "已計算屬性值的類型為 '{0}',其無法指派給類型 '{1}'。", "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "'yield*' 運算元的反覆項目類型必須是有效的 Promise,或不得包含可呼叫的 'then' 成員。", "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "非同步產生器中的 'yield' 運算元類型必須是有效的 Promise,或不得包含可呼叫的 'then' 成員。", + "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "類型源自此匯入。無法呼叫或建構命名空間樣式的匯入,而且可能會在執行階段導致失敗。請考慮改用預設匯入或此處要求的匯入。", "Type_parameter_0_has_a_circular_constraint_2313": "類型參數 '{0}' 具有循環條件約束。", "Type_parameter_0_has_a_circular_default_2716": "型別參數 '{0}' 包含循環的預設值。", "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008": "匯出介面中呼叫簽章的型別參數 '{0}' 具有或使用私用名稱 '{1}'。", @@ -944,17 +1189,21 @@ "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002": "匯出類別的型別參數 '{0}' 具有或使用私用名稱 '{1}'。", "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016": "匯出函式的型別參數 '{0}' 具有或使用私用名稱 '{1}'。", "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004": "匯出介面的型別參數 '{0}' 具有或使用私用名稱 '{1}'。", + "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103": "已匯出對應物件類型的型別參數 '{0}' 正在使用私人名稱 '{1}'。", "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083": "匯出類型別名的型別參數 '{0}' 具有或正在使用私人名稱 '{1}'。", "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014": "匯出介面中方法的型別參數 '{0}' 具有或使用私用名稱 '{1}'。", "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012": "匯出類別中公用方法的型別參數 '{0}' 具有或使用私用名稱 '{1}'。", "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010": "匯出類別中公用靜態方法的型別參數 '{0}' 具有或使用私用名稱 '{1}'。", "Type_parameter_declaration_expected_1139": "必須是型別參數宣告。", + "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004": "型別參數宣告只可用於 TypeScript 檔案中。", + "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744": "型別參數預設只能參考先前宣告的型別參數。", "Type_parameter_list_cannot_be_empty_1098": "型別參數清單不得為空白。", "Type_parameter_name_cannot_be_0_2368": "型別參數名稱不得為 '{0}'。", "Type_parameters_cannot_appear_on_a_constructor_declaration_1092": "建構函式宣告不得有類型參數。", "Type_predicate_0_is_not_assignable_to_1_1226": "型別述詞 '{0}' 不可指派給 '{1}'。", "Type_reference_directive_0_was_not_resolved_6120": "======== 類型參考指示詞 '{0}' 未解析。========", "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119": "======== 類型參考指示詞 '{0}' 已成功解析為 '{1}',主要: {2}。========", + "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219": "======== 類型參考指示詞 '{0}' 已成功解析為 '{1}',套件識別碼為 '{2}',主要: {3}。========", "Types_have_separate_declarations_of_a_private_property_0_2442": "類型具有私用屬性 '{0}' 的個別宣告。", "Types_of_parameters_0_and_1_are_incompatible_2328": "參數 '{0}' 和 '{1}' 的類型不相容。", "Types_of_property_0_are_incompatible_2326": "屬性 '{0}' 的類型不相容。", @@ -967,10 +1216,18 @@ "Unexpected_token_1012": "未預期的語彙基元。", "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "未預期的語彙基元。必須是建構函式、方法、存取子或屬性。", "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "權杖錯誤。類型參數名稱不應有大括號。", + "Unexpected_token_Did_you_mean_or_gt_1382": "未預期的語彙基元。您是指 `{'>'}` 或 `>` 嗎?", + "Unexpected_token_Did_you_mean_or_rbrace_1381": "未預期的語彙基元。您是指 `{'}'}` 或 `}` 嗎?", "Unexpected_token_expected_1179": "未預期的語彙基元。必須是 '{'。", + "Unknown_build_option_0_5072": "未知的組建選項 '{0}'。", + "Unknown_build_option_0_Did_you_mean_1_5077": "未知的組建選項 '{0}'。您是指 '{1}' 嗎?", "Unknown_compiler_option_0_5023": "不明的編譯器選項 '{0}'。", + "Unknown_compiler_option_0_Did_you_mean_1_5025": "未知的編譯器選項 '{0}'。您是指 '{1}' 嗎?", "Unknown_option_excludes_Did_you_mean_exclude_6114": "選項 'excludes' 未知。您是指 'exclude' 嗎?", "Unknown_type_acquisition_option_0_17010": "未知的類型取得選項 '{0}'。", + "Unknown_type_acquisition_option_0_Did_you_mean_1_17018": "未知的類型擷取選項 '{0}'。您是指 '{1}' 嗎?", + "Unknown_watch_option_0_5078": "未知的監看選項 '{0}'。", + "Unknown_watch_option_0_Did_you_mean_1_5079": "未知的監看選項 '{0}'。您是指 '{1}' 嗎?", "Unreachable_code_detected_7027": "偵測到無法執行到的程式碼。", "Unsupported_locale_0_6049": "不支援的地區設定 '{0}'。", "Unterminated_Unicode_escape_sequence_1199": "未結束的 Unicode 逸出序列。", @@ -980,34 +1237,52 @@ "Unterminated_template_literal_1160": "未結束的樣板常值。", "Untyped_function_calls_may_not_accept_type_arguments_2347": "不具類型的函式呼叫無法接受類型引數。", "Unused_label_7028": "未使用的標籤。", + "Updating_output_of_project_0_6373": "正在更新專案 '{0}' 的輸出...", "Updating_output_timestamps_of_project_0_6359": "正在更新專案 '{0}' 的輸出時間戳記...", + "Updating_unchanged_output_timestamps_of_project_0_6371": "正在更新專案 '{0}' 的未更變輸出時間戳記...", "Use_synthetic_default_member_95016": "使用綜合 'default' 成員。", "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "只有在 ECMAScript 5 及更高版本中,才可在 'for...of' 陳述式中使用字串。", + "Using_compiler_options_of_project_reference_redirect_0_6215": "正在使用專案參考重新導向 '{0}' 的編譯器選項。", "VERSION_6036": "版本", "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560": "類型為 '{0}' 的值與類型 '{1}' 沒有任何共通的屬性。確定要呼叫嗎?", "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348": "無法呼叫類型 '{0}' 的值。您要包含 'new' 嗎?", "Variable_0_implicitly_has_an_1_type_7005": "變數 '{0}' 隱含有 '{1}' 類型。", + "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043": "變數 '{0}' 隱含 '{1}' 類型,但可從使用方式推斷更適合的類型。", + "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046": "變數 '{0}' 在某些位置隱含類型 '{1}',但可從使用方式推斷更適合的類型。", "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034": "變數 '{0}' 在某些其類型無法判斷的位置隱含地擁有類型 '{1}'。", "Variable_0_is_used_before_being_assigned_2454": "變數 '{0}' 已在指派之前使用。", "Variable_declaration_expected_1134": "必須是變數宣告。", "Variable_declaration_list_cannot_be_empty_1123": "變數宣告清單不得為空白。", "Version_0_6029": "版本 {0}", "Watch_input_files_6005": "監看輸入檔。", + "Watch_option_0_requires_a_value_of_type_1_5080": "監看選項 '{0}' 需要 {1} 類型的值。", "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "是否要將已過期的主控台輸出,維持在監看模式下,而非清除螢幕。", + "Wrap_invalid_character_in_an_expression_container_95101": "包裝在運算式容器中的字元無效", + "You_cannot_rename_a_module_via_a_global_import_8031": "您無法透過全域匯入重新命名模組。", "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001": "您無法重新命名標準 TypeScript 程式庫中所定義的項目。", "You_cannot_rename_this_element_8000": "您無法重新命名這個項目。", "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329": "'{0}' 在此只接受極少數的引數用為裝飾項目。要先呼叫此項目,然後再寫入 '@{0}()' 嗎?", + "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076": "'{0}' 與 '{1}' 作業無法在沒有括號的情況下同時使用。", "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710": "'{0}' 指定了兩次。將會覆寫名為 '{0}' 的屬性。", - "_0_can_only_be_used_in_a_ts_file_8009": "'{0}' 只可用於 .ts 檔案中。", + "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362": "因為 '{0}' 是使用 'export type' 匯出的,所以無法作為值使用。", + "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361": "因為 '{0}' 是使用 'import type' 匯入的,所以無法作為值使用。", + "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747": "'{0}' 元件不接受文字作為子項目。JSX 中的文字具有類型 'string',但 '{1}' 需要的類型為 '{2}'。", + "_0_declarations_can_only_be_used_in_TypeScript_files_8006": "'{0}' 宣告只可用於 TypeScript 檔案中。", "_0_expected_1005": "必須是 '{0}'。", + "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050": "'{0}' 隱含 '{1}' 傳回型別,但可從使用方式推斷更適合的類型。", "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023": "'{0}' 因為沒有傳回型別註解,且在其中一個傳回運算式中直接或間接參考了自己,所以隱含了傳回型別 'any'。", "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022": "'{0}' 因為沒有類型註釋,且在其本身的初始設定式中直接或間接參考了自己,所以隱含有類型 'any'。", "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "'{0}' 為基元,但 '{1}' 為包裝函式物件。建議盡可能使用 '{0}'。", + "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "'{0}' 可指派給 '{1}' 類型的條件約束,但可能會將 '{1}' 以不同的條件約束 '{2}' 子類型來具現化。", "_0_is_declared_but_its_value_is_never_read_6133": "'{0}' 已宣告但從未讀取其值。", "_0_is_declared_but_never_used_6196": "宣告了 '{0}',但從未使用過。", + "_0_is_declared_here_2728": "'{0}' 宣告於此處。", + "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611": "'{0}' 在類別 '{1}' 中定義為屬性,但在此處的 '{2}' 中卻覆寫為存取子。", + "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610": "'{0}' 在類別 '{1}' 中定義為存取子,但在此處的 '{2}' 中卻覆寫為執行個體屬性。", "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012": "'{0}' 對關鍵字 '{1}' 而言不是有效的中繼屬性。您是指 '{2}' 嗎?", "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506": "'{0}' 在其本身的基底運算式中直接或間接受到參考。", "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502": "'{0}' 在其本身的類型註釋中直接或間接受到參考。", + "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783": "多次指定 '{0}',因此將會覆寫此使用方式。", "_0_list_cannot_be_empty_1097": "'{0}' 清單不得為空白。", "_0_modifier_already_seen_1030": "已有 '{0}' 修飾元。", "_0_modifier_cannot_appear_on_a_class_element_1031": "類別項目不得有 '{0}' 修飾元。", @@ -1021,17 +1296,29 @@ "_0_modifier_cannot_be_used_in_an_ambient_context_1040": "無法在環境內容中使用 '{0}' 修飾元。", "_0_modifier_cannot_be_used_with_1_modifier_1243": "'{0}' 修飾元無法與 '{1}' 修飾元並用。", "_0_modifier_cannot_be_used_with_a_class_declaration_1041": "'{0}' 修飾元無法與類別宣告並用。", + "_0_modifier_cannot_be_used_with_a_private_identifier_18019": "'{0}' 修飾元不可搭配私人識別碼使用", "_0_modifier_must_precede_1_modifier_1029": "'{0}' 修飾元必須在 '{1}' 修飾元之前。", + "_0_needs_an_explicit_type_annotation_2782": "'{0}' 需要明確的型別註解。", "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702": "'{0}' 只參考類型,但在這裡用作命名空間。", "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693": "'{0}' 只會參考類型,但此處將其用為值。", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585": "'{0}' 只是類型,但在此處卻作為值使用。需要變更您的目標程式庫嗎? 請嘗試將 `lib` 編譯器選項變更為 es2015 或更新版本。", "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686": "'{0}' 指的是全域的 UMD,但目前的檔案為模組。請考慮改為新增匯入。", + "_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749": "'{0}' 是值,但在此處卻作為類型使用。", "_0_tag_already_specified_1223": "已指定 '{0}' 標記。", "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253": "'{0}' 標記不得獨立用作頂層 JSDoc 標記。", + "_0_was_also_declared_here_6203": "'{0}' 也已宣告於此處。", + "_0_was_exported_here_1377": "'{0}' 已匯出到此處。", + "_0_was_imported_here_1376": "'{0}' 已匯入到此處。", "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "缺少傳回型別註解的 '{0}' 隱含了 '{1}' 傳回型別。", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "缺少傳回型別註解的 '{0}' 隱含 '{1}' 產生類型。", "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "'abstract' 修飾元只能出現在類別宣告、方法宣告或屬性宣告。", - "await_expression_is_only_allowed_within_an_async_function_1308": "只有非同步函式才允許 'await' 運算式。", + "and_here_6204": "及此處。", + "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375": "當檔案為模組時,只允許 'await' 運算式位於檔案的最上層,但是此檔案沒有匯入或匯出。請考慮新增空白的 'export {}',使這個檔案成為模組。", + "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308": "只允許在非同步函式中與模組的最上層使用 'await' 運算式。", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "'await' 運算式不得用於參數初始設定式。", + "await_has_no_effect_on_the_type_of_this_expression_80007": "'await' 對此運算式的類型沒有作用。", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "'baseUrl' 選項已設為 '{0}'。此值將用於解析非相對的模組名稱 '{1}'。", + "can_only_be_used_at_the_start_of_a_file_18026": "'#!' 只能用於檔案開頭。", "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "'=' 僅能在解構指派內的物件常值屬性中使用。", "case_or_default_expected_1130": "必須是 'case' 或 'default'。", "class_expressions_are_not_currently_supported_9003": "目前不支援 'class' 運算式。", @@ -1039,11 +1326,12 @@ "const_declarations_must_be_initialized_1155": "'const' 宣告必須初始化。", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "'const' 列舉成員初始設定式已評估為非有限值。", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "'const' 列舉成員初始設定式已評估為不允許的值 'NaN'。", + "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474": "常數列舉成員初始設定式只能包含常值與其他計算列舉值。", "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "'const' 列舉只可用於屬性或索引存取運算式中,或用於匯入宣告、匯出指派或類型查詢的右側。", + "constructor_is_a_reserved_word_18012": "'#constructor' 為保留字。", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "不得在 strict 模式中對識別碼呼叫 'delete'。", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "刪除此項目 - 因為先前已建置專案 '{0}',所以其為最新狀態", - "enum_declarations_can_only_be_used_in_a_ts_file_8015": "「列舉宣告」只可用於 .ts 檔案中。", - "export_can_only_be_used_in_a_ts_file_8003": "'export=' 只可用於 .ts 檔案中。", + "export_can_only_be_used_in_TypeScript_files_8003": "'export =' 只可用於 TypeScript 檔案中。", "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "'export' 修飾元無法套用至環境模組或模組增強指定,原因是這二者永遠會顯示。", "extends_clause_already_seen_1172": "已經有 'extends' 子句。", "extends_clause_must_precede_implements_clause_1173": "'extends' 子句必須在 'implements' 子句之前。", @@ -1053,23 +1341,24 @@ "get_and_set_accessor_must_have_the_same_this_type_2682": "'get' 和 'set' 存取子必須有相同的 'this' 類型。", "get_and_set_accessor_must_have_the_same_type_2380": "get' 和 'set' 存取子的類型必須相同。", "implements_clause_already_seen_1175": "已經有 'implements' 子句。", - "implements_clauses_can_only_be_used_in_a_ts_file_8005": "'implements clauses' 只可用於 .ts 檔案中。", - "import_can_only_be_used_in_a_ts_file_8002": "'import ... =' 只可用於 .ts 檔案中。", + "implements_clauses_can_only_be_used_in_TypeScript_files_8005": "'implements' 子句只可用於 TypeScript 檔案中。", + "import_can_only_be_used_in_TypeScript_files_8002": "'import ... =' 只可用於 TypeScript 檔案中。", "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "只允許在條件式類型的 'extends' 子句中使用 'infer' 宣告。", - "interface_declarations_can_only_be_used_in_a_ts_file_8006": "'interface declarations' 只可用於 .ts 檔案中。", "let_declarations_can_only_be_declared_inside_a_block_1157": "只能在區塊內宣告 'let' 宣告。", "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "'let' 或 'const' 宣告中不得使用 'let' 作為名稱。", - "module_declarations_can_only_be_used_in_a_ts_file_8007": "'module declarations' 只可用於 .ts 檔案中。", - "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150": "new T[]' 不能用來建立陣列。請改用 'new Array()'。", "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "目標缺少建構簽章的 'new' 運算式隱含了 'any' 類型。", - "non_null_assertions_can_only_be_used_in_a_ts_file_8013": "'non-null assertions' 只可用於 .ts 檔案中。", "options_6024": "選項", "or_expected_1144": "必須是 '{' 或 ';'。", "package_json_does_not_have_a_0_field_6100": "'package.json' 沒有 '{0}' 欄位。", + "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "'package.json' 沒有任何符合 '{0}' 版本的 'typesVersions' 項目。", + "package_json_had_a_falsy_0_field_6220": "'package.json' 具有假的 '{0}' 欄位。", "package_json_has_0_field_1_that_references_2_6101": "'package.json' 有參考 '{2}' 的 '{0}' 欄位 '{1}'。", - "parameter_modifiers_can_only_be_used_in_a_ts_file_8012": "'parameter modifiers' 只可用於 .ts 檔案中。", + "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209": "'package.json' 具有 'typesVersions' 項目 '{0}',其非有效的 SemVer 範圍。", + "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208": "'package.json' 具有符合編譯器版本 '{1}' 的 'typesVersions' 項目 '{0}',要尋找符合模組名稱 '{2}' 的模式。", + "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206": "'package.json' 具有限定版本路徑對應的 'typesVersions' 欄位。", "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091": "'paths' 選項已指定,將尋找符合模組名稱 '{0}' 的模式。", "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "'readonly' 修飾元只能出現在屬性宣告或索引簽章。", + "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "'readonly' 類型修飾元只可用於陣列與元組常值類型。", "require_call_may_be_converted_to_an_import_80005": "'require' 呼叫可能會轉換為匯入。", "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107": "'rootDirs' 選項已設定。該選項將用於解析相對的模組名稱 '{0}'。", "super_can_only_be_referenced_in_a_derived_class_2335": "只有衍生類別中才可參考 'super'。", @@ -1077,6 +1366,7 @@ "super_cannot_be_referenced_in_a_computed_property_name_2466": "計算的屬性名稱中不得參考 'super'。", "super_cannot_be_referenced_in_constructor_arguments_2336": "建構函式引數中不得參考 'super'。", "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659": "當選項 'target' 為 'ES2015' 或更高時,只有在物件常值運算式的成員中才允許 'super'。", + "super_may_not_use_type_arguments_2754": "'super' 不可以使用類型引數。", "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011": "必須先呼叫 'super' 才能存取衍生類別建構函式中 'super' 的屬性。", "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009": "必須先呼叫 'super' 才能存取衍生類別中建構函式的 'this'。", "super_must_be_followed_by_an_argument_list_or_member_access_1034": "'super' 之後必須接引數清單或成員存取。", @@ -1087,14 +1377,11 @@ "this_cannot_be_referenced_in_constructor_arguments_2333": "建構函式引數中不得參考 'this'。", "this_cannot_be_referenced_in_current_location_2332": "目前的位置中不得參考 'this'。", "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683": "因為 'this' 沒有型別註解,所以隱含具有類型 'any'。", - "type_aliases_can_only_be_used_in_a_ts_file_8008": "'type aliases' 只可用於 .ts 檔案中。", - "type_arguments_can_only_be_used_in_a_ts_file_8011": "'type arguments' 只可用於 .ts 檔案中。", - "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016": "'type assertion expressions' 只可用於 .ts 檔案中。", - "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004": "'type parameter declarations' 只可用於 .ts 檔案中。", - "types_can_only_be_used_in_a_ts_file_8010": "'types' 只可用於 .ts 檔案中。", "unique_symbol_types_are_not_allowed_here_1335": "這裡不允許 'unique symbol' 型別。", "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "只有變數陳述式中的變數允許 'unique symbol' 型別。", "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333": "'unique symbol' 型別無法用在具有繫結名稱的變數宣告上。", + "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "'use strict' 指示詞不可搭配非簡易參數清單使用。", + "use_strict_directive_used_here_1349": "'use strict' 指示詞已用於此處。", "with_statements_are_not_allowed_in_an_async_function_block_1300": "非同步函式區塊中不允許 'with' 陳述式。", "with_statements_are_not_allowed_in_strict_mode_1101": "不得在 strict 模式中使用 'with' 陳述式。", "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "'yield' 運算式不得用於參數初始設定式。" diff --git a/package.json b/package.json index 80fc7f1fefbee..53c251e1f1abe 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "3.8.0", + "version": "3.9.0", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ @@ -54,9 +54,9 @@ "@types/through2": "latest", "@types/travis-fold": "latest", "@types/xml2js": "^0.4.0", - "@typescript-eslint/eslint-plugin": "2.3.2", - "@typescript-eslint/experimental-utils": "2.3.2", - "@typescript-eslint/parser": "2.3.2", + "@typescript-eslint/eslint-plugin": "2.18.0", + "@typescript-eslint/experimental-utils": "2.18.0", + "@typescript-eslint/parser": "2.18.0", "async": "latest", "azure-devops-node-api": "^8.0.0", "browser-resolve": "^1.11.2", @@ -65,10 +65,10 @@ "chalk": "latest", "convert-source-map": "latest", "del": "5.1.0", - "eslint": "6.5.1", - "eslint-formatter-autolinkable-stylish": "1.0.3", - "eslint-plugin-import": "2.18.2", - "eslint-plugin-jsdoc": "15.9.9", + "eslint": "6.8.0", + "eslint-formatter-autolinkable-stylish": "1.1.1", + "eslint-plugin-import": "2.20.0", + "eslint-plugin-jsdoc": "21.0.0", "eslint-plugin-no-null": "1.0.2", "fancy-log": "latest", "fs-extra": "^6.0.1", @@ -87,6 +87,7 @@ "mocha-fivemat-progress-reporter": "latest", "ms": "latest", "node-fetch": "^2.6.0", + "playwright": "latest", "plugin-error": "latest", "pretty-hrtime": "^1.0.3", "prex": "^0.4.3", diff --git a/scripts/authors.ts b/scripts/authors.ts index 0bcfc42579063..a619d3022d678 100644 --- a/scripts/authors.ts +++ b/scripts/authors.ts @@ -111,6 +111,8 @@ namespace Commands { }; listKnownAuthors.description = "List known authors as listed in .mailmap file."; + + export const listAuthors: Command = (...specs: string[]) => { const cmd = "git shortlog -se " + specs.join(" "); console.log(cmd); @@ -145,6 +147,7 @@ namespace Commands { .map(lookupAuthor) .filter(a => !!a) .map(getAuthorName); + const unknownAuthors = authors .filter(a => !lookupAuthor(a)) .map(a => `${a.name} <${a.email}>`); @@ -162,6 +165,16 @@ namespace Commands { console.log("====================="); deduplicate(unknownAuthors).sort(sortAuthors).forEach(log); } + + + const allAuthors = deduplicate([...knownAuthors, ...unknownAuthors].map(a => a.split("<")[0].trim())).sort(sortAuthors); + if (allAuthors.length) { + console.log("\r\n"); + console.log("Revised Authors.md: "); + console.log("====================="); + allAuthors.forEach(name => console.log(" - " + name)); + } + } }; listAuthors.description = "List known and unknown authors for a given spec, e.g. 'node authors.js listAuthors origin/release-2.6..origin/release-2.7'"; diff --git a/scripts/browserIntegrationTest.js b/scripts/browserIntegrationTest.js new file mode 100644 index 0000000000000..218cef8c0fb25 --- /dev/null +++ b/scripts/browserIntegrationTest.js @@ -0,0 +1,39 @@ +const playwright = require("playwright"); +const chalk = require("chalk"); +const { join } = require("path"); +const { readFileSync } = require("fs"); + +// Turning this on will leave the Chromium browser open, giving you the +// chance to open up the web inspector. +const debugging = false; + +(async () => { + for (const browserType of ["chromium", "firefox", "webkit"]) { + const browser = await playwright[browserType].launch({ headless: !debugging }); + const context = await browser.newContext(); + const page = await context.newPage(); + + const errorCaught = err => { + console.error(chalk.red("There was an error running built/typescript.js in " + browserType)); + console.log(err.toString()); + process.exitCode = 1; + }; + + page.on("error", errorCaught); + page.on("pageerror", errorCaught); + page.on("console", log => console[log._type](log._text)); + + await page.setContent(` + + + + `); + + if (!debugging) { + await browser.close(); + } + else { + console.log("Not closing the browser, you'll need to exit the process in your terminal manually"); + } + } +})(); diff --git a/scripts/open-cherry-pick-pr.ts b/scripts/open-cherry-pick-pr.ts index ac39d959bd973..3ea7df0a9b83d 100644 --- a/scripts/open-cherry-pick-pr.ts +++ b/scripts/open-cherry-pick-pr.ts @@ -2,7 +2,7 @@ // Must reference esnext.asynciterable lib, since octokit uses AsyncIterable internally /// -import Octokit = require("@octokit/rest"); +import { Octokit } from "@octokit/rest"; const {runSequence} = require("./run-sequence"); import fs = require("fs"); import path = require("path"); @@ -26,18 +26,32 @@ async function main() { const currentAuthor = runSequence([ ["git", ["log", "-1", `--pretty="%aN <%aE>"`]] ]); + + const gh = new Octokit({ + auth: process.argv[2] + }); + + const inputPR = (await gh.pulls.get({ pull_number: +process.env.SOURCE_ISSUE, owner: "microsoft", repo: "TypeScript" })).data; + let remoteName = "origin"; + if (inputPR.base.repo.git_url !== `git:github.com/microsoft/TypeScript`) { + runSequence([ + ["git", ["remote", "add", "nonlocal", inputPR.base.repo.git_url]] + ]); + remoteName = "nonlocal"; + } + const baseBranchName = inputPR.base.ref; runSequence([ - ["git", ["fetch", "origin", "master"]] + ["git", ["fetch", remoteName, baseBranchName]] ]); let logText = runSequence([ - ["git", ["log", `origin/master..${currentSha.trim()}`, `--pretty="%h %s%n%b"`, "--reverse"]] + ["git", ["log", `${remoteName}/${baseBranchName}..${currentSha.trim()}`, `--pretty="%h %s%n%b"`, "--reverse"]] ]); logText = `Cherry-pick PR #${process.env.SOURCE_ISSUE} into ${process.env.TARGET_BRANCH} Component commits: ${logText.trim()}`; const logpath = path.join(__dirname, "../", "logmessage.txt"); - const mergebase = runSequence([["git", ["merge-base", "origin/master", currentSha]]]).trim(); + const mergebase = runSequence([["git", ["merge-base", `${remoteName}/${baseBranchName}`, currentSha]]]).trim(); runSequence([ ["git", ["checkout", "-b", "temp-branch"]], ["git", ["reset", mergebase, "--soft"]] @@ -67,20 +81,15 @@ ${logText.trim()}`; ["git", ["push", "--set-upstream", "fork", branchName, "-f"]] // push the branch ]); - const gh = new Octokit(); - gh.authenticate({ - type: "token", - token: process.argv[2] - }); const r = await gh.pulls.create({ owner: "Microsoft", repo: "TypeScript", maintainer_can_modify: true, - title: `🤖 Cherry-pick PR #${process.env.SOURCE_ISSUE} into ${process.env.TARGET_BRANCH}`, + title: `🤖 Pick PR #${process.env.SOURCE_ISSUE} (${inputPR.title.substring(0, 35)}${inputPR.title.length > 35 ? "..." : ""}) into ${process.env.TARGET_BRANCH}`, head: `${userName}:${branchName}`, base: process.env.TARGET_BRANCH, body: - `This cherry-pick was triggerd by a request on https://github.com/Microsoft/TypeScript/pull/${process.env.SOURCE_ISSUE} + `This cherry-pick was triggered by a request on https://github.com/Microsoft/TypeScript/pull/${process.env.SOURCE_ISSUE} Please review the diff and merge if no changes are unexpected.${produceLKG ? ` An LKG update commit is included seperately from the base change.` : ""} You can view the cherry-pick log [here](https://typescript.visualstudio.com/TypeScript/_build/index?buildId=${process.env.BUILD_BUILDID}&_a=summary). @@ -90,7 +99,7 @@ cc ${reviewers.map(r => "@" + r).join(" ")}`, console.log(`Pull request ${num} created.`); await gh.issues.createComment({ - number: +process.env.SOURCE_ISSUE, + issue_number: +process.env.SOURCE_ISSUE, owner: "Microsoft", repo: "TypeScript", body: `Hey @${process.env.REQUESTING_USER}, I've opened #${num} for you.` @@ -101,13 +110,11 @@ main().catch(async e => { console.error(e); process.exitCode = 1; if (process.env.SOURCE_ISSUE) { - const gh = new Octokit(); - gh.authenticate({ - type: "token", - token: process.argv[2] + const gh = new Octokit({ + auth: process.argv[2] }); await gh.issues.createComment({ - number: +process.env.SOURCE_ISSUE, + issue_number: +process.env.SOURCE_ISSUE, owner: "Microsoft", repo: "TypeScript", body: `Hey @${process.env.REQUESTING_USER}, I couldn't open a PR with the cherry-pick. ([You can check the log here](https://typescript.visualstudio.com/TypeScript/_build/index?buildId=${process.env.BUILD_BUILDID}&_a=summary)). You may need to squash and pick this PR into ${process.env.TARGET_BRANCH} manually.` diff --git a/scripts/open-user-pr.ts b/scripts/open-user-pr.ts index a2472f3a9fab7..9ec5b3b49a23e 100644 --- a/scripts/open-user-pr.ts +++ b/scripts/open-user-pr.ts @@ -1,7 +1,7 @@ /// /// // Must reference esnext.asynciterable lib, since octokit uses AsyncIterable internally -import Octokit = require("@octokit/rest"); +import { Octokit } from "@octokit/rest"; import {runSequence} from "./run-sequence"; function padNum(num: number) { @@ -12,7 +12,7 @@ function padNum(num: number) { const userName = process.env.GH_USERNAME; const reviewers = process.env.REQUESTING_USER ? [process.env.REQUESTING_USER] : ["weswigham", "sandersn", "RyanCavanaugh"]; const now = new Date(); -const branchName = `user-update-${process.env.TARGET_FORK}-${now.getFullYear()}${padNum(now.getMonth())}${padNum(now.getDay())}${process.env.TARGET_BRANCH ? "-" + process.env.TARGET_BRANCH : ""}`; +const branchName = `user-update-${process.env.TARGET_FORK}-${now.getFullYear()}${padNum(now.getMonth() + 1)}${padNum(now.getDate())}${process.env.TARGET_BRANCH ? "-" + process.env.TARGET_BRANCH : ""}`; const remoteUrl = `https://${process.argv[2]}@github.com/${userName}/TypeScript.git`; runSequence([ ["git", ["checkout", "."]], // reset any changes @@ -24,10 +24,8 @@ runSequence([ ["git", ["push", "--set-upstream", "fork", branchName, "-f"]] // push the branch ]); -const gh = new Octokit(); -gh.authenticate({ - type: "token", - token: process.argv[2] +const gh = new Octokit({ + auth: process.argv[2] }); gh.pulls.create({ owner: process.env.TARGET_FORK!, @@ -54,7 +52,7 @@ cc ${reviewers.map(r => "@" + r).join(" ")}`, } else { await gh.issues.createComment({ - number: +process.env.SOURCE_ISSUE, + issue_number: +process.env.SOURCE_ISSUE, owner: "Microsoft", repo: "TypeScript", body: `The user suite test run you requested has finished and _failed_. I've opened a [PR with the baseline diff from master](${r.data.html_url}).` diff --git a/scripts/perf-result-post.js b/scripts/perf-result-post.js index d7b651113e11a..79d90d40c5aab 100644 --- a/scripts/perf-result-post.js +++ b/scripts/perf-result-post.js @@ -1,7 +1,7 @@ // @ts-check /// // Must reference esnext.asynciterable lib, since octokit uses AsyncIterable internally -const Octokit = require("@octokit/rest"); +const { Octokit } = require("@octokit/rest"); const fs = require("fs"); const requester = process.env.requesting_user; @@ -12,13 +12,11 @@ const outputTableText = fs.readFileSync(process.argv[3], { encoding: "utf8" }); console.log(`Fragment contents: ${outputTableText}`); -const gh = new Octokit(); -gh.authenticate({ - type: "token", - token: process.argv[2] +const gh = new Octokit({ + auth: process.argv[2] }); gh.issues.createComment({ - number: +source, + issue_number: +source, owner: "Microsoft", repo: "TypeScript", body: `@${requester} diff --git a/scripts/post-vsts-artifact-comment.js b/scripts/post-vsts-artifact-comment.js index d4de2b7c5009a..076d5a753067d 100644 --- a/scripts/post-vsts-artifact-comment.js +++ b/scripts/post-vsts-artifact-comment.js @@ -1,7 +1,7 @@ // @ts-check /// // Must reference esnext.asynciterable lib, since octokit uses AsyncIterable internally -const Octokit = require("@octokit/rest"); +const { Octokit } = require("@octokit/rest"); const ado = require("azure-devops-node-api"); const { default: fetch } = require("node-fetch"); @@ -23,10 +23,8 @@ async function main() { const tgzUrl = new URL(artifact.resource.url); tgzUrl.search = `artifactName=tgz&fileId=${file.blob.id}&fileName=${file.path}`; const link = "" + tgzUrl; - const gh = new Octokit(); - gh.authenticate({ - type: "token", - token: process.argv[2] + const gh = new Octokit({ + auth: process.argv[2] }); // Please keep the strings "an installable tgz" and "packed" in this message, as well as the devDependencies section, @@ -57,13 +55,11 @@ main().catch(async e => { console.error(e); process.exitCode = 1; if (process.env.SOURCE_ISSUE) { - const gh = new Octokit(); - gh.authenticate({ - type: "token", - token: process.argv[2] + const gh = new Octokit({ + auth: process.argv[2] }); await gh.issues.createComment({ - number: +process.env.SOURCE_ISSUE, + issue_number: +process.env.SOURCE_ISSUE, owner: "Microsoft", repo: "TypeScript", body: `Hey @${process.env.REQUESTING_USER}, something went wrong when looking for the build artifact. ([You can check the log here](https://typescript.visualstudio.com/TypeScript/_build/index?buildId=${process.env.BUILD_BUILDID}&_a=summary)).` diff --git a/scripts/update-experimental-branches.js b/scripts/update-experimental-branches.js index 3c25e2f2dc6fc..94a101cc2b80f 100644 --- a/scripts/update-experimental-branches.js +++ b/scripts/update-experimental-branches.js @@ -1,6 +1,6 @@ // @ts-check /// -const Octokit = require("@octokit/rest"); +const { Octokit } = require("@octokit/rest"); const { runSequence } = require("./run-sequence"); // The first is used by bot-based kickoffs, the second by automatic triggers @@ -76,7 +76,8 @@ async function main() { ]); // Merge each branch into `experimental` (which, if there is a conflict, we now know is from inter-experiment conflict) - for (const branch of prnums) { + for (const branchnum of prnums) { + const branch = "" + branchnum; // Find the merge base const mergeBase = runSequence([ ["git", ["merge-base", branch, "experimental"]], diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 5e800801a8994..bcc60fec8267f 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -409,7 +409,7 @@ namespace ts { } function getDisplayName(node: Declaration): string { - return isNamedDeclaration(node) ? declarationNameToString(node.name) : unescapeLeadingUnderscores(Debug.assertDefined(getDeclarationName(node))); + return isNamedDeclaration(node) ? declarationNameToString(node.name) : unescapeLeadingUnderscores(Debug.checkDefined(getDeclarationName(node))); } /** @@ -955,6 +955,10 @@ namespace ts { return initFlowNode({ flags: FlowFlags.LoopLabel, antecedents: undefined }); } + function createReduceLabel(target: FlowLabel, antecedents: FlowNode[], antecedent: FlowNode): FlowReduceLabel { + return initFlowNode({ flags: FlowFlags.ReduceLabel, target, antecedents, antecedent }); + } + function setFlowNodeReferenced(flow: FlowNode) { // On first reference we set the Referenced flag, thereafter we set the Shared flag flow.flags |= flow.flags & FlowFlags.Referenced ? FlowFlags.Shared : FlowFlags.Referenced; @@ -1212,35 +1216,36 @@ namespace ts { } function bindTryStatement(node: TryStatement): void { - const preFinallyLabel = createBranchLabel(); // We conservatively assume that *any* code in the try block can cause an exception, but we only need // to track code that causes mutations (because only mutations widen the possible control flow type of - // a variable). The currentExceptionTarget is the target label for control flows that result from - // exceptions. We add all mutation flow nodes as antecedents of this label such that we can analyze them - // as possible antecedents of the start of catch or finally blocks. Furthermore, we add the current - // control flow to represent exceptions that occur before any mutations. + // a variable). The exceptionLabel is the target label for control flows that result from exceptions. + // We add all mutation flow nodes as antecedents of this label such that we can analyze them as possible + // antecedents of the start of catch or finally blocks. Furthermore, we add the current control flow to + // represent exceptions that occur before any mutations. const saveReturnTarget = currentReturnTarget; const saveExceptionTarget = currentExceptionTarget; - currentReturnTarget = createBranchLabel(); - currentExceptionTarget = node.catchClause ? createBranchLabel() : currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + const normalExitLabel = createBranchLabel(); + const returnLabel = createBranchLabel(); + let exceptionLabel = createBranchLabel(); + if (node.finallyBlock) { + currentReturnTarget = returnLabel; + } + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.tryBlock); - addAntecedent(preFinallyLabel, currentFlow); - const flowAfterTry = currentFlow; - let flowAfterCatch = unreachableFlow; + addAntecedent(normalExitLabel, currentFlow); if (node.catchClause) { // Start of catch clause is the target of exceptions from try block. - currentFlow = finishFlowLabel(currentExceptionTarget); + currentFlow = finishFlowLabel(exceptionLabel); // The currentExceptionTarget now represents control flows from exceptions in the catch clause. // Effectively, in a try-catch-finally, if an exception occurs in the try block, the catch block // acts like a second try block. - currentExceptionTarget = currentReturnTarget; - addAntecedent(currentExceptionTarget, currentFlow); + exceptionLabel = createBranchLabel(); + addAntecedent(exceptionLabel, currentFlow); + currentExceptionTarget = exceptionLabel; bind(node.catchClause); - addAntecedent(preFinallyLabel, currentFlow); - flowAfterCatch = currentFlow; + addAntecedent(normalExitLabel, currentFlow); } - const exceptionTarget = finishFlowLabel(currentExceptionTarget); currentReturnTarget = saveReturnTarget; currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { @@ -1253,35 +1258,33 @@ namespace ts { // When analyzing a control flow graph that starts inside a finally block we want to consider all // five possibilities above. However, when analyzing a control flow graph that starts outside (past) // the finally block, we only want to consider the first two (if we're past a finally block then it - // must have completed normally). To make this possible, we inject two extra nodes into the control - // flow graph: An after-finally with an antecedent of the control flow at the end of the finally - // block, and a pre-finally with an antecedent that represents all exceptional control flows. The - // 'lock' property of the pre-finally references the after-finally, and the after-finally has a - // boolean 'locked' property that we set to true when analyzing a control flow that contained the - // the after-finally node. When the lock associated with a pre-finally is locked, the antecedent of - // the pre-finally (i.e. the exceptional control flows) are skipped. - const preFinallyFlow: PreFinallyFlow = initFlowNode({ flags: FlowFlags.PreFinally, antecedent: exceptionTarget, lock: {} }); - addAntecedent(preFinallyLabel, preFinallyFlow); - currentFlow = finishFlowLabel(preFinallyLabel); + // must have completed normally). Likewise, when analyzing a control flow graph from return statements + // in try or catch blocks in an IIFE, we only want to consider the third. To make this possible, we + // inject a ReduceLabel node into the control flow graph. This node contains an alternate reduced + // set of antecedents for the pre-finally label. As control flow analysis passes by a ReduceLabel + // node, the pre-finally label is temporarily switched to the reduced antecedent set. + const finallyLabel = createBranchLabel(); + finallyLabel.antecedents = concatenate(concatenate(normalExitLabel.antecedents, exceptionLabel.antecedents), returnLabel.antecedents); + currentFlow = finallyLabel; bind(node.finallyBlock); - // If the end of the finally block is reachable, but the end of the try and catch blocks are not, - // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should - // result in an unreachable current control flow. - if (!(currentFlow.flags & FlowFlags.Unreachable)) { - if ((flowAfterTry.flags & FlowFlags.Unreachable) && (flowAfterCatch.flags & FlowFlags.Unreachable)) { - currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow - ? reportedUnreachableFlow - : unreachableFlow; - } + if (currentFlow.flags & FlowFlags.Unreachable) { + // If the end of the finally block is unreachable, the end of the entire try statement is unreachable. + currentFlow = unreachableFlow; } - if (!(currentFlow.flags & FlowFlags.Unreachable)) { - const afterFinallyFlow: AfterFinallyFlow = initFlowNode({ flags: FlowFlags.AfterFinally, antecedent: currentFlow }); - preFinallyFlow.lock = afterFinallyFlow; - currentFlow = afterFinallyFlow; + else { + // If we have an IIFE return target and return statements in the try or catch blocks, add a control + // flow that goes back through the finally block and back through only the return statements. + if (currentReturnTarget && returnLabel.antecedents) { + addAntecedent(currentReturnTarget, createReduceLabel(finallyLabel, returnLabel.antecedents, currentFlow)); + } + // If the end of the finally block is reachable, but the end of the try and catch blocks are not, + // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should + // result in an unreachable current control flow. + currentFlow = normalExitLabel.antecedents ? createReduceLabel(finallyLabel, normalExitLabel.antecedents, currentFlow) : unreachableFlow; } } else { - currentFlow = finishFlowLabel(preFinallyLabel); + currentFlow = finishFlowLabel(normalExitLabel); } } @@ -2129,7 +2132,9 @@ namespace ts { container = (declName.parent.expression as PropertyAccessExpression).name; break; case AssignmentDeclarationKind.Property: - container = isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression; + container = isExportsOrModuleExportsOrAlias(file, declName.parent.expression) ? file + : isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name + : declName.parent.expression; break; case AssignmentDeclarationKind.None: return Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); @@ -4140,8 +4145,18 @@ namespace ts { case SyntaxKind.TemplateHead: case SyntaxKind.TemplateMiddle: case SyntaxKind.TemplateTail: - case SyntaxKind.TemplateExpression: + if ((node).templateFlags) { + transformFlags |= TransformFlags.AssertES2018; + break; + } + // falls through case SyntaxKind.TaggedTemplateExpression: + if (hasInvalidEscape((node).template)) { + transformFlags |= TransformFlags.AssertES2018; + break; + } + // falls through + case SyntaxKind.TemplateExpression: case SyntaxKind.ShorthandPropertyAssignment: case SyntaxKind.StaticKeyword: case SyntaxKind.MetaProperty: diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 0f6ce885ed2a4..d79ca0447a8f4 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -366,7 +366,7 @@ namespace ts { // With --out or --outFile all outputs go into single file // so operations are performed directly on program, return program - const program = Debug.assertDefined(state.program); + const program = Debug.checkDefined(state.program); const compilerOptions = program.getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { Debug.assert(!state.semanticDiagnosticsPerFile); @@ -393,10 +393,10 @@ namespace ts { if (affectedFilesPendingEmit) { const seenEmittedFiles = state.seenEmittedFiles || (state.seenEmittedFiles = createMap()); for (let i = state.affectedFilesPendingEmitIndex!; i < affectedFilesPendingEmit.length; i++) { - const affectedFile = Debug.assertDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); + const affectedFile = Debug.checkDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]); if (affectedFile) { const seenKind = seenEmittedFiles.get(affectedFile.resolvedPath); - const emitKind = Debug.assertDefined(Debug.assertDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); + const emitKind = Debug.checkDefined(Debug.checkDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath)); if (seenKind === undefined || seenKind < emitKind) { // emit this file state.affectedFilesPendingEmitIndex = i; @@ -422,7 +422,7 @@ namespace ts { if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) { if (!state.cleanedDiagnosticsOfLibFiles) { state.cleanedDiagnosticsOfLibFiles = true; - const program = Debug.assertDefined(state.program); + const program = Debug.checkDefined(state.program); const options = program.getCompilerOptions(); forEach(program.getSourceFiles(), f => program.isSourceFileDefaultLibrary(f) && @@ -446,7 +446,7 @@ namespace ts { removeSemanticDiagnosticsOf(state, path); if (!state.changedFilesSet.has(path)) { - const program = Debug.assertDefined(state.program); + const program = Debug.checkDefined(state.program); const sourceFile = program.getSourceFileByPath(path); if (sourceFile) { // Even though the js emit doesnt change and we are already handling dts emit and semantic diagnostics @@ -457,7 +457,7 @@ namespace ts { state, program, sourceFile, - Debug.assertDefined(state.currentAffectedFilesSignatures), + Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap @@ -486,8 +486,8 @@ namespace ts { } function isChangedSignagure(state: BuilderProgramState, path: Path) { - const newSignature = Debug.assertDefined(state.currentAffectedFilesSignatures).get(path); - const oldSignagure = Debug.assertDefined(state.fileInfos.get(path)).signature; + const newSignature = Debug.checkDefined(state.currentAffectedFilesSignatures).get(path); + const oldSignagure = Debug.checkDefined(state.fileInfos.get(path)).signature; return newSignature !== oldSignagure; } @@ -515,7 +515,7 @@ namespace ts { seenFileNamesMap.set(currentPath, true); const result = fn(state, currentPath); if (result && isChangedSignagure(state, currentPath)) { - const currentSourceFile = Debug.assertDefined(state.program).getSourceFileByPath(currentPath)!; + const currentSourceFile = Debug.checkDefined(state.program).getSourceFileByPath(currentPath)!; queue.push(...BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath)); } } @@ -526,7 +526,7 @@ namespace ts { const seenFileAndExportsOfFile = createMap(); // Go through exported modules from cache first // If exported modules has path, all files referencing file exported from are affected - if (forEachEntry(state.currentAffectedFilesExportedModulesMap!, (exportedModules, exportedFromPath) => + if (forEachEntry(state.currentAffectedFilesExportedModulesMap, (exportedModules, exportedFromPath) => exportedModules && exportedModules.has(affectedFile.resolvedPath) && forEachFilesReferencingPath(state, exportedFromPath as Path, seenFileAndExportsOfFile, fn) @@ -567,7 +567,7 @@ namespace ts { Debug.assert(!!state.currentAffectedFilesExportedModulesMap); // Go through exported modules from cache first // If exported modules has path, all files referencing file exported from are affected - if (forEachEntry(state.currentAffectedFilesExportedModulesMap!, (exportedModules, exportedFromPath) => + if (forEachEntry(state.currentAffectedFilesExportedModulesMap, (exportedModules, exportedFromPath) => exportedModules && exportedModules.has(filePath) && forEachFileAndExportsOfFile(state, exportedFromPath as Path, seenFileAndExportsOfFile, fn) @@ -655,7 +655,7 @@ namespace ts { function getSemanticDiagnosticsOfFile(state: BuilderProgramState, sourceFile: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[] { return concatenate( getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), - Debug.assertDefined(state.program).getProgramDiagnostics(sourceFile) + Debug.checkDefined(state.program).getProgramDiagnostics(sourceFile) ); } @@ -674,7 +674,7 @@ namespace ts { } // Diagnostics werent cached, get them from program, and cache the result - const diagnostics = Debug.assertDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); + const diagnostics = Debug.checkDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); if (state.semanticDiagnosticsPerFile) { state.semanticDiagnosticsPerFile.set(path, diagnostics); } @@ -695,7 +695,7 @@ namespace ts { */ function getProgramBuildInfo(state: Readonly, getCanonicalFileName: GetCanonicalFileName): ProgramBuildInfo | undefined { if (state.compilerOptions.outFile || state.compilerOptions.out) return undefined; - const currentDirectory = Debug.assertDefined(state.program).getCurrentDirectory(); + const currentDirectory = Debug.checkDefined(state.program).getCurrentDirectory(); const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(state.compilerOptions)!, currentDirectory)); const fileInfos: MapLike = {}; state.fileInfos.forEach((value, key) => { @@ -891,10 +891,10 @@ namespace ts { backupState = cloneBuilderProgramState(state); }; builderProgram.restoreState = () => { - state = Debug.assertDefined(backupState); + state = Debug.checkDefined(backupState); backupState = undefined; }; - builderProgram.getAllDependencies = sourceFile => BuilderState.getAllDependencies(state, Debug.assertDefined(state.program), sourceFile); + builderProgram.getAllDependencies = sourceFile => BuilderState.getAllDependencies(state, Debug.checkDefined(state.program), sourceFile); builderProgram.getSemanticDiagnostics = getSemanticDiagnostics; builderProgram.emit = emit; builderProgram.releaseProgram = () => { @@ -932,7 +932,7 @@ namespace ts { return undefined; } - const affected = Debug.assertDefined(state.program); + const affected = Debug.checkDefined(state.program); return toAffectedFileEmitResult( state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) @@ -948,7 +948,7 @@ namespace ts { isPendingEmitFile = true; } else { - const program = Debug.assertDefined(state.program); + const program = Debug.checkDefined(state.program); if (state.programEmitComplete) return undefined; affected = program; } @@ -958,7 +958,7 @@ namespace ts { state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file - Debug.assertDefined(state.program).emit( + Debug.checkDefined(state.program).emit( affected === state.program ? undefined : affected as SourceFile, writeFile || maybeBind(host, host.writeFile), cancellationToken, @@ -1009,7 +1009,7 @@ namespace ts { }; } } - return Debug.assertDefined(state.program).emit(targetSourceFile, writeFile || maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); + return Debug.checkDefined(state.program).emit(targetSourceFile, writeFile || maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); } /** @@ -1062,11 +1062,11 @@ namespace ts { */ function getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[] { assertSourceFileOkWithoutNextAffectedCall(state, sourceFile); - const compilerOptions = Debug.assertDefined(state.program).getCompilerOptions(); + const compilerOptions = Debug.checkDefined(state.program).getCompilerOptions(); if (compilerOptions.outFile || compilerOptions.out) { Debug.assert(!state.semanticDiagnosticsPerFile); // We dont need to cache the diagnostics just return them from program - return Debug.assertDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); + return Debug.checkDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); } if (sourceFile) { @@ -1080,7 +1080,7 @@ namespace ts { } let diagnostics: Diagnostic[] | undefined; - for (const sourceFile of Debug.assertDefined(state.program).getSourceFiles()) { + for (const sourceFile of Debug.checkDefined(state.program).getSourceFiles()) { diagnostics = addRange(diagnostics, getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken)); } return diagnostics || emptyArray; @@ -1193,7 +1193,7 @@ namespace ts { }; function getProgram() { - return Debug.assertDefined(state.program); + return Debug.checkDefined(state.program); } } } diff --git a/src/compiler/builderState.ts b/src/compiler/builderState.ts index 730f82017f437..00f51cbedb6c8 100644 --- a/src/compiler/builderState.ts +++ b/src/compiler/builderState.ts @@ -210,7 +210,7 @@ namespace ts { // Create the reference map, and set the file infos for (const sourceFile of newProgram.getSourceFiles()) { - const version = Debug.assertDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); + const version = Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); const oldInfo = useOldState ? oldState!.fileInfos.get(sourceFile.resolvedPath) : undefined; if (referencedMap) { const newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName); diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7c90968132cb5..d3375d87faaa3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -163,7 +163,6 @@ namespace ts { ResolvedReturnType, ImmediateBaseConstraint, EnumTagType, - JSDocTypeReference, ResolvedTypeArguments, } @@ -299,6 +298,7 @@ namespace ts { let typeCount = 0; let symbolCount = 0; let enumCount = 0; + let totalInstantiationCount = 0; let instantiationCount = 0; let instantiationDepth = 0; let constraintDepth = 0; @@ -349,6 +349,7 @@ namespace ts { getIdentifierCount: () => sum(host.getSourceFiles(), "identifierCount"), getSymbolCount: () => sum(host.getSourceFiles(), "symbolCount") + symbolCount, getTypeCount: () => typeCount, + getInstantiationCount: () => totalInstantiationCount, getRelationCacheSizes: () => ({ assignable: assignableRelation.size, identity: identityRelation.size, @@ -415,7 +416,8 @@ namespace ts { }, getSymbolAtLocation: node => { node = getParseTreeNode(node); - return node ? getSymbolAtLocation(node) : undefined; + // set ignoreErrors: true because any lookups invoked by the API shouldn't cause any new errors + return node ? getSymbolAtLocation(node, /*ignoreErrors*/ true) : undefined; }, getShorthandAssignmentValueSymbol: node => { node = getParseTreeNode(node); @@ -468,7 +470,29 @@ namespace ts { getRootSymbols, getContextualType: (nodeIn: Expression, contextFlags?: ContextFlags) => { const node = getParseTreeNode(nodeIn, isExpression); - return node ? getContextualType(node, contextFlags) : undefined; + if (!node) { + return undefined; + } + const containingCall = findAncestor(node, isCallLikeExpression); + const containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; + if (contextFlags! & ContextFlags.Completions && containingCall) { + let toMarkSkip = node as Node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = true; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = undefined; + } + const result = getContextualType(node, contextFlags); + if (contextFlags! & ContextFlags.Completions && containingCall) { + let toMarkSkip = node as Node; + do { + getNodeLinks(toMarkSkip).skipDirectInference = undefined; + toMarkSkip = toMarkSkip.parent; + } while (toMarkSkip && toMarkSkip !== containingCall); + getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + } + return result; }, getContextualTypeForObjectLiteralElement: nodeIn => { const node = getParseTreeNode(nodeIn, isObjectLiteralElementLike); @@ -918,6 +942,7 @@ namespace ts { if (jsxPragma) { const chosenpragma = isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); + visitNode(file.localJsxFactory, markAsSynthetic); if (file.localJsxFactory) { return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText; } @@ -928,6 +953,7 @@ namespace ts { _jsxNamespace = "React" as __String; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); + visitNode(_jsxFactoryEntity, markAsSynthetic); if (_jsxFactoryEntity) { _jsxNamespace = getFirstIdentifier(_jsxFactoryEntity).escapedText; } @@ -936,7 +962,16 @@ namespace ts { _jsxNamespace = escapeLeadingUnderscores(compilerOptions.reactNamespace); } } + if (!_jsxFactoryEntity) { + _jsxFactoryEntity = createQualifiedName(createIdentifier(unescapeLeadingUnderscores(_jsxNamespace)), "createElement"); + } return _jsxNamespace; + + function markAsSynthetic(node: Node): VisitResult { + node.pos = -1; + node.end = -1; + return visitEachChild(node, markAsSynthetic, nullTransformationContext); + } } function getEmitResolver(sourceFile: SourceFile, cancellationToken: CancellationToken) { @@ -1901,10 +1936,11 @@ namespace ts { if (!isValidTypeOnlyAliasUseSite(useSite)) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol); if (typeOnlyDeclaration) { - const message = typeOnlyDeclaration.kind === SyntaxKind.ExportSpecifier + const isExport = typeOnlyDeclarationIsExport(typeOnlyDeclaration); + const message = isExport ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; - const relatedMessage = typeOnlyDeclaration.kind === SyntaxKind.ExportSpecifier + const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; const unescapedName = unescapeLeadingUnderscores(name); @@ -2251,12 +2287,14 @@ namespace ts { function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node: ImportEqualsDeclaration, resolved: Symbol | undefined) { if (markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false)) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node))!; - const message = typeOnlyDeclaration.kind === SyntaxKind.ExportSpecifier + const isExport = typeOnlyDeclarationIsExport(typeOnlyDeclaration); + const message = isExport ? Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; - const relatedMessage = typeOnlyDeclaration.kind === SyntaxKind.ExportSpecifier + const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; + // Non-null assertion is safe because the optionality comes from ImportClause, // but if an ImportClause was the typeOnlyDeclaration, it had to have a `name`. const name = unescapeLeadingUnderscores(typeOnlyDeclaration.name!.escapedText); @@ -2372,7 +2410,10 @@ namespace ts { function getTargetOfNamespaceExport(node: NamespaceExport, dontResolveAlias: boolean): Symbol | undefined { const moduleSpecifier = node.parent.moduleSpecifier; - return moduleSpecifier && resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + const immediate = moduleSpecifier && resolveExternalModuleName(node, moduleSpecifier); + const resolved = moduleSpecifier && resolveESModuleSymbol(immediate, moduleSpecifier, dontResolveAlias, /*suppressUsageError*/ false); + markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); + return resolved; } // This function creates a synthetic symbol that combines the value side of one symbol with the @@ -2506,8 +2547,8 @@ namespace ts { : error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); addRelatedInfo(diagnostic, - createDiagnosticForNode(localSymbol.valueDeclaration, Diagnostics._0_is_declared_here, declarationName) - ); + ...map(localSymbol.declarations, (decl, index) => + createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName))); } else { error(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); @@ -2521,7 +2562,9 @@ namespace ts { } function getTargetOfNamespaceExportDeclaration(node: NamespaceExportDeclaration, dontResolveAlias: boolean): Symbol { - return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); + const resolved = resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); + markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); + return resolved; } function getTargetOfExportSpecifier(node: ExportSpecifier, meaning: SymbolFlags, dontResolveAlias?: boolean) { @@ -2775,8 +2818,8 @@ namespace ts { const namespaceMeaning = SymbolFlags.Namespace | (isInJSFile(name) ? meaning & SymbolFlags.Value : 0); let symbol: Symbol | undefined; if (name.kind === SyntaxKind.Identifier) { - const message = meaning === namespaceMeaning ? Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name)); - const symbolFromJSPrototype = isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; + const message = meaning === namespaceMeaning || nodeIsSynthesized(name) ? Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name)); + const symbolFromJSPrototype = isInJSFile(name) && !nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true); if (!symbol) { return symbolFromJSPrototype; @@ -2819,7 +2862,7 @@ namespace ts { throw Debug.assertNever(name, "Unknown entity name kind."); } Debug.assert((getCheckFlags(symbol) & CheckFlags.Instantiated) === 0, "Should never get an instantiated symbol here."); - if (isEntityName(name) && (symbol.flags & SymbolFlags.Alias || name.parent.kind === SyntaxKind.ExportAssignment)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & SymbolFlags.Alias || name.parent.kind === SyntaxKind.ExportAssignment)) { markSymbolOfAliasDeclarationIfTypeOnly(getAliasDeclarationFromName(name), symbol, /*finalTarget*/ undefined, /*overwriteEmpty*/ true); } return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol); @@ -4796,7 +4839,7 @@ namespace ts { let chain: Symbol[]; const isTypeParameter = symbol.flags & SymbolFlags.TypeParameter; if (!isTypeParameter && (context.enclosingDeclaration || context.flags & NodeBuilderFlags.UseFullyQualifiedType) && !(context.flags & NodeBuilderFlags.DoNotIncludeSymbolChain)) { - chain = Debug.assertDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); + chain = Debug.checkDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); Debug.assert(chain && chain.length > 0); } else { @@ -5580,9 +5623,9 @@ namespace ts { function includePrivateSymbol(symbol: Symbol) { if (some(symbol.declarations, isParameterDeclaration)) return; - Debug.assertDefined(deferredPrivates); + Debug.assertIsDefined(deferredPrivates); getUnusedName(unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol - deferredPrivates!.set("" + getSymbolId(symbol), symbol); + deferredPrivates.set("" + getSymbolId(symbol), symbol); } function isExportingScope(enclosingDeclaration: Node) { @@ -5849,18 +5892,22 @@ namespace ts { const typeParamDecls = map(localParams, p => typeParameterToDeclaration(p, context)); const classType = getDeclaredTypeOfClassOrInterface(symbol); const baseTypes = getBaseTypes(classType); + const implementsTypes = getImplementsTypes(classType); const staticType = getTypeOfSymbol(symbol); const staticBaseType = getBaseConstructorTypeOfClass(staticType as InterfaceType); - const heritageClauses = !length(baseTypes) ? undefined : [createHeritageClause(SyntaxKind.ExtendsKeyword, map(baseTypes, b => serializeBaseType(b, staticBaseType, localName)))]; + const heritageClauses = [ + ...!length(baseTypes) ? [] : [createHeritageClause(SyntaxKind.ExtendsKeyword, map(baseTypes, b => serializeBaseType(b, staticBaseType, localName)))], + ...!length(implementsTypes) ? [] : [createHeritageClause(SyntaxKind.ImplementsKeyword, map(implementsTypes, b => serializeBaseType(b, staticBaseType, localName)))] + ]; const symbolProps = getPropertiesOfType(classType); const publicSymbolProps = filter(symbolProps, s => { const valueDecl = s.valueDeclaration; - Debug.assertDefined(valueDecl); + Debug.assertIsDefined(valueDecl); return !(isNamedDeclaration(valueDecl) && isPrivateIdentifier(valueDecl.name)); }); const hasPrivateIdentifier = some(symbolProps, s => { const valueDecl = s.valueDeclaration; - Debug.assertDefined(valueDecl); + Debug.assertIsDefined(valueDecl); return isNamedDeclaration(valueDecl) && isPrivateIdentifier(valueDecl.name); }); // Boil down all private properties into a single one. @@ -6166,7 +6213,7 @@ namespace ts { && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName)!))) { return []; } - const flag = modifierFlags | (isStatic ? ModifierFlags.Static : 0); + const flag = (modifierFlags & ~ModifierFlags.Async) | (isStatic ? ModifierFlags.Static : 0); const name = getPropertyNameNodeForSymbol(p, context); const firstPropertyLikeDecl = find(p.declarations, or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression)); if (p.flags & SymbolFlags.Accessor && useAccessors) { @@ -6915,8 +6962,6 @@ namespace ts { return !!(target).resolvedReturnType; case TypeSystemPropertyName.ImmediateBaseConstraint: return !!(target).immediateBaseConstraint; - case TypeSystemPropertyName.JSDocTypeReference: - return !!getSymbolLinks(target as Symbol).resolvedJSDocType; case TypeSystemPropertyName.ResolvedTypeArguments: return !!(target as TypeReference).resolvedTypeArguments; } @@ -7839,8 +7884,8 @@ namespace ts { } else { Debug.assert(!!getter, "there must exist a getter as we are current checking either setter or getter in this function"); - if (!isPrivateWithinAmbient(getter!)) { - errorOrSuggestion(noImplicitAny, getter!, Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + if (!isPrivateWithinAmbient(getter)) { + errorOrSuggestion(noImplicitAny, getter, Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); } } return anyType; @@ -7966,9 +8011,9 @@ namespace ts { function getTypeOfSymbolWithDeferredType(symbol: Symbol) { const links = getSymbolLinks(symbol); if (!links.type) { - Debug.assertDefined(links.deferralParent); - Debug.assertDefined(links.deferralConstituents); - links.type = links.deferralParent!.flags & TypeFlags.Union ? getUnionType(links.deferralConstituents!) : getIntersectionType(links.deferralConstituents!); + Debug.assertIsDefined(links.deferralParent); + Debug.assertIsDefined(links.deferralConstituents); + links.type = links.deferralParent.flags & TypeFlags.Union ? getUnionType(links.deferralConstituents) : getIntersectionType(links.deferralConstituents); } return links.type; } @@ -8213,6 +8258,26 @@ namespace ts { return type.resolvedBaseConstructorType; } + function getImplementsTypes(type: InterfaceType): BaseType[] { + let resolvedImplementsTypes: BaseType[] = emptyArray; + for (const declaration of type.symbol.declarations) { + const implementsTypeNodes = getEffectiveImplementsTypeNodes(declaration as ClassLikeDeclaration); + if (!implementsTypeNodes) continue; + for (const node of implementsTypeNodes) { + const implementsType = getTypeFromTypeNode(node); + if (implementsType !== errorType) { + if (resolvedImplementsTypes === emptyArray) { + resolvedImplementsTypes = [implementsType]; + } + else { + resolvedImplementsTypes.push(implementsType); + } + } + } + } + return resolvedImplementsTypes; + } + function getBaseTypes(type: InterfaceType): BaseType[] { if (!type.resolvedBaseTypes) { if (type.objectFlags & ObjectFlags.Tuple) { @@ -8415,7 +8480,7 @@ namespace ts { return errorType; } - const declaration = Debug.assertDefined(find(symbol.declarations, isTypeAlias), "Type alias symbol with no valid declaration found"); + const declaration = Debug.checkDefined(find(symbol.declarations, isTypeAlias), "Type alias symbol with no valid declaration found"); const typeNode = isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; // If typeNode is missing, we will error in checkJSDocTypedefTag. let type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; @@ -9565,7 +9630,7 @@ namespace ts { // When creating an optional property in strictNullChecks mode, if 'undefined' isn't assignable to the // type, we include 'undefined' in the type. Similarly, when creating a non-optional property in strictNullChecks // mode, if the underlying property is optional we remove 'undefined' from the type. - prop.type = strictNullChecks && isOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + prop.type = strictNullChecks && isOptional && !maybeTypeOfKind(propType, TypeFlags.Undefined | TypeFlags.Void) ? getOptionalType(propType) : strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & SymbolFlags.Optional ? getTypeWithFacts(propType, TypeFacts.NEUndefined) : propType; if (modifiersProp) { @@ -11066,7 +11131,7 @@ namespace ts { return errorType; } } - if (node.kind === SyntaxKind.TypeReference && isAliasedType(node)) { + if (node.kind === SyntaxKind.TypeReference && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference(type, node, /*mapper*/ undefined); } // In a type reference, the outer type parameters of the referenced class or interface are automatically @@ -11179,7 +11244,7 @@ namespace ts { * but this function's special-case code fakes alias resolution as well. */ function getTypeFromJSDocValueReference(node: NodeWithTypeArguments, symbol: Symbol): Type | undefined { - const links = getSymbolLinks(symbol); + const links = getNodeLinks(node); if (!links.resolvedJSDocType) { const valueType = getTypeOfSymbol(symbol); let typeType = valueType; @@ -11312,6 +11377,11 @@ namespace ts { function getTypeFromTypeReference(node: TypeReferenceType): Type { const links = getNodeLinks(node); if (!links.resolvedType) { + // handle LS queries on the `const` in `x as const` by resolving to the type of `x` + if (isConstTypeReference(node) && isAssertionExpression(node.parent)) { + links.resolvedSymbol = unknownSymbol; + return links.resolvedType = checkExpressionCached(node.parent.expression); + } let symbol: Symbol | undefined; let type: Type | undefined; const meaning = SymbolFlags.Type; @@ -11528,10 +11598,19 @@ namespace ts { return getTupleTypeOfArity(node.elementTypes.length, minLength, !!restElement, readonly, /*associatedNames*/ undefined); } + // Return true if the given type reference node is directly aliased or if it needs to be deferred + // because it is possibly contained in a circular chain of eagerly resolved types. + function isDeferredTypeReferenceNode(node: TypeReferenceNode | ArrayTypeNode | TupleTypeNode, hasDefaultTypeArguments?: boolean) { + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && ( + node.kind === SyntaxKind.ArrayType ? mayResolveTypeAlias(node.elementType) : + node.kind === SyntaxKind.TupleType ? some(node.elementTypes, mayResolveTypeAlias) : + hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + } + // Return true when the given node is transitively contained in type constructs that eagerly // resolve their constituent types. We include SyntaxKind.TypeReference because type arguments // of type aliases are eagerly resolved. - function isAliasedType(node: Node): boolean { + function isResolvedByTypeAlias(node: Node): boolean { const parent = node.parent; switch (parent.kind) { case SyntaxKind.ParenthesizedType: @@ -11541,13 +11620,44 @@ namespace ts { case SyntaxKind.IndexedAccessType: case SyntaxKind.ConditionalType: case SyntaxKind.TypeOperator: - return isAliasedType(parent); + return isResolvedByTypeAlias(parent); case SyntaxKind.TypeAliasDeclaration: return true; } return false; } + // Return true if resolving the given node (i.e. getTypeFromTypeNode) possibly causes resolution + // of a type alias. + function mayResolveTypeAlias(node: Node): boolean { + switch (node.kind) { + case SyntaxKind.TypeReference: + return isJSDocTypeReference(node) || !!(resolveTypeReferenceName((node).typeName, SymbolFlags.Type).flags & SymbolFlags.TypeAlias); + case SyntaxKind.TypeQuery: + return true; + case SyntaxKind.TypeOperator: + return (node).operator !== SyntaxKind.UniqueKeyword && mayResolveTypeAlias((node).type); + case SyntaxKind.ParenthesizedType: + case SyntaxKind.OptionalType: + case SyntaxKind.JSDocOptionalType: + case SyntaxKind.JSDocNullableType: + case SyntaxKind.JSDocNonNullableType: + case SyntaxKind.JSDocTypeExpression: + return mayResolveTypeAlias((node).type); + case SyntaxKind.RestType: + return (node).type.kind !== SyntaxKind.ArrayType || mayResolveTypeAlias(((node).type).elementType); + case SyntaxKind.UnionType: + case SyntaxKind.IntersectionType: + return some((node).types, mayResolveTypeAlias); + case SyntaxKind.IndexedAccessType: + return mayResolveTypeAlias((node).objectType) || mayResolveTypeAlias((node).indexType); + case SyntaxKind.ConditionalType: + return mayResolveTypeAlias((node).checkType) || mayResolveTypeAlias((node).extendsType) || + mayResolveTypeAlias((node).trueType) || mayResolveTypeAlias((node).falseType); + } + return false; + } + function getTypeFromArrayOrTupleTypeNode(node: ArrayTypeNode | TupleTypeNode): Type { const links = getNodeLinks(node); if (!links.resolvedType) { @@ -11555,7 +11665,7 @@ namespace ts { if (target === emptyGenericType) { links.resolvedType = emptyObjectType; } - else if (isAliasedType(node)) { + else if (isDeferredTypeReferenceNode(node)) { links.resolvedType = node.kind === SyntaxKind.TupleType && node.elementTypes.length === 0 ? target : createDeferredTypeReference(target, node, /*mapper*/ undefined); } @@ -12434,11 +12544,25 @@ namespace ts { } function isGenericObjectType(type: Type): boolean { - return maybeTypeOfKind(type, TypeFlags.InstantiableNonPrimitive | TypeFlags.GenericMappedType); + if (type.flags & TypeFlags.UnionOrIntersection) { + if (!((type).objectFlags & ObjectFlags.IsGenericObjectTypeComputed)) { + (type).objectFlags |= ObjectFlags.IsGenericObjectTypeComputed | + (some((type).types, isGenericObjectType) ? ObjectFlags.IsGenericObjectType : 0); + } + return !!((type).objectFlags & ObjectFlags.IsGenericObjectType); + } + return !!(type.flags & TypeFlags.InstantiableNonPrimitive) || isGenericMappedType(type); } function isGenericIndexType(type: Type): boolean { - return maybeTypeOfKind(type, TypeFlags.InstantiableNonPrimitive | TypeFlags.Index); + if (type.flags & TypeFlags.UnionOrIntersection) { + if (!((type).objectFlags & ObjectFlags.IsGenericIndexTypeComputed)) { + (type).objectFlags |= ObjectFlags.IsGenericIndexTypeComputed | + (some((type).types, isGenericIndexType) ? ObjectFlags.IsGenericIndexType : 0); + } + return !!((type).objectFlags & ObjectFlags.IsGenericIndexType); + } + return !!(type.flags & (TypeFlags.InstantiableNonPrimitive | TypeFlags.Index)); } function isThisTypeParameter(type: Type): boolean { @@ -12662,7 +12786,7 @@ namespace ts { if (checkType === wildcardType || extendsType === wildcardType) { return wildcardType; } - const checkTypeInstantiable = maybeTypeOfKind(checkType, TypeFlags.Instantiable | TypeFlags.GenericMappedType); + const checkTypeInstantiable = isGenericObjectType(checkType) || isGenericIndexType(checkType); let combinedMapper: TypeMapper | undefined; if (root.inferTypeParameters) { const context = createInferenceContext(root.inferTypeParameters, /*signature*/ undefined, InferenceFlags.None); @@ -12681,7 +12805,7 @@ namespace ts { // Instantiate the extends type including inferences for 'infer T' type parameters const inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType; // We attempt to resolve the conditional type only when the check and extends types are non-generic - if (!checkTypeInstantiable && !maybeTypeOfKind(inferredExtendsType, TypeFlags.Instantiable | TypeFlags.GenericMappedType)) { + if (!checkTypeInstantiable && !isGenericObjectType(inferredExtendsType) && !isGenericIndexType(inferredExtendsType)) { if (inferredExtendsType.flags & TypeFlags.AnyOrUnknown) { return instantiateType(root.trueType, combinedMapper || mapper); } @@ -12878,7 +13002,7 @@ namespace ts { return links.resolvedType; } - function getAliasSymbolForTypeNode(node: TypeNode) { + function getAliasSymbolForTypeNode(node: Node) { let host = node.parent; while (isParenthesizedTypeNode(host) || isTypeOperatorNode(host) && host.operator === SyntaxKind.ReadonlyKeyword) { host = host.parent; @@ -12954,7 +13078,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, symbol: Symbol | undefined, objectFlags: ObjectFlags, readonly: boolean): Type { + function getSpreadType(left: Type, right: Type, symbol: Symbol | undefined, objectFlags: ObjectFlags, readonly: boolean, isParentTypeNullable?: boolean): Type { if (left.flags & TypeFlags.Any || right.flags & TypeFlags.Any) { return anyType; } @@ -12970,16 +13094,16 @@ namespace ts { if (left.flags & TypeFlags.Union) { const merged = tryMergeUnionOfObjectTypeAndEmptyObject(left as UnionType, readonly); if (merged) { - return getSpreadType(merged, right, symbol, objectFlags, readonly); + return getSpreadType(merged, right, symbol, objectFlags, readonly, isParentTypeNullable); } - return mapType(left, t => getSpreadType(t, right, symbol, objectFlags, readonly)); + return mapType(left, t => getSpreadType(t, right, symbol, objectFlags, readonly, isParentTypeNullable)); } if (right.flags & TypeFlags.Union) { const merged = tryMergeUnionOfObjectTypeAndEmptyObject(right as UnionType, readonly); if (merged) { - return getSpreadType(left, merged, symbol, objectFlags, readonly); + return getSpreadType(left, merged, symbol, objectFlags, readonly, maybeTypeOfKind(right, TypeFlags.Nullable)); } - return mapType(right, t => getSpreadType(left, t, symbol, objectFlags, readonly)); + return mapType(right, t => getSpreadType(left, t, symbol, objectFlags, readonly, maybeTypeOfKind(right, TypeFlags.Nullable))); } if (right.flags & (TypeFlags.BooleanLike | TypeFlags.NumberLike | TypeFlags.BigIntLike | TypeFlags.StringLike | TypeFlags.EnumLike | TypeFlags.NonPrimitive | TypeFlags.Index)) { return left; @@ -13043,6 +13167,14 @@ namespace ts { result.nameType = getSymbolLinks(leftProp).nameType; members.set(leftProp.escapedName, result); } + else if (strictNullChecks && + !isParentTypeNullable && + symbol && + !isFromSpreadAssignment(leftProp, symbol) && + isFromSpreadAssignment(rightProp, symbol) && + !maybeTypeOfKind(rightType, TypeFlags.Nullable)) { + error(leftProp.valueDeclaration, Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, unescapeLeadingUnderscores(leftProp.escapedName)); + } } else { members.set(leftProp.escapedName, getSpreadSymbol(leftProp, readonly)); @@ -13603,7 +13735,7 @@ namespace ts { const templateMapper = combineTypeMappers(mapper, createTypeMapper([getTypeParameterFromMappedType(type)], [key])); const propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper); const modifiers = getMappedTypeModifiers(type); - return strictNullChecks && modifiers & MappedTypeModifiers.IncludeOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) : + return strictNullChecks && modifiers & MappedTypeModifiers.IncludeOptional && !maybeTypeOfKind(propType, TypeFlags.Undefined | TypeFlags.Void) ? getOptionalType(propType) : strictNullChecks && modifiers & MappedTypeModifiers.ExcludeOptional && isOptional ? getTypeWithFacts(propType, TypeFacts.NEUndefined) : propType; } @@ -13672,6 +13804,7 @@ namespace ts { error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } + totalInstantiationCount++; instantiationCount++; instantiationDepth++; const result = instantiateTypeWorker(type, mapper); @@ -13706,15 +13839,17 @@ namespace ts { } return type; } - if (flags & TypeFlags.Union && !(flags & TypeFlags.Primitive)) { - const types = (type).types; - const newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getUnionType(newTypes, UnionReduction.Literal, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; - } - if (flags & TypeFlags.Intersection) { - const types = (type).types; + if ((flags & TypeFlags.Intersection) || (flags & TypeFlags.Union && !(flags & TypeFlags.Primitive))) { + if (!couldContainTypeVariables(type)) { + return type; + } + const types = (type).types; const newTypes = instantiateTypes(types, mapper); - return newTypes !== types ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) : type; + return newTypes === types + ? type + : (flags & TypeFlags.Intersection) + ? getIntersectionType(newTypes, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)) + : getUnionType(newTypes, UnionReduction.Literal, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)); } if (flags & TypeFlags.Index) { return getIndexType(instantiateType((type).type, mapper)); @@ -14061,6 +14196,17 @@ namespace ts { Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature, )); } + if ((getFunctionFlags(node) & FunctionFlags.Async) === 0 + // exclude cases where source itself is promisy - this way we don't make a suggestion when relating + // an IPromise and a Promise that are slightly different + && !getTypeOfPropertyOfType(sourceReturn, "then" as __String) + && checkTypeRelatedTo(createPromiseType(sourceReturn), targetReturn, relation, /*errorNode*/ undefined) + ) { + addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], createDiagnosticForNode( + node, + Diagnostics.Did_you_mean_to_mark_this_function_as_async + )); + } return true; } } @@ -14314,11 +14460,20 @@ namespace ts { return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); } // recreate a tuple from the elements, if possible - const tupleizedType = checkArrayLiteral(node, CheckMode.Contextual, /*forceTuple*/ true); - if (isTupleLikeType(tupleizedType)) { - return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + // Since we're re-doing the expression type, we need to reapply the contextual type + const oldContext = node.contextualType; + node.contextualType = target; + try { + const tupleizedType = checkArrayLiteral(node, CheckMode.Contextual, /*forceTuple*/ true); + node.contextualType = oldContext; + if (isTupleLikeType(tupleizedType)) { + return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); + } + return false; + } + finally { + node.contextualType = oldContext; } - return false; } function *generateObjectLiteralElements(node: ObjectLiteralExpression): ElaborationIterator { @@ -14682,11 +14837,17 @@ namespace ts { if (isFreshLiteralType(target)) { target = (target).regularType; } - if (source === target || - relation === comparableRelation && !(target.flags & TypeFlags.Never) && isSimpleTypeRelatedTo(target, source, relation) || - relation !== identityRelation && isSimpleTypeRelatedTo(source, target, relation)) { + if (source === target) { return true; } + if (relation !== identityRelation) { + if (relation === comparableRelation && !(target.flags & TypeFlags.Never) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation)) { + return true; + } + } + else { + if (!(source.flags === target.flags && source.flags & TypeFlags.Substructure)) return false; + } if (source.flags & TypeFlags.Object && target.flags & TypeFlags.Object) { const related = relation.get(getRelationKey(source, target, IntersectionState.None, relation)); if (related !== undefined) { @@ -14704,11 +14865,16 @@ namespace ts { } function getNormalizedType(type: Type, writing: boolean): Type { - return isFreshLiteralType(type) ? (type).regularType : - getObjectFlags(type) & ObjectFlags.Reference && (type).node ? createTypeReference((type).target, getTypeArguments(type)) : - type.flags & TypeFlags.Substitution ? writing ? (type).typeVariable : (type).substitute : - type.flags & TypeFlags.Simplifiable ? getSimplifiedType(type, writing) : - type; + do { + const t = isFreshLiteralType(type) ? (type).regularType : + getObjectFlags(type) & ObjectFlags.Reference && (type).node ? createTypeReference((type).target, getTypeArguments(type)) : + type.flags & TypeFlags.Substitution ? writing ? (type).typeVariable : (type).substitute : + type.flags & TypeFlags.Simplifiable ? getSimplifiedType(type, writing) : + type; + if (t === type) break; + type = t; + } while (true); + return type; } /** @@ -15024,6 +15190,12 @@ namespace ts { let source = getNormalizedType(originalSource, /*writing*/ false); let target = getNormalizedType(originalTarget, /*writing*/ true); + if (source === target) return Ternary.True; + + if (relation === identityRelation) { + return isIdenticalTo(source, target); + } + // Try to see if we're relating something like `Foo` -> `Bar | null | undefined`. // If so, reporting the `null` and `undefined` in the type is hardly useful. // First, see if we're even relating an object type to a union. @@ -15037,17 +15209,11 @@ namespace ts { (target as UnionType).types.length <= 3 && maybeTypeOfKind(target, TypeFlags.Nullable)) { const nullStrippedTarget = extractTypesOfKind(target, ~TypeFlags.Nullable); if (!(nullStrippedTarget.flags & (TypeFlags.Union | TypeFlags.Never))) { + if (source === nullStrippedTarget) return Ternary.True; target = nullStrippedTarget; } } - // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases - if (source === target) return Ternary.True; - - if (relation === identityRelation) { - return isIdenticalTo(source, target); - } - if (relation === comparableRelation && !(target.flags & TypeFlags.Never) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation, reportErrors ? reportError : undefined)) return Ternary.True; @@ -15193,19 +15359,18 @@ namespace ts { } function isIdenticalTo(source: Type, target: Type): Ternary { - let result: Ternary; const flags = source.flags & target.flags; - if (flags & TypeFlags.Object || flags & TypeFlags.IndexedAccess || flags & TypeFlags.Conditional || flags & TypeFlags.Index || flags & TypeFlags.Substitution) { - return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, IntersectionState.None); + if (!(flags & TypeFlags.Substructure)) { + return Ternary.False; } - if (flags & (TypeFlags.Union | TypeFlags.Intersection)) { - if (result = eachTypeRelatedToSomeType(source, target)) { - if (result &= eachTypeRelatedToSomeType(target, source)) { - return result; - } + if (flags & TypeFlags.UnionOrIntersection) { + let result = eachTypeRelatedToSomeType(source, target); + if (result) { + result &= eachTypeRelatedToSomeType(target, source); } + return result; } - return Ternary.False; + return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false, IntersectionState.None); } function getTypeOfPropertyInTypes(types: Type[], name: __String) { @@ -15234,7 +15399,7 @@ namespace ts { checkTypes = reducedTarget.flags & TypeFlags.Union ? (reducedTarget).types : [reducedTarget]; } for (const prop of getPropertiesOfType(source)) { - if (shouldCheckAsExcessProperty(prop, source.symbol)) { + if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) { if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) { if (reportErrors) { // Report error in terms of object types in the target as those are the only ones @@ -15818,7 +15983,7 @@ namespace ts { // with respect to T. We do not report errors here, as we will use the existing // error result from checking each constituent of the union. if (source.flags & (TypeFlags.Object | TypeFlags.Intersection) && target.flags & TypeFlags.Union) { - const objectOnlyTarget = extractTypesOfKind(target, TypeFlags.Object); + const objectOnlyTarget = extractTypesOfKind(target, TypeFlags.Object | TypeFlags.Intersection | TypeFlags.Substitution); if (objectOnlyTarget.flags & TypeFlags.Union) { const result = typeRelatedToDiscriminatedType(source, objectOnlyTarget as UnionType); if (result) { @@ -15915,7 +16080,7 @@ namespace ts { // NOTE: See ~/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts // for examples. - const sourceProperties = getPropertiesOfObjectType(source); + const sourceProperties = getPropertiesOfType(source); const sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target); if (!sourcePropertiesFiltered) return Ternary.False; @@ -15954,7 +16119,7 @@ namespace ts { outer: for (const type of target.types) { for (let i = 0; i < sourcePropertiesFiltered.length; i++) { const sourceProperty = sourcePropertiesFiltered[i]; - const targetProperty = getPropertyOfObjectType(type, sourceProperty.escapedName); + const targetProperty = getPropertyOfType(type, sourceProperty.escapedName); if (!targetProperty) continue outer; if (sourceProperty === targetProperty) continue; // We compare the source property to the target in the context of a single discriminant type. @@ -16019,11 +16184,11 @@ namespace ts { if (getCheckFlags(targetProp) & CheckFlags.DeferredType && !getSymbolLinks(targetProp).type) { // Rather than resolving (and normalizing) the type, relate constituent-by-constituent without performing normalization or seconadary passes const links = getSymbolLinks(targetProp); - Debug.assertDefined(links.deferralParent); - Debug.assertDefined(links.deferralConstituents); - const unionParent = !!(links.deferralParent!.flags & TypeFlags.Union); + Debug.assertIsDefined(links.deferralParent); + Debug.assertIsDefined(links.deferralConstituents); + const unionParent = !!(links.deferralParent.flags & TypeFlags.Union); let result = unionParent ? Ternary.False : Ternary.True; - const targetTypes = links.deferralConstituents!; + const targetTypes = links.deferralConstituents; for (const targetType of targetTypes) { const related = isRelatedTo(source, targetType, /*reportErrors*/ false, /*headMessage*/ undefined, unionParent ? 0 : IntersectionState.Target); if (!unionParent) { @@ -16129,6 +16294,7 @@ namespace ts { if (unmatchedProperty.valueDeclaration && isNamedDeclaration(unmatchedProperty.valueDeclaration) && isPrivateIdentifier(unmatchedProperty.valueDeclaration.name) + && source.symbol && source.symbol.flags & SymbolFlags.Class) { const privateIdentifierDescription = unmatchedProperty.valueDeclaration.name.escapedText; const symbolTableKey = getSymbolNameForPrivateIdentifier(source.symbol, privateIdentifierDescription); @@ -16537,6 +16703,10 @@ namespace ts { return match === -1 || discriminable.indexOf(/*searchElement*/ true, match + 1) !== -1 ? defaultValue : target.types[match]; } + function isFromSpreadAssignment(prop: Symbol, container: Symbol) { + return prop.valueDeclaration?.parent !== container.valueDeclaration; + } + /** * A type is 'weak' if it is an object type with at least one optional property * and no required properties, call/construct signatures or index signatures @@ -17068,7 +17238,7 @@ namespace ts { /** * Check if a Type was written as a tuple type literal. - * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. + * Prefer using isTupleLikeType() unless the use of `elementTypes`/`getTypeArguments` is required. */ function isTupleType(type: Type): type is TupleTypeReference { return !!(getObjectFlags(type) & ObjectFlags.Reference && (type).target.objectFlags & ObjectFlags.Tuple); @@ -17639,18 +17809,18 @@ namespace ts { // results for union and intersection types for performance reasons. function couldContainTypeVariables(type: Type): boolean { const objectFlags = getObjectFlags(type); - return !!(type.flags & TypeFlags.Instantiable || + if (objectFlags & ObjectFlags.CouldContainTypeVariablesComputed) { + return !!(objectFlags & ObjectFlags.CouldContainTypeVariables); + } + const result = !!(type.flags & TypeFlags.Instantiable || objectFlags & ObjectFlags.Reference && ((type).node || forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & ObjectFlags.Anonymous && type.symbol && type.symbol.flags & (SymbolFlags.Function | SymbolFlags.Method | SymbolFlags.Class | SymbolFlags.TypeLiteral | SymbolFlags.ObjectLiteral) && type.symbol.declarations || objectFlags & (ObjectFlags.Mapped | ObjectFlags.ObjectRestType) || - type.flags & TypeFlags.UnionOrIntersection && !(type.flags & TypeFlags.EnumLiteral) && couldUnionOrIntersectionContainTypeVariables(type)); - } - - function couldUnionOrIntersectionContainTypeVariables(type: UnionOrIntersectionType): boolean { - if (type.couldContainTypeVariables === undefined) { - type.couldContainTypeVariables = some(type.types, couldContainTypeVariables); + type.flags & TypeFlags.UnionOrIntersection && !(type.flags & TypeFlags.EnumLiteral) && some((type).types, couldContainTypeVariables)); + if (type.flags & TypeFlags.ObjectFlagsType) { + (type).objectFlags |= ObjectFlags.CouldContainTypeVariablesComputed | (result ? ObjectFlags.CouldContainTypeVariables : 0); } - return type.couldContainTypeVariables; + return result; } function isTypeParameterAtTopLevel(type: Type, typeParameter: TypeParameter): boolean { @@ -17794,6 +17964,14 @@ namespace ts { undefined; } + function hasSkipDirectInferenceFlag(node: Node) { + return !!getNodeLinks(node).skipDirectInference; + } + + function isFromInferenceBlockedSource(type: Type) { + return !!(type.symbol && some(type.symbol.declarations, hasSkipDirectInferenceFlag)); + } + function inferTypes(inferences: InferenceInfo[], originalSource: Type, originalTarget: Type, priority: InferencePriority = 0, contravariant = false) { let symbolStack: Symbol[]; let visited: Map; @@ -17884,7 +18062,7 @@ namespace ts { // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). if (getObjectFlags(source) & ObjectFlags.NonInferrableType || source === nonInferrableAnyType || source === silentNeverType || - (priority & InferencePriority.ReturnType && (source === autoType || source === autoArrayType))) { + (priority & InferencePriority.ReturnType && (source === autoType || source === autoArrayType)) || isFromInferenceBlockedSource(source)) { return; } const inference = getInferenceInfoForType(target); @@ -18188,7 +18366,7 @@ namespace ts { // type and then make a secondary inference from that type to T. We make a secondary inference // such that direct inferences to T get priority over inferences to Partial, for example. const inference = getInferenceInfoForType((constraintType).type); - if (inference && !inference.isFixed) { + if (inference && !inference.isFixed && !isFromInferenceBlockedSource(source)) { const inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { // We assign a lower priority to inferences made from types containing non-inferrable @@ -18358,7 +18536,7 @@ namespace ts { } function isTypeOrBaseIdenticalTo(s: Type, t: Type) { - return isTypeIdenticalTo(s, t) || !!(s.flags & (TypeFlags.StringLiteral | TypeFlags.NumberLiteral)) && isTypeIdenticalTo(getBaseTypeOfLiteralType(s), t); + return isTypeIdenticalTo(s, t) || !!(t.flags & TypeFlags.String && s.flags & TypeFlags.StringLiteral || t.flags & TypeFlags.Number && s.flags & TypeFlags.NumberLiteral); } function isTypeCloselyMatchedBy(s: Type, t: Type) { @@ -19280,16 +19458,12 @@ namespace ts { } function isReachableFlowNode(flow: FlowNode) { - const result = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); + const result = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ false); lastFlowNode = flow; lastFlowNodeReachable = result; return result; } - function isUnlockedReachableFlowNode(flow: FlowNode) { - return !(flow.flags & FlowFlags.PreFinally && (flow).lock.locked) && isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); - } - function isFalseExpression(expr: Expression): boolean { const node = skipParentheses(expr); return node.kind === SyntaxKind.FalseKeyword || node.kind === SyntaxKind.BinaryExpression && ( @@ -19307,11 +19481,11 @@ namespace ts { if (!noCacheCheck) { const id = getFlowNodeId(flow); const reachable = flowNodeReachable[id]; - return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ true)); + return reachable !== undefined ? reachable : (flowNodeReachable[id] = isReachableFlowNodeWorker(flow, /*noCacheCheck*/ true)); } noCacheCheck = false; } - if (flags & (FlowFlags.Assignment | FlowFlags.Condition | FlowFlags.ArrayMutation | FlowFlags.PreFinally)) { + if (flags & (FlowFlags.Assignment | FlowFlags.Condition | FlowFlags.ArrayMutation)) { flow = (flow).antecedent; } else if (flags & FlowFlags.Call) { @@ -19332,7 +19506,7 @@ namespace ts { } else if (flags & FlowFlags.BranchLabel) { // A branching point is reachable if any branch is reachable. - return some((flow).antecedents, isUnlockedReachableFlowNode); + return some((flow).antecedents, f => isReachableFlowNodeWorker(f, /*noCacheCheck*/ false)); } else if (flags & FlowFlags.LoopLabel) { // A loop is reachable if the control flow path that leads to the top is reachable. @@ -19346,12 +19520,14 @@ namespace ts { } flow = (flow).antecedent; } - else if (flags & FlowFlags.AfterFinally) { - // Cache is unreliable once we start locking nodes + else if (flags & FlowFlags.ReduceLabel) { + // Cache is unreliable once we start adjusting labels lastFlowNode = undefined; - (flow).locked = true; - const result = isReachableFlowNodeWorker((flow).antecedent, /*skipCacheCheck*/ false); - (flow).locked = false; + const target = (flow).target; + const saveAntecedents = target.antecedents; + target.antecedents = (flow).antecedents; + const result = isReachableFlowNodeWorker((flow).antecedent, /*noCacheCheck*/ false); + target.antecedents = saveAntecedents; return result; } else { @@ -19415,19 +19591,7 @@ namespace ts { } } let type: FlowType | undefined; - if (flags & FlowFlags.AfterFinally) { - // block flow edge: finally -> pre-try (for larger explanation check comment in binder.ts - bindTryStatement - (flow).locked = true; - type = getTypeAtFlowNode((flow).antecedent); - (flow).locked = false; - } - else if (flags & FlowFlags.PreFinally) { - // locked pre-finally flows are filtered out in getTypeAtFlowBranchLabel - // so here just redirect to antecedent - flow = (flow).antecedent; - continue; - } - else if (flags & FlowFlags.Assignment) { + if (flags & FlowFlags.Assignment) { type = getTypeAtFlowAssignment(flow); if (!type) { flow = (flow).antecedent; @@ -19463,6 +19627,13 @@ namespace ts { continue; } } + else if (flags & FlowFlags.ReduceLabel) { + const target = (flow).target; + const saveAntecedents = target.antecedents; + target.antecedents = (flow).antecedents; + type = getTypeAtFlowNode((flow).antecedent); + target.antecedents = saveAntecedents; + } else if (flags & FlowFlags.Start) { // Check if we should continue with the control flow of the containing function. const container = (flow).node; @@ -19674,12 +19845,6 @@ namespace ts { let seenIncomplete = false; let bypassFlow: FlowSwitchClause | undefined; for (const antecedent of flow.antecedents!) { - if (antecedent.flags & FlowFlags.PreFinally && (antecedent).lock.locked) { - // if flow correspond to branch from pre-try to finally and this branch is locked - this means that - // we initially have started following the flow outside the finally block. - // in this case we should ignore this branch. - continue; - } if (!bypassFlow && antecedent.flags & FlowFlags.SwitchClause && (antecedent).clauseStart === (antecedent).clauseEnd) { // The antecedent is the bypass branch of a potentially exhaustive switch statement. bypassFlow = antecedent; @@ -20393,12 +20558,20 @@ namespace ts { /** remove undefined from the annotated type of a parameter when there is an initializer (that doesn't include undefined) */ function removeOptionalityFromDeclaredType(declaredType: Type, declaration: VariableLikeDeclaration): Type { - const annotationIncludesUndefined = strictNullChecks && - declaration.kind === SyntaxKind.Parameter && - declaration.initializer && - getFalsyFlags(declaredType) & TypeFlags.Undefined && - !(getFalsyFlags(checkExpression(declaration.initializer)) & TypeFlags.Undefined); - return annotationIncludesUndefined ? getTypeWithFacts(declaredType, TypeFacts.NEUndefined) : declaredType; + if (pushTypeResolution(declaration.symbol, TypeSystemPropertyName.DeclaredType)) { + const annotationIncludesUndefined = strictNullChecks && + declaration.kind === SyntaxKind.Parameter && + declaration.initializer && + getFalsyFlags(declaredType) & TypeFlags.Undefined && + !(getFalsyFlags(checkExpression(declaration.initializer)) & TypeFlags.Undefined); + popTypeResolution(); + + return annotationIncludesUndefined ? getTypeWithFacts(declaredType, TypeFacts.NEUndefined) : declaredType; + } + else { + reportCircularityError(declaration.symbol); + return declaredType; + } } function isConstraintPosition(node: Node) { @@ -20821,7 +20994,7 @@ namespace ts { break; case SyntaxKind.PropertyDeclaration: case SyntaxKind.PropertySignature: - if (hasModifier(container, ModifierFlags.Static)) { + if (hasModifier(container, ModifierFlags.Static) && !(compilerOptions.target === ScriptTarget.ESNext && compilerOptions.useDefineForClassFields)) { error(node, Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks } @@ -21447,19 +21620,16 @@ namespace ts { } // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget: CallLikeExpression, arg: Expression, contextFlags?: ContextFlags): Type | undefined { + function getContextualTypeForArgument(callTarget: CallLikeExpression, arg: Expression): Type | undefined { const args = getEffectiveCallArguments(callTarget); const argIndex = args.indexOf(arg); // -1 for e.g. the expression of a CallExpression, or the tag of a TaggedTemplateExpression - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); } - function getContextualTypeForArgumentAtIndex(callTarget: CallLikeExpression, argIndex: number, contextFlags?: ContextFlags): Type { + function getContextualTypeForArgumentAtIndex(callTarget: CallLikeExpression, argIndex: number): Type { // If we're already in the process of resolving the given signature, don't resolve again as // that could cause infinite recursion. Instead, return anySignature. - let signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); - if (contextFlags && contextFlags & ContextFlags.BaseConstraint && signature.target && !hasTypeArguments(callTarget)) { - signature = getBaseSignature(signature.target); - } + const signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); if (isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); @@ -21855,7 +22025,7 @@ namespace ts { } /* falls through */ case SyntaxKind.NewExpression: - return getContextualTypeForArgument(parent, node, contextFlags); + return getContextualTypeForArgument(parent, node); case SyntaxKind.TypeAssertionExpression: case SyntaxKind.AsExpression: return isConstTypeReference((parent).type) ? undefined : getTypeFromTypeNode((parent).type); @@ -21899,13 +22069,13 @@ namespace ts { } function getContextualJsxElementAttributesType(node: JsxOpeningLikeElement, contextFlags?: ContextFlags) { - if (isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== ContextFlags.BaseConstraint) { + if (isJsxOpeningElement(node) && node.parent.contextualType && contextFlags !== ContextFlags.Completions) { // Contextually applied type is moved from attributes up to the outer jsx attributes so when walking up from the children they get hit // _However_ to hit them from the _attributes_ we must look for them here; otherwise we'll used the declared type // (as below) instead! return node.parent.contextualType; } - return getContextualTypeForArgumentAtIndex(node, 0, contextFlags); + return getContextualTypeForArgumentAtIndex(node, 0); } function getEffectiveFirstArgumentForJsxSignature(signature: Signature, node: JsxOpeningLikeElement) { @@ -22132,58 +22302,69 @@ namespace ts { function checkArrayLiteral(node: ArrayLiteralExpression, checkMode: CheckMode | undefined, forceTuple: boolean | undefined): Type { const elements = node.elements; const elementCount = elements.length; - let hasNonEndingSpreadElement = false; const elementTypes: Type[] = []; - const inDestructuringPattern = isAssignmentTarget(node); + let hasEndingSpreadElement = false; + let hasNonEndingSpreadElement = false; const contextualType = getApparentTypeOfContextualType(node); + const inDestructuringPattern = isAssignmentTarget(node); const inConstContext = isConstContext(node); - for (let index = 0; index < elementCount; index++) { - const e = elements[index]; - if (inDestructuringPattern && e.kind === SyntaxKind.SpreadElement) { - // Given the following situation: - // var c: {}; - // [...c] = ["", 0]; - // - // c is represented in the tree as a spread element in an array literal. - // But c really functions as a rest element, and its purpose is to provide - // a contextual type for the right hand side of the assignment. Therefore, - // instead of calling checkExpression on "...c", which will give an error - // if c is not iterable/array-like, we need to act as if we are trying to - // get the contextual element type from it. So we do something similar to - // getContextualTypeForElementExpression, which will crucially not error - // if there is no index type / iterated type. - const restArrayType = checkExpression((e).expression, checkMode, forceTuple); - const restElementType = getIndexTypeOfType(restArrayType, IndexKind.Number) || - getIteratedTypeOrElementType(IterationUse.Destructuring, restArrayType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); - if (restElementType) { - elementTypes.push(restElementType); + for (let i = 0; i < elementCount; i++) { + const e = elements[i]; + const spread = e.kind === SyntaxKind.SpreadElement && (e).expression; + const spreadType = spread && checkExpression(spread, checkMode, forceTuple); + if (spreadType && isTupleType(spreadType)) { + elementTypes.push(...getTypeArguments(spreadType)); + if (spreadType.target.hasRestElement) { + if (i === elementCount - 1) hasEndingSpreadElement = true; + else hasNonEndingSpreadElement = true; } } else { - const elementContextualType = getContextualTypeForElementExpression(contextualType, index); - const type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); - elementTypes.push(type); - } - if (index < elementCount - 1 && e.kind === SyntaxKind.SpreadElement) { - hasNonEndingSpreadElement = true; + if (inDestructuringPattern && spreadType) { + // Given the following situation: + // var c: {}; + // [...c] = ["", 0]; + // + // c is represented in the tree as a spread element in an array literal. + // But c really functions as a rest element, and its purpose is to provide + // a contextual type for the right hand side of the assignment. Therefore, + // instead of calling checkExpression on "...c", which will give an error + // if c is not iterable/array-like, we need to act as if we are trying to + // get the contextual element type from it. So we do something similar to + // getContextualTypeForElementExpression, which will crucially not error + // if there is no index type / iterated type. + const restElementType = getIndexTypeOfType(spreadType, IndexKind.Number) || + getIteratedTypeOrElementType(IterationUse.Destructuring, spreadType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); + if (restElementType) { + elementTypes.push(restElementType); + } + } + else { + const elementContextualType = getContextualTypeForElementExpression(contextualType, elementTypes.length); + const type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple); + elementTypes.push(type); + } + if (spread) { // tuples are done above, so these are only arrays + if (i === elementCount - 1) hasEndingSpreadElement = true; + else hasNonEndingSpreadElement = true; + } } } if (!hasNonEndingSpreadElement) { - const hasRestElement = elementCount > 0 && elements[elementCount - 1].kind === SyntaxKind.SpreadElement; - const minLength = elementCount - (hasRestElement ? 1 : 0); + const minLength = elementTypes.length - (hasEndingSpreadElement ? 1 : 0); // If array literal is actually a destructuring pattern, mark it as an implied type. We do this such // that we get the same behavior for "var [x, y] = []" and "[x, y] = []". let tupleResult; if (inDestructuringPattern && minLength > 0) { - const type = cloneTypeReference(createTupleType(elementTypes, minLength, hasRestElement)); + const type = cloneTypeReference(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); type.pattern = node; return type; } - else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasRestElement, elementCount, inConstContext)) { + else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasEndingSpreadElement, elementTypes.length, inConstContext)) { return createArrayLiteralType(tupleResult); } else if (forceTuple) { - return createArrayLiteralType(createTupleType(elementTypes, minLength, hasRestElement)); + return createArrayLiteralType(createTupleType(elementTypes, minLength, hasEndingSpreadElement)); } } return createArrayLiteralType(createArrayType(elementTypes.length ? @@ -22440,9 +22621,11 @@ namespace ts { // If object literal is contextually typed by the implied type of a binding pattern, augment the result // type with those properties for which the binding pattern specifies a default value. - if (contextualTypeHasPattern) { + // If the object literal is spread into another object literal, skip this step and let the top-level object + // literal handle it instead. + if (contextualTypeHasPattern && node.parent.kind !== SyntaxKind.SpreadAssignment) { for (const prop of getPropertiesOfType(contextualType!)) { - if (!propertiesTable.get(prop.escapedName) && !(spread && getPropertyOfType(spread, prop.escapedName))) { + if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & SymbolFlags.Optional)) { error(prop.valueDeclaration || (prop).bindingElement, Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); @@ -22499,6 +22682,7 @@ namespace ts { function checkJsxSelfClosingElementDeferred(node: JsxSelfClosingElement) { checkJsxOpeningLikeElementOrOpeningFragment(node); + resolveUntypedCall(node); // ensure type arguments and parameters are typechecked, even if there is an arity error } function checkJsxSelfClosingElement(node: JsxSelfClosingElement, _checkMode: CheckMode | undefined): Type { @@ -23170,7 +23354,7 @@ namespace ts { } const thisType = getTypeFromTypeNode(thisParameter.type); - enclosingClass = ((thisType.flags & TypeFlags.TypeParameter) ? getConstraintOfTypeParameter(thisType) : thisType) as InterfaceType; + enclosingClass = (((thisType.flags & TypeFlags.TypeParameter) ? getConstraintOfTypeParameter(thisType) : thisType) as TypeReference).target; } // No further restrictions for static properties if (flags & ModifierFlags.Static) { @@ -23187,7 +23371,7 @@ namespace ts { return true; } - function getThisParameterFromNodeContext (node: Node) { + function getThisParameterFromNodeContext(node: Node) { const thisContainer = getThisContainer(node, /* includeArrowFunctions */ false); return thisContainer && isFunctionLike(thisContainer) ? getThisParameter(thisContainer) : undefined; } @@ -23347,7 +23531,7 @@ namespace ts { right, Diagnostics.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier, diagName, - diagnosticName(typeClass!.name || anon) + diagnosticName(typeClass.name || anon) ); return true; } @@ -24269,7 +24453,7 @@ namespace ts { // can be specified by users through attributes property. const paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); const attributesType = checkExpressionWithContextualType(node.attributes, paramType, /*inferenceContext*/ undefined, checkMode); - return checkTypeRelatedToAndOptionallyElaborate( + return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate( attributesType, paramType, relation, @@ -24278,6 +24462,80 @@ namespace ts { /*headMessage*/ undefined, containingMessageChain, errorOutputContainer); + + function checkTagNameDoesNotExpectTooManyArguments(): boolean { + const tagType = isJsxOpeningElement(node) || isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : undefined; + if (!tagType) { + return true; + } + const tagCallSignatures = getSignaturesOfType(tagType, SignatureKind.Call); + if (!length(tagCallSignatures)) { + return true; + } + const factory = getJsxFactoryEntity(node); + if (!factory) { + return true; + } + const factorySymbol = resolveEntityName(factory, SymbolFlags.Value, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, node); + if (!factorySymbol) { + return true; + } + + const factoryType = getTypeOfSymbol(factorySymbol); + const callSignatures = getSignaturesOfType(factoryType, SignatureKind.Call); + if (!length(callSignatures)) { + return true; + } + + let hasFirstParamSignatures = false; + let maxParamCount = 0; + // Check that _some_ first parameter expects a FC-like thing, and that some overload of the SFC expects an acceptable number of arguments + for (const sig of callSignatures) { + const firstparam = getTypeAtPosition(sig, 0); + const signaturesOfParam = getSignaturesOfType(firstparam, SignatureKind.Call); + if (!length(signaturesOfParam)) continue; + for (const paramSig of signaturesOfParam) { + hasFirstParamSignatures = true; + if (hasEffectiveRestParameter(paramSig)) { + return true; // some signature has a rest param, so function components can have an arbitrary number of arguments + } + const paramCount = getParameterCount(paramSig); + if (paramCount > maxParamCount) { + maxParamCount = paramCount; + } + } + } + if (!hasFirstParamSignatures) { + // Not a single signature had a first parameter which expected a signature - for back compat, and + // to guard against generic factories which won't have signatures directly, do not error + return true; + } + let absoluteMinArgCount = Infinity; + for (const tagSig of tagCallSignatures) { + const tagRequiredArgCount = getMinArgumentCount(tagSig); + if (tagRequiredArgCount < absoluteMinArgCount) { + absoluteMinArgCount = tagRequiredArgCount; + } + } + if (absoluteMinArgCount <= maxParamCount) { + return true; // some signature accepts the number of arguments the function component provides + } + + if (reportErrors) { + const diag = createDiagnosticForNode(node.tagName, Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, entityNameToString(node.tagName), absoluteMinArgCount, entityNameToString(factory), maxParamCount); + const tagNameDeclaration = getSymbolAtLocation(node.tagName)?.valueDeclaration; + if (tagNameDeclaration) { + addRelatedInfo(diag, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here, entityNameToString(node.tagName))); + } + if (errorOutputContainer && errorOutputContainer.skipLogging) { + (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); + } + if (!errorOutputContainer.skipLogging) { + diagnostics.add(diag); + } + } + return false; + } } function getSignatureApplicabilityError( @@ -24798,7 +25056,7 @@ namespace ts { } } - return produceDiagnostics || !args ? resolveErrorCall(node) : getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); + return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); function chooseOverload(candidates: Signature[], relation: Map, signatureHelpTrailingComma = false) { candidatesForArgumentError = undefined; @@ -24886,7 +25144,6 @@ namespace ts { } // No signature was applicable. We have already reported the errors for the invalid signature. - // If this is a type resolution session, e.g. Language Service, try to get better information than anySignature. function getCandidateForOverloadFailure( node: CallLikeExpression, candidates: Signature[], @@ -24894,6 +25151,7 @@ namespace ts { hasCandidatesOutArray: boolean, ): Signature { Debug.assert(candidates.length > 0); // Else should not have called this. + checkNodeDeferred(node); // Normally we will combine overloads. Skip this if they have type parameters since that's hard to combine. // Don't do this if there is a `candidatesOutArray`, // because then we want the chosen best candidate to be one of the overloads, not a combination. @@ -25090,7 +25348,7 @@ namespace ts { if (node.arguments.length === 1) { const text = getSourceFileOfNode(node).text; if (isLineBreak(text.charCodeAt(skipTrivia(text, node.expression.end, /* stopAfterLineBreak */ true) - 1))) { - relatedInformation = createDiagnosticForNode(node.expression, Diagnostics.It_is_highly_likely_that_you_are_missing_a_semicolon); + relatedInformation = createDiagnosticForNode(node.expression, Diagnostics.Are_you_missing_a_semicolon); } } invocationError(node.expression, apparentType, SignatureKind.Call, relatedInformation); @@ -26970,7 +27228,7 @@ namespace ts { // Return true if type might be of the given kind. A union or intersection type might be of a given // kind if at least one constituent type is of the given kind. function maybeTypeOfKind(type: Type, kind: TypeFlags): boolean { - if (type.flags & kind & ~TypeFlags.GenericMappedType || kind & TypeFlags.GenericMappedType && isGenericMappedType(type)) { + if (type.flags & kind) { return true; } if (type.flags & TypeFlags.UnionOrIntersection) { @@ -27827,7 +28085,8 @@ namespace ts { } function checkConditionalExpression(node: ConditionalExpression, checkMode?: CheckMode): Type { - checkTruthinessExpression(node.condition); + const type = checkTruthinessExpression(node.condition); + checkTestingKnownTruthyCallableType(node.condition, node.whenTrue, type); const type1 = checkExpression(node.whenTrue, checkMode); const type2 = checkExpression(node.whenFalse, checkMode); return getUnionType([type1, type2], UnionReduction.Subtype); @@ -29180,7 +29439,7 @@ namespace ts { } function isPrivateWithinAmbient(node: Node): boolean { - return hasModifier(node, ModifierFlags.Private) && !!(node.flags & NodeFlags.Ambient); + return (hasModifier(node, ModifierFlags.Private) || isPrivateIdentifierPropertyDeclaration(node)) && !!(node.flags & NodeFlags.Ambient); } function getEffectiveDeclarationFlags(n: Declaration, flagsToCheck: ModifierFlags): ModifierFlags { @@ -30134,6 +30393,13 @@ namespace ts { checkSignatureDeclaration(node); } + function checkJSDocImplementsTag(node: JSDocImplementsTag): void { + const classLike = getJSDocHost(node); + if (!isClassDeclaration(classLike) && !isClassExpression(classLike)) { + error(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); + return; + } + } function checkJSDocAugmentsTag(node: JSDocAugmentsTag): void { const classLike = getJSDocHost(node); if (!isClassDeclaration(classLike) && !isClassExpression(classLike)) { @@ -30330,7 +30596,9 @@ namespace ts { break; } const symbol = getSymbolOfNode(member); - if (!symbol.isReferenced && (hasModifier(member, ModifierFlags.Private) || isNamedDeclaration(member) && isPrivateIdentifier(member.name))) { + if (!symbol.isReferenced + && (hasModifier(member, ModifierFlags.Private) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) + && !(member.flags & NodeFlags.Ambient)) { addDiagnostic(member, UnusedKind.Local, createDiagnosticForNode(member.name!, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; @@ -30949,9 +31217,8 @@ namespace ts { function checkIfStatement(node: IfStatement) { // Grammar checking checkGrammarStatementInAmbientContext(node); - const type = checkTruthinessExpression(node.expression); - checkTestingKnownTruthyCallableType(node, type); + checkTestingKnownTruthyCallableType(node.expression, node.thenStatement, type); checkSourceElement(node.thenStatement); if (node.thenStatement.kind === SyntaxKind.EmptyStatement) { @@ -30961,15 +31228,15 @@ namespace ts { checkSourceElement(node.elseStatement); } - function checkTestingKnownTruthyCallableType(ifStatement: IfStatement, type: Type) { + function checkTestingKnownTruthyCallableType(condExpr: Expression, body: Statement | Expression, type: Type) { if (!strictNullChecks) { return; } - const testedNode = isIdentifier(ifStatement.expression) - ? ifStatement.expression - : isPropertyAccessExpression(ifStatement.expression) - ? ifStatement.expression.name + const testedNode = isIdentifier(condExpr) + ? condExpr + : isPropertyAccessExpression(condExpr) + ? condExpr.name : undefined; if (!testedNode) { @@ -30996,7 +31263,7 @@ namespace ts { return; } - const functionIsUsedInBody = forEachChild(ifStatement.thenStatement, function check(childNode): boolean | undefined { + const functionIsUsedInBody = forEachChild(body, function check(childNode): boolean | undefined { if (isIdentifier(childNode)) { const childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol.id === testedFunctionSymbol.id) { @@ -31008,7 +31275,7 @@ namespace ts { }); if (!functionIsUsedInBody) { - error(ifStatement.expression, Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); + error(condExpr, Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); } } @@ -32405,7 +32672,7 @@ namespace ts { } } - const implementedTypeNodes = getClassImplementsHeritageClauseElements(node); + const implementedTypeNodes = getEffectiveImplementsTypeNodes(node); if (implementedTypeNodes) { for (const typeRefNode of implementedTypeNodes) { if (!isEntityNameExpression(typeRefNode.expression)) { @@ -33337,6 +33604,11 @@ namespace ts { grammarErrorOnFirstToken(node, Diagnostics.An_export_declaration_cannot_have_modifiers); } + if (node.moduleSpecifier && node.exportClause && isNamedExports(node.exportClause) && length(node.exportClause.elements) && languageVersion === ScriptTarget.ES3) { + checkExternalEmitHelpers(node, ExternalEmitHelpers.CreateBinding); + } + + checkGrammarExportDeclaration(node); if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause) { // export { x, y } @@ -33369,6 +33641,14 @@ namespace ts { } } + function checkGrammarExportDeclaration(node: ExportDeclaration): boolean { + const isTypeOnlyExportStar = node.isTypeOnly && node.exportClause?.kind !== SyntaxKind.NamedExports; + if (isTypeOnlyExportStar) { + grammarErrorOnNode(node, Diagnostics.Only_named_exports_may_use_export_type); + } + return !isTypeOnlyExportStar; + } + function checkGrammarModuleElementContext(node: Statement, errorMessage: DiagnosticMessage): boolean { const isInAppropriateContext = node.parent.kind === SyntaxKind.SourceFile || node.parent.kind === SyntaxKind.ModuleBlock || node.parent.kind === SyntaxKind.ModuleDeclaration; if (!isInAppropriateContext) { @@ -33621,6 +33901,8 @@ namespace ts { return checkImportType(node); case SyntaxKind.JSDocAugmentsTag: return checkJSDocAugmentsTag(node as JSDocAugmentsTag); + case SyntaxKind.JSDocImplementsTag: + return checkJSDocImplementsTag(node as JSDocImplementsTag); case SyntaxKind.JSDocTypedefTag: case SyntaxKind.JSDocCallbackTag: case SyntaxKind.JSDocEnumTag: @@ -33819,6 +34101,16 @@ namespace ts { currentNode = node; instantiationCount = 0; switch (node.kind) { + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + case SyntaxKind.TaggedTemplateExpression: + case SyntaxKind.Decorator: + case SyntaxKind.JsxOpeningElement: + // These node kinds are deferred checked when overload resolution fails + // To save on work, we ensure the arguments are checked just once, in + // a deferred way + resolveUntypedCall(node as CallLikeExpression); + break; case SyntaxKind.FunctionExpression: case SyntaxKind.ArrowFunction: case SyntaxKind.MethodDeclaration: @@ -34319,7 +34611,7 @@ namespace ts { return undefined; } - function getSymbolAtLocation(node: Node): Symbol | undefined { + function getSymbolAtLocation(node: Node, ignoreErrors?: boolean): Symbol | undefined { if (node.kind === SyntaxKind.SourceFile) { return isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; } @@ -34403,7 +34695,7 @@ namespace ts { ((isInJSFile(node) && isRequireCall(node.parent, /*checkArgumentIsStringLiteralLike*/ false)) || isImportCall(node.parent)) || (isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) ) { - return resolveExternalModuleName(node, node); + return resolveExternalModuleName(node, node, ignoreErrors); } if (isCallExpression(parent) && isBindableObjectDefinePropertyCall(parent) && parent.arguments[1] === node) { return getSymbolOfNode(parent); @@ -34425,10 +34717,10 @@ namespace ts { case SyntaxKind.ClassKeyword: return getSymbolOfNode(node.parent); case SyntaxKind.ImportType: - return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal) : undefined; + return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : undefined; case SyntaxKind.ExportKeyword: - return isExportAssignment(node.parent) ? Debug.assertDefined(node.parent.symbol) : undefined; + return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : undefined; default: return undefined; @@ -35153,6 +35445,10 @@ namespace ts { return literalTypeToNode(type, node, tracker); } + function getJsxFactoryEntity(location: Node) { + return location ? (getJsxNamespace(location), (getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity; + } + function createResolver(): EmitResolver { // this variable and functions that use it are deliberately moved here from the outer scope // to avoid scope pollution @@ -35224,7 +35520,7 @@ namespace ts { const symbol = node && getSymbolOfNode(node); return !!(symbol && getCheckFlags(symbol) & CheckFlags.Late); }, - getJsxFactoryEntity: location => location ? (getJsxNamespace(location), (getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity)) : _jsxFactoryEntity, + getJsxFactoryEntity, getAllAccessorDeclarations(accessor: AccessorDeclaration): AllAccessorDeclarations { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration)!; // TODO: GH#18217 const otherKind = accessor.kind === SyntaxKind.SetAccessor ? SyntaxKind.GetAccessor : SyntaxKind.SetAccessor; @@ -35538,6 +35834,7 @@ namespace ts { case ExternalEmitHelpers.MakeTemplateObject: return "__makeTemplateObject"; case ExternalEmitHelpers.ClassPrivateFieldGet: return "__classPrivateFieldGet"; case ExternalEmitHelpers.ClassPrivateFieldSet: return "__classPrivateFieldSet"; + case ExternalEmitHelpers.CreateBinding: return "__createBinding"; default: return Debug.fail("Unrecognized helper"); } } @@ -36393,7 +36690,7 @@ namespace ts { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } - const parameter = Debug.assertDefined(getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); + const parameter = Debug.checkDefined(getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.A_set_accessor_cannot_have_rest_parameter); } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 00204b3dfbadc..72bc87d4eee9d 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1164,11 +1164,13 @@ namespace ts { } } - interface OptionsBase { + /*@internal*/ + export interface OptionsBase { [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined; } - interface ParseCommandLineWorkerDiagnostics extends DidYouMeanOptionsDiagnostics { + /*@internal*/ + export interface ParseCommandLineWorkerDiagnostics extends DidYouMeanOptionsDiagnostics { getOptionsNameMap: () => OptionsNameMap; optionTypeMismatchDiagnostic: DiagnosticMessage; } @@ -1189,7 +1191,8 @@ namespace ts { createDiagnostics(diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption); } - function parseCommandLineWorker( + /*@internal*/ + export function parseCommandLineWorker( diagnostics: ParseCommandLineWorkerDiagnostics, commandLine: readonly string[], readFile?: (path: string) => string | undefined) { @@ -1279,7 +1282,25 @@ namespace ts { errors: Diagnostic[] ) { if (opt.isTSConfigOnly) { - errors.push(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name)); + const optValue = args[i]; + if (optValue === "null") { + options[opt.name] = undefined; + i++; + } + else if (opt.type === "boolean") { + if (optValue === "false") { + options[opt.name] = false; + i++; + } + else { + if (optValue === "true") i++; + errors.push(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, opt.name)); + } + } + else { + errors.push(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, opt.name)); + if (optValue && !startsWith(optValue, "-")) i++; + } } else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). @@ -1287,42 +1308,49 @@ namespace ts { errors.push(createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name, getCompilerOptionValueTypeString(opt))); } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i]); - i++; - break; - case "boolean": - // boolean flag has optional value true, false, others - const optValue = args[i]; - options[opt.name] = optValue !== "false"; - // consume next argument as boolean flag value - if (optValue === "false" || optValue === "true") { + if (args[i] !== "null") { + switch (opt.type) { + case "number": + options[opt.name] = parseInt(args[i]); i++; - } - break; - case "string": - options[opt.name] = args[i] || ""; - i++; - break; - case "list": - const result = parseListTypeOption(opt, args[i], errors); - options[opt.name] = result || []; - if (result) { + break; + case "boolean": + // boolean flag has optional value true, false, others + const optValue = args[i]; + options[opt.name] = optValue !== "false"; + // consume next argument as boolean flag value + if (optValue === "false" || optValue === "true") { + i++; + } + break; + case "string": + options[opt.name] = args[i] || ""; i++; - } - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - options[opt.name] = parseCustomTypeOption(opt, args[i], errors); - i++; - break; + break; + case "list": + const result = parseListTypeOption(opt, args[i], errors); + options[opt.name] = result || []; + if (result) { + i++; + } + break; + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + options[opt.name] = parseCustomTypeOption(opt, args[i], errors); + i++; + break; + } + } + else { + options[opt.name] = undefined; + i++; } } return i; } - const compilerOptionsDidYouMeanDiagnostics: ParseCommandLineWorkerDiagnostics = { + /*@internal*/ + export const compilerOptionsDidYouMeanDiagnostics: ParseCommandLineWorkerDiagnostics = { getOptionsNameMap, optionDeclarations, unknownOptionDiagnostic: Diagnostics.Unknown_compiler_option_0, @@ -2170,7 +2198,7 @@ namespace ts { } function convertToOptionValueWithAbsolutePaths(option: CommandLineOption | undefined, value: CompilerOptionsValue, toAbsolutePath: (path: string) => string) { - if (option) { + if (option && !isNullOrUndefined(value)) { if (option.type === "list") { const values = value as readonly (string | number)[]; if (option.element.isFilePath && values.length) { @@ -2618,7 +2646,7 @@ namespace ts { errors: Push, extendedConfigCache?: Map ): ParsedTsconfig | undefined { - const path = host.useCaseSensitiveFileNames ? extendedConfigPath : toLowerCase(extendedConfigPath); + const path = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath); let value: ExtendedConfigCacheEntry | undefined; let extendedResult: TsConfigSourceFile; let extendedConfig: ParsedTsconfig | undefined; @@ -2922,7 +2950,7 @@ namespace ts { export function getFileNamesFromConfigSpecs(spec: ConfigFileSpecs, basePath: string, options: CompilerOptions, host: ParseConfigHost, extraFileExtensions: readonly FileExtensionInfo[] = []): ExpandResult { basePath = normalizePath(basePath); - const keyMapper = host.useCaseSensitiveFileNames ? identity : toLowerCase; + const keyMapper = createGetCanonicalFileName(host.useCaseSensitiveFileNames); // Literal file names (provided via the "files" array in tsconfig.json) are stored in a // file map with a possibly case insensitive key. We use this map later when when including @@ -3091,7 +3119,7 @@ namespace ts { const match = wildcardDirectoryPattern.exec(spec); if (match) { return { - key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(), + key: useCaseSensitiveFileNames ? match[0] : toFileNameLowerCase(match[0]), flags: watchRecursivePattern.test(spec) ? WatchDirectoryFlags.Recursive : WatchDirectoryFlags.None }; } diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 779d079d7d387..1e8326621d111 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1404,6 +1404,46 @@ namespace ts { /** Returns lower case string */ export function toLowerCase(x: string) { return x.toLowerCase(); } + // We convert the file names to lower case as key for file name on case insensitive file system + // While doing so we need to handle special characters (eg \u0130) to ensure that we dont convert + // it to lower case, fileName with its lowercase form can exist along side it. + // Handle special characters and make those case sensitive instead + // + // |-#--|-Unicode--|-Char code-|-Desc-------------------------------------------------------------------| + // | 1. | i | 105 | Ascii i | + // | 2. | I | 73 | Ascii I | + // |-------- Special characters ------------------------------------------------------------------------| + // | 3. | \u0130 | 304 | Uppper case I with dot above | + // | 4. | i,\u0307 | 105,775 | i, followed by 775: Lower case of (3rd item) | + // | 5. | I,\u0307 | 73,775 | I, followed by 775: Upper case of (4th item), lower case is (4th item) | + // | 6. | \u0131 | 305 | Lower case i without dot, upper case is I (2nd item) | + // | 7. | \u00DF | 223 | Lower case sharp s | + // + // Because item 3 is special where in its lowercase character has its own + // upper case form we cant convert its case. + // Rest special characters are either already in lower case format or + // they have corresponding upper case character so they dont need special handling + // + // But to avoid having to do string building for most common cases, also ignore + // a-z, 0-9, \u0131, \u00DF, \, /, ., : and space + const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; + /** + * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - \u0130) + * This function is used in places where we want to make file name as a key on these systems + * It is possible on mac to be able to refer to file name with I with dot on top as a fileName with its lower case form + * But on windows we cannot. Windows can have fileName with I with dot on top next to its lower case and they can not each be referred with the lowercase forms + * Technically we would want this function to be platform sepcific as well but + * our api has till now only taken caseSensitive as the only input and just for some characters we dont want to update API and ensure all customers use those api + * We could use upper case and we would still need to deal with the descripencies but + * we want to continue using lower case since in most cases filenames are lowercasewe and wont need any case changes and avoid having to store another string for the key + * So for this function purpose, we go ahead and assume character I with dot on top it as case sensitive since its very unlikely to use lower case form of that special character + */ + export function toFileNameLowerCase(x: string) { + return fileNameLowerCaseRegExp.test(x) ? + x.replace(fileNameLowerCaseRegExp, toLowerCase) : + x; + } + /** Throws an error because a function is not implemented. */ export function notImplemented(): never { throw new Error("Not implemented"); @@ -1865,7 +1905,7 @@ namespace ts { export type GetCanonicalFileName = (fileName: string) => string; export function createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): GetCanonicalFileName { - return useCaseSensitiveFileNames ? identity : toLowerCase; + return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; } /** Represents a "prefix*suffix" pattern. */ @@ -2011,4 +2051,19 @@ namespace ts { } } } + + export function padLeft(s: string, length: number) { + while (s.length < length) { + s = " " + s; + } + return s; + } + + export function padRight(s: string, length: number) { + while (s.length < length) { + s = s + " "; + } + + return s; + } } diff --git a/src/compiler/corePublic.ts b/src/compiler/corePublic.ts index fcbd0cf7e07e9..c3a258cd84edb 100644 --- a/src/compiler/corePublic.ts +++ b/src/compiler/corePublic.ts @@ -1,7 +1,7 @@ namespace ts { // WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configurePrerelease` too. - export const versionMajorMinor = "3.8"; + export const versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ export const version = `${versionMajorMinor}.0-dev`; diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts index a01b128ad25fc..2de848aac2ddd 100644 --- a/src/compiler/debug.ts +++ b/src/compiler/debug.ts @@ -1,76 +1,220 @@ /* @internal */ namespace ts { export namespace Debug { - /* eslint-disable prefer-const */ - export let currentAssertionLevel = AssertionLevel.None; + let currentAssertionLevel = AssertionLevel.None; + + // eslint-disable-next-line prefer-const export let isDebugging = false; - /* eslint-enable prefer-const */ + + type AssertionKeys = MatchingKeys; + + const assertionCache: Partial> = {}; + + export function getAssertionLevel() { + return currentAssertionLevel; + } + + export function setAssertionLevel(level: AssertionLevel) { + const prevAssertionLevel = currentAssertionLevel; + currentAssertionLevel = level; + + if (level > prevAssertionLevel) { + // restore assertion functions for the current assertion level (see `shouldAssertFunction`). + for (const key of getOwnKeys(assertionCache) as AssertionKeys[]) { + const cachedFunc = assertionCache[key]; + if (cachedFunc !== undefined && Debug[key] !== cachedFunc.assertion && level >= cachedFunc.level) { + (Debug as any)[key] = cachedFunc; + assertionCache[key] = undefined; + } + } + } + } export function shouldAssert(level: AssertionLevel): boolean { return currentAssertionLevel >= level; } - export function assert(expression: boolean, message?: string, verboseDebugInfo?: string | (() => string), stackCrawlMark?: AnyFunction): void { + /** + * Tests whether an assertion function should be executed. If it shouldn't, it is cached and replaced with `ts.noop`. + * Replaced assertion functions are restored when `Debug.setAssertionLevel` is set to a high enough level. + * @param level The minimum assertion level required. + * @param name The name of the current assertion function. + */ + function shouldAssertFunction(level: AssertionLevel, name: K): boolean { + if (!shouldAssert(level)) { + assertionCache[name] = { level, assertion: Debug[name] }; + (Debug as any)[name] = noop; + return false; + } + return true; + } + + export function fail(message?: string, stackCrawlMark?: AnyFunction): never { + debugger; + const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); + if ((Error).captureStackTrace) { + (Error).captureStackTrace(e, stackCrawlMark || fail); + } + throw e; + } + + export function failBadSyntaxKind(node: Node, message?: string, stackCrawlMark?: AnyFunction): never { + return fail( + `${message || "Unexpected node."}\r\nNode ${formatSyntaxKind(node.kind)} was unexpected.`, + stackCrawlMark || failBadSyntaxKind); + } + + export function assert(expression: boolean, message?: string, verboseDebugInfo?: string | (() => string), stackCrawlMark?: AnyFunction): asserts expression { if (!expression) { + message = message ? `False expression: ${message}` : "False expression."; if (verboseDebugInfo) { message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); } - fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert); + fail(message, stackCrawlMark || assert); } } - export function assertEqual(a: T, b: T, msg?: string, msg2?: string): void { + export function assertEqual(a: T, b: T, msg?: string, msg2?: string, stackCrawlMark?: AnyFunction): void { if (a !== b) { const message = msg ? msg2 ? `${msg} ${msg2}` : msg : ""; - fail(`Expected ${a} === ${b}. ${message}`); + fail(`Expected ${a} === ${b}. ${message}`, stackCrawlMark || assertEqual); } } - export function assertLessThan(a: number, b: number, msg?: string): void { + export function assertLessThan(a: number, b: number, msg?: string, stackCrawlMark?: AnyFunction): void { if (a >= b) { - fail(`Expected ${a} < ${b}. ${msg || ""}`); + fail(`Expected ${a} < ${b}. ${msg || ""}`, stackCrawlMark || assertLessThan); } } - export function assertLessThanOrEqual(a: number, b: number): void { + export function assertLessThanOrEqual(a: number, b: number, stackCrawlMark?: AnyFunction): void { if (a > b) { - fail(`Expected ${a} <= ${b}`); + fail(`Expected ${a} <= ${b}`, stackCrawlMark || assertLessThanOrEqual); } } - export function assertGreaterThanOrEqual(a: number, b: number): void { + export function assertGreaterThanOrEqual(a: number, b: number, stackCrawlMark?: AnyFunction): void { if (a < b) { - fail(`Expected ${a} >= ${b}`); + fail(`Expected ${a} >= ${b}`, stackCrawlMark || assertGreaterThanOrEqual); } } - export function fail(message?: string, stackCrawlMark?: AnyFunction): never { - debugger; - const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); - if ((Error).captureStackTrace) { - (Error).captureStackTrace(e, stackCrawlMark || fail); + export function assertIsDefined(value: T, message?: string, stackCrawlMark?: AnyFunction): asserts value is NonNullable { + // eslint-disable-next-line no-null/no-null + if (value === undefined || value === null) { + fail(message, stackCrawlMark || assertIsDefined); } - throw e; } - export function assertDefined(value: T | null | undefined, message?: string): T { - // eslint-disable-next-line no-null/no-null - if (value === undefined || value === null) return fail(message); + export function checkDefined(value: T | null | undefined, message?: string, stackCrawlMark?: AnyFunction): T { + assertIsDefined(value, message, stackCrawlMark || checkDefined); return value; } - export function assertEachDefined(value: A, message?: string): A { + /** + * @deprecated Use `checkDefined` to check whether a value is defined inline. Use `assertIsDefined` to check whether + * a value is defined at the statement level. + */ + export const assertDefined = checkDefined; + + export function assertEachIsDefined(value: NodeArray, message?: string, stackCrawlMark?: AnyFunction): asserts value is NodeArray; + export function assertEachIsDefined(value: readonly T[], message?: string, stackCrawlMark?: AnyFunction): asserts value is readonly NonNullable[]; + export function assertEachIsDefined(value: readonly T[], message?: string, stackCrawlMark?: AnyFunction) { for (const v of value) { - assertDefined(v, message); + assertIsDefined(v, message, stackCrawlMark || assertEachIsDefined); } + } + + export function checkEachDefined(value: A, message?: string, stackCrawlMark?: AnyFunction): A { + assertEachIsDefined(value, message, stackCrawlMark || checkEachDefined); return value; } + /** + * @deprecated Use `checkEachDefined` to check whether the elements of an array are defined inline. Use `assertEachIsDefined` to check whether + * the elements of an array are defined at the statement level. + */ + export const assertEachDefined = checkEachDefined; + export function assertNever(member: never, message = "Illegal value:", stackCrawlMark?: AnyFunction): never { const detail = typeof member === "object" && hasProperty(member, "kind") && hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind((member as Node).kind) : JSON.stringify(member); return fail(`${message} ${detail}`, stackCrawlMark || assertNever); } + export function assertEachNode(nodes: NodeArray, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts nodes is NodeArray; + export function assertEachNode(nodes: readonly T[], test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts nodes is readonly U[]; + export function assertEachNode(nodes: readonly Node[], test: (node: Node) => boolean, message?: string, stackCrawlMark?: AnyFunction): void; + export function assertEachNode(nodes: readonly Node[], test: (node: Node) => boolean, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertEachNode")) { + assert( + test === undefined || every(nodes, test), + message || "Unexpected node.", + () => `Node array did not pass test '${getFunctionName(test)}'.`, + stackCrawlMark || assertEachNode); + } + } + + export function assertNode(node: T | undefined, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is U; + export function assertNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction): void; + export function assertNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertNode")) { + assert( + node !== undefined && (test === undefined || test(node)), + message || "Unexpected node.", + () => `Node ${formatSyntaxKind(node!.kind)} did not pass test '${getFunctionName(test!)}'.`, + stackCrawlMark || assertNode); + } + } + + export function assertNotNode(node: T | undefined, test: (node: Node) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is Exclude; + export function assertNotNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction): void; + export function assertNotNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertNotNode")) { + assert( + node === undefined || test === undefined || !test(node), + message || "Unexpected node.", + () => `Node ${formatSyntaxKind(node!.kind)} should not have passed test '${getFunctionName(test!)}'.`, + stackCrawlMark || assertNotNode); + } + } + + export function assertOptionalNode(node: T, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is U; + export function assertOptionalNode(node: T | undefined, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is U | undefined; + export function assertOptionalNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction): void; + export function assertOptionalNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertOptionalNode")) { + assert( + test === undefined || node === undefined || test(node), + message || "Unexpected node.", + () => `Node ${formatSyntaxKind(node!.kind)} did not pass test '${getFunctionName(test!)}'.`, + stackCrawlMark || assertOptionalNode); + } + } + + export function assertOptionalToken(node: T, kind: K, message?: string, stackCrawlMark?: AnyFunction): asserts node is Extract; + export function assertOptionalToken(node: T | undefined, kind: K, message?: string, stackCrawlMark?: AnyFunction): asserts node is Extract | undefined; + export function assertOptionalToken(node: Node | undefined, kind: SyntaxKind | undefined, message?: string, stackCrawlMark?: AnyFunction): void; + export function assertOptionalToken(node: Node | undefined, kind: SyntaxKind | undefined, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertOptionalToken")) { + assert( + kind === undefined || node === undefined || node.kind === kind, + message || "Unexpected node.", + () => `Node ${formatSyntaxKind(node!.kind)} was not a '${formatSyntaxKind(kind)}' token.`, + stackCrawlMark || assertOptionalToken); + } + } + + export function assertMissingNode(node: Node | undefined, message?: string, stackCrawlMark?: AnyFunction): asserts node is undefined; + export function assertMissingNode(node: Node | undefined, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertMissingNode")) { + assert( + node === undefined, + message || "Unexpected node.", + () => `Node ${formatSyntaxKind(node!.kind)} was unexpected'.`, + stackCrawlMark || assertMissingNode); + } + } + export function getFunctionName(func: AnyFunction) { if (typeof func !== "function") { return ""; @@ -167,64 +311,6 @@ namespace ts { return formatEnum(flags, (ts).ObjectFlags, /*isFlags*/ true); } - export function failBadSyntaxKind(node: Node, message?: string): never { - return fail( - `${message || "Unexpected node."}\r\nNode ${formatSyntaxKind(node.kind)} was unexpected.`, - failBadSyntaxKind); - } - - export const assertEachNode = shouldAssert(AssertionLevel.Normal) - ? (nodes: Node[], test: (node: Node) => boolean, message?: string): void => assert( - test === undefined || every(nodes, test), - message || "Unexpected node.", - () => `Node array did not pass test '${getFunctionName(test)}'.`, - assertEachNode) - : noop; - - export const assertNode = shouldAssert(AssertionLevel.Normal) - ? (node: Node | undefined, test: ((node: Node | undefined) => boolean) | undefined, message?: string): void => assert( - test === undefined || test(node), - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node!.kind)} did not pass test '${getFunctionName(test!)}'.`, - assertNode) - : noop; - - export function assertNotNode(node: T | undefined, test: (node: Node) => node is U, message?: string): asserts node is Exclude; - export function assertNotNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string): void; - export function assertNotNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string): void { - if (shouldAssert(AssertionLevel.Normal)) { - assert( - test === undefined || node === undefined || !test(node), - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node!.kind)} should not have passed test '${getFunctionName(test!)}'.`, - assertNotNode); - } - } - - export const assertOptionalNode = shouldAssert(AssertionLevel.Normal) - ? (node: Node, test: (node: Node) => boolean, message?: string): void => assert( - test === undefined || node === undefined || test(node), - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node.kind)} did not pass test '${getFunctionName(test)}'.`, - assertOptionalNode) - : noop; - - export const assertOptionalToken = shouldAssert(AssertionLevel.Normal) - ? (node: Node, kind: SyntaxKind, message?: string): void => assert( - kind === undefined || node === undefined || node.kind === kind, - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node.kind)} was not a '${formatSyntaxKind(kind)}' token.`, - assertOptionalToken) - : noop; - - export const assertMissingNode = shouldAssert(AssertionLevel.Normal) - ? (node: Node, message?: string): void => assert( - node === undefined, - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node.kind)} was unexpected'.`, - assertMissingNode) - : noop; - let isDebugInfoEnabled = false; interface ExtendedDebugModule { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 2dc894e71fb50..040b9a301bb47 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1135,6 +1135,18 @@ "category": "Error", "code": 1380 }, + "Unexpected token. Did you mean `{'}'}` or `}`?": { + "category": "Error", + "code": 1381 + }, + "Unexpected token. Did you mean `{'>'}` or `>`?": { + "category": "Error", + "code": 1382 + }, + "Only named exports may use 'export type'.": { + "category": "Error", + "code": 1383 + }, "The types of '{0}' are incompatible between these types.": { "category": "Error", @@ -2683,7 +2695,7 @@ "category": "Error", "code": 2733 }, - "It is highly likely that you are missing a semicolon.": { + "Are you missing a semicolon?": { "category": "Error", "code": 2734 }, @@ -2879,6 +2891,10 @@ "category": "Message", "code": 2782 }, + "'{0}' is specified more than once, so this usage will be overwritten.": { + "category": "Error", + "code": 2783 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", @@ -3630,7 +3646,7 @@ "category": "Message", "code": 6061 }, - "Option '{0}' can only be specified in 'tsconfig.json' file.": { + "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line.": { "category": "Error", "code": 6064 }, @@ -4280,6 +4296,14 @@ "category": "Message", "code": 6228 }, + "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'.": { + "category": "Error", + "code": 6229 + }, + "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line.": { + "category": "Error", + "code": 6230 + }, "Projects to reference": { "category": "Message", @@ -5457,6 +5481,14 @@ "category": "Message", "code": 95099 }, + "Convert invalid character to its html entity code": { + "category": "Message", + "code": 95100 + }, + "Wrap invalid character in an expression container": { + "category": "Message", + "code": 95101 + }, "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.": { "category": "Error", diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 5ebc32643b19e..adbe97212e2b0 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -131,7 +131,7 @@ namespace ts { } function rootDirOfOptions(configFile: ParsedCommandLine) { - return configFile.options.rootDir || getDirectoryPath(Debug.assertDefined(configFile.options.configFilePath)); + return configFile.options.rootDir || getDirectoryPath(Debug.checkDefined(configFile.options.configFilePath)); } function getOutputPathWithoutChangingExt(inputFileName: string, configFile: ParsedCommandLine, ignoreCase: boolean, outputDir: string | undefined) { @@ -163,7 +163,7 @@ namespace ts { Extension.Jsx : Extension.Js ); - return !isJsonFile || comparePaths(inputFileName, outputFileName, Debug.assertDefined(configFile.options.configFilePath), ignoreCase) !== Comparison.EqualTo ? + return !isJsonFile || comparePaths(inputFileName, outputFileName, Debug.checkDefined(configFile.options.configFilePath), ignoreCase) !== Comparison.EqualTo ? outputFileName : undefined; } @@ -239,7 +239,7 @@ namespace ts { export function getFirstProjectOutput(configFile: ParsedCommandLine, ignoreCase: boolean): string { if (configFile.options.outFile || configFile.options.out) { const { jsFilePath } = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false); - return Debug.assertDefined(jsFilePath, `project ${configFile.options.configFilePath} expected to have at least one output`); + return Debug.checkDefined(jsFilePath, `project ${configFile.options.configFilePath} expected to have at least one output`); } for (const inputFileName of configFile.fileNames) { @@ -587,7 +587,7 @@ namespace ts { return `data:application/json;base64,${base64SourceMapText}`; } - const sourceMapFile = getBaseFileName(normalizeSlashes(Debug.assertDefined(sourceMapFilePath))); + const sourceMapFile = getBaseFileName(normalizeSlashes(Debug.checkDefined(sourceMapFilePath))); if (mapOptions.mapRoot) { let sourceMapDir = normalizeSlashes(mapOptions.mapRoot); if (sourceFile) { @@ -690,7 +690,7 @@ namespace ts { sourceFile.statements = createNodeArray(); return sourceFile; }); - const jsBundle = Debug.assertDefined(bundle.js); + const jsBundle = Debug.checkDefined(bundle.js); forEach(jsBundle.sources && jsBundle.sources.prologues, prologueInfo => { const sourceFile = sourceFiles[prologueInfo.file]; sourceFile.text = prologueInfo.text; @@ -713,9 +713,9 @@ namespace ts { customTransformers?: CustomTransformers ): EmitUsingBuildInfoResult { const { buildInfoPath, jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath } = getOutputPathsForBundle(config.options, /*forceDtsPaths*/ false); - const buildInfoText = host.readFile(Debug.assertDefined(buildInfoPath)); + const buildInfoText = host.readFile(Debug.checkDefined(buildInfoPath)); if (!buildInfoText) return buildInfoPath!; - const jsFileText = host.readFile(Debug.assertDefined(jsFilePath)); + const jsFileText = host.readFile(Debug.checkDefined(jsFilePath)); if (!jsFileText) return jsFilePath!; const sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath); // error if no source map or for now if inline sourcemap @@ -848,7 +848,7 @@ namespace ts { let write = writeBase; let isOwnFileEmit: boolean; const bundleFileInfo = printerOptions.writeBundleFileInfo ? { sections: [] } as BundleFileInfo : undefined; - const relativeToBuildInfo = bundleFileInfo ? Debug.assertDefined(printerOptions.relativeToBuildInfo) : undefined; + const relativeToBuildInfo = bundleFileInfo ? Debug.checkDefined(printerOptions.relativeToBuildInfo) : undefined; const recordInternalSection = printerOptions.recordInternalSection; let sourceFileTextPos = 0; let sourceFileTextKind: BundleFileTextLikeKind = BundleFileSectionKind.Text; @@ -1519,8 +1519,9 @@ namespace ts { case SyntaxKind.JSDocThisTag: case SyntaxKind.JSDocEnumTag: return emitJSDocSimpleTypedTag(node as JSDocTypeTag); + case SyntaxKind.JSDocImplementsTag: case SyntaxKind.JSDocAugmentsTag: - return emitJSDocAugmentsTag(node as JSDocAugmentsTag); + return emitJSDocHeritageTag(node as JSDocImplementsTag | JSDocAugmentsTag); case SyntaxKind.JSDocTemplateTag: return emitJSDocTemplateTag(node as JSDocTemplateTag); case SyntaxKind.JSDocTypedefTag: @@ -2744,11 +2745,11 @@ namespace ts { const node = getParseTreeNode(contextNode); const isSimilarNode = node && node.kind === contextNode.kind; const startPos = pos; - if (isSimilarNode) { - pos = skipTrivia(currentSourceFile!.text, pos); + if (isSimilarNode && currentSourceFile) { + pos = skipTrivia(currentSourceFile.text, pos); } if (emitLeadingCommentsOfPosition && isSimilarNode && contextNode.pos !== startPos) { - const needsIndent = indentLeading && !positionsAreOnSameLine(startPos, pos, currentSourceFile!); + const needsIndent = indentLeading && currentSourceFile && !positionsAreOnSameLine(startPos, pos, currentSourceFile); if (needsIndent) { increaseIndent(); } @@ -3468,7 +3469,7 @@ namespace ts { emitJSDocComment(tag.comment); } - function emitJSDocAugmentsTag(tag: JSDocAugmentsTag) { + function emitJSDocHeritageTag(tag: JSDocImplementsTag | JSDocAugmentsTag) { emitJSDocTagName(tag.tagName); writeSpace(); writePunctuation("{"); @@ -3784,7 +3785,7 @@ namespace ts { else { for (const prepend of sourceFileOrBundle.prepends) { Debug.assertNode(prepend, isUnparsedSource); - if (emitShebangIfNeeded(prepend as UnparsedSource)) { + if (emitShebangIfNeeded(prepend)) { return true; } } diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index c5bdcd278b929..bd5f85d873ac2 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -278,6 +278,7 @@ namespace ts { name: "typescript:spread", importName: "__spread", scoped: false, + dependencies: [readHelper], text: ` var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); @@ -286,7 +287,6 @@ namespace ts { }; export function createSpreadHelper(context: TransformationContext, argumentList: readonly Expression[], location?: TextRange) { - context.requestEmitHelper(readHelper); context.requestEmitHelper(spreadHelper); return setTextRange( createCall( @@ -566,7 +566,7 @@ namespace ts { properties.push(setter); } - properties.push(createPropertyAssignment("enumerable", createTrue())); + properties.push(createPropertyAssignment("enumerable", getAccessor || setAccessor ? createFalse() : createTrue())); properties.push(createPropertyAssignment("configurable", createTrue())); const expression = setTextRange( @@ -1814,7 +1814,7 @@ namespace ts { if (isBindingElement(element)) { if (element.dotDotDotToken) { Debug.assertNode(element.name, isIdentifier); - return setOriginalNode(setTextRange(createSpread(element.name), element), element); + return setOriginalNode(setTextRange(createSpread(element.name), element), element); } const expression = convertToAssignmentElementTarget(element.name); return element.initializer @@ -1835,14 +1835,14 @@ namespace ts { if (isBindingElement(element)) { if (element.dotDotDotToken) { Debug.assertNode(element.name, isIdentifier); - return setOriginalNode(setTextRange(createSpreadAssignment(element.name), element), element); + return setOriginalNode(setTextRange(createSpreadAssignment(element.name), element), element); } if (element.propertyName) { const expression = convertToAssignmentElementTarget(element.name); return setOriginalNode(setTextRange(createPropertyAssignment(element.propertyName, element.initializer ? createAssignment(expression, element.initializer) : expression), element), element); } Debug.assertNode(element.name, isIdentifier); - return setOriginalNode(setTextRange(createShorthandPropertyAssignment(element.name, element.initializer), element), element); + return setOriginalNode(setTextRange(createShorthandPropertyAssignment(element.name, element.initializer), element), element); } Debug.assertNode(element, isObjectLiteralElementLike); return element; diff --git a/src/compiler/factoryPublic.ts b/src/compiler/factoryPublic.ts index c0b64e45330d0..3466664d99af8 100644 --- a/src/compiler/factoryPublic.ts +++ b/src/compiler/factoryPublic.ts @@ -1484,7 +1484,7 @@ namespace ts { let token = rawTextScanner.scan(); if (token === SyntaxKind.CloseBracketToken) { - token = rawTextScanner.reScanTemplateToken(); + token = rawTextScanner.reScanTemplateToken(/* isTaggedTemplate */ false); } if (rawTextScanner.isUnterminated()) { @@ -2958,6 +2958,8 @@ namespace ts { importDefaultHelper, classPrivateFieldGetHelper, classPrivateFieldSetHelper, + createBindingHelper, + setModuleDefaultHelper ], helper => helper.name)); } @@ -2990,10 +2992,10 @@ namespace ts { if (textOrInputFiles.buildInfo && textOrInputFiles.buildInfo.bundle) { node.oldFileOfCurrentEmit = textOrInputFiles.oldFileOfCurrentEmit; Debug.assert(mapTextOrStripInternal === undefined || typeof mapTextOrStripInternal === "boolean"); - stripInternal = mapTextOrStripInternal as boolean | undefined; + stripInternal = mapTextOrStripInternal; bundleFileInfo = mapPathOrType === "js" ? textOrInputFiles.buildInfo.bundle.js : textOrInputFiles.buildInfo.bundle.dts; if (node.oldFileOfCurrentEmit) { - parseOldFileOfCurrentEmit(node, Debug.assertDefined(bundleFileInfo)); + parseOldFileOfCurrentEmit(node, Debug.checkDefined(bundleFileInfo)); return node; } } @@ -3212,13 +3214,13 @@ namespace ts { }; node.javascriptPath = declarationTextOrJavascriptPath; node.javascriptMapPath = javascriptMapPath; - node.declarationPath = Debug.assertDefined(javascriptMapTextOrDeclarationPath); + node.declarationPath = Debug.checkDefined(javascriptMapTextOrDeclarationPath); node.declarationMapPath = declarationMapPath; node.buildInfoPath = declarationMapTextOrBuildInfoPath; Object.defineProperties(node, { javascriptText: { get() { return definedTextGetter(declarationTextOrJavascriptPath); } }, javascriptMapText: { get() { return textGetter(javascriptMapPath); } }, // TODO:: if there is inline sourceMap in jsFile, use that - declarationText: { get() { return definedTextGetter(Debug.assertDefined(javascriptMapTextOrDeclarationPath)); } }, + declarationText: { get() { return definedTextGetter(Debug.checkDefined(javascriptMapTextOrDeclarationPath)); } }, declarationMapText: { get() { return textGetter(declarationMapPath); } }, // TODO:: if there is inline sourceMap in dtsFile, use that buildInfo: { get() { return getAndCacheBuildInfo(() => textGetter(declarationMapTextOrBuildInfoPath)); } } }); diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index b993136e8286c..f757e5934cc13 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -479,6 +479,9 @@ namespace ts { visitNode(cbNode, (node).name)); case SyntaxKind.JSDocAuthorTag: return visitNode(cbNode, (node as JSDocTag).tagName); + case SyntaxKind.JSDocImplementsTag: + return visitNode(cbNode, (node as JSDocTag).tagName) || + visitNode(cbNode, (node).class); case SyntaxKind.JSDocAugmentsTag: return visitNode(cbNode, (node as JSDocTag).tagName) || visitNode(cbNode, (node).class); @@ -522,6 +525,76 @@ namespace ts { } } + /** @internal */ + /** + * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes + * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; additionally, + * unlike `forEachChild`, embedded arrays are flattened and the 'cbNode' callback is invoked for each element. + * If a callback returns a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. + * + * @param node a given node to visit its children + * @param cbNode a callback to be invoked for all child nodes + * @param cbNodes a callback to be invoked for embedded array + * + * @remarks Unlike `forEachChild`, `forEachChildRecursively` handles recursively invoking the traversal on each child node found, + * and while doing so, handles traversing the structure without relying on the callstack to encode the tree structure. + */ + export function forEachChildRecursively(rootNode: Node, cbNode: (node: Node, parent: Node) => T | "skip" | undefined, cbNodes?: (nodes: NodeArray, parent: Node) => T | "skip" | undefined): T | undefined { + + const stack: Node[] = [rootNode]; + while (stack.length) { + const parent = stack.pop()!; + const res = visitAllPossibleChildren(parent, gatherPossibleChildren(parent)); + if (res) { + return res; + } + } + + return; + + function gatherPossibleChildren(node: Node) { + const children: (Node | NodeArray)[] = []; + forEachChild(node, addWorkItem, addWorkItem); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal + return children; + + function addWorkItem(n: Node | NodeArray) { + children.unshift(n); + } + } + + function visitAllPossibleChildren(parent: Node, children: readonly (Node | NodeArray)[]) { + for (const child of children) { + if (isArray(child)) { + if (cbNodes) { + const res = cbNodes(child, parent); + if (res) { + if (res === "skip") continue; + return res; + } + } + + for (let i = child.length - 1; i >= 0; i--) { + const realChild = child[i]; + const res = cbNode(realChild, parent); + if (res) { + if (res === "skip") continue; + return res; + } + stack.push(realChild); + } + } + else { + stack.push(child); + const res = cbNode(child, parent); + if (res) { + if (res === "skip") continue; + return res; + } + } + } + } + } + export function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes = false, scriptKind?: ScriptKind): SourceFile { performance.mark("beforeParse"); let result: SourceFile; @@ -903,31 +976,14 @@ namespace ts { // a syntax tree, and no semantic features, then the binding process is an unnecessary // overhead. This functions allows us to set all the parents, without all the expense of // binding. - - const stack: Node[] = [rootNode]; - while (stack.length) { - const parent = stack.pop()!; - bindParentToChildren(parent, gatherChildren(parent)); - } - - return; - - function gatherChildren(node: Node) { - const children: Node[] = []; - forEachChild(node, n => { children.unshift(n); }); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal - return children; - } - - function bindParentToChildren(parent: Node, children: readonly Node[]) { - for (const child of children) { - if (child.parent === parent) continue; // already bound, assume subtree is bound - child.parent = parent; - stack.push(child); - if (hasJSDocNodes(child)) { - for (const jsDoc of child.jsDoc!) { - jsDoc.parent = child; - stack.push(jsDoc); - } + forEachChildRecursively(rootNode, bindParentToChild); + + function bindParentToChild(child: Node, parent: Node) { + child.parent = parent; + if (hasJSDocNodes(child)) { + for (const doc of child.jsDoc!) { + bindParentToChild(doc, child); + forEachChildRecursively(doc, bindParentToChild); } } } @@ -1137,8 +1193,12 @@ namespace ts { return currentToken = scanner.reScanSlashToken(); } - function reScanTemplateToken(): SyntaxKind { - return currentToken = scanner.reScanTemplateToken(); + function reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind { + return currentToken = scanner.reScanTemplateToken(isTaggedTemplate); + } + + function reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind { + return currentToken = scanner.reScanTemplateHeadOrNoSubstitutionTemplate(); } function reScanLessThanToken(): SyntaxKind { @@ -2329,17 +2389,17 @@ namespace ts { return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } - function parseTemplateExpression(): TemplateExpression { + function parseTemplateExpression(isTaggedTemplate: boolean): TemplateExpression { const template = createNode(SyntaxKind.TemplateExpression); - template.head = parseTemplateHead(); + template.head = parseTemplateHead(isTaggedTemplate); Debug.assert(template.head.kind === SyntaxKind.TemplateHead, "Template head has wrong token kind"); const list = []; const listPos = getNodePos(); do { - list.push(parseTemplateSpan()); + list.push(parseTemplateSpan(isTaggedTemplate)); } while (last(list).literal.kind === SyntaxKind.TemplateMiddle); @@ -2348,13 +2408,13 @@ namespace ts { return finishNode(template); } - function parseTemplateSpan(): TemplateSpan { + function parseTemplateSpan(isTaggedTemplate: boolean): TemplateSpan { const span = createNode(SyntaxKind.TemplateSpan); span.expression = allowInAnd(parseExpression); let literal: TemplateMiddle | TemplateTail; if (token() === SyntaxKind.CloseBraceToken) { - reScanTemplateToken(); + reScanTemplateToken(isTaggedTemplate); literal = parseTemplateMiddleOrTemplateTail(); } else { @@ -2369,7 +2429,10 @@ namespace ts { return parseLiteralLikeNode(token()); } - function parseTemplateHead(): TemplateHead { + function parseTemplateHead(isTaggedTemplate: boolean): TemplateHead { + if (isTaggedTemplate) { + reScanTemplateHeadOrNoSubstitutionTemplate(); + } const fragment = parseLiteralLikeNode(token()); Debug.assert(fragment.kind === SyntaxKind.TemplateHead, "Template head has wrong token kind"); return fragment; @@ -2413,6 +2476,10 @@ namespace ts { (node).numericLiteralFlags = scanner.getTokenFlags() & TokenFlags.NumericLiteralFlags; } + if (isTemplateLiteralKind(node.kind)) { + (node).templateFlags = scanner.getTokenFlags() & TokenFlags.ContainsInvalidEscape; + } + nextToken(); finishNode(node); @@ -4794,8 +4861,8 @@ namespace ts { tagExpression.questionDotToken = questionDotToken; tagExpression.typeArguments = typeArguments; tagExpression.template = token() === SyntaxKind.NoSubstitutionTemplateLiteral - ? parseLiteralNode() - : parseTemplateExpression(); + ? (reScanTemplateHeadOrNoSubstitutionTemplate(), parseLiteralNode()) + : parseTemplateExpression(/*isTaggedTemplate*/ true); if (questionDotToken || tag.flags & NodeFlags.OptionalChain) { tagExpression.flags |= NodeFlags.OptionalChain; } @@ -4967,7 +5034,7 @@ namespace ts { } break; case SyntaxKind.TemplateHead: - return parseTemplateExpression(); + return parseTemplateExpression(/* isTaggedTemplate */ false); } return parseIdentifier(Diagnostics.Expression_expected); @@ -6245,7 +6312,7 @@ namespace ts { const tok = token(); Debug.assert(tok === SyntaxKind.ExtendsKeyword || tok === SyntaxKind.ImplementsKeyword); // isListElement() should ensure this. const node = createNode(SyntaxKind.HeritageClause); - node.token = tok as SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword; + node.token = tok; nextToken(); node.types = parseDelimitedList(ParsingContext.HeritageClauseElement, parseExpressionWithTypeArguments); return finishNode(node); @@ -6587,8 +6654,8 @@ namespace ts { return finishNode(node); } - function parseNamespaceExport(): NamespaceExport { - const node = createNode(SyntaxKind.NamespaceExport); + function parseNamespaceExport(pos: number): NamespaceExport { + const node = createNode(SyntaxKind.NamespaceExport, pos); node.name = parseIdentifier(); return finishNode(node); } @@ -6596,9 +6663,10 @@ namespace ts { function parseExportDeclaration(node: ExportDeclaration): ExportDeclaration { node.kind = SyntaxKind.ExportDeclaration; node.isTypeOnly = parseOptional(SyntaxKind.TypeKeyword); + const namespaceExportPos = scanner.getStartPos(); if (parseOptional(SyntaxKind.AsteriskToken)) { if (parseOptional(SyntaxKind.AsKeyword)) { - node.exportClause = parseNamespaceExport(); + node.exportClause = parseNamespaceExport(namespaceExportPos); } parseExpected(SyntaxKind.FromKeyword); node.moduleSpecifier = parseModuleSpecifier(); @@ -6956,6 +7024,9 @@ namespace ts { case "author": tag = parseAuthorTag(start, tagName, margin); break; + case "implements": + tag = parseImplementsTag(start, tagName); + break; case "augments": case "extends": tag = parseAugmentsTag(start, tagName); @@ -7028,10 +7099,12 @@ namespace ts { comments.push(text); indent += text.length; } - if (initialMargin) { + if (initialMargin !== undefined) { // jump straight to saving comments if there is some initial indentation - pushComment(initialMargin); - state = JSDocState.SavingComments; + if (initialMargin !== "") { + pushComment(initialMargin); + } + state = JSDocState.SawAsterisk; } let tok = token() as JSDocSyntaxKind; loop: while (true) { @@ -7310,6 +7383,13 @@ namespace ts { } } + function parseImplementsTag(start: number, tagName: Identifier): JSDocImplementsTag { + const result = createNode(SyntaxKind.JSDocImplementsTag, start); + result.tagName = tagName; + result.class = parseExpressionWithTypeArgumentsForAugments(); + return finishNode(result); + } + function parseAugmentsTag(start: number, tagName: Identifier): JSDocAugmentsTag { const result = createNode(SyntaxKind.JSDocAugmentsTag, start); result.tagName = tagName; @@ -7569,7 +7649,7 @@ namespace ts { const typeParameter = createNode(SyntaxKind.TypeParameter); typeParameter.name = parseJSDocIdentifierName(Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces); finishNode(typeParameter); - skipWhitespace(); + skipWhitespaceOrAsterisk(); typeParameters.push(typeParameter); } while (parseOptionalJsdoc(SyntaxKind.CommaToken)); diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 41cd0d5c413d1..6e9e167119d47 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -383,13 +383,6 @@ namespace ts { return formatStyle + text + resetEscapeSequence; } - function padLeft(s: string, length: number) { - while (s.length < length) { - s = " " + s; - } - return s; - } - function formatCodeSpan(file: SourceFile, start: number, length: number, indent: string, squiggleColor: ForegroundColorEscapeSequences, host: FormatDiagnosticsHost) { const { line: firstLine, character: firstLineChar } = getLineAndCharacterOfPosition(file, start); const { line: lastLine, character: lastLineChar } = getLineAndCharacterOfPosition(file, start + length); @@ -560,7 +553,7 @@ namespace ts { program: Program | undefined, rootFileNames: string[], newOptions: CompilerOptions, - getSourceVersion: (path: Path) => string | undefined, + getSourceVersion: (path: Path, fileName: string) => string | undefined, fileExists: (fileName: string) => boolean, hasInvalidatedResolution: HasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames: boolean, @@ -613,7 +606,7 @@ namespace ts { } function sourceFileVersionUptoDate(sourceFile: SourceFile) { - return sourceFile.version === getSourceVersion(sourceFile.resolvedPath); + return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName); } function projectReferenceUptoDate(oldRef: ProjectReference, newRef: ProjectReference, index: number) { @@ -761,10 +754,10 @@ namespace ts { let _compilerOptionsObjectLiteralSyntax: ObjectLiteralExpression | null | undefined; let moduleResolutionCache: ModuleResolutionCache | undefined; - let resolveModuleNamesWorker: (moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ResolvedProjectReference) => ResolvedModuleFull[]; + let actualResolveModuleNamesWorker: (moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ResolvedProjectReference) => ResolvedModuleFull[]; const hasInvalidatedResolution = host.hasInvalidatedResolution || returnFalse; if (host.resolveModuleNames) { - resolveModuleNamesWorker = (moduleNames, containingFile, reusedNames, redirectedReference) => host.resolveModuleNames!(Debug.assertEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(resolved => { + actualResolveModuleNamesWorker = (moduleNames, containingFile, reusedNames, redirectedReference) => host.resolveModuleNames!(Debug.checkEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(resolved => { // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. if (!resolved || (resolved as ResolvedModuleFull).extension !== undefined) { return resolved as ResolvedModuleFull; @@ -777,16 +770,16 @@ namespace ts { else { moduleResolutionCache = createModuleResolutionCache(currentDirectory, x => host.getCanonicalFileName(x), options); const loader = (moduleName: string, containingFile: string, redirectedReference: ResolvedProjectReference | undefined) => resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache, redirectedReference).resolvedModule!; // TODO: GH#18217 - resolveModuleNamesWorker = (moduleNames, containingFile, _reusedNames, redirectedReference) => loadWithLocalCache(Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader); + actualResolveModuleNamesWorker = (moduleNames, containingFile, _reusedNames, redirectedReference) => loadWithLocalCache(Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader); } - let resolveTypeReferenceDirectiveNamesWorker: (typeDirectiveNames: string[], containingFile: string, redirectedReference?: ResolvedProjectReference) => (ResolvedTypeReferenceDirective | undefined)[]; + let actualResolveTypeReferenceDirectiveNamesWorker: (typeDirectiveNames: string[], containingFile: string, redirectedReference?: ResolvedProjectReference) => (ResolvedTypeReferenceDirective | undefined)[]; if (host.resolveTypeReferenceDirectives) { - resolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference) => host.resolveTypeReferenceDirectives!(Debug.assertEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); + actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference) => host.resolveTypeReferenceDirectives!(Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); } else { const loader = (typesRef: string, containingFile: string, redirectedReference: ResolvedProjectReference | undefined) => resolveTypeReferenceDirective(typesRef, containingFile, options, host, redirectedReference).resolvedTypeReferenceDirective!; // TODO: GH#18217 - resolveTypeReferenceDirectiveNamesWorker = (typeReferenceDirectiveNames, containingFile, redirectedReference) => loadWithLocalCache(Debug.assertEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader); + actualResolveTypeReferenceDirectiveNamesWorker = (typeReferenceDirectiveNames, containingFile, redirectedReference) => loadWithLocalCache(Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader); } // Map from a stringified PackageId to the source file with that id. @@ -953,6 +946,7 @@ namespace ts { getIdentifierCount: () => getDiagnosticsProducingTypeChecker().getIdentifierCount(), getSymbolCount: () => getDiagnosticsProducingTypeChecker().getSymbolCount(), getTypeCount: () => getDiagnosticsProducingTypeChecker().getTypeCount(), + getInstantiationCount: () => getDiagnosticsProducingTypeChecker().getInstantiationCount(), getRelationCacheSizes: () => getDiagnosticsProducingTypeChecker().getRelationCacheSizes(), getFileProcessingDiagnostics: () => fileProcessingDiagnostics, getResolvedTypeReferenceDirectives: () => resolvedTypeReferenceDirectives, @@ -983,6 +977,22 @@ namespace ts { return program; + function resolveModuleNamesWorker(moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ResolvedProjectReference) { + performance.mark("beforeResolveModule"); + const result = actualResolveModuleNamesWorker(moduleNames, containingFile, reusedNames, redirectedReference); + performance.mark("afterResolveModule"); + performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule"); + return result; + } + + function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames: string[], containingFile: string, redirectedReference?: ResolvedProjectReference) { + performance.mark("beforeResolveTypeReference"); + const result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, redirectedReference); + performance.mark("afterResolveTypeReference"); + performance.measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"); + return result; + } + function compareDefaultLibFiles(a: SourceFile, b: SourceFile) { return compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b)); } @@ -1397,7 +1407,7 @@ namespace ts { } if (resolveTypeReferenceDirectiveNamesWorker) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - const typesReferenceDirectives = map(newSourceFile.typeReferenceDirectives, ref => ref.fileName.toLocaleLowerCase()); + const typesReferenceDirectives = map(newSourceFile.typeReferenceDirectives, ref => toFileNameLowerCase(ref.fileName)); const resolutions = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFilePath, getResolvedProjectReferenceToRedirect(newSourceFile.originalFileName)); // ensure that types resolutions are still correct const resolutionsChanged = hasChangesInResolutions(typesReferenceDirectives, resolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, typeDirectiveIsEqualTo); @@ -1786,12 +1796,12 @@ namespace ts { function getJSSyntacticDiagnosticsForFile(sourceFile: SourceFile): DiagnosticWithLocation[] { return runWithCancellationToken(() => { const diagnostics: DiagnosticWithLocation[] = []; - let parent: Node = sourceFile; - walk(sourceFile); + walk(sourceFile, sourceFile); + forEachChildRecursively(sourceFile, walk, walkArray); return diagnostics; - function walk(node: Node) { + function walk(node: Node, parent: Node) { // Return directly from the case if the given node doesnt want to visit each child // Otherwise break to visit each child @@ -1801,7 +1811,7 @@ namespace ts { case SyntaxKind.MethodDeclaration: if ((parent).questionToken === node) { diagnostics.push(createDiagnosticForNode(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); - return; + return "skip"; } // falls through case SyntaxKind.MethodSignature: @@ -1815,7 +1825,7 @@ namespace ts { // type annotation if ((parent).type === node) { diagnostics.push(createDiagnosticForNode(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } } @@ -1823,65 +1833,60 @@ namespace ts { case SyntaxKind.ImportClause: if ((node as ImportClause).isTypeOnly) { diagnostics.push(createDiagnosticForNode(node.parent, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); - return; + return "skip"; } break; case SyntaxKind.ExportDeclaration: if ((node as ExportDeclaration).isTypeOnly) { diagnostics.push(createDiagnosticForNode(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); - return; + return "skip"; } break; case SyntaxKind.ImportEqualsDeclaration: diagnostics.push(createDiagnosticForNode(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case SyntaxKind.ExportAssignment: if ((node).isExportEquals) { diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case SyntaxKind.HeritageClause: const heritageClause = node; if (heritageClause.token === SyntaxKind.ImplementsKeyword) { diagnostics.push(createDiagnosticForNode(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case SyntaxKind.InterfaceDeclaration: const interfaceKeyword = tokenToString(SyntaxKind.InterfaceKeyword); - Debug.assertDefined(interfaceKeyword); + Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); - return; + return "skip"; case SyntaxKind.ModuleDeclaration: const moduleKeyword = node.flags & NodeFlags.Namespace ? tokenToString(SyntaxKind.NamespaceKeyword) : tokenToString(SyntaxKind.ModuleKeyword); - Debug.assertDefined(moduleKeyword); + Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); - return; + return "skip"; case SyntaxKind.TypeAliasDeclaration: diagnostics.push(createDiagnosticForNode(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case SyntaxKind.EnumDeclaration: - const enumKeyword = Debug.assertDefined(tokenToString(SyntaxKind.EnumKeyword)); + const enumKeyword = Debug.checkDefined(tokenToString(SyntaxKind.EnumKeyword)); diagnostics.push(createDiagnosticForNode(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); - return; + return "skip"; case SyntaxKind.NonNullExpression: diagnostics.push(createDiagnosticForNode(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case SyntaxKind.AsExpression: diagnostics.push(createDiagnosticForNode((node as AsExpression).type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; case SyntaxKind.TypeAssertionExpression: Debug.fail(); // Won't parse these in a JS file anyway, as they are interpreted as JSX. } - - const prevParent = parent; - parent = node; - forEachChild(node, walk, walkArray); - parent = prevParent; } - function walkArray(nodes: NodeArray) { + function walkArray(nodes: NodeArray, parent: Node) { if (parent.decorators === nodes && !options.experimentalDecorators) { diagnostics.push(createDiagnosticForNode(parent, Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)); } @@ -1899,14 +1904,15 @@ namespace ts { // Check type parameters if (nodes === (parent).typeParameters) { diagnostics.push(createDiagnosticForNodeArray(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } // falls through case SyntaxKind.VariableStatement: // Check modifiers if (nodes === parent.modifiers) { - return checkModifiers(parent.modifiers, parent.kind === SyntaxKind.VariableStatement); + checkModifiers(parent.modifiers, parent.kind === SyntaxKind.VariableStatement); + return "skip"; } break; case SyntaxKind.PropertyDeclaration: @@ -1917,14 +1923,14 @@ namespace ts { diagnostics.push(createDiagnosticForNode(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); } } - return; + return "skip"; } break; case SyntaxKind.Parameter: // Check modifiers of parameter declaration if (nodes === (parent).modifiers) { diagnostics.push(createDiagnosticForNodeArray(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; case SyntaxKind.CallExpression: @@ -1936,14 +1942,10 @@ namespace ts { // Check type arguments if (nodes === (parent).typeArguments) { diagnostics.push(createDiagnosticForNodeArray(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); - return; + return "skip"; } break; } - - for (const node of nodes) { - walk(node); - } } function checkModifiers(modifiers: NodeArray, isConstValid: boolean) { @@ -2190,7 +2192,7 @@ namespace ts { } function getLibFileFromReference(ref: FileReference) { - const libName = ref.fileName.toLocaleLowerCase(); + const libName = toFileNameLowerCase(ref.fileName); const libFileName = libMap.get(libName); if (libFileName) { return getSourceFile(combinePaths(defaultLibraryPath, libFileName)); @@ -2438,7 +2440,7 @@ namespace ts { addFileToRefFileMap(fileName, file, refFile); if (host.useCaseSensitiveFileNames()) { - const pathLowerCase = path.toLowerCase(); + const pathLowerCase = toFileNameLowerCase(path); // for case-sensitive file systems check if we've already seen some file with similar filename ignoring case const existingFile = filesByNameIgnoreCase!.get(pathLowerCase); if (existingFile) { @@ -2650,7 +2652,7 @@ namespace ts { function processTypeReferenceDirectives(file: SourceFile) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. - const typeDirectives = map(file.typeReferenceDirectives, ref => ref.fileName.toLocaleLowerCase()); + const typeDirectives = map(file.typeReferenceDirectives, ref => toFileNameLowerCase(ref.fileName)); if (!typeDirectives) { return; } @@ -2661,7 +2663,7 @@ namespace ts { const ref = file.typeReferenceDirectives[i]; const resolvedTypeReferenceDirective = resolutions[i]; // store resolved type directive on the file - const fileName = ref.fileName.toLocaleLowerCase(); + const fileName = toFileNameLowerCase(ref.fileName); setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective); processTypeReferenceDirective( fileName, @@ -2753,7 +2755,7 @@ namespace ts { function processLibReferenceDirectives(file: SourceFile) { forEach(file.libReferenceDirectives, libReference => { - const libName = libReference.fileName.toLocaleLowerCase(); + const libName = toFileNameLowerCase(libReference.fileName); const libFileName = libMap.get(libName); if (libFileName) { // we ignore any 'no-default-lib' reference set on this file. @@ -2913,7 +2915,7 @@ namespace ts { projectReferenceRedirects.set(sourceFilePath, false); return undefined; } - sourceFile = Debug.assertDefined(commandLine.options.configFile); + sourceFile = Debug.checkDefined(commandLine.options.configFile); Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath); addFileToFilesByName(sourceFile, sourceFilePath, /*redirectedPath*/ undefined); } @@ -3200,7 +3202,7 @@ namespace ts { blockEmittingOfFile(emitFileName, createCompilerDiagnosticFromMessageChain(chain)); } - const emitFileKey = !host.useCaseSensitiveFileNames() ? emitFilePath.toLocaleLowerCase() : emitFilePath; + const emitFileKey = !host.useCaseSensitiveFileNames() ? toFileNameLowerCase(emitFilePath) : emitFilePath; // Report error if multiple files write into same file if (emitFilesSeen.has(emitFileKey)) { // Already seen the same emit file - report error @@ -3214,7 +3216,7 @@ namespace ts { } function createFileDiagnosticAtReference(refPathToReportErrorOn: ts.RefFile, message: DiagnosticMessage, ...args: (string | number | undefined)[]) { - const refFile = Debug.assertDefined(getSourceFileByPath(refPathToReportErrorOn.file)); + const refFile = Debug.checkDefined(getSourceFileByPath(refPathToReportErrorOn.file)); const { kind, index } = refPathToReportErrorOn; let pos: number, end: number; switch (kind) { @@ -3480,8 +3482,8 @@ namespace ts { return { fileExists: f => directoryStructureHost.fileExists(f), readDirectory(root, extensions, excludes, includes, depth) { - Debug.assertDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); - return directoryStructureHost.readDirectory!(root, extensions, excludes, includes, depth); + Debug.assertIsDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: f => directoryStructureHost.readFile(f), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(), diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 050e8f5d858de..011baa788b1a2 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -176,6 +176,7 @@ namespace ts { const directoryWatchesOfFailedLookups = createMap(); const rootDir = rootDirForResolution && removeTrailingDirectorySeparator(getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory())); const rootPath = (rootDir && resolutionHost.toPath(rootDir)) as Path; // TODO: GH#18217 + const rootSplitLength = rootPath !== undefined ? rootPath.split(directorySeparator).length : 0; // TypeRoot watches for the types that get added as part of getAutomaticTypeDirectiveNames const typeRootsWatches = createMap(); @@ -293,7 +294,7 @@ namespace ts { // create different collection of failed lookup locations for second pass // if it will fail and we've already found something during the first pass - we don't want to pollute its results const { resolvedModule, failedLookupLocations } = loadModuleFromGlobalCache( - Debug.assertDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), + Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, @@ -439,15 +440,23 @@ namespace ts { if (isInDirectoryPath(rootPath, failedLookupLocationPath)) { // Ensure failed look up is normalized path failedLookupLocation = isRootedDiskPath(failedLookupLocation) ? normalizePath(failedLookupLocation) : getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory()); - Debug.assert(failedLookupLocation.length === failedLookupLocationPath.length, `FailedLookup: ${failedLookupLocation} failedLookupLocationPath: ${failedLookupLocationPath}`); - const subDirectoryInRoot = failedLookupLocationPath.indexOf(directorySeparator, rootPath.length + 1); - if (subDirectoryInRoot !== -1) { + const failedLookupPathSplit = failedLookupLocationPath.split(directorySeparator); + const failedLookupSplit = failedLookupLocation.split(directorySeparator); + Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, `FailedLookup: ${failedLookupLocation} failedLookupLocationPath: ${failedLookupLocationPath}`); + if (failedLookupPathSplit.length > rootSplitLength + 1) { // Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution - return { dir: failedLookupLocation.substr(0, subDirectoryInRoot), dirPath: failedLookupLocationPath.substr(0, subDirectoryInRoot) as Path }; + return { + dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(directorySeparator), + dirPath: failedLookupPathSplit.slice(0, rootSplitLength + 1).join(directorySeparator) as Path + }; } else { // Always watch root directory non recursively - return { dir: rootDir!, dirPath: rootPath, nonRecursive: false }; // TODO: GH#18217 + return { + dir: rootDir!, + dirPath: rootPath, + nonRecursive: false + }; } } @@ -678,7 +687,7 @@ namespace ts { (filesWithInvalidatedResolutions || (filesWithInvalidatedResolutions = createMap())).set(containingFilePath, true); // When its a file with inferred types resolution, invalidate type reference directive resolution - if (containingFilePath.endsWith(inferredTypesContainingFile)) { + if (endsWith(containingFilePath, inferredTypesContainingFile)) { resolutionHost.onChangedAutomaticTypeDirectiveNames(); } } diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 1026b02a68c2a..7377e2a4c6637 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -28,7 +28,8 @@ namespace ts { getTokenFlags(): TokenFlags; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; + reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; + reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; scanJsxIdentifier(): SyntaxKind; scanJsxAttributeValue(): SyntaxKind; reScanJsxAttributeValue(): SyntaxKind; @@ -468,6 +469,14 @@ namespace ts { return ch >= CharacterCodes._0 && ch <= CharacterCodes._9; } + function isHexDigit(ch: number): boolean { + return isDigit(ch) || ch >= CharacterCodes.A && ch <= CharacterCodes.F || ch >= CharacterCodes.a && ch <= CharacterCodes.f; + } + + function isCodePoint(code: number): boolean { + return code <= 0x10FFFF; + } + /* @internal */ export function isOctalDigit(ch: number): boolean { return ch >= CharacterCodes._0 && ch <= CharacterCodes._7; @@ -901,6 +910,7 @@ namespace ts { reScanGreaterToken, reScanSlashToken, reScanTemplateToken, + reScanTemplateHeadOrNoSubstitutionTemplate, scanJsxIdentifier, scanJsxAttributeValue, reScanJsxAttributeValue, @@ -1164,7 +1174,7 @@ namespace ts { * Sets the current 'tokenValue' and returns a NoSubstitutionTemplateLiteral or * a literal component of a TemplateExpression. */ - function scanTemplateAndSetTokenValue(): SyntaxKind { + function scanTemplateAndSetTokenValue(isTaggedTemplate: boolean): SyntaxKind { const startedWithBacktick = text.charCodeAt(pos) === CharacterCodes.backtick; pos++; @@ -1202,7 +1212,7 @@ namespace ts { // Escape character if (currChar === CharacterCodes.backslash) { contents += text.substring(start, pos); - contents += scanEscapeSequence(); + contents += scanEscapeSequence(isTaggedTemplate); start = pos; continue; } @@ -1231,7 +1241,8 @@ namespace ts { return resultingToken; } - function scanEscapeSequence(): string { + function scanEscapeSequence(isTaggedTemplate?: boolean): string { + const start = pos; pos++; if (pos >= end) { error(Diagnostics.Unexpected_end_of_text); @@ -1241,6 +1252,12 @@ namespace ts { pos++; switch (ch) { case CharacterCodes._0: + // '\01' + if (isTaggedTemplate && pos < end && isDigit(text.charCodeAt(pos))) { + pos++; + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } return "\0"; case CharacterCodes.b: return "\b"; @@ -1259,10 +1276,41 @@ namespace ts { case CharacterCodes.doubleQuote: return "\""; case CharacterCodes.u: + if (isTaggedTemplate) { + // '\u' or '\u0' or '\u00' or '\u000' + for (let escapePos = pos; escapePos < pos + 4; escapePos++) { + if (escapePos < end && !isHexDigit(text.charCodeAt(escapePos)) && text.charCodeAt(escapePos) !== CharacterCodes.openBrace) { + pos = escapePos; + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } + } + } // '\u{DDDDDDDD}' if (pos < end && text.charCodeAt(pos) === CharacterCodes.openBrace) { - tokenFlags |= TokenFlags.ExtendedUnicodeEscape; pos++; + + // '\u{' + if (isTaggedTemplate && !isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } + + if (isTaggedTemplate) { + const savePos = pos; + const escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false); + const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + + // '\u{Not Code Point' or '\u{CodePoint' + if (!isCodePoint(escapedValue) || text.charCodeAt(pos) !== CharacterCodes.closeBrace) { + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } + else { + pos = savePos; + } + } + tokenFlags |= TokenFlags.ExtendedUnicodeEscape; return scanExtendedUnicodeEscape(); } @@ -1271,6 +1319,17 @@ namespace ts { return scanHexadecimalEscape(/*numDigits*/ 4); case CharacterCodes.x: + if (isTaggedTemplate) { + if (!isHexDigit(text.charCodeAt(pos))) { + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } + else if (!isHexDigit(text.charCodeAt(pos + 1))) { + pos++; + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } + } // '\xDD' return scanHexadecimalEscape(/*numDigits*/ 2); @@ -1561,7 +1620,7 @@ namespace ts { tokenValue = scanString(); return token = SyntaxKind.StringLiteral; case CharacterCodes.backtick: - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ false); case CharacterCodes.percent: if (text.charCodeAt(pos + 1) === CharacterCodes.equals) { return pos += 2, token = SyntaxKind.PercentEqualsToken; @@ -2019,10 +2078,15 @@ namespace ts { /** * Unconditionally back up and scan a template expression portion. */ - function reScanTemplateToken(): SyntaxKind { + function reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind { Debug.assert(token === SyntaxKind.CloseBraceToken, "'reScanTemplateToken' should only be called on a '}'"); pos = tokenPos; - return token = scanTemplateAndSetTokenValue(); + return token = scanTemplateAndSetTokenValue(isTaggedTemplate); + } + + function reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind { + pos = tokenPos; + return token = scanTemplateAndSetTokenValue(/* isTaggedTemplate */ true); } function reScanJsxToken(): JsxTokenSyntaxKind { @@ -2068,10 +2132,19 @@ namespace ts { // First non-whitespace character on this line. let firstNonWhitespace = 0; + let lastNonWhitespace = -1; + // These initial values are special because the first line is: // firstNonWhitespace = 0 to indicate that we want leading whitespace, while (pos < end) { + + // We want to keep track of the last non-whitespace (but including + // newlines character for hitting the end of the JSX Text region) + if (!isWhiteSpaceSingleLine(char)) { + lastNonWhitespace = pos; + } + char = text.charCodeAt(pos); if (char === CharacterCodes.openBrace) { break; @@ -2083,6 +2156,14 @@ namespace ts { } break; } + if (char === CharacterCodes.greaterThan) { + error(Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); + } + if (char === CharacterCodes.closeBrace) { + error(Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); + } + + if (lastNonWhitespace > 0) lastNonWhitespace++; // FirstNonWhitespace is 0, then we only see whitespaces so far. If we see a linebreak, we want to ignore that whitespaces. // i.e (- : whitespace) @@ -2096,10 +2177,13 @@ namespace ts { else if (!isWhiteSpaceLike(char)) { firstNonWhitespace = pos; } + pos++; } - tokenValue = text.substring(startPos, pos); + const endPosition = lastNonWhitespace === -1 ? pos : lastNonWhitespace; + tokenValue = text.substring(startPos, endPosition); + return firstNonWhitespace === -1 ? SyntaxKind.JsxTextAllWhiteSpaces : SyntaxKind.JsxText; } @@ -2360,7 +2444,7 @@ namespace ts { return String.fromCharCode(codeUnit1, codeUnit2); } - const utf16EncodeAsStringWorker: (codePoint: number) => string = (String as any).fromCodePoint ? codePoint => String.fromCodePoint(codePoint) : utf16EncodeAsStringFallback; + const utf16EncodeAsStringWorker: (codePoint: number) => string = (String as any).fromCodePoint ? codePoint => (String as any).fromCodePoint(codePoint) : utf16EncodeAsStringFallback; /* @internal */ export function utf16EncodeAsString(codePoint: number) { diff --git a/src/compiler/semver.ts b/src/compiler/semver.ts index b4f9ca03e3305..1c77d24d07258 100644 --- a/src/compiler/semver.ts +++ b/src/compiler/semver.ts @@ -42,7 +42,7 @@ namespace ts { constructor(major: number, minor?: number, patch?: number, prerelease?: string, build?: string); constructor(major: number | string, minor = 0, patch = 0, prerelease = "", build = "") { if (typeof major === "string") { - const result = Debug.assertDefined(tryParseComponents(major), "Invalid version"); + const result = Debug.checkDefined(tryParseComponents(major), "Invalid version"); ({ major, minor, patch, prerelease, build } = result); } @@ -171,7 +171,7 @@ namespace ts { private _alternatives: readonly (readonly Comparator[])[]; constructor(spec: string) { - this._alternatives = spec ? Debug.assertDefined(parseRange(spec), "Invalid range spec.") : emptyArray; + this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray; } static tryParse(text: string) { diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 4ac6187f3486d..6a1f30f557fdf 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -398,7 +398,7 @@ namespace ts { return { close: () => { - const watcher = Debug.assertDefined(cache.get(path)); + const watcher = Debug.checkDefined(cache.get(path)); callbacksCache.remove(path, callback); watcher.refCount--; if (watcher.refCount) return; @@ -525,7 +525,7 @@ namespace ts { return { dirName, close: () => { - const directoryWatcher = Debug.assertDefined(cache.get(dirPath)); + const directoryWatcher = Debug.checkDefined(cache.get(dirPath)); if (callbackToAdd) callbackCache.remove(dirPath, callbackToAdd); directoryWatcher.refCount--; @@ -772,7 +772,7 @@ namespace ts { function watchFile(fileName: string, callback: FileWatcherCallback, pollingInterval: PollingInterval, options: WatchOptions | undefined): FileWatcher { options = updateOptionsForWatchFile(options, useNonPollingWatchers); - const watchFileKind = Debug.assertDefined(options.watchFile); + const watchFileKind = Debug.checkDefined(options.watchFile); switch (watchFileKind) { case WatchFileKind.FixedPollingInterval: return pollingWatchFile(fileName, callback, PollingInterval.Low, /*options*/ undefined); @@ -874,7 +874,7 @@ namespace ts { function nonRecursiveWatchDirectory(directoryName: string, callback: DirectoryWatcherCallback, recursive: boolean, options: WatchOptions | undefined): FileWatcher { Debug.assert(!recursive); options = updateOptionsForWatchDirectory(options); - const watchDirectoryKind = Debug.assertDefined(options.watchDirectory); + const watchDirectoryKind = Debug.checkDefined(options.watchDirectory); switch (watchDirectoryKind) { case WatchDirectoryKind.FixedPollingInterval: return pollingWatchFile( @@ -1004,14 +1004,14 @@ namespace ts { writeFloatBE(value: number, offset: number): number; writeDoubleLE(value: number, offset: number): number; writeDoubleBE(value: number, offset: number): number; - readBigUInt64BE(offset?: number): bigint; - readBigUInt64LE(offset?: number): bigint; - readBigInt64BE(offset?: number): bigint; - readBigInt64LE(offset?: number): bigint; - writeBigInt64BE(value: bigint, offset?: number): number; - writeBigInt64LE(value: bigint, offset?: number): number; - writeBigUInt64BE(value: bigint, offset?: number): number; - writeBigUInt64LE(value: bigint, offset?: number): number; + readBigUInt64BE?(offset?: number): bigint; + readBigUInt64LE?(offset?: number): bigint; + readBigInt64BE?(offset?: number): bigint; + readBigInt64LE?(offset?: number): bigint; + writeBigInt64BE?(value: bigint, offset?: number): number; + writeBigInt64LE?(value: bigint, offset?: number): number; + writeBigUInt64BE?(value: bigint, offset?: number): number; + writeBigUInt64LE?(value: bigint, offset?: number): number; fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; @@ -1107,31 +1107,6 @@ namespace ts { return parseInt(version.substring(1, dot)); } - declare const ChakraHost: { - args: string[]; - currentDirectory: string; - executingFile: string; - newLine?: string; - useCaseSensitiveFileNames?: boolean; - echo(s: string): void; - quit(exitCode?: number): void; - fileExists(path: string): boolean; - deleteFile(path: string): boolean; - getModifiedTime(path: string): Date; - setModifiedTime(path: string, time: Date): void; - directoryExists(path: string): boolean; - createDirectory(path: string): void; - resolvePath(path: string): string; - readFile(path: string): string | undefined; - writeFile(path: string, contents: string): void; - getDirectories(path: string): string[]; - readDirectory(path: string, extensions?: readonly string[], basePaths?: readonly string[], excludeEx?: string, includeFileEx?: string, includeDirEx?: string): string[]; - watchFile?(path: string, callback: FileWatcherCallback): FileWatcher; - watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher; - realpath(path: string): string; - getEnvironmentVariable?(name: string): string; - }; - // TODO: GH#18217 this is used as if it's certainly defined in many places. // eslint-disable-next-line prefer-const export let sys: System = (() => { @@ -1737,50 +1712,8 @@ namespace ts { } } - function getChakraSystem(): System { - const realpath = ChakraHost.realpath && ((path: string) => ChakraHost.realpath(path)); - return { - newLine: ChakraHost.newLine || "\r\n", - args: ChakraHost.args, - useCaseSensitiveFileNames: !!ChakraHost.useCaseSensitiveFileNames, - write: ChakraHost.echo, - readFile(path: string, _encoding?: string) { - // encoding is automatically handled by the implementation in ChakraHost - return ChakraHost.readFile(path); - }, - writeFile(path: string, data: string, writeByteOrderMark?: boolean) { - // If a BOM is required, emit one - if (writeByteOrderMark) { - data = byteOrderMarkIndicator + data; - } - - ChakraHost.writeFile(path, data); - }, - resolvePath: ChakraHost.resolvePath, - fileExists: ChakraHost.fileExists, - deleteFile: ChakraHost.deleteFile, - getModifiedTime: ChakraHost.getModifiedTime, - setModifiedTime: ChakraHost.setModifiedTime, - directoryExists: ChakraHost.directoryExists, - createDirectory: ChakraHost.createDirectory, - getExecutingFilePath: () => ChakraHost.executingFile, - getCurrentDirectory: () => ChakraHost.currentDirectory, - getDirectories: ChakraHost.getDirectories, - getEnvironmentVariable: ChakraHost.getEnvironmentVariable || (() => ""), - readDirectory(path, extensions, excludes, includes, _depth) { - const pattern = getFileMatcherPatterns(path, excludes, includes, !!ChakraHost.useCaseSensitiveFileNames, ChakraHost.currentDirectory); - return ChakraHost.readDirectory(path, extensions, pattern.basePaths, pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern); - }, - exit: ChakraHost.quit, - realpath - }; - } - let sys: System | undefined; - if (typeof ChakraHost !== "undefined") { - sys = getChakraSystem(); - } - else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { + if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { // process and process.nextTick checks if current environment is node-like // process.browser check excludes webpack and browserify sys = getNodeSystem(); @@ -1794,9 +1727,9 @@ namespace ts { if (sys && sys.getEnvironmentVariable) { setCustomPollingValues(sys); - Debug.currentAssertionLevel = /^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) + Debug.setAssertionLevel(/^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? AssertionLevel.Normal - : AssertionLevel.None; + : AssertionLevel.None); } if (sys && sys.debugMode) { Debug.isDebugging = true; diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index b19fac3a9176f..a3784a62a8243 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -412,6 +412,11 @@ namespace ts { Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the transformation context during initialization."); Debug.assert(state < TransformationState.Completed, "Cannot modify the transformation context after transformation has completed."); Debug.assert(!helper.scoped, "Cannot request a scoped emit helper."); + if (helper.dependencies) { + for (const h of helper.dependencies) { + requestEmitHelper(h); + } + } emitHelpers = append(emitHelpers, helper); } diff --git a/src/compiler/transformers/classFields.ts b/src/compiler/transformers/classFields.ts index 7488e6eb9fd35..a4c8878fbbcbb 100644 --- a/src/compiler/transformers/classFields.ts +++ b/src/compiler/transformers/classFields.ts @@ -518,7 +518,7 @@ namespace ts { if (some(staticProperties) || some(pendingExpressions)) { if (isDecoratedClassDeclaration) { - Debug.assertDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); + Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); // Write any pending expressions from elided or moved computed property names if (pendingStatements && pendingExpressions && some(pendingExpressions)) { diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 03bda8cf7ea3a..00417535145b0 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -401,7 +401,7 @@ namespace ts { forEach(sourceFile.libReferenceDirectives, ref => { const lib = host.getLibFileFromReference(ref); if (lib) { - ret.set(ref.fileName.toLocaleLowerCase(), true); + ret.set(toFileNameLowerCase(ref.fileName), true); } }); return ret; diff --git a/src/compiler/transformers/destructuring.ts b/src/compiler/transformers/destructuring.ts index 5567dba270860..f3c3593292609 100644 --- a/src/compiler/transformers/destructuring.ts +++ b/src/compiler/transformers/destructuring.ts @@ -252,7 +252,7 @@ namespace ts { value = inlineExpressions(append(pendingExpressions, value)); pendingExpressions = undefined; } - pendingDeclarations.push({ pendingExpressions, name: target, value, location, original }); + pendingDeclarations.push({ pendingExpressions, name: target, value, location, original }); } } diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 28722351b8d50..6bffbe3b299b1 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -1675,7 +1675,7 @@ namespace ts { } properties.push( - createPropertyAssignment("enumerable", createTrue()), + createPropertyAssignment("enumerable", getAccessor || setAccessor ? createFalse() : createTrue()), createPropertyAssignment("configurable", createTrue()) ); @@ -1879,7 +1879,7 @@ namespace ts { // being emitted for the end position only. statementsLocation = moveRangeEnd(body, -1); - const equalsGreaterThanToken = (node).equalsGreaterThanToken; + const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { if (rangeEndIsOnSameLineAsRangeStart(equalsGreaterThanToken, body, currentSourceFile)) { singleLine = true; @@ -2002,10 +2002,16 @@ namespace ts { return visitEachChild(node, visitor, context); } + function isVariableStatementOfTypeScriptClassWrapper(node: VariableStatement) { + return node.declarationList.declarations.length === 1 + && !!node.declarationList.declarations[0].initializer + && !!(getEmitFlags(node.declarationList.declarations[0].initializer) & EmitFlags.TypeScriptClassWrapper); + } + function visitVariableStatement(node: VariableStatement): Statement | undefined { const ancestorFacts = enterSubtree(HierarchyFacts.None, hasModifier(node, ModifierFlags.Export) ? HierarchyFacts.ExportedVariableStatement : HierarchyFacts.None); let updated: Statement | undefined; - if (convertedLoopState && (node.declarationList.flags & NodeFlags.BlockScoped) === 0) { + if (convertedLoopState && (node.declarationList.flags & NodeFlags.BlockScoped) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { // we are inside a converted loop - hoist variable declarations let assignments: Expression[] | undefined; for (const decl of node.declarationList.declarations) { @@ -3425,12 +3431,12 @@ namespace ts { const ancestorFacts = enterSubtree(HierarchyFacts.BlockScopeExcludes, HierarchyFacts.BlockScopeIncludes); let updated: CatchClause; Debug.assert(!!node.variableDeclaration, "Catch clause variable should always be present when downleveling ES2015."); - if (isBindingPattern(node.variableDeclaration!.name)) { + if (isBindingPattern(node.variableDeclaration.name)) { const temp = createTempVariable(/*recordTempVariable*/ undefined); const newVariableDeclaration = createVariableDeclaration(temp); setTextRange(newVariableDeclaration, node.variableDeclaration); const vars = flattenDestructuringBinding( - node.variableDeclaration!, + node.variableDeclaration, visitor, context, FlattenLevel.All, @@ -3606,7 +3612,13 @@ namespace ts { // The class statements are the statements generated by visiting the first statement with initializer of the // body (1), while all other statements are added to remainingStatements (2) const isVariableStatementWithInitializer = (stmt: Statement) => isVariableStatement(stmt) && !!first(stmt.declarationList.declarations).initializer; + + // visit the class body statements outside of any converted loop body. + const savedConvertedLoopState = convertedLoopState; + convertedLoopState = undefined; const bodyStatements = visitNodes(body.statements, visitor, isStatement); + convertedLoopState = savedConvertedLoopState; + const classStatements = filter(bodyStatements, isVariableStatementWithInitializer); const remainingStatements = filter(bodyStatements, stmt => !isVariableStatementWithInitializer(stmt)); const varStatement = cast(first(classStatements), isVariableStatement); @@ -3951,78 +3963,14 @@ namespace ts { * @param node A TaggedTemplateExpression node. */ function visitTaggedTemplateExpression(node: TaggedTemplateExpression) { - // Visit the tag expression - const tag = visitNode(node.tag, visitor, isExpression); - - // Build up the template arguments and the raw and cooked strings for the template. - // We start out with 'undefined' for the first argument and revisit later - // to avoid walking over the template string twice and shifting all our arguments over after the fact. - const templateArguments: Expression[] = [undefined!]; - const cookedStrings: Expression[] = []; - const rawStrings: Expression[] = []; - const template = node.template; - if (isNoSubstitutionTemplateLiteral(template)) { - cookedStrings.push(createLiteral(template.text)); - rawStrings.push(getRawLiteral(template)); - } - else { - cookedStrings.push(createLiteral(template.head.text)); - rawStrings.push(getRawLiteral(template.head)); - for (const templateSpan of template.templateSpans) { - cookedStrings.push(createLiteral(templateSpan.literal.text)); - rawStrings.push(getRawLiteral(templateSpan.literal)); - templateArguments.push(visitNode(templateSpan.expression, visitor, isExpression)); - } - } - - const helperCall = createTemplateObjectHelper(context, createArrayLiteral(cookedStrings), createArrayLiteral(rawStrings)); - - // Create a variable to cache the template object if we're in a module. - // Do not do this in the global scope, as any variable we currently generate could conflict with - // variables from outside of the current compilation. In the future, we can revisit this behavior. - if (isExternalModule(currentSourceFile)) { - const tempVar = createUniqueName("templateObject"); - recordTaggedTemplateString(tempVar); - templateArguments[0] = createLogicalOr( - tempVar, - createAssignment( - tempVar, - helperCall) - ); - } - else { - templateArguments[0] = helperCall; - } - - return createCall(tag, /*typeArguments*/ undefined, templateArguments); - } - - /** - * Creates an ES5 compatible literal from an ES6 template literal. - * - * @param node The ES6 template literal. - */ - function getRawLiteral(node: TemplateLiteralLikeNode) { - // Find original source text, since we need to emit the raw strings of the tagged template. - // The raw strings contain the (escaped) strings of what the user wrote. - // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". - let text = node.rawText; - if (text === undefined) { - text = getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - - // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), - // thus we need to remove those characters. - // First template piece starts with "`", others with "}" - // Last template piece ends with "`", others with "${" - const isLast = node.kind === SyntaxKind.NoSubstitutionTemplateLiteral || node.kind === SyntaxKind.TemplateTail; - text = text.substring(1, text.length - (isLast ? 1 : 2)); - } - - // Newline normalization: - // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's - // and LineTerminatorSequences are normalized to for both TV and TRV. - text = text.replace(/\r\n?/g, "\n"); - return setTextRange(createLiteral(text), node); + return processTaggedTemplateExpression( + context, + node, + visitor, + currentSourceFile, + recordTaggedTemplateString, + ProcessLevel.All + ); } /** @@ -4358,18 +4306,6 @@ namespace ts { ); } - function createTemplateObjectHelper(context: TransformationContext, cooked: ArrayLiteralExpression, raw: ArrayLiteralExpression) { - context.requestEmitHelper(templateObjectHelper); - return createCall( - getUnscopedHelperName("__makeTemplateObject"), - /*typeArguments*/ undefined, - [ - cooked, - raw - ] - ); - } - export const extendsHelper: UnscopedEmitHelper = { name: "typescript:extends", importName: "__extends", @@ -4391,17 +4327,4 @@ namespace ts { }; })();` }; - - export const templateObjectHelper: UnscopedEmitHelper = { - name: "typescript:makeTemplateObject", - importName: "__makeTemplateObject", - scoped: false, - priority: 0, - text: ` - var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - };` - }; - } diff --git a/src/compiler/transformers/es2018.ts b/src/compiler/transformers/es2018.ts index f03b24fc45ee6..9050ebc601bf1 100644 --- a/src/compiler/transformers/es2018.ts +++ b/src/compiler/transformers/es2018.ts @@ -28,6 +28,9 @@ namespace ts { let enclosingSuperContainerFlags: NodeCheckFlags = 0; let hasLexicalThis: boolean; + let currentSourceFile: SourceFile; + let taggedTemplateStringDeclarations: VariableDeclaration[]; + /** Keeps track of property names accessed on super (`super.x`) within async functions. */ let capturedSuperProperties: UnderscoreEscapedMap; /** Whether the async function contains an element access on super (`super[x]`). */ @@ -37,15 +40,23 @@ namespace ts { return chainBundle(transformSourceFile); + function recordTaggedTemplateString(temp: Identifier) { + taggedTemplateStringDeclarations = append( + taggedTemplateStringDeclarations, + createVariableDeclaration(temp)); + } + function transformSourceFile(node: SourceFile) { if (node.isDeclarationFile) { return node; } - exportedVariableStatement = false; - hasLexicalThis = !isEffectiveStrictModeSourceFile(node, compilerOptions); - const visited = visitEachChild(node, visitor, context); + currentSourceFile = node; + const visited = visitSourceFile(node); addEmitHelpers(visited, context.readEmitHelpers()); + + currentSourceFile = undefined!; + taggedTemplateStringDeclarations = undefined!; return visited; } @@ -127,6 +138,8 @@ namespace ts { return visitExpressionStatement(node as ExpressionStatement); case SyntaxKind.ParenthesizedExpression: return visitParenthesizedExpression(node as ParenthesizedExpression, noDestructuringValue); + case SyntaxKind.TaggedTemplateExpression: + return visitTaggedTemplateExpression(node as TaggedTemplateExpression); case SyntaxKind.PropertyAccessExpression: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === SyntaxKind.SuperKeyword) { capturedSuperProperties.set(node.name.escapedText, true); @@ -297,6 +310,28 @@ namespace ts { return visitEachChild(node, noDestructuringValue ? visitorNoDestructuringValue : visitor, context); } + function visitSourceFile(node: SourceFile): SourceFile { + exportedVariableStatement = false; + hasLexicalThis = !isEffectiveStrictModeSourceFile(node, compilerOptions); + const visited = visitEachChild(node, visitor, context); + const statement = concatenate(visited.statements, taggedTemplateStringDeclarations && [ + createVariableStatement(/*modifiers*/ undefined, + createVariableDeclarationList(taggedTemplateStringDeclarations)) + ]); + return updateSourceFileNode(visited, setTextRange(createNodeArray(statement), node.statements)); + } + + function visitTaggedTemplateExpression(node: TaggedTemplateExpression) { + return processTaggedTemplateExpression( + context, + node, + visitor, + currentSourceFile, + recordTaggedTemplateString, + ProcessLevel.LiftRestriction + ); + } + /** * Visits a BinaryExpression that contains a destructuring assignment. * @@ -1061,6 +1096,7 @@ namespace ts { name: "typescript:asyncGenerator", importName: "__asyncGenerator", scoped: false, + dependencies: [awaitHelper], text: ` var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -1076,7 +1112,6 @@ namespace ts { }; function createAsyncGeneratorHelper(context: TransformationContext, generatorFunc: FunctionExpression, hasLexicalThis: boolean) { - context.requestEmitHelper(awaitHelper); context.requestEmitHelper(asyncGeneratorHelper); // Mark this node as originally an async function @@ -1097,6 +1132,7 @@ namespace ts { name: "typescript:asyncDelegator", importName: "__asyncDelegator", scoped: false, + dependencies: [awaitHelper], text: ` var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { var i, p; @@ -1106,7 +1142,6 @@ namespace ts { }; function createAsyncDelegatorHelper(context: TransformationContext, expression: Expression, location?: TextRange) { - context.requestEmitHelper(awaitHelper); context.requestEmitHelper(asyncDelegator); return setTextRange( createCall( diff --git a/src/compiler/transformers/generators.ts b/src/compiler/transformers/generators.ts index b6f40f4adc773..cb8619712c4dc 100644 --- a/src/compiler/transformers/generators.ts +++ b/src/compiler/transformers/generators.ts @@ -1989,7 +1989,7 @@ namespace ts { */ function markLabel(label: Label): void { Debug.assert(labelOffsets !== undefined, "No labels were defined."); - labelOffsets![label] = operations ? operations.length : 0; + labelOffsets[label] = operations ? operations.length : 0; } /** diff --git a/src/compiler/transformers/module/esnextAnd2015.ts b/src/compiler/transformers/module/esnextAnd2015.ts index 722c0ca770862..d7329856c064c 100644 --- a/src/compiler/transformers/module/esnextAnd2015.ts +++ b/src/compiler/transformers/module/esnextAnd2015.ts @@ -105,7 +105,9 @@ namespace ts { */ function onEmitNode(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void { if (isSourceFile(node)) { - helperNameSubstitutions = createMap(); + if ((isExternalModule(node) || compilerOptions.isolatedModules) && compilerOptions.importHelpers) { + helperNameSubstitutions = createMap(); + } previousOnEmitNode(hint, node, emitCallback); helperNameSubstitutions = undefined; } diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index 801dcbb5b8830..62cbb4b6207b1 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -103,11 +103,6 @@ namespace ts { insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); const updated = updateSourceFileNode(node, setTextRange(createNodeArray(statements), node.statements)); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - addEmitHelper(updated, exportStarHelper); - } addEmitHelpers(updated, context.readEmitHelpers()); return updated; } @@ -435,11 +430,6 @@ namespace ts { insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); const body = createBlock(statements, /*multiLine*/ true); - if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) { - // If we have any `export * from ...` declarations - // we need to inform the emitter to add the __export helper. - addEmitHelper(body, exportStarHelper); - } if (needUMDDynamicImportHelper) { addEmitHelper(body, dynamicImportUMDHelper); } @@ -1001,20 +991,34 @@ namespace ts { ); } for (const specifier of node.exportClause.elements) { - const exportedValue = createPropertyAccess( - generatedName, - specifier.propertyName || specifier.name - ); - statements.push( - setOriginalNode( - setTextRange( - createExpressionStatement( - createExportExpression(getExportName(specifier), exportedValue) - ), - specifier), - specifier - ) - ); + if (languageVersion === ScriptTarget.ES3) { + statements.push( + setOriginalNode( + setTextRange( + createExpressionStatement( + createCreateBindingHelper(context, generatedName, createLiteral(specifier.propertyName || specifier.name), specifier.propertyName ? createLiteral(specifier.name) : undefined) + ), + specifier), + specifier + ) + ); + } + else { + const exportedValue = createPropertyAccess( + generatedName, + specifier.propertyName || specifier.name + ); + statements.push( + setOriginalNode( + setTextRange( + createExpressionStatement( + createExportExpression(getExportName(specifier), exportedValue, /* location */ undefined, /* liveBinding */ true) + ), + specifier), + specifier + ) + ); + } } return singleOrMany(statements); @@ -1176,7 +1180,6 @@ namespace ts { let modifiers: NodeArray | undefined; // If we're exporting these variables, then these just become assignments to 'exports.x'. - // We only want to emit assignments for variables with initializers. for (const variable of node.declarationList.declarations) { if (isIdentifier(variable.name) && isLocalName(variable.name)) { if (!modifiers) { @@ -1185,7 +1188,7 @@ namespace ts { variables = append(variables, variable); } - else if (variable.initializer) { + else { expressions = append(expressions, transformInitializedVariable(variable)); } } @@ -1255,7 +1258,7 @@ namespace ts { ), /*location*/ node.name ), - visitNode(node.initializer, moduleExpressionElementVisitor) + node.initializer ? visitNode(node.initializer, moduleExpressionElementVisitor) : createVoidZero() ); } } @@ -1343,7 +1346,7 @@ namespace ts { case SyntaxKind.NamedImports: for (const importBinding of namedBindings.elements) { - statements = appendExportsOfDeclaration(statements, importBinding); + statements = appendExportsOfDeclaration(statements, importBinding, /* liveBinding */ true); } break; @@ -1453,12 +1456,12 @@ namespace ts { * appended. * @param decl The declaration to export. */ - function appendExportsOfDeclaration(statements: Statement[] | undefined, decl: Declaration): Statement[] | undefined { + function appendExportsOfDeclaration(statements: Statement[] | undefined, decl: Declaration, liveBinding?: boolean): Statement[] | undefined { const name = getDeclarationName(decl); const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(idText(name)); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { - statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name); + statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name, /* allowComments */ undefined, liveBinding); } } return statements; @@ -1476,8 +1479,8 @@ namespace ts { * @param location The location to use for source maps and comments for the export. * @param allowComments Whether to allow comments on the export. */ - function appendExportStatement(statements: Statement[] | undefined, exportName: Identifier, expression: Expression, location?: TextRange, allowComments?: boolean): Statement[] | undefined { - statements = append(statements, createExportStatement(exportName, expression, location, allowComments)); + function appendExportStatement(statements: Statement[] | undefined, exportName: Identifier, expression: Expression, location?: TextRange, allowComments?: boolean, liveBinding?: boolean): Statement[] | undefined { + statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); return statements; } @@ -1518,8 +1521,8 @@ namespace ts { * @param location The location to use for source maps and comments for the export. * @param allowComments An optional value indicating whether to emit comments for the statement. */ - function createExportStatement(name: Identifier, value: Expression, location?: TextRange, allowComments?: boolean) { - const statement = setTextRange(createExpressionStatement(createExportExpression(name, value)), location); + function createExportStatement(name: Identifier, value: Expression, location?: TextRange, allowComments?: boolean, liveBinding?: boolean) { + const statement = setTextRange(createExpressionStatement(createExportExpression(name, value, /* location */ undefined, liveBinding)), location); startOnNewLine(statement); if (!allowComments) { setEmitFlags(statement, EmitFlags.NoComments); @@ -1535,9 +1538,31 @@ namespace ts { * @param value The exported value. * @param location The location to use for source maps and comments for the export. */ - function createExportExpression(name: Identifier, value: Expression, location?: TextRange) { + function createExportExpression(name: Identifier, value: Expression, location?: TextRange, liveBinding?: boolean) { return setTextRange( - createAssignment( + liveBinding && languageVersion !== ScriptTarget.ES3 ? createCall( + createPropertyAccess( + createIdentifier("Object"), + "defineProperty" + ), + /*typeArguments*/ undefined, + [ + createIdentifier("exports"), + createLiteral(name), + createObjectLiteral([ + createPropertyAssignment("enumerable", createLiteral(/*value*/ true)), + createPropertyAssignment("get", createFunctionExpression( + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + /*parameters*/ [], + /*type*/ undefined, + createBlock([createReturn(value)]) + )) + ]) + ] + ) : createAssignment( createPropertyAccess( createIdentifier("exports"), getSynthesizedClone(name) @@ -1813,21 +1838,55 @@ namespace ts { } } + export const createBindingHelper: UnscopedEmitHelper = { + name: "typescript:commonjscreatebinding", + importName: "__createBinding", + scoped: false, + priority: 1, + text: ` +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}));` + }; + + function createCreateBindingHelper(context: TransformationContext, module: Expression, inputName: Expression, outputName: Expression | undefined) { + context.requestEmitHelper(createBindingHelper); + return createCall(getUnscopedHelperName("__createBinding"), /*typeArguments*/ undefined, [createIdentifier("exports"), module, inputName, ...(outputName ? [outputName] : [])]); + } + + export const setModuleDefaultHelper: UnscopedEmitHelper = { + name: "typescript:commonjscreatevalue", + importName: "__setModuleDefault", + scoped: false, + priority: 1, + text: ` +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +});` + }; + // emit output for the __export helper function - const exportStarHelper: EmitHelper = { + const exportStarHelper: UnscopedEmitHelper = { name: "typescript:export-star", - scoped: true, + importName: "__exportStar", + scoped: false, + dependencies: [createBindingHelper], + priority: 2, text: ` - function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); }` }; function createExportStarHelper(context: TransformationContext, module: Expression) { - const compilerOptions = context.getCompilerOptions(); - return compilerOptions.importHelpers - ? createCall(getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, createIdentifier("exports")]) - : createCall(createIdentifier("__export"), /*typeArguments*/ undefined, [module]); + context.requestEmitHelper(exportStarHelper); + return createCall(getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, createIdentifier("exports")]); } // emit helper for dynamic import @@ -1843,12 +1902,14 @@ namespace ts { name: "typescript:commonjsimportstar", importName: "__importStar", scoped: false, + dependencies: [createBindingHelper, setModuleDefaultHelper], + priority: 2, text: ` var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; };` }; diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index bc1ba49f218ab..a198164078cec 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -637,7 +637,7 @@ namespace ts { } function visitExportDeclaration(node: ExportDeclaration): VisitResult { - Debug.assertDefined(node); + Debug.assertIsDefined(node); return undefined; } diff --git a/src/compiler/transformers/taggedTemplate.ts b/src/compiler/transformers/taggedTemplate.ts new file mode 100644 index 0000000000000..ea3e529b752dd --- /dev/null +++ b/src/compiler/transformers/taggedTemplate.ts @@ -0,0 +1,117 @@ +/*@internal*/ +namespace ts { + export enum ProcessLevel { + LiftRestriction, + All + } + + export function processTaggedTemplateExpression( + context: TransformationContext, + node: TaggedTemplateExpression, + visitor: ((node: Node) => VisitResult) | undefined, + currentSourceFile: SourceFile, + recordTaggedTemplateString: (temp: Identifier) => void, + level: ProcessLevel) { + + // Visit the tag expression + const tag = visitNode(node.tag, visitor, isExpression); + + // Build up the template arguments and the raw and cooked strings for the template. + // We start out with 'undefined' for the first argument and revisit later + // to avoid walking over the template string twice and shifting all our arguments over after the fact. + const templateArguments: Expression[] = [undefined!]; + const cookedStrings: Expression[] = []; + const rawStrings: Expression[] = []; + const template = node.template; + + if (level === ProcessLevel.LiftRestriction && !hasInvalidEscape(template)) return node; + + if (isNoSubstitutionTemplateLiteral(template)) { + cookedStrings.push(createTemplateCooked(template)); + rawStrings.push(getRawLiteral(template, currentSourceFile)); + } + else { + cookedStrings.push(createTemplateCooked(template.head)); + rawStrings.push(getRawLiteral(template.head, currentSourceFile)); + for (const templateSpan of template.templateSpans) { + cookedStrings.push(createTemplateCooked(templateSpan.literal)); + rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile)); + templateArguments.push(visitNode(templateSpan.expression, visitor, isExpression)); + } + } + + const helperCall = createTemplateObjectHelper(context, createArrayLiteral(cookedStrings), createArrayLiteral(rawStrings)); + + // Create a variable to cache the template object if we're in a module. + // Do not do this in the global scope, as any variable we currently generate could conflict with + // variables from outside of the current compilation. In the future, we can revisit this behavior. + if (isExternalModule(currentSourceFile)) { + const tempVar = createUniqueName("templateObject"); + recordTaggedTemplateString(tempVar); + templateArguments[0] = createLogicalOr( + tempVar, + createAssignment( + tempVar, + helperCall) + ); + } + else { + templateArguments[0] = helperCall; + } + + return createCall(tag, /*typeArguments*/ undefined, templateArguments); + } + + function createTemplateCooked(template: TemplateHead | TemplateMiddle | TemplateTail | NoSubstitutionTemplateLiteral) { + return template.templateFlags ? createIdentifier("undefined") : createLiteral(template.text); + } + + /** + * Creates an ES5 compatible literal from an ES6 template literal. + * + * @param node The ES6 template literal. + */ + function getRawLiteral(node: LiteralLikeNode, currentSourceFile: SourceFile) { + // Find original source text, since we need to emit the raw strings of the tagged template. + // The raw strings contain the (escaped) strings of what the user wrote. + // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". + let text = getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + + // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), + // thus we need to remove those characters. + // First template piece starts with "`", others with "}" + // Last template piece ends with "`", others with "${" + const isLast = node.kind === SyntaxKind.NoSubstitutionTemplateLiteral || node.kind === SyntaxKind.TemplateTail; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + + // Newline normalization: + // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's + // and LineTerminatorSequences are normalized to for both TV and TRV. + text = text.replace(/\r\n?/g, "\n"); + return setTextRange(createLiteral(text), node); + } + + function createTemplateObjectHelper(context: TransformationContext, cooked: ArrayLiteralExpression, raw: ArrayLiteralExpression) { + context.requestEmitHelper(templateObjectHelper); + return createCall( + getUnscopedHelperName("__makeTemplateObject"), + /*typeArguments*/ undefined, + [ + cooked, + raw + ] + ); + } + + export const templateObjectHelper: UnscopedEmitHelper = { + name: "typescript:makeTemplateObject", + importName: "__makeTemplateObject", + scoped: false, + priority: 0, + text: ` + var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + };` + }; +} diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 9d7dc9375996b..062425cbc78aa 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -23,11 +23,10 @@ namespace ts { IsNamedExternalExport = 1 << 4, IsDefaultExternalExport = 1 << 5, IsDerivedClass = 1 << 6, - UseImmediatelyInvokedFunctionExpression = 1 << 7, HasAnyDecorators = HasConstructorDecorators | HasMemberDecorators, NeedsName = HasStaticInitializedProperties | HasMemberDecorators, - MayNeedImmediatelyInvokedFunctionExpression = HasAnyDecorators | HasStaticInitializedProperties, + UseImmediatelyInvokedFunctionExpression = HasAnyDecorators | HasStaticInitializedProperties, IsExported = IsExportOfNamespace | IsDefaultExternalExport | IsNamedExternalExport, } @@ -590,7 +589,6 @@ namespace ts { if (isExportOfNamespace(node)) facts |= ClassFacts.IsExportOfNamespace; else if (isDefaultExternalModuleExport(node)) facts |= ClassFacts.IsDefaultExternalExport; else if (isNamedExternalModuleExport(node)) facts |= ClassFacts.IsNamedExternalExport; - if (languageVersion <= ScriptTarget.ES5 && (facts & ClassFacts.MayNeedImmediatelyInvokedFunctionExpression)) facts |= ClassFacts.UseImmediatelyInvokedFunctionExpression; return facts; } @@ -661,6 +659,12 @@ namespace ts { const iife = createImmediatelyInvokedArrowFunction(statements); setEmitFlags(iife, EmitFlags.TypeScriptClassWrapper); + // Class comment is already added by the ES2015 transform when targeting ES5 or below. + // Only add if targetting ES2015+ to prevent duplicates + if (languageVersion > ScriptTarget.ES5) { + addSyntheticLeadingComment(iife, SyntaxKind.MultiLineCommentTrivia, "* @class "); + } + const varStatement = createVariableStatement( /*modifiers*/ undefined, createVariableDeclarationList([ @@ -669,7 +673,7 @@ namespace ts { /*type*/ undefined, iife ) - ]) + ], languageVersion > ScriptTarget.ES5 ? NodeFlags.Const : undefined) ); setOriginalNode(varStatement, node); @@ -2510,7 +2514,7 @@ namespace ts { function declaredNameInScope(node: FunctionDeclaration | ClassDeclaration | ModuleDeclaration | EnumDeclaration): __String { Debug.assertNode(node.name, isIdentifier); - return (node.name as Identifier).escapedText; + return node.name.escapedText; } /** @@ -2866,7 +2870,7 @@ namespace ts { } // Elide the export declaration if all of its named exports are elided. - const exportClause = visitNode(node.exportClause, visitNamedExportBindings, isNamedImportBindings); + const exportClause = visitNode(node.exportClause, visitNamedExportBindings, isNamedExportBindings); return exportClause ? updateExportDeclaration( node, diff --git a/src/compiler/tsbuildPublic.ts b/src/compiler/tsbuildPublic.ts index f2da5cee744d3..3eb793b7599bb 100644 --- a/src/compiler/tsbuildPublic.ts +++ b/src/compiler/tsbuildPublic.ts @@ -294,7 +294,7 @@ namespace ts { if (!compilerHost.resolveModuleNames) { const loader = (moduleName: string, containingFile: string, redirectedReference: ResolvedProjectReference | undefined) => resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference).resolvedModule!; compilerHost.resolveModuleNames = (moduleNames, containingFile, _reusedNames, redirectedReference) => - loadWithLocalCache(Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader); + loadWithLocalCache(Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader); } const { watchFile, watchFilePath, watchDirectory, writeLog } = createWatchFactory(hostWithWatch, options); @@ -871,13 +871,13 @@ namespace ts { } function getSyntaxDiagnostics(cancellationToken?: CancellationToken) { - Debug.assertDefined(program); + Debug.assertIsDefined(program); handleDiagnostics( [ - ...program!.getConfigFileParsingDiagnostics(), - ...program!.getOptionsDiagnostics(cancellationToken), - ...program!.getGlobalDiagnostics(cancellationToken), - ...program!.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken) + ...program.getConfigFileParsingDiagnostics(), + ...program.getOptionsDiagnostics(cancellationToken), + ...program.getGlobalDiagnostics(cancellationToken), + ...program.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken) ], BuildResultFlags.SyntaxErrors, "Syntactic" @@ -886,22 +886,22 @@ namespace ts { function getSemanticDiagnostics(cancellationToken?: CancellationToken) { handleDiagnostics( - Debug.assertDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), + Debug.checkDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic" ); } function emit(writeFileCallback?: WriteFileCallback, cancellationToken?: CancellationToken, customTransformers?: CustomTransformers): EmitResult { - Debug.assertDefined(program); + Debug.assertIsDefined(program); Debug.assert(step === Step.Emit); // Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly - program!.backupState(); + program.backupState(); let declDiagnostics: Diagnostic[] | undefined; const reportDeclarationDiagnostics = (d: Diagnostic) => (declDiagnostics || (declDiagnostics = [])).push(d); const outputFiles: OutputFile[] = []; const { emitResult } = emitFilesAndReportErrors( - program!, + program, reportDeclarationDiagnostics, /*writeFileName*/ undefined, /*reportSummary*/ undefined, @@ -912,7 +912,7 @@ namespace ts { ); // Don't emit .d.ts if there are decl file errors if (declDiagnostics) { - program!.restoreState(); + program.restoreState(); buildResult = buildErrors( state, projectPath, @@ -1095,12 +1095,12 @@ namespace ts { break; case Step.BuildInvalidatedProjectOfBundle: - Debug.assertDefined(invalidatedProjectOfBundle).done(cancellationToken); + Debug.checkDefined(invalidatedProjectOfBundle).done(cancellationToken); step = Step.Done; break; case Step.QueueReferencingProjects: - queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, Debug.assertDefined(buildResult)); + queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, Debug.checkDefined(buildResult)); step++; break; diff --git a/src/compiler/tsconfig.json b/src/compiler/tsconfig.json index a88f011115f99..846070b878166 100644 --- a/src/compiler/tsconfig.json +++ b/src/compiler/tsconfig.json @@ -38,6 +38,7 @@ "sourcemap.ts", "transformers/utilities.ts", "transformers/destructuring.ts", + "transformers/taggedTemplate.ts", "transformers/ts.ts", "transformers/classFields.ts", "transformers/es2017.ts", diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 740d7e69823c8..0eae5aa9d19bd 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -471,6 +471,7 @@ namespace ts { JSDocSignature, JSDocTag, JSDocAugmentsTag, + JSDocImplementsTag, JSDocAuthorTag, JSDocClassTag, JSDocPublicTag, @@ -1735,6 +1736,8 @@ namespace ts { export interface NoSubstitutionTemplateLiteral extends LiteralExpression, TemplateLiteralLikeNode, Declaration { kind: SyntaxKind.NoSubstitutionTemplateLiteral; + /* @internal */ + templateFlags?: TokenFlags; } export const enum TokenFlags { @@ -1757,6 +1760,8 @@ namespace ts { /* @internal */ UnicodeEscape = 1 << 10, /* @internal */ + ContainsInvalidEscape = 1 << 11, // e.g. `\uhello` + /* @internal */ BinaryOrOctalSpecifier = BinarySpecifier | OctalSpecifier, /* @internal */ NumericLiteralFlags = Scientific | Octal | HexSpecifier | BinaryOrOctalSpecifier | ContainsSeparator @@ -1775,16 +1780,22 @@ namespace ts { export interface TemplateHead extends TemplateLiteralLikeNode { kind: SyntaxKind.TemplateHead; parent: TemplateExpression; + /* @internal */ + templateFlags?: TokenFlags; } export interface TemplateMiddle extends TemplateLiteralLikeNode { kind: SyntaxKind.TemplateMiddle; parent: TemplateSpan; + /* @internal */ + templateFlags?: TokenFlags; } export interface TemplateTail extends TemplateLiteralLikeNode { kind: SyntaxKind.TemplateTail; parent: TemplateSpan; + /* @internal */ + templateFlags?: TokenFlags; } export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral; @@ -1977,7 +1988,7 @@ namespace ts { export interface ExpressionWithTypeArguments extends NodeWithTypeArguments { kind: SyntaxKind.ExpressionWithTypeArguments; - parent: HeritageClause | JSDocAugmentsTag; + parent: HeritageClause | JSDocAugmentsTag | JSDocImplementsTag; expression: LeftHandSideExpression; } @@ -2655,6 +2666,11 @@ namespace ts { class: ExpressionWithTypeArguments & { expression: Identifier | PropertyAccessEntityNameExpression }; } + export interface JSDocImplementsTag extends JSDocTag { + kind: SyntaxKind.JSDocImplementsTag; + class: ExpressionWithTypeArguments & { expression: Identifier | PropertyAccessEntityNameExpression }; + } + export interface JSDocAuthorTag extends JSDocTag { kind: SyntaxKind.JSDocAuthorTag; } @@ -2765,10 +2781,9 @@ namespace ts { SwitchClause = 1 << 7, // Switch statement clause ArrayMutation = 1 << 8, // Potential array mutation Call = 1 << 9, // Potential assertion call - Referenced = 1 << 10, // Referenced as antecedent once - Shared = 1 << 11, // Referenced as antecedent more than once - PreFinally = 1 << 12, // Injected edge that links pre-finally label and pre-try flow - AfterFinally = 1 << 13, // Injected edge that links post-finally flow with the rest of the graph + ReduceLabel = 1 << 10, // Temporarily reduce antecedents of label + Referenced = 1 << 11, // Referenced as antecedent once + Shared = 1 << 12, // Referenced as antecedent more than once Label = BranchLabel | LoopLabel, Condition = TrueCondition | FalseCondition, @@ -2848,6 +2863,12 @@ namespace ts { antecedent: FlowNode; } + export interface FlowReduceLabel extends FlowNodeBase { + target: FlowLabel; + antecedents: FlowNode[]; + antecedent: FlowNode; + } + export type FlowType = Type | IncompleteType; // Incomplete types occur during control flow analysis of loops. An IncompleteType @@ -3225,6 +3246,7 @@ namespace ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; + getInstantiationCount(): number; getRelationCacheSizes(): { assignable: number, identity: number, subtype: number, strictSubtype: number }; /* @internal */ getFileProcessingDiagnostics(): DiagnosticCollection; @@ -3520,7 +3542,7 @@ namespace ts { /* @internal */ createPromiseType(type: Type): Type; /* @internal */ isTypeAssignableTo(source: Type, target: Type): boolean; - /* @internal */ createAnonymousType(symbol: Symbol, members: SymbolTable, callSignatures: Signature[], constructSignatures: Signature[], stringIndexInfo: IndexInfo | undefined, numberIndexInfo: IndexInfo | undefined): Type; + /* @internal */ createAnonymousType(symbol: Symbol | undefined, members: SymbolTable, callSignatures: Signature[], constructSignatures: Signature[], stringIndexInfo: IndexInfo | undefined, numberIndexInfo: IndexInfo | undefined): Type; /* @internal */ createSignature( declaration: SignatureDeclaration, typeParameters: TypeParameter[] | undefined, @@ -3547,6 +3569,7 @@ namespace ts { /* @internal */ getIdentifierCount(): number; /* @internal */ getSymbolCount(): number; /* @internal */ getTypeCount(): number; + /* @internal */ getInstantiationCount(): number; /* @internal */ getRelationCacheSizes(): { assignable: number, identity: number, subtype: number, strictSubtype: number }; /* @internal */ isArrayType(type: Type): boolean; @@ -3616,7 +3639,8 @@ namespace ts { None = 0, Signature = 1 << 0, // Obtaining contextual signature NoConstraints = 1 << 1, // Don't obtain type variable constraints - BaseConstraint = 1 << 2, // Use base constraint type for completions + Completions = 1 << 2, // Ignore inference to current node and parent nodes out to the containing call for completions + } // NOTE: If modifying this enum, must modify `TypeFormatFlags` too! @@ -4068,7 +4092,6 @@ namespace ts { nameType?: Type; // Type associated with a late-bound symbol uniqueESSymbolType?: Type; // UniqueESSymbol type for a symbol declaredType?: Type; // Type of class, interface, enum, type alias, or type parameter - resolvedJSDocType?: Type; // Resolved type of a JSDoc type reference typeParameters?: TypeParameter[]; // Type parameters of type alias (undefined if non-generic) outerTypeParameters?: TypeParameter[]; // Outer type parameters of anonymous object type instantiations?: Map; // Instantiations of generic type alias (undefined if non-generic) @@ -4244,6 +4267,7 @@ namespace ts { jsxFlags: JsxFlags; // flags for knowing what kind of element/attributes we're dealing with resolvedJsxElementAttributesType?: Type; // resolved element attributes type of a JSX openinglike element resolvedJsxElementAllAttributesType?: Type; // resolved all element attributes type of a JSX openinglike element + resolvedJSDocType?: Type; // Resolved type of a JSDoc type reference hasSuperCall?: boolean; // recorded result when we try to find super-call. We only try to find one if this flag is undefined, indicating that we haven't made an attempt. superCall?: SuperCall; // Cached first super-call found in the constructor. Used in checking whether super is called before this-accessing switchTypes?: Type[]; // Cached array of switch case expression types @@ -4254,6 +4278,7 @@ namespace ts { outerTypeParameters?: TypeParameter[]; // Outer type parameters of anonymous object type instantiations?: Map; // Instantiations of generic type alias (undefined if non-generic) isExhaustive?: boolean; // Is node an exhaustive switch statement + skipDirectInference?: true; // Flag set by the API `getContextualType` call on a node when `Completions` is passed to force the checker to skip making inferences to a node's type } export const enum TypeFlags { @@ -4321,6 +4346,8 @@ namespace ts { ObjectFlagsType = Any | Nullable | Never | Object | Union | Intersection, /* @internal */ Simplifiable = IndexedAccess | Conditional, + /* @internal */ + Substructure = Object | Union | Intersection | Index | IndexedAccess | Conditional | Substitution, // 'Narrowable' types are types where narrowing actually narrows. // This *should* be every type other than null, undefined, void, and never Narrowable = Any | Unknown | StructuredOrInstantiable | StringLike | NumberLike | BigIntLike | BooleanLike | ESSymbol | UniqueESSymbol | NonPrimitive, @@ -4339,9 +4366,6 @@ namespace ts { IncludesWildcard = Index, /* @internal */ IncludesEmptyObject = IndexedAccess, - // The following flag is used for different purposes by maybeTypeOfKind - /* @internal */ - GenericMappedType = Never, } export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; @@ -4445,6 +4469,18 @@ namespace ts { ContainsObjectOrArrayLiteral = 1 << 20, // Type is or contains object literal type /* @internal */ NonInferrableType = 1 << 21, // Type is or contains anyFunctionType or silentNeverType + /* @internal */ + IsGenericObjectTypeComputed = 1 << 22, // IsGenericObjectType flag has been computed + /* @internal */ + IsGenericObjectType = 1 << 23, // Union or intersection contains generic object type + /* @internal */ + IsGenericIndexTypeComputed = 1 << 24, // IsGenericIndexType flag has been computed + /* @internal */ + IsGenericIndexType = 1 << 25, // Union or intersection contains generic index type + /* @internal */ + CouldContainTypeVariablesComputed = 1 << 26, // CouldContainTypeVariables flag has been computed + /* @internal */ + CouldContainTypeVariables = 1 << 27, // Type could contain a type variable ClassOrInterface = Class | Interface, /* @internal */ RequiresWidening = ContainsWideningType | ContainsObjectOrArrayLiteral, @@ -4563,8 +4599,6 @@ namespace ts { resolvedStringIndexType: IndexType; /* @internal */ resolvedBaseConstraint: Type; - /* @internal */ - couldContainTypeVariables: boolean; } export interface UnionType extends UnionOrIntersectionType { @@ -5780,6 +5814,7 @@ namespace ts { readonly scoped: boolean; // Indicates whether the helper MUST be emitted in the current scope. readonly text: string | ((node: EmitHelperUniqueNameCallback) => string); // ES3-compatible raw script text, or a function yielding such a string readonly priority?: number; // Helpers with a higher priority are emitted earlier than other helpers on the node. + readonly dependencies?: EmitHelper[] } export interface UnscopedEmitHelper extends EmitHelper { @@ -5820,8 +5855,9 @@ namespace ts { MakeTemplateObject = 1 << 17, // __makeTemplateObject (used for constructing template string array objects) ClassPrivateFieldGet = 1 << 18, // __classPrivateFieldGet (used by the class private field transformation) ClassPrivateFieldSet = 1 << 19, // __classPrivateFieldSet (used by the class private field transformation) + CreateBinding = 1 << 20, // __createBinding (use by the module transform for (re)exports and namespace imports) FirstEmitHelper = Extends, - LastEmitHelper = ClassPrivateFieldSet, + LastEmitHelper = CreateBinding, // Helpers included by ES2015 for..of ForOfIncludes = Values, @@ -6615,7 +6651,7 @@ namespace ts { readonly includeCompletionsWithInsertText?: boolean; readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ - readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; + readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 97f1fc941345b..9e89f12a6752c 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -864,14 +864,17 @@ namespace ts { } } - export function entityNameToString(name: EntityNameOrEntityNameExpression): string { + export function entityNameToString(name: EntityNameOrEntityNameExpression | JsxTagNameExpression | PrivateIdentifier): string { switch (name.kind) { + case SyntaxKind.ThisKeyword: + return "this"; + case SyntaxKind.PrivateIdentifier: case SyntaxKind.Identifier: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); case SyntaxKind.QualifiedName: return entityNameToString(name.left) + "." + entityNameToString(name.right); case SyntaxKind.PropertyAccessExpression: - if (isIdentifier(name.name)) { + if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { @@ -2463,7 +2466,7 @@ namespace ts { } export function getJSDocHost(node: Node): HasJSDoc { - return Debug.assertDefined(findAncestor(node.parent, isJSDoc)).parent; + return Debug.checkDefined(findAncestor(node.parent, isJSDoc)).parent; } export function getTypeParameterFromJsDoc(node: TypeParameterDeclaration & { parent: JSDocTemplateTag }): TypeParameterDeclaration | undefined { @@ -2800,15 +2803,20 @@ namespace ts { return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; } - export function getClassImplementsHeritageClauseElements(node: ClassLikeDeclaration) { - const heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ImplementsKeyword); - return heritageClause ? heritageClause.types : undefined; + export function getEffectiveImplementsTypeNodes(node: ClassLikeDeclaration): undefined | readonly ExpressionWithTypeArguments[]{ + if(isInJSFile(node)) { + return getJSDocImplementsTags(node).map(n => n.class); + } + else { + const heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ImplementsKeyword); + return heritageClause?.types; + } } /** Returns the node in an `extends` or `implements` clause of a class or interface. */ export function getAllSuperTypeNodes(node: Node): readonly TypeNode[] { return isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || emptyArray : - isClassLike(node) ? concatenate(singleElementArray(getEffectiveBaseTypeNode(node)), getClassImplementsHeritageClauseElements(node)) || emptyArray : + isClassLike(node) ? concatenate(singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || emptyArray : emptyArray; } @@ -3361,6 +3369,13 @@ namespace ts { return str.replace(templateSubstitutionRegExp, "\\${"); } + /** @internal */ + export function hasInvalidEscape(template: TemplateLiteral): boolean { + return template && !!(isNoSubstitutionTemplateLiteral(template) + ? template.templateFlags + : (template.head.templateFlags || some(template.templateSpans, span => !!span.literal.templateFlags))); + } + // This consists of the first 19 unprintable ASCII characters, canonical escapes, lineSeparator, // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in // the language service. These characters should be escaped when printing, and if any characters are added, @@ -4214,6 +4229,9 @@ namespace ts { } export function getModifierFlags(node: Node): ModifierFlags { + if (node.kind >= SyntaxKind.FirstToken && node.kind <= SyntaxKind.LastToken) { + return ModifierFlags.None; + } if (node.modifierFlagsCache & ModifierFlags.HasComputedFlags) { return node.modifierFlagsCache & ~ModifierFlags.HasComputedFlags; } @@ -4995,6 +5013,14 @@ namespace ts { return node.kind === SyntaxKind.PropertyAccessExpression || node.kind === SyntaxKind.ElementAccessExpression; } + export function getNameOfAccessExpression(node: AccessExpression) { + if (node.kind === SyntaxKind.PropertyAccessExpression) { + return node.name; + } + Debug.assert(node.kind === SyntaxKind.ElementAccessExpression); + return node.argumentExpression; + } + export function isBundleFileTextLike(section: BundleFileSection): section is BundleFileTextLike { switch (section.kind) { case BundleFileSectionKind.Text: @@ -5061,6 +5087,28 @@ namespace ts { this.original = undefined; } + function Token(this: Node, kind: SyntaxKind, pos: number, end: number) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = NodeFlags.None; + this.transformFlags = TransformFlags.None; + this.parent = undefined!; + } + + function Identifier(this: Node, kind: SyntaxKind, pos: number, end: number) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = NodeFlags.None; + this.transformFlags = TransformFlags.None; + this.parent = undefined!; + this.original = undefined; + this.flowNode = undefined; + } + function SourceMapSource(this: SourceMapSource, fileName: string, text: string, skipTrivia?: (pos: number) => number) { this.fileName = fileName; this.text = text; @@ -5070,8 +5118,8 @@ namespace ts { // eslint-disable-next-line prefer-const export let objectAllocator: ObjectAllocator = { getNodeConstructor: () => Node, - getTokenConstructor: () => Node, - getIdentifierConstructor: () => Node, + getTokenConstructor: () => Token, + getIdentifierConstructor: () => Identifier, getPrivateIdentifierConstructor: () => Node, getSourceFileConstructor: () => Node, getSymbolConstructor: () => Symbol, @@ -5085,7 +5133,7 @@ namespace ts { } export function formatStringFromArgs(text: string, args: ArrayLike, baseIndex = 0): string { - return text.replace(/{(\d+)}/g, (_match, index: string) => "" + Debug.assertDefined(args[+index + baseIndex])); + return text.replace(/{(\d+)}/g, (_match, index: string) => "" + Debug.checkDefined(args[+index + baseIndex])); } export let localizedDiagnosticMessages: MapLike | undefined; @@ -6168,6 +6216,10 @@ namespace ts { || !isExpressionNode(useSite); } + export function typeOnlyDeclarationIsExport(typeOnlyDeclaration: Node) { + return typeOnlyDeclaration.kind === SyntaxKind.ExportSpecifier; + } + function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node: Node) { while (node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.PropertyAccessExpression) { node = node.parent; diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index 184e227e8dbab..d4413a1a15d36 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -671,6 +671,11 @@ namespace ts { return getFirstJSDocTag(node, isJSDocAugmentsTag); } + /** Gets the JSDoc implements tags for the node if present */ + export function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[] { + return getAllJSDocTags(node, isJSDocImplementsTag); + } + /** Gets the JSDoc class tag for the node if present */ export function getJSDocClassTag(node: Node): JSDocClassTag | undefined { return getFirstJSDocTag(node, isJSDocClassTag); @@ -787,7 +792,12 @@ namespace ts { return find(getJSDocTags(node), predicate); } - /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + /** Gets all JSDoc tags that match a specified predicate */ + export function getAllJSDocTags(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[] { + return getJSDocTags(node).filter(predicate); + } + + /** Gets all JSDoc tags of a specified kind */ export function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[] { return getJSDocTags(node).filter(doc => doc.kind === kind); } @@ -1584,6 +1594,10 @@ namespace ts { return node.kind === SyntaxKind.JSDocAugmentsTag; } + export function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag { + return node.kind === SyntaxKind.JSDocImplementsTag; + } + export function isJSDocClassTag(node: Node): node is JSDocClassTag { return node.kind === SyntaxKind.JSDocClassTag; } @@ -2471,7 +2485,7 @@ namespace ts { /** True if node is of a kind that may contain comment text. */ export function isJSDocCommentContainingNode(node: Node): boolean { - return node.kind === SyntaxKind.JSDocComment || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === SyntaxKind.JSDocComment || node.kind === SyntaxKind.JSDocNamepathType || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } // TODO: determine what this does before making it public. @@ -2509,9 +2523,19 @@ namespace ts { } /** True if has initializer node attached to it. */ - /* @internal */ export function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer { - return hasInitializer(node) && !isForStatement(node) && !isForInStatement(node) && !isForOfStatement(node) && !isJsxAttribute(node); + switch (node.kind) { + case SyntaxKind.VariableDeclaration: + case SyntaxKind.Parameter: + case SyntaxKind.BindingElement: + case SyntaxKind.PropertySignature: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertyAssignment: + case SyntaxKind.EnumMember: + return true; + default: + return false; + } } export function isObjectLiteralElement(node: Node): node is ObjectLiteralElement { diff --git a/src/compiler/visitorPublic.ts b/src/compiler/visitorPublic.ts index 3cbd60ff51614..42e3e82540092 100644 --- a/src/compiler/visitorPublic.ts +++ b/src/compiler/visitorPublic.ts @@ -105,7 +105,7 @@ namespace ts { // Visit each original node. for (let i = 0; i < count; i++) { - const node = nodes[i + start]; + const node: T = nodes[i + start]; aggregateTransformFlags(node); const visited = node !== undefined ? visitor(node) : undefined; if (updated !== undefined || visited === undefined || visited !== node) { diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index 4066972898468..16c7212609236 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -360,7 +360,7 @@ namespace ts { const getDefaultLibLocation = memoize(() => getDirectoryPath(normalizePath(system.getExecutingFilePath()))); let host: DirectoryStructureHost = system; // TODO: `host` is unused! - // eslint-disable-next-line no-unused-expressions + // eslint-disable-next-line @typescript-eslint/no-unused-expressions host; return { useCaseSensitiveFileNames: () => system.useCaseSensitiveFileNames, diff --git a/src/debug/dbg.ts b/src/debug/dbg.ts index 4314be10a49d3..fc8a5cdafc87d 100644 --- a/src/debug/dbg.ts +++ b/src/debug/dbg.ts @@ -46,10 +46,9 @@ namespace Debug { readonly SwitchClause: number, readonly ArrayMutation: number, readonly Call: number, + readonly ReduceLabel: number, readonly Referenced: number, readonly Shared: number, - readonly PreFinally: number, - readonly AfterFinally: number, readonly Label: number, readonly Condition: number, }; @@ -69,6 +68,7 @@ namespace Debug { | FlowCondition | FlowSwitchClause | FlowArrayMutation + | FlowReduceLabel ; interface FlowNodeBase { @@ -119,6 +119,12 @@ namespace Debug { antecedent: FlowNode; } + export interface FlowReduceLabel extends FlowNodeBase { + target: FlowLabel; + antecedents: FlowNode[]; + antecedent: FlowNode; + } + type FlowFlags = number; let FlowFlags: TypeScriptModule["FlowFlags"]; let getSourceFileOfNode: TypeScriptModule["getSourceFileOfNode"]; @@ -199,8 +205,7 @@ namespace Debug { FlowFlags.SwitchClause | FlowFlags.ArrayMutation | FlowFlags.Call | - FlowFlags.PreFinally | - FlowFlags.AfterFinally; + FlowFlags.ReduceLabel; const hasNodeFlags = FlowFlags.Start | @@ -264,17 +269,14 @@ namespace Debug { if (!graphNode) { links[id] = graphNode = { id, flowNode, edges: [], text: renderFlowNode(flowNode), lane: -1, endLane: -1, level: -1 }; nodes.push(graphNode); - if (!(flowNode.flags & FlowFlags.PreFinally)) { - if (hasAntecedents(flowNode)) { - - for (const antecedent of flowNode.antecedents) { - buildGraphEdge(graphNode, antecedent); - } - } - else if (hasAntecedent(flowNode)) { - buildGraphEdge(graphNode, flowNode.antecedent); + if (hasAntecedents(flowNode)) { + for (const antecedent of flowNode.antecedents) { + buildGraphEdge(graphNode, antecedent); } } + else if (hasAntecedent(flowNode)) { + buildGraphEdge(graphNode, flowNode.antecedent); + } } return graphNode; } @@ -341,8 +343,7 @@ namespace Debug { if (flags & FlowFlags.SwitchClause) return "SwitchClause"; if (flags & FlowFlags.ArrayMutation) return "ArrayMutation"; if (flags & FlowFlags.Call) return "Call"; - if (flags & FlowFlags.PreFinally) return "PreFinally"; - if (flags & FlowFlags.AfterFinally) return "AfterFinally"; + if (flags & FlowFlags.ReduceLabel) return "ReduceLabel"; if (flags & FlowFlags.Unreachable) return "Unreachable"; throw new Error(); } diff --git a/src/executeCommandLine/executeCommandLine.ts b/src/executeCommandLine/executeCommandLine.ts index 65240fbee467f..e66b55d9b558e 100644 --- a/src/executeCommandLine/executeCommandLine.ts +++ b/src/executeCommandLine/executeCommandLine.ts @@ -33,21 +33,6 @@ namespace ts { return options.pretty; } - function padLeft(s: string, length: number) { - while (s.length < length) { - s = " " + s; - } - return s; - } - - function padRight(s: string, length: number) { - while (s.length < length) { - s = s + " "; - } - - return s; - } - function getOptionsForHelp(commandLine: ParsedCommandLine) { // Sort our options by their names, (e.g. "--noImplicitAny" comes before "--watch") return !!commandLine.options.all ? @@ -654,6 +639,7 @@ namespace ts { reportCountStatistic("Identifiers", program.getIdentifierCount()); reportCountStatistic("Symbols", program.getSymbolCount()); reportCountStatistic("Types", program.getTypeCount()); + reportCountStatistic("Instantiations", program.getInstantiationCount()); if (memoryUsed >= 0) { reportStatisticalValue("Memory used", Math.round(memoryUsed / 1000) + "K"); diff --git a/src/harness/client.ts b/src/harness/client.ts index 63ad8b90da83c..61a6be6526038 100644 --- a/src/harness/client.ts +++ b/src/harness/client.ts @@ -291,7 +291,7 @@ namespace ts.server { const request = this.processRequest(CommandNames.DefinitionAndBoundSpan, args); const response = this.processResponse(request); - const body = Debug.assertDefined(response.body); // TODO: GH#18217 + const body = Debug.checkDefined(response.body); // TODO: GH#18217 return { definitions: body.definitions.map(entry => ({ @@ -385,7 +385,7 @@ namespace ts.server { start: entry.start, length: entry.length, messageText: entry.message, - category: Debug.assertDefined(category, "convertDiagnostic: category should not be undefined"), + category: Debug.checkDefined(category, "convertDiagnostic: category should not be undefined"), code: entry.code, reportsUnnecessary: entry.reportsUnnecessary, }; @@ -808,6 +808,10 @@ namespace ts.server { return notImplemented(); } + clearSourceMapperCache(): never { + return notImplemented(); + } + dispose(): void { throw new Error("dispose is not available through the server layer."); } diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index bb7da149f7925..5d03758f0e3e7 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -381,7 +381,7 @@ namespace FourSlash { } private getFileContent(fileName: string): string { - return ts.Debug.assertDefined(this.tryGetFileContent(fileName)); + return ts.Debug.checkDefined(this.tryGetFileContent(fileName)); } private tryGetFileContent(fileName: string): string | undefined { const script = this.languageServiceAdapterHost.getScriptInfo(fileName); @@ -1003,18 +1003,43 @@ namespace FourSlash { definition: string | { text: string, range: ts.TextSpan }; references: ts.ReferenceEntry[]; } + interface RangeMarkerData { + id?: string; + isWriteAccess?: boolean, + isDefinition?: boolean, + isInString?: true, + contextRangeIndex?: number, + contextRangeDelta?: number, + contextRangeId?: string + } const fullExpected = ts.map(parts, ({ definition, ranges }) => ({ definition: typeof definition === "string" ? definition : { ...definition, range: ts.createTextSpanFromRange(definition.range) }, references: ranges.map(r => { - const { isWriteAccess = false, isDefinition = false, isInString, contextRangeIndex } = (r.marker && r.marker.data || {}) as { isWriteAccess?: boolean, isDefinition?: boolean, isInString?: true, contextRangeIndex?: number }; + const { isWriteAccess = false, isDefinition = false, isInString, contextRangeIndex, contextRangeDelta, contextRangeId } = (r.marker && r.marker.data || {}) as RangeMarkerData; + let contextSpan: ts.TextSpan | undefined; + if (contextRangeDelta !== undefined) { + const allRanges = this.getRanges(); + const index = allRanges.indexOf(r); + if (index !== -1) { + contextSpan = ts.createTextSpanFromRange(allRanges[index + contextRangeDelta]); + } + } + else if (contextRangeId !== undefined) { + const allRanges = this.getRanges(); + const contextRange = ts.find(allRanges, range => (range.marker?.data as RangeMarkerData)?.id === contextRangeId); + if (contextRange) { + contextSpan = ts.createTextSpanFromRange(contextRange); + } + } + else if (contextRangeIndex !== undefined) { + contextSpan = ts.createTextSpanFromRange(this.getRanges()[contextRangeIndex]); + } return { - fileName: r.fileName, textSpan: ts.createTextSpanFromRange(r), + fileName: r.fileName, + ...(contextSpan ? { contextSpan } : undefined), isWriteAccess, isDefinition, - ...(contextRangeIndex !== undefined ? - { contextSpan: ts.createTextSpanFromRange(this.getRanges()[contextRangeIndex]) } : - undefined), ...(isInString ? { isInString: true } : undefined), }; }), @@ -1038,7 +1063,7 @@ namespace FourSlash { } public verifyNoReferences(markerNameOrRange?: string | Range) { - if (markerNameOrRange) this.goToMarkerOrRange(markerNameOrRange); + if (markerNameOrRange !== undefined) this.goToMarkerOrRange(markerNameOrRange); const refs = this.getReferencesAtCaret(); if (refs && refs.length) { this.raiseError(`Expected getReferences to fail, but saw references: ${stringify(refs)}`); @@ -1239,6 +1264,12 @@ namespace FourSlash { } public verifyRenameLocations(startRanges: ArrayOrSingle, options: FourSlashInterface.RenameLocationsOptions) { + interface RangeMarkerData { + id?: string; + contextRangeIndex?: number, + contextRangeDelta?: number + contextRangeId?: string; + } const { findInStrings = false, findInComments = false, ranges = this.getRanges(), providePrefixAndSuffixTextForRename = true } = ts.isArray(options) ? { findInStrings: false, findInComments: false, ranges: options, providePrefixAndSuffixTextForRename: true } : options; const _startRanges = toArray(startRanges); @@ -1259,19 +1290,66 @@ namespace FourSlash { locations && ts.sort(locations, (r1, r2) => ts.compareStringsCaseSensitive(r1.fileName, r2.fileName) || r1.textSpan.start - r2.textSpan.start); assert.deepEqual(sort(references), sort(ranges.map((rangeOrOptions): ts.RenameLocation => { const { range, ...prefixSuffixText } = "range" in rangeOrOptions ? rangeOrOptions : { range: rangeOrOptions }; // eslint-disable-line no-in-operator - const { contextRangeIndex } = (range.marker && range.marker.data || {}) as { contextRangeIndex?: number; }; + const { contextRangeIndex, contextRangeDelta, contextRangeId } = (range.marker && range.marker.data || {}) as RangeMarkerData; + let contextSpan: ts.TextSpan | undefined; + if (contextRangeDelta !== undefined) { + const allRanges = this.getRanges(); + const index = allRanges.indexOf(range); + if (index !== -1) { + contextSpan = ts.createTextSpanFromRange(allRanges[index + contextRangeDelta]); + } + } + else if (contextRangeId !== undefined) { + const allRanges = this.getRanges(); + const contextRange = ts.find(allRanges, range => (range.marker?.data as RangeMarkerData)?.id === contextRangeId); + if (contextRange) { + contextSpan = ts.createTextSpanFromRange(contextRange); + } + } + else if (contextRangeIndex !== undefined) { + contextSpan = ts.createTextSpanFromRange(this.getRanges()[contextRangeIndex]); + } return { fileName: range.fileName, textSpan: ts.createTextSpanFromRange(range), - ...(contextRangeIndex !== undefined ? - { contextSpan: ts.createTextSpanFromRange(this.getRanges()[contextRangeIndex]) } : - undefined), + ...(contextSpan ? { contextSpan } : undefined), ...prefixSuffixText }; }))); } } + public baselineRename(marker: string, options: FourSlashInterface.RenameOptions) { + const position = this.getMarkerByName(marker).position; + const locations = this.languageService.findRenameLocations( + this.activeFile.fileName, + position, + options.findInStrings ?? false, + options.findInComments ?? false, + options.providePrefixAndSuffixTextForRename); + + if (!locations) { + this.raiseError(`baselineRename failed. Could not rename at the provided position.`); + } + + const renamesByFile = ts.group(locations, l => l.fileName); + const baselineContent = renamesByFile.map(renames => { + const { fileName } = renames[0]; + const sortedRenames = ts.sort(renames, (a, b) => b.textSpan.start - a.textSpan.start); + let baselineFileContent = this.getFileContent(fileName); + for (const { textSpan } of sortedRenames) { + const isOriginalSpan = fileName === this.activeFile.fileName && ts.textSpanIntersectsWithPosition(textSpan, position); + baselineFileContent = + baselineFileContent.slice(0, textSpan.start) + + (isOriginalSpan ? "[|RENAME|]" : "RENAME") + + baselineFileContent.slice(textSpan.start + textSpan.length); + } + return `/*====== ${fileName} ======*/\n\n${baselineFileContent}`; + }).join("\n\n") + "\n"; + + Harness.Baseline.runBaseline(this.getBaselineFileNameForContainingTestFile(), baselineContent); + } + public verifyQuickInfoExists(negative: boolean) { const actualQuickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition); if (negative) { @@ -1485,7 +1563,7 @@ namespace FourSlash { const output: string[] = []; for (let lineNumber = contextStart.line; lineNumber <= contextEnd.line; lineNumber++) { const spanLine = contextString.substring(contextLineMap[lineNumber], contextLineMap[lineNumber + 1]); - output.push(lineNumbers ? `${`${lineNumber + 1}: `.padStart(lineNumberPrefixLength, " ")}${spanLine}` : spanLine); + output.push(lineNumbers ? `${ts.padLeft(`${lineNumber + 1}: `, lineNumberPrefixLength)}${spanLine}` : spanLine); if (selection) { if (lineNumber < selectionStart.line || lineNumber > selectionEnd.line) { continue; @@ -1638,7 +1716,7 @@ namespace FourSlash { resultString += Harness.IO.newLine(); } - Harness.Baseline.runBaseline(ts.Debug.assertDefined(this.testData.globalOptions[MetadataOptionNames.baselineFile]), resultString); + Harness.Baseline.runBaseline(ts.Debug.checkDefined(this.testData.globalOptions[MetadataOptionNames.baselineFile]), resultString); } private flattenChainedMessage(diag: ts.DiagnosticMessageChain, indent = " ") { @@ -2422,18 +2500,35 @@ namespace FourSlash { public printOutliningSpans() { const spans = this.languageService.getOutliningSpans(this.activeFile.fileName); - Harness.IO.log(`Outlining spans (${spans.length} items)`); + Harness.IO.log(`Outlining spans (${spans.length} items)\nResults:`); Harness.IO.log(stringify(spans)); + this.printOutliningSpansInline(spans); + } + + private printOutliningSpansInline(spans: ts.OutliningSpan[]) { + const allSpanInsets = [] as { text: string, pos: number }[]; + let annotated = this.activeFile.content; + ts.forEach(spans, span => { + allSpanInsets.push({ text: "[|", pos: span.textSpan.start }); + allSpanInsets.push({ text: "|]", pos: span.textSpan.start + span.textSpan.length }); + }); + + const reverseSpans = allSpanInsets.sort((l, r) => r.pos - l.pos); + ts.forEach(reverseSpans, span => { + annotated = annotated.slice(0, span.pos) + span.text + annotated.slice(span.pos); + }); + Harness.IO.log(`\nMockup:\n${annotated}`); } public verifyOutliningSpans(spans: Range[], kind?: "comment" | "region" | "code" | "imports") { const actual = this.languageService.getOutliningSpans(this.activeFile.fileName); - if (actual.length !== spans.length) { - this.raiseError(`verifyOutliningSpans failed - expected total spans to be ${spans.length}, but was ${actual.length}`); + const filterActual = ts.filter(actual, f => kind === undefined ? true : f.kind === kind); + if (filterActual.length !== spans.length) { + this.raiseError(`verifyOutliningSpans failed - expected total spans to be ${spans.length}, but was ${actual.length}\n\nFound Spans:\n\n${this.printOutliningSpansInline(actual)}`); } - ts.zipWith(spans, actual, (expectedSpan, actualSpan, i) => { + ts.zipWith(spans, filterActual, (expectedSpan, actualSpan, i) => { if (expectedSpan.pos !== actualSpan.textSpan.start || expectedSpan.end !== ts.textSpanEnd(actualSpan.textSpan)) { return this.raiseError(`verifyOutliningSpans failed - span ${(i + 1)} expected: (${expectedSpan.pos},${expectedSpan.end}), actual: (${actualSpan.textSpan.start},${ts.textSpanEnd(actualSpan.textSpan)})`); } @@ -2552,7 +2647,7 @@ namespace FourSlash { const fixWithId = ts.find(this.getCodeFixes(this.activeFile.fileName), a => a.fixId === fixId); ts.Debug.assert(fixWithId !== undefined, "No available code fix has the expected id. Fix All is not available if there is only one potentially fixable diagnostic present.", () => `Expected '${fixId}'. Available actions:\n${ts.mapDefined(this.getCodeFixes(this.activeFile.fileName), a => `${a.fixName} (${a.fixId || "no fix id"})`).join("\n")}`); - ts.Debug.assertEqual(fixWithId!.fixAllDescription, fixAllDescription); + ts.Debug.assertEqual(fixWithId.fixAllDescription, fixAllDescription); const { changes, commands } = this.languageService.getCombinedCodeFix({ type: "file", fileName: this.activeFile.fileName }, fixId, this.formatCodeSettings, ts.emptyOptions); assert.deepEqual(commands, expectedCommands); @@ -3595,19 +3690,41 @@ namespace FourSlash { // Parse out the files and their metadata const testData = parseTestData(absoluteBasePath, content, absoluteFileName); const state = new TestState(absoluteFileName, absoluteBasePath, testType, testData); - const output = ts.transpileModule(content, { reportDiagnostics: true, compilerOptions: { target: ts.ScriptTarget.ES2015 } }); + const actualFileName = Harness.IO.resolvePath(fileName) || absoluteFileName; + const output = ts.transpileModule(content, { reportDiagnostics: true, fileName: actualFileName, compilerOptions: { target: ts.ScriptTarget.ES2015, inlineSourceMap: true } }); if (output.diagnostics!.length > 0) { throw new Error(`Syntax error in ${absoluteBasePath}: ${output.diagnostics![0].messageText}`); } - runCode(output.outputText, state); + runCode(output.outputText, state, actualFileName); } - function runCode(code: string, state: TestState): void { + function runCode(code: string, state: TestState, fileName: string): void { // Compile and execute the test - const wrappedCode = - `(function(test, goTo, plugins, verify, edit, debug, format, cancellation, classification, completion, verifyOperationIsCancelled) { -${code} -})`; + const generatedFile = ts.changeExtension(fileName, ".js"); + const wrappedCode = `(function(test, goTo, plugins, verify, edit, debug, format, cancellation, classification, completion, verifyOperationIsCancelled) {${code}\n//# sourceURL=${generatedFile}\n})`; + + type SourceMapSupportModule = typeof import("source-map-support") & { + // TODO(rbuckton): This is missing from the DT definitions and needs to be added. + resetRetrieveHandlers(): void + }; + + // Provide the content of the current test to 'source-map-support' so that it can give us the correct source positions + // for test failures. + let sourceMapSupportModule: SourceMapSupportModule | undefined; + try { + sourceMapSupportModule = require("source-map-support"); + } + catch { + // do nothing + } + + sourceMapSupportModule?.install({ + retrieveFile: path => { + return path === generatedFile ? wrappedCode : + undefined!; + } + }); + try { const test = new FourSlashInterface.Test(state); const goTo = new FourSlashInterface.GoTo(state); @@ -3622,8 +3739,13 @@ ${code} f(test, goTo, plugins, verify, edit, debug, format, cancellation, FourSlashInterface.Classification, FourSlashInterface.Completion, verifyOperationIsCancelled); } catch (err) { + // ensure 'source-map-support' is triggered while we still have the handler attached by accessing `error.stack`. + err.stack?.toString(); throw err; } + finally { + sourceMapSupportModule?.resetRetrieveHandlers(); + } } function chompLeadingSpace(content: string) { @@ -4083,10 +4205,57 @@ ${code} const actualMsg = "\x1b[1mActual\x1b[0m\x1b[31m"; const expectedString = quoted ? "\"" + expected + "\"" : expected; const actualString = quoted ? "\"" + actual + "\"" : actual; - return `\n${expectMsg}:\n${expectedString}\n\n${actualMsg}:\n${actualString}`; + return `\n${expectMsg}:\n${expectedString}\n\n${actualMsg}:\n${highlightDifferenceBetweenStrings(expected, actualString)}`; } function templateToRegExp(template: string) { return new RegExp(`^${ts.regExpEscape(template).replace(/\\\{\d+\\\}/g, ".*?")}$`); } + + function rangesOfDiffBetweenTwoStrings(source: string, target: string) { + const ranges = [] as { start: number; length: number }[]; + + const addToIndex = (index: number) => { + const closestIndex = ranges[ranges.length - 1]; + if (closestIndex) { + const doesAddToIndex = closestIndex.start + closestIndex.length === index - 1; + if (doesAddToIndex) { + closestIndex.length = closestIndex.length + 1; + } + else { + ranges.push({ start: index - 1, length: 1 }); + } + } + else { + ranges.push({ start: index - 1, length: 1 }); + } + }; + + for (let index = 0; index < Math.max(source.length, target.length); index++) { + const srcChar = source[index]; + const targetChar = target[index]; + if (srcChar !== targetChar) addToIndex(index); + } + + return ranges; + } + + // Adds an _ when the source string and the target string have a whitespace difference + function highlightDifferenceBetweenStrings(source: string, target: string) { + const ranges = rangesOfDiffBetweenTwoStrings(source, target); + let emTarget = target; + ranges.forEach((range, index) => { + const lhs = `\x1b[4m`; + const rhs = `\x1b[0m\x1b[31m`; + const additionalOffset = index * lhs.length + index * rhs.length; + const before = emTarget.slice(0, range.start + 1 + additionalOffset); + const between = emTarget.slice( + range.start + 1 + additionalOffset, + range.start + range.length + 1 + additionalOffset + ); + const after = emTarget.slice(range.start + range.length + 1 + additionalOffset, emTarget.length); + emTarget = before + lhs + between + rhs + after; + }); + return emTarget; + } } diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index a74785b8271ab..8f38aadc99edb 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -516,6 +516,10 @@ namespace FourSlashInterface { this.state.verifyRenameLocations(startRanges, options); } + public baselineRename(marker: string, options: RenameOptions) { + this.state.baselineRename(marker, options); + } + public verifyQuickInfoDisplayParts(kind: string, kindModifiers: string, textSpan: FourSlash.TextSpan, displayParts: ts.SymbolDisplayPart[], documentation: ts.SymbolDisplayPart[], tags: ts.JSDocTagInfo[]) { this.state.verifyQuickInfoDisplayParts(kind, kindModifiers, textSpan, displayParts, documentation, tags); @@ -893,7 +897,7 @@ namespace FourSlashInterface { const res: ExpectedCompletionEntryObject[] = []; for (let i = ts.SyntaxKind.FirstKeyword; i <= ts.SyntaxKind.LastKeyword; i++) { res.push({ - name: ts.Debug.assertDefined(ts.tokenToString(i)), + name: ts.Debug.checkDefined(ts.tokenToString(i)), kind: "keyword", sortText: SortText.GlobalsOrKeywords }); @@ -1623,4 +1627,9 @@ namespace FourSlashInterface { template: string }; export type RenameLocationOptions = FourSlash.Range | { readonly range: FourSlash.Range, readonly prefixText?: string, readonly suffixText?: string }; + export interface RenameOptions { + readonly findInStrings?: boolean; + readonly findInComments?: boolean; + readonly providePrefixAndSuffixTextForRename?: boolean; + }; } diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 759384aff3875..23093406e2d53 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -598,6 +598,9 @@ namespace Harness.LanguageService { getSourceMapper(): never { return ts.notImplemented(); } + clearSourceMapperCache(): never { + return ts.notImplemented(); + } dispose(): void { this.shim.dispose({}); } } diff --git a/src/harness/harnessUtils.ts b/src/harness/harnessUtils.ts index a51cba0b7b97d..23c715a58e274 100644 --- a/src/harness/harnessUtils.ts +++ b/src/harness/harnessUtils.ts @@ -54,7 +54,7 @@ namespace Utils { export function memoize(f: T, memoKey: (...anything: any[]) => string): T { const cache = ts.createMap(); - return (function(this: any, ...args: any[]) { + return (function (this: any, ...args: any[]) { const key = memoKey(...args); if (cache.has(key)) { return cache.get(key); @@ -395,4 +395,4 @@ namespace Utils { function isHarness(line: string) { return /[\\/]src[\\/]harness[\\/]|[\\/]run\.js/.test(line); } -} \ No newline at end of file +} diff --git a/src/harness/virtualFileSystemWithWatch.ts b/src/harness/virtualFileSystemWithWatch.ts index 561b51e7556c5..0bda650b19ba4 100644 --- a/src/harness/virtualFileSystemWithWatch.ts +++ b/src/harness/virtualFileSystemWithWatch.ts @@ -199,17 +199,21 @@ interface Array { length: number; [n: number]: T; }` checkMap(`watchedFiles:: ${additionalInfo || ""}::`, host.watchedFiles, expectedFiles, /*eachKeyCount*/ undefined); } - export function checkWatchedFilesDetailed(host: TestServerHost, expectedFiles: ReadonlyMap, expectedPollingIntervals?: Map): void; - export function checkWatchedFilesDetailed(host: TestServerHost, expectedFiles: readonly string[], eachFileWatchCount: number, expectedPollingIntervals?: Map): void; - export function checkWatchedFilesDetailed(host: TestServerHost, expectedFiles: ReadonlyMap | readonly string[], eachFileWatchCount?: number | Map, expectedPollingIntervals?: Map) { - if (!isNumber(eachFileWatchCount)) expectedPollingIntervals = eachFileWatchCount; + export interface WatchFileDetails { + fileName: string; + pollingInterval: PollingInterval; + } + export function checkWatchedFilesDetailed(host: TestServerHost, expectedFiles: ReadonlyMap, expectedDetails?: Map): void; + export function checkWatchedFilesDetailed(host: TestServerHost, expectedFiles: readonly string[], eachFileWatchCount: number, expectedDetails?: Map): void; + export function checkWatchedFilesDetailed(host: TestServerHost, expectedFiles: ReadonlyMap | readonly string[], eachFileWatchCountOrExpectedDetails?: number | Map, expectedDetails?: Map) { + if (!isNumber(eachFileWatchCountOrExpectedDetails)) expectedDetails = eachFileWatchCountOrExpectedDetails; if (isArray(expectedFiles)) { checkMap( "watchedFiles", host.watchedFiles, expectedFiles, - eachFileWatchCount as number, - [expectedPollingIntervals, ({ pollingInterval }) => pollingInterval] + eachFileWatchCountOrExpectedDetails as number, + [expectedDetails, ({ fileName, pollingInterval }) => ({ fileName, pollingInterval })] ); } else { @@ -217,7 +221,7 @@ interface Array { length: number; [n: number]: T; }` "watchedFiles", host.watchedFiles, expectedFiles, - [expectedPollingIntervals, ({ pollingInterval }) => pollingInterval] + [expectedDetails, ({ fileName, pollingInterval }) => ({ fileName, pollingInterval })] ); } } @@ -226,30 +230,31 @@ interface Array { length: number; [n: number]: T; }` checkMap(`watchedDirectories${recursive ? " recursive" : ""}`, recursive ? host.fsWatchesRecursive : host.fsWatches, expectedDirectories, /*eachKeyCount*/ undefined); } - export interface FallbackPollingOptions { + export interface WatchDirectoryDetails { + directoryName: string; fallbackPollingInterval: PollingInterval; fallbackOptions: WatchOptions | undefined; } - export function checkWatchedDirectoriesDetailed(host: TestServerHost, expectedDirectories: ReadonlyMap, recursive: boolean, expectedFallbacks?: Map): void; - export function checkWatchedDirectoriesDetailed(host: TestServerHost, expectedDirectories: readonly string[], eachDirectoryWatchCount: number, recursive: boolean, expectedFallbacks?: Map): void; - export function checkWatchedDirectoriesDetailed(host: TestServerHost, expectedDirectories: ReadonlyMap | readonly string[], recursiveOrEachDirectoryWatchCount: boolean | number, recursiveOrExpectedFallbacks?: boolean | Map, expectedFallbacks?: Map) { - if (typeof recursiveOrExpectedFallbacks !== "boolean") expectedFallbacks = recursiveOrExpectedFallbacks; + export function checkWatchedDirectoriesDetailed(host: TestServerHost, expectedDirectories: ReadonlyMap, recursive: boolean, expectedDetails?: Map): void; + export function checkWatchedDirectoriesDetailed(host: TestServerHost, expectedDirectories: readonly string[], eachDirectoryWatchCount: number, recursive: boolean, expectedDetails?: Map): void; + export function checkWatchedDirectoriesDetailed(host: TestServerHost, expectedDirectories: ReadonlyMap | readonly string[], recursiveOrEachDirectoryWatchCount: boolean | number, recursiveOrExpectedDetails?: boolean | Map, expectedDetails?: Map) { + if (typeof recursiveOrExpectedDetails !== "boolean") expectedDetails = recursiveOrExpectedDetails; if (isArray(expectedDirectories)) { checkMap( - `fsWatches${recursiveOrExpectedFallbacks ? " recursive" : ""}`, - recursiveOrExpectedFallbacks as boolean ? host.fsWatchesRecursive : host.fsWatches, + `fsWatches${recursiveOrExpectedDetails ? " recursive" : ""}`, + recursiveOrExpectedDetails as boolean ? host.fsWatchesRecursive : host.fsWatches, expectedDirectories, recursiveOrEachDirectoryWatchCount as number, - [expectedFallbacks, ({ fallbackPollingInterval, fallbackOptions }) => ({ fallbackPollingInterval, fallbackOptions })] + [expectedDetails, ({ directoryName, fallbackPollingInterval, fallbackOptions }) => ({ directoryName, fallbackPollingInterval, fallbackOptions })] ); } else { - recursiveOrExpectedFallbacks = recursiveOrEachDirectoryWatchCount as boolean; + recursiveOrExpectedDetails = recursiveOrEachDirectoryWatchCount as boolean; checkMap( `fsWatches{recursive ? " recursive" : ""}`, - recursiveOrExpectedFallbacks ? host.fsWatchesRecursive : host.fsWatches, + recursiveOrExpectedDetails ? host.fsWatchesRecursive : host.fsWatches, expectedDirectories, - [expectedFallbacks, ({ fallbackPollingInterval, fallbackOptions }) => ({ fallbackPollingInterval, fallbackOptions })] + [expectedDetails, ({ directoryName, fallbackPollingInterval, fallbackOptions }) => ({ directoryName, fallbackPollingInterval, fallbackOptions })] ); } } @@ -330,6 +335,7 @@ interface Array { length: number; [n: number]: T; }` export interface TestFsWatcher { cb: FsWatchCallback; + directoryName: string; fallbackPollingInterval: PollingInterval; fallbackOptions: WatchOptions | undefined; } @@ -740,7 +746,12 @@ interface Array { length: number; [n: number]: T; }` createWatcher( recursive ? this.fsWatchesRecursive : this.fsWatches, this.toFullPath(fileOrDirectory), - { cb, fallbackPollingInterval, fallbackOptions } + { + directoryName: fileOrDirectory, + cb, + fallbackPollingInterval, + fallbackOptions + } ); } @@ -1068,7 +1079,7 @@ interface Array { length: number; [n: number]: T; }` } serializeWatches(baseline: string[]) { - serializeMultiMap(baseline, "WatchedFiles", this.watchedFiles, ({ pollingInterval }) => ({ pollingInterval })); + serializeMultiMap(baseline, "WatchedFiles", this.watchedFiles, ({ fileName, pollingInterval }) => ({ fileName, pollingInterval })); baseline.push(""); serializeMultiMap(baseline, "FsWatches", this.fsWatches, serializeTestFsWatcher); baseline.push(""); @@ -1171,8 +1182,9 @@ interface Array { length: number; [n: number]: T; }` } } - function serializeTestFsWatcher({ fallbackPollingInterval, fallbackOptions }: TestFsWatcher) { + function serializeTestFsWatcher({ directoryName, fallbackPollingInterval, fallbackOptions }: TestFsWatcher) { return { + directoryName, fallbackPollingInterval, fallbackOptions: serializeWatchOptions(fallbackOptions) }; diff --git a/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl index 0b518c5f62592..fb12175d60e4e 100644 --- a/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -48,6 +48,24 @@ + + + + + + + + + + + + + + + + + + @@ -84,6 +102,15 @@ + + + + + + + + + @@ -105,15 +132,6 @@ - - - - - - - - - @@ -204,6 +222,15 @@ + + + + + + + + + @@ -213,11 +240,11 @@ - + - + - + @@ -270,15 +297,6 @@ - - - - - - - - - @@ -414,6 +432,15 @@ + + + + + + + + + @@ -423,6 +450,15 @@ + + + + + + + + + @@ -474,15 +510,6 @@ - - - - - - - - - @@ -501,6 +528,24 @@ + + + + + + + + + + + + + + + + + + @@ -573,6 +618,15 @@ + + + + + + + + + @@ -621,6 +675,24 @@ + + + + + + + + + + + + + + + + + + @@ -740,10 +812,13 @@ - + - + + + + @@ -774,15 +849,6 @@ - - - - - - - - - @@ -801,6 +867,15 @@ + + + + + + + + + @@ -939,6 +1014,15 @@ + + + + + + + + + @@ -966,6 +1050,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -975,6 +1086,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -993,6 +1131,15 @@ + + + + + + + + + @@ -1023,6 +1170,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1044,6 +1218,15 @@ + + + + + + + + + @@ -1053,6 +1236,15 @@ + + + + + + + + + @@ -1098,6 +1290,24 @@ + + + + + + + + + + + + + + + + + + @@ -1161,6 +1371,15 @@ + + + + + + + + + @@ -1170,6 +1389,15 @@ + + + + + + + + + @@ -1179,6 +1407,15 @@ + + + + + + + + + @@ -1197,11 +1434,11 @@ - + - + - + @@ -1242,11 +1479,20 @@ - + + + + + + + + + + - + - + @@ -1269,11 +1515,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1323,6 +1596,15 @@ + + + + + + + + + @@ -1332,6 +1614,15 @@ + + + + + + + + + @@ -1386,6 +1677,15 @@ + + + + + + + + + @@ -1395,6 +1695,15 @@ + + + + + + + + + @@ -1404,9 +1713,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1521,9 +1848,9 @@ - + - + @@ -1539,11 +1866,11 @@ - + - + - + @@ -1602,6 +1929,24 @@ + + + + + + + + + + + + + + + + + + @@ -1647,6 +1992,24 @@ + + + + + + + + + + + + + + + + + + @@ -1686,6 +2049,24 @@ + + + + + + + + + + + + + + + + + + @@ -1731,11 +2112,11 @@ - + - + - + @@ -1767,6 +2148,15 @@ + + + + + + + + + @@ -1812,6 +2202,15 @@ + + + + + + + + + @@ -1833,6 +2232,15 @@ + + + + + + + + + @@ -1842,6 +2250,15 @@ + + + + + + + + + @@ -1860,6 +2277,15 @@ + + + + + + + + + @@ -1878,11 +2304,20 @@ - + - + - + + + + + + + + + + @@ -1923,20 +2358,20 @@ - + - + - + - + - + - + @@ -1968,6 +2403,15 @@ + + + + + + + + + @@ -2025,6 +2469,15 @@ + + + + + + + + + @@ -2061,6 +2514,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2115,15 +2640,6 @@ - - - - - - - - - @@ -2151,20 +2667,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2211,6 +2745,15 @@ + + + + + + + + + @@ -2247,11 +2790,11 @@ - + - + - + @@ -2382,29 +2925,29 @@ - + - + - + - + - + - + - + - + - + @@ -2511,6 +3054,15 @@ + + + + + + + + + @@ -2547,6 +3099,15 @@ + + + + + + + + + @@ -2556,6 +3117,15 @@ + + + + + + + + + @@ -2592,6 +3162,24 @@ + + + + + + + + + + + + + + + + + + @@ -2601,6 +3189,15 @@ + + + + + + + + + @@ -2646,6 +3243,15 @@ + + + + + + + + + @@ -2664,52 +3270,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2718,6 +3396,15 @@ + + + + + + + + + @@ -2736,6 +3423,24 @@ + + + + + + + + + + + + + + + + + + @@ -2745,6 +3450,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2784,6 +3516,24 @@ + + + + + + + + + + + + + + + + + + @@ -2811,6 +3561,15 @@ + + + + + + + + + @@ -2886,6 +3645,24 @@ + + + + + + + + + + + + + + + + + + @@ -2931,6 +3708,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}" 吗?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2970,6 +3810,15 @@ + + + + + + + + + @@ -2979,6 +3828,15 @@ + + + + + + + + + @@ -3105,15 +3963,6 @@ - - - - - - - - - @@ -3216,29 +4065,29 @@ - + - + - + - + - + - + - + - + - + @@ -3261,6 +4110,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3279,6 +4164,15 @@ + + + + + + + + + @@ -3297,6 +4191,15 @@ + + + + + + + + + @@ -3315,6 +4218,15 @@ + + + + + + + + + @@ -3324,6 +4236,15 @@ + + + + + + + + + @@ -3351,27 +4272,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3462,6 +4401,15 @@ + + + + + + + + + @@ -3570,11 +4518,11 @@ - + - + - + @@ -3590,10 +4538,13 @@ - + - + + + + @@ -3726,6 +4677,15 @@ + + + + + + + + + @@ -3807,6 +4767,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3861,6 +4857,15 @@ + + + + + + + + + @@ -3870,11 +4875,11 @@ - + - + - + @@ -3888,11 +4893,11 @@ - + - + - + @@ -3984,6 +4989,24 @@ + + + + + + + + + + + + + + + + + + @@ -3993,29 +5016,29 @@ - + - + - + - + - + - + - + - + - + @@ -4110,6 +5133,15 @@ + + + + + + + + + @@ -4119,6 +5151,15 @@ + + + + + + + + + @@ -4146,11 +5187,11 @@ - + - + - + @@ -4191,15 +5232,6 @@ - - - - - - - - - @@ -4254,6 +5286,15 @@ + + + + + + + + + @@ -4293,6 +5334,15 @@ + + + + + + + + + @@ -4311,6 +5361,15 @@ + + + + + + + + + @@ -4374,6 +5433,15 @@ + + + + + + + + + @@ -4425,6 +5493,15 @@ + + + + + + + + + @@ -4491,15 +5568,6 @@ - - - - - - - - - @@ -4566,6 +5634,15 @@ + + + + + + + + + @@ -4839,6 +5916,15 @@ + + + + + + + + + @@ -4962,6 +6048,15 @@ + + + + + + + + + @@ -5028,6 +6123,15 @@ + + + + + + + + + @@ -5202,6 +6306,15 @@ + + + + + + + + + @@ -5265,11 +6378,38 @@ - + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + @@ -5301,6 +6441,15 @@ + + + + + + + + + @@ -5319,24 +6468,24 @@ - + - + - + - - - - + - + - + + + + @@ -5376,6 +6525,15 @@ + + + + + + + + + @@ -5412,6 +6570,15 @@ + + + + + + + + + @@ -5496,92 +6663,200 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5658,6 +6933,15 @@ + + + + + + + + + @@ -5733,6 +7017,15 @@ + + + + + + + + + @@ -5760,6 +7053,15 @@ + + + + + + + + + @@ -5805,6 +7107,15 @@ + + + + + + + + + @@ -5832,6 +7143,15 @@ + + + + + + + + + @@ -5886,11 +7206,11 @@ - + - + - + @@ -5958,6 +7278,15 @@ + + + + + + + + + @@ -5967,6 +7296,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6165,6 +7521,24 @@ + + + + + + + + + + + + + + + + + + @@ -6237,6 +7611,15 @@ + + + + + + + + + @@ -6246,6 +7629,15 @@ + + + + + + + + + @@ -6255,6 +7647,15 @@ + + + + + + + + + @@ -6273,6 +7674,15 @@ + + + + + + + + + @@ -6282,6 +7692,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6291,6 +7746,15 @@ + + + + + + + + + @@ -6318,6 +7782,24 @@ + + + + + + + + + + + + + + + + + + @@ -6390,15 +7872,6 @@ - - - - - - - - - @@ -6444,6 +7917,24 @@ + + + + + + + + + + + + + + + + + + @@ -6465,20 +7956,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6492,6 +8010,24 @@ + + + + + + + + + + + + + + + + + + @@ -6564,6 +8100,15 @@ + + + + + + + + + @@ -6618,6 +8163,24 @@ + + + + + + + + + + + + + + + + + + @@ -6771,6 +8334,15 @@ + + + + + + + + + @@ -6789,6 +8361,15 @@ + + + + + + + + + @@ -6807,6 +8388,15 @@ + + + + + + + + + @@ -6834,18 +8424,6 @@ - - - - - - - - - - - - @@ -6864,6 +8442,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6873,6 +8478,15 @@ + + + + + + + + + @@ -6891,6 +8505,15 @@ + + + + + + + + + @@ -6900,6 +8523,15 @@ + + + + + + + + + @@ -7077,6 +8709,24 @@ + + + + + + + + + + + + + + + + + + @@ -7086,6 +8736,15 @@ + + + + + + + + + @@ -7371,6 +9030,24 @@ + + + + + + + + + + + + + + + + + + @@ -7443,11 +9120,11 @@ - + - + - + @@ -7479,11 +9156,11 @@ - + - + - + @@ -7497,6 +9174,24 @@ + + + + + + + + + + + + + + + + + + @@ -7506,15 +9201,12 @@ - + - + - + - - - @@ -7527,6 +9219,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7572,6 +9291,24 @@ + + + + + + + + + + + + + + + + + + @@ -7701,15 +9438,12 @@ - + - + - + - - - @@ -7776,6 +9510,15 @@ + + + + + + + + + @@ -7785,6 +9528,24 @@ + + + + + + + + + + + + + + + + + + @@ -7803,6 +9564,24 @@ + + + + + + + + + + + + + + + + + + @@ -7848,6 +9627,15 @@ + + + + + + + + + @@ -7866,6 +9654,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7884,6 +9708,15 @@ + + + + + + + + + @@ -7905,11 +9738,29 @@ - + - + - + + + + + + + + + + + + + + + + + + + @@ -7923,6 +9774,24 @@ + + + + + + + + + + + + + + + + + + @@ -7941,6 +9810,15 @@ + + + + + + + + + @@ -7968,6 +9846,15 @@ + + + + + + + + + @@ -7977,11 +9864,20 @@ - + - + - + + + + + + + + + + @@ -8034,20 +9930,44 @@ + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + - + @@ -8061,6 +9981,24 @@ + + + + + + + + + + + + + + + + + + @@ -8099,177 +10037,357 @@ - type.]]> + type.]]> + + 类型。]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 类型。]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8292,11 +10410,11 @@ - + - + - + @@ -8322,20 +10440,20 @@ - + - + - + - + - + - + @@ -8367,6 +10485,24 @@ + + + + + + + + + + + + + + + + + + @@ -8385,20 +10521,20 @@ - + - + - + - + - + - + @@ -8430,15 +10566,6 @@ - - - - - - - - - @@ -8571,6 +10698,15 @@ + + + + + + + + + @@ -8580,6 +10716,15 @@ + + + + + + + + + @@ -8607,6 +10752,15 @@ + + + + + + + + + @@ -8616,6 +10770,24 @@ + + + + + + + + + + + + + + + + + + @@ -8634,6 +10806,15 @@ + + + + + + + + + @@ -8652,6 +10833,15 @@ + + + + + + + + + @@ -8670,6 +10860,15 @@ + + + + + + + + + @@ -8733,6 +10932,15 @@ + + + + + + + + + @@ -8778,6 +10986,24 @@ + + + + + + + + + + + + + + + + + + @@ -8835,6 +11061,15 @@ + + + + + + + + + @@ -8943,6 +11178,24 @@ + + + '}` or `>`?]]> + + '}` 还是 `>`?]]> + + + + + + + + + + + + + @@ -8952,6 +11205,24 @@ + + + + + + + + + + + + + + + + + + @@ -8961,6 +11232,15 @@ + + + + + + + + + @@ -8979,6 +11259,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9060,6 +11367,15 @@ + + + + + + + + + @@ -9069,6 +11385,15 @@ + + + + + + + + + @@ -9087,6 +11412,15 @@ + + + + + + + + + @@ -9123,6 +11457,24 @@ + + + + + + + + + + + + + + + + + + @@ -9150,38 +11502,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9213,6 +11592,15 @@ + + + + + + + + + @@ -9222,11 +11610,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9240,6 +11655,15 @@ + + + + + + + + + @@ -9267,6 +11691,15 @@ + + + + + + + + + @@ -9285,6 +11718,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9312,6 +11772,15 @@ + + + + + + + + + @@ -9429,6 +11898,15 @@ + + + + + + + + + @@ -9438,6 +11916,15 @@ + + + + + + + + + @@ -9456,6 +11943,15 @@ + + + + + + + + + @@ -9465,6 +11961,15 @@ + + + + + + + + + @@ -9483,6 +11988,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9492,6 +12024,15 @@ + + + + + + + + + @@ -9501,11 +12042,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9519,6 +12078,15 @@ + + + + + + + + + @@ -9531,6 +12099,15 @@ + + + + + + + + + @@ -9597,6 +12174,15 @@ + + + + + + + + + @@ -9609,38 +12195,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9726,20 +12312,20 @@ - + - + - + - + - + - + @@ -9753,15 +12339,6 @@ - - - - - - - - - @@ -9780,83 +12357,92 @@ - + - + - + - + - ()' instead.]]> + - ()"。]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9879,6 +12465,15 @@ + + + + + + + + + @@ -9945,6 +12540,15 @@ + + + + + + + + + @@ -10035,74 +12639,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl index 77ee3d71df32a..a63ff8a03d863 100644 --- a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -48,6 +48,24 @@ + + + + + + + + + + + + + + + + + + @@ -84,6 +102,15 @@ + + + + + + + + + @@ -105,15 +132,6 @@ - - - - - - - - - @@ -204,6 +222,15 @@ + + + + + + + + + @@ -213,11 +240,11 @@ - + - + - + @@ -270,15 +297,6 @@ - - - - - - - - - @@ -414,6 +432,15 @@ + + + + + + + + + @@ -423,6 +450,15 @@ + + + + + + + + + @@ -474,15 +510,6 @@ - - - - - - - - - @@ -501,6 +528,24 @@ + + + + + + + + + + + + + + + + + + @@ -573,6 +618,15 @@ + + + + + + + + + @@ -621,6 +675,24 @@ + + + + + + + + + + + + + + + + + + @@ -740,10 +812,13 @@ - + - + + + + @@ -774,15 +849,6 @@ - - - - - - - - - @@ -801,6 +867,15 @@ + + + + + + + + + @@ -939,6 +1014,15 @@ + + + + + + + + + @@ -966,6 +1050,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -975,6 +1086,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -993,6 +1131,15 @@ + + + + + + + + + @@ -1023,6 +1170,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1044,6 +1218,15 @@ + + + + + + + + + @@ -1053,6 +1236,15 @@ + + + + + + + + + @@ -1098,6 +1290,24 @@ + + + + + + + + + + + + + + + + + + @@ -1161,6 +1371,15 @@ + + + + + + + + + @@ -1170,6 +1389,15 @@ + + + + + + + + + @@ -1179,6 +1407,15 @@ + + + + + + + + + @@ -1197,11 +1434,11 @@ - + - + - + @@ -1242,11 +1479,20 @@ - + + + + + + + + + + - + - + @@ -1269,11 +1515,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1323,6 +1596,15 @@ + + + + + + + + + @@ -1332,6 +1614,15 @@ + + + + + + + + + @@ -1386,6 +1677,15 @@ + + + + + + + + + @@ -1395,6 +1695,15 @@ + + + + + + + + + @@ -1404,9 +1713,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1521,11 +1848,11 @@ - + - + - + @@ -1539,11 +1866,11 @@ - + - + - + @@ -1602,6 +1929,24 @@ + + + + + + + + + + + + + + + + + + @@ -1647,6 +1992,24 @@ + + + + + + + + + + + + + + + + + + @@ -1686,6 +2049,24 @@ + + + + + + + + + + + + + + + + + + @@ -1731,11 +2112,11 @@ - + - + - + @@ -1767,6 +2148,15 @@ + + + + + + + + + @@ -1812,6 +2202,15 @@ + + + + + + + + + @@ -1833,6 +2232,15 @@ + + + + + + + + + @@ -1842,6 +2250,15 @@ + + + + + + + + + @@ -1860,6 +2277,15 @@ + + + + + + + + + @@ -1878,11 +2304,20 @@ - + - + - + + + + + + + + + + @@ -1923,20 +2358,20 @@ - + - + - + - + - + - + @@ -1968,6 +2403,15 @@ + + + + + + + + + @@ -2025,6 +2469,15 @@ + + + + + + + + + @@ -2061,6 +2514,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2115,15 +2640,6 @@ - - - - - - - - - @@ -2151,20 +2667,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2211,6 +2745,15 @@ + + + + + + + + + @@ -2247,11 +2790,11 @@ - + - + - + @@ -2382,29 +2925,29 @@ - + - + - + - + - + - + - + - + - + @@ -2511,6 +3054,15 @@ + + + + + + + + + @@ -2547,6 +3099,15 @@ + + + + + + + + + @@ -2556,6 +3117,15 @@ + + + + + + + + + @@ -2592,6 +3162,24 @@ + + + + + + + + + + + + + + + + + + @@ -2601,6 +3189,15 @@ + + + + + + + + + @@ -2646,6 +3243,15 @@ + + + + + + + + + @@ -2664,52 +3270,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2718,6 +3396,15 @@ + + + + + + + + + @@ -2736,6 +3423,24 @@ + + + + + + + + + + + + + + + + + + @@ -2745,6 +3450,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2784,6 +3516,24 @@ + + + + + + + + + + + + + + + + + + @@ -2811,6 +3561,15 @@ + + + + + + + + + @@ -2886,6 +3645,24 @@ + + + + + + + + + + + + + + + + + + @@ -2931,6 +3708,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}' 嗎?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2970,6 +3810,15 @@ + + + + + + + + + @@ -2979,6 +3828,15 @@ + + + + + + + + + @@ -3105,15 +3963,6 @@ - - - - - - - - - @@ -3216,29 +4065,29 @@ - + - + - + - + - + - + - + - + - + @@ -3261,6 +4110,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3279,6 +4164,15 @@ + + + + + + + + + @@ -3297,6 +4191,15 @@ + + + + + + + + + @@ -3315,6 +4218,15 @@ + + + + + + + + + @@ -3324,6 +4236,15 @@ + + + + + + + + + @@ -3351,27 +4272,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3462,6 +4401,15 @@ + + + + + + + + + @@ -3570,11 +4518,11 @@ - + - + - + @@ -3590,10 +4538,13 @@ - + - + + + + @@ -3726,6 +4677,15 @@ + + + + + + + + + @@ -3807,6 +4767,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3861,6 +4857,15 @@ + + + + + + + + + @@ -3870,11 +4875,11 @@ - + - + - + @@ -3888,11 +4893,11 @@ - + - + - + @@ -3984,6 +4989,24 @@ + + + + + + + + + + + + + + + + + + @@ -3993,29 +5016,29 @@ - + - + - + - + - + - + - + - + - + @@ -4110,6 +5133,15 @@ + + + + + + + + + @@ -4119,6 +5151,15 @@ + + + + + + + + + @@ -4146,11 +5187,11 @@ - + - + - + @@ -4191,15 +5232,6 @@ - - - - - - - - - @@ -4254,6 +5286,15 @@ + + + + + + + + + @@ -4293,6 +5334,15 @@ + + + + + + + + + @@ -4311,6 +5361,15 @@ + + + + + + + + + @@ -4374,6 +5433,15 @@ + + + + + + + + + @@ -4425,6 +5493,15 @@ + + + + + + + + + @@ -4491,15 +5568,6 @@ - - - - - - - - - @@ -4566,6 +5634,15 @@ + + + + + + + + + @@ -4839,6 +5916,15 @@ + + + + + + + + + @@ -4962,6 +6048,15 @@ + + + + + + + + + @@ -5028,6 +6123,15 @@ + + + + + + + + + @@ -5202,6 +6306,15 @@ + + + + + + + + + @@ -5265,11 +6378,38 @@ - + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + @@ -5301,6 +6441,15 @@ + + + + + + + + + @@ -5319,24 +6468,24 @@ - + - + - + - - - - + - + - + + + + @@ -5376,6 +6525,15 @@ + + + + + + + + + @@ -5412,6 +6570,15 @@ + + + + + + + + + @@ -5496,92 +6663,200 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5658,6 +6933,15 @@ + + + + + + + + + @@ -5733,6 +7017,15 @@ + + + + + + + + + @@ -5760,6 +7053,15 @@ + + + + + + + + + @@ -5805,6 +7107,15 @@ + + + + + + + + + @@ -5832,6 +7143,15 @@ + + + + + + + + + @@ -5886,11 +7206,11 @@ - + - + - + @@ -5958,6 +7278,15 @@ + + + + + + + + + @@ -5967,6 +7296,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6165,6 +7521,24 @@ + + + + + + + + + + + + + + + + + + @@ -6237,6 +7611,15 @@ + + + + + + + + + @@ -6246,6 +7629,15 @@ + + + + + + + + + @@ -6255,6 +7647,15 @@ + + + + + + + + + @@ -6273,6 +7674,15 @@ + + + + + + + + + @@ -6282,6 +7692,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6291,6 +7746,15 @@ + + + + + + + + + @@ -6318,6 +7782,24 @@ + + + + + + + + + + + + + + + + + + @@ -6390,15 +7872,6 @@ - - - - - - - - - @@ -6444,6 +7917,24 @@ + + + + + + + + + + + + + + + + + + @@ -6465,20 +7956,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6492,6 +8010,24 @@ + + + + + + + + + + + + + + + + + + @@ -6564,6 +8100,15 @@ + + + + + + + + + @@ -6618,6 +8163,24 @@ + + + + + + + + + + + + + + + + + + @@ -6771,6 +8334,15 @@ + + + + + + + + + @@ -6789,6 +8361,15 @@ + + + + + + + + + @@ -6807,6 +8388,15 @@ + + + + + + + + + @@ -6834,18 +8424,6 @@ - - - - - - - - - - - - @@ -6864,6 +8442,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6873,6 +8478,15 @@ + + + + + + + + + @@ -6891,6 +8505,15 @@ + + + + + + + + + @@ -6900,6 +8523,15 @@ + + + + + + + + + @@ -7077,6 +8709,24 @@ + + + + + + + + + + + + + + + + + + @@ -7086,6 +8736,15 @@ + + + + + + + + + @@ -7371,6 +9030,24 @@ + + + + + + + + + + + + + + + + + + @@ -7443,11 +9120,11 @@ - + - + - + @@ -7479,11 +9156,11 @@ - + - + - + @@ -7497,6 +9174,24 @@ + + + + + + + + + + + + + + + + + + @@ -7506,15 +9201,12 @@ - + - + - + - - - @@ -7527,6 +9219,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7572,6 +9291,24 @@ + + + + + + + + + + + + + + + + + + @@ -7701,15 +9438,12 @@ - + - + - + - - - @@ -7776,6 +9510,15 @@ + + + + + + + + + @@ -7785,6 +9528,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -7803,6 +9570,24 @@ + + + + + + + + + + + + + + + + + + @@ -7848,6 +9633,15 @@ + + + + + + + + + @@ -7866,6 +9660,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7884,6 +9714,15 @@ + + + + + + + + + @@ -7905,11 +9744,29 @@ - + + + + + + + + + + - + - + + + + + + + + + + @@ -7923,6 +9780,24 @@ + + + + + + + + + + + + + + + + + + @@ -7941,6 +9816,15 @@ + + + + + + + + + @@ -7968,6 +9852,15 @@ + + + + + + + + + @@ -7977,11 +9870,20 @@ - + - + - + + + + + + + + + + @@ -8034,20 +9936,44 @@ + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + - + @@ -8061,6 +9987,24 @@ + + + + + + + + + + + + + + + + + + @@ -8099,177 +10043,357 @@ - type.]]> + type.]]> + + 類型。]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 類型。]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8292,11 +10416,11 @@ - + - + - + @@ -8322,20 +10446,20 @@ - + - + - + - + - + - + @@ -8367,6 +10491,24 @@ + + + + + + + + + + + + + + + + + + @@ -8385,20 +10527,20 @@ - + - + - + - + - + - + @@ -8430,15 +10572,6 @@ - - - - - - - - - @@ -8571,6 +10704,15 @@ + + + + + + + + + @@ -8580,6 +10722,15 @@ + + + + + + + + + @@ -8607,6 +10758,15 @@ + + + + + + + + + @@ -8616,6 +10776,24 @@ + + + + + + + + + + + + + + + + + + @@ -8634,6 +10812,15 @@ + + + + + + + + + @@ -8652,6 +10839,15 @@ + + + + + + + + + @@ -8670,6 +10866,15 @@ + + + + + + + + + @@ -8733,6 +10938,15 @@ + + + + + + + + + @@ -8778,6 +10992,24 @@ + + + + + + + + + + + + + + + + + + @@ -8835,6 +11067,15 @@ + + + + + + + + + @@ -8943,6 +11184,24 @@ + + + '}` or `>`?]]> + + '}` 或 `>` 嗎?]]> + + + + + + + + + + + + + @@ -8952,6 +11211,24 @@ + + + + + + + + + + + + + + + + + + @@ -8961,6 +11238,15 @@ + + + + + + + + + @@ -8979,6 +11265,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9060,6 +11373,15 @@ + + + + + + + + + @@ -9069,6 +11391,15 @@ + + + + + + + + + @@ -9087,6 +11418,15 @@ + + + + + + + + + @@ -9123,6 +11463,24 @@ + + + + + + + + + + + + + + + + + + @@ -9150,38 +11508,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9213,6 +11598,15 @@ + + + + + + + + + @@ -9222,11 +11616,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9240,6 +11661,15 @@ + + + + + + + + + @@ -9267,6 +11697,15 @@ + + + + + + + + + @@ -9285,6 +11724,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9312,6 +11778,15 @@ + + + + + + + + + @@ -9429,6 +11904,15 @@ + + + + + + + + + @@ -9438,6 +11922,15 @@ + + + + + + + + + @@ -9456,6 +11949,15 @@ + + + + + + + + + @@ -9465,6 +11967,15 @@ + + + + + + + + + @@ -9483,6 +11994,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9492,6 +12030,15 @@ + + + + + + + + + @@ -9501,11 +12048,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9519,6 +12084,15 @@ + + + + + + + + + @@ -9531,6 +12105,15 @@ + + + + + + + + + @@ -9597,6 +12180,15 @@ + + + + + + + + + @@ -9609,38 +12201,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9726,20 +12318,20 @@ - + - + - + - + - + - + @@ -9753,15 +12345,6 @@ - - - - - - - - - @@ -9780,83 +12363,92 @@ - + - + - + - + - ()' instead.]]> + - ()'。]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9879,6 +12471,15 @@ + + + + + + + + + @@ -9945,6 +12546,15 @@ + + + + + + + + + @@ -10035,74 +12645,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl index ce9c719d7961c..959a95bcc89dd 100644 --- a/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -57,6 +57,24 @@ + + + + + + + + + + + + + + + + + + @@ -93,6 +111,15 @@ + + + + + + + + + @@ -114,15 +141,6 @@ - - - - - - - - - @@ -213,6 +231,15 @@ + + + + + + + + + @@ -222,11 +249,11 @@ - + - + - + @@ -279,15 +306,6 @@ - - - - - - - - - @@ -423,6 +441,15 @@ + + + + + + + + + @@ -432,6 +459,15 @@ + + + + + + + + + @@ -483,15 +519,6 @@ - - - - - - - - - @@ -510,6 +537,24 @@ + + + + + + + + + + + + + + + + + + @@ -582,6 +627,15 @@ + + + + + + + + + @@ -630,6 +684,24 @@ + + + + + + + + + + + + + + + + + + @@ -749,10 +821,13 @@ - + - + + + + @@ -783,15 +858,6 @@ - - - - - - - - - @@ -810,6 +876,15 @@ + + + + + + + + + @@ -948,6 +1023,15 @@ + + + + + + + + + @@ -975,6 +1059,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -984,6 +1095,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1002,6 +1140,15 @@ + + + + + + + + + @@ -1032,6 +1179,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1053,6 +1227,15 @@ + + + + + + + + + @@ -1062,6 +1245,15 @@ + + + + + + + + + @@ -1107,6 +1299,24 @@ + + + + + + + + + + + + + + + + + + @@ -1170,6 +1380,15 @@ + + + + + + + + + @@ -1179,6 +1398,15 @@ + + + + + + + + + @@ -1188,6 +1416,15 @@ + + + + + + + + + @@ -1206,11 +1443,11 @@ - + - + - + @@ -1251,11 +1488,20 @@ - + + + + + + + + + + - + - + @@ -1278,11 +1524,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1332,6 +1605,15 @@ + + + + + + + + + @@ -1341,6 +1623,15 @@ + + + + + + + + + @@ -1395,6 +1686,15 @@ + + + + + + + + + @@ -1404,6 +1704,15 @@ + + + + + + + + + @@ -1413,9 +1722,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1530,11 +1857,11 @@ - + - + - + @@ -1548,11 +1875,11 @@ - + - + - + @@ -1611,6 +1938,24 @@ + + + + + + + + + + + + + + + + + + @@ -1656,6 +2001,24 @@ + + + + + + + + + + + + + + + + + + @@ -1695,6 +2058,24 @@ + + + + + + + + + + + + + + + + + + @@ -1740,11 +2121,11 @@ - + - + - + @@ -1776,6 +2157,15 @@ + + + + + + + + + @@ -1821,6 +2211,15 @@ + + + + + + + + + @@ -1842,6 +2241,15 @@ + + + + + + + + + @@ -1851,6 +2259,15 @@ + + + + + + + + + @@ -1869,6 +2286,15 @@ + + + + + + + + + @@ -1887,11 +2313,20 @@ - + - + - + + + + + + + + + + @@ -1932,20 +2367,20 @@ - + - + - + - + - + - + @@ -1977,6 +2412,15 @@ + + + + + + + + + @@ -2034,6 +2478,15 @@ + + + + + + + + + @@ -2070,6 +2523,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2124,15 +2649,6 @@ - - - - - - - - - @@ -2160,20 +2676,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2220,6 +2754,15 @@ + + + + + + + + + @@ -2256,11 +2799,11 @@ - + - + - + @@ -2391,29 +2934,29 @@ - + - + - + - + - + - + - + - + - + @@ -2520,6 +3063,15 @@ + + + + + + + + + @@ -2556,6 +3108,15 @@ + + + + + + + + + @@ -2565,6 +3126,15 @@ + + + + + + + + + @@ -2601,6 +3171,24 @@ + + + + + + + + + + + + + + + + + + @@ -2610,6 +3198,15 @@ + + + + + + + + + @@ -2655,6 +3252,15 @@ + + + + + + + + + @@ -2673,52 +3279,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2727,6 +3405,15 @@ + + + + + + + + + @@ -2745,6 +3432,24 @@ + + + + + + + + + + + + + + + + + + @@ -2754,6 +3459,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2793,6 +3525,24 @@ + + + + + + + + + + + + + + + + + + @@ -2820,6 +3570,15 @@ + + + + + + + + + @@ -2895,6 +3654,24 @@ + + + + + + + + + + + + + + + + + + @@ -2940,6 +3717,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2979,6 +3819,15 @@ + + + + + + + + + @@ -2988,6 +3837,15 @@ + + + + + + + + + @@ -3114,15 +3972,6 @@ - - - - - - - - - @@ -3225,29 +4074,29 @@ - + - + - + - + - + - + - + - + - + @@ -3270,6 +4119,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3288,6 +4173,15 @@ + + + + + + + + + @@ -3306,6 +4200,15 @@ + + + + + + + + + @@ -3324,6 +4227,15 @@ + + + + + + + + + @@ -3333,6 +4245,15 @@ + + + + + + + + + @@ -3360,27 +4281,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3471,6 +4410,15 @@ + + + + + + + + + @@ -3579,11 +4527,11 @@ - + - + - + @@ -3599,10 +4547,13 @@ - + - + + + + @@ -3735,6 +4686,15 @@ + + + + + + + + + @@ -3816,6 +4776,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3870,6 +4866,15 @@ + + + + + + + + + @@ -3879,11 +4884,11 @@ - + - + - + @@ -3897,11 +4902,11 @@ - + - + - + @@ -3993,6 +4998,24 @@ + + + + + + + + + + + + + + + + + + @@ -4002,29 +5025,29 @@ - + - + - + - + - + - + - + - + - + @@ -4119,6 +5142,15 @@ + + + + + + + + + @@ -4128,6 +5160,15 @@ + + + + + + + + + @@ -4155,11 +5196,11 @@ - + - + - + @@ -4200,15 +5241,6 @@ - - - - - - - - - @@ -4263,6 +5295,15 @@ + + + + + + + + + @@ -4302,6 +5343,15 @@ + + + + + + + + + @@ -4320,6 +5370,15 @@ + + + + + + + + + @@ -4383,6 +5442,15 @@ + + + + + + + + + @@ -4434,6 +5502,15 @@ + + + + + + + + + @@ -4500,15 +5577,6 @@ - - - - - - - - - @@ -4575,6 +5643,15 @@ + + + + + + + + + @@ -4848,6 +5925,15 @@ + + + + + + + + + @@ -4971,6 +6057,15 @@ + + + + + + + + + @@ -5037,6 +6132,15 @@ + + + + + + + + + @@ -5211,6 +6315,15 @@ + + + + + + + + + @@ -5274,11 +6387,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -5310,6 +6450,15 @@ + + + + + + + + + @@ -5328,24 +6477,24 @@ - + - + - + - - - - + - + - + + + + @@ -5385,6 +6534,15 @@ + + + + + + + + + @@ -5421,6 +6579,15 @@ + + + + + + + + + @@ -5505,90 +6672,198 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5667,6 +6942,15 @@ + + + + + + + + + @@ -5742,6 +7026,15 @@ + + + + + + + + + @@ -5769,6 +7062,15 @@ + + + + + + + + + @@ -5814,6 +7116,15 @@ + + + + + + + + + @@ -5841,6 +7152,15 @@ + + + + + + + + + @@ -5895,11 +7215,11 @@ - + - + - + @@ -5967,6 +7287,15 @@ + + + + + + + + + @@ -5976,6 +7305,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6174,6 +7530,24 @@ + + + + + + + + + + + + + + + + + + @@ -6246,6 +7620,15 @@ + + + + + + + + + @@ -6255,6 +7638,15 @@ + + + + + + + + + @@ -6264,6 +7656,15 @@ + + + + + + + + + @@ -6282,6 +7683,15 @@ + + + + + + + + + @@ -6291,6 +7701,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6300,6 +7755,15 @@ + + + + + + + + + @@ -6327,6 +7791,24 @@ + + + + + + + + + + + + + + + + + + @@ -6399,15 +7881,6 @@ - - - - - - - - - @@ -6453,6 +7926,24 @@ + + + + + + + + + + + + + + + + + + @@ -6474,20 +7965,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6501,6 +8019,24 @@ + + + + + + + + + + + + + + + + + + @@ -6573,6 +8109,15 @@ + + + + + + + + + @@ -6627,6 +8172,24 @@ + + + + + + + + + + + + + + + + + + @@ -6780,6 +8343,15 @@ + + + + + + + + + @@ -6798,6 +8370,15 @@ + + + + + + + + + @@ -6816,6 +8397,15 @@ + + + + + + + + + @@ -6843,18 +8433,6 @@ - - - - - - - - - - - - @@ -6873,6 +8451,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6882,6 +8487,15 @@ + + + + + + + + + @@ -6900,6 +8514,15 @@ + + + + + + + + + @@ -6909,6 +8532,15 @@ + + + + + + + + + @@ -7086,6 +8718,24 @@ + + + + + + + + + + + + + + + + + + @@ -7095,6 +8745,15 @@ + + + + + + + + + @@ -7380,6 +9039,24 @@ + + + + + + + + + + + + + + + + + + @@ -7452,11 +9129,11 @@ - + - + - + @@ -7488,11 +9165,11 @@ - + - + - + @@ -7506,6 +9183,24 @@ + + + + + + + + + + + + + + + + + + @@ -7515,15 +9210,12 @@ - + - + - + - - - @@ -7536,6 +9228,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7581,6 +9300,24 @@ + + + + + + + + + + + + + + + + + + @@ -7710,15 +9447,12 @@ - + - + - + - - - @@ -7785,6 +9519,15 @@ + + + + + + + + + @@ -7794,6 +9537,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -7812,6 +9579,24 @@ + + + + + + + + + + + + + + + + + + @@ -7857,6 +9642,15 @@ + + + + + + + + + @@ -7875,6 +9669,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7893,6 +9723,15 @@ + + + + + + + + + @@ -7914,11 +9753,29 @@ - + + + + + + + + + + - + - + + + + + + + + + + @@ -7932,6 +9789,24 @@ + + + + + + + + + + + + + + + + + + @@ -7950,6 +9825,15 @@ + + + + + + + + + @@ -7977,6 +9861,15 @@ + + + + + + + + + @@ -7986,11 +9879,20 @@ - + - + - + + + + + + + + + + @@ -8043,21 +9945,45 @@ + + + + + + + + + - + + + + - + + + + + + + + + + + + + @@ -8070,6 +9996,24 @@ + + + + + + + + + + + + + + + + + + @@ -8108,177 +10052,357 @@ - type.]]> + type.]]> + + .]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - .]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8301,11 +10425,11 @@ - + - + - + @@ -8331,20 +10455,20 @@ - + - + - + - + - + - + @@ -8376,6 +10500,24 @@ + + + + + + + + + + + + + + + + + + @@ -8394,20 +10536,20 @@ - + - + - + - + - + - + @@ -8439,15 +10581,6 @@ - - - - - - - - - @@ -8580,6 +10713,15 @@ + + + + + + + + + @@ -8589,6 +10731,15 @@ + + + + + + + + + @@ -8616,6 +10767,15 @@ + + + + + + + + + @@ -8625,6 +10785,24 @@ + + + + + + + + + + + + + + + + + + @@ -8643,6 +10821,15 @@ + + + + + + + + + @@ -8661,6 +10848,15 @@ + + + + + + + + + @@ -8679,6 +10875,15 @@ + + + + + + + + + @@ -8742,6 +10947,15 @@ + + + + + + + + + @@ -8787,6 +11001,24 @@ + + + + + + + + + + + + + + + + + + @@ -8844,6 +11076,15 @@ + + + + + + + + + @@ -8952,6 +11193,24 @@ + + + '}` or `>`?]]> + + '} nebo >?]]> + + + + + + + + + + + + + @@ -8961,6 +11220,24 @@ + + + + + + + + + + + + + + + + + + @@ -8970,6 +11247,15 @@ + + + + + + + + + @@ -8988,6 +11274,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9069,6 +11382,15 @@ + + + + + + + + + @@ -9078,6 +11400,15 @@ + + + + + + + + + @@ -9096,6 +11427,15 @@ + + + + + + + + + @@ -9132,6 +11472,24 @@ + + + + + + + + + + + + + + + + + + @@ -9159,38 +11517,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9222,6 +11607,15 @@ + + + + + + + + + @@ -9231,11 +11625,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9249,6 +11670,15 @@ + + + + + + + + + @@ -9276,6 +11706,15 @@ + + + + + + + + + @@ -9294,6 +11733,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9321,6 +11787,15 @@ + + + + + + + + + @@ -9438,6 +11913,15 @@ + + + + + + + + + @@ -9447,6 +11931,15 @@ + + + + + + + + + @@ -9465,6 +11958,15 @@ + + + + + + + + + @@ -9474,6 +11976,15 @@ + + + + + + + + + @@ -9492,6 +12003,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9501,6 +12039,15 @@ + + + + + + + + + @@ -9510,11 +12057,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9528,6 +12093,15 @@ + + + + + + + + + @@ -9540,6 +12114,15 @@ + + + + + + + + + @@ -9606,6 +12189,15 @@ + + + + + + + + + @@ -9618,38 +12210,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9735,20 +12327,20 @@ - + - + - + - + - + - + @@ -9762,15 +12354,6 @@ - - - - - - - - - @@ -9789,83 +12372,92 @@ - + - + - + - + - ()' instead.]]> + - ().]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9888,6 +12480,15 @@ + + + + + + + + + @@ -9954,6 +12555,15 @@ + + + + + + + + + @@ -10044,74 +12654,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl index 62dc9fc878a28..af65760431f58 100644 --- a/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -48,6 +48,24 @@ + + + + + + + + + + + + + + + + + + @@ -84,6 +102,15 @@ + + + + + + + + + @@ -105,15 +132,6 @@ - - - - - - - - - @@ -204,6 +222,15 @@ + + + + + + + + + @@ -213,11 +240,11 @@ - + - + - + @@ -270,15 +297,6 @@ - - - - - - - - - @@ -414,6 +432,15 @@ + + + + + + + + + @@ -423,6 +450,15 @@ + + + + + + + + + @@ -474,15 +510,6 @@ - - - - - - - - - @@ -501,6 +528,24 @@ + + + + + + + + + + + + + + + + + + @@ -573,6 +618,15 @@ + + + + + + + + + @@ -618,6 +672,24 @@ + + + + + + + + + + + + + + + + + + @@ -737,10 +809,13 @@ - + - + + + + @@ -771,15 +846,6 @@ - - - - - - - - - @@ -798,6 +864,15 @@ + + + + + + + + + @@ -936,6 +1011,15 @@ + + + + + + + + + @@ -963,6 +1047,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -972,6 +1083,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -990,6 +1128,15 @@ + + + + + + + + + @@ -1020,6 +1167,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1041,6 +1215,15 @@ + + + + + + + + + @@ -1050,6 +1233,15 @@ + + + + + + + + + @@ -1095,6 +1287,24 @@ + + + + + + + + + + + + + + + + + + @@ -1158,6 +1368,15 @@ + + + + + + + + + @@ -1167,6 +1386,15 @@ + + + + + + + + + @@ -1176,6 +1404,15 @@ + + + + + + + + + @@ -1194,11 +1431,11 @@ - + - + - + @@ -1239,11 +1476,20 @@ - + + + + + + + + + + - + - + @@ -1266,11 +1512,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1320,6 +1593,15 @@ + + + + + + + + + @@ -1329,6 +1611,15 @@ + + + + + + + + + @@ -1383,6 +1674,15 @@ + + + + + + + + + @@ -1392,6 +1692,15 @@ + + + + + + + + + @@ -1401,9 +1710,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1518,11 +1845,11 @@ - + - + - + @@ -1536,11 +1863,11 @@ - + - + - + @@ -1599,6 +1926,24 @@ + + + + + + + + + + + + + + + + + + @@ -1644,6 +1989,24 @@ + + + + + + + + + + + + + + + + + + @@ -1683,6 +2046,24 @@ + + + + + + + + + + + + + + + + + + @@ -1728,11 +2109,11 @@ - + - + - + @@ -1764,6 +2145,15 @@ + + + + + + + + + @@ -1809,6 +2199,15 @@ + + + + + + + + + @@ -1830,6 +2229,15 @@ + + + + + + + + + @@ -1839,6 +2247,15 @@ + + + + + + + + + @@ -1857,6 +2274,15 @@ + + + + + + + + + @@ -1875,11 +2301,20 @@ - + - + - + + + + + + + + + + @@ -1920,20 +2355,20 @@ - + - + - + - + - + - + @@ -1965,6 +2400,15 @@ + + + + + + + + + @@ -2022,6 +2466,15 @@ + + + + + + + + + @@ -2058,6 +2511,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2112,15 +2637,6 @@ - - - - - - - - - @@ -2148,20 +2664,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2208,6 +2742,15 @@ + + + + + + + + + @@ -2244,11 +2787,11 @@ - + - + - + @@ -2379,29 +2922,29 @@ - + - + - + - + - + - + - + - + - + @@ -2508,6 +3051,15 @@ + + + + + + + + + @@ -2544,6 +3096,15 @@ + + + + + + + + + @@ -2553,6 +3114,15 @@ + + + + + + + + + @@ -2589,6 +3159,24 @@ + + + + + + + + + + + + + + + + + + @@ -2598,6 +3186,15 @@ + + + + + + + + + @@ -2643,6 +3240,15 @@ + + + + + + + + + @@ -2661,52 +3267,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2715,6 +3393,15 @@ + + + + + + + + + @@ -2733,6 +3420,24 @@ + + + + + + + + + + + + + + + + + + @@ -2742,6 +3447,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2781,6 +3513,24 @@ + + + + + + + + + + + + + + + + + + @@ -2808,6 +3558,15 @@ + + + + + + + + + @@ -2883,6 +3642,24 @@ + + + + + + + + + + + + + + + + + + @@ -2928,6 +3705,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}" einschränken?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2967,6 +3807,15 @@ + + + + + + + + + @@ -2976,6 +3825,15 @@ + + + + + + + + + @@ -3102,15 +3960,6 @@ - - - - - - - - - @@ -3213,29 +4062,29 @@ - + - + - + - + - + - + - + - + - + @@ -3258,6 +4107,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3276,6 +4161,15 @@ + + + + + + + + + @@ -3294,6 +4188,15 @@ + + + + + + + + + @@ -3312,6 +4215,15 @@ + + + + + + + + + @@ -3321,6 +4233,15 @@ + + + + + + + + + @@ -3348,27 +4269,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3459,6 +4398,15 @@ + + + + + + + + + @@ -3567,11 +4515,11 @@ - + - + - + @@ -3587,10 +4535,13 @@ - + - + + + + @@ -3723,6 +4674,15 @@ + + + + + + + + + @@ -3804,6 +4764,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3858,6 +4854,15 @@ + + + + + + + + + @@ -3867,11 +4872,11 @@ - + - + - + @@ -3885,11 +4890,11 @@ - + - + - + @@ -3981,6 +4986,24 @@ + + + + + + + + + + + + + + + + + + @@ -3990,29 +5013,29 @@ - + - + - + - + - + - + - + - + - + @@ -4107,6 +5130,15 @@ + + + + + + + + + @@ -4116,6 +5148,15 @@ + + + + + + + + + @@ -4143,11 +5184,11 @@ - + - + - + @@ -4188,15 +5229,6 @@ - - - - - - - - - @@ -4251,6 +5283,15 @@ + + + + + + + + + @@ -4290,6 +5331,15 @@ + + + + + + + + + @@ -4308,6 +5358,15 @@ + + + + + + + + + @@ -4371,6 +5430,15 @@ + + + + + + + + + @@ -4422,6 +5490,15 @@ + + + + + + + + + @@ -4488,15 +5565,6 @@ - - - - - - - - - @@ -4563,6 +5631,15 @@ + + + + + + + + + @@ -4836,6 +5913,15 @@ + + + + + + + + + @@ -4959,6 +6045,15 @@ + + + + + + + + + @@ -5025,6 +6120,15 @@ + + + + + + + + + @@ -5199,6 +6303,15 @@ + + + + + + + + + @@ -5262,11 +6375,38 @@ - + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + @@ -5298,6 +6438,15 @@ + + + + + + + + + @@ -5316,24 +6465,24 @@ - + - + - + - - - - + - + - + + + + @@ -5373,6 +6522,15 @@ + + + + + + + + + @@ -5409,6 +6567,15 @@ + + + + + + + + + @@ -5493,92 +6660,200 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5655,6 +6930,15 @@ + + + + + + + + + @@ -5730,6 +7014,15 @@ + + + + + + + + + @@ -5757,6 +7050,15 @@ + + + + + + + + + @@ -5802,6 +7104,15 @@ + + + + + + + + + @@ -5829,6 +7140,15 @@ + + + + + + + + + @@ -5883,11 +7203,11 @@ - + - + - + @@ -5955,6 +7275,15 @@ + + + + + + + + + @@ -5964,6 +7293,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6162,6 +7518,24 @@ + + + + + + + + + + + + + + + + + + @@ -6231,6 +7605,15 @@ + + + + + + + + + @@ -6240,6 +7623,15 @@ + + + + + + + + + @@ -6249,6 +7641,15 @@ + + + + + + + + + @@ -6267,6 +7668,15 @@ + + + + + + + + + @@ -6276,6 +7686,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6285,6 +7740,15 @@ + + + + + + + + + @@ -6312,6 +7776,24 @@ + + + + + + + + + + + + + + + + + + @@ -6384,15 +7866,6 @@ - - - - - - - - - @@ -6438,6 +7911,24 @@ + + + + + + + + + + + + + + + + + + @@ -6459,20 +7950,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6486,6 +8004,24 @@ + + + + + + + + + + + + + + + + + + @@ -6558,6 +8094,15 @@ + + + + + + + + + @@ -6612,6 +8157,24 @@ + + + + + + + + + + + + + + + + + + @@ -6765,6 +8328,15 @@ + + + + + + + + + @@ -6783,6 +8355,15 @@ + + + + + + + + + @@ -6801,6 +8382,15 @@ + + + + + + + + + @@ -6828,18 +8418,6 @@ - - - - - - - - - - - - @@ -6858,6 +8436,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6867,6 +8472,15 @@ + + + + + + + + + @@ -6885,6 +8499,15 @@ + + + + + + + + + @@ -6894,6 +8517,15 @@ + + + + + + + + + @@ -7071,6 +8703,24 @@ + + + + + + + + + + + + + + + + + + @@ -7080,6 +8730,15 @@ + + + + + + + + + @@ -7365,6 +9024,24 @@ + + + + + + + + + + + + + + + + + + @@ -7437,11 +9114,11 @@ - + - + - + @@ -7473,11 +9150,11 @@ - + - + - + @@ -7491,6 +9168,24 @@ + + + + + + + + + + + + + + + + + + @@ -7500,15 +9195,12 @@ - + - + - + - - - @@ -7521,6 +9213,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7566,6 +9285,24 @@ + + + + + + + + + + + + + + + + + + @@ -7695,15 +9432,12 @@ - + - + - - - @@ -7770,6 +9504,15 @@ + + + + + + + + + @@ -7779,6 +9522,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -7797,6 +9564,24 @@ + + + + + + + + + + + + + + + + + + @@ -7842,6 +9627,15 @@ + + + + + + + + + @@ -7860,6 +9654,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7878,6 +9708,15 @@ + + + + + + + + + @@ -7899,11 +9738,29 @@ - + + + + + + + + + + - + - + + + + + + + + + + @@ -7917,6 +9774,24 @@ + + + + + + + + + + + + + + + + + + @@ -7935,6 +9810,15 @@ + + + + + + + + + @@ -7962,6 +9846,15 @@ + + + + + + + + + @@ -7971,11 +9864,20 @@ - + - + - + + + + + + + + + + @@ -8028,20 +9930,44 @@ + + + + + + + + + - + + + + - + + + + + + + + + + + + + - + @@ -8055,6 +9981,24 @@ + + + + + + + + + + + + + + + + + + @@ -8093,177 +10037,357 @@ - type.]]> + type.]]> + + " sein.]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - " sein.]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8286,11 +10410,11 @@ - + - + - + @@ -8316,20 +10440,20 @@ - + - + - + - + - + - + @@ -8361,6 +10485,24 @@ + + + + + + + + + + + + + + + + + + @@ -8379,20 +10521,20 @@ - + - + - + - + - + - + @@ -8424,15 +10566,6 @@ - - - - - - - - - @@ -8565,6 +10698,15 @@ + + + + + + + + + @@ -8574,6 +10716,15 @@ + + + + + + + + + @@ -8601,6 +10752,15 @@ + + + + + + + + + @@ -8610,6 +10770,24 @@ + + + + + + + + + + + + + + + + + + @@ -8628,6 +10806,15 @@ + + + + + + + + + @@ -8646,6 +10833,15 @@ + + + + + + + + + @@ -8664,6 +10860,15 @@ + + + + + + + + + @@ -8727,6 +10932,15 @@ + + + + + + + + + @@ -8772,6 +10986,24 @@ + + + + + + + + + + + + + + + + + + @@ -8829,6 +11061,15 @@ + + + + + + + + + @@ -8937,6 +11178,24 @@ + + + '}` or `>`?]]> + + '}" oder ">"?]]> + + + + + + + + + + + + + @@ -8946,6 +11205,24 @@ + + + + + + + + + + + + + + + + + + @@ -8955,6 +11232,15 @@ + + + + + + + + + @@ -8973,6 +11259,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9054,6 +11367,15 @@ + + + + + + + + + @@ -9063,6 +11385,15 @@ + + + + + + + + + @@ -9081,6 +11412,15 @@ + + + + + + + + + @@ -9117,6 +11457,24 @@ + + + + + + + + + + + + + + + + + + @@ -9144,38 +11502,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9207,6 +11592,15 @@ + + + + + + + + + @@ -9216,11 +11610,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9234,6 +11655,15 @@ + + + + + + + + + @@ -9261,6 +11691,15 @@ + + + + + + + + + @@ -9279,6 +11718,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9306,6 +11772,15 @@ + + + + + + + + + @@ -9423,6 +11898,15 @@ + + + + + + + + + @@ -9432,6 +11916,15 @@ + + + + + + + + + @@ -9450,6 +11943,15 @@ + + + + + + + + + @@ -9459,6 +11961,15 @@ + + + + + + + + + @@ -9477,6 +11988,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9486,6 +12024,15 @@ + + + + + + + + + @@ -9495,11 +12042,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9513,6 +12078,15 @@ + + + + + + + + + @@ -9525,6 +12099,15 @@ + + + + + + + + + @@ -9591,6 +12174,15 @@ + + + + + + + + + @@ -9603,38 +12195,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9720,20 +12312,20 @@ - + - + - + - + - + - + @@ -9747,15 +12339,6 @@ - - - - - - - - - @@ -9774,83 +12357,92 @@ - + - + - + - + - ()' instead.]]> + - ()".]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9873,6 +12465,15 @@ + + + + + + + + + @@ -9939,6 +12540,15 @@ + + + + + + + + + @@ -10029,74 +12639,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl index 1b1a735c1dc31..9331a87553d92 100644 --- a/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -57,6 +57,24 @@ + + + + + + + + + + + + + + + + + + @@ -93,6 +111,15 @@ + + + + + + + + + @@ -114,15 +141,6 @@ - - - - - - - - - @@ -213,6 +231,15 @@ + + + + + + + + + @@ -222,11 +249,11 @@ - + - + - + @@ -279,15 +306,6 @@ - - - - - - - - - @@ -423,6 +441,15 @@ + + + + + + + + + @@ -432,6 +459,15 @@ + + + + + + + + + @@ -483,15 +519,6 @@ - - - - - - - - - @@ -510,6 +537,24 @@ + + + + + + + + + + + + + + + + + + @@ -582,6 +627,15 @@ + + + + + + + + + @@ -630,6 +684,24 @@ + + + + + + + + + + + + + + + + + + @@ -749,10 +821,13 @@ - + - + + + + @@ -783,15 +858,6 @@ - - - - - - - - - @@ -810,6 +876,15 @@ + + + + + + + + + @@ -948,6 +1023,15 @@ + + + + + + + + + @@ -975,6 +1059,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -984,6 +1095,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1002,6 +1140,15 @@ + + + + + + + + + @@ -1032,6 +1179,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1056,6 +1230,15 @@ + + + + + + + + + @@ -1065,6 +1248,15 @@ + + + + + + + + + @@ -1110,6 +1302,24 @@ + + + + + + + + + + + + + + + + + + @@ -1173,6 +1383,15 @@ + + + + + + + + + @@ -1182,6 +1401,15 @@ + + + + + + + + + @@ -1191,6 +1419,15 @@ + + + + + + + + + @@ -1209,11 +1446,11 @@ - + - + - + @@ -1254,11 +1491,20 @@ - + + + + + + + + + + - + - + @@ -1281,11 +1527,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1335,6 +1608,15 @@ + + + + + + + + + @@ -1344,6 +1626,15 @@ + + + + + + + + + @@ -1398,6 +1689,15 @@ + + + + + + + + + @@ -1407,6 +1707,15 @@ + + + + + + + + + @@ -1416,9 +1725,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1533,9 +1860,9 @@ - + - + @@ -1551,11 +1878,11 @@ - + - + - + @@ -1614,6 +1941,24 @@ + + + + + + + + + + + + + + + + + + @@ -1659,6 +2004,24 @@ + + + + + + + + + + + + + + + + + + @@ -1698,6 +2061,24 @@ + + + + + + + + + + + + + + + + + + @@ -1743,11 +2124,11 @@ - + - + - + @@ -1779,6 +2160,15 @@ + + + + + + + + + @@ -1824,6 +2214,15 @@ + + + + + + + + + @@ -1845,6 +2244,15 @@ + + + + + + + + + @@ -1854,6 +2262,15 @@ + + + + + + + + + @@ -1872,6 +2289,15 @@ + + + + + + + + + @@ -1890,11 +2316,20 @@ - + - + - + + + + + + + + + + @@ -1935,20 +2370,20 @@ - + - + - + - + - + - + @@ -1980,6 +2415,15 @@ + + + + + + + + + @@ -2037,6 +2481,15 @@ + + + + + + + + + @@ -2073,6 +2526,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2127,15 +2652,6 @@ - - - - - - - - - @@ -2163,20 +2679,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2223,6 +2757,15 @@ + + + + + + + + + @@ -2259,11 +2802,11 @@ - + - + - + @@ -2394,29 +2937,29 @@ - + - + - + - + - + - + - + - + - + @@ -2523,6 +3066,15 @@ + + + + + + + + + @@ -2559,6 +3111,15 @@ + + + + + + + + + @@ -2568,6 +3129,15 @@ + + + + + + + + + @@ -2604,6 +3174,24 @@ + + + + + + + + + + + + + + + + + + @@ -2613,6 +3201,15 @@ + + + + + + + + + @@ -2658,6 +3255,15 @@ + + + + + + + + + @@ -2676,52 +3282,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2730,6 +3408,15 @@ + + + + + + + + + @@ -2748,6 +3435,24 @@ + + + + + + + + + + + + + + + + + + @@ -2757,6 +3462,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2796,6 +3528,24 @@ + + + + + + + + + + + + + + + + + + @@ -2823,6 +3573,15 @@ + + + + + + + + + @@ -2898,6 +3657,24 @@ + + + + + + + + + + + + + + + + + + @@ -2943,6 +3720,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}"?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2982,6 +3822,15 @@ + + + + + + + + + @@ -2991,6 +3840,15 @@ + + + + + + + + + @@ -3117,15 +3975,6 @@ - - - - - - - - - @@ -3228,29 +4077,29 @@ - + - + - + - + - + - + - + - + - + @@ -3273,6 +4122,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3291,6 +4176,15 @@ + + + + + + + + + @@ -3309,6 +4203,15 @@ + + + + + + + + + @@ -3327,6 +4230,15 @@ + + + + + + + + + @@ -3336,6 +4248,15 @@ + + + + + + + + + @@ -3363,27 +4284,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3474,6 +4413,15 @@ + + + + + + + + + @@ -3582,11 +4530,11 @@ - + - + - + @@ -3602,10 +4550,13 @@ - + - + + + + @@ -3738,6 +4689,15 @@ + + + + + + + + + @@ -3819,6 +4779,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3873,6 +4869,15 @@ + + + + + + + + + @@ -3882,11 +4887,11 @@ - + - + - + @@ -3900,11 +4905,11 @@ - + - + - + @@ -3996,6 +5001,24 @@ + + + + + + + + + + + + + + + + + + @@ -4005,29 +5028,29 @@ - + - + - + - + - + - + - + - + - + @@ -4122,6 +5145,15 @@ + + + + + + + + + @@ -4131,6 +5163,15 @@ + + + + + + + + + @@ -4158,11 +5199,11 @@ - + - + - + @@ -4203,15 +5244,6 @@ - - - - - - - - - @@ -4266,6 +5298,15 @@ + + + + + + + + + @@ -4305,6 +5346,15 @@ + + + + + + + + + @@ -4323,6 +5373,15 @@ + + + + + + + + + @@ -4386,6 +5445,15 @@ + + + + + + + + + @@ -4437,6 +5505,15 @@ + + + + + + + + + @@ -4503,15 +5580,6 @@ - - - - - - - - - @@ -4578,6 +5646,15 @@ + + + + + + + + + @@ -4851,6 +5928,15 @@ + + + + + + + + + @@ -4974,6 +6060,15 @@ + + + + + + + + + @@ -5040,6 +6135,15 @@ + + + + + + + + + @@ -5214,6 +6318,15 @@ + + + + + + + + + @@ -5277,11 +6390,38 @@ - + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + @@ -5313,6 +6453,15 @@ + + + + + + + + + @@ -5331,24 +6480,24 @@ - + - + - + - - - - + - + - + + + + @@ -5388,6 +6537,15 @@ + + + + + + + + + @@ -5424,6 +6582,15 @@ + + + + + + + + + @@ -5508,92 +6675,200 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5670,6 +6945,15 @@ + + + + + + + + + @@ -5745,6 +7029,15 @@ + + + + + + + + + @@ -5772,6 +7065,15 @@ + + + + + + + + + @@ -5817,6 +7119,15 @@ + + + + + + + + + @@ -5844,6 +7155,15 @@ + + + + + + + + + @@ -5898,11 +7218,11 @@ - + - + - + @@ -5970,6 +7290,15 @@ + + + + + + + + + @@ -5979,6 +7308,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6177,6 +7533,24 @@ + + + + + + + + + + + + + + + + + + @@ -6249,6 +7623,15 @@ + + + + + + + + + @@ -6258,6 +7641,15 @@ + + + + + + + + + @@ -6267,6 +7659,15 @@ + + + + + + + + + @@ -6285,6 +7686,15 @@ + + + + + + + + + @@ -6294,6 +7704,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6303,6 +7758,15 @@ + + + + + + + + + @@ -6330,6 +7794,24 @@ + + + + + + + + + + + + + + + + + + @@ -6402,15 +7884,6 @@ - - - - - - - - - @@ -6456,6 +7929,24 @@ + + + + + + + + + + + + + + + + + + @@ -6477,20 +7968,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6504,6 +8022,24 @@ + + + + + + + + + + + + + + + + + + @@ -6576,6 +8112,15 @@ + + + + + + + + + @@ -6630,6 +8175,24 @@ + + + + + + + + + + + + + + + + + + @@ -6783,6 +8346,15 @@ + + + + + + + + + @@ -6801,6 +8373,15 @@ + + + + + + + + + @@ -6819,6 +8400,15 @@ + + + + + + + + + @@ -6846,18 +8436,6 @@ - - - - - - - - - - - - @@ -6876,6 +8454,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6885,6 +8490,15 @@ + + + + + + + + + @@ -6903,6 +8517,15 @@ + + + + + + + + + @@ -6912,6 +8535,15 @@ + + + + + + + + + @@ -7089,6 +8721,24 @@ + + + + + + + + + + + + + + + + + + @@ -7098,6 +8748,15 @@ + + + + + + + + + @@ -7383,6 +9042,24 @@ + + + + + + + + + + + + + + + + + + @@ -7455,11 +9132,11 @@ - + - + - + @@ -7491,11 +9168,11 @@ - + - + - + @@ -7509,6 +9186,24 @@ + + + + + + + + + + + + + + + + + + @@ -7518,15 +9213,12 @@ - + - + - + - - - @@ -7539,6 +9231,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7584,6 +9303,24 @@ + + + + + + + + + + + + + + + + + + @@ -7713,15 +9450,12 @@ - + - + - + - - - @@ -7788,6 +9522,15 @@ + + + + + + + + + @@ -7797,6 +9540,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -7815,6 +9582,24 @@ + + + + + + + + + + + + + + + + + + @@ -7860,6 +9645,15 @@ + + + + + + + + + @@ -7878,6 +9672,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7896,6 +9726,15 @@ + + + + + + + + + @@ -7917,11 +9756,29 @@ - + + + + + + + + + + - + - + + + + + + + + + + @@ -7935,6 +9792,24 @@ + + + + + + + + + + + + + + + + + + @@ -7953,6 +9828,15 @@ + + + + + + + + + @@ -7980,6 +9864,15 @@ + + + + + + + + + @@ -7989,11 +9882,20 @@ - + - + - + + + + + + + + + + @@ -8046,20 +9948,44 @@ + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + - + @@ -8073,6 +9999,24 @@ + + + + + + + + + + + + + + + + + + @@ -8111,177 +10055,357 @@ - type.]]> + type.]]> + + global.]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - global.]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8304,11 +10428,11 @@ - + - + - + @@ -8334,20 +10458,20 @@ - + - + - + - + - + - + @@ -8379,6 +10503,24 @@ + + + + + + + + + + + + + + + + + + @@ -8397,20 +10539,20 @@ - + - + - + - + - + - + @@ -8442,15 +10584,6 @@ - - - - - - - - - @@ -8583,6 +10716,15 @@ + + + + + + + + + @@ -8592,6 +10734,15 @@ + + + + + + + + + @@ -8619,6 +10770,15 @@ + + + + + + + + + @@ -8628,6 +10788,24 @@ + + + + + + + + + + + + + + + + + + @@ -8646,6 +10824,15 @@ + + + + + + + + + @@ -8664,6 +10851,15 @@ + + + + + + + + + @@ -8682,6 +10878,15 @@ + + + + + + + + + @@ -8745,6 +10950,15 @@ + + + + + + + + + @@ -8790,6 +11004,24 @@ + + + + + + + + + + + + + + + + + + @@ -8847,6 +11079,15 @@ + + + + + + + + + @@ -8955,6 +11196,24 @@ + + + '}` or `>`?]]> + + '}" o ">"?]]> + + + + + + + + + + + + + @@ -8964,6 +11223,24 @@ + + + + + + + + + + + + + + + + + + @@ -8973,6 +11250,15 @@ + + + + + + + + + @@ -8991,6 +11277,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9072,6 +11385,15 @@ + + + + + + + + + @@ -9081,6 +11403,15 @@ + + + + + + + + + @@ -9099,6 +11430,15 @@ + + + + + + + + + @@ -9135,6 +11475,24 @@ + + + + + + + + + + + + + + + + + + @@ -9162,38 +11520,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9225,6 +11610,15 @@ + + + + + + + + + @@ -9234,11 +11628,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9252,6 +11673,15 @@ + + + + + + + + + @@ -9279,6 +11709,15 @@ + + + + + + + + + @@ -9297,6 +11736,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9324,6 +11790,15 @@ + + + + + + + + + @@ -9441,6 +11916,15 @@ + + + + + + + + + @@ -9450,6 +11934,15 @@ + + + + + + + + + @@ -9468,6 +11961,15 @@ + + + + + + + + + @@ -9477,6 +11979,15 @@ + + + + + + + + + @@ -9495,6 +12006,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9504,6 +12042,15 @@ + + + + + + + + + @@ -9513,11 +12060,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9531,6 +12096,15 @@ + + + + + + + + + @@ -9543,6 +12117,15 @@ + + + + + + + + + @@ -9609,6 +12192,15 @@ + + + + + + + + + @@ -9621,38 +12213,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9738,20 +12330,20 @@ - + - + - + - + - + - + @@ -9765,15 +12357,6 @@ - - - - - - - - - @@ -9792,83 +12375,92 @@ - + - + - + - + - ()' instead.]]> + - ()" en su lugar.]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9891,6 +12483,15 @@ + + + + + + + + + @@ -9957,6 +12558,15 @@ + + + + + + + + + @@ -10047,74 +12657,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl index 6988db6bec256..3d79c62b723f6 100644 --- a/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -57,6 +57,24 @@ + + + + + + + + + + + + + + + + + + @@ -93,6 +111,15 @@ + + + + + + + + + @@ -114,15 +141,6 @@ - - - - - - - - - @@ -213,6 +231,15 @@ + + + + + + + + + @@ -222,11 +249,11 @@ - + - + - + @@ -279,15 +306,6 @@ - - - - - - - - - @@ -423,6 +441,15 @@ + + + + + + + + + @@ -432,6 +459,15 @@ + + + + + + + + + @@ -483,15 +519,6 @@ - - - - - - - - - @@ -510,6 +537,24 @@ + + + + + + + + + + + + + + + + + + @@ -582,6 +627,15 @@ + + + + + + + + + @@ -630,6 +684,24 @@ + + + + + + + + + + + + + + + + + + @@ -749,10 +821,13 @@ - + - + + + + @@ -783,15 +858,6 @@ - - - - - - - - - @@ -810,6 +876,15 @@ + + + + + + + + + @@ -948,6 +1023,15 @@ + + + + + + + + + @@ -975,6 +1059,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -984,6 +1095,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1002,6 +1140,15 @@ + + + + + + + + + @@ -1032,6 +1179,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1056,6 +1230,15 @@ + + + + + + + + + @@ -1065,6 +1248,15 @@ + + + + + + + + + @@ -1110,6 +1302,24 @@ + + + + + + + + + + + + + + + + + + @@ -1173,6 +1383,15 @@ + + + + + + + + + @@ -1182,6 +1401,15 @@ + + + + + + + + + @@ -1191,6 +1419,15 @@ + + + + + + + + + @@ -1209,11 +1446,11 @@ - + - + - + @@ -1254,11 +1491,20 @@ - + + + + + + + + + + - + - + @@ -1281,11 +1527,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1335,6 +1608,15 @@ + + + + + + + + + @@ -1344,6 +1626,15 @@ + + + + + + + + + @@ -1398,6 +1689,15 @@ + + + + + + + + + @@ -1407,6 +1707,15 @@ + + + + + + + + + @@ -1416,9 +1725,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1533,9 +1860,9 @@ - + - + @@ -1551,11 +1878,11 @@ - + - + - + @@ -1614,6 +1941,24 @@ + + + + + + + + + + + + + + + + + + @@ -1659,6 +2004,24 @@ + + + + + + + + + + + + + + + + + + @@ -1698,6 +2061,24 @@ + + + + + + + + + + + + + + + + + + @@ -1743,11 +2124,11 @@ - + - + - + @@ -1779,6 +2160,15 @@ + + + + + + + + + @@ -1824,6 +2214,15 @@ + + + + + + + + + @@ -1845,6 +2244,15 @@ + + + + + + + + + @@ -1854,6 +2262,15 @@ + + + + + + + + + @@ -1872,6 +2289,15 @@ + + + + + + + + + @@ -1890,11 +2316,20 @@ - + - + - + + + + + + + + + + @@ -1935,20 +2370,20 @@ - + - + - + - + - + - + @@ -1980,6 +2415,15 @@ + + + + + + + + + @@ -2037,6 +2481,15 @@ + + + + + + + + + @@ -2073,6 +2526,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2127,15 +2652,6 @@ - - - - - - - - - @@ -2163,20 +2679,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2223,6 +2757,15 @@ + + + + + + + + + @@ -2259,11 +2802,11 @@ - + - + - + @@ -2394,29 +2937,29 @@ - + - + - + - + - + - + - + - + - + @@ -2523,6 +3066,15 @@ + + + + + + + + + @@ -2559,6 +3111,15 @@ + + + + + + + + + @@ -2568,6 +3129,15 @@ + + + + + + + + + @@ -2604,6 +3174,24 @@ + + + + + + + + + + + + + + + + + + @@ -2613,6 +3201,15 @@ + + + + + + + + + @@ -2658,6 +3255,15 @@ + + + + + + + + + @@ -2676,52 +3282,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2730,6 +3408,15 @@ + + + + + + + + + @@ -2748,6 +3435,24 @@ + + + + + + + + + + + + + + + + + + @@ -2757,6 +3462,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2796,6 +3528,24 @@ + + + + + + + + + + + + + + + + + + @@ -2823,6 +3573,15 @@ + + + + + + + + + @@ -2898,6 +3657,24 @@ + + + + + + + + + + + + + + + + + + @@ -2943,6 +3720,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}' ?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2982,6 +3822,15 @@ + + + + + + + + + @@ -2991,6 +3840,15 @@ + + + + + + + + + @@ -3117,15 +3975,6 @@ - - - - - - - - - @@ -3228,29 +4077,29 @@ - + - + - + - + - + - + - + - + - + @@ -3273,6 +4122,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3291,6 +4176,15 @@ + + + + + + + + + @@ -3309,6 +4203,15 @@ + + + + + + + + + @@ -3327,6 +4230,15 @@ + + + + + + + + + @@ -3336,6 +4248,15 @@ + + + + + + + + + @@ -3363,27 +4284,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3474,6 +4413,15 @@ + + + + + + + + + @@ -3582,11 +4530,11 @@ - + - + - + @@ -3602,10 +4550,13 @@ - + - + + + + @@ -3738,6 +4689,15 @@ + + + + + + + + + @@ -3819,6 +4779,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3873,6 +4869,15 @@ + + + + + + + + + @@ -3882,11 +4887,11 @@ - + - + - + @@ -3900,11 +4905,11 @@ - + - + - + @@ -3996,6 +5001,24 @@ + + + + + + + + + + + + + + + + + + @@ -4005,29 +5028,29 @@ - + - + - + - + - + - + - + - + - + @@ -4122,6 +5145,15 @@ + + + + + + + + + @@ -4131,6 +5163,15 @@ + + + + + + + + + @@ -4158,11 +5199,11 @@ - + - + - + @@ -4203,15 +5244,6 @@ - - - - - - - - - @@ -4266,6 +5298,15 @@ + + + + + + + + + @@ -4305,6 +5346,15 @@ + + + + + + + + + @@ -4323,6 +5373,15 @@ + + + + + + + + + @@ -4386,6 +5445,15 @@ + + + + + + + + + @@ -4437,6 +5505,15 @@ + + + + + + + + + @@ -4503,15 +5580,6 @@ - - - - - - - - - @@ -4578,6 +5646,15 @@ + + + + + + + + + @@ -4851,6 +5928,15 @@ + + + + + + + + + @@ -4974,6 +6060,15 @@ + + + + + + + + + @@ -5040,6 +6135,15 @@ + + + + + + + + + @@ -5214,6 +6318,15 @@ + + + + + + + + + @@ -5277,11 +6390,38 @@ - + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + @@ -5313,6 +6453,15 @@ + + + + + + + + + @@ -5331,24 +6480,24 @@ - + - + - + - - - - + - + - + + + + @@ -5388,6 +6537,15 @@ + + + + + + + + + @@ -5424,6 +6582,15 @@ + + + + + + + + + @@ -5508,92 +6675,200 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5670,6 +6945,15 @@ + + + + + + + + + @@ -5745,6 +7029,15 @@ + + + + + + + + + @@ -5772,6 +7065,15 @@ + + + + + + + + + @@ -5817,6 +7119,15 @@ + + + + + + + + + @@ -5844,6 +7155,15 @@ + + + + + + + + + @@ -5898,11 +7218,11 @@ - + - + - + @@ -5970,6 +7290,15 @@ + + + + + + + + + @@ -5979,6 +7308,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6177,6 +7533,24 @@ + + + + + + + + + + + + + + + + + + @@ -6249,6 +7623,15 @@ + + + + + + + + + @@ -6258,6 +7641,15 @@ + + + + + + + + + @@ -6267,6 +7659,15 @@ + + + + + + + + + @@ -6285,6 +7686,15 @@ + + + + + + + + + @@ -6294,6 +7704,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6303,6 +7758,15 @@ + + + + + + + + + @@ -6330,6 +7794,24 @@ + + + + + + + + + + + + + + + + + + @@ -6402,15 +7884,6 @@ - - - - - - - - - @@ -6456,6 +7929,24 @@ + + + + + + + + + + + + + + + + + + @@ -6477,20 +7968,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6504,6 +8022,24 @@ + + + + + + + + + + + + + + + + + + @@ -6576,6 +8112,15 @@ + + + + + + + + + @@ -6630,6 +8175,24 @@ + + + + + + + + + + + + + + + + + + @@ -6783,6 +8346,15 @@ + + + + + + + + + @@ -6801,6 +8373,15 @@ + + + + + + + + + @@ -6819,6 +8400,15 @@ + + + + + + + + + @@ -6846,18 +8436,6 @@ - - - - - - - - - - - - @@ -6876,6 +8454,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6885,6 +8490,15 @@ + + + + + + + + + @@ -6903,6 +8517,15 @@ + + + + + + + + + @@ -6912,6 +8535,15 @@ + + + + + + + + + @@ -7089,6 +8721,24 @@ + + + + + + + + + + + + + + + + + + @@ -7098,6 +8748,15 @@ + + + + + + + + + @@ -7383,6 +9042,24 @@ + + + + + + + + + + + + + + + + + + @@ -7455,11 +9132,11 @@ - + - + - + @@ -7491,11 +9168,11 @@ - + - + - + @@ -7509,6 +9186,24 @@ + + + + + + + + + + + + + + + + + + @@ -7518,15 +9213,12 @@ - + - + - + - - - @@ -7539,6 +9231,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7584,6 +9303,24 @@ + + + + + + + + + + + + + + + + + + @@ -7713,15 +9450,12 @@ - + - + - - - @@ -7788,6 +9522,15 @@ + + + + + + + + + @@ -7797,6 +9540,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -7815,6 +9582,24 @@ + + + + + + + + + + + + + + + + + + @@ -7860,6 +9645,15 @@ + + + + + + + + + @@ -7878,6 +9672,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7896,6 +9726,15 @@ + + + + + + + + + @@ -7917,11 +9756,29 @@ - + + + + + + + + + + - + - + + + + + + + + + + @@ -7935,6 +9792,24 @@ + + + + + + + + + + + + + + + + + + @@ -7953,6 +9828,15 @@ + + + + + + + + + @@ -7980,6 +9864,15 @@ + + + + + + + + + @@ -7989,11 +9882,20 @@ - + - + - + + + + + + + + + + @@ -8046,20 +9948,44 @@ + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + - + @@ -8073,6 +9999,24 @@ + + + + + + + + + + + + + + + + + + @@ -8111,177 +10055,357 @@ - type.]]> + type.]]> + + global.]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - global.]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8304,11 +10428,11 @@ - + - + - + @@ -8334,20 +10458,20 @@ - + - + - + - + - + - + @@ -8379,6 +10503,24 @@ + + + + + + + + + + + + + + + + + + @@ -8397,20 +10539,20 @@ - + - + - + - + - + - + @@ -8442,15 +10584,6 @@ - - - - - - - - - @@ -8583,6 +10716,15 @@ + + + + + + + + + @@ -8592,6 +10734,15 @@ + + + + + + + + + @@ -8619,6 +10770,15 @@ + + + + + + + + + @@ -8628,6 +10788,24 @@ + + + + + + + + + + + + + + + + + + @@ -8646,6 +10824,15 @@ + + + + + + + + + @@ -8664,6 +10851,15 @@ + + + + + + + + + @@ -8682,6 +10878,15 @@ + + + + + + + + + @@ -8745,6 +10950,15 @@ + + + + + + + + + @@ -8790,6 +11004,24 @@ + + + + + + + + + + + + + + + + + + @@ -8847,6 +11079,15 @@ + + + + + + + + + @@ -8955,6 +11196,24 @@ + + + '}` or `>`?]]> + + '}' ou '>' ?]]> + + + + + + + + + + + + + @@ -8964,6 +11223,24 @@ + + + + + + + + + + + + + + + + + + @@ -8973,6 +11250,15 @@ + + + + + + + + + @@ -8991,6 +11277,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9072,6 +11385,15 @@ + + + + + + + + + @@ -9081,6 +11403,15 @@ + + + + + + + + + @@ -9099,6 +11430,15 @@ + + + + + + + + + @@ -9135,6 +11475,24 @@ + + + + + + + + + + + + + + + + + + @@ -9162,38 +11520,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9225,6 +11610,15 @@ + + + + + + + + + @@ -9234,11 +11628,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9252,6 +11673,15 @@ + + + + + + + + + @@ -9279,6 +11709,15 @@ + + + + + + + + + @@ -9297,6 +11736,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9324,6 +11790,15 @@ + + + + + + + + + @@ -9441,6 +11916,15 @@ + + + + + + + + + @@ -9450,6 +11934,15 @@ + + + + + + + + + @@ -9468,6 +11961,15 @@ + + + + + + + + + @@ -9477,6 +11979,15 @@ + + + + + + + + + @@ -9495,6 +12006,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9504,6 +12042,15 @@ + + + + + + + + + @@ -9513,11 +12060,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9531,6 +12096,15 @@ + + + + + + + + + @@ -9543,6 +12117,15 @@ + + + + + + + + + @@ -9609,6 +12192,15 @@ + + + + + + + + + @@ -9621,38 +12213,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9738,20 +12330,20 @@ - + - + - + - + - + - + @@ -9765,15 +12357,6 @@ - - - - - - - - - @@ -9792,83 +12375,92 @@ - + - + - + - + - ()' instead.]]> + - ()' à la place.]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9891,6 +12483,15 @@ + + + + + + + + + @@ -9957,6 +12558,15 @@ + + + + + + + + + @@ -10047,74 +12657,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl index 07839d2447506..dd6b2eddde18d 100644 --- a/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -48,6 +48,24 @@ + + + + + + + + + + + + + + + + + + @@ -84,6 +102,15 @@ + + + + + + + + + @@ -105,15 +132,6 @@ - - - - - - - - - @@ -204,6 +222,15 @@ + + + + + + + + + @@ -213,11 +240,11 @@ - + - + - + @@ -270,15 +297,6 @@ - - - - - - - - - @@ -414,6 +432,15 @@ + + + + + + + + + @@ -423,6 +450,15 @@ + + + + + + + + + @@ -474,15 +510,6 @@ - - - - - - - - - @@ -501,6 +528,24 @@ + + + + + + + + + + + + + + + + + + @@ -573,6 +618,15 @@ + + + + + + + + + @@ -621,6 +675,24 @@ + + + + + + + + + + + + + + + + + + @@ -740,10 +812,13 @@ - + - + + + + @@ -774,15 +849,6 @@ - - - - - - - - - @@ -801,6 +867,15 @@ + + + + + + + + + @@ -939,6 +1014,15 @@ + + + + + + + + + @@ -966,6 +1050,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -975,6 +1086,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -993,6 +1131,15 @@ + + + + + + + + + @@ -1023,6 +1170,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1044,6 +1218,15 @@ + + + + + + + + + @@ -1053,6 +1236,15 @@ + + + + + + + + + @@ -1098,6 +1290,24 @@ + + + + + + + + + + + + + + + + + + @@ -1161,6 +1371,15 @@ + + + + + + + + + @@ -1170,6 +1389,15 @@ + + + + + + + + + @@ -1179,6 +1407,15 @@ + + + + + + + + + @@ -1197,11 +1434,11 @@ - + - + - + @@ -1242,11 +1479,20 @@ - + + + + + + + + + + - + - + @@ -1269,11 +1515,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1323,6 +1596,15 @@ + + + + + + + + + @@ -1332,6 +1614,15 @@ + + + + + + + + + @@ -1386,6 +1677,15 @@ + + + + + + + + + @@ -1395,6 +1695,15 @@ + + + + + + + + + @@ -1404,9 +1713,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1521,9 +1848,9 @@ - + - + @@ -1539,11 +1866,11 @@ - + - + - + @@ -1602,6 +1929,24 @@ + + + + + + + + + + + + + + + + + + @@ -1647,6 +1992,24 @@ + + + + + + + + + + + + + + + + + + @@ -1686,6 +2049,24 @@ + + + + + + + + + + + + + + + + + + @@ -1731,11 +2112,11 @@ - + - + - + @@ -1767,6 +2148,15 @@ + + + + + + + + + @@ -1812,6 +2202,15 @@ + + + + + + + + + @@ -1833,6 +2232,15 @@ + + + + + + + + + @@ -1842,6 +2250,15 @@ + + + + + + + + + @@ -1860,6 +2277,15 @@ + + + + + + + + + @@ -1878,11 +2304,20 @@ - + - + - + + + + + + + + + + @@ -1923,20 +2358,20 @@ - + - + - + - + - + - + @@ -1968,6 +2403,15 @@ + + + + + + + + + @@ -2025,6 +2469,15 @@ + + + + + + + + + @@ -2061,6 +2514,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2115,15 +2640,6 @@ - - - - - - - - - @@ -2151,20 +2667,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2211,6 +2745,15 @@ + + + + + + + + + @@ -2247,11 +2790,11 @@ - + - + - + @@ -2382,29 +2925,29 @@ - + - + - + - + - + - + - + - + - + @@ -2511,6 +3054,15 @@ + + + + + + + + + @@ -2547,6 +3099,15 @@ + + + + + + + + + @@ -2556,6 +3117,15 @@ + + + + + + + + + @@ -2592,6 +3162,24 @@ + + + + + + + + + + + + + + + + + + @@ -2601,6 +3189,15 @@ + + + + + + + + + @@ -2646,6 +3243,15 @@ + + + + + + + + + @@ -2664,52 +3270,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2718,6 +3396,15 @@ + + + + + + + + + @@ -2736,6 +3423,24 @@ + + + + + + + + + + + + + + + + + + @@ -2745,6 +3450,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2784,6 +3516,24 @@ + + + + + + + + + + + + + + + + + + @@ -2811,6 +3561,15 @@ + + + + + + + + + @@ -2886,6 +3645,24 @@ + + + + + + + + + + + + + + + + + + @@ -2931,6 +3708,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}'?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2970,6 +3810,15 @@ + + + + + + + + + @@ -2979,6 +3828,15 @@ + + + + + + + + + @@ -3105,15 +3963,6 @@ - - - - - - - - - @@ -3216,29 +4065,29 @@ - + - + - + - + - + - + - + - + - + @@ -3261,6 +4110,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3279,6 +4164,15 @@ + + + + + + + + + @@ -3297,6 +4191,15 @@ + + + + + + + + + @@ -3315,6 +4218,15 @@ + + + + + + + + + @@ -3324,6 +4236,15 @@ + + + + + + + + + @@ -3351,27 +4272,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3462,6 +4401,15 @@ + + + + + + + + + @@ -3570,11 +4518,11 @@ - + - + - + @@ -3590,10 +4538,13 @@ - + - + + + + @@ -3726,6 +4677,15 @@ + + + + + + + + + @@ -3807,6 +4767,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3861,6 +4857,15 @@ + + + + + + + + + @@ -3870,11 +4875,11 @@ - + - + - + @@ -3888,11 +4893,11 @@ - + - + - + @@ -3984,6 +4989,24 @@ + + + + + + + + + + + + + + + + + + @@ -3993,29 +5016,29 @@ - + - + - + - + - + - + - + - + - + @@ -4110,6 +5133,15 @@ + + + + + + + + + @@ -4119,6 +5151,15 @@ + + + + + + + + + @@ -4146,11 +5187,11 @@ - + - + - + @@ -4191,15 +5232,6 @@ - - - - - - - - - @@ -4254,6 +5286,15 @@ + + + + + + + + + @@ -4293,6 +5334,15 @@ + + + + + + + + + @@ -4311,6 +5361,15 @@ + + + + + + + + + @@ -4374,6 +5433,15 @@ + + + + + + + + + @@ -4425,6 +5493,15 @@ + + + + + + + + + @@ -4491,15 +5568,6 @@ - - - - - - - - - @@ -4566,6 +5634,15 @@ + + + + + + + + + @@ -4839,6 +5916,15 @@ + + + + + + + + + @@ -4962,6 +6048,15 @@ + + + + + + + + + @@ -5028,6 +6123,15 @@ + + + + + + + + + @@ -5202,6 +6306,15 @@ + + + + + + + + + @@ -5265,11 +6378,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -5301,6 +6441,15 @@ + + + + + + + + + @@ -5319,24 +6468,24 @@ - + - + - + - - - - + - + - + + + + @@ -5376,6 +6525,15 @@ + + + + + + + + + @@ -5412,6 +6570,15 @@ + + + + + + + + + @@ -5496,90 +6663,198 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5658,6 +6933,15 @@ + + + + + + + + + @@ -5733,6 +7017,15 @@ + + + + + + + + + @@ -5760,6 +7053,15 @@ + + + + + + + + + @@ -5805,6 +7107,15 @@ + + + + + + + + + @@ -5832,6 +7143,15 @@ + + + + + + + + + @@ -5886,11 +7206,11 @@ - + - + - + @@ -5958,6 +7278,15 @@ + + + + + + + + + @@ -5967,6 +7296,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6165,6 +7521,24 @@ + + + + + + + + + + + + + + + + + + @@ -6237,6 +7611,15 @@ + + + + + + + + + @@ -6246,6 +7629,15 @@ + + + + + + + + + @@ -6255,6 +7647,15 @@ + + + + + + + + + @@ -6273,6 +7674,15 @@ + + + + + + + + + @@ -6282,6 +7692,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6291,6 +7746,15 @@ + + + + + + + + + @@ -6318,6 +7782,24 @@ + + + + + + + + + + + + + + + + + + @@ -6390,15 +7872,6 @@ - - - - - - - - - @@ -6444,6 +7917,24 @@ + + + + + + + + + + + + + + + + + + @@ -6465,20 +7956,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6492,6 +8010,24 @@ + + + + + + + + + + + + + + + + + + @@ -6564,6 +8100,15 @@ + + + + + + + + + @@ -6618,6 +8163,24 @@ + + + + + + + + + + + + + + + + + + @@ -6771,6 +8334,15 @@ + + + + + + + + + @@ -6789,6 +8361,15 @@ + + + + + + + + + @@ -6807,6 +8388,15 @@ + + + + + + + + + @@ -6834,18 +8424,6 @@ - - - - - - - - - - - - @@ -6864,6 +8442,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6873,6 +8478,15 @@ + + + + + + + + + @@ -6891,6 +8505,15 @@ + + + + + + + + + @@ -6900,6 +8523,15 @@ + + + + + + + + + @@ -7077,6 +8709,24 @@ + + + + + + + + + + + + + + + + + + @@ -7086,6 +8736,15 @@ + + + + + + + + + @@ -7371,6 +9030,24 @@ + + + + + + + + + + + + + + + + + + @@ -7443,11 +9120,11 @@ - + - + - + @@ -7479,11 +9156,11 @@ - + - + - + @@ -7497,6 +9174,24 @@ + + + + + + + + + + + + + + + + + + @@ -7506,15 +9201,12 @@ - + - + - + - - - @@ -7527,6 +9219,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7572,6 +9291,24 @@ + + + + + + + + + + + + + + + + + + @@ -7701,15 +9438,12 @@ - + - + - - - @@ -7776,6 +9510,15 @@ + + + + + + + + + @@ -7785,6 +9528,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -7803,6 +9570,24 @@ + + + + + + + + + + + + + + + + + + @@ -7848,6 +9633,15 @@ + + + + + + + + + @@ -7866,6 +9660,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7884,6 +9714,15 @@ + + + + + + + + + @@ -7905,11 +9744,29 @@ - + + + + + + + + + + - + - + + + + + + + + + + @@ -7923,6 +9780,24 @@ + + + + + + + + + + + + + + + + + + @@ -7941,6 +9816,15 @@ + + + + + + + + + @@ -7968,6 +9852,15 @@ + + + + + + + + + @@ -7977,11 +9870,20 @@ - + - + - + + + + + + + + + + @@ -8034,20 +9936,44 @@ + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + - + @@ -8061,6 +9987,24 @@ + + + + + + + + + + + + + + + + + + @@ -8099,177 +10043,357 @@ - type.]]> + type.]]> + + .]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - .]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8292,11 +10416,11 @@ - + - + - + @@ -8322,20 +10446,20 @@ - + - + - + - + - + - + @@ -8367,6 +10491,24 @@ + + + + + + + + + + + + + + + + + + @@ -8385,20 +10527,20 @@ - + - + - + - + - + - + @@ -8430,15 +10572,6 @@ - - - - - - - - - @@ -8571,6 +10704,15 @@ + + + + + + + + + @@ -8580,6 +10722,15 @@ + + + + + + + + + @@ -8607,6 +10758,15 @@ + + + + + + + + + @@ -8616,6 +10776,24 @@ + + + + + + + + + + + + + + + + + + @@ -8634,6 +10812,15 @@ + + + + + + + + + @@ -8652,6 +10839,15 @@ + + + + + + + + + @@ -8670,6 +10866,15 @@ + + + + + + + + + @@ -8733,6 +10938,15 @@ + + + + + + + + + @@ -8778,6 +10992,24 @@ + + + + + + + + + + + + + + + + + + @@ -8835,6 +11067,15 @@ + + + + + + + + + @@ -8943,6 +11184,24 @@ + + + '}` or `>`?]]> + + '}` o `>`?]]> + + + + + + + + + + + + + @@ -8952,6 +11211,24 @@ + + + + + + + + + + + + + + + + + + @@ -8961,6 +11238,15 @@ + + + + + + + + + @@ -8979,6 +11265,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9060,6 +11373,15 @@ + + + + + + + + + @@ -9069,6 +11391,15 @@ + + + + + + + + + @@ -9087,6 +11418,15 @@ + + + + + + + + + @@ -9123,6 +11463,24 @@ + + + + + + + + + + + + + + + + + + @@ -9150,38 +11508,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9213,6 +11598,15 @@ + + + + + + + + + @@ -9222,11 +11616,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9240,6 +11661,15 @@ + + + + + + + + + @@ -9267,6 +11697,15 @@ + + + + + + + + + @@ -9285,6 +11724,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9312,6 +11778,15 @@ + + + + + + + + + @@ -9429,6 +11904,15 @@ + + + + + + + + + @@ -9438,6 +11922,15 @@ + + + + + + + + + @@ -9456,6 +11949,15 @@ + + + + + + + + + @@ -9465,6 +11967,15 @@ + + + + + + + + + @@ -9483,6 +11994,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9492,6 +12030,15 @@ + + + + + + + + + @@ -9501,11 +12048,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9519,6 +12084,15 @@ + + + + + + + + + @@ -9531,6 +12105,15 @@ + + + + + + + + + @@ -9597,6 +12180,15 @@ + + + + + + + + + @@ -9609,38 +12201,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9726,20 +12318,20 @@ - + - + - + - + - + - + @@ -9753,15 +12345,6 @@ - - - - - - - - - @@ -9780,83 +12363,92 @@ - + - + - + - + - ()' instead.]]> + - ()'.]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9879,6 +12471,15 @@ + + + + + + + + + @@ -9945,6 +12546,15 @@ + + + + + + + + + @@ -10035,74 +12645,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl index 0988b700922f2..61452185ec6e1 100644 --- a/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -48,6 +48,24 @@ + + + + + + + + + + + + + + + + + + @@ -84,6 +102,15 @@ + + + + + + + + + @@ -105,15 +132,6 @@ - - - - - - - - - @@ -204,6 +222,15 @@ + + + + + + + + + @@ -213,11 +240,11 @@ - + - + - + @@ -270,15 +297,6 @@ - - - - - - - - - @@ -414,6 +432,15 @@ + + + + + + + + + @@ -423,6 +450,15 @@ + + + + + + + + + @@ -474,15 +510,6 @@ - - - - - - - - - @@ -501,6 +528,24 @@ + + + + + + + + + + + + + + + + + + @@ -573,6 +618,15 @@ + + + + + + + + + @@ -621,6 +675,24 @@ + + + + + + + + + + + + + + + + + + @@ -740,10 +812,13 @@ - + - + + + + @@ -774,15 +849,6 @@ - - - - - - - - - @@ -801,6 +867,15 @@ + + + + + + + + + @@ -939,6 +1014,15 @@ + + + + + + + + + @@ -966,6 +1050,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -975,6 +1086,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -993,6 +1131,15 @@ + + + + + + + + + @@ -1023,6 +1170,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1044,6 +1218,15 @@ + + + + + + + + + @@ -1053,6 +1236,15 @@ + + + + + + + + + @@ -1098,6 +1290,24 @@ + + + + + + + + + + + + + + + + + + @@ -1161,6 +1371,15 @@ + + + + + + + + + @@ -1170,6 +1389,15 @@ + + + + + + + + + @@ -1179,6 +1407,15 @@ + + + + + + + + + @@ -1197,11 +1434,11 @@ - + - + - + @@ -1242,11 +1479,20 @@ - + + + + + + + + + + - + - + @@ -1269,11 +1515,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1323,6 +1596,15 @@ + + + + + + + + + @@ -1332,6 +1614,15 @@ + + + + + + + + + @@ -1386,6 +1677,15 @@ + + + + + + + + + @@ -1395,6 +1695,15 @@ + + + + + + + + + @@ -1404,9 +1713,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1521,11 +1848,11 @@ - + - + - + @@ -1539,11 +1866,11 @@ - + - + - + @@ -1602,6 +1929,24 @@ + + + + + + + + + + + + + + + + + + @@ -1647,6 +1992,24 @@ + + + + + + + + + + + + + + + + + + @@ -1686,6 +2049,24 @@ + + + + + + + + + + + + + + + + + + @@ -1731,11 +2112,11 @@ - + - + - + @@ -1767,6 +2148,15 @@ + + + + + + + + + @@ -1812,6 +2202,15 @@ + + + + + + + + + @@ -1833,6 +2232,15 @@ + + + + + + + + + @@ -1842,6 +2250,15 @@ + + + + + + + + + @@ -1860,6 +2277,15 @@ + + + + + + + + + @@ -1878,11 +2304,20 @@ - + - + - + + + + + + + + + + @@ -1923,20 +2358,20 @@ - + - + - + - + - + - + @@ -1968,6 +2403,15 @@ + + + + + + + + + @@ -2025,6 +2469,15 @@ + + + + + + + + + @@ -2061,6 +2514,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2115,15 +2640,6 @@ - - - - - - - - - @@ -2151,20 +2667,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2211,6 +2745,15 @@ + + + + + + + + + @@ -2247,11 +2790,11 @@ - + - + - + @@ -2382,29 +2925,29 @@ - + - + - + - + - + - + - + - + - + @@ -2511,6 +3054,15 @@ + + + + + + + + + @@ -2547,6 +3099,15 @@ + + + + + + + + + @@ -2556,6 +3117,15 @@ + + + + + + + + + @@ -2592,6 +3162,24 @@ + + + + + + + + + + + + + + + + + + @@ -2601,6 +3189,15 @@ + + + + + + + + + @@ -2646,6 +3243,15 @@ + + + + + + + + + @@ -2664,52 +3270,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2718,6 +3396,15 @@ + + + + + + + + + @@ -2736,6 +3423,24 @@ + + + + + + + + + + + + + + + + + + @@ -2745,6 +3450,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2784,6 +3516,24 @@ + + + + + + + + + + + + + + + + + + @@ -2811,6 +3561,15 @@ + + + + + + + + + @@ -2886,6 +3645,24 @@ + + + + + + + + + + + + + + + + + + @@ -2931,6 +3708,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}' に制約されることを意図していましたか?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2970,6 +3810,15 @@ + + + + + + + + + @@ -2979,6 +3828,15 @@ + + + + + + + + + @@ -3105,15 +3963,6 @@ - - - - - - - - - @@ -3216,29 +4065,29 @@ - + - + - + - + - + - + - + - + - + @@ -3261,6 +4110,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3279,6 +4164,15 @@ + + + + + + + + + @@ -3297,6 +4191,15 @@ + + + + + + + + + @@ -3315,6 +4218,15 @@ + + + + + + + + + @@ -3324,6 +4236,15 @@ + + + + + + + + + @@ -3351,27 +4272,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3462,6 +4401,15 @@ + + + + + + + + + @@ -3570,11 +4518,11 @@ - + - + - + @@ -3590,10 +4538,13 @@ - + - + + + + @@ -3726,6 +4677,15 @@ + + + + + + + + + @@ -3807,6 +4767,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3861,6 +4857,15 @@ + + + + + + + + + @@ -3870,11 +4875,11 @@ - + - + - + @@ -3888,11 +4893,11 @@ - + - + - + @@ -3984,6 +4989,24 @@ + + + + + + + + + + + + + + + + + + @@ -3993,29 +5016,29 @@ - + - + - + - + - + - + - + - + - + @@ -4110,6 +5133,15 @@ + + + + + + + + + @@ -4119,6 +5151,15 @@ + + + + + + + + + @@ -4146,11 +5187,11 @@ - + - + - + @@ -4191,15 +5232,6 @@ - - - - - - - - - @@ -4254,6 +5286,15 @@ + + + + + + + + + @@ -4293,6 +5334,15 @@ + + + + + + + + + @@ -4311,6 +5361,15 @@ + + + + + + + + + @@ -4374,6 +5433,15 @@ + + + + + + + + + @@ -4425,6 +5493,15 @@ + + + + + + + + + @@ -4491,15 +5568,6 @@ - - - - - - - - - @@ -4566,6 +5634,15 @@ + + + + + + + + + @@ -4839,6 +5916,15 @@ + + + + + + + + + @@ -4962,6 +6048,15 @@ + + + + + + + + + @@ -5028,6 +6123,15 @@ + + + + + + + + + @@ -5202,6 +6306,15 @@ + + + + + + + + + @@ -5265,11 +6378,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -5301,6 +6441,15 @@ + + + + + + + + + @@ -5319,24 +6468,24 @@ - + - + - + - - - - + - + - + + + + @@ -5376,6 +6525,15 @@ + + + + + + + + + @@ -5412,6 +6570,15 @@ + + + + + + + + + @@ -5496,90 +6663,198 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5658,6 +6933,15 @@ + + + + + + + + + @@ -5733,6 +7017,15 @@ + + + + + + + + + @@ -5760,6 +7053,15 @@ + + + + + + + + + @@ -5805,6 +7107,15 @@ + + + + + + + + + @@ -5832,6 +7143,15 @@ + + + + + + + + + @@ -5886,11 +7206,11 @@ - + - + - + @@ -5958,6 +7278,15 @@ + + + + + + + + + @@ -5967,6 +7296,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6165,6 +7521,24 @@ + + + + + + + + + + + + + + + + + + @@ -6237,6 +7611,15 @@ + + + + + + + + + @@ -6246,6 +7629,15 @@ + + + + + + + + + @@ -6255,6 +7647,15 @@ + + + + + + + + + @@ -6273,6 +7674,15 @@ + + + + + + + + + @@ -6282,6 +7692,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6291,6 +7746,15 @@ + + + + + + + + + @@ -6318,6 +7782,24 @@ + + + + + + + + + + + + + + + + + + @@ -6390,15 +7872,6 @@ - - - - - - - - - @@ -6444,6 +7917,24 @@ + + + + + + + + + + + + + + + + + + @@ -6465,20 +7956,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6492,6 +8010,24 @@ + + + + + + + + + + + + + + + + + + @@ -6564,6 +8100,15 @@ + + + + + + + + + @@ -6618,6 +8163,24 @@ + + + + + + + + + + + + + + + + + + @@ -6771,6 +8334,15 @@ + + + + + + + + + @@ -6789,6 +8361,15 @@ + + + + + + + + + @@ -6807,6 +8388,15 @@ + + + + + + + + + @@ -6834,18 +8424,6 @@ - - - - - - - - - - - - @@ -6864,6 +8442,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6873,6 +8478,15 @@ + + + + + + + + + @@ -6891,6 +8505,15 @@ + + + + + + + + + @@ -6900,6 +8523,15 @@ + + + + + + + + + @@ -7077,6 +8709,24 @@ + + + + + + + + + + + + + + + + + + @@ -7086,6 +8736,15 @@ + + + + + + + + + @@ -7371,6 +9030,24 @@ + + + + + + + + + + + + + + + + + + @@ -7443,11 +9120,11 @@ - + - + - + @@ -7479,11 +9156,11 @@ - + - + - + @@ -7497,6 +9174,24 @@ + + + + + + + + + + + + + + + + + + @@ -7506,15 +9201,12 @@ - + - + - + - - - @@ -7527,6 +9219,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7572,6 +9291,24 @@ + + + + + + + + + + + + + + + + + + @@ -7701,15 +9438,12 @@ - + - + - + - - - @@ -7776,6 +9510,15 @@ + + + + + + + + + @@ -7785,6 +9528,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -7803,6 +9570,24 @@ + + + + + + + + + + + + + + + + + + @@ -7848,6 +9633,15 @@ + + + + + + + + + @@ -7866,6 +9660,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7884,6 +9714,15 @@ + + + + + + + + + @@ -7905,11 +9744,29 @@ - + + + + + + + + + + - + - + + + + + + + + + + @@ -7923,6 +9780,24 @@ + + + + + + + + + + + + + + + + + + @@ -7941,6 +9816,15 @@ + + + + + + + + + @@ -7968,6 +9852,15 @@ + + + + + + + + + @@ -7977,11 +9870,20 @@ - + - + - + + + + + + + + + + @@ -8034,20 +9936,44 @@ + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + - + @@ -8061,6 +9987,24 @@ + + + + + + + + + + + + + + + + + + @@ -8099,177 +10043,357 @@ - type.]]> + type.]]> + + 型である必要があります。]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 型である必要があります。]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8292,11 +10416,11 @@ - + - + - + @@ -8322,20 +10446,20 @@ - + - + - + - + - + - + @@ -8367,6 +10491,24 @@ + + + + + + + + + + + + + + + + + + @@ -8385,20 +10527,20 @@ - + - + - + - + - + - + @@ -8430,15 +10572,6 @@ - - - - - - - - - @@ -8571,6 +10704,15 @@ + + + + + + + + + @@ -8580,6 +10722,15 @@ + + + + + + + + + @@ -8607,6 +10758,15 @@ + + + + + + + + + @@ -8616,6 +10776,24 @@ + + + + + + + + + + + + + + + + + + @@ -8634,6 +10812,15 @@ + + + + + + + + + @@ -8652,6 +10839,15 @@ + + + + + + + + + @@ -8670,6 +10866,15 @@ + + + + + + + + + @@ -8733,6 +10938,15 @@ + + + + + + + + + @@ -8778,6 +10992,24 @@ + + + + + + + + + + + + + + + + + + @@ -8835,6 +11067,15 @@ + + + + + + + + + @@ -8943,6 +11184,24 @@ + + + '}` or `>`?]]> + + '}` または `>` を意図していましたか?]]> + + + + + + + + + + + + + @@ -8952,6 +11211,24 @@ + + + + + + + + + + + + + + + + + + @@ -8961,6 +11238,15 @@ + + + + + + + + + @@ -8979,6 +11265,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9060,6 +11373,15 @@ + + + + + + + + + @@ -9069,6 +11391,15 @@ + + + + + + + + + @@ -9087,6 +11418,15 @@ + + + + + + + + + @@ -9123,6 +11463,24 @@ + + + + + + + + + + + + + + + + + + @@ -9150,38 +11508,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9213,6 +11598,15 @@ + + + + + + + + + @@ -9222,11 +11616,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9240,6 +11661,15 @@ + + + + + + + + + @@ -9267,6 +11697,15 @@ + + + + + + + + + @@ -9285,6 +11724,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9312,6 +11778,15 @@ + + + + + + + + + @@ -9429,6 +11904,15 @@ + + + + + + + + + @@ -9438,6 +11922,15 @@ + + + + + + + + + @@ -9456,6 +11949,15 @@ + + + + + + + + + @@ -9465,6 +11967,15 @@ + + + + + + + + + @@ -9483,6 +11994,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9492,6 +12030,15 @@ + + + + + + + + + @@ -9501,11 +12048,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9519,6 +12084,15 @@ + + + + + + + + + @@ -9531,6 +12105,15 @@ + + + + + + + + + @@ -9597,6 +12180,15 @@ + + + + + + + + + @@ -9609,38 +12201,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9726,20 +12318,20 @@ - + - + - + - + - + - + @@ -9753,15 +12345,6 @@ - - - - - - - - - @@ -9780,83 +12363,92 @@ - + - + - + - + - ()' instead.]]> + - ()' を使用してください。]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9879,6 +12471,15 @@ + + + + + + + + + @@ -9945,6 +12546,15 @@ + + + + + + + + + @@ -10035,74 +12645,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl index a8cc5abc678b2..f0ab463a4d7e6 100644 --- a/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -48,6 +48,24 @@ + + + + + + + + + + + + + + + + + + @@ -84,6 +102,15 @@ + + + + + + + + + @@ -105,15 +132,6 @@ - - - - - - - - - @@ -204,6 +222,15 @@ + + + + + + + + + @@ -213,11 +240,11 @@ - + - + - + @@ -270,15 +297,6 @@ - - - - - - - - - @@ -414,6 +432,15 @@ + + + + + + + + + @@ -423,6 +450,15 @@ + + + + + + + + + @@ -474,15 +510,6 @@ - - - - - - - - - @@ -501,6 +528,24 @@ + + + + + + + + + + + + + + + + + + @@ -573,6 +618,15 @@ + + + + + + + + + @@ -621,6 +675,24 @@ + + + + + + + + + + + + + + + + + + @@ -740,10 +812,13 @@ - + - + + + + @@ -774,15 +849,6 @@ - - - - - - - - - @@ -801,6 +867,15 @@ + + + + + + + + + @@ -939,6 +1014,15 @@ + + + + + + + + + @@ -966,6 +1050,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -975,6 +1086,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -993,6 +1131,15 @@ + + + + + + + + + @@ -1023,6 +1170,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1044,6 +1218,15 @@ + + + + + + + + + @@ -1053,6 +1236,15 @@ + + + + + + + + + @@ -1098,6 +1290,24 @@ + + + + + + + + + + + + + + + + + + @@ -1161,6 +1371,15 @@ + + + + + + + + + @@ -1170,6 +1389,15 @@ + + + + + + + + + @@ -1179,6 +1407,15 @@ + + + + + + + + + @@ -1197,11 +1434,11 @@ - + - + - + @@ -1242,11 +1479,20 @@ - + + + + + + + + + + - + - + @@ -1269,11 +1515,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1323,6 +1596,15 @@ + + + + + + + + + @@ -1332,6 +1614,15 @@ + + + + + + + + + @@ -1386,6 +1677,15 @@ + + + + + + + + + @@ -1395,6 +1695,15 @@ + + + + + + + + + @@ -1404,9 +1713,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1521,9 +1848,9 @@ - + - + @@ -1539,11 +1866,11 @@ - + - + - + @@ -1602,6 +1929,24 @@ + + + + + + + + + + + + + + + + + + @@ -1647,6 +1992,24 @@ + + + + + + + + + + + + + + + + + + @@ -1686,6 +2049,24 @@ + + + + + + + + + + + + + + + + + + @@ -1731,11 +2112,11 @@ - + - + - + @@ -1767,6 +2148,15 @@ + + + + + + + + + @@ -1812,6 +2202,15 @@ + + + + + + + + + @@ -1833,6 +2232,15 @@ + + + + + + + + + @@ -1842,6 +2250,15 @@ + + + + + + + + + @@ -1860,6 +2277,15 @@ + + + + + + + + + @@ -1878,11 +2304,20 @@ - + - + - + + + + + + + + + + @@ -1923,20 +2358,20 @@ - + - + - + - + - + - + @@ -1968,6 +2403,15 @@ + + + + + + + + + @@ -2025,6 +2469,15 @@ + + + + + + + + + @@ -2061,6 +2514,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2115,15 +2640,6 @@ - - - - - - - - - @@ -2151,20 +2667,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2211,6 +2745,15 @@ + + + + + + + + + @@ -2247,11 +2790,11 @@ - + - + - + @@ -2382,29 +2925,29 @@ - + - + - + - + - + - + - + - + - + @@ -2511,6 +3054,15 @@ + + + + + + + + + @@ -2547,6 +3099,15 @@ + + + + + + + + + @@ -2556,6 +3117,15 @@ + + + + + + + + + @@ -2592,6 +3162,24 @@ + + + + + + + + + + + + + + + + + + @@ -2601,6 +3189,15 @@ + + + + + + + + + @@ -2646,6 +3243,15 @@ + + + + + + + + + @@ -2664,52 +3270,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2718,6 +3396,15 @@ + + + + + + + + + @@ -2736,6 +3423,24 @@ + + + + + + + + + + + + + + + + + + @@ -2745,6 +3450,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2784,6 +3516,24 @@ + + + + + + + + + + + + + + + + + + @@ -2811,6 +3561,15 @@ + + + + + + + + + @@ -2886,6 +3645,24 @@ + + + + + + + + + + + + + + + + + + @@ -2931,6 +3708,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}' 형식으로 제한하시겠습니까?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2970,6 +3810,15 @@ + + + + + + + + + @@ -2979,6 +3828,15 @@ + + + + + + + + + @@ -3105,15 +3963,6 @@ - - - - - - - - - @@ -3216,29 +4065,29 @@ - + - + - + - + - + - + - + - + - + @@ -3261,6 +4110,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3279,6 +4164,15 @@ + + + + + + + + + @@ -3297,6 +4191,15 @@ + + + + + + + + + @@ -3315,6 +4218,15 @@ + + + + + + + + + @@ -3324,6 +4236,15 @@ + + + + + + + + + @@ -3351,27 +4272,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3462,6 +4401,15 @@ + + + + + + + + + @@ -3570,11 +4518,11 @@ - + - + - + @@ -3590,10 +4538,13 @@ - + - + + + + @@ -3726,6 +4677,15 @@ + + + + + + + + + @@ -3807,6 +4767,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3861,6 +4857,15 @@ + + + + + + + + + @@ -3870,11 +4875,11 @@ - + - + - + @@ -3888,11 +4893,11 @@ - + - + - + @@ -3984,6 +4989,24 @@ + + + + + + + + + + + + + + + + + + @@ -3993,29 +5016,29 @@ - + - + - + - + - + - + - + - + - + @@ -4110,6 +5133,15 @@ + + + + + + + + + @@ -4119,6 +5151,15 @@ + + + + + + + + + @@ -4146,11 +5187,11 @@ - + - + - + @@ -4191,15 +5232,6 @@ - - - - - - - - - @@ -4254,6 +5286,15 @@ + + + + + + + + + @@ -4293,6 +5334,15 @@ + + + + + + + + + @@ -4311,6 +5361,15 @@ + + + + + + + + + @@ -4374,6 +5433,15 @@ + + + + + + + + + @@ -4425,6 +5493,15 @@ + + + + + + + + + @@ -4491,15 +5568,6 @@ - - - - - - - - - @@ -4566,6 +5634,15 @@ + + + + + + + + + @@ -4839,6 +5916,15 @@ + + + + + + + + + @@ -4962,6 +6048,15 @@ + + + + + + + + + @@ -5028,6 +6123,15 @@ + + + + + + + + + @@ -5202,6 +6306,15 @@ + + + + + + + + + @@ -5265,11 +6378,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -5301,6 +6441,15 @@ + + + + + + + + + @@ -5319,24 +6468,24 @@ - + - + - + - - - - + - + - + + + + @@ -5376,6 +6525,15 @@ + + + + + + + + + @@ -5412,6 +6570,15 @@ + + + + + + + + + @@ -5496,90 +6663,198 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5658,6 +6933,15 @@ + + + + + + + + + @@ -5733,6 +7017,15 @@ + + + + + + + + + @@ -5760,6 +7053,15 @@ + + + + + + + + + @@ -5805,6 +7107,15 @@ + + + + + + + + + @@ -5832,6 +7143,15 @@ + + + + + + + + + @@ -5886,11 +7206,11 @@ - + - + - + @@ -5958,6 +7278,15 @@ + + + + + + + + + @@ -5967,6 +7296,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6165,6 +7521,24 @@ + + + + + + + + + + + + + + + + + + @@ -6237,6 +7611,15 @@ + + + + + + + + + @@ -6246,6 +7629,15 @@ + + + + + + + + + @@ -6255,6 +7647,15 @@ + + + + + + + + + @@ -6273,6 +7674,15 @@ + + + + + + + + + @@ -6282,6 +7692,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6291,6 +7746,15 @@ + + + + + + + + + @@ -6318,6 +7782,24 @@ + + + + + + + + + + + + + + + + + + @@ -6390,15 +7872,6 @@ - - - - - - - - - @@ -6444,6 +7917,24 @@ + + + + + + + + + + + + + + + + + + @@ -6465,20 +7956,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6492,6 +8010,24 @@ + + + + + + + + + + + + + + + + + + @@ -6564,6 +8100,15 @@ + + + + + + + + + @@ -6618,6 +8163,24 @@ + + + + + + + + + + + + + + + + + + @@ -6771,6 +8334,15 @@ + + + + + + + + + @@ -6789,6 +8361,15 @@ + + + + + + + + + @@ -6807,6 +8388,15 @@ + + + + + + + + + @@ -6834,18 +8424,6 @@ - - - - - - - - - - - - @@ -6864,6 +8442,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6873,6 +8478,15 @@ + + + + + + + + + @@ -6891,6 +8505,15 @@ + + + + + + + + + @@ -6900,6 +8523,15 @@ + + + + + + + + + @@ -7077,6 +8709,24 @@ + + + + + + + + + + + + + + + + + + @@ -7086,6 +8736,15 @@ + + + + + + + + + @@ -7371,6 +9030,24 @@ + + + + + + + + + + + + + + + + + + @@ -7443,11 +9120,11 @@ - + - + - + @@ -7479,11 +9156,11 @@ - + - + - + @@ -7497,6 +9174,24 @@ + + + + + + + + + + + + + + + + + + @@ -7506,15 +9201,12 @@ - + - + - + - - - @@ -7527,6 +9219,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7572,6 +9291,24 @@ + + + + + + + + + + + + + + + + + + @@ -7701,15 +9438,12 @@ - + - + - - - @@ -7776,6 +9510,15 @@ + + + + + + + + + @@ -7785,6 +9528,24 @@ + + + + + + + + + + + + + + + + + + @@ -7803,6 +9564,24 @@ + + + + + + + + + + + + + + + + + + @@ -7848,6 +9627,15 @@ + + + + + + + + + @@ -7866,6 +9654,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7884,6 +9708,15 @@ + + + + + + + + + @@ -7905,11 +9738,29 @@ - + - + - + + + + + + + + + + + + + + + + + + + @@ -7923,6 +9774,24 @@ + + + + + + + + + + + + + + + + + + @@ -7941,6 +9810,15 @@ + + + + + + + + + @@ -7968,6 +9846,15 @@ + + + + + + + + + @@ -7977,11 +9864,20 @@ - + - + - + + + + + + + + + + @@ -8034,20 +9930,44 @@ + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + - + @@ -8061,6 +9981,24 @@ + + + + + + + + + + + + + + + + + + @@ -8099,177 +10037,357 @@ - type.]]> + type.]]> + + 형식이어야 합니다.]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 형식이어야 합니다.]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8292,11 +10410,11 @@ - + - + - + @@ -8322,20 +10440,20 @@ - + - + - + - + - + - + @@ -8367,6 +10485,24 @@ + + + + + + + + + + + + + + + + + + @@ -8385,20 +10521,20 @@ - + - + - + - + - + - + @@ -8430,15 +10566,6 @@ - - - - - - - - - @@ -8571,6 +10698,15 @@ + + + + + + + + + @@ -8580,6 +10716,15 @@ + + + + + + + + + @@ -8607,6 +10752,15 @@ + + + + + + + + + @@ -8616,6 +10770,24 @@ + + + + + + + + + + + + + + + + + + @@ -8634,6 +10806,15 @@ + + + + + + + + + @@ -8652,6 +10833,15 @@ + + + + + + + + + @@ -8670,6 +10860,15 @@ + + + + + + + + + @@ -8733,6 +10932,15 @@ + + + + + + + + + @@ -8778,6 +10986,24 @@ + + + + + + + + + + + + + + + + + + @@ -8835,6 +11061,15 @@ + + + + + + + + + @@ -8943,6 +11178,24 @@ + + + '}` or `>`?]]> + + '}' 또는 '>'를 사용하시겠습니까?]]> + + + + + + + + + + + + + @@ -8952,6 +11205,24 @@ + + + + + + + + + + + + + + + + + + @@ -8961,6 +11232,15 @@ + + + + + + + + + @@ -8979,6 +11259,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9060,6 +11367,15 @@ + + + + + + + + + @@ -9069,6 +11385,15 @@ + + + + + + + + + @@ -9087,6 +11412,15 @@ + + + + + + + + + @@ -9123,6 +11457,24 @@ + + + + + + + + + + + + + + + + + + @@ -9150,38 +11502,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9213,6 +11592,15 @@ + + + + + + + + + @@ -9222,11 +11610,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9240,6 +11655,15 @@ + + + + + + + + + @@ -9267,6 +11691,15 @@ + + + + + + + + + @@ -9285,6 +11718,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9312,6 +11772,15 @@ + + + + + + + + + @@ -9429,6 +11898,15 @@ + + + + + + + + + @@ -9438,6 +11916,15 @@ + + + + + + + + + @@ -9456,6 +11943,15 @@ + + + + + + + + + @@ -9465,6 +11961,15 @@ + + + + + + + + + @@ -9483,6 +11988,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9492,6 +12024,15 @@ + + + + + + + + + @@ -9501,11 +12042,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9519,6 +12078,15 @@ + + + + + + + + + @@ -9531,6 +12099,15 @@ + + + + + + + + + @@ -9597,6 +12174,15 @@ + + + + + + + + + @@ -9609,38 +12195,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9726,20 +12312,20 @@ - + - + - + - + - + - + @@ -9753,15 +12339,6 @@ - - - - - - - - - @@ -9780,83 +12357,92 @@ - + - + - + - + - ()' instead.]]> + - ()'를 사용하세요.]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9879,6 +12465,15 @@ + + + + + + + + + @@ -9945,6 +12540,15 @@ + + + + + + + + + @@ -10035,74 +12639,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl index 5c051c2d20103..2324951dd0173 100644 --- a/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -41,6 +41,24 @@ + + + + + + + + + + + + + + + + + + @@ -77,6 +95,15 @@ + + + + + + + + + @@ -98,15 +125,6 @@ - - - - - - - - - @@ -197,6 +215,15 @@ + + + + + + + + + @@ -206,11 +233,11 @@ - + - + - + @@ -263,15 +290,6 @@ - - - - - - - - - @@ -407,6 +425,15 @@ + + + + + + + + + @@ -416,6 +443,15 @@ + + + + + + + + + @@ -467,15 +503,6 @@ - - - - - - - - - @@ -494,6 +521,24 @@ + + + + + + + + + + + + + + + + + + @@ -566,6 +611,15 @@ + + + + + + + + + @@ -611,6 +665,24 @@ + + + + + + + + + + + + + + + + + + @@ -730,10 +802,13 @@ - + - + + + + @@ -764,15 +839,6 @@ - - - - - - - - - @@ -791,6 +857,15 @@ + + + + + + + + + @@ -929,6 +1004,15 @@ + + + + + + + + + @@ -956,6 +1040,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -965,6 +1076,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -983,6 +1121,15 @@ + + + + + + + + + @@ -1013,6 +1160,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1034,6 +1208,15 @@ + + + + + + + + + @@ -1043,6 +1226,15 @@ + + + + + + + + + @@ -1088,6 +1280,24 @@ + + + + + + + + + + + + + + + + + + @@ -1151,6 +1361,15 @@ + + + + + + + + + @@ -1160,6 +1379,15 @@ + + + + + + + + + @@ -1169,6 +1397,15 @@ + + + + + + + + + @@ -1187,11 +1424,11 @@ - + - + - + @@ -1232,11 +1469,20 @@ - + + + + + + + + + + - + - + @@ -1259,11 +1505,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1313,6 +1586,15 @@ + + + + + + + + + @@ -1322,6 +1604,15 @@ + + + + + + + + + @@ -1376,6 +1667,15 @@ + + + + + + + + + @@ -1385,6 +1685,15 @@ + + + + + + + + + @@ -1394,9 +1703,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1511,9 +1838,9 @@ - + - + @@ -1529,11 +1856,11 @@ - + - + - + @@ -1592,6 +1919,24 @@ + + + + + + + + + + + + + + + + + + @@ -1637,6 +1982,24 @@ + + + + + + + + + + + + + + + + + + @@ -1676,6 +2039,24 @@ + + + + + + + + + + + + + + + + + + @@ -1721,11 +2102,11 @@ - + - + - + @@ -1757,6 +2138,15 @@ + + + + + + + + + @@ -1802,6 +2192,15 @@ + + + + + + + + + @@ -1823,6 +2222,15 @@ + + + + + + + + + @@ -1832,6 +2240,15 @@ + + + + + + + + + @@ -1850,6 +2267,15 @@ + + + + + + + + + @@ -1868,11 +2294,20 @@ - + - + - + + + + + + + + + + @@ -1913,20 +2348,20 @@ - + - + - + - + - + - + @@ -1958,6 +2393,15 @@ + + + + + + + + + @@ -2015,6 +2459,15 @@ + + + + + + + + + @@ -2051,6 +2504,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2105,15 +2630,6 @@ - - - - - - - - - @@ -2141,20 +2657,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2201,6 +2735,15 @@ + + + + + + + + + @@ -2237,11 +2780,11 @@ - + - + - + @@ -2372,29 +2915,29 @@ - + - + - + - + - + - + - + - + - + @@ -2501,6 +3044,15 @@ + + + + + + + + + @@ -2537,6 +3089,15 @@ + + + + + + + + + @@ -2546,6 +3107,15 @@ + + + + + + + + + @@ -2582,6 +3152,24 @@ + + + + + + + + + + + + + + + + + + @@ -2591,6 +3179,15 @@ + + + + + + + + + @@ -2636,6 +3233,15 @@ + + + + + + + + + @@ -2654,52 +3260,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2708,6 +3386,15 @@ + + + + + + + + + @@ -2726,6 +3413,24 @@ + + + + + + + + + + + + + + + + + + @@ -2735,6 +3440,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2774,6 +3506,24 @@ + + + + + + + + + + + + + + + + + + @@ -2801,6 +3551,15 @@ + + + + + + + + + @@ -2876,6 +3635,24 @@ + + + + + + + + + + + + + + + + + + @@ -2921,6 +3698,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}”?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2960,6 +3800,15 @@ + + + + + + + + + @@ -2969,6 +3818,15 @@ + + + + + + + + + @@ -3095,15 +3953,6 @@ - - - - - - - - - @@ -3206,29 +4055,29 @@ - + - + - + - + - + - + - + - + - + @@ -3251,6 +4100,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3269,6 +4154,15 @@ + + + + + + + + + @@ -3287,6 +4181,15 @@ + + + + + + + + + @@ -3305,6 +4208,15 @@ + + + + + + + + + @@ -3314,6 +4226,15 @@ + + + + + + + + + @@ -3341,27 +4262,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3452,6 +4391,15 @@ + + + + + + + + + @@ -3560,11 +4508,11 @@ - + - + - + @@ -3580,10 +4528,13 @@ - + - + + + + @@ -3716,6 +4667,15 @@ + + + + + + + + + @@ -3797,6 +4757,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3851,6 +4847,15 @@ + + + + + + + + + @@ -3860,11 +4865,11 @@ - + - + - + @@ -3878,11 +4883,11 @@ - + - + - + @@ -3974,6 +4979,24 @@ + + + + + + + + + + + + + + + + + + @@ -3983,29 +5006,29 @@ - + - + - + - + - + - + - + - + - + @@ -4100,6 +5123,15 @@ + + + + + + + + + @@ -4109,6 +5141,15 @@ + + + + + + + + + @@ -4136,11 +5177,11 @@ - + - + - + @@ -4181,15 +5222,6 @@ - - - - - - - - - @@ -4244,6 +5276,15 @@ + + + + + + + + + @@ -4283,6 +5324,15 @@ + + + + + + + + + @@ -4301,6 +5351,15 @@ + + + + + + + + + @@ -4364,6 +5423,15 @@ + + + + + + + + + @@ -4415,6 +5483,15 @@ + + + + + + + + + @@ -4481,15 +5558,6 @@ - - - - - - - - - @@ -4556,6 +5624,15 @@ + + + + + + + + + @@ -4829,6 +5906,15 @@ + + + + + + + + + @@ -4952,6 +6038,15 @@ + + + + + + + + + @@ -5018,6 +6113,15 @@ + + + + + + + + + @@ -5192,6 +6296,15 @@ + + + + + + + + + @@ -5255,11 +6368,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -5291,6 +6431,15 @@ + + + + + + + + + @@ -5309,24 +6458,24 @@ - + - + - + - - - - + - + - + + + + @@ -5366,6 +6515,15 @@ + + + + + + + + + @@ -5402,6 +6560,15 @@ + + + + + + + + + @@ -5486,90 +6653,198 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5648,6 +6923,15 @@ + + + + + + + + + @@ -5723,6 +7007,15 @@ + + + + + + + + + @@ -5750,6 +7043,15 @@ + + + + + + + + + @@ -5795,6 +7097,15 @@ + + + + + + + + + @@ -5822,6 +7133,15 @@ + + + + + + + + + @@ -5876,11 +7196,11 @@ - + - + - + @@ -5948,6 +7268,15 @@ + + + + + + + + + @@ -5957,6 +7286,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6155,6 +7511,24 @@ + + + + + + + + + + + + + + + + + + @@ -6224,6 +7598,15 @@ + + + + + + + + + @@ -6233,6 +7616,15 @@ + + + + + + + + + @@ -6242,6 +7634,15 @@ + + + + + + + + + @@ -6260,6 +7661,15 @@ + + + + + + + + + @@ -6269,6 +7679,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6278,6 +7733,15 @@ + + + + + + + + + @@ -6305,6 +7769,24 @@ + + + + + + + + + + + + + + + + + + @@ -6377,15 +7859,6 @@ - - - - - - - - - @@ -6431,6 +7904,24 @@ + + + + + + + + + + + + + + + + + + @@ -6452,20 +7943,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6479,6 +7997,24 @@ + + + + + + + + + + + + + + + + + + @@ -6551,6 +8087,15 @@ + + + + + + + + + @@ -6605,6 +8150,24 @@ + + + + + + + + + + + + + + + + + + @@ -6758,6 +8321,15 @@ + + + + + + + + + @@ -6776,6 +8348,15 @@ + + + + + + + + + @@ -6794,6 +8375,15 @@ + + + + + + + + + @@ -6821,18 +8411,6 @@ - - - - - - - - - - - - @@ -6851,6 +8429,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6860,6 +8465,15 @@ + + + + + + + + + @@ -6878,6 +8492,15 @@ + + + + + + + + + @@ -6887,6 +8510,15 @@ + + + + + + + + + @@ -7064,6 +8696,24 @@ + + + + + + + + + + + + + + + + + + @@ -7073,6 +8723,15 @@ + + + + + + + + + @@ -7358,6 +9017,24 @@ + + + + + + + + + + + + + + + + + + @@ -7430,11 +9107,11 @@ - + - + - + @@ -7466,11 +9143,11 @@ - + - + - + @@ -7484,6 +9161,24 @@ + + + + + + + + + + + + + + + + + + @@ -7493,15 +9188,12 @@ - + - + - + - - - @@ -7514,6 +9206,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7559,6 +9278,24 @@ + + + + + + + + + + + + + + + + + + @@ -7688,15 +9425,12 @@ - + - + - + - - - @@ -7763,6 +9497,15 @@ + + + + + + + + + @@ -7772,6 +9515,24 @@ + + + + + + + + + + + + + + + + + + @@ -7790,6 +9551,24 @@ + + + + + + + + + + + + + + + + + + @@ -7835,6 +9614,15 @@ + + + + + + + + + @@ -7853,6 +9641,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7871,6 +9695,15 @@ + + + + + + + + + @@ -7892,11 +9725,29 @@ - + - + - + + + + + + + + + + + + + + + + + + + @@ -7910,6 +9761,24 @@ + + + + + + + + + + + + + + + + + + @@ -7928,6 +9797,15 @@ + + + + + + + + + @@ -7955,6 +9833,15 @@ + + + + + + + + + @@ -7964,11 +9851,20 @@ - + - + - + + + + + + + + + + @@ -8021,20 +9917,44 @@ + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + - + @@ -8048,6 +9968,24 @@ + + + + + + + + + + + + + + + + + + @@ -8086,177 +10024,357 @@ - type.]]> + type.]]> + + .]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - .]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8279,11 +10397,11 @@ - + - + - + @@ -8309,20 +10427,20 @@ - + - + - + - + - + - + @@ -8354,6 +10472,24 @@ + + + + + + + + + + + + + + + + + + @@ -8372,20 +10508,20 @@ - + - + - + - + - + - + @@ -8417,15 +10553,6 @@ - - - - - - - - - @@ -8558,6 +10685,15 @@ + + + + + + + + + @@ -8567,6 +10703,15 @@ + + + + + + + + + @@ -8594,6 +10739,15 @@ + + + + + + + + + @@ -8603,6 +10757,24 @@ + + + + + + + + + + + + + + + + + + @@ -8621,6 +10793,15 @@ + + + + + + + + + @@ -8639,6 +10820,15 @@ + + + + + + + + + @@ -8657,6 +10847,15 @@ + + + + + + + + + @@ -8720,6 +10919,15 @@ + + + + + + + + + @@ -8765,6 +10973,24 @@ + + + + + + + + + + + + + + + + + + @@ -8822,6 +11048,15 @@ + + + + + + + + + @@ -8930,6 +11165,24 @@ + + + '}` or `>`?]]> + + '}” lub „>”?]]> + + + + + + + + + + + + + @@ -8939,6 +11192,24 @@ + + + + + + + + + + + + + + + + + + @@ -8948,6 +11219,15 @@ + + + + + + + + + @@ -8966,6 +11246,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9047,6 +11354,15 @@ + + + + + + + + + @@ -9056,6 +11372,15 @@ + + + + + + + + + @@ -9074,6 +11399,15 @@ + + + + + + + + + @@ -9110,6 +11444,24 @@ + + + + + + + + + + + + + + + + + + @@ -9137,38 +11489,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9200,6 +11579,15 @@ + + + + + + + + + @@ -9209,11 +11597,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9227,6 +11642,15 @@ + + + + + + + + + @@ -9254,6 +11678,15 @@ + + + + + + + + + @@ -9272,6 +11705,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9299,6 +11759,15 @@ + + + + + + + + + @@ -9416,6 +11885,15 @@ + + + + + + + + + @@ -9425,6 +11903,15 @@ + + + + + + + + + @@ -9443,6 +11930,15 @@ + + + + + + + + + @@ -9452,6 +11948,15 @@ + + + + + + + + + @@ -9470,6 +11975,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9479,6 +12011,15 @@ + + + + + + + + + @@ -9488,11 +12029,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9506,6 +12065,15 @@ + + + + + + + + + @@ -9518,6 +12086,15 @@ + + + + + + + + + @@ -9584,6 +12161,15 @@ + + + + + + + + + @@ -9596,38 +12182,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9713,20 +12299,20 @@ - + - + - + - + - + - + @@ -9740,15 +12326,6 @@ - - - - - - - - - @@ -9767,83 +12344,92 @@ - + - + - + - + - ()' instead.]]> + - ()”.]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9866,6 +12452,15 @@ + + + + + + + + + @@ -9932,6 +12527,15 @@ + + + + + + + + + @@ -10022,74 +12626,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl index 313874dc99499..e5a921b22400f 100644 --- a/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -41,6 +41,24 @@ + + + + + + + + + + + + + + + + + + @@ -77,6 +95,15 @@ + + + + + + + + + @@ -98,15 +125,6 @@ - - - - - - - - - @@ -197,6 +215,15 @@ + + + + + + + + + @@ -206,11 +233,11 @@ - + - + - + @@ -263,15 +290,6 @@ - - - - - - - - - @@ -407,6 +425,15 @@ + + + + + + + + + @@ -416,6 +443,15 @@ + + + + + + + + + @@ -467,15 +503,6 @@ - - - - - - - - - @@ -494,6 +521,24 @@ + + + + + + + + + + + + + + + + + + @@ -566,6 +611,15 @@ + + + + + + + + + @@ -611,6 +665,24 @@ + + + + + + + + + + + + + + + + + + @@ -730,10 +802,13 @@ - + - + + + + @@ -764,15 +839,6 @@ - - - - - - - - - @@ -791,6 +857,15 @@ + + + + + + + + + @@ -929,6 +1004,15 @@ + + + + + + + + + @@ -956,6 +1040,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -965,6 +1076,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -983,6 +1121,15 @@ + + + + + + + + + @@ -1013,6 +1160,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1037,6 +1211,15 @@ + + + + + + + + + @@ -1046,6 +1229,15 @@ + + + + + + + + + @@ -1091,6 +1283,24 @@ + + + + + + + + + + + + + + + + + + @@ -1154,6 +1364,15 @@ + + + + + + + + + @@ -1163,6 +1382,15 @@ + + + + + + + + + @@ -1172,6 +1400,15 @@ + + + + + + + + + @@ -1190,11 +1427,11 @@ - + - + - + @@ -1235,11 +1472,20 @@ - + + + + + + + + + + - + - + @@ -1262,11 +1508,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1316,6 +1589,15 @@ + + + + + + + + + @@ -1325,6 +1607,15 @@ + + + + + + + + + @@ -1379,6 +1670,15 @@ + + + + + + + + + @@ -1388,6 +1688,15 @@ + + + + + + + + + @@ -1397,9 +1706,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1514,9 +1841,9 @@ - + - + @@ -1532,11 +1859,11 @@ - + - + - + @@ -1595,6 +1922,24 @@ + + + + + + + + + + + + + + + + + + @@ -1640,6 +1985,24 @@ + + + + + + + + + + + + + + + + + + @@ -1679,6 +2042,24 @@ + + + + + + + + + + + + + + + + + + @@ -1724,11 +2105,11 @@ - + - + - + @@ -1760,6 +2141,15 @@ + + + + + + + + + @@ -1805,6 +2195,15 @@ + + + + + + + + + @@ -1826,6 +2225,15 @@ + + + + + + + + + @@ -1835,6 +2243,15 @@ + + + + + + + + + @@ -1853,6 +2270,15 @@ + + + + + + + + + @@ -1871,11 +2297,20 @@ - + - + - + + + + + + + + + + @@ -1916,20 +2351,20 @@ - + - + - + - + - + - + @@ -1961,6 +2396,15 @@ + + + + + + + + + @@ -2018,6 +2462,15 @@ + + + + + + + + + @@ -2054,6 +2507,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2108,15 +2633,6 @@ - - - - - - - - - @@ -2144,20 +2660,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2204,6 +2738,15 @@ + + + + + + + + + @@ -2240,11 +2783,11 @@ - + - + - + @@ -2375,29 +2918,29 @@ - + - + - + - + - + - + - + - + - + @@ -2504,6 +3047,15 @@ + + + + + + + + + @@ -2540,6 +3092,15 @@ + + + + + + + + + @@ -2549,6 +3110,15 @@ + + + + + + + + + @@ -2585,6 +3155,24 @@ + + + + + + + + + + + + + + + + + + @@ -2594,6 +3182,15 @@ + + + + + + + + + @@ -2639,6 +3236,15 @@ + + + + + + + + + @@ -2657,52 +3263,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2711,6 +3389,15 @@ + + + + + + + + + @@ -2729,6 +3416,24 @@ + + + + + + + + + + + + + + + + + + @@ -2738,6 +3443,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2777,6 +3509,24 @@ + + + + + + + + + + + + + + + + + + @@ -2804,6 +3554,15 @@ + + + + + + + + + @@ -2879,6 +3638,24 @@ + + + + + + + + + + + + + + + + + + @@ -2924,6 +3701,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}'?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2963,6 +3803,15 @@ + + + + + + + + + @@ -2972,6 +3821,15 @@ + + + + + + + + + @@ -3098,15 +3956,6 @@ - - - - - - - - - @@ -3209,29 +4058,29 @@ - + - + - + - + - + - + - + - + - + @@ -3254,6 +4103,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3272,6 +4157,15 @@ + + + + + + + + + @@ -3290,6 +4184,15 @@ + + + + + + + + + @@ -3308,6 +4211,15 @@ + + + + + + + + + @@ -3317,6 +4229,15 @@ + + + + + + + + + @@ -3344,27 +4265,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3455,6 +4394,15 @@ + + + + + + + + + @@ -3563,11 +4511,11 @@ - + - + - + @@ -3583,10 +4531,13 @@ - + - + + + + @@ -3719,6 +4670,15 @@ + + + + + + + + + @@ -3800,6 +4760,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3854,6 +4850,15 @@ + + + + + + + + + @@ -3863,11 +4868,11 @@ - + - + - + @@ -3881,11 +4886,11 @@ - + - + - + @@ -3977,6 +4982,24 @@ + + + + + + + + + + + + + + + + + + @@ -3986,29 +5009,29 @@ - + - + - + - + - + - + - + - + - + @@ -4103,6 +5126,15 @@ + + + + + + + + + @@ -4112,6 +5144,15 @@ + + + + + + + + + @@ -4139,11 +5180,11 @@ - + - + - + @@ -4184,15 +5225,6 @@ - - - - - - - - - @@ -4247,6 +5279,15 @@ + + + + + + + + + @@ -4286,6 +5327,15 @@ + + + + + + + + + @@ -4304,6 +5354,15 @@ + + + + + + + + + @@ -4367,6 +5426,15 @@ + + + + + + + + + @@ -4418,6 +5486,15 @@ + + + + + + + + + @@ -4484,15 +5561,6 @@ - - - - - - - - - @@ -4559,6 +5627,15 @@ + + + + + + + + + @@ -4832,6 +5909,15 @@ + + + + + + + + + @@ -4955,6 +6041,15 @@ + + + + + + + + + @@ -5021,6 +6116,15 @@ + + + + + + + + + @@ -5195,6 +6299,15 @@ + + + + + + + + + @@ -5258,11 +6371,38 @@ - + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + @@ -5294,6 +6434,15 @@ + + + + + + + + + @@ -5312,24 +6461,24 @@ - + - + - + - - - - + - + - + + + + @@ -5369,6 +6518,15 @@ + + + + + + + + + @@ -5405,6 +6563,15 @@ + + + + + + + + + @@ -5489,92 +6656,200 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5651,6 +6926,15 @@ + + + + + + + + + @@ -5726,6 +7010,15 @@ + + + + + + + + + @@ -5753,6 +7046,15 @@ + + + + + + + + + @@ -5798,6 +7100,15 @@ + + + + + + + + + @@ -5825,6 +7136,15 @@ + + + + + + + + + @@ -5879,11 +7199,11 @@ - + - + - + @@ -5951,6 +7271,15 @@ + + + + + + + + + @@ -5960,6 +7289,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6158,6 +7514,24 @@ + + + + + + + + + + + + + + + + + + @@ -6227,6 +7601,15 @@ + + + + + + + + + @@ -6236,6 +7619,15 @@ + + + + + + + + + @@ -6245,6 +7637,15 @@ + + + + + + + + + @@ -6263,6 +7664,15 @@ + + + + + + + + + @@ -6272,6 +7682,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6281,6 +7736,15 @@ + + + + + + + + + @@ -6308,6 +7772,24 @@ + + + + + + + + + + + + + + + + + + @@ -6380,15 +7862,6 @@ - - - - - - - - - @@ -6434,6 +7907,24 @@ + + + + + + + + + + + + + + + + + + @@ -6455,20 +7946,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6482,6 +8000,24 @@ + + + + + + + + + + + + + + + + + + @@ -6554,6 +8090,15 @@ + + + + + + + + + @@ -6608,6 +8153,24 @@ + + + + + + + + + + + + + + + + + + @@ -6761,6 +8324,15 @@ + + + + + + + + + @@ -6779,6 +8351,15 @@ + + + + + + + + + @@ -6797,6 +8378,15 @@ + + + + + + + + + @@ -6824,18 +8414,6 @@ - - - - - - - - - - - - @@ -6854,6 +8432,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6863,6 +8468,15 @@ + + + + + + + + + @@ -6881,6 +8495,15 @@ + + + + + + + + + @@ -6890,6 +8513,15 @@ + + + + + + + + + @@ -7067,6 +8699,24 @@ + + + + + + + + + + + + + + + + + + @@ -7076,6 +8726,15 @@ + + + + + + + + + @@ -7361,6 +9020,24 @@ + + + + + + + + + + + + + + + + + + @@ -7433,11 +9110,11 @@ - + - + - + @@ -7469,11 +9146,11 @@ - + - + - + @@ -7487,6 +9164,24 @@ + + + + + + + + + + + + + + + + + + @@ -7496,15 +9191,12 @@ - + - + - + - - - @@ -7517,6 +9209,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7562,6 +9281,24 @@ + + + + + + + + + + + + + + + + + + @@ -7691,15 +9428,12 @@ - + - + - - - @@ -7766,6 +9500,15 @@ + + + + + + + + + @@ -7775,6 +9518,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -7793,6 +9560,24 @@ + + + + + + + + + + + + + + + + + + @@ -7838,6 +9623,15 @@ + + + + + + + + + @@ -7856,6 +9650,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7874,6 +9704,15 @@ + + + + + + + + + @@ -7895,11 +9734,29 @@ - + + + + + + + + + + - + - + + + + + + + + + + @@ -7913,6 +9770,24 @@ + + + + + + + + + + + + + + + + + + @@ -7931,6 +9806,15 @@ + + + + + + + + + @@ -7958,6 +9842,15 @@ + + + + + + + + + @@ -7967,11 +9860,20 @@ - + - + - + + + + + + + + + + @@ -8024,20 +9926,44 @@ + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + - + @@ -8051,6 +9977,24 @@ + + + + + + + + + + + + + + + + + + @@ -8089,177 +10033,357 @@ - type.]]> + type.]]> + + Promessa global.]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Promessa global.]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8282,11 +10406,11 @@ - + - + - + @@ -8312,20 +10436,20 @@ - + - + - + - + - + - + @@ -8357,6 +10481,24 @@ + + + + + + + + + + + + + + + + + + @@ -8375,20 +10517,20 @@ - + - + - + - + - + - + @@ -8420,15 +10562,6 @@ - - - - - - - - - @@ -8561,6 +10694,15 @@ + + + + + + + + + @@ -8570,6 +10712,15 @@ + + + + + + + + + @@ -8597,6 +10748,15 @@ + + + + + + + + + @@ -8606,6 +10766,24 @@ + + + + + + + + + + + + + + + + + + @@ -8624,6 +10802,15 @@ + + + + + + + + + @@ -8642,6 +10829,15 @@ + + + + + + + + + @@ -8660,6 +10856,15 @@ + + + + + + + + + @@ -8723,6 +10928,15 @@ + + + + + + + + + @@ -8768,6 +10982,24 @@ + + + + + + + + + + + + + + + + + + @@ -8825,6 +11057,15 @@ + + + + + + + + + @@ -8933,6 +11174,24 @@ + + + '}` or `>`?]]> + + '}' ou '>'?]]> + + + + + + + + + + + + + @@ -8942,6 +11201,24 @@ + + + + + + + + + + + + + + + + + + @@ -8951,6 +11228,15 @@ + + + + + + + + + @@ -8969,6 +11255,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9050,6 +11363,15 @@ + + + + + + + + + @@ -9059,6 +11381,15 @@ + + + + + + + + + @@ -9077,6 +11408,15 @@ + + + + + + + + + @@ -9113,6 +11453,24 @@ + + + + + + + + + + + + + + + + + + @@ -9140,38 +11498,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9203,6 +11588,15 @@ + + + + + + + + + @@ -9212,11 +11606,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9230,6 +11651,15 @@ + + + + + + + + + @@ -9257,6 +11687,15 @@ + + + + + + + + + @@ -9275,6 +11714,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9302,6 +11768,15 @@ + + + + + + + + + @@ -9419,6 +11894,15 @@ + + + + + + + + + @@ -9428,6 +11912,15 @@ + + + + + + + + + @@ -9446,6 +11939,15 @@ + + + + + + + + + @@ -9455,6 +11957,15 @@ + + + + + + + + + @@ -9473,6 +11984,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9482,6 +12020,15 @@ + + + + + + + + + @@ -9491,11 +12038,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9509,6 +12074,15 @@ + + + + + + + + + @@ -9521,6 +12095,15 @@ + + + + + + + + + @@ -9587,6 +12170,15 @@ + + + + + + + + + @@ -9599,38 +12191,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9716,20 +12308,20 @@ - + - + - + - + - + - + @@ -9743,15 +12335,6 @@ - - - - - - - - - @@ -9770,83 +12353,92 @@ - + - + - + - + - ()' instead.]]> + - ()' em vez disso.]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9869,6 +12461,15 @@ + + + + + + + + + @@ -9935,6 +12536,15 @@ + + + + + + + + + @@ -10025,74 +12635,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl index b16f07d9bc8dc..b41ef0c3575d7 100644 --- a/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -47,6 +47,24 @@ + + + + + + + + + + + + + + + + + + @@ -83,6 +101,15 @@ + + + + + + + + + @@ -104,15 +131,6 @@ - - - - - - - - - @@ -203,6 +221,15 @@ + + + + + + + + + @@ -212,11 +239,11 @@ - + - + - + @@ -269,15 +296,6 @@ - - - - - - - - - @@ -413,6 +431,15 @@ + + + + + + + + + @@ -422,6 +449,15 @@ + + + + + + + + + @@ -473,15 +509,6 @@ - - - - - - - - - @@ -500,6 +527,24 @@ + + + + + + + + + + + + + + + + + + @@ -572,6 +617,15 @@ + + + + + + + + + @@ -620,6 +674,24 @@ + + + + + + + + + + + + + + + + + + @@ -739,10 +811,13 @@ - + - + + + + @@ -773,15 +848,6 @@ - - - - - - - - - @@ -800,6 +866,15 @@ + + + + + + + + + @@ -938,6 +1013,15 @@ + + + + + + + + + @@ -965,6 +1049,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -974,6 +1085,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -992,6 +1130,15 @@ + + + + + + + + + @@ -1022,6 +1169,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1043,6 +1217,15 @@ + + + + + + + + + @@ -1052,6 +1235,15 @@ + + + + + + + + + @@ -1097,6 +1289,24 @@ + + + + + + + + + + + + + + + + + + @@ -1160,6 +1370,15 @@ + + + + + + + + + @@ -1169,6 +1388,15 @@ + + + + + + + + + @@ -1178,6 +1406,15 @@ + + + + + + + + + @@ -1196,11 +1433,11 @@ - + - + - + @@ -1241,11 +1478,20 @@ - + + + + + + + + + + - + - + @@ -1268,11 +1514,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1322,6 +1595,15 @@ + + + + + + + + + @@ -1331,6 +1613,15 @@ + + + + + + + + + @@ -1385,6 +1676,15 @@ + + + + + + + + + @@ -1394,6 +1694,15 @@ + + + + + + + + + @@ -1403,9 +1712,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1520,11 +1847,11 @@ - + - + - + @@ -1538,11 +1865,11 @@ - + - + - + @@ -1601,6 +1928,24 @@ + + + + + + + + + + + + + + + + + + @@ -1646,6 +1991,24 @@ + + + + + + + + + + + + + + + + + + @@ -1685,6 +2048,24 @@ + + + + + + + + + + + + + + + + + + @@ -1730,11 +2111,11 @@ - + - + - + @@ -1766,6 +2147,15 @@ + + + + + + + + + @@ -1811,6 +2201,15 @@ + + + + + + + + + @@ -1832,6 +2231,15 @@ + + + + + + + + + @@ -1841,6 +2249,15 @@ + + + + + + + + + @@ -1859,6 +2276,15 @@ + + + + + + + + + @@ -1877,11 +2303,20 @@ - + - + - + + + + + + + + + + @@ -1922,20 +2357,20 @@ - + - + - + - + - + - + @@ -1967,6 +2402,15 @@ + + + + + + + + + @@ -2024,6 +2468,15 @@ + + + + + + + + + @@ -2060,6 +2513,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2114,15 +2639,6 @@ - - - - - - - - - @@ -2150,20 +2666,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2210,6 +2744,15 @@ + + + + + + + + + @@ -2246,11 +2789,11 @@ - + - + - + @@ -2381,29 +2924,29 @@ - + - + - + - + - + - + - + - + - + @@ -2510,6 +3053,15 @@ + + + + + + + + + @@ -2546,6 +3098,15 @@ + + + + + + + + + @@ -2555,6 +3116,15 @@ + + + + + + + + + @@ -2591,6 +3161,24 @@ + + + + + + + + + + + + + + + + + + @@ -2600,6 +3188,15 @@ + + + + + + + + + @@ -2645,6 +3242,15 @@ + + + + + + + + + @@ -2663,52 +3269,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2717,6 +3395,15 @@ + + + + + + + + + @@ -2735,6 +3422,24 @@ + + + + + + + + + + + + + + + + + + @@ -2744,6 +3449,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2783,6 +3515,24 @@ + + + + + + + + + + + + + + + + + + @@ -2810,6 +3560,15 @@ + + + + + + + + + @@ -2885,6 +3644,24 @@ + + + + + + + + + + + + + + + + + + @@ -2930,6 +3707,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}"?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2969,6 +3809,15 @@ + + + + + + + + + @@ -2978,6 +3827,15 @@ + + + + + + + + + @@ -3104,15 +3962,6 @@ - - - - - - - - - @@ -3215,29 +4064,29 @@ - + - + - + - + - + - + - + - + - + @@ -3260,6 +4109,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3278,6 +4163,15 @@ + + + + + + + + + @@ -3296,6 +4190,15 @@ + + + + + + + + + @@ -3314,6 +4217,15 @@ + + + + + + + + + @@ -3323,6 +4235,15 @@ + + + + + + + + + @@ -3350,27 +4271,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3461,6 +4400,15 @@ + + + + + + + + + @@ -3569,11 +4517,11 @@ - + - + - + @@ -3589,10 +4537,13 @@ - + - + + + + @@ -3725,6 +4676,15 @@ + + + + + + + + + @@ -3806,6 +4766,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3860,6 +4856,15 @@ + + + + + + + + + @@ -3869,11 +4874,11 @@ - + - + - + @@ -3887,11 +4892,11 @@ - + - + - + @@ -3983,6 +4988,24 @@ + + + + + + + + + + + + + + + + + + @@ -3992,29 +5015,29 @@ - + - + - + - + - + - + - + - + - + @@ -4109,6 +5132,15 @@ + + + + + + + + + @@ -4118,6 +5150,15 @@ + + + + + + + + + @@ -4145,11 +5186,11 @@ - + - + - + @@ -4190,15 +5231,6 @@ - - - - - - - - - @@ -4253,6 +5285,15 @@ + + + + + + + + + @@ -4292,6 +5333,15 @@ + + + + + + + + + @@ -4310,6 +5360,15 @@ + + + + + + + + + @@ -4373,6 +5432,15 @@ + + + + + + + + + @@ -4424,6 +5492,15 @@ + + + + + + + + + @@ -4490,15 +5567,6 @@ - - - - - - - - - @@ -4565,6 +5633,15 @@ + + + + + + + + + @@ -4838,6 +5915,15 @@ + + + + + + + + + @@ -4961,6 +6047,15 @@ + + + + + + + + + @@ -5027,6 +6122,15 @@ + + + + + + + + + @@ -5201,6 +6305,15 @@ + + + + + + + + + @@ -5264,11 +6377,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -5300,6 +6440,15 @@ + + + + + + + + + @@ -5318,24 +6467,24 @@ - + - + - + - - - - + - + - + + + + @@ -5375,6 +6524,15 @@ + + + + + + + + + @@ -5411,6 +6569,15 @@ + + + + + + + + + @@ -5495,90 +6662,198 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5657,6 +6932,15 @@ + + + + + + + + + @@ -5732,6 +7016,15 @@ + + + + + + + + + @@ -5759,6 +7052,15 @@ + + + + + + + + + @@ -5804,6 +7106,15 @@ + + + + + + + + + @@ -5831,6 +7142,15 @@ + + + + + + + + + @@ -5885,11 +7205,11 @@ - + - + - + @@ -5957,6 +7277,15 @@ + + + + + + + + + @@ -5966,6 +7295,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6164,6 +7520,24 @@ + + + + + + + + + + + + + + + + + + @@ -6236,6 +7610,15 @@ + + + + + + + + + @@ -6245,6 +7628,15 @@ + + + + + + + + + @@ -6254,6 +7646,15 @@ + + + + + + + + + @@ -6272,6 +7673,15 @@ + + + + + + + + + @@ -6281,6 +7691,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6290,6 +7745,15 @@ + + + + + + + + + @@ -6317,6 +7781,24 @@ + + + + + + + + + + + + + + + + + + @@ -6389,15 +7871,6 @@ - - - - - - - - - @@ -6443,6 +7916,24 @@ + + + + + + + + + + + + + + + + + + @@ -6464,20 +7955,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6491,6 +8009,24 @@ + + + + + + + + + + + + + + + + + + @@ -6563,6 +8099,15 @@ + + + + + + + + + @@ -6617,6 +8162,24 @@ + + + + + + + + + + + + + + + + + + @@ -6770,6 +8333,15 @@ + + + + + + + + + @@ -6788,6 +8360,15 @@ + + + + + + + + + @@ -6806,6 +8387,15 @@ + + + + + + + + + @@ -6833,18 +8423,6 @@ - - - - - - - - - - - - @@ -6863,6 +8441,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6872,6 +8477,15 @@ + + + + + + + + + @@ -6890,6 +8504,15 @@ + + + + + + + + + @@ -6899,6 +8522,15 @@ + + + + + + + + + @@ -7076,6 +8708,24 @@ + + + + + + + + + + + + + + + + + + @@ -7085,6 +8735,15 @@ + + + + + + + + + @@ -7370,6 +9029,24 @@ + + + + + + + + + + + + + + + + + + @@ -7442,11 +9119,11 @@ - + - + - + @@ -7478,11 +9155,11 @@ - + - + - + @@ -7496,6 +9173,24 @@ + + + + + + + + + + + + + + + + + + @@ -7505,15 +9200,12 @@ - + - + - + - - - @@ -7526,6 +9218,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7571,6 +9290,24 @@ + + + + + + + + + + + + + + + + + + @@ -7700,15 +9437,12 @@ - + - + - - - @@ -7775,6 +9509,15 @@ + + + + + + + + + @@ -7784,6 +9527,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -7802,6 +9569,24 @@ + + + + + + + + + + + + + + + + + + @@ -7847,6 +9632,15 @@ + + + + + + + + + @@ -7865,6 +9659,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7883,6 +9713,15 @@ + + + + + + + + + @@ -7904,11 +9743,29 @@ - + + + + + + + + + + - + - + + + + + + + + + + @@ -7922,6 +9779,24 @@ + + + + + + + + + + + + + + + + + + @@ -7940,6 +9815,15 @@ + + + + + + + + + @@ -7967,6 +9851,15 @@ + + + + + + + + + @@ -7976,11 +9869,20 @@ - + - + - + + + + + + + + + + @@ -8033,20 +9935,44 @@ + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + - + @@ -8060,6 +9986,24 @@ + + + + + + + + + + + + + + + + + + @@ -8098,177 +10042,357 @@ - type.]]> + type.]]> + + .]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - .]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8291,11 +10415,11 @@ - + - + - + @@ -8321,20 +10445,20 @@ - + - + - + - + - + - + @@ -8366,6 +10490,24 @@ + + + + + + + + + + + + + + + + + + @@ -8384,20 +10526,20 @@ - + - + - + - + - + - + @@ -8429,15 +10571,6 @@ - - - - - - - - - @@ -8570,6 +10703,15 @@ + + + + + + + + + @@ -8579,6 +10721,15 @@ + + + + + + + + + @@ -8606,6 +10757,15 @@ + + + + + + + + + @@ -8615,6 +10775,24 @@ + + + + + + + + + + + + + + + + + + @@ -8633,6 +10811,15 @@ + + + + + + + + + @@ -8651,6 +10838,15 @@ + + + + + + + + + @@ -8669,6 +10865,15 @@ + + + + + + + + + @@ -8732,6 +10937,15 @@ + + + + + + + + + @@ -8777,6 +10991,24 @@ + + + + + + + + + + + + + + + + + + @@ -8834,6 +11066,15 @@ + + + + + + + + + @@ -8942,6 +11183,24 @@ + + + '}` or `>`?]]> + + '}" или ">"?]]> + + + + + + + + + + + + + @@ -8951,6 +11210,24 @@ + + + + + + + + + + + + + + + + + + @@ -8960,6 +11237,15 @@ + + + + + + + + + @@ -8978,6 +11264,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9059,6 +11372,15 @@ + + + + + + + + + @@ -9068,6 +11390,15 @@ + + + + + + + + + @@ -9086,6 +11417,15 @@ + + + + + + + + + @@ -9122,6 +11462,24 @@ + + + + + + + + + + + + + + + + + + @@ -9149,38 +11507,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9212,6 +11597,15 @@ + + + + + + + + + @@ -9221,11 +11615,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9239,6 +11660,15 @@ + + + + + + + + + @@ -9266,6 +11696,15 @@ + + + + + + + + + @@ -9284,6 +11723,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9311,6 +11777,15 @@ + + + + + + + + + @@ -9428,6 +11903,15 @@ + + + + + + + + + @@ -9437,6 +11921,15 @@ + + + + + + + + + @@ -9455,6 +11948,15 @@ + + + + + + + + + @@ -9464,6 +11966,15 @@ + + + + + + + + + @@ -9482,6 +11993,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9491,6 +12029,15 @@ + + + + + + + + + @@ -9500,11 +12047,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9518,6 +12083,15 @@ + + + + + + + + + @@ -9530,6 +12104,15 @@ + + + + + + + + + @@ -9596,6 +12179,15 @@ + + + + + + + + + @@ -9608,38 +12200,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9725,20 +12317,20 @@ - + - + - + - + - + - + @@ -9752,15 +12344,6 @@ - - - - - - - - - @@ -9779,83 +12362,92 @@ - + - + - + - + - ()' instead.]]> + - ()".]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9878,6 +12470,15 @@ + + + + + + + + + @@ -9944,6 +12545,15 @@ + + + + + + + + + @@ -10034,74 +12644,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl index 37122673a1fa1..0a26fe3f2777b 100644 --- a/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -41,6 +41,24 @@ + + + + + + + + + + + + + + + + + + @@ -77,6 +95,15 @@ + + + + + + + + + @@ -98,15 +125,6 @@ - - - - - - - - - @@ -197,6 +215,15 @@ + + + + + + + + + @@ -206,11 +233,11 @@ - + - + - + @@ -263,15 +290,6 @@ - - - - - - - - - @@ -407,6 +425,15 @@ + + + + + + + + + @@ -416,6 +443,15 @@ + + + + + + + + + @@ -467,15 +503,6 @@ - - - - - - - - - @@ -494,6 +521,24 @@ + + + + + + + + + + + + + + + + + + @@ -566,6 +611,15 @@ + + + + + + + + + @@ -614,6 +668,24 @@ + + + + + + + + + + + + + + + + + + @@ -733,10 +805,13 @@ - + - + + + + @@ -767,15 +842,6 @@ - - - - - - - - - @@ -794,6 +860,15 @@ + + + + + + + + + @@ -932,6 +1007,15 @@ + + + + + + + + + @@ -959,6 +1043,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -968,6 +1079,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -986,6 +1124,15 @@ + + + + + + + + + @@ -1016,6 +1163,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1037,6 +1211,15 @@ + + + + + + + + + @@ -1046,6 +1229,15 @@ + + + + + + + + + @@ -1091,6 +1283,24 @@ + + + + + + + + + + + + + + + + + + @@ -1154,6 +1364,15 @@ + + + + + + + + + @@ -1163,6 +1382,15 @@ + + + + + + + + + @@ -1172,6 +1400,15 @@ + + + + + + + + + @@ -1190,11 +1427,11 @@ - + - + - + @@ -1235,11 +1472,20 @@ - + + + + + + + + + + - + - + @@ -1262,11 +1508,38 @@ - + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -1316,6 +1589,15 @@ + + + + + + + + + @@ -1325,6 +1607,15 @@ + + + + + + + + + @@ -1379,6 +1670,15 @@ + + + + + + + + + @@ -1388,6 +1688,15 @@ + + + + + + + + + @@ -1397,9 +1706,27 @@ - + - + + + + + + + + + + + + + + + + + + + @@ -1514,9 +1841,9 @@ - + - + @@ -1532,11 +1859,11 @@ - + - + - + @@ -1595,6 +1922,24 @@ + + + + + + + + + + + + + + + + + + @@ -1640,6 +1985,24 @@ + + + + + + + + + + + + + + + + + + @@ -1679,6 +2042,24 @@ + + + + + + + + + + + + + + + + + + @@ -1724,11 +2105,11 @@ - + - + - + @@ -1760,6 +2141,15 @@ + + + + + + + + + @@ -1805,6 +2195,15 @@ + + + + + + + + + @@ -1826,6 +2225,15 @@ + + + + + + + + + @@ -1835,6 +2243,15 @@ + + + + + + + + + @@ -1853,6 +2270,15 @@ + + + + + + + + + @@ -1871,11 +2297,20 @@ - + - + - + + + + + + + + + + @@ -1916,20 +2351,20 @@ - + - + - + - + - + - + @@ -1961,6 +2396,15 @@ + + + + + + + + + @@ -2018,6 +2462,15 @@ + + + + + + + + + @@ -2054,6 +2507,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2108,15 +2633,6 @@ - - - - - - - - - @@ -2144,20 +2660,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -2204,6 +2738,15 @@ + + + + + + + + + @@ -2240,11 +2783,11 @@ - + - + - + @@ -2375,29 +2918,29 @@ - + - + - + - + - + - + - + - + - + @@ -2504,6 +3047,15 @@ + + + + + + + + + @@ -2540,6 +3092,15 @@ + + + + + + + + + @@ -2549,6 +3110,15 @@ + + + + + + + + + @@ -2585,6 +3155,24 @@ + + + + + + + + + + + + + + + + + + @@ -2594,6 +3182,15 @@ + + + + + + + + + @@ -2639,6 +3236,15 @@ + + + + + + + + + @@ -2657,52 +3263,124 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2711,6 +3389,15 @@ + + + + + + + + + @@ -2729,6 +3416,24 @@ + + + + + + + + + + + + + + + + + + @@ -2738,6 +3443,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2777,6 +3509,24 @@ + + + + + + + + + + + + + + + + + + @@ -2804,6 +3554,15 @@ + + + + + + + + + @@ -2879,6 +3638,24 @@ + + + + + + + + + + + + + + + + + + @@ -2924,6 +3701,69 @@ + + + + + + + + + + + + + + + + + + + + + {1}'?]]> + + {1}' türüne kısıtlanmasını mı istediniz?]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2963,6 +3803,15 @@ + + + + + + + + + @@ -2972,6 +3821,15 @@ + + + + + + + + + @@ -3098,15 +3956,6 @@ - - - - - - - - - @@ -3209,29 +4058,29 @@ - + - + - + - + - + - + - + - + - + @@ -3254,6 +4103,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3272,6 +4157,15 @@ + + + + + + + + + @@ -3290,6 +4184,15 @@ + + + + + + + + + @@ -3308,6 +4211,15 @@ + + + + + + + + + @@ -3317,6 +4229,15 @@ + + + + + + + + + @@ -3344,27 +4265,45 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -3455,6 +4394,15 @@ + + + + + + + + + @@ -3563,11 +4511,11 @@ - + - + - + @@ -3583,10 +4531,13 @@ - + - + + + + @@ -3719,6 +4670,15 @@ + + + + + + + + + @@ -3800,6 +4760,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3854,6 +4850,15 @@ + + + + + + + + + @@ -3863,11 +4868,11 @@ - + - + - + @@ -3881,11 +4886,11 @@ - + - + - + @@ -3977,6 +4982,24 @@ + + + + + + + + + + + + + + + + + + @@ -3986,29 +5009,29 @@ - + - + - + - + - + - + - + - + - + @@ -4103,6 +5126,15 @@ + + + + + + + + + @@ -4112,6 +5144,15 @@ + + + + + + + + + @@ -4139,11 +5180,11 @@ - + - + - + @@ -4184,15 +5225,6 @@ - - - - - - - - - @@ -4247,6 +5279,15 @@ + + + + + + + + + @@ -4286,6 +5327,15 @@ + + + + + + + + + @@ -4304,6 +5354,15 @@ + + + + + + + + + @@ -4367,6 +5426,15 @@ + + + + + + + + + @@ -4418,6 +5486,15 @@ + + + + + + + + + @@ -4484,15 +5561,6 @@ - - - - - - - - - @@ -4559,6 +5627,15 @@ + + + + + + + + + @@ -4832,6 +5909,15 @@ + + + + + + + + + @@ -4955,6 +6041,15 @@ + + + + + + + + + @@ -5021,6 +6116,15 @@ + + + + + + + + + @@ -5195,6 +6299,15 @@ + + + + + + + + + @@ -5258,11 +6371,38 @@ - + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + @@ -5294,6 +6434,15 @@ + + + + + + + + + @@ -5312,24 +6461,24 @@ - + - + - + - - - - + - + - + + + + @@ -5369,6 +6518,15 @@ + + + + + + + + + @@ -5405,6 +6563,15 @@ + + + + + + + + + @@ -5489,92 +6656,200 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5651,6 +6926,15 @@ + + + + + + + + + @@ -5726,6 +7010,15 @@ + + + + + + + + + @@ -5753,6 +7046,15 @@ + + + + + + + + + @@ -5798,6 +7100,15 @@ + + + + + + + + + @@ -5825,6 +7136,15 @@ + + + + + + + + + @@ -5879,11 +7199,11 @@ - + - + - + @@ -5951,6 +7271,15 @@ + + + + + + + + + @@ -5960,6 +7289,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6158,6 +7514,24 @@ + + + + + + + + + + + + + + + + + + @@ -6230,6 +7604,15 @@ + + + + + + + + + @@ -6239,6 +7622,15 @@ + + + + + + + + + @@ -6248,6 +7640,15 @@ + + + + + + + + + @@ -6266,6 +7667,15 @@ + + + + + + + + + @@ -6275,6 +7685,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6284,6 +7739,15 @@ + + + + + + + + + @@ -6311,6 +7775,24 @@ + + + + + + + + + + + + + + + + + + @@ -6383,15 +7865,6 @@ - - - - - - - - - @@ -6437,6 +7910,24 @@ + + + + + + + + + + + + + + + + + + @@ -6458,20 +7949,47 @@ - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6485,6 +8003,24 @@ + + + + + + + + + + + + + + + + + + @@ -6557,6 +8093,15 @@ + + + + + + + + + @@ -6611,6 +8156,24 @@ + + + + + + + + + + + + + + + + + + @@ -6764,6 +8327,15 @@ + + + + + + + + + @@ -6782,6 +8354,15 @@ + + + + + + + + + @@ -6800,6 +8381,15 @@ + + + + + + + + + @@ -6827,18 +8417,6 @@ - - - - - - - - - - - - @@ -6857,6 +8435,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6866,6 +8471,15 @@ + + + + + + + + + @@ -6884,6 +8498,15 @@ + + + + + + + + + @@ -6893,6 +8516,15 @@ + + + + + + + + + @@ -7070,6 +8702,24 @@ + + + + + + + + + + + + + + + + + + @@ -7079,6 +8729,15 @@ + + + + + + + + + @@ -7364,6 +9023,24 @@ + + + + + + + + + + + + + + + + + + @@ -7436,11 +9113,11 @@ - + - + - + @@ -7472,11 +9149,11 @@ - + - + - + @@ -7490,6 +9167,24 @@ + + + + + + + + + + + + + + + + + + @@ -7499,15 +9194,12 @@ - + - + - + - - - @@ -7520,6 +9212,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7565,6 +9284,24 @@ + + + + + + + + + + + + + + + + + + @@ -7694,15 +9431,12 @@ - + - + - + - - - @@ -7769,6 +9503,15 @@ + + + + + + + + + @@ -7778,6 +9521,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -7796,6 +9563,24 @@ + + + + + + + + + + + + + + + + + + @@ -7841,6 +9626,15 @@ + + + + + + + + + @@ -7859,6 +9653,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7877,6 +9707,15 @@ + + + + + + + + + @@ -7898,11 +9737,29 @@ - + + + + + + + + + + - + - + + + + + + + + + + @@ -7916,6 +9773,24 @@ + + + + + + + + + + + + + + + + + + @@ -7934,6 +9809,15 @@ + + + + + + + + + @@ -7961,6 +9845,15 @@ + + + + + + + + + @@ -7970,11 +9863,20 @@ - + - + - + + + + + + + + + + @@ -8027,20 +9929,44 @@ + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + - + @@ -8054,6 +9980,24 @@ + + + + + + + + + + + + + + + + + + @@ -8092,177 +10036,357 @@ - type.]]> + type.]]> + + türü olmalıdır.]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - türü olmalıdır.]]> + - + - + - + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8285,11 +10409,11 @@ - + - + - + @@ -8315,20 +10439,20 @@ - + - + - + - + - + - + @@ -8360,6 +10484,24 @@ + + + + + + + + + + + + + + + + + + @@ -8378,20 +10520,20 @@ - + - + - + - + - + - + @@ -8423,15 +10565,6 @@ - - - - - - - - - @@ -8564,6 +10697,15 @@ + + + + + + + + + @@ -8573,6 +10715,15 @@ + + + + + + + + + @@ -8600,6 +10751,15 @@ + + + + + + + + + @@ -8609,6 +10769,24 @@ + + + + + + + + + + + + + + + + + + @@ -8627,6 +10805,15 @@ + + + + + + + + + @@ -8645,6 +10832,15 @@ + + + + + + + + + @@ -8663,6 +10859,15 @@ + + + + + + + + + @@ -8726,6 +10931,15 @@ + + + + + + + + + @@ -8771,6 +10985,24 @@ + + + + + + + + + + + + + + + + + + @@ -8828,6 +11060,15 @@ + + + + + + + + + @@ -8936,6 +11177,24 @@ + + + '}` or `>`?]]> + + '}` veya `>`?]]> + + + + + + + + + + + + + @@ -8945,6 +11204,24 @@ + + + + + + + + + + + + + + + + + + @@ -8954,6 +11231,15 @@ + + + + + + + + + @@ -8972,6 +11258,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9053,6 +11366,15 @@ + + + + + + + + + @@ -9062,6 +11384,15 @@ + + + + + + + + + @@ -9080,6 +11411,15 @@ + + + + + + + + + @@ -9116,6 +11456,24 @@ + + + + + + + + + + + + + + + + + + @@ -9143,38 +11501,65 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -9206,6 +11591,15 @@ + + + + + + + + + @@ -9215,11 +11609,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -9233,6 +11654,15 @@ + + + + + + + + + @@ -9260,6 +11690,15 @@ + + + + + + + + + @@ -9278,6 +11717,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9305,6 +11771,15 @@ + + + + + + + + + @@ -9422,6 +11897,15 @@ + + + + + + + + + @@ -9431,6 +11915,15 @@ + + + + + + + + + @@ -9449,6 +11942,15 @@ + + + + + + + + + @@ -9458,6 +11960,15 @@ + + + + + + + + + @@ -9476,6 +11987,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9485,6 +12023,15 @@ + + + + + + + + + @@ -9494,11 +12041,29 @@ - + + + + + + + + + + + + + + + + + + + - + - + @@ -9512,6 +12077,15 @@ + + + + + + + + + @@ -9524,6 +12098,15 @@ + + + + + + + + + @@ -9590,6 +12173,15 @@ + + + + + + + + + @@ -9602,38 +12194,38 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -9719,20 +12311,20 @@ - + - + - + - + - + - + @@ -9746,15 +12338,6 @@ - - - - - - - - - @@ -9773,83 +12356,92 @@ - + - + - + - + - ()' instead.]]> + - ()' kullanın.]]> + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + @@ -9872,6 +12464,15 @@ + + + + + + + + + @@ -9938,6 +12539,15 @@ + + + + + + + + + @@ -10028,74 +12638,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 33374e24bb7c7..47ab9e6a12f62 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -691,7 +691,7 @@ namespace ts.server { /*@internal*/ setDocument(key: DocumentRegistryBucketKey, path: Path, sourceFile: SourceFile) { - const info = Debug.assertDefined(this.getScriptInfoForPath(path)); + const info = Debug.checkDefined(this.getScriptInfoForPath(path)); info.cacheSourceFile = { key, sourceFile }; } @@ -873,9 +873,11 @@ namespace ts.server { this.delayEnsureProjectForOpenFiles(); } - private delayUpdateProjectGraphs(projects: readonly Project[]) { + private delayUpdateProjectGraphs(projects: readonly Project[], clearSourceMapperCache: boolean) { if (projects.length) { for (const project of projects) { + // Even if program doesnt change, clear the source mapper cache + if (clearSourceMapperCache) project.clearSourceMapperCache(); this.delayUpdateProjectGraph(project); } this.delayEnsureProjectForOpenFiles(); @@ -1033,7 +1035,7 @@ namespace ts.server { // file has been changed which might affect the set of referenced files in projects that include // this file and set of inferred projects info.delayReloadNonMixedContentFile(); - this.delayUpdateProjectGraphs(info.containingProjects); + this.delayUpdateProjectGraphs(info.containingProjects, /*clearSourceMapperCache*/ false); this.handleSourceMapProjects(info); } } @@ -1066,7 +1068,7 @@ namespace ts.server { private delayUpdateProjectsOfScriptInfoPath(path: Path) { const info = this.getScriptInfoForPath(path); if (info) { - this.delayUpdateProjectGraphs(info.containingProjects); + this.delayUpdateProjectGraphs(info.containingProjects, /*clearSourceMapperCache*/ true); } } @@ -1082,7 +1084,7 @@ namespace ts.server { info.detachAllProjects(); // update projects to make sure that set of referenced files is correct - this.delayUpdateProjectGraphs(containingProjects); + this.delayUpdateProjectGraphs(containingProjects, /*clearSourceMapperCache*/ false); this.handleSourceMapProjects(info); info.closeSourceMapFileWatcher(); // need to recalculate source map from declaration file @@ -1110,7 +1112,7 @@ namespace ts.server { // don't trigger callback on open, existing files if (project.fileIsOpen(fileOrDirectoryPath)) { if (project.pendingReload !== ConfigFileProgramReloadLevel.Full) { - const info = Debug.assertDefined(this.getScriptInfoForPath(fileOrDirectoryPath)); + const info = Debug.checkDefined(this.getScriptInfoForPath(fileOrDirectoryPath)); if (info.isAttached(project)) { project.openFileWatchTriggered.set(fileOrDirectoryPath, true); } @@ -1256,7 +1258,20 @@ namespace ts.server { const project = this.getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) || this.getOrCreateSingleInferredProjectIfEnabled() || - this.getOrCreateSingleInferredWithoutProjectRoot(info.isDynamic ? projectRootPath || this.currentDirectory : getDirectoryPath(info.path)); + this.getOrCreateSingleInferredWithoutProjectRoot( + info.isDynamic ? + projectRootPath || this.currentDirectory : + getDirectoryPath( + isRootedDiskPath(info.fileName) ? + info.fileName : + getNormalizedAbsolutePath( + info.fileName, + projectRootPath ? + this.getNormalizedAbsolutePath(projectRootPath) : + this.currentDirectory + ) + ) + ); project.addRoot(info); if (info.containingProjects[0] !== project) { @@ -1629,7 +1644,7 @@ namespace ts.server { Debug.assert(!isOpenScriptInfo(info) || this.openFiles.has(info.path)); const projectRootPath = this.openFiles.get(info.path); - const scriptInfo = Debug.assertDefined(this.getScriptInfo(info.path)); + const scriptInfo = Debug.checkDefined(this.getScriptInfo(info.path)); if (scriptInfo.isDynamic) return undefined; let searchPath = asNormalizedPath(getDirectoryPath(info.fileName)); @@ -1983,7 +1998,7 @@ namespace ts.server { else { const scriptKind = propertyReader.getScriptKind(f, this.hostConfiguration.extraFileExtensions); const hasMixedContent = propertyReader.hasMixedContent(f, this.hostConfiguration.extraFileExtensions); - const scriptInfo = Debug.assertDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath( + const scriptInfo = Debug.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath( fileName, project.currentDirectory, scriptKind, @@ -2399,7 +2414,7 @@ namespace ts.server { this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(fileName), info); } } - if (openedByClient && !info.isScriptOpen()) { + if (openedByClient) { // Opening closed script info // either it was created just now, or was part of projects but was closed this.stopWatchingScriptInfo(info); @@ -2408,9 +2423,6 @@ namespace ts.server { info.registerFileUpdate(); } } - else { - Debug.assert(fileContent === undefined); - } return info; } @@ -2524,7 +2536,7 @@ namespace ts.server { const declarationInfo = this.getScriptInfoForPath(declarationInfoPath); if (declarationInfo && declarationInfo.sourceMapFilePath && !isString(declarationInfo.sourceMapFilePath)) { // Update declaration and source projects - this.delayUpdateProjectGraphs(declarationInfo.containingProjects); + this.delayUpdateProjectGraphs(declarationInfo.containingProjects, /*clearSourceMapperCache*/ true); this.delayUpdateSourceInfoProjects(declarationInfo.sourceMapFilePath.sourceInfos); declarationInfo.closeSourceMapFileWatcher(); } @@ -3104,8 +3116,9 @@ namespace ts.server { return; } - const info: OpenFileInfo = { checkJs: !!project.getSourceFile(scriptInfo.path)!.checkJsDirective }; - this.eventHandler({ eventName: OpenFileInfoTelemetryEvent, data: { info } }); + const sourceFile = project.getSourceFile(scriptInfo.path); + const checkJs = !!sourceFile && !!sourceFile.checkJsDirective; + this.eventHandler({ eventName: OpenFileInfoTelemetryEvent, data: { info: { checkJs } } }); } /** @@ -3154,11 +3167,9 @@ namespace ts.server { const iterResult = openFiles.next(); if (iterResult.done) break; const file = iterResult.value; - const scriptInfo = this.getScriptInfo(file.fileName); - Debug.assert(!scriptInfo || !scriptInfo.isScriptOpen(), "Script should not exist and not be open already"); // Create script infos so we have the new content for all the open files before we do any updates to projects const info = this.getOrCreateOpenScriptInfo( - scriptInfo ? scriptInfo.fileName : toNormalizedPath(file.fileName), + toNormalizedPath(file.fileName), file.content, tryConvertScriptKindName(file.scriptKind!), file.hasMixedContent, @@ -3354,7 +3365,7 @@ namespace ts.server { else { let exclude = false; if (typeAcquisition.enable || typeAcquisition.enableAutoDiscovery) { - const baseName = getBaseFileName(normalizedNames[i].toLowerCase()); + const baseName = getBaseFileName(toFileNameLowerCase(normalizedNames[i])); if (fileExtensionIs(baseName, "js")) { const inferredTypingName = removeFileExtension(baseName); const cleanedTypingName = removeMinAndVersionNumbers(inferredTypingName); diff --git a/src/server/project.ts b/src/server/project.ts index 8994f296eb88b..05f73e4f07ce0 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -384,7 +384,9 @@ namespace ts.server { } getScriptVersion(filename: string) { - const info = this.getOrCreateScriptInfoAndAttachToProject(filename); + // Don't attach to the project if version is asked + + const info = this.projectService.getOrCreateScriptInfoNotOpenedByClient(filename, this.currentDirectory, this.directoryStructureHost); return (info && info.getLatestVersion())!; // TODO: GH#18217 } @@ -558,6 +560,11 @@ namespace ts.server { return this.getLanguageService().getSourceMapper(); } + /** @internal */ + clearSourceMapperCache() { + this.languageService.clearSourceMapperCache(); + } + /*@internal*/ getDocumentPositionMapper(generatedFileName: string, sourceFileName?: string): DocumentPositionMapper | undefined { return this.projectService.getDocumentPositionMapper(this, generatedFileName, sourceFileName); @@ -758,7 +765,7 @@ namespace ts.server { return map(this.program!.getSourceFiles(), sourceFile => { const scriptInfo = this.projectService.getScriptInfoForPath(sourceFile.resolvedPath); Debug.assert(!!scriptInfo, "getScriptInfo", () => `scriptInfo for a file '${sourceFile.fileName}' Path: '${sourceFile.path}' / '${sourceFile.resolvedPath}' is missing.`); - return scriptInfo!; + return scriptInfo; }); } @@ -1224,7 +1231,10 @@ namespace ts.server { watcher: this.projectService.watchFactory.watchFile( this.projectService.host, generatedFile, - () => this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this), + () => { + this.clearSourceMapperCache(); + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + }, PollingInterval.High, this.projectService.getWatchOptions(this), WatchType.MissingGeneratedFile, @@ -1379,7 +1389,7 @@ namespace ts.server { changes: { added: includeProjectReferenceRedirectInfoIfRequested(added), removed: includeProjectReferenceRedirectInfoIfRequested(removed), - updated: includeProjectReferenceRedirectInfoIfRequested + updated: includeProjectReferenceRedirectInfo ? updated.map((fileName): protocol.FileWithProjectReferenceRedirectInfo => ({ fileName, isSourceOfProjectReferenceRedirect: this.isSourceOfProjectReferenceRedirect(fileName) @@ -2011,7 +2021,7 @@ namespace ts.server { break; case ConfigFileProgramReloadLevel.Full: this.openFileWatchTriggered.clear(); - const reason = Debug.assertDefined(this.pendingReloadReason); + const reason = Debug.checkDefined(this.pendingReloadReason); this.pendingReloadReason = undefined; this.projectService.reloadConfiguredProject(this, reason); result = true; diff --git a/src/server/protocol.ts b/src/server/protocol.ts index 94bc3085e928e..5418f6ccce4a1 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -237,11 +237,12 @@ namespace ts.server.protocol { */ metadata?: unknown; - /* @internal */ + /** + * Exposes information about the performance of this request-response pair. + */ performanceData?: PerformanceData; } - /* @internal */ export interface PerformanceData { /** * Time spent updating the program graph, in milliseconds. @@ -3130,6 +3131,8 @@ namespace ts.server.protocol { */ readonly includeAutomaticOptionalChainCompletions?: boolean; readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; + /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ + readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly lazyConfiguredProjectsFromExternalProject?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; diff --git a/src/server/scriptInfo.ts b/src/server/scriptInfo.ts index f630b9329aaa7..0a7a339e5f436 100644 --- a/src/server/scriptInfo.ts +++ b/src/server/scriptInfo.ts @@ -273,6 +273,8 @@ namespace ts.server { /*@internal*/ export function isDynamicFileName(fileName: NormalizedPath) { return fileName[0] === "^" || + ((stringContains(fileName, "walkThroughSnippet:/") || stringContains(fileName, "untitled:/")) && + getBaseFileName(fileName)[0] === "^") || (stringContains(fileName, ":^") && !stringContains(fileName, directorySeparator)); } @@ -555,6 +557,8 @@ namespace ts.server { } getLatestVersion() { + // Ensure we have updated snapshot to give back latest version + this.textStorage.getSnapshot(); return this.textStorage.getVersion(); } diff --git a/src/server/session.ts b/src/server/session.ts index 89231ede0070f..d38e49adc146d 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -443,7 +443,7 @@ namespace ts.server { } while (toDo && toDo.length) { - toDo = callbackProjectAndLocation(Debug.assertDefined(toDo.pop()), projectService, toDo, seenProjects, cb); + toDo = callbackProjectAndLocation(Debug.checkDefined(toDo.pop()), projectService, toDo, seenProjects, cb); } } @@ -1071,7 +1071,7 @@ namespace ts.server { private getDefinitionAndBoundSpan(args: protocol.FileLocationRequestArgs, simplifiedResult: boolean): protocol.DefinitionInfoAndBoundSpan | DefinitionInfoAndBoundSpan { const { file, project } = this.getFileAndProject(args); const position = this.getPositionInFile(args, file); - const scriptInfo = Debug.assertDefined(project.getScriptInfo(file)); + const scriptInfo = Debug.checkDefined(project.getScriptInfo(file)); const unmappedDefinitionAndBoundSpan = project.getLanguageService().getDefinitionAndBoundSpan(file, position); @@ -1335,7 +1335,7 @@ namespace ts.server { if (!simplifiedResult) return locations; const defaultProject = this.getDefaultProject(args); - const renameInfo: protocol.RenameInfo = this.mapRenameInfo(defaultProject.getLanguageService().getRenameInfo(file, position, { allowRenameOfImportPath: this.getPreferences(file).allowRenameOfImportPath }), Debug.assertDefined(this.projectService.getScriptInfo(file))); + const renameInfo: protocol.RenameInfo = this.mapRenameInfo(defaultProject.getLanguageService().getRenameInfo(file, position, { allowRenameOfImportPath: this.getPreferences(file).allowRenameOfImportPath }), Debug.checkDefined(this.projectService.getScriptInfo(file))); return { info: renameInfo, locs: this.toSpanGroups(locations) }; } @@ -1355,7 +1355,7 @@ namespace ts.server { for (const { fileName, textSpan, contextSpan, originalContextSpan: _2, originalTextSpan: _, originalFileName: _1, ...prefixSuffixText } of locations) { let group = map.get(fileName); if (!group) map.set(fileName, group = { file: fileName, locs: [] }); - const scriptInfo = Debug.assertDefined(this.projectService.getScriptInfo(fileName)); + const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(fileName)); group.locs.push({ ...toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo), ...prefixSuffixText }); } return arrayFrom(map.values()); @@ -1382,7 +1382,7 @@ namespace ts.server { const symbolName = nameSpan ? scriptInfo.getSnapshot().getText(nameSpan.start, textSpanEnd(nameSpan)) : ""; const refs: readonly protocol.ReferencesResponseItem[] = flatMap(references, referencedSymbol => referencedSymbol.references.map(({ fileName, textSpan, contextSpan, isWriteAccess, isDefinition }): protocol.ReferencesResponseItem => { - const scriptInfo = Debug.assertDefined(this.projectService.getScriptInfo(fileName)); + const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(fileName)); const span = toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo); const lineSpan = scriptInfo.lineToTextSpan(span.start.line - 1); const lineText = scriptInfo.getSnapshot().getText(lineSpan.start, textSpanEnd(lineSpan)).replace(/\r|\n/g, ""); @@ -1892,7 +1892,7 @@ namespace ts.server { a.fileName === b.fileName && a.isCaseSensitive === b.isCaseSensitive && a.kind === b.kind && - a.kindModifiers === b.containerName && + a.kindModifiers === b.kindModifiers && a.matchKind === b.matchKind && a.name === b.name && a.textSpan.start === b.textSpan.start && @@ -1918,7 +1918,7 @@ namespace ts.server { const { startPosition, endPosition } = this.getStartAndEndPosition(args, scriptInfo); textRange = { pos: startPosition, end: endPosition }; } - return Debug.assertDefined(position === undefined ? textRange : position); + return Debug.checkDefined(position === undefined ? textRange : position); function getPosition(loc: protocol.FileLocationRequestArgs) { return loc.position !== undefined ? loc.position : scriptInfo.lineOffsetToPosition(loc.line, loc.offset); @@ -2145,7 +2145,7 @@ namespace ts.server { private getSmartSelectionRange(args: protocol.SelectionRangeRequestArgs, simplifiedResult: boolean) { const { locations } = args; const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const scriptInfo = Debug.assertDefined(this.projectService.getScriptInfo(file)); + const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file)); return map(locations, location => { const pos = this.getPosition(location, scriptInfo); @@ -2164,15 +2164,18 @@ namespace ts.server { return result; } - private toProtocolCallHierarchyItem(item: CallHierarchyItem, scriptInfo?: ScriptInfo): protocol.CallHierarchyItem { + private getScriptInfoFromProjectService(file: string) { + const normalizedFile = toNormalizedPath(file); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(normalizedFile); if (!scriptInfo) { - const file = toNormalizedPath(item.file); - scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - if (!scriptInfo) { - this.projectService.logErrorForScriptInfoNotFound(file); - return Errors.ThrowNoProject(); - } + this.projectService.logErrorForScriptInfoNotFound(normalizedFile); + return Errors.ThrowNoProject(); } + return scriptInfo; + } + + private toProtocolCallHierarchyItem(item: CallHierarchyItem): protocol.CallHierarchyItem { + const scriptInfo = this.getScriptInfoFromProjectService(item.file); return { name: item.name, kind: item.kind, @@ -2182,7 +2185,8 @@ namespace ts.server { }; } - private toProtocolCallHierarchyIncomingCall(incomingCall: CallHierarchyIncomingCall, scriptInfo: ScriptInfo): protocol.CallHierarchyIncomingCall { + private toProtocolCallHierarchyIncomingCall(incomingCall: CallHierarchyIncomingCall): protocol.CallHierarchyIncomingCall { + const scriptInfo = this.getScriptInfoFromProjectService(incomingCall.from.file); return { from: this.toProtocolCallHierarchyItem(incomingCall.from), fromSpans: incomingCall.fromSpans.map(fromSpan => toProtocolTextSpan(fromSpan, scriptInfo)) @@ -2202,35 +2206,27 @@ namespace ts.server { if (scriptInfo) { const position = this.getPosition(args, scriptInfo); const result = project.getLanguageService().prepareCallHierarchy(file, position); - return result && mapOneOrMany(result, item => this.toProtocolCallHierarchyItem(item, scriptInfo)); + return result && mapOneOrMany(result, item => this.toProtocolCallHierarchyItem(item)); } return undefined; } private provideCallHierarchyIncomingCalls(args: protocol.FileLocationRequestArgs): protocol.CallHierarchyIncomingCall[] { const { file, project } = this.getFileAndProject(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - if (!scriptInfo) { - this.projectService.logErrorForScriptInfoNotFound(file); - return Errors.ThrowNoProject(); - } + const scriptInfo = this.getScriptInfoFromProjectService(file); const incomingCalls = project.getLanguageService().provideCallHierarchyIncomingCalls(file, this.getPosition(args, scriptInfo)); - return incomingCalls.map(call => this.toProtocolCallHierarchyIncomingCall(call, scriptInfo)); + return incomingCalls.map(call => this.toProtocolCallHierarchyIncomingCall(call)); } private provideCallHierarchyOutgoingCalls(args: protocol.FileLocationRequestArgs): protocol.CallHierarchyOutgoingCall[] { const { file, project } = this.getFileAndProject(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - if (!scriptInfo) { - this.projectService.logErrorForScriptInfoNotFound(file); - return Errors.ThrowNoProject(); - } + const scriptInfo = this.getScriptInfoFromProjectService(file); const outgoingCalls = project.getLanguageService().provideCallHierarchyOutgoingCalls(file, this.getPosition(args, scriptInfo)); return outgoingCalls.map(call => this.toProtocolCallHierarchyOutgoingCall(call, scriptInfo)); } getCanonicalFileName(fileName: string) { - const name = this.host.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); + const name = this.host.useCaseSensitiveFileNames ? fileName : toFileNameLowerCase(fileName); return normalizePath(name); } @@ -2294,7 +2290,7 @@ namespace ts.server { request.arguments.changedFiles && mapIterator(arrayIterator(request.arguments.changedFiles), file => ({ fileName: file.fileName, changes: mapDefinedIterator(arrayReverseIterator(file.textChanges), change => { - const scriptInfo = Debug.assertDefined(this.projectService.getScriptInfo(file.fileName)); + const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file.fileName)); const start = scriptInfo.lineOffsetToPosition(change.start.line, change.start.offset); const end = scriptInfo.lineOffsetToPosition(change.end.line, change.end.offset); return start >= 0 ? { span: { start, length: end - start }, newText: change.newText } : undefined; diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index 532944d1cf3f2..81e76a939d761 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -536,7 +536,7 @@ namespace ts.BreakpointResolver { function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node: DestructuringPattern): TextSpan | undefined { Debug.assert(node.kind !== SyntaxKind.ArrayBindingPattern && node.kind !== SyntaxKind.ObjectBindingPattern); - const elements: NodeArray = node.kind === SyntaxKind.ArrayLiteralExpression ? node.elements : (node as ObjectLiteralExpression).properties; + const elements: NodeArray = node.kind === SyntaxKind.ArrayLiteralExpression ? node.elements : node.properties; const firstBindingElement = forEach(elements, element => element.kind !== SyntaxKind.OmittedExpression ? element : undefined); diff --git a/src/services/callHierarchy.ts b/src/services/callHierarchy.ts index 838f9355d3dca..3a114af16ef13 100644 --- a/src/services/callHierarchy.ts +++ b/src/services/callHierarchy.ts @@ -78,7 +78,7 @@ namespace ts.CallHierarchy { if (isSourceFile(node)) return node; if (isNamedDeclaration(node)) return node.name; if (isConstNamedExpression(node)) return node.parent.name; - return Debug.assertDefined(node.modifiers && find(node.modifiers, isDefaultModifier)); + return Debug.checkDefined(node.modifiers && find(node.modifiers, isDefaultModifier)); } function isDefaultModifier(node: Node) { @@ -105,7 +105,7 @@ namespace ts.CallHierarchy { } const declName = isConstNamedExpression(node) ? node.parent.name : - Debug.assertDefined(getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); + Debug.checkDefined(getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); let text = isIdentifier(declName) ? idText(declName) : @@ -260,16 +260,18 @@ namespace ts.CallHierarchy { range: TextRange; } - function convertEntryToCallSite(entry: FindAllReferences.Entry, _originalNode: Node, typeChecker: TypeChecker): CallSite | undefined { + function convertEntryToCallSite(entry: FindAllReferences.Entry): CallSite | undefined { if (entry.kind === FindAllReferences.EntryKind.Node) { - if (isCallOrNewExpressionTarget(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || isTaggedTemplateTag(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || isDecoratorTarget(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || isJsxOpeningLikeElementTagName(entry.node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) - || isRightSideOfPropertyAccess(entry.node) - || isArgumentExpressionOfElementAccess(entry.node)) { - const ancestor = findAncestor(entry.node, isValidCallHierarchyDeclaration) || entry.node.getSourceFile(); - return { declaration: firstOrOnly(findImplementationOrAllInitialDeclarations(typeChecker, ancestor)), range: createTextRangeFromNode(entry.node, entry.node.getSourceFile()) }; + const { node } = entry; + if (isCallOrNewExpressionTarget(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || isTaggedTemplateTag(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || isDecoratorTarget(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || isJsxOpeningLikeElementTagName(node, /*includeElementAccess*/ true, /*skipPastOuterExpressions*/ true) + || isRightSideOfPropertyAccess(node) + || isArgumentExpressionOfElementAccess(node)) { + const sourceFile = node.getSourceFile(); + const ancestor = findAncestor(node, isValidCallHierarchyDeclaration) || sourceFile; + return { declaration: ancestor, range: createTextRangeFromNode(node, sourceFile) }; } } } @@ -293,7 +295,7 @@ namespace ts.CallHierarchy { return []; } const location = getCallHierarchyDeclarationReferenceNode(declaration); - const calls = filter(FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, program.getSourceFiles(), location, /*position*/ 0, /*options*/ undefined, convertEntryToCallSite), isDefined); + const calls = filter(FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, program.getSourceFiles(), location, /*position*/ 0, { use: FindAllReferences.FindReferencesUse.References }, convertEntryToCallSite), isDefined); return calls ? group(calls, getCallSiteGroupKey, entries => convertCallSiteGroupToIncomingCall(program, entries)) : []; } diff --git a/src/services/classifier.ts b/src/services/classifier.ts index 69d1dcdf8e689..1d8f86195b8ae 100644 --- a/src/services/classifier.ts +++ b/src/services/classifier.ts @@ -135,7 +135,7 @@ namespace ts { const lastTemplateStackToken = lastOrUndefined(templateStack); if (lastTemplateStackToken === SyntaxKind.TemplateHead) { - token = scanner.reScanTemplateToken(); + token = scanner.reScanTemplateToken(/* isTaggedTemplate */ false); // Only pop on a TemplateTail; a TemplateMiddle indicates there is more for us. if (token === SyntaxKind.TemplateTail) { diff --git a/src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts b/src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts index c70de5033034e..a6c91e5915181 100644 --- a/src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts +++ b/src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts @@ -14,7 +14,7 @@ namespace ts.codefix { function makeChange(changeTracker: textChanges.ChangeTracker, sourceFile: SourceFile, pos: number) { const token = getTokenAtPosition(sourceFile, pos); - const assertion = Debug.assertDefined(findAncestor(token, (n): n is AsExpression | TypeAssertion => isAsExpression(n) || isTypeAssertion(n)), "Expected to find an assertion expression"); + const assertion = Debug.checkDefined(findAncestor(token, (n): n is AsExpression | TypeAssertion => isAsExpression(n) || isTypeAssertion(n)), "Expected to find an assertion expression"); const replacement = isAsExpression(assertion) ? createAsExpression(assertion.expression, createKeywordTypeNode(SyntaxKind.UnknownKeyword)) : createTypeAssertion(createKeywordTypeNode(SyntaxKind.UnknownKeyword), assertion.expression); diff --git a/src/services/codefixes/addMissingAsync.ts b/src/services/codefixes/addMissingAsync.ts new file mode 100644 index 0000000000000..59b0f2f279da4 --- /dev/null +++ b/src/services/codefixes/addMissingAsync.ts @@ -0,0 +1,87 @@ +/* @internal */ +namespace ts.codefix { + type ContextualTrackChangesFunction = (cb: (changeTracker: textChanges.ChangeTracker) => void) => FileTextChanges[]; + const fixId = "addMissingAsync"; + const errorCodes = [ + Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + Diagnostics.Type_0_is_not_assignable_to_type_1.code, + Diagnostics.Type_0_is_not_comparable_to_type_1.code + ]; + + registerCodeFix({ + fixIds: [fixId], + errorCodes, + getCodeActions: context => { + const { sourceFile, errorCode, cancellationToken, program, span } = context; + const diagnostic = find(program.getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile, cancellationToken), getIsMatchingAsyncError(span, errorCode)); + const directSpan = diagnostic && diagnostic.relatedInformation && find(diagnostic.relatedInformation, r => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code) as TextSpan | undefined; + + const decl = getFixableErrorSpanDeclaration(sourceFile, directSpan); + if (!decl) { + return; + } + + const trackChanges: ContextualTrackChangesFunction = cb => textChanges.ChangeTracker.with(context, cb); + return [getFix(context, decl, trackChanges)]; + }, + getAllCodeActions: context => { + const { sourceFile } = context; + const fixedDeclarations = createMap(); + return codeFixAll(context, errorCodes, (t, diagnostic) => { + const span = diagnostic.relatedInformation && find(diagnostic.relatedInformation, r => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code) as TextSpan | undefined; + const decl = getFixableErrorSpanDeclaration(sourceFile, span); + if (!decl) { + return; + } + const trackChanges: ContextualTrackChangesFunction = cb => (cb(t), []); + return getFix(context, decl, trackChanges, fixedDeclarations); + }); + }, + }); + + type FixableDeclaration = ArrowFunction | FunctionDeclaration | FunctionExpression | MethodDeclaration; + function getFix(context: CodeFixContext | CodeFixAllContext, decl: FixableDeclaration, trackChanges: ContextualTrackChangesFunction, fixedDeclarations?: Map) { + const changes = trackChanges(t => makeChange(t, context.sourceFile, decl, fixedDeclarations)); + return createCodeFixAction(fixId, changes, Diagnostics.Add_async_modifier_to_containing_function, fixId, Diagnostics.Add_all_missing_async_modifiers); + } + + function makeChange(changeTracker: textChanges.ChangeTracker, sourceFile: SourceFile, insertionSite: FixableDeclaration, fixedDeclarations?: Map) { + if (fixedDeclarations) { + if (fixedDeclarations.has(getNodeId(insertionSite).toString())) { + return; + } + } + fixedDeclarations?.set(getNodeId(insertionSite).toString(), true); + const cloneWithModifier = getSynthesizedDeepClone(insertionSite, /*includeTrivia*/ true); + cloneWithModifier.modifiers = createNodeArray(createModifiersFromModifierFlags(getModifierFlags(insertionSite) | ModifierFlags.Async)); + cloneWithModifier.modifierFlagsCache = 0; + changeTracker.replaceNode( + sourceFile, + insertionSite, + cloneWithModifier); + } + + function getFixableErrorSpanDeclaration(sourceFile: SourceFile, span: TextSpan | undefined): FixableDeclaration | undefined { + if (!span) return undefined; + const token = getTokenAtPosition(sourceFile, span.start); + // Checker has already done work to determine that async might be possible, and has attached + // related info to the node, so start by finding the signature that exactly matches up + // with the diagnostic range. + const decl = findAncestor(token, node => { + if (node.getStart(sourceFile) < span.start || node.getEnd() > textSpanEnd(span)) { + return "quit"; + } + return (isArrowFunction(node) || isMethodDeclaration(node) || isFunctionExpression(node) || isFunctionDeclaration(node)) && textSpansEqual(span, createTextSpanFromNode(node, sourceFile)); + }) as FixableDeclaration | undefined; + + return decl; + } + + function getIsMatchingAsyncError(span: TextSpan, errorCode: number) { + return ({ start, length, relatedInformation, code }: Diagnostic) => + isNumber(start) && isNumber(length) && textSpansEqual({ start, length }, span) && + code === errorCode && + !!relatedInformation && + some(relatedInformation, related => related.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code); + } +} diff --git a/src/services/codefixes/annotateWithTypeFromJSDoc.ts b/src/services/codefixes/annotateWithTypeFromJSDoc.ts index 3428a60201fd9..55d2544a5ca05 100644 --- a/src/services/codefixes/annotateWithTypeFromJSDoc.ts +++ b/src/services/codefixes/annotateWithTypeFromJSDoc.ts @@ -60,7 +60,7 @@ namespace ts.codefix { } } else { - const jsdocType = Debug.assertDefined(getJSDocType(decl), "A JSDocType for this declaration should exist"); // If not defined, shouldn't have been an error to fix + const jsdocType = Debug.checkDefined(getJSDocType(decl), "A JSDocType for this declaration should exist"); // If not defined, shouldn't have been an error to fix Debug.assert(!decl.type, "The JSDocType decl should have a type"); // If defined, shouldn't have been an error to fix. changes.tryInsertTypeAnnotation(sourceFile, decl, transformJSDocType(jsdocType)); } diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts index a75e58135e03b..d7b9ab0737d9b 100644 --- a/src/services/codefixes/fixAddMissingMember.ts +++ b/src/services/codefixes/fixAddMissingMember.ts @@ -129,23 +129,26 @@ namespace ts.codefix { const { symbol } = leftExpressionType; if (!symbol || !symbol.declarations) return undefined; - const isClass = find(symbol.declarations, isClassLike); + const classDeclaration = find(symbol.declarations, isClassLike); // Don't suggest adding private identifiers to anything other than a class. - if (!isClass && isPrivateIdentifier(token)) { + if (!classDeclaration && isPrivateIdentifier(token)) { return undefined; } // Prefer to change the class instead of the interface if they are merged - const classOrInterface = isClass || find(symbol.declarations, isInterfaceDeclaration); + const classOrInterface = classDeclaration || find(symbol.declarations, isInterfaceDeclaration); if (classOrInterface && !program.isSourceFileFromExternalLibrary(classOrInterface.getSourceFile())) { const makeStatic = ((leftExpressionType as TypeReference).target || leftExpressionType) !== checker.getDeclaredTypeOfSymbol(symbol); - // Static private identifier properties are not supported yet. - if (makeStatic && isPrivateIdentifier(token)) return undefined; + if (makeStatic && (isPrivateIdentifier(token) || isInterfaceDeclaration(classOrInterface))) { + return undefined; + } + const declSourceFile = classOrInterface.getSourceFile(); const inJs = isSourceFileJS(declSourceFile); const call = tryCast(parent.parent, isCallExpression); return { kind: InfoKind.ClassOrInterface, token, parentDeclaration: classOrInterface, makeStatic, declSourceFile, inJs, call }; } + const enumDeclaration = find(symbol.declarations, isEnumDeclaration); if (enumDeclaration && !isPrivateIdentifier(token) && !program.isSourceFileFromExternalLibrary(enumDeclaration.getSourceFile())) { return { kind: InfoKind.Enum, token, parentDeclaration: enumDeclaration }; diff --git a/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts b/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts index d18bc50639a85..a27ded9d403f8 100644 --- a/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts +++ b/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts @@ -41,7 +41,9 @@ namespace ts.codefix { // so duplicates cannot occur. const abstractAndNonPrivateExtendsSymbols = checker.getPropertiesOfType(instantiatedExtendsType).filter(symbolPointsToNonPrivateAndAbstractMember); - createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, context, preferences, member => changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, member)); + const importAdder = createImportAdder(sourceFile, context.program, preferences, context.host); + createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, context, preferences, importAdder, member => changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, member)); + importAdder.writeFixes(changeTracker); } function symbolPointsToNonPrivateAndAbstractMember(symbol: Symbol): boolean { diff --git a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts index 0735e85bc7004..4059ee03ca7bd 100644 --- a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts +++ b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts @@ -10,7 +10,7 @@ namespace ts.codefix { getCodeActions(context) { const { sourceFile, span } = context; const classDeclaration = getClass(sourceFile, span.start); - return mapDefined(getClassImplementsHeritageClauseElements(classDeclaration), implementedTypeNode => { + return mapDefined(getEffectiveImplementsTypeNodes(classDeclaration), implementedTypeNode => { const changes = textChanges.ChangeTracker.with(context, t => addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, t, context.preferences)); return changes.length === 0 ? undefined : createCodeFixAction(fixId, changes, [Diagnostics.Implement_interface_0, implementedTypeNode.getText(sourceFile)], fixId, Diagnostics.Implement_all_unimplemented_interfaces); }); @@ -21,7 +21,7 @@ namespace ts.codefix { return codeFixAll(context, errorCodes, (changes, diag) => { const classDeclaration = getClass(diag.file, diag.start); if (addToSeen(seenClassDeclarations, getNodeId(classDeclaration))) { - for (const implementedTypeNode of getClassImplementsHeritageClauseElements(classDeclaration)!) { + for (const implementedTypeNode of getEffectiveImplementsTypeNodes(classDeclaration)!) { addMissingDeclarations(context, implementedTypeNode, diag.file, classDeclaration, changes, context.preferences); } } @@ -30,10 +30,10 @@ namespace ts.codefix { }); function getClass(sourceFile: SourceFile, pos: number): ClassLikeDeclaration { - return Debug.assertDefined(getContainingClass(getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); + return Debug.checkDefined(getContainingClass(getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); } - function symbolPointsToNonPrivateMember (symbol: Symbol) { + function symbolPointsToNonPrivateMember(symbol: Symbol) { return !symbol.valueDeclaration || !(getModifierFlags(symbol.valueDeclaration) & ModifierFlags.Private); } @@ -63,7 +63,9 @@ namespace ts.codefix { createMissingIndexSignatureDeclaration(implementedType, IndexKind.String); } - createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, member => insertInterfaceMemberNode(sourceFile, classDeclaration, member)); + const importAdder = createImportAdder(sourceFile, context.program, preferences, context.host); + createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, importAdder, member => insertInterfaceMemberNode(sourceFile, classDeclaration, member)); + importAdder.writeFixes(changeTracker); function createMissingIndexSignatureDeclaration(type: InterfaceType, kind: IndexKind): void { const indexInfoOfKind = checker.getIndexInfoOfType(type, kind); @@ -83,7 +85,7 @@ namespace ts.codefix { } } - function getHeritageClauseSymbolTable (classDeclaration: ClassLikeDeclaration, checker: TypeChecker): SymbolTable { + function getHeritageClauseSymbolTable(classDeclaration: ClassLikeDeclaration, checker: TypeChecker): SymbolTable { const heritageClauseNode = getEffectiveBaseTypeNode(classDeclaration); if (!heritageClauseNode) return createSymbolTable(); const heritageClauseType = checker.getTypeAtLocation(heritageClauseNode) as InterfaceType; diff --git a/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts b/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts index 4fb14545a2004..d8e58fcbe7a0d 100644 --- a/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts +++ b/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts @@ -17,8 +17,8 @@ namespace ts.codefix { function getNode(sourceFile: SourceFile, pos: number): ConstructorDeclaration { const token = getTokenAtPosition(sourceFile, pos); - Debug.assert(token.kind === SyntaxKind.ConstructorKeyword, "token should be at the constructor keyword"); - return token.parent as ConstructorDeclaration; + Debug.assert(isConstructorDeclaration(token.parent), "token should be at the constructor declaration"); + return token.parent; } function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, ctr: ConstructorDeclaration) { diff --git a/src/services/codefixes/fixInvalidJsxCharacters.ts b/src/services/codefixes/fixInvalidJsxCharacters.ts new file mode 100644 index 0000000000000..f765c3558dc76 --- /dev/null +++ b/src/services/codefixes/fixInvalidJsxCharacters.ts @@ -0,0 +1,42 @@ +/* @internal */ +namespace ts.codefix { + const fixIdHtmlEntity = "invalidJsxCharactersConvertToHtmlEntity"; + const fixIdExpression = "invalidJsxCharactersConvertToExpression"; + + const errorCodes = [Diagnostics.Unexpected_token_Did_you_mean_or_gt.code, Diagnostics.Unexpected_token_Did_you_mean_or_rbrace.code]; + + registerCodeFix({ + errorCodes, + getCodeActions: context => { + const { sourceFile, span } = context; + const changeToExpression = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, span.start, /* useHtmlEntity */ false)); + const changeToHtmlEntity = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, span.start, /* useHtmlEntity */ true)); + return [ + createCodeFixActionWithoutFixAll(fixIdExpression, changeToExpression, Diagnostics.Wrap_invalid_character_in_an_expression_container), + createCodeFixAction(fixIdHtmlEntity, changeToHtmlEntity, Diagnostics.Convert_invalid_character_to_its_html_entity_code, fixIdHtmlEntity, Diagnostics.Convert_invalid_character_to_its_html_entity_code), + ]; + }, + fixIds: [fixIdExpression, fixIdHtmlEntity], + }); + + const htmlEntity = { + ">": ">", + "}": "}", + }; + function isValidCharacter(character: string): character is keyof typeof htmlEntity { + return hasProperty(htmlEntity, character); + } + + function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, start: number, useHtmlEntity: boolean) { + const character = sourceFile.getText()[start]; + // sanity check + if (!isValidCharacter(character)) { + return; + } + + const replacement = useHtmlEntity + ? htmlEntity[character] + : `{'${character}'}`; + changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement); + } +} diff --git a/src/services/codefixes/fixSpelling.ts b/src/services/codefixes/fixSpelling.ts index 037f00462c05a..05ed9424b740d 100644 --- a/src/services/codefixes/fixSpelling.ts +++ b/src/services/codefixes/fixSpelling.ts @@ -32,24 +32,24 @@ namespace ts.codefix { // this.speling = 1; // ^^^^^^^ const node = getTokenAtPosition(sourceFile, pos); + const parent = node.parent; const checker = context.program.getTypeChecker(); let suggestedSymbol: Symbol | undefined; - if (isPropertyAccessExpression(node.parent) && node.parent.name === node) { + if (isPropertyAccessExpression(parent) && parent.name === node) { Debug.assert(isIdentifierOrPrivateIdentifier(node), "Expected an identifier for spelling (property access)"); - let containingType = checker.getTypeAtLocation(node.parent.expression); - if (node.parent.flags & NodeFlags.OptionalChain) { + let containingType = checker.getTypeAtLocation(parent.expression); + if (parent.flags & NodeFlags.OptionalChain) { containingType = checker.getNonNullableType(containingType); } - const name = node as Identifier | PrivateIdentifier; - suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(name, containingType); + suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); } - else if (isImportSpecifier(node.parent) && node.parent.name === node) { - Debug.assert(node.kind === SyntaxKind.Identifier, "Expected an identifier for spelling (import)"); + else if (isImportSpecifier(parent) && parent.name === node) { + Debug.assertNode(node, isIdentifier, "Expected an identifier for spelling (import)"); const importDeclaration = findAncestor(node, isImportDeclaration)!; const resolvedSourceFile = getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration); if (resolvedSourceFile && resolvedSourceFile.symbol) { - suggestedSymbol = checker.getSuggestedSymbolForNonexistentModule(node as Identifier, resolvedSourceFile.symbol); + suggestedSymbol = checker.getSuggestedSymbolForNonexistentModule(node, resolvedSourceFile.symbol); } } else { @@ -92,7 +92,7 @@ namespace ts.codefix { return flags; } - function getResolvedSourceFileFromImportDeclaration (sourceFile: SourceFile, context: CodeFixContextBase, importDeclaration: ImportDeclaration): SourceFile | undefined { + function getResolvedSourceFileFromImportDeclaration(sourceFile: SourceFile, context: CodeFixContextBase, importDeclaration: ImportDeclaration): SourceFile | undefined { if (!importDeclaration || !isStringLiteralLike(importDeclaration.moduleSpecifier)) return undefined; const resolvedModule = getResolvedModule(sourceFile, importDeclaration.moduleSpecifier.text); diff --git a/src/services/codefixes/fixStrictClassInitialization.ts b/src/services/codefixes/fixStrictClassInitialization.ts index 15c57c604ddf1..f3286246e164b 100644 --- a/src/services/codefixes/fixStrictClassInitialization.ts +++ b/src/services/codefixes/fixStrictClassInitialization.ts @@ -47,12 +47,12 @@ namespace ts.codefix { }, }); - function getPropertyDeclaration (sourceFile: SourceFile, pos: number): PropertyDeclaration | undefined { + function getPropertyDeclaration(sourceFile: SourceFile, pos: number): PropertyDeclaration | undefined { const token = getTokenAtPosition(sourceFile, pos); return isIdentifier(token) ? cast(token.parent, isPropertyDeclaration) : undefined; } - function getActionForAddMissingDefiniteAssignmentAssertion (context: CodeFixContext, propertyDeclaration: PropertyDeclaration): CodeFixAction { + function getActionForAddMissingDefiniteAssignmentAssertion(context: CodeFixContext, propertyDeclaration: PropertyDeclaration): CodeFixAction { const changes = textChanges.ChangeTracker.with(context, t => addDefiniteAssignmentAssertion(t, context.sourceFile, propertyDeclaration)); return createCodeFixAction(fixName, changes, [Diagnostics.Add_definite_assignment_assertion_to_property_0, propertyDeclaration.getText()], fixIdAddDefiniteAssignmentAssertions, Diagnostics.Add_definite_assignment_assertions_to_all_uninitialized_properties); } @@ -70,7 +70,7 @@ namespace ts.codefix { changeTracker.replaceNode(propertyDeclarationSourceFile, propertyDeclaration, property); } - function getActionForAddMissingUndefinedType (context: CodeFixContext, propertyDeclaration: PropertyDeclaration): CodeFixAction { + function getActionForAddMissingUndefinedType(context: CodeFixContext, propertyDeclaration: PropertyDeclaration): CodeFixAction { const changes = textChanges.ChangeTracker.with(context, t => addUndefinedType(t, context.sourceFile, propertyDeclaration)); return createCodeFixAction(fixName, changes, [Diagnostics.Add_undefined_type_to_property_0, propertyDeclaration.name.getText()], fixIdAddUndefinedType, Diagnostics.Add_undefined_type_to_all_uninitialized_properties); } @@ -91,7 +91,7 @@ namespace ts.codefix { return createCodeFixAction(fixName, changes, [Diagnostics.Add_initializer_to_property_0, propertyDeclaration.name.getText()], fixIdAddInitializer, Diagnostics.Add_initializers_to_all_uninitialized_properties); } - function addInitializer (changeTracker: textChanges.ChangeTracker, propertyDeclarationSourceFile: SourceFile, propertyDeclaration: PropertyDeclaration, initializer: Expression): void { + function addInitializer(changeTracker: textChanges.ChangeTracker, propertyDeclarationSourceFile: SourceFile, propertyDeclaration: PropertyDeclaration, initializer: Expression): void { const property = updateProperty( propertyDeclaration, propertyDeclaration.decorators, @@ -108,7 +108,7 @@ namespace ts.codefix { return getDefaultValueFromType(checker, checker.getTypeFromTypeNode(propertyDeclaration.type!)); // TODO: GH#18217 } - function getDefaultValueFromType (checker: TypeChecker, type: Type): Expression | undefined { + function getDefaultValueFromType(checker: TypeChecker, type: Type): Expression | undefined { if (type.flags & TypeFlags.BooleanLiteral) { return (type === checker.getFalseType() || type === checker.getFalseType(/*fresh*/ true)) ? createFalse() : createTrue(); } diff --git a/src/services/codefixes/fixUnreachableCode.ts b/src/services/codefixes/fixUnreachableCode.ts index cff396fccbbf6..2603345b27675 100644 --- a/src/services/codefixes/fixUnreachableCode.ts +++ b/src/services/codefixes/fixUnreachableCode.ts @@ -49,7 +49,7 @@ namespace ts.codefix { if (isBlock(statement.parent)) { const end = start + length; - const lastStatement = Debug.assertDefined(lastWhere(sliceAfter(statement.parent.statements, statement), s => s.pos < end), "Some statement should be last"); + const lastStatement = Debug.checkDefined(lastWhere(sliceAfter(statement.parent.statements, statement), s => s.pos < end), "Some statement should be last"); changes.deleteNodeRange(sourceFile, statement, lastStatement); } else { diff --git a/src/services/codefixes/fixUnusedIdentifier.ts b/src/services/codefixes/fixUnusedIdentifier.ts index 313597bed809d..8439c1e8fc351 100644 --- a/src/services/codefixes/fixUnusedIdentifier.ts +++ b/src/services/codefixes/fixUnusedIdentifier.ts @@ -117,7 +117,7 @@ namespace ts.codefix { } function deleteTypeParameters(changes: textChanges.ChangeTracker, sourceFile: SourceFile, token: Node): void { - changes.delete(sourceFile, Debug.assertDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); + changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } // Sometimes the diagnostic span is an entire ImportDeclaration, so we should remove the whole thing. diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts index b1893f2e93c24..b2e05fab06c3f 100644 --- a/src/services/codefixes/helpers.ts +++ b/src/services/codefixes/helpers.ts @@ -4,13 +4,14 @@ namespace ts.codefix { * Finds members of the resolved type that are missing in the class pointed to by class decl * and generates source code for the missing members. * @param possiblyMissingSymbols The collection of symbols to filter and then get insertions for. + * @param importAdder If provided, type annotations will use identifier type references instead of ImportTypeNodes, and the missing imports will be added to the importAdder. * @returns Empty string iff there are no member insertions. */ - export function createMissingMemberNodes(classDeclaration: ClassLikeDeclaration, possiblyMissingSymbols: readonly Symbol[], context: TypeConstructionContext, preferences: UserPreferences, out: (node: ClassElement) => void): void { + export function createMissingMemberNodes(classDeclaration: ClassLikeDeclaration, possiblyMissingSymbols: readonly Symbol[], context: TypeConstructionContext, preferences: UserPreferences, importAdder: ImportAdder | undefined, addClassElement: (node: ClassElement) => void): void { const classMembers = classDeclaration.symbol.members!; for (const symbol of possiblyMissingSymbols) { if (!classMembers.has(symbol.escapedName)) { - addNewNodeForMemberSymbol(symbol, classDeclaration, context, preferences, out); + addNewNodeForMemberSymbol(symbol, classDeclaration, context, preferences, importAdder, addClassElement); } } } @@ -19,7 +20,7 @@ namespace ts.codefix { return { directoryExists: context.host.directoryExists ? d => context.host.directoryExists!(d) : undefined, fileExists: context.host.fileExists ? f => context.host.fileExists!(f) : undefined, - getCurrentDirectory: context.host.getCurrentDirectory ? () => context.host.getCurrentDirectory!() : undefined, + getCurrentDirectory: context.host.getCurrentDirectory ? () => context.host.getCurrentDirectory() : undefined, readFile: context.host.readFile ? f => context.host.readFile!(f) : undefined, useCaseSensitiveFileNames: context.host.useCaseSensitiveFileNames ? () => context.host.useCaseSensitiveFileNames!() : undefined, getSourceFiles: () => context.program.getSourceFiles(), @@ -36,19 +37,19 @@ namespace ts.codefix { export interface TypeConstructionContext { program: Program; - host: ModuleSpecifierResolutionHost; + host: LanguageServiceHost; } /** * @returns Empty string iff there we can't figure out a representation for `symbol` in `enclosingDeclaration`. */ - function addNewNodeForMemberSymbol(symbol: Symbol, enclosingDeclaration: ClassLikeDeclaration, context: TypeConstructionContext, preferences: UserPreferences, out: (node: Node) => void): void { + function addNewNodeForMemberSymbol(symbol: Symbol, enclosingDeclaration: ClassLikeDeclaration, context: TypeConstructionContext, preferences: UserPreferences, importAdder: ImportAdder | undefined, addClassElement: (node: Node) => void): void { const declarations = symbol.getDeclarations(); if (!(declarations && declarations.length)) { return undefined; } const checker = context.program.getTypeChecker(); - + const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); const declaration = declarations[0]; const name = getSynthesizedDeepClone(getNameOfDeclaration(declaration), /*includeTrivia*/ false) as PropertyName; const visibilityModifier = createVisibilityModifier(getModifierFlags(declaration)); @@ -61,8 +62,15 @@ namespace ts.codefix { case SyntaxKind.PropertySignature: case SyntaxKind.PropertyDeclaration: const flags = preferences.quotePreference === "single" ? NodeBuilderFlags.UseSingleQuotesForStringLiteralType : undefined; - const typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); - out(createProperty( + let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); + if (importAdder) { + const importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget); + if (importableReference) { + typeNode = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + addClassElement(createProperty( /*decorators*/undefined, modifiers, name, @@ -72,14 +80,21 @@ namespace ts.codefix { break; case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: { + let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); const allAccessors = getAllAccessorDeclarations(declarations, declaration as AccessorDeclaration); - const typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); const orderedAccessors = allAccessors.secondAccessor ? [allAccessors.firstAccessor, allAccessors.secondAccessor] : [allAccessors.firstAccessor]; + if (importAdder) { + const importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget); + if (importableReference) { + typeNode = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } for (const accessor of orderedAccessors) { if (isGetAccessorDeclaration(accessor)) { - out(createGetAccessor( + addClassElement(createGetAccessor( /*decorators*/ undefined, modifiers, name, @@ -91,7 +106,7 @@ namespace ts.codefix { Debug.assertNode(accessor, isSetAccessorDeclaration, "The counterpart to a getter should be a setter"); const parameter = getSetAccessorValueParameter(accessor); const parameterName = parameter && isIdentifier(parameter.name) ? idText(parameter.name) : undefined; - out(createSetAccessor( + addClassElement(createSetAccessor( /*decorators*/ undefined, modifiers, name, @@ -134,15 +149,15 @@ namespace ts.codefix { } else { Debug.assert(declarations.length === signatures.length, "Declarations and signatures should match count"); - out(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); + addClassElement(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); } } break; } function outputMethod(signature: Signature, modifiers: NodeArray | undefined, name: PropertyName, body?: Block): void { - const method = signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body); - if (method) out(method); + const method = signatureToMethodDeclaration(context, signature, enclosingDeclaration, modifiers, name, optional, body, importAdder); + if (method) addClassElement(method); } } @@ -154,13 +169,53 @@ namespace ts.codefix { name: PropertyName, optional: boolean, body: Block | undefined, + importAdder: ImportAdder | undefined, ): MethodDeclaration | undefined { const program = context.program; - const signatureDeclaration = program.getTypeChecker().signatureToSignatureDeclaration(signature, SyntaxKind.MethodDeclaration, enclosingDeclaration, NodeBuilderFlags.NoTruncation | NodeBuilderFlags.SuppressAnyReturnType, getNoopSymbolTrackerWithResolver(context)); + const checker = program.getTypeChecker(); + const scriptTarget = getEmitScriptTarget(program.getCompilerOptions()); + const signatureDeclaration = checker.signatureToSignatureDeclaration(signature, SyntaxKind.MethodDeclaration, enclosingDeclaration, NodeBuilderFlags.NoTruncation | NodeBuilderFlags.SuppressAnyReturnType, getNoopSymbolTrackerWithResolver(context)); if (!signatureDeclaration) { return undefined; } + if (importAdder) { + if (signatureDeclaration.typeParameters) { + forEach(signatureDeclaration.typeParameters, (typeParameterDecl, i) => { + const typeParameter = signature.typeParameters![i]; + if (typeParameterDecl.constraint) { + const importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeParameterDecl.constraint, typeParameter.constraint, scriptTarget); + if (importableReference) { + typeParameterDecl.constraint = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + if (typeParameterDecl.default) { + const importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeParameterDecl.default, typeParameter.default, scriptTarget); + if (importableReference) { + typeParameterDecl.default = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + }); + } + forEach(signatureDeclaration.parameters, (parameterDecl, i) => { + const parameter = signature.parameters[i]; + const importableReference = tryGetAutoImportableReferenceFromImportTypeNode(parameterDecl.type, checker.getTypeAtLocation(parameter.valueDeclaration), scriptTarget); + if (importableReference) { + parameterDecl.type = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + }); + if (signatureDeclaration.type) { + const importableReference = tryGetAutoImportableReferenceFromImportTypeNode(signatureDeclaration.type, signature.resolvedReturnType, scriptTarget); + if (importableReference) { + signatureDeclaration.type = importableReference.typeReference; + importSymbols(importAdder, importableReference.symbols); + } + } + } + signatureDeclaration.decorators = undefined; signatureDeclaration.modifiers = modifiers; signatureDeclaration.name = name; @@ -359,4 +414,51 @@ namespace ts.codefix { export function findJsonProperty(obj: ObjectLiteralExpression, name: string): PropertyAssignment | undefined { return find(obj.properties, (p): p is PropertyAssignment => isPropertyAssignment(p) && !!p.name && isStringLiteral(p.name) && p.name.text === name); } + + /** + * Given an ImportTypeNode 'import("./a").SomeType>', + * returns an equivalent type reference node with any nested ImportTypeNodes also replaced + * with type references, and a list of symbols that must be imported to use the type reference. + */ + export function tryGetAutoImportableReferenceFromImportTypeNode(importTypeNode: TypeNode | undefined, type: Type | undefined, scriptTarget: ScriptTarget) { + if (importTypeNode && isLiteralImportTypeNode(importTypeNode) && importTypeNode.qualifier && (!type || type.symbol)) { + // Symbol for the left-most thing after the dot + const firstIdentifier = getFirstIdentifier(importTypeNode.qualifier); + const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget); + const qualifier = name !== firstIdentifier.text + ? replaceFirstIdentifierOfEntityName(importTypeNode.qualifier, createIdentifier(name)) + : importTypeNode.qualifier; + + const symbols = [firstIdentifier.symbol]; + const typeArguments: TypeNode[] = []; + if (importTypeNode.typeArguments) { + importTypeNode.typeArguments.forEach(arg => { + const ref = tryGetAutoImportableReferenceFromImportTypeNode(arg, /*undefined*/ type, scriptTarget); + if (ref) { + symbols.push(...ref.symbols); + typeArguments.push(ref.typeReference); + } + else { + typeArguments.push(arg); + } + }); + } + + return { + symbols, + typeReference: createTypeReferenceNode(qualifier, typeArguments) + }; + } + } + + function replaceFirstIdentifierOfEntityName(name: EntityName, newIdentifier: Identifier): EntityName { + if (name.kind === SyntaxKind.Identifier) { + return newIdentifier; + } + return createQualifiedName(replaceFirstIdentifierOfEntityName(name.left, newIdentifier), name.right); + } + + function importSymbols(importAdder: ImportAdder, symbols: readonly Symbol[]) { + symbols.forEach(s => importAdder.addImportFromExportedSymbol(s, /*usageIsTypeOnly*/ true)); + } } diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 64c9c93189842..7cb59708500ac 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -24,90 +24,121 @@ namespace ts.codefix { }, fixIds: [importFixId], getAllCodeActions: context => { - const { sourceFile, preferences } = context; - - // Namespace fixes don't conflict, so just build a list. - const addToNamespace: FixUseNamespaceImport[] = []; - const importType: FixUseImportType[] = []; - // Keys are import clause node IDs. - const addToExisting = createMap<{ readonly importClause: ImportClause, defaultImport: string | undefined; readonly namedImports: string[], canUseTypeOnlyImport: boolean }>(); - const newImports = createMap>(); - let lastModuleSpecifier: string | undefined; - - eachDiagnostic(context, errorCodes, diag => { - const info = getFixesInfo(context, diag.code, diag.start); - if (!info || !info.fixes.length) return; - const { fixes, symbolName } = info; - - const fix = first(fixes); - switch (fix.kind) { - case ImportFixKind.UseNamespace: - addToNamespace.push(fix); - break; - case ImportFixKind.ImportType: - importType.push(fix); - break; - case ImportFixKind.AddToExisting: { - const { importClause, importKind, canUseTypeOnlyImport } = fix; - const key = String(getNodeId(importClause)); - let entry = addToExisting.get(key); - if (!entry) { - addToExisting.set(key, entry = { importClause, defaultImport: undefined, namedImports: [], canUseTypeOnlyImport }); - } - if (importKind === ImportKind.Named) { - pushIfUnique(entry.namedImports, symbolName); - } - else { - Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add to Existing) Default import should be missing or match symbolName"); - entry.defaultImport = symbolName; - } - break; + const { sourceFile, program, preferences, host } = context; + const importAdder = createImportAdder(sourceFile, program, preferences, host); + eachDiagnostic(context, errorCodes, diag => importAdder.addImportFromDiagnostic(diag, context)); + return createCombinedCodeActions(textChanges.ChangeTracker.with(context, importAdder.writeFixes)); + }, + }); + + export interface ImportAdder { + addImportFromDiagnostic: (diagnostic: DiagnosticWithLocation, context: CodeFixContextBase) => void; + addImportFromExportedSymbol: (exportedSymbol: Symbol, usageIsTypeOnly?: boolean) => void; + writeFixes: (changeTracker: textChanges.ChangeTracker) => void; + } + + export function createImportAdder(sourceFile: SourceFile, program: Program, preferences: UserPreferences, host: LanguageServiceHost): ImportAdder { + const compilerOptions = program.getCompilerOptions(); + // Namespace fixes don't conflict, so just build a list. + const addToNamespace: FixUseNamespaceImport[] = []; + const importType: FixUseImportType[] = []; + // Keys are import clause node IDs. + const addToExisting = createMap<{ readonly importClause: ImportClause, defaultImport: string | undefined; readonly namedImports: string[], canUseTypeOnlyImport: boolean }>(); + const newImports = createMap>(); + let lastModuleSpecifier: string | undefined; + return { addImportFromDiagnostic, addImportFromExportedSymbol, writeFixes }; + + function addImportFromDiagnostic(diagnostic: DiagnosticWithLocation, context: CodeFixContextBase) { + const info = getFixesInfo(context, diagnostic.code, diagnostic.start); + if (!info || !info.fixes.length) return; + addImport(info); + } + + function addImportFromExportedSymbol(exportedSymbol: Symbol, usageIsTypeOnly?: boolean) { + const moduleSymbol = Debug.checkDefined(exportedSymbol.parent); + const symbolName = getNameForExportedSymbol(exportedSymbol, getEmitScriptTarget(compilerOptions)); + const checker = program.getTypeChecker(); + const symbol = checker.getMergedSymbol(skipAlias(exportedSymbol, checker)); + const exportInfos = getAllReExportingModules(sourceFile, symbol, moduleSymbol, symbolName, sourceFile, compilerOptions, checker, program.getSourceFiles()); + const preferTypeOnlyImport = !!usageIsTypeOnly && compilerOptions.importsNotUsedAsValues === ImportsNotUsedAsValues.Error; + const fix = getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, /*position*/ undefined, preferTypeOnlyImport, host, preferences); + addImport({ fixes: [fix], symbolName }); + } + + function addImport(info: FixesInfo) { + const { fixes, symbolName } = info; + const fix = first(fixes); + switch (fix.kind) { + case ImportFixKind.UseNamespace: + addToNamespace.push(fix); + break; + case ImportFixKind.ImportType: + importType.push(fix); + break; + case ImportFixKind.AddToExisting: { + const { importClause, importKind, canUseTypeOnlyImport } = fix; + const key = String(getNodeId(importClause)); + let entry = addToExisting.get(key); + if (!entry) { + addToExisting.set(key, entry = { importClause, defaultImport: undefined, namedImports: [], canUseTypeOnlyImport }); } - case ImportFixKind.AddNew: { - const { moduleSpecifier, importKind } = fix; - let entry = newImports.get(moduleSpecifier); - if (!entry) { - newImports.set(moduleSpecifier, entry = { defaultImport: undefined, namedImports: [], namespaceLikeImport: undefined }); - lastModuleSpecifier = moduleSpecifier; - } - switch (importKind) { - case ImportKind.Default: - Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add new) Default import should be missing or match symbolName"); - entry.defaultImport = symbolName; - break; - case ImportKind.Named: - pushIfUnique(entry.namedImports, symbolName); - break; - case ImportKind.Equals: - case ImportKind.Namespace: - Debug.assert(entry.namespaceLikeImport === undefined || entry.namespaceLikeImport.name === symbolName, "Namespacelike import shoudl be missing or match symbolName"); - entry.namespaceLikeImport = { importKind, name: symbolName }; - break; - } - break; + if (importKind === ImportKind.Named) { + pushIfUnique(entry.namedImports, symbolName); } - default: - Debug.assertNever(fix, `fix wasn't never - got kind ${(fix as ImportFix).kind}`); - } - }); - - return createCombinedCodeActions(textChanges.ChangeTracker.with(context, changes => { - const quotePreference = getQuotePreference(sourceFile, preferences); - for (const fix of addToNamespace) { - addNamespaceQualifier(changes, sourceFile, fix); + else { + Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add to Existing) Default import should be missing or match symbolName"); + entry.defaultImport = symbolName; + } + break; } - for (const fix of importType) { - addImportType(changes, sourceFile, fix, quotePreference); + case ImportFixKind.AddNew: { + const { moduleSpecifier, importKind, typeOnly } = fix; + let entry = newImports.get(moduleSpecifier); + if (!entry) { + newImports.set(moduleSpecifier, entry = { defaultImport: undefined, namedImports: [], namespaceLikeImport: undefined, typeOnly }); + lastModuleSpecifier = moduleSpecifier; + } + else { + // An import clause can only be type-only if every import fix contributing to it can be type-only. + entry.typeOnly = entry.typeOnly && typeOnly; + } + switch (importKind) { + case ImportKind.Default: + Debug.assert(entry.defaultImport === undefined || entry.defaultImport === symbolName, "(Add new) Default import should be missing or match symbolName"); + entry.defaultImport = symbolName; + break; + case ImportKind.Named: + pushIfUnique(entry.namedImports, symbolName); + break; + case ImportKind.Equals: + case ImportKind.Namespace: + Debug.assert(entry.namespaceLikeImport === undefined || entry.namespaceLikeImport.name === symbolName, "Namespacelike import shoudl be missing or match symbolName"); + entry.namespaceLikeImport = { importKind, name: symbolName }; + break; + } + break; } - addToExisting.forEach(({ importClause, defaultImport, namedImports, canUseTypeOnlyImport }) => { - doAddExistingFix(changes, sourceFile, importClause, defaultImport, namedImports, canUseTypeOnlyImport); - }); - newImports.forEach((imports, moduleSpecifier) => { - addNewImports(changes, sourceFile, moduleSpecifier, quotePreference, imports, /*blankLineBetween*/ lastModuleSpecifier === moduleSpecifier); - }); - })); - }, - }); + default: + Debug.assertNever(fix, `fix wasn't never - got kind ${(fix as ImportFix).kind}`); + } + } + + function writeFixes(changeTracker: textChanges.ChangeTracker) { + const quotePreference = getQuotePreference(sourceFile, preferences); + for (const fix of addToNamespace) { + addNamespaceQualifier(changeTracker, sourceFile, fix); + } + for (const fix of importType) { + addImportType(changeTracker, sourceFile, fix, quotePreference); + } + addToExisting.forEach(({ importClause, defaultImport, namedImports, canUseTypeOnlyImport }) => { + doAddExistingFix(changeTracker, sourceFile, importClause, defaultImport, namedImports, canUseTypeOnlyImport); + }); + newImports.forEach((imports, moduleSpecifier) => { + addNewImports(changeTracker, sourceFile, moduleSpecifier, quotePreference, imports, /*blankLineBetween*/ lastModuleSpecifier === moduleSpecifier); + }); + } + } // Sorted with the preferred fix coming first. const enum ImportFixKind { UseNamespace, ImportType, AddToExisting, AddNew } @@ -132,6 +163,7 @@ namespace ts.codefix { readonly kind: ImportFixKind.AddNew; readonly moduleSpecifier: string; readonly importKind: ImportKind; + readonly typeOnly: boolean; } const enum ImportKind { @@ -167,14 +199,20 @@ namespace ts.codefix { position: number, preferences: UserPreferences, ): { readonly moduleSpecifier: string, readonly codeAction: CodeAction } { - const exportInfos = getAllReExportingModules(sourceFile, exportedSymbol, moduleSymbol, symbolName, sourceFile, program.getCompilerOptions(), program.getTypeChecker(), program.getSourceFiles()); - Debug.assert(exportInfos.some(info => info.moduleSymbol === moduleSymbol), "Some exportInfo should match the specified moduleSymbol"); - // We sort the best codefixes first, so taking `first` is best for completions. - const moduleSpecifier = first(getNewImportInfos(program, sourceFile, position, exportInfos, host, preferences)).moduleSpecifier; - const fix = first(getFixForImport(exportInfos, symbolName, position, program, sourceFile, host, preferences)); + const compilerOptions = program.getCompilerOptions(); + const exportInfos = getAllReExportingModules(sourceFile, exportedSymbol, moduleSymbol, symbolName, sourceFile, compilerOptions, program.getTypeChecker(), program.getSourceFiles()); + const preferTypeOnlyImport = compilerOptions.importsNotUsedAsValues === ImportsNotUsedAsValues.Error && isValidTypeOnlyAliasUseSite(getTokenAtPosition(sourceFile, position)); + const moduleSpecifier = first(getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, exportInfos, host, preferences)).moduleSpecifier; + const fix = getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, preferTypeOnlyImport, host, preferences); return { moduleSpecifier, codeAction: codeFixActionToCodeAction(codeActionForFix({ host, formatContext, preferences }, sourceFile, symbolName, fix, getQuotePreference(sourceFile, preferences))) }; } + function getImportFixForSymbol(sourceFile: SourceFile, exportInfos: readonly SymbolExportInfo[], moduleSymbol: Symbol, symbolName: string, program: Program, position: number | undefined, preferTypeOnlyImport: boolean, host: LanguageServiceHost, preferences: UserPreferences) { + Debug.assert(exportInfos.some(info => info.moduleSymbol === moduleSymbol), "Some exportInfo should match the specified moduleSymbol"); + // We sort the best codefixes first, so taking `first` is best. + return first(getFixForImport(exportInfos, symbolName, position, preferTypeOnlyImport, program, sourceFile, host, preferences)); + } + function codeFixActionToCodeAction({ description, changes, commands }: CodeFixAction): CodeAction { return { description, changes, commands }; } @@ -214,6 +252,7 @@ namespace ts.codefix { symbolName: string, /** undefined only for missing JSX namespace */ position: number | undefined, + preferTypeOnlyImport: boolean, program: Program, sourceFile: SourceFile, host: LanguageServiceHost, @@ -224,7 +263,7 @@ namespace ts.codefix { const useNamespace = position === undefined ? undefined : tryUseExistingNamespaceImport(existingImports, symbolName, position, checker); const addToExisting = tryAddToExistingImport(existingImports, position !== undefined && isTypeOnlyPosition(sourceFile, position)); // Don't bother providing an action to add a new import if we can add to an existing one. - const addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, host, preferences); + const addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, preferTypeOnlyImport, host, preferences); return [...(useNamespace ? [useNamespace] : emptyArray), ...addImport]; } @@ -287,6 +326,7 @@ namespace ts.codefix { program: Program, sourceFile: SourceFile, position: number | undefined, + preferTypeOnlyImport: boolean, moduleSymbols: readonly SymbolExportInfo[], host: LanguageServiceHost, preferences: UserPreferences, @@ -299,8 +339,8 @@ namespace ts.codefix { .map((moduleSpecifier): FixAddNewImport | FixUseImportType => // `position` should only be undefined at a missing jsx namespace, in which case we shouldn't be looking for pure types. exportedSymbolIsTypeOnly && isJs - ? { kind: ImportFixKind.ImportType, moduleSpecifier, position: Debug.assertDefined(position, "position should be defined") } - : { kind: ImportFixKind.AddNew, moduleSpecifier, importKind })); + ? { kind: ImportFixKind.ImportType, moduleSpecifier, position: Debug.checkDefined(position, "position should be defined") } + : { kind: ImportFixKind.AddNew, moduleSpecifier, importKind, typeOnly: preferTypeOnlyImport })); // Sort by presence in package.json, then shortest paths first return sort(choicesForEachExportingModule, (a, b) => { @@ -322,21 +362,22 @@ namespace ts.codefix { program: Program, sourceFile: SourceFile, position: number | undefined, + preferTypeOnlyImport: boolean, host: LanguageServiceHost, preferences: UserPreferences, ): readonly (FixAddNewImport | FixUseImportType)[] { - const existingDeclaration = firstDefined(existingImports, newImportInfoFromExistingSpecifier); - return existingDeclaration ? [existingDeclaration] : getNewImportInfos(program, sourceFile, position, exportInfos, host, preferences); + const existingDeclaration = firstDefined(existingImports, info => newImportInfoFromExistingSpecifier(info, preferTypeOnlyImport)); + return existingDeclaration ? [existingDeclaration] : getNewImportInfos(program, sourceFile, position, preferTypeOnlyImport, exportInfos, host, preferences); } - function newImportInfoFromExistingSpecifier({ declaration, importKind }: FixAddToExistingImportInfo): FixAddNewImport | undefined { + function newImportInfoFromExistingSpecifier({ declaration, importKind }: FixAddToExistingImportInfo, preferTypeOnlyImport: boolean): FixAddNewImport | undefined { const expression = declaration.kind === SyntaxKind.ImportDeclaration ? declaration.moduleSpecifier : declaration.moduleReference.kind === SyntaxKind.ExternalModuleReference ? declaration.moduleReference.expression : undefined; return expression && isStringLiteral(expression) - ? { kind: ImportFixKind.AddNew, moduleSpecifier: expression.text, importKind } + ? { kind: ImportFixKind.AddNew, moduleSpecifier: expression.text, importKind, typeOnly: preferTypeOnlyImport } : undefined; } @@ -356,7 +397,7 @@ namespace ts.codefix { const symbol = checker.getAliasedSymbol(umdSymbol); const symbolName = umdSymbol.name; const exportInfos: readonly SymbolExportInfo[] = [{ moduleSymbol: symbol, importKind: getUmdImportKind(sourceFile, program.getCompilerOptions()), exportedSymbolIsTypeOnly: false }]; - const fixes = getFixForImport(exportInfos, symbolName, isIdentifier(token) ? token.getStart(sourceFile) : undefined, program, sourceFile, host, preferences); + const fixes = getFixForImport(exportInfos, symbolName, isIdentifier(token) ? token.getStart(sourceFile) : undefined, /*preferTypeOnlyImport*/ false, program, sourceFile, host, preferences); return { fixes, symbolName }; } function getUmdSymbol(token: Node, checker: TypeChecker): Symbol | undefined { @@ -410,9 +451,10 @@ namespace ts.codefix { // "default" is a keyword and not a legal identifier for the import, so we don't expect it here Debug.assert(symbolName !== InternalSymbolName.Default, "'default' isn't a legal identifier and couldn't occur here"); + const preferTypeOnlyImport = program.getCompilerOptions().importsNotUsedAsValues === ImportsNotUsedAsValues.Error && isValidTypeOnlyAliasUseSite(symbolToken); const exportInfos = getExportInfos(symbolName, getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, checker, program, host); const fixes = arrayFrom(flatMapIterator(exportInfos.entries(), ([_, exportInfos]) => - getFixForImport(exportInfos, symbolName, symbolToken.getStart(sourceFile), program, sourceFile, host, preferences))); + getFixForImport(exportInfos, symbolName, symbolToken.getStart(sourceFile), preferTypeOnlyImport, program, sourceFile, host, preferences))); return { fixes, symbolName }; } @@ -500,7 +542,7 @@ namespace ts.codefix { if (defaultExport.flags & SymbolFlags.Alias) { const aliased = checker.getImmediateAliasedSymbol(defaultExport); - return aliased && getDefaultExportInfoWorker(aliased, Debug.assertDefined(aliased.parent, "Alias targets of default exports must have a parent"), checker, compilerOptions); + return aliased && getDefaultExportInfoWorker(aliased, Debug.checkDefined(aliased.parent, "Alias targets of default exports must have a parent"), checker, compilerOptions); } if (defaultExport.escapedName !== InternalSymbolName.Default && @@ -546,10 +588,10 @@ namespace ts.codefix { return [importKind === ImportKind.Default ? Diagnostics.Add_default_import_0_to_existing_import_declaration_from_1 : Diagnostics.Add_0_to_existing_import_declaration_from_1, symbolName, moduleSpecifierWithoutQuotes]; // you too! } case ImportFixKind.AddNew: { - const { importKind, moduleSpecifier } = fix; - addNewImports(changes, sourceFile, moduleSpecifier, quotePreference, importKind === ImportKind.Default ? { defaultImport: symbolName, namedImports: emptyArray, namespaceLikeImport: undefined } - : importKind === ImportKind.Named ? { defaultImport: undefined, namedImports: [symbolName], namespaceLikeImport: undefined } - : { defaultImport: undefined, namedImports: emptyArray, namespaceLikeImport: { importKind, name: symbolName } }, /*blankLineBetween*/ true); + const { importKind, moduleSpecifier, typeOnly } = fix; + addNewImports(changes, sourceFile, moduleSpecifier, quotePreference, importKind === ImportKind.Default ? { defaultImport: symbolName, namedImports: emptyArray, namespaceLikeImport: undefined, typeOnly } + : importKind === ImportKind.Named ? { defaultImport: undefined, namedImports: [symbolName], namespaceLikeImport: undefined, typeOnly } + : { defaultImport: undefined, namedImports: emptyArray, namespaceLikeImport: { importKind, name: symbolName }, typeOnly }, /*blankLineBetween*/ true); return [importKind === ImportKind.Default ? Diagnostics.Import_default_0_from_module_1 : Diagnostics.Import_0_from_module_1, symbolName, moduleSpecifier]; } default: @@ -578,7 +620,7 @@ namespace ts.codefix { changes.replaceNode(sourceFile, clause.namedBindings, namedImports); } else { - changes.insertNodeAfter(sourceFile, Debug.assertDefined(clause.name, "Import clause must have either named imports or a default import"), namedImports); + changes.insertNodeAfter(sourceFile, Debug.checkDefined(clause.name, "Import clause must have either named imports or a default import"), namedImports); } } } @@ -603,6 +645,7 @@ namespace ts.codefix { } interface ImportsCollection { + readonly typeOnly: boolean; readonly defaultImport: string | undefined; readonly namedImports: string[]; readonly namespaceLikeImport: { @@ -610,13 +653,13 @@ namespace ts.codefix { readonly name: string; } | undefined; } - function addNewImports(changes: textChanges.ChangeTracker, sourceFile: SourceFile, moduleSpecifier: string, quotePreference: QuotePreference, { defaultImport, namedImports, namespaceLikeImport }: ImportsCollection, blankLineBetween: boolean): void { + function addNewImports(changes: textChanges.ChangeTracker, sourceFile: SourceFile, moduleSpecifier: string, quotePreference: QuotePreference, { defaultImport, namedImports, namespaceLikeImport, typeOnly }: ImportsCollection, blankLineBetween: boolean): void { const quotedModuleSpecifier = makeStringLiteral(moduleSpecifier, quotePreference); if (defaultImport !== undefined || namedImports.length) { insertImport(changes, sourceFile, makeImport( defaultImport === undefined ? undefined : createIdentifier(defaultImport), - namedImports.map(n => createImportSpecifier(/*propertyName*/ undefined, createIdentifier(n))), moduleSpecifier, quotePreference), /*blankLineBetween*/ blankLineBetween); + namedImports.map(n => createImportSpecifier(/*propertyName*/ undefined, createIdentifier(n))), moduleSpecifier, quotePreference, typeOnly), /*blankLineBetween*/ blankLineBetween); } if (namespaceLikeImport) { insertImport( @@ -624,7 +667,7 @@ namespace ts.codefix { sourceFile, namespaceLikeImport.importKind === ImportKind.Equals ? createImportEqualsDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, createIdentifier(namespaceLikeImport.name), createExternalModuleReference(quotedModuleSpecifier)) : namespaceLikeImport.importKind === ImportKind.ConstEquals ? createConstEqualsRequireDeclaration(namespaceLikeImport.name, quotedModuleSpecifier) : - createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, createImportClause(/*name*/ undefined, createNamespaceImport(createIdentifier(namespaceLikeImport.name))), quotedModuleSpecifier), /*blankLineBetween*/ blankLineBetween); + createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, createImportClause(/*name*/ undefined, createNamespaceImport(createIdentifier(namespaceLikeImport.name)), typeOnly), quotedModuleSpecifier), /*blankLineBetween*/ blankLineBetween); } } diff --git a/src/services/codefixes/inferFromUsage.ts b/src/services/codefixes/inferFromUsage.ts index 5718f592cb82a..c92ad7365580c 100644 --- a/src/services/codefixes/inferFromUsage.ts +++ b/src/services/codefixes/inferFromUsage.ts @@ -49,21 +49,21 @@ namespace ts.codefix { registerCodeFix({ errorCodes, getCodeActions(context) { - const { sourceFile, program, span: { start }, errorCode, cancellationToken, host, formatContext, preferences } = context; + const { sourceFile, program, span: { start }, errorCode, cancellationToken, host, preferences } = context; const token = getTokenAtPosition(sourceFile, start); - let declaration!: Declaration | undefined; - const changes = textChanges.ChangeTracker.with(context, changes => { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ returnTrue, host, formatContext, preferences); }); + let declaration: Declaration | undefined; + const changes = textChanges.ChangeTracker.with(context, changes => { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ returnTrue, host, preferences); }); const name = declaration && getNameOfDeclaration(declaration); return !name || changes.length === 0 ? undefined : [createCodeFixAction(fixId, changes, [getDiagnostic(errorCode, token), name.getText(sourceFile)], fixId, Diagnostics.Infer_all_types_from_usage)]; }, fixIds: [fixId], getAllCodeActions(context) { - const { sourceFile, program, cancellationToken, host, formatContext, preferences } = context; + const { sourceFile, program, cancellationToken, host, preferences } = context; const markSeen = nodeSeenTracker(); return codeFixAll(context, errorCodes, (changes, err) => { - doChange(changes, sourceFile, getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, formatContext, preferences); + doChange(changes, sourceFile, getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, preferences); }); }, }); @@ -106,19 +106,21 @@ namespace ts.codefix { return errorCode; } - function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, token: Node, errorCode: number, program: Program, cancellationToken: CancellationToken, markSeen: NodeSeenTracker, host: LanguageServiceHost, formatContext: formatting.FormatContext, preferences: UserPreferences): Declaration | undefined { + function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, token: Node, errorCode: number, program: Program, cancellationToken: CancellationToken, markSeen: NodeSeenTracker, host: LanguageServiceHost, preferences: UserPreferences): Declaration | undefined { if (!isParameterPropertyModifier(token.kind) && token.kind !== SyntaxKind.Identifier && token.kind !== SyntaxKind.DotDotDotToken && token.kind !== SyntaxKind.ThisKeyword) { return undefined; } const { parent } = token; + const importAdder = createImportAdder(sourceFile, program, preferences, host); errorCode = mapSuggestionDiagnostic(errorCode); 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: if ((isVariableDeclaration(parent) && markSeen(parent)) || isPropertyDeclaration(parent) || isPropertySignature(parent)) { // handle bad location - annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken, formatContext, preferences); + annotateVariableDeclaration(changes, importAdder, sourceFile, parent, program, host, cancellationToken); + importAdder.writeFixes(changes); return parent; } if (isPropertyAccessExpression(parent)) { @@ -129,6 +131,7 @@ namespace ts.codefix { const typeTag = createJSDocTypeTag(createJSDocTypeExpression(typeNode), /*comment*/ ""); addJSDocTags(changes, sourceFile, cast(parent.parent.parent, isExpressionStatement), [typeTag]); } + importAdder.writeFixes(changes); return parent; } return undefined; @@ -136,7 +139,8 @@ namespace ts.codefix { case Diagnostics.Variable_0_implicitly_has_an_1_type.code: { const symbol = program.getTypeChecker().getSymbolAtLocation(token); if (symbol && symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) { - annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken, formatContext, preferences); + annotateVariableDeclaration(changes, importAdder, sourceFile, symbol.valueDeclaration, program, host, cancellationToken); + importAdder.writeFixes(changes); return symbol.valueDeclaration; } return undefined; @@ -148,77 +152,80 @@ namespace ts.codefix { return undefined; } + let declaration: Declaration | undefined; switch (errorCode) { // Parameter declarations case Diagnostics.Parameter_0_implicitly_has_an_1_type.code: if (isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); - return containingFunction; + annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); + declaration = containingFunction; + break; } // falls through case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: if (markSeen(containingFunction)) { const param = cast(parent, isParameter); - annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken, formatContext, preferences); - return param; + annotateParameters(changes, importAdder, sourceFile, param, containingFunction, program, host, cancellationToken); + declaration = param; } - return undefined; + break; // 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: if (isGetAccessorDeclaration(containingFunction) && isIdentifier(containingFunction.name)) { - annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host, formatContext, preferences); - return containingFunction; + annotate(changes, importAdder, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host); + declaration = containingFunction; } - return undefined; + break; // Set Accessor declarations case Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: if (isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); - return containingFunction; + annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); + declaration = containingFunction; } - return undefined; + break; // Function 'this' case Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: if (textChanges.isThisTypeAnnotatable(containingFunction) && markSeen(containingFunction)) { annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken); - return containingFunction; + declaration = containingFunction; } - return undefined; + break; default: return Debug.fail(String(errorCode)); } + + importAdder.writeFixes(changes); + return declaration; } function annotateVariableDeclaration( changes: textChanges.ChangeTracker, + importAdder: ImportAdder, sourceFile: SourceFile, declaration: VariableDeclaration | PropertyDeclaration | PropertySignature, program: Program, host: LanguageServiceHost, cancellationToken: CancellationToken, - formatContext: formatting.FormatContext, - preferences: UserPreferences, ): void { if (isIdentifier(declaration.name)) { - annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host); } } function annotateParameters( changes: textChanges.ChangeTracker, + importAdder: ImportAdder, sourceFile: SourceFile, parameterDeclaration: ParameterDeclaration, containingFunction: FunctionLike, program: Program, host: LanguageServiceHost, cancellationToken: CancellationToken, - formatContext: formatting.FormatContext, - preferences: UserPreferences, ): void { if (!isIdentifier(parameterDeclaration.name)) { return; @@ -235,7 +242,7 @@ namespace ts.codefix { if (needParens) changes.insertNodeBefore(sourceFile, first(containingFunction.parameters), createToken(SyntaxKind.OpenParenToken)); for (const { declaration, type } of parameterInferences) { if (declaration && !declaration.type && !declaration.initializer) { - annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, declaration, type, program, host); } } if (needParens) changes.insertNodeAfter(sourceFile, last(containingFunction.parameters), createToken(SyntaxKind.CloseParenToken)); @@ -269,13 +276,12 @@ namespace ts.codefix { function annotateSetAccessor( changes: textChanges.ChangeTracker, + importAdder: ImportAdder, sourceFile: SourceFile, setAccessorDeclaration: SetAccessorDeclaration, program: Program, host: LanguageServiceHost, cancellationToken: CancellationToken, - formatContext: formatting.FormatContext, - preferences: UserPreferences, ): void { const param = firstOrUndefined(setAccessorDeclaration.parameters); if (param && isIdentifier(setAccessorDeclaration.name) && isIdentifier(param.name)) { @@ -287,12 +293,12 @@ namespace ts.codefix { annotateJSDocParameters(changes, sourceFile, [{ declaration: param, type }], program, host); } else { - annotate(changes, sourceFile, param, type, program, host, formatContext, preferences); + annotate(changes, importAdder, sourceFile, param, type, program, host); } } } - function annotate(changes: textChanges.ChangeTracker, sourceFile: SourceFile, declaration: textChanges.TypeAnnotatable, type: Type, program: Program, host: LanguageServiceHost, formatContext: formatting.FormatContext, preferences: UserPreferences): void { + function annotate(changes: textChanges.ChangeTracker, importAdder: ImportAdder, sourceFile: SourceFile, declaration: textChanges.TypeAnnotatable, type: Type, program: Program, host: LanguageServiceHost): void { const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { if (isInJSFile(sourceFile) && declaration.kind !== SyntaxKind.PropertySignature) { @@ -304,38 +310,25 @@ namespace ts.codefix { const typeTag = isGetAccessorDeclaration(declaration) ? createJSDocReturnTag(typeExpression, "") : createJSDocTypeTag(typeExpression, ""); addJSDocTags(changes, sourceFile, parent, [typeTag]); } - else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences)) { + else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, type, sourceFile, changes, importAdder, getEmitScriptTarget(program.getCompilerOptions()))) { changes.tryInsertTypeAnnotation(sourceFile, declaration, typeNode); } } } - function tryReplaceImportTypeNodeWithAutoImport(typeNode: TypeNode, changes: textChanges.ChangeTracker, sourceFile: SourceFile, declaration: textChanges.TypeAnnotatable, type: Type, program: Program, host: LanguageServiceHost, formatContext: formatting.FormatContext, preferences: UserPreferences): boolean { - if (isLiteralImportTypeNode(typeNode) && typeNode.qualifier && type.symbol) { - // Replace 'import("./a").SomeType' with 'SomeType' and an actual import if possible - const moduleSymbol = find(type.symbol.declarations, d => !!d.getSourceFile().externalModuleIndicator)?.getSourceFile().symbol; - // Symbol for the left-most thing after the dot - if (moduleSymbol) { - const symbol = getFirstIdentifier(typeNode.qualifier).symbol; - const action = getImportCompletionAction( - symbol, - moduleSymbol, - sourceFile, - symbol.name, - host, - program, - formatContext, - declaration.pos, - preferences, - ); - if (action.codeAction.changes.length && changes.tryInsertTypeAnnotation(sourceFile, declaration, createTypeReferenceNode(typeNode.qualifier, typeNode.typeArguments))) { - for (const change of action.codeAction.changes) { - const file = sourceFile.fileName === change.fileName ? sourceFile : Debug.assertDefined(program.getSourceFile(change.fileName)); - changes.pushRaw(file, change); - } - return true; - } - } + function tryReplaceImportTypeNodeWithAutoImport( + typeNode: TypeNode, + declaration: textChanges.TypeAnnotatable, + type: Type, + sourceFile: SourceFile, + changes: textChanges.ChangeTracker, + importAdder: ImportAdder, + scriptTarget: ScriptTarget + ): boolean { + const importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget); + if (importableReference && changes.tryInsertTypeAnnotation(sourceFile, declaration, importableReference.typeReference)) { + forEach(importableReference.symbols, s => importAdder.addImportFromExportedSymbol(s, /*usageIsTypeOnly*/ true)); + return true; } return false; } @@ -992,7 +985,7 @@ namespace ts.codefix { const callSignatures: Signature[] = usage.calls ? [getSignatureFromCalls(usage.calls)] : []; const constructSignatures: Signature[] = usage.constructs ? [getSignatureFromCalls(usage.constructs)] : []; const stringIndexInfo = usage.stringIndex && checker.createIndexInfo(combineFromUsage(usage.stringIndex), /*isReadonly*/ false); - return checker.createAnonymousType(/*symbol*/ undefined!, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined); // TODO: GH#18217 + return checker.createAnonymousType(/*symbol*/ undefined, members, callSignatures, constructSignatures, stringIndexInfo, /*numberIndexInfo*/ undefined); } function inferNamedTypesFromProperties(usage: Usage): Type[] { @@ -1038,7 +1031,7 @@ namespace ts.codefix { usage.properties.forEach((propUsage, name) => { const genericPropertyType = checker.getTypeOfPropertyOfType(generic, name as string); Debug.assert(!!genericPropertyType, "generic should have all the properties of its reference."); - types.push(...inferTypeParameters(genericPropertyType!, combineFromUsage(propUsage), singleTypeParameter)); + types.push(...inferTypeParameters(genericPropertyType, combineFromUsage(propUsage), singleTypeParameter)); }); return builtinConstructors[type.symbol.escapedName as string](combineTypes(types)); } @@ -1096,7 +1089,7 @@ namespace ts.codefix { } function getFunctionFromCalls(calls: CallUsage[]) { - return checker.createAnonymousType(undefined!, createSymbolTable(), [getSignatureFromCalls(calls)], emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); + return checker.createAnonymousType(/*symbol*/ undefined, createSymbolTable(), [getSignatureFromCalls(calls)], emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); } function getSignatureFromCalls(calls: CallUsage[]): Signature { diff --git a/src/services/codefixes/splitTypeOnlyImport.ts b/src/services/codefixes/splitTypeOnlyImport.ts index e5691a76ab35d..61f4a1c6f0344 100644 --- a/src/services/codefixes/splitTypeOnlyImport.ts +++ b/src/services/codefixes/splitTypeOnlyImport.ts @@ -26,7 +26,7 @@ namespace ts.codefix { if (!importDeclaration) { return; } - const importClause = Debug.assertDefined(importDeclaration.importClause); + const importClause = Debug.checkDefined(importDeclaration.importClause); changes.replaceNode(context.sourceFile, importDeclaration, updateImportDeclaration( importDeclaration, importDeclaration.decorators, diff --git a/src/services/completions.ts b/src/services/completions.ts index 84d1fb0d44f36..27f959aa24c37 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -40,8 +40,8 @@ namespace ts.Completions { return !!(origin.kind & SymbolOriginInfoKind.SymbolMember); } - function originIsExport(origin: SymbolOriginInfo): origin is SymbolOriginInfoExport { - return !!(origin.kind & SymbolOriginInfoKind.Export); + function originIsExport(origin: SymbolOriginInfo | undefined): origin is SymbolOriginInfoExport { + return !!(origin && origin.kind & SymbolOriginInfoKind.Export); } function originIsPromise(origin: SymbolOriginInfo): boolean { @@ -272,7 +272,7 @@ namespace ts.Completions { } for (const literal of literals) { - entries.push(createCompletionEntryForLiteral(literal)); + entries.push(createCompletionEntryForLiteral(literal, preferences)); } return { isGlobalCompletion: isInSnippetScope, isMemberCompletion: isMemberCompletionKind(completionKind), isNewIdentifierLocation, entries }; @@ -317,10 +317,13 @@ namespace ts.Completions { }); } - const completionNameForLiteral = (literal: string | number | PseudoBigInt) => - typeof literal === "object" ? pseudoBigIntToString(literal) + "n" : JSON.stringify(literal); - function createCompletionEntryForLiteral(literal: string | number | PseudoBigInt): CompletionEntry { - return { name: completionNameForLiteral(literal), kind: ScriptElementKind.string, kindModifiers: ScriptElementKindModifier.none, sortText: SortText.LocationPriority }; + function completionNameForLiteral(literal: string | number | PseudoBigInt, preferences: UserPreferences): string { + return typeof literal === "object" ? pseudoBigIntToString(literal) + "n" : + isString(literal) ? quote(literal, preferences) : JSON.stringify(literal); + } + + function createCompletionEntryForLiteral(literal: string | number | PseudoBigInt, preferences: UserPreferences): CompletionEntry { + return { name: completionNameForLiteral(literal, preferences), kind: ScriptElementKind.string, kindModifiers: ScriptElementKindModifier.none, sortText: SortText.LocationPriority }; } function createCompletionEntry( @@ -344,13 +347,13 @@ namespace ts.Completions { const useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess; if (origin && originIsThisType(origin)) { insertText = needsConvertPropertyAccess - ? `this${insertQuestionDot ? "?." : ""}[${quote(name, preferences)}]` + ? `this${insertQuestionDot ? "?." : ""}[${quotePropertyName(name, preferences)}]` : `this${insertQuestionDot ? "?." : "."}${name}`; } // We should only have needsConvertPropertyAccess if there's a property access to convert. But see #21790. // Somehow there was a global with a non-identifier name. Hopefully someone will complain about getting a "foo bar" global completion and provide a repro. else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) { - insertText = useBraces ? needsConvertPropertyAccess ? `[${quote(name, preferences)}]` : `[${name}]` : name; + insertText = useBraces ? needsConvertPropertyAccess ? `[${quotePropertyName(name, preferences)}]` : `[${name}]` : name; if (insertQuestionDot || propertyAccessToConvert.questionDotToken) { insertText = `?.${insertText}`; } @@ -410,6 +413,14 @@ namespace ts.Completions { }; } + function quotePropertyName(name: string, preferences: UserPreferences): string { + if (/^\d+$/.test(name)) { + return name; + } + + return quote(name, preferences); + } + function isRecommendedCompletionMatch(localSymbol: Symbol, recommendedCompletion: Symbol | undefined, checker: TypeChecker): boolean { return localSymbol === recommendedCompletion || !!(localSymbol.flags & SymbolFlags.ExportValue) && checker.getExportSymbolOfSymbol(localSymbol) === recommendedCompletion; @@ -531,6 +542,7 @@ namespace ts.Completions { position: number, entryId: CompletionEntryIdentifier, host: LanguageServiceHost, + preferences: UserPreferences, ): SymbolCompletion | { type: "request", request: Request } | { type: "literal", literal: string | number | PseudoBigInt } | { type: "none" } { const compilerOptions = program.getCompilerOptions(); const completionData = getCompletionData(program, log, sourceFile, isUncheckedFile(sourceFile, compilerOptions), position, { includeCompletionsForModuleExports: true, includeCompletionsWithInsertText: true }, entryId, host); @@ -543,7 +555,7 @@ namespace ts.Completions { const { symbols, literals, location, completionKind, symbolToOriginInfoMap, previousToken, isJsxInitializer, isTypeOnlyLocation } = completionData; - const literal = find(literals, l => completionNameForLiteral(l) === entryId.name); + const literal = find(literals, l => completionNameForLiteral(l, preferences) === entryId.name); if (literal !== undefined) return { type: "literal", literal }; // Find the symbol with the matching entry name. @@ -559,16 +571,6 @@ namespace ts.Completions { }) || { type: "none" }; } - function getSymbolName(symbol: Symbol, origin: SymbolOriginInfo | undefined, target: ScriptTarget): string { - return origin && originIsExport(origin) && ( - (origin.isDefaultExport && symbol.escapedName === InternalSymbolName.Default) || - (symbol.escapedName === InternalSymbolName.ExportEquals)) - // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. - ? firstDefined(symbol.declarations, d => isExportAssignment(d) && isIdentifier(d.expression) ? d.expression.text : undefined) - || codefix.moduleSymbolToValidIdentifier(origin.moduleSymbol, target) - : symbol.name; - } - export interface CompletionEntryIdentifier { name: string; source?: string; @@ -595,7 +597,7 @@ namespace ts.Completions { } // Compute all the completion symbols again. - const symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host); + const symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); switch (symbolCompletion.type) { case "request": { const { request } = symbolCompletion; @@ -617,7 +619,7 @@ namespace ts.Completions { } case "literal": { const { literal } = symbolCompletion; - return createSimpleDetails(completionNameForLiteral(literal), ScriptElementKind.string, typeof literal === "string" ? SymbolDisplayPartKind.stringLiteral : SymbolDisplayPartKind.numericLiteral); + return createSimpleDetails(completionNameForLiteral(literal, preferences), ScriptElementKind.string, typeof literal === "string" ? SymbolDisplayPartKind.stringLiteral : SymbolDisplayPartKind.numericLiteral); } case "none": // Didn't find a symbol with this name. See if we can find a keyword instead. @@ -671,7 +673,7 @@ namespace ts.Completions { exportedSymbol, moduleSymbol, sourceFile, - getSymbolName(symbol, symbolOriginInfo, compilerOptions.target!), + getNameForExportedSymbol(symbol, compilerOptions.target!), host, program, formatContext, @@ -687,8 +689,9 @@ namespace ts.Completions { position: number, entryId: CompletionEntryIdentifier, host: LanguageServiceHost, + preferences: UserPreferences, ): Symbol | undefined { - const completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host); + const completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); return completion.type === "symbol" ? completion.symbol : undefined; } @@ -1017,7 +1020,8 @@ namespace ts.Completions { getTypeScriptMemberSymbols(); } else if (isRightOfOpenTag) { - const tagSymbols = Debug.assertEachDefined(typeChecker.getJsxIntrinsicTagNamesAt(location), "getJsxIntrinsicTagNames() should all be defined"); + const tagSymbols = typeChecker.getJsxIntrinsicTagNamesAt(location); + Debug.assertEachIsDefined(tagSymbols, "getJsxIntrinsicTagNames() should all be defined"); tryGetGlobalSymbols(); symbols = tagSymbols.concat(symbols); completionKind = CompletionKind.MemberLike; @@ -1100,7 +1104,8 @@ namespace ts.Completions { if (symbol.flags & (SymbolFlags.Module | SymbolFlags.Enum)) { // Extract module or enum members - const exportedSymbols = Debug.assertEachDefined(typeChecker.getExportsOfModule(symbol), "getExportsOfModule() should all be defined"); + const exportedSymbols = typeChecker.getExportsOfModule(symbol); + Debug.assertEachIsDefined(exportedSymbols, "getExportsOfModule() should all be defined"); const isValidValueAccess = (symbol: Symbol) => typeChecker.isValidPropertyAccess(isImportType ? node : (node.parent), symbol.name); const isValidTypeAccess = (symbol: Symbol) => symbolCanBeReferencedAtTypeLocation(symbol); const isValidAccess: (symbol: Symbol) => boolean = @@ -1280,8 +1285,8 @@ namespace ts.Completions { // Cursor is inside a JSX self-closing element or opening element const attrsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes); if (!attrsType) return GlobalsSearch.Continue; - const baseType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, ContextFlags.BaseConstraint); - symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, baseType, jsxContainer!.attributes, typeChecker), jsxContainer!.attributes.properties); + const completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, ContextFlags.Completions); + symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer!.attributes, typeChecker), jsxContainer!.attributes.properties); setSortTextToOptionalMember(); completionKind = CompletionKind.MemberLike; isNewIdentifierLocation = false; @@ -1332,7 +1337,8 @@ namespace ts.Completions { const symbolMeanings = (isTypeOnly ? SymbolFlags.None : SymbolFlags.Value) | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias; - symbols = Debug.assertEachDefined(typeChecker.getSymbolsInScope(scopeNode, symbolMeanings), "getSymbolsInScope() should all be defined"); + symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings); + Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined"); for (const symbol of symbols) { if (!typeChecker.isArgumentsSymbol(symbol) && !some(symbol.declarations, d => d.getSourceFile() === sourceFile)) { @@ -1632,7 +1638,7 @@ namespace ts.Completions { const origin: SymbolOriginInfoExport = { kind: SymbolOriginInfoKind.Export, moduleSymbol, isDefaultExport }; results.push({ symbol, - symbolName: getSymbolName(symbol, origin, target), + symbolName: getNameForExportedSymbol(symbol, target), origin, skipFilter, }); @@ -1800,10 +1806,10 @@ namespace ts.Completions { if (objectLikeContainer.kind === SyntaxKind.ObjectLiteralExpression) { const instantiatedType = typeChecker.getContextualType(objectLikeContainer); - const baseType = instantiatedType && typeChecker.getContextualType(objectLikeContainer, ContextFlags.BaseConstraint); - if (!instantiatedType || !baseType) return GlobalsSearch.Fail; - isNewIdentifierLocation = hasIndexSignature(instantiatedType || baseType); - typeMembers = getPropertiesForObjectExpression(instantiatedType, baseType, objectLikeContainer, typeChecker); + const completionsType = instantiatedType && typeChecker.getContextualType(objectLikeContainer, ContextFlags.Completions); + if (!instantiatedType || !completionsType) return GlobalsSearch.Fail; + isNewIdentifierLocation = hasIndexSignature(instantiatedType || completionsType); + typeMembers = getPropertiesForObjectExpression(instantiatedType, completionsType, objectLikeContainer, typeChecker); existingMembers = objectLikeContainer.properties; } else { @@ -1845,7 +1851,7 @@ namespace ts.Completions { if (typeMembers && typeMembers.length > 0) { // Add filtered items to the completion list - symbols = filterObjectMembersList(typeMembers, Debug.assertDefined(existingMembers)); + symbols = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); } setSortTextToOptionalMember(); @@ -2392,7 +2398,7 @@ namespace ts.Completions { origin: SymbolOriginInfo | undefined, kind: CompletionKind, ): CompletionEntryDisplayNameForSymbol | undefined { - const name = getSymbolName(symbol, origin, target); + const name = originIsExport(origin) ? getNameForExportedSymbol(symbol, target) : symbol.name; if (name === undefined // If the symbol is external module, don't show it in the completion list // (i.e declare module "http" { const x; } | // <= request completion here, "http" should not be there) @@ -2549,10 +2555,10 @@ namespace ts.Completions { return jsdoc && jsdoc.tags && (rangeContainsPosition(jsdoc, position) ? findLast(jsdoc.tags, tag => tag.pos < position) : undefined); } - function getPropertiesForObjectExpression(contextualType: Type, baseConstrainedType: Type | undefined, obj: ObjectLiteralExpression | JsxAttributes, checker: TypeChecker): Symbol[] { - const hasBaseType = baseConstrainedType && baseConstrainedType !== contextualType; - const type = hasBaseType && !(baseConstrainedType!.flags & TypeFlags.AnyOrUnknown) - ? checker.getUnionType([contextualType, baseConstrainedType!]) + function getPropertiesForObjectExpression(contextualType: Type, completionsType: Type | undefined, obj: ObjectLiteralExpression | JsxAttributes, checker: TypeChecker): Symbol[] { + const hasCompletionsType = completionsType && completionsType !== contextualType; + const type = hasCompletionsType && !(completionsType!.flags & TypeFlags.AnyOrUnknown) + ? checker.getUnionType([contextualType, completionsType!]) : contextualType; const properties = type.isUnion() @@ -2564,7 +2570,7 @@ namespace ts.Completions { checker.isTypeInvalidDueToUnionDiscriminant(memberType, obj)))) : type.getApparentProperties(); - return hasBaseType ? properties.filter(hasDeclarationOtherThanSelf) : properties; + return hasCompletionsType ? properties.filter(hasDeclarationOtherThanSelf) : properties; // Filter out members whose only declaration is the object literal itself to avoid // self-fulfilling completions like: @@ -2582,8 +2588,8 @@ namespace ts.Completions { */ function getPropertiesForCompletion(type: Type, checker: TypeChecker): Symbol[] { return type.isUnion() - ? Debug.assertEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") - : Debug.assertEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); + ? Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") + : Debug.checkEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); } /** diff --git a/src/services/documentRegistry.ts b/src/services/documentRegistry.ts index 4744f25ac7b98..decb66b5340e4 100644 --- a/src/services/documentRegistry.ts +++ b/src/services/documentRegistry.ts @@ -230,7 +230,7 @@ namespace ts { } function releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey): void { - const bucket = Debug.assertDefined(buckets.get(key)); + const bucket = Debug.checkDefined(buckets.get(key)); const entry = bucket.get(path)!; entry.languageServiceRefCount--; diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index b4f1c19837dd1..4682bd29fe3a3 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -171,14 +171,27 @@ namespace ts.FindAllReferences { undefined; } + export const enum FindReferencesUse { + /** + * When searching for references to a symbol, the location will not be adjusted (this is the default behavior when not specified). + */ + Other, + /** + * When searching for references to a symbol, the location will be adjusted if the cursor was on a keyword. + */ + References, + /** + * When searching for references to a symbol, the location will be adjusted if the cursor was on a keyword. + * Unlike `References`, the location will only be adjusted keyword belonged to a declaration with a valid name. + * If set, we will find fewer references -- if it is referenced by several different names, we still only find references for the original name. + */ + Rename, + } + export interface Options { readonly findInStrings?: boolean; readonly findInComments?: boolean; - /** - * True if we are renaming the symbol. - * If so, we will find fewer references -- if it is referenced by several different names, we still only find references for the original name. - */ - readonly isForRename?: boolean; + readonly use?: FindReferencesUse; /** True if we are searching for implementations. We will have a different method of adding references if so. */ readonly implementations?: boolean; /** @@ -191,7 +204,7 @@ namespace ts.FindAllReferences { export function findReferencedSymbols(program: Program, cancellationToken: CancellationToken, sourceFiles: readonly SourceFile[], sourceFile: SourceFile, position: number): ReferencedSymbol[] | undefined { const node = getTouchingPropertyName(sourceFile, position); - const referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken); + const referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, { use: FindReferencesUse.References }); const checker = program.getTypeChecker(); return !referencedSymbols || !referencedSymbols.length ? undefined : mapDefined(referencedSymbols, ({ definition, references }) => // Only include referenced symbols that have a valid definition. @@ -229,7 +242,7 @@ namespace ts.FindAllReferences { } else { // Perform "Find all References" and retrieve only those that are implementations - return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true }); + return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true, use: FindReferencesUse.References }); } } @@ -502,6 +515,7 @@ namespace ts.FindAllReferences { case SyntaxKind.ModuleDeclaration: case SyntaxKind.NamespaceExportDeclaration: case SyntaxKind.NamespaceImport: + case SyntaxKind.NamespaceExport: case SyntaxKind.Parameter: case SyntaxKind.ShorthandPropertyAssignment: case SyntaxKind.TypeAliasDeclaration: @@ -539,6 +553,12 @@ namespace ts.FindAllReferences { export namespace Core { /** Core find-all-references algorithm. Handles special cases before delegating to `getReferencedSymbolsForSymbol`. */ export function getReferencedSymbolsForNode(position: number, node: Node, program: Program, sourceFiles: readonly SourceFile[], cancellationToken: CancellationToken, options: Options = {}, sourceFilesSet: ReadonlyMap = arrayToSet(sourceFiles, f => f.fileName)): readonly SymbolAndEntries[] | undefined { + if (options.use === FindReferencesUse.References) { + node = getAdjustedReferenceLocation(node); + } + else if (options.use === FindReferencesUse.Rename) { + node = getAdjustedRenameLocation(node); + } if (isSourceFile(node)) { const reference = GoToDefinition.getReferenceAtPosition(node, position, program); const moduleSymbol = reference && program.getTypeChecker().getMergedSymbol(reference.file.symbol); @@ -680,19 +700,21 @@ namespace ts.FindAllReferences { } }); - for (const decl of symbol.declarations) { - switch (decl.kind) { - case SyntaxKind.SourceFile: - // Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.) - break; - case SyntaxKind.ModuleDeclaration: - if (sourceFilesSet.has(decl.getSourceFile().fileName)) { - references.push(nodeEntry((decl as ModuleDeclaration).name)); - } - break; - default: - // This may be merged with something. - Debug.assert(!!(symbol.flags & SymbolFlags.Transient), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration."); + if (symbol.declarations) { + for (const decl of symbol.declarations) { + switch (decl.kind) { + case SyntaxKind.SourceFile: + // Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.) + break; + case SyntaxKind.ModuleDeclaration: + if (sourceFilesSet.has(decl.getSourceFile().fileName)) { + references.push(nodeEntry((decl as ModuleDeclaration).name)); + } + break; + default: + // This may be merged with something. + Debug.assert(!!(symbol.flags & SymbolFlags.Transient), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration."); + } } } @@ -703,7 +725,7 @@ namespace ts.FindAllReferences { if (sourceFilesSet.has(sourceFile.fileName)) { // At `module.exports = ...`, reference node is `module` const node = isBinaryExpression(decl) && isPropertyAccessExpression(decl.left) ? decl.left.expression : - isExportAssignment(decl) ? Debug.assertDefined(findChildOfKind(decl, SyntaxKind.ExportKeyword, sourceFile)) : + isExportAssignment(decl) ? Debug.checkDefined(findChildOfKind(decl, SyntaxKind.ExportKeyword, sourceFile)) : getNameOfDeclaration(decl) || decl; references.push(nodeEntry(node)); } @@ -723,6 +745,11 @@ namespace ts.FindAllReferences { /** getReferencedSymbols for special node kinds. */ function getReferencedSymbolsSpecial(node: Node, sourceFiles: readonly SourceFile[], cancellationToken: CancellationToken): SymbolAndEntries[] | undefined { if (isTypeKeyword(node.kind)) { + // A void expression (i.e., `void foo()`) is not special, but the `void` type is. + if (node.kind === SyntaxKind.VoidKeyword && isVoidExpression(node.parent)) { + return undefined; + } + // A modifier readonly (like on a property declaration) is not special; // a readonly type keyword (like `readonly string[]`) is. if (node.kind === SyntaxKind.ReadonlyKeyword && !isReadonlyTypeOperator(node)) { @@ -776,10 +803,10 @@ namespace ts.FindAllReferences { } else if (node && node.kind === SyntaxKind.DefaultKeyword) { addReference(node, symbol, state); - searchForImportsOfExport(node, symbol, { exportingModuleSymbol: Debug.assertDefined(symbol.parent, "Expected export symbol to have a parent"), exportKind: ExportKind.Default }, state); + searchForImportsOfExport(node, symbol, { exportingModuleSymbol: Debug.checkDefined(symbol.parent, "Expected export symbol to have a parent"), exportKind: ExportKind.Default }, state); } else { - const search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, !!options.isForRename, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] }); + const search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, options.use === FindReferencesUse.Rename, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] }); getReferencesInContainerOrFiles(symbol, state, search); } @@ -920,7 +947,7 @@ namespace ts.FindAllReferences { /** Gets every place to look for references of an exported symbols. See `ImportsResult` in `importTracker.ts` for more documentation. */ getImportSearches(exportSymbol: Symbol, exportInfo: ExportInfo): ImportsResult { if (!this.importTracker) this.importTracker = createImportTracker(this.sourceFiles, this.sourceFilesSet, this.checker, this.cancellationToken); - return this.importTracker(exportSymbol, exportInfo, !!this.options.isForRename); + return this.importTracker(exportSymbol, exportInfo, this.options.use === FindReferencesUse.Rename); } /** @param allSearchSymbols set of additional symbols for use by `includes`. */ @@ -1001,7 +1028,7 @@ namespace ts.FindAllReferences { break; case ExportKind.Default: // Search for a property access to '.default'. This can't be renamed. - indirectSearch = state.options.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, ImportExport.Export, { text: "default" }); + indirectSearch = state.options.use === FindReferencesUse.Rename ? undefined : state.createSearch(exportLocation, exportSymbol, ImportExport.Export, { text: "default" }); break; case ExportKind.ExportEquals: break; @@ -1041,7 +1068,7 @@ namespace ts.FindAllReferences { function shouldAddSingleReference(singleRef: Identifier | StringLiteral, state: State): boolean { if (!hasMatchingMeaning(singleRef, state)) return false; - if (!state.options.isForRename) return true; + if (state.options.use !== FindReferencesUse.Rename) return true; // Don't rename an import type `import("./module-name")` when renaming `name` in `export = name;` if (!isIdentifier(singleRef)) return false; // At `default` in `import { default as x }` or `export { default as x }`, do add a reference, but do not rename. @@ -1050,6 +1077,8 @@ namespace ts.FindAllReferences { // Go to the symbol we imported from and find references for it. function searchForImportedSymbol(symbol: Symbol, state: State): void { + if (!symbol.declarations) return; + for (const declaration of symbol.declarations) { const exportingFile = declaration.getSourceFile(); // Need to search in the file even if it's not in the search-file set, because it might export the symbol. @@ -1169,7 +1198,7 @@ namespace ts.FindAllReferences { export function eachSignatureCall(signature: SignatureDeclaration, sourceFiles: readonly SourceFile[], checker: TypeChecker, cb: (call: CallExpression) => void): void { if (!signature.name || !isIdentifier(signature.name)) return; - const symbol = Debug.assertDefined(checker.getSymbolAtLocation(signature.name)); + const symbol = Debug.checkDefined(checker.getSymbolAtLocation(signature.name)); for (const sourceFile of sourceFiles) { for (const name of getPossibleSymbolReferenceNodes(sourceFile, symbol.name)) { @@ -1373,7 +1402,7 @@ namespace ts.FindAllReferences { if (!propertyName) { // Don't rename at `export { default } from "m";`. (but do continue to search for imports of the re-export) - if (!(state.options.isForRename && (name.escapedText === InternalSymbolName.Default))) { + if (!(state.options.use === FindReferencesUse.Rename && (name.escapedText === InternalSymbolName.Default))) { addRef(); } } @@ -1384,8 +1413,8 @@ namespace ts.FindAllReferences { addRef(); } - if (addReferencesHere && !state.options.isForRename && state.markSeenReExportRHS(name)) { - addReference(name, Debug.assertDefined(exportSpecifier.symbol), state); + if (addReferencesHere && state.options.use !== FindReferencesUse.Rename && state.markSeenReExportRHS(name)) { + addReference(name, Debug.checkDefined(exportSpecifier.symbol), state); } } else { @@ -1399,7 +1428,7 @@ namespace ts.FindAllReferences { const isDefaultExport = referenceLocation.originalKeywordKind === SyntaxKind.DefaultKeyword || exportSpecifier.name.originalKeywordKind === SyntaxKind.DefaultKeyword; const exportKind = isDefaultExport ? ExportKind.Default : ExportKind.Named; - const exportSymbol = Debug.assertDefined(exportSpecifier.symbol); + const exportSymbol = Debug.checkDefined(exportSpecifier.symbol); const exportInfo = getExportInfo(exportSymbol, exportKind, state.checker); if (exportInfo) { searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); @@ -1503,7 +1532,7 @@ namespace ts.FindAllReferences { function addClassStaticThisReferences(referenceLocation: Node, search: Search, state: State): void { addReference(referenceLocation, search.symbol, state); const classLike = referenceLocation.parent; - if (state.options.isForRename || !isClassLike(classLike)) return; + if (state.options.use === FindReferencesUse.Rename || !isClassLike(classLike)) return; Debug.assert(classLike.name === referenceLocation); const addRef = state.referenceAdder(search.symbol); for (const member of classLike.members) { @@ -1529,7 +1558,7 @@ namespace ts.FindAllReferences { */ function findOwnConstructorReferences(classSymbol: Symbol, sourceFile: SourceFile, addNode: (node: Node) => void): void { const constructorSymbol = getClassConstructorSymbol(classSymbol); - if (constructorSymbol) { + if (constructorSymbol && constructorSymbol.declarations) { for (const decl of constructorSymbol.declarations) { const ctrKeyword = findChildOfKind(decl, SyntaxKind.ConstructorKeyword, sourceFile)!; Debug.assert(decl.kind === SyntaxKind.Constructor && !!ctrKeyword); @@ -1561,7 +1590,7 @@ namespace ts.FindAllReferences { /** Find references to `super` in the constructor of an extending class. */ function findSuperConstructorAccesses(classDeclaration: ClassLikeDeclaration, addNode: (node: Node) => void): void { const constructor = getClassConstructorSymbol(classDeclaration.symbol); - if (!constructor) { + if (!(constructor && constructor.declarations)) { return; } @@ -1697,7 +1726,7 @@ namespace ts.FindAllReferences { // Set the key so that we don't infinitely recurse cachedResults.set(key, false); - const inherits = symbol.declarations.some(declaration => + const inherits = !!symbol.declarations && symbol.declarations.some(declaration => getAllSuperTypeNodes(declaration).some(typeReference => { const type = checker.getTypeAtLocation(typeReference); return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent, cachedResults, checker); @@ -1902,10 +1931,12 @@ namespace ts.FindAllReferences { } const exportSpecifier = getDeclarationOfKind(symbol, SyntaxKind.ExportSpecifier); - const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); - if (localSymbol) { - const res = cbSymbol(localSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, EntryKind.Node); - if (res) return res; + if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { + const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); + if (localSymbol) { + const res = cbSymbol(localSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, EntryKind.Node); + if (res) return res; + } } // symbolAtLocation for a binding element is the local symbol. See if the search symbol is the property. @@ -1961,7 +1992,7 @@ namespace ts.FindAllReferences { function getRelatedSymbol(search: Search, referenceSymbol: Symbol, referenceLocation: Node, state: State): RelatedSymbol | undefined { const { checker } = state; return forEachRelatedSymbol(referenceSymbol, referenceLocation, checker, /*isForRenamePopulateSearchSymbolSet*/ false, - /*onlyIncludeBindingElementAtReferenceLocation*/ !state.options.isForRename || !!state.options.providePrefixAndSuffixTextForRename, + /*onlyIncludeBindingElementAtReferenceLocation*/ state.options.use !== FindReferencesUse.Rename || !!state.options.providePrefixAndSuffixTextForRename, (sym, rootSymbol, baseSymbol, kind): RelatedSymbol | undefined => search.includes(baseSymbol || rootSymbol || sym) // For a base type, use the symbol for the derived type. For a synthetic (e.g. union) property, use the union symbol. ? { symbol: rootSymbol && !(getCheckFlags(sym) & CheckFlags.Synthetic) ? rootSymbol : sym, kind } @@ -2054,7 +2085,7 @@ namespace ts.FindAllReferences { } function isForRenameWithPrefixAndSuffixText(options: Options) { - return options.isForRename && options.providePrefixAndSuffixTextForRename; + return options.use === FindReferencesUse.Rename && options.providePrefixAndSuffixTextForRename; } } } diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index bd32b5da46c37..bdd56acd960b0 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -649,6 +649,11 @@ namespace ts.formatting { if (tokenInfo.token.end > node.end) { break; } + if (node.kind === SyntaxKind.JsxText) { + // Intentation rules for jsx text are handled by `indentMultilineCommentOrJsxText` inside `processChildNode`; just fastforward past it here + formattingScanner.advance(); + continue; + } consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node); } @@ -736,10 +741,21 @@ namespace ts.formatting { const childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); - if (child.kind === SyntaxKind.JsxText) { const range: TextRange = { pos: child.getStart(), end: child.getEnd() }; - indentMultilineCommentOrJsxText(range, childIndentation.indentation, /*firstLineIsIndented*/ true, /*indentFinalLine*/ false); + if (range.pos !== range.end) { // don't indent zero-width jsx text + const siblings = parent.getChildren(sourceFile); + const currentIndex = findIndex(siblings, arg => arg.pos === child.pos); + const previousNode = siblings[currentIndex - 1]; + if (previousNode) { + // The jsx text needs no indentation whatsoever if it ends on the same line the previous sibling ends on + if (sourceFile.getLineAndCharacterOfPosition(range.end).line !== sourceFile.getLineAndCharacterOfPosition(previousNode.end).line) { + // The first line is (already) "indented" if the text starts on the same line as the previous sibling element ends on + const firstLineIsIndented = sourceFile.getLineAndCharacterOfPosition(range.pos).line === sourceFile.getLineAndCharacterOfPosition(previousNode.end).line; + indentMultilineCommentOrJsxText(range, childIndentation.indentation, firstLineIsIndented, /*indentFinalLine*/ false, /*jsxStyle*/ true); + } + } + } } childContextNode = node; @@ -808,8 +824,11 @@ namespace ts.formatting { if (listEndToken !== SyntaxKind.Unknown && formattingScanner.isOnToken()) { let tokenInfo: TokenInfo | undefined = formattingScanner.readTokenInfo(parent); if (tokenInfo.token.kind === SyntaxKind.CommaToken && isCallLikeExpression(parent)) { - formattingScanner.advance(); - tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent) : undefined; + const commaTokenLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; + if (startLine !== commaTokenLine) { + formattingScanner.advance(); + tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent) : undefined; + } } // consume the list end token only if it is still belong to the parent @@ -1039,7 +1058,7 @@ namespace ts.formatting { return indentationString !== sourceFile.text.substr(startLinePosition, indentationString.length); } - function indentMultilineCommentOrJsxText(commentRange: TextRange, indentation: number, firstLineIsIndented: boolean, indentFinalLine = true) { + function indentMultilineCommentOrJsxText(commentRange: TextRange, indentation: number, firstLineIsIndented: boolean, indentFinalLine = true, jsxTextStyleIndent?: boolean) { // split comment in lines let startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; const endLine = sourceFile.getLineAndCharacterOfPosition(commentRange.end).line; @@ -1070,7 +1089,7 @@ namespace ts.formatting { const nonWhitespaceColumnInFirstPart = SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); - if (indentation === nonWhitespaceColumnInFirstPart.column) { + if (indentation === nonWhitespaceColumnInFirstPart.column && !jsxTextStyleIndent) { return; } @@ -1081,14 +1100,19 @@ namespace ts.formatting { } // shift all parts on the delta size - const delta = indentation - nonWhitespaceColumnInFirstPart.column; + let delta = indentation - nonWhitespaceColumnInFirstPart.column; for (let i = startIndex; i < parts.length; i++ , startLine++) { const startLinePos = getStartPositionOfLine(startLine, sourceFile); const nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart : SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); - + if (jsxTextStyleIndent) { + // skip adding indentation to blank lines + if (isLineBreak(sourceFile.text.charCodeAt(getStartPositionOfLine(startLine, sourceFile)))) continue; + // reset delta on every line + delta = indentation - nonWhitespaceCharacterAndColumn.column; + } const newIndentation = nonWhitespaceCharacterAndColumn.column + delta; if (newIndentation > 0) { const indentationString = getIndentationString(newIndentation, options); diff --git a/src/services/formatting/formattingContext.ts b/src/services/formatting/formattingContext.ts index df479acdf4e35..5701f0cd0ad0e 100644 --- a/src/services/formatting/formattingContext.ts +++ b/src/services/formatting/formattingContext.ts @@ -26,11 +26,11 @@ namespace ts.formatting { } public updateContext(currentRange: TextRangeWithKind, currentTokenParent: Node, nextRange: TextRangeWithKind, nextTokenParent: Node, commonParent: Node) { - this.currentTokenSpan = Debug.assertDefined(currentRange); - this.currentTokenParent = Debug.assertDefined(currentTokenParent); - this.nextTokenSpan = Debug.assertDefined(nextRange); - this.nextTokenParent = Debug.assertDefined(nextTokenParent); - this.contextNode = Debug.assertDefined(commonParent); + this.currentTokenSpan = Debug.checkDefined(currentRange); + this.currentTokenParent = Debug.checkDefined(currentTokenParent); + this.nextTokenSpan = Debug.checkDefined(nextRange); + this.nextTokenParent = Debug.checkDefined(nextTokenParent); + this.contextNode = Debug.checkDefined(commonParent); // drop cached results this.contextNodeAllOnSameLine = undefined; diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index 98f7adc43aa12..64e257f4a0834 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -122,7 +122,13 @@ namespace ts.formatting { } function shouldRescanJsxText(node: Node): boolean { - return node.kind === SyntaxKind.JsxText; + const isJSXText = isJsxText(node); + if (isJSXText) { + const containingElement = findAncestor(node.parent, p => isJsxElement(p)); + if (!containingElement) return false; // should never happen + return !isParenthesizedExpression(containingElement.parent); + } + return false; } function shouldRescanSlashToken(container: Node): boolean { @@ -236,7 +242,7 @@ namespace ts.formatting { case ScanAction.RescanTemplateToken: if (token === SyntaxKind.CloseBraceToken) { lastScanAction = ScanAction.RescanTemplateToken; - return scanner.reScanTemplateToken(); + return scanner.reScanTemplateToken(/* isTaggedTemplate */ false); } break; case ScanAction.RescanJsxIdentifier: diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index 3b32797b08653..80fcc6bd9e922 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -241,7 +241,7 @@ namespace ts.formatting { rule("SpaceAfterConstructor", SyntaxKind.ConstructorKeyword, SyntaxKind.OpenParenToken, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], RuleAction.InsertSpace), rule("NoSpaceAfterConstructor", SyntaxKind.ConstructorKeyword, SyntaxKind.OpenParenToken, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], RuleAction.DeleteSpace), - rule("SpaceAfterComma", SyntaxKind.CommaToken, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket], RuleAction.InsertSpace), + rule("SpaceAfterComma", SyntaxKind.CommaToken, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket, isNextTokenNotCloseParen], RuleAction.InsertSpace), rule("NoSpaceAfterComma", SyntaxKind.CommaToken, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext], RuleAction.DeleteSpace), // Insert space after function keyword for anonymous functions @@ -670,6 +670,10 @@ namespace ts.formatting { return context.nextTokenSpan.kind !== SyntaxKind.CloseBracketToken; } + function isNextTokenNotCloseParen(context: FormattingContext): boolean { + return context.nextTokenSpan.kind !== SyntaxKind.CloseParenToken; + } + function isArrowFunctionContext(context: FormattingContext): boolean { return context.contextNode.kind === SyntaxKind.ArrowFunction; } diff --git a/src/services/getEditsForFileRename.ts b/src/services/getEditsForFileRename.ts index ffce22e3a303f..ed553ea56d5f5 100644 --- a/src/services/getEditsForFileRename.ts +++ b/src/services/getEditsForFileRename.ts @@ -63,8 +63,8 @@ namespace ts { const includes = mapDefined(property.initializer.elements, e => isStringLiteral(e) ? e.text : undefined); const matchers = getFileMatcherPatterns(configDir, /*excludes*/ [], includes, useCaseSensitiveFileNames, currentDirectory); // If there isn't some include for this, add a new one. - if (getRegexFromPattern(Debug.assertDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && - !getRegexFromPattern(Debug.assertDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { + if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && + !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { changeTracker.insertNodeAfter(configFile, last(property.initializer.elements), createStringLiteral(relativePath(newFileOrDirPath))); } } diff --git a/src/services/importTracker.ts b/src/services/importTracker.ts index 7e8955f8c9c3e..91b53ea418a19 100644 --- a/src/services/importTracker.ts +++ b/src/services/importTracker.ts @@ -499,7 +499,7 @@ namespace ts.FindAllReferences { function getExportAssignmentExport(ex: ExportAssignment): ExportedSymbol { // Get the symbol for the `export =` node; its parent is the module it's the export of. - const exportingModuleSymbol = Debug.assertDefined(ex.symbol.parent, "Expected export symbol to have a parent"); + const exportingModuleSymbol = Debug.checkDefined(ex.symbol.parent, "Expected export symbol to have a parent"); const exportKind = ex.isExportEquals ? ExportKind.ExportEquals : ExportKind.Default; return { kind: ImportExport.Export, symbol, exportInfo: { exportingModuleSymbol, exportKind } }; } @@ -517,11 +517,7 @@ namespace ts.FindAllReferences { return undefined; } - const sym = useLhsSymbol ? checker.getSymbolAtLocation(cast(node.left, isPropertyAccessExpression).name) : symbol; - // Better detection for GH#20803 - if (sym && !(checker.getMergedSymbol(sym.parent!).flags & SymbolFlags.Module)) { - Debug.fail(`Special property assignment kind does not have a module as its parent. Assignment is ${Debug.formatSymbol(sym)}, parent is ${Debug.formatSymbol(sym.parent!)}`); - } + const sym = useLhsSymbol ? checker.getSymbolAtLocation(getNameOfAccessExpression(cast(node.left, isAccessExpression))) : symbol; return sym && exportInfo(sym, kind); } } @@ -563,18 +559,18 @@ namespace ts.FindAllReferences { function getExportEqualsLocalSymbol(importedSymbol: Symbol, checker: TypeChecker): Symbol { if (importedSymbol.flags & SymbolFlags.Alias) { - return Debug.assertDefined(checker.getImmediateAliasedSymbol(importedSymbol)); + return Debug.checkDefined(checker.getImmediateAliasedSymbol(importedSymbol)); } const decl = importedSymbol.valueDeclaration; if (isExportAssignment(decl)) { // `export = class {}` - return Debug.assertDefined(decl.expression.symbol); + return Debug.checkDefined(decl.expression.symbol); } else if (isBinaryExpression(decl)) { // `module.exports = class {}` - return Debug.assertDefined(decl.right.symbol); + return Debug.checkDefined(decl.right.symbol); } else if (isSourceFile(decl)) { // json module - return Debug.assertDefined(decl.symbol); + return Debug.checkDefined(decl.symbol); } return Debug.fail(); } diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 56e0a0ae50ed6..7118fe8b76181 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -129,6 +129,8 @@ namespace ts.JsDoc { function getCommentText(tag: JSDocTag): string | undefined { const { comment } = tag; switch (tag.kind) { + case SyntaxKind.JSDocImplementsTag: + return withNode((tag as JSDocImplementsTag).class); case SyntaxKind.JSDocAugmentsTag: return withNode((tag as JSDocAugmentsTag).class); case SyntaxKind.JSDocTemplateTag: @@ -251,7 +253,6 @@ namespace ts.JsDoc { * @param position The (character-indexed) position in the file where the check should * be performed. */ - export function getDocCommentTemplateAtPosition(newLine: string, sourceFile: SourceFile, position: number): TextInsertion | undefined { const tokenAtPos = getTokenAtPosition(sourceFile, position); const existingDocComment = findAncestor(tokenAtPos, isJSDoc); @@ -370,6 +371,11 @@ namespace ts.JsDoc { const parameters = isFunctionLike(be.right) ? be.right.parameters : emptyArray; return { commentOwner, parameters }; } + case SyntaxKind.PropertyDeclaration: + const init = (commentOwner as PropertyDeclaration).initializer; + if (init && (isFunctionExpression(init) || isArrowFunction(init))) { + return { commentOwner, parameters: init.parameters }; + } } } diff --git a/src/services/organizeImports.ts b/src/services/organizeImports.ts index e7731a21f72a1..142bdbe879100 100644 --- a/src/services/organizeImports.ts +++ b/src/services/organizeImports.ts @@ -174,7 +174,7 @@ namespace ts.OrganizeImports { return importGroup; } - const { importWithoutClause, defaultImports, namespaceImports, namedImports } = getCategorizedImports(importGroup); + const { importWithoutClause, typeOnlyImports, regularImports } = getCategorizedImports(importGroup); const coalescedImports: ImportDeclaration[] = []; @@ -182,107 +182,128 @@ namespace ts.OrganizeImports { coalescedImports.push(importWithoutClause); } - // Normally, we don't combine default and namespace imports, but it would be silly to - // produce two import declarations in this special case. - if (defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) { - // Add the namespace import to the existing default ImportDeclaration. - const defaultImport = defaultImports[0]; - coalescedImports.push( - updateImportDeclarationAndClause(defaultImport, defaultImport.importClause!.name, namespaceImports[0].importClause!.namedBindings)); // TODO: GH#18217 + for (const group of [regularImports, typeOnlyImports]) { + const isTypeOnly = group === typeOnlyImports; + const { defaultImports, namespaceImports, namedImports } = group; + // Normally, we don't combine default and namespace imports, but it would be silly to + // produce two import declarations in this special case. + if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) { + // Add the namespace import to the existing default ImportDeclaration. + const defaultImport = defaultImports[0]; + coalescedImports.push( + updateImportDeclarationAndClause(defaultImport, defaultImport.importClause!.name, namespaceImports[0].importClause!.namedBindings)); // TODO: GH#18217 - return coalescedImports; - } - - const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => - compareIdentifiers((i1.importClause!.namedBindings as NamespaceImport).name, (i2.importClause!.namedBindings as NamespaceImport).name)); // TODO: GH#18217 + continue; + } - for (const namespaceImport of sortedNamespaceImports) { - // Drop the name, if any - coalescedImports.push( - updateImportDeclarationAndClause(namespaceImport, /*name*/ undefined, namespaceImport.importClause!.namedBindings)); // TODO: GH#18217 - } + const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => + compareIdentifiers((i1.importClause!.namedBindings as NamespaceImport).name, (i2.importClause!.namedBindings as NamespaceImport).name)); // TODO: GH#18217 - if (defaultImports.length === 0 && namedImports.length === 0) { - return coalescedImports; - } + for (const namespaceImport of sortedNamespaceImports) { + // Drop the name, if any + coalescedImports.push( + updateImportDeclarationAndClause(namespaceImport, /*name*/ undefined, namespaceImport.importClause!.namedBindings)); // TODO: GH#18217 + } - let newDefaultImport: Identifier | undefined; - const newImportSpecifiers: ImportSpecifier[] = []; - if (defaultImports.length === 1) { - newDefaultImport = defaultImports[0].importClause!.name; - } - else { - for (const defaultImport of defaultImports) { - newImportSpecifiers.push( - createImportSpecifier(createIdentifier("default"), defaultImport.importClause!.name!)); // TODO: GH#18217 + if (defaultImports.length === 0 && namedImports.length === 0) { + continue; } - } - newImportSpecifiers.push(...flatMap(namedImports, i => (i.importClause!.namedBindings as NamedImports).elements)); // TODO: GH#18217 + let newDefaultImport: Identifier | undefined; + const newImportSpecifiers: ImportSpecifier[] = []; + if (defaultImports.length === 1) { + newDefaultImport = defaultImports[0].importClause!.name; + } + else { + for (const defaultImport of defaultImports) { + newImportSpecifiers.push( + createImportSpecifier(createIdentifier("default"), defaultImport.importClause!.name!)); // TODO: GH#18217 + } + } - const sortedImportSpecifiers = sortSpecifiers(newImportSpecifiers); + newImportSpecifiers.push(...flatMap(namedImports, i => (i.importClause!.namedBindings as NamedImports).elements)); // TODO: GH#18217 + + const sortedImportSpecifiers = sortSpecifiers(newImportSpecifiers); + + const importDecl = defaultImports.length > 0 + ? defaultImports[0] + : namedImports[0]; + + const newNamedImports = sortedImportSpecifiers.length === 0 + ? newDefaultImport + ? undefined + : createNamedImports(emptyArray) + : namedImports.length === 0 + ? createNamedImports(sortedImportSpecifiers) + : updateNamedImports(namedImports[0].importClause!.namedBindings as NamedImports, sortedImportSpecifiers); // TODO: GH#18217 + + // Type-only imports are not allowed to mix default, namespace, and named imports in any combination. + // We could rewrite a default import as a named import (`import { default as name }`), but we currently + // choose not to as a stylistic preference. + if (isTypeOnly && newDefaultImport && newNamedImports) { + coalescedImports.push( + updateImportDeclarationAndClause(importDecl, newDefaultImport, /*namedBindings*/ undefined)); + coalescedImports.push( + updateImportDeclarationAndClause(namedImports[0] ?? importDecl, /*name*/ undefined, newNamedImports)); + } + else { + coalescedImports.push( + updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)); + } + } - const importDecl = defaultImports.length > 0 - ? defaultImports[0] - : namedImports[0]; + return coalescedImports; - const newNamedImports = sortedImportSpecifiers.length === 0 - ? newDefaultImport - ? undefined - : createNamedImports(emptyArray) - : namedImports.length === 0 - ? createNamedImports(sortedImportSpecifiers) - : updateNamedImports(namedImports[0].importClause!.namedBindings as NamedImports, sortedImportSpecifiers); // TODO: GH#18217 + } - coalescedImports.push( - updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)); + interface ImportGroup { + defaultImports: ImportDeclaration[]; + namespaceImports: ImportDeclaration[]; + namedImports: ImportDeclaration[]; + } - return coalescedImports; + /* + * Returns entire import declarations because they may already have been rewritten and + * may lack parent pointers. The desired parts can easily be recovered based on the + * categorization. + * + * NB: There may be overlap between `defaultImports` and `namespaceImports`/`namedImports`. + */ + function getCategorizedImports(importGroup: readonly ImportDeclaration[]) { + let importWithoutClause: ImportDeclaration | undefined; + const typeOnlyImports: ImportGroup = { defaultImports: [], namespaceImports: [], namedImports: [] }; + const regularImports: ImportGroup = { defaultImports: [], namespaceImports: [], namedImports: [] }; + + for (const importDeclaration of importGroup) { + if (importDeclaration.importClause === undefined) { + // Only the first such import is interesting - the others are redundant. + // Note: Unfortunately, we will lose trivia that was on this node. + importWithoutClause = importWithoutClause || importDeclaration; + continue; + } - /* - * Returns entire import declarations because they may already have been rewritten and - * may lack parent pointers. The desired parts can easily be recovered based on the - * categorization. - * - * NB: There may be overlap between `defaultImports` and `namespaceImports`/`namedImports`. - */ - function getCategorizedImports(importGroup: readonly ImportDeclaration[]) { - let importWithoutClause: ImportDeclaration | undefined; - const defaultImports: ImportDeclaration[] = []; - const namespaceImports: ImportDeclaration[] = []; - const namedImports: ImportDeclaration[] = []; - - for (const importDeclaration of importGroup) { - if (importDeclaration.importClause === undefined) { - // Only the first such import is interesting - the others are redundant. - // Note: Unfortunately, we will lose trivia that was on this node. - importWithoutClause = importWithoutClause || importDeclaration; - continue; - } + const group = importDeclaration.importClause.isTypeOnly ? typeOnlyImports : regularImports; + const { name, namedBindings } = importDeclaration.importClause; - const { name, namedBindings } = importDeclaration.importClause; + if (name) { + group.defaultImports.push(importDeclaration); + } - if (name) { - defaultImports.push(importDeclaration); + if (namedBindings) { + if (isNamespaceImport(namedBindings)) { + group.namespaceImports.push(importDeclaration); } - - if (namedBindings) { - if (isNamespaceImport(namedBindings)) { - namespaceImports.push(importDeclaration); - } - else { - namedImports.push(importDeclaration); - } + else { + group.namedImports.push(importDeclaration); } } - - return { - importWithoutClause, - defaultImports, - namespaceImports, - namedImports, - }; } + + return { + importWithoutClause, + typeOnlyImports, + regularImports, + }; } // Internal for testing @@ -294,7 +315,7 @@ namespace ts.OrganizeImports { return exportGroup; } - const { exportWithoutClause, namedExports } = getCategorizedExports(exportGroup); + const { exportWithoutClause, namedExports, typeOnlyExports } = getCategorizedExports(exportGroup); const coalescedExports: ExportDeclaration[] = []; @@ -302,29 +323,30 @@ namespace ts.OrganizeImports { coalescedExports.push(exportWithoutClause); } - if (namedExports.length === 0) { - return coalescedExports; + for (const exportGroup of [namedExports, typeOnlyExports]) { + if (exportGroup.length === 0) { + continue; + } + const newExportSpecifiers: ExportSpecifier[] = []; + newExportSpecifiers.push(...flatMap(exportGroup, i => i.exportClause && isNamedExports(i.exportClause) ? i.exportClause.elements : emptyArray)); + + const sortedExportSpecifiers = sortSpecifiers(newExportSpecifiers); + + const exportDecl = exportGroup[0]; + coalescedExports.push( + updateExportDeclaration( + exportDecl, + exportDecl.decorators, + exportDecl.modifiers, + exportDecl.exportClause && ( + isNamedExports(exportDecl.exportClause) ? + updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : + updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name) + ), + exportDecl.moduleSpecifier, + exportDecl.isTypeOnly)); } - const newExportSpecifiers: ExportSpecifier[] = []; - newExportSpecifiers.push(...flatMap(namedExports, i => i.exportClause && isNamedExports(i.exportClause) ? i.exportClause.elements : emptyArray)); - - const sortedExportSpecifiers = sortSpecifiers(newExportSpecifiers); - - const exportDecl = namedExports[0]; - coalescedExports.push( - updateExportDeclaration( - exportDecl, - exportDecl.decorators, - exportDecl.modifiers, - exportDecl.exportClause && ( - isNamedExports(exportDecl.exportClause) ? - updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : - updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name) - ), - exportDecl.moduleSpecifier, - exportDecl.isTypeOnly)); - return coalescedExports; /* @@ -335,6 +357,7 @@ namespace ts.OrganizeImports { function getCategorizedExports(exportGroup: readonly ExportDeclaration[]) { let exportWithoutClause: ExportDeclaration | undefined; const namedExports: ExportDeclaration[] = []; + const typeOnlyExports: ExportDeclaration[] = []; for (const exportDeclaration of exportGroup) { if (exportDeclaration.exportClause === undefined) { @@ -342,6 +365,9 @@ namespace ts.OrganizeImports { // Note: Unfortunately, we will lose trivia that was on this node. exportWithoutClause = exportWithoutClause || exportDeclaration; } + else if (exportDeclaration.isTypeOnly) { + typeOnlyExports.push(exportDeclaration); + } else { namedExports.push(exportDeclaration); } @@ -350,6 +376,7 @@ namespace ts.OrganizeImports { return { exportWithoutClause, namedExports, + typeOnlyExports, }; } } diff --git a/src/services/outliningElementsCollector.ts b/src/services/outliningElementsCollector.ts index b6212e2a2d285..ab8cfb3f6c33e 100644 --- a/src/services/outliningElementsCollector.ts +++ b/src/services/outliningElementsCollector.ts @@ -10,7 +10,8 @@ namespace ts.OutliningElementsCollector { function addNodeOutliningSpans(sourceFile: SourceFile, cancellationToken: CancellationToken, out: Push): void { let depthRemaining = 40; let current = 0; - const statements = sourceFile.statements; + // Includes the EOF Token so that comments which aren't attached to statements are included + const statements = [...sourceFile.statements, sourceFile.endOfFileToken]; const n = statements.length; while (current < n) { while (current < n && !isAnyImportSyntax(statements[current])) { @@ -33,7 +34,7 @@ namespace ts.OutliningElementsCollector { if (depthRemaining === 0) return; cancellationToken.throwIfCancellationRequested(); - if (isDeclaration(n)) { + if (isDeclaration(n) || n.kind === SyntaxKind.EndOfFileToken) { addOutliningForLeadingCommentsForNode(n, sourceFile, cancellationToken, out); } diff --git a/src/services/refactors/convertExport.ts b/src/services/refactors/convertExport.ts index 66f893dd0a022..c08ae05bce8af 100644 --- a/src/services/refactors/convertExport.ts +++ b/src/services/refactors/convertExport.ts @@ -13,7 +13,7 @@ namespace ts.refactor { }, getEditsForAction(context, actionName): RefactorEditInfo { Debug.assert(actionName === actionNameDefaultToNamed || actionName === actionNameNamedToDefault, "Unexpected action name"); - const edits = textChanges.ChangeTracker.with(context, t => doChange(context.file, context.program, Debug.assertDefined(getInfo(context), "context must have info"), t, context.cancellationToken)); + const edits = textChanges.ChangeTracker.with(context, t => doChange(context.file, context.program, Debug.checkDefined(getInfo(context), "context must have info"), t, context.cancellationToken)); return { edits, renameFilename: undefined, renameLocation: undefined }; }, }); @@ -78,10 +78,10 @@ namespace ts.refactor { function changeExport(exportingSourceFile: SourceFile, { wasDefault, exportNode, exportName }: Info, changes: textChanges.ChangeTracker, checker: TypeChecker): void { if (wasDefault) { - changes.delete(exportingSourceFile, Debug.assertDefined(findModifier(exportNode, SyntaxKind.DefaultKeyword), "Should find a default keyword in modifier list")); + changes.delete(exportingSourceFile, Debug.checkDefined(findModifier(exportNode, SyntaxKind.DefaultKeyword), "Should find a default keyword in modifier list")); } else { - const exportKeyword = Debug.assertDefined(findModifier(exportNode, SyntaxKind.ExportKeyword), "Should find an export keyword in modifier list"); + const exportKeyword = Debug.checkDefined(findModifier(exportNode, SyntaxKind.ExportKeyword), "Should find an export keyword in modifier list"); switch (exportNode.kind) { case SyntaxKind.FunctionDeclaration: case SyntaxKind.ClassDeclaration: @@ -92,7 +92,7 @@ namespace ts.refactor { // If 'x' isn't used in this file, `export const x = 0;` --> `export default 0;` if (!FindAllReferences.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile)) { // We checked in `getInfo` that an initializer exists. - changes.replaceNode(exportingSourceFile, exportNode, createExportDefault(Debug.assertDefined(first(exportNode.declarationList.declarations).initializer, "Initializer was previously known to be present"))); + changes.replaceNode(exportingSourceFile, exportNode, createExportDefault(Debug.checkDefined(first(exportNode.declarationList.declarations).initializer, "Initializer was previously known to be present"))); break; } // falls through @@ -111,7 +111,7 @@ namespace ts.refactor { function changeImports(program: Program, { wasDefault, exportName, exportingModuleSymbol }: Info, changes: textChanges.ChangeTracker, cancellationToken: CancellationToken | undefined): void { const checker = program.getTypeChecker(); - const exportSymbol = Debug.assertDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); + const exportSymbol = Debug.checkDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); FindAllReferences.Core.eachExportReference(program.getSourceFiles(), checker, cancellationToken, exportSymbol, exportingModuleSymbol, exportName.text, wasDefault, ref => { const importingSourceFile = ref.getSourceFile(); if (wasDefault) { diff --git a/src/services/refactors/convertImport.ts b/src/services/refactors/convertImport.ts index f87e90dba4ac2..29cefdc3210e3 100644 --- a/src/services/refactors/convertImport.ts +++ b/src/services/refactors/convertImport.ts @@ -13,7 +13,7 @@ namespace ts.refactor { }, getEditsForAction(context, actionName): RefactorEditInfo { Debug.assert(actionName === actionNameNamespaceToNamed || actionName === actionNameNamedToNamespace, "Unexpected action name"); - const edits = textChanges.ChangeTracker.with(context, t => doChange(context.file, context.program, t, Debug.assertDefined(getImportToConvert(context), "Context must provide an import to convert"))); + const edits = textChanges.ChangeTracker.with(context, t => doChange(context.file, context.program, t, Debug.checkDefined(getImportToConvert(context), "Context must provide an import to convert"))); return { edits, renameFilename: undefined, renameLocation: undefined }; } }); diff --git a/src/services/refactors/convertParamsToDestructuredObject.ts b/src/services/refactors/convertParamsToDestructuredObject.ts index 6778eeb79c5e6..803a767761090 100644 --- a/src/services/refactors/convertParamsToDestructuredObject.ts +++ b/src/services/refactors/convertParamsToDestructuredObject.ts @@ -523,7 +523,7 @@ namespace ts.refactor.convertParamsToDestructuredObject { if (classDeclaration.name) return [classDeclaration.name]; // If the class declaration doesn't have a name, it should have a default modifier. // We validated this in `isValidFunctionDeclaration` through `hasNameOrDefault` - const defaultModifier = Debug.assertDefined( + const defaultModifier = Debug.checkDefined( findModifier(classDeclaration, SyntaxKind.DefaultKeyword), "Nameless class declaration should be a default export"); return [defaultModifier]; @@ -542,14 +542,14 @@ namespace ts.refactor.convertParamsToDestructuredObject { if (functionDeclaration.name) return [functionDeclaration.name]; // If the function declaration doesn't have a name, it should have a default modifier. // We validated this in `isValidFunctionDeclaration` through `hasNameOrDefault` - const defaultModifier = Debug.assertDefined( + const defaultModifier = Debug.checkDefined( findModifier(functionDeclaration, SyntaxKind.DefaultKeyword), "Nameless function declaration should be a default export"); return [defaultModifier]; case SyntaxKind.MethodDeclaration: return [functionDeclaration.name]; case SyntaxKind.Constructor: - const ctrKeyword = Debug.assertDefined( + const ctrKeyword = Debug.checkDefined( findChildOfKind(functionDeclaration, SyntaxKind.ConstructorKeyword, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword"); if (functionDeclaration.parent.kind === SyntaxKind.ClassExpression) { diff --git a/src/services/refactors/convertStringOrTemplateLiteral.ts b/src/services/refactors/convertStringOrTemplateLiteral.ts index 02a2afc4f48b0..58a62a77d7e3c 100644 --- a/src/services/refactors/convertStringOrTemplateLiteral.ts +++ b/src/services/refactors/convertStringOrTemplateLiteral.ts @@ -11,7 +11,7 @@ namespace ts.refactor.convertStringOrTemplateLiteral { const maybeBinary = getParentBinaryExpression(node); const refactorInfo: ApplicableRefactorInfo = { name: refactorName, description: refactorDescription, actions: [] }; - if ((isBinaryExpression(maybeBinary) || isStringLiteral(maybeBinary)) && isStringConcatenationValid(maybeBinary)) { + if (isBinaryExpression(maybeBinary) && isStringConcatenationValid(maybeBinary)) { refactorInfo.actions.push({ name: refactorName, description: refactorDescription }); return [refactorInfo]; } diff --git a/src/services/refactors/extractSymbol.ts b/src/services/refactors/extractSymbol.ts index f797399bc8b0b..799a44ea525be 100644 --- a/src/services/refactors/extractSymbol.ts +++ b/src/services/refactors/extractSymbol.ts @@ -1382,7 +1382,7 @@ namespace ts.refactor.extractSymbol { } // There must be at least one statement since we started in one. - return Debug.assertDefined(prevStatement, "prevStatement failed to get set"); + return Debug.checkDefined(prevStatement, "prevStatement failed to get set"); } Debug.assert(curr !== scope, "Didn't encounter a block-like before encountering scope"); diff --git a/src/services/refactors/extractType.ts b/src/services/refactors/extractType.ts index 70934ef7a7ce1..51049f6b7cdd1 100644 --- a/src/services/refactors/extractType.ts +++ b/src/services/refactors/extractType.ts @@ -23,7 +23,7 @@ namespace ts.refactor { }, getEditsForAction(context, actionName): RefactorEditInfo { const { file } = context; - const info = Debug.assertDefined(getRangeToExtract(context), "Expected to find a range to extract"); + const info = Debug.checkDefined(getRangeToExtract(context), "Expected to find a range to extract"); const name = getUniqueName("NewType", file); const edits = textChanges.ChangeTracker.with(context, changes => { @@ -68,7 +68,7 @@ namespace ts.refactor { if (!selection || !isTypeNode(selection)) return undefined; const checker = context.program.getTypeChecker(); - const firstStatement = Debug.assertDefined(findAncestor(selection, isStatement), "Should find a statement"); + const firstStatement = Debug.checkDefined(findAncestor(selection, isStatement), "Should find a statement"); const typeParameters = collectTypeParameters(checker, selection, firstStatement, file); if (!typeParameters) return undefined; diff --git a/src/services/refactors/generateGetAccessorAndSetAccessor.ts b/src/services/refactors/generateGetAccessorAndSetAccessor.ts index a1bd32b37fc29..3a00f528bef6a 100644 --- a/src/services/refactors/generateGetAccessorAndSetAccessor.ts +++ b/src/services/refactors/generateGetAccessorAndSetAccessor.ts @@ -87,7 +87,7 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor { return { renameFilename, renameLocation, edits }; } - function isConvertibleName (name: DeclarationName): name is AcceptedNameType { + function isConvertibleName(name: DeclarationName): name is AcceptedNameType { return isIdentifier(name) || isStringLiteral(name); } @@ -95,11 +95,11 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor { return isParameterPropertyDeclaration(node, node.parent) || isPropertyDeclaration(node) || isPropertyAssignment(node); } - function createPropertyName (name: string, originalName: AcceptedNameType) { + function createPropertyName(name: string, originalName: AcceptedNameType) { return isIdentifier(originalName) ? createIdentifier(name) : createLiteral(name); } - function createAccessorAccessExpression (fieldName: AcceptedNameType, isStatic: boolean, container: ContainerDeclaration) { + function createAccessorAccessExpression(fieldName: AcceptedNameType, isStatic: boolean, container: ContainerDeclaration) { const leftHead = isStatic ? (container).name! : createThis(); // TODO: GH#18217 return isIdentifier(fieldName) ? createPropertyAccess(leftHead, fieldName) : createElementAccess(leftHead, createLiteral(fieldName)); } diff --git a/src/services/refactors/moveToNewFile.ts b/src/services/refactors/moveToNewFile.ts index 8aaad6275474d..a9b8171cbc98b 100644 --- a/src/services/refactors/moveToNewFile.ts +++ b/src/services/refactors/moveToNewFile.ts @@ -9,7 +9,7 @@ namespace ts.refactor { }, getEditsForAction(context, actionName): RefactorEditInfo { Debug.assert(actionName === refactorName, "Wrong refactor invoked"); - const statements = Debug.assertDefined(getStatementsToMove(context)); + const statements = Debug.checkDefined(getStatementsToMove(context)); const edits = textChanges.ChangeTracker.with(context, t => doChange(context.file, context.program, statements, t, context.host, context.preferences)); return { edits, renameFilename: undefined, renameLocation: undefined }; } @@ -310,7 +310,7 @@ namespace ts.refactor { return flatMap(toMove, statement => { if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && - forEachTopLevelDeclaration(statement, d => needExport.has(Debug.assertDefined(d.symbol)))) { + forEachTopLevelDeclaration(statement, d => needExport.has(Debug.checkDefined(d.symbol)))) { const exports = addExport(statement, useEs6Exports); if (exports) return exports; } @@ -472,7 +472,7 @@ namespace ts.refactor { for (const statement of toMove) { forEachTopLevelDeclaration(statement, decl => { - movedSymbols.add(Debug.assertDefined(isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); + movedSymbols.add(Debug.checkDefined(isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); }); } for (const statement of toMove) { diff --git a/src/services/rename.ts b/src/services/rename.ts index 141e00268a448..037c7f8eb236f 100644 --- a/src/services/rename.ts +++ b/src/services/rename.ts @@ -1,11 +1,14 @@ /* @internal */ namespace ts.Rename { export function getRenameInfo(program: Program, sourceFile: SourceFile, position: number, options?: RenameInfoOptions): RenameInfo { - const node = getTouchingPropertyName(sourceFile, position); - const renameInfo = node && nodeIsEligibleForRename(node) - ? getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, declaration => program.isSourceFileDefaultLibrary(declaration.getSourceFile()), options) - : undefined; - return renameInfo || getRenameInfoError(Diagnostics.You_cannot_rename_this_element); + const node = getAdjustedRenameLocation(getTouchingPropertyName(sourceFile, position)); + if (nodeIsEligibleForRename(node)) { + const renameInfo = getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, declaration => program.isSourceFileDefaultLibrary(declaration.getSourceFile()), options); + if (renameInfo) { + return renameInfo; + } + } + return getRenameInfoError(Diagnostics.You_cannot_rename_this_element); } function getRenameInfoForNode(node: Node, typeChecker: TypeChecker, sourceFile: SourceFile, isDefinedInLibraryFile: (declaration: Node) => boolean, options?: RenameInfoOptions): RenameInfo | undefined { diff --git a/src/services/services.ts b/src/services/services.ts index 1a3eae675e62c..f6e2698045dd0 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -980,11 +980,6 @@ namespace ts { return names; } - public getVersion(path: Path): string { - const file = this.getHostFileInformation(path); - return (file && file.version)!; // TODO: GH#18217 - } - public getScriptSnapshot(path: Path): IScriptSnapshot { const file = this.getHostFileInformation(path); return (file && file.scriptSnapshot)!; // TODO: GH#18217 @@ -1228,7 +1223,7 @@ namespace ts { const projectReferences = hostCache.getProjectReferences(); // If the program is already up-to-date, we can reuse it - if (isProgramUptoDate(program, rootFileNames, hostCache.compilationSettings(), path => hostCache!.getVersion(path), fileExists, hasInvalidatedResolution, !!host.hasChangedAutomaticTypeDirectiveNames, projectReferences)) { + if (isProgramUptoDate(program, rootFileNames, hostCache.compilationSettings(), (_path, fileName) => host.getScriptVersion(fileName), fileExists, hasInvalidatedResolution, !!host.hasChangedAutomaticTypeDirectiveNames, projectReferences)) { return; } @@ -1261,7 +1256,7 @@ namespace ts { return host.getDirectories ? host.getDirectories(path) : []; }, readDirectory(path, extensions, exclude, include, depth) { - Debug.assertDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"); + Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return host.readDirectory!(path, extensions, exclude, include, depth); }, onReleaseOldSourceFile, @@ -1490,9 +1485,9 @@ namespace ts { ); } - function getCompletionEntrySymbol(fileName: string, position: number, name: string, source?: string): Symbol | undefined { + function getCompletionEntrySymbol(fileName: string, position: number, name: string, source?: string, preferences: UserPreferences = emptyOptions): Symbol | undefined { synchronizeHostData(); - return Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name, source }, host); + return Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name, source }, host, preferences); } function getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined { @@ -1608,7 +1603,7 @@ namespace ts { function findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): RenameLocation[] | undefined { synchronizeHostData(); const sourceFile = getValidSourceFile(fileName); - const node = getTouchingPropertyName(sourceFile, position); + const node = getAdjustedRenameLocation(getTouchingPropertyName(sourceFile, position)); if (isIdentifier(node) && (isJsxOpeningElement(node.parent) || isJsxClosingElement(node.parent)) && isIntrinsicJsxName(node.escapedText)) { const { openingElement, closingElement } = node.parent.parent; return [openingElement, closingElement].map((node): RenameLocation => { @@ -1621,21 +1616,21 @@ namespace ts { }); } else { - return getReferencesWorker(node, position, { findInStrings, findInComments, providePrefixAndSuffixTextForRename, isForRename: true }, + return getReferencesWorker(node, position, { findInStrings, findInComments, providePrefixAndSuffixTextForRename, use: FindAllReferences.FindReferencesUse.Rename }, (entry, originalNode, checker) => FindAllReferences.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false)); } } function getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined { synchronizeHostData(); - return getReferencesWorker(getTouchingPropertyName(getValidSourceFile(fileName), position), position, {}, FindAllReferences.toReferenceEntry); + return getReferencesWorker(getTouchingPropertyName(getValidSourceFile(fileName), position), position, { use: FindAllReferences.FindReferencesUse.References }, FindAllReferences.toReferenceEntry); } function getReferencesWorker(node: Node, position: number, options: FindAllReferences.Options, cb: FindAllReferences.ToReferenceOrRenameEntry): T[] | undefined { synchronizeHostData(); // Exclude default library when renaming as commonly user don't want to change that file. - const sourceFiles = options && options.isForRename + const sourceFiles = options && options.use === FindAllReferences.FindReferencesUse.Rename ? program.getSourceFiles().filter(sourceFile => !program.isSourceFileDefaultLibrary(sourceFile)) : program.getSourceFiles(); @@ -2227,6 +2222,7 @@ namespace ts { getEditsForRefactor, toLineColumnOffset: sourceMapper.toLineColumnOffset, getSourceMapper: () => sourceMapper, + clearSourceMapperCache: () => sourceMapper.clearCache(), prepareCallHierarchy, provideCallHierarchyIncomingCalls, provideCallHierarchyOutgoingCalls diff --git a/src/services/shims.ts b/src/services/shims.ts index 58b655ef0a3ea..c447b65854be4 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -922,8 +922,8 @@ namespace ts { () => { const results = this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch)); // workaround for VS document highlighting issue - keep only items from the initial file - const normalizedName = normalizeSlashes(fileName).toLowerCase(); - return filter(results, r => normalizeSlashes(r.fileName).toLowerCase() === normalizedName); + const normalizedName = toFileNameLowerCase(normalizeSlashes(fileName)); + return filter(results, r => toFileNameLowerCase(normalizeSlashes(r.fileName)) === normalizedName); }); } @@ -1295,4 +1295,4 @@ namespace ts { } } -/* eslint-enable no-in-operator */ \ No newline at end of file +/* eslint-enable no-in-operator */ diff --git a/src/services/smartSelection.ts b/src/services/smartSelection.ts index 984c1de86e7f8..d7df7037e38c4 100644 --- a/src/services/smartSelection.ts +++ b/src/services/smartSelection.ts @@ -144,7 +144,7 @@ namespace ts.SmartSelectionRange { // few keystrokes. if (isMappedTypeNode(node)) { const [openBraceToken, ...children] = node.getChildren(); - const closeBraceToken = Debug.assertDefined(children.pop()); + const closeBraceToken = Debug.checkDefined(children.pop()); Debug.assertEqual(openBraceToken.kind, SyntaxKind.OpenBraceToken); Debug.assertEqual(closeBraceToken.kind, SyntaxKind.CloseBraceToken); // Group `-/+readonly` and `-/+?` diff --git a/src/services/suggestionDiagnostics.ts b/src/services/suggestionDiagnostics.ts index e95406a463592..5767bad6a13f6 100644 --- a/src/services/suggestionDiagnostics.ts +++ b/src/services/suggestionDiagnostics.ts @@ -37,23 +37,8 @@ namespace ts { function check(node: Node) { if (isJsFile) { - switch (node.kind) { - case SyntaxKind.FunctionExpression: - const decl = getDeclarationOfExpando(node); - if (decl) { - const symbol = decl.symbol; - if (symbol && (symbol.exports && symbol.exports.size || symbol.members && symbol.members.size)) { - diags.push(createDiagnosticForNode(isVariableDeclaration(node.parent) ? node.parent.name : node, Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); - break; - } - } - // falls through if no diagnostic was created - case SyntaxKind.FunctionDeclaration: - const symbol = node.symbol; - if (symbol.members && (symbol.members.size > 0)) { - diags.push(createDiagnosticForNode(isVariableDeclaration(node.parent) ? node.parent.name : node, Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); - } - break; + if (canBeConvertedToClass(node)) { + diags.push(createDiagnosticForNode(isVariableDeclaration(node.parent) ? node.parent.name : node, Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); } } else { @@ -193,4 +178,22 @@ namespace ts { function getKeyFromNode(exp: FunctionLikeDeclaration) { return `${exp.pos.toString()}:${exp.end.toString()}`; } + + function canBeConvertedToClass(node: Node): boolean { + if (node.kind === SyntaxKind.FunctionExpression) { + if (isVariableDeclaration(node.parent) && node.symbol.members?.size) { + return true; + } + + const decl = getDeclarationOfExpando(node); + const symbol = decl?.symbol; + return !!(symbol && (symbol.exports?.size || symbol.members?.size)); + } + + if (node.kind === SyntaxKind.FunctionDeclaration) { + return !!node.symbol.members?.size; + } + + return false; + } } diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts index be978b5a3342b..49f75cf41ecb4 100644 --- a/src/services/textChanges.ts +++ b/src/services/textChanges.ts @@ -1238,9 +1238,10 @@ namespace ts.textChanges { } case SyntaxKind.ImportDeclaration: + const isFirstImport = sourceFile.imports.length && node === first(sourceFile.imports).parent || node === find(sourceFile.statements, isImportDeclaration); deleteNode(changes, sourceFile, node, // For first import, leave header comment in place - node === sourceFile.imports[0].parent ? { leadingTriviaOption: LeadingTriviaOption.Exclude } : undefined); + isFirstImport ? { leadingTriviaOption: LeadingTriviaOption.Exclude } : undefined); break; case SyntaxKind.BindingElement: @@ -1314,7 +1315,7 @@ namespace ts.textChanges { // Delete named imports while preserving the default import // import d|, * as ns| from './file' // import d|, { a }| from './file' - const previousToken = Debug.assertDefined(getTokenAtPosition(sourceFile, node.pos - 1)); + const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { @@ -1370,7 +1371,7 @@ namespace ts.textChanges { } function deleteNodeInList(changes: ChangeTracker, deletedNodesInLists: NodeSet, sourceFile: SourceFile, node: Node): void { - const containingList = Debug.assertDefined(formatting.SmartIndenter.getContainingList(node, sourceFile)); + const containingList = Debug.checkDefined(formatting.SmartIndenter.getContainingList(node, sourceFile)); const index = indexOfNode(containingList, node); Debug.assert(index !== -1); if (containingList.length === 1) { diff --git a/src/services/tsconfig.json b/src/services/tsconfig.json index 47b525771eda3..58e43ee9921d5 100644 --- a/src/services/tsconfig.json +++ b/src/services/tsconfig.json @@ -48,6 +48,7 @@ "refactorProvider.ts", "codefixes/addConvertToUnknownForNonOverlappingTypes.ts", "codefixes/addEmptyExportDeclaration.ts", + "codefixes/addMissingAsync.ts", "codefixes/addMissingAwait.ts", "codefixes/addMissingConst.ts", "codefixes/addMissingDeclareProperty.ts", @@ -74,6 +75,7 @@ "codefixes/fixModuleAndTargetOptions.ts", "codefixes/fixExtendsInterfaceBecomesImplements.ts", "codefixes/fixForgottenThisPropertyAccess.ts", + "codefixes/fixInvalidJsxCharacters.ts", "codefixes/fixUnusedIdentifier.ts", "codefixes/fixUnreachableCode.ts", "codefixes/fixUnusedLabel.ts", diff --git a/src/services/types.ts b/src/services/types.ts index 44f73626a8fb5..1df82f8a7e9d9 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -382,6 +382,8 @@ namespace ts { toLineColumnOffset?(fileName: string, position: number): LineAndCharacter; /** @internal */ getSourceMapper(): SourceMapper; + /** @internal */ + clearSourceMapperCache(): void; getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[]; getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions; diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 4922ec56348f9..1bda138472d16 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -88,6 +88,7 @@ namespace ts { } export function getMeaningFromLocation(node: Node): SemanticMeaning { + node = getAdjustedReferenceLocation(node); if (node.kind === SyntaxKind.SourceFile) { return SemanticMeaning.Value; } @@ -720,6 +721,348 @@ namespace ts { return syntaxList; } + function isDefaultModifier(node: Node) { + return node.kind === SyntaxKind.DefaultKeyword; + } + + function isClassKeyword(node: Node) { + return node.kind === SyntaxKind.ClassKeyword; + } + + function isFunctionKeyword(node: Node) { + return node.kind === SyntaxKind.FunctionKeyword; + } + + function getAdjustedLocationForClass(node: ClassDeclaration | ClassExpression) { + if (isNamedDeclaration(node)) { + return node.name; + } + if (isClassDeclaration(node)) { + // for class and function declarations, use the `default` modifier + // when the declaration is unnamed. + const defaultModifier = find(node.modifiers!, isDefaultModifier); + if (defaultModifier) return defaultModifier; + } + if (isClassExpression(node)) { + // for class expressions, use the `class` keyword when the class is unnamed + const classKeyword = find(node.getChildren(), isClassKeyword); + if (classKeyword) return classKeyword; + } + } + + function getAdjustedLocationForFunction(node: FunctionDeclaration | FunctionExpression) { + if (isNamedDeclaration(node)) { + return node.name; + } + if (isFunctionDeclaration(node)) { + // for class and function declarations, use the `default` modifier + // when the declaration is unnamed. + const defaultModifier = find(node.modifiers!, isDefaultModifier); + if (defaultModifier) return defaultModifier; + } + if (isFunctionExpression(node)) { + // for function expressions, use the `function` keyword when the function is unnamed + const functionKeyword = find(node.getChildren(), isFunctionKeyword); + if (functionKeyword) return functionKeyword; + } + } + + function getAdjustedLocationForDeclaration(node: Node, forRename: boolean) { + if (!forRename) { + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.ClassExpression: + return getAdjustedLocationForClass(node as ClassDeclaration | ClassExpression); + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + return getAdjustedLocationForFunction(node as FunctionDeclaration | FunctionExpression); + } + } + if (isNamedDeclaration(node)) { + return node.name; + } + } + + function getAdjustedLocationForImportDeclaration(node: ImportDeclaration, forRename: boolean) { + if (node.importClause) { + if (node.importClause.name && node.importClause.namedBindings) { + // do not adjust if we have both a name and named bindings + return; + } + + // /**/import [|name|] from ...; + // import /**/type [|name|] from ...; + if (node.importClause.name) { + return node.importClause.name; + } + + // /**/import { [|name|] } from ...; + // /**/import { propertyName as [|name|] } from ...; + // /**/import * as [|name|] from ...; + // import /**/type { [|name|] } from ...; + // import /**/type { propertyName as [|name|] } from ...; + // import /**/type * as [|name|] from ...; + if (node.importClause.namedBindings) { + if (isNamedImports(node.importClause.namedBindings)) { + // do nothing if there is more than one binding + const onlyBinding = singleOrUndefined(node.importClause.namedBindings.elements); + if (!onlyBinding) { + return; + } + return onlyBinding.name; + } + else if (isNamespaceImport(node.importClause.namedBindings)) { + return node.importClause.namedBindings.name; + } + } + } + if (!forRename) { + // /**/import "[|module|]"; + // /**/import ... from "[|module|]"; + // import /**/type ... from "[|module|]"; + return node.moduleSpecifier; + } + } + + function getAdjustedLocationForExportDeclaration(node: ExportDeclaration, forRename: boolean) { + if (node.exportClause) { + // /**/export { [|name|] } ... + // /**/export { propertyName as [|name|] } ... + // /**/export * as [|name|] ... + // export /**/type { [|name|] } from ... + // export /**/type { propertyName as [|name|] } from ... + // export /**/type * as [|name|] ... + if (isNamedExports(node.exportClause)) { + // do nothing if there is more than one binding + const onlyBinding = singleOrUndefined(node.exportClause.elements); + if (!onlyBinding) { + return; + } + return node.exportClause.elements[0].name; + } + else if (isNamespaceExport(node.exportClause)) { + return node.exportClause.name; + } + } + if (!forRename) { + // /**/export * from "[|module|]"; + // export /**/type * from "[|module|]"; + return node.moduleSpecifier; + } + } + + function getAdjustedLocationForHeritageClause(node: HeritageClause) { + // /**/extends [|name|] + // /**/implements [|name|] + if (node.types.length === 1) { + return node.types[0].expression; + } + + // /**/extends name1, name2 ... + // /**/implements name1, name2 ... + } + + function getAdjustedLocation(node: Node, forRename: boolean): Node { + const { parent } = node; + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/import [|name|] = ... + // + // NOTE: If the node is a modifier, we don't adjust its location if it is the `default` modifier as that is handled + // specially by `getSymbolAtLocation`. + if (isModifier(node) && (forRename || node.kind !== SyntaxKind.DefaultKeyword) ? contains(parent.modifiers, node) : + node.kind === SyntaxKind.ClassKeyword ? isClassDeclaration(parent) || isClassExpression(node) : + node.kind === SyntaxKind.FunctionKeyword ? isFunctionDeclaration(parent) || isFunctionExpression(node) : + node.kind === SyntaxKind.InterfaceKeyword ? isInterfaceDeclaration(parent) : + node.kind === SyntaxKind.EnumKeyword ? isEnumDeclaration(parent) : + node.kind === SyntaxKind.TypeKeyword ? isTypeAliasDeclaration(parent) : + node.kind === SyntaxKind.NamespaceKeyword || node.kind === SyntaxKind.ModuleKeyword ? isModuleDeclaration(parent) : + node.kind === SyntaxKind.ImportKeyword ? isImportEqualsDeclaration(parent) : + node.kind === SyntaxKind.GetKeyword ? isGetAccessorDeclaration(parent) : + node.kind === SyntaxKind.SetKeyword && isSetAccessorDeclaration(parent)) { + const location = getAdjustedLocationForDeclaration(parent, forRename); + if (location) { + return location; + } + } + // /**/ [|name|] ... + if ((node.kind === SyntaxKind.VarKeyword || node.kind === SyntaxKind.ConstKeyword || node.kind === SyntaxKind.LetKeyword) && + isVariableDeclarationList(parent) && parent.declarations.length === 1) { + const decl = parent.declarations[0]; + if (isIdentifier(decl.name)) { + return decl.name; + } + } + if (node.kind === SyntaxKind.TypeKeyword) { + // import /**/type [|name|] from ...; + // import /**/type { [|name|] } from ...; + // import /**/type { propertyName as [|name|] } from ...; + // import /**/type ... from "[|module|]"; + if (isImportClause(parent) && parent.isTypeOnly) { + const location = getAdjustedLocationForImportDeclaration(parent.parent, forRename); + if (location) { + return location; + } + } + // export /**/type { [|name|] } from ...; + // export /**/type { propertyName as [|name|] } from ...; + // export /**/type * from "[|module|]"; + // export /**/type * as ... from "[|module|]"; + if (isExportDeclaration(parent) && parent.isTypeOnly) { + const location = getAdjustedLocationForExportDeclaration(parent, forRename); + if (location) { + return location; + } + } + } + // import { propertyName /**/as [|name|] } ... + // import * /**/as [|name|] ... + // export { propertyName /**/as [|name|] } ... + // export * /**/as [|name|] ... + if (node.kind === SyntaxKind.AsKeyword) { + if (isImportSpecifier(parent) && parent.propertyName || + isExportSpecifier(parent) && parent.propertyName || + isNamespaceImport(parent) || + isNamespaceExport(parent)) { + return parent.name; + } + if (isExportDeclaration(parent) && parent.exportClause && isNamespaceExport(parent.exportClause)) { + return parent.exportClause.name; + } + } + // /**/import [|name|] from ...; + // /**/import { [|name|] } from ...; + // /**/import { propertyName as [|name|] } from ...; + // /**/import ... from "[|module|]"; + // /**/import "[|module|]"; + if (node.kind === SyntaxKind.ImportKeyword && isImportDeclaration(parent)) { + const location = getAdjustedLocationForImportDeclaration(parent, forRename); + if (location) { + return location; + } + } + if (node.kind === SyntaxKind.ExportKeyword) { + // /**/export { [|name|] } ...; + // /**/export { propertyName as [|name|] } ...; + // /**/export * from "[|module|]"; + // /**/export * as ... from "[|module|]"; + if (isExportDeclaration(parent)) { + const location = getAdjustedLocationForExportDeclaration(parent, forRename); + if (location) { + return location; + } + } + // NOTE: We don't adjust the location of the `default` keyword as that is handled specially by `getSymbolAtLocation`. + // /**/export default [|name|]; + // /**/export = [|name|]; + if (isExportAssignment(parent)) { + return skipOuterExpressions(parent.expression); + } + } + // import name = /**/require("[|module|]"); + if (node.kind === SyntaxKind.RequireKeyword && isExternalModuleReference(parent)) { + return parent.expression; + } + // import ... /**/from "[|module|]"; + // export ... /**/from "[|module|]"; + if (node.kind === SyntaxKind.FromKeyword && (isImportDeclaration(parent) || isExportDeclaration(parent)) && parent.moduleSpecifier) { + return parent.moduleSpecifier; + } + // class ... /**/extends [|name|] ... + // class ... /**/implements [|name|] ... + // class ... /**/implements name1, name2 ... + // interface ... /**/extends [|name|] ... + // interface ... /**/extends name1, name2 ... + if ((node.kind === SyntaxKind.ExtendsKeyword || node.kind === SyntaxKind.ImplementsKeyword) && isHeritageClause(parent) && parent.token === node.kind) { + const location = getAdjustedLocationForHeritageClause(parent); + if (location) { + return location; + } + } + if (node.kind === SyntaxKind.ExtendsKeyword) { + // ... ... + if (isTypeParameterDeclaration(parent) && parent.constraint && isTypeReferenceNode(parent.constraint)) { + return parent.constraint.typeName; + } + // ... T /**/extends [|U|] ? ... + if (isConditionalTypeNode(parent) && isTypeReferenceNode(parent.extendsType)) { + return parent.extendsType.typeName; + } + } + // ... T extends /**/infer [|U|] ? ... + if (node.kind === SyntaxKind.InferKeyword && isInferTypeNode(parent)) { + return parent.typeParameter.name; + } + // { [ [|K|] /**/in keyof T]: ... } + if (node.kind === SyntaxKind.InKeyword && isTypeParameterDeclaration(parent) && isMappedTypeNode(parent.parent)) { + return parent.name; + } + // /**/keyof [|T|] + if (node.kind === SyntaxKind.KeyOfKeyword && isTypeOperatorNode(parent) && parent.operator === SyntaxKind.KeyOfKeyword && + isTypeReferenceNode(parent.type)) { + return parent.type.typeName; + } + // /**/readonly [|name|][] + if (node.kind === SyntaxKind.ReadonlyKeyword && isTypeOperatorNode(parent) && parent.operator === SyntaxKind.ReadonlyKeyword && + isArrayTypeNode(parent.type) && isTypeReferenceNode(parent.type.elementType)) { + return parent.type.elementType.typeName; + } + if (!forRename) { + // /**/new [|name|] + // /**/void [|name|] + // /**/void obj.[|name|] + // /**/typeof [|name|] + // /**/typeof obj.[|name|] + // /**/await [|name|] + // /**/await obj.[|name|] + // /**/yield [|name|] + // /**/yield obj.[|name|] + // /**/delete obj.[|name|] + if (node.kind === SyntaxKind.NewKeyword && isNewExpression(parent) || + node.kind === SyntaxKind.VoidKeyword && isVoidExpression(parent) || + node.kind === SyntaxKind.TypeOfKeyword && isTypeOfExpression(parent) || + node.kind === SyntaxKind.AwaitKeyword && isAwaitExpression(parent) || + node.kind === SyntaxKind.YieldKeyword && isYieldExpression(parent) || + node.kind === SyntaxKind.DeleteKeyword && isDeleteExpression(parent)) { + if (parent.expression) { + return skipOuterExpressions(parent.expression); + } + } + // left /**/in [|name|] + // left /**/instanceof [|name|] + if ((node.kind === SyntaxKind.InKeyword || node.kind === SyntaxKind.InstanceOfKeyword) && isBinaryExpression(parent) && parent.operatorToken === node) { + return skipOuterExpressions(parent.right); + } + // left /**/as [|name|] + if (node.kind === SyntaxKind.AsKeyword && isAsExpression(parent) && isTypeReferenceNode(parent.type)) { + return parent.type.typeName; + } + // for (... /**/in [|name|]) + // for (... /**/of [|name|]) + if (node.kind === SyntaxKind.InKeyword && isForInStatement(parent) || + node.kind === SyntaxKind.OfKeyword && isForOfStatement(parent)) { + return skipOuterExpressions(parent.expression); + } + } + return node; + } + + /** + * Adjusts the location used for "find references" and "go to definition" when the cursor was not + * on a property name. + */ + export function getAdjustedReferenceLocation(node: Node): Node { + return getAdjustedLocation(node, /*forRename*/ false); + } + + /** + * Adjusts the location used for "rename" when the cursor was not on a property name. + */ + export function getAdjustedRenameLocation(node: Node): Node { + return getAdjustedLocation(node, /*forRename*/ true); + } + /** * Gets the token whose text has range [start, end) and * position >= start and (position < end or (position === end && token is literal or keyword or identifier)) @@ -2000,9 +2343,6 @@ namespace ts { } export function quote(text: string, preferences: UserPreferences): string { - if (/^\d+$/.test(text)) { - return text; - } // Editors can pass in undefined or empty string - we want to infer the preference in those cases. const quotePreference = preferences.quotePreference || "auto"; const quoted = JSON.stringify(text); @@ -2405,5 +2745,14 @@ namespace ts { return isArray(valueOrArray) ? first(valueOrArray) : valueOrArray; } + export function getNameForExportedSymbol(symbol: Symbol, scriptTarget: ScriptTarget) { + if (symbol.escapedName === InternalSymbolName.ExportEquals || symbol.escapedName === InternalSymbolName.Default) { + // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. + return firstDefined(symbol.declarations, d => isExportAssignment(d) && isIdentifier(d.expression) ? d.expression.text : undefined) + || codefix.moduleSymbolToValidIdentifier(Debug.checkDefined(symbol.parent), scriptTarget); + } + return symbol.name; + } + // #endregion } diff --git a/src/testRunner/externalCompileRunner.ts b/src/testRunner/externalCompileRunner.ts index bda806f3156fd..b720ba61f2c0f 100644 --- a/src/testRunner/externalCompileRunner.ts +++ b/src/testRunner/externalCompileRunner.ts @@ -30,7 +30,7 @@ namespace Harness { // eslint-disable-next-line @typescript-eslint/no-this-alias const cls = this; - describe(`${this.kind()} code samples`, function(this: Mocha.ISuiteCallbackContext) { + describe(`${this.kind()} code samples`, function (this: Mocha.ISuiteCallbackContext) { this.timeout(600_000); // 10 minutes for (const test of testList) { cls.runTest(typeof test === "string" ? test : test.file); @@ -41,7 +41,7 @@ namespace Harness { // eslint-disable-next-line @typescript-eslint/no-this-alias const cls = this; const timeout = 600_000; // 10 minutes - describe(directoryName, function(this: Mocha.ISuiteCallbackContext) { + describe(directoryName, function (this: Mocha.ISuiteCallbackContext) { this.timeout(timeout); const cp: typeof import("child_process") = require("child_process"); @@ -56,11 +56,13 @@ namespace Harness { ts.Debug.assert(!!config.cloneUrl, "Bad format from test.json: cloneUrl field must be present."); const submoduleDir = path.join(cwd, directoryName); if (!fs.existsSync(submoduleDir)) { - exec("git", ["clone", config.cloneUrl, directoryName], { cwd }); + exec("git", ["--work-tree", submoduleDir, "clone", config.cloneUrl, path.join(submoduleDir, ".git")], { cwd }); + } + else { + exec("git", ["--git-dir", path.join(submoduleDir, ".git"), "--work-tree", submoduleDir, "reset", "HEAD", "--hard"], { cwd: submoduleDir }); + exec("git", ["--git-dir", path.join(submoduleDir, ".git"), "--work-tree", submoduleDir, "clean", "-f"], { cwd: submoduleDir }); + exec("git", ["--git-dir", path.join(submoduleDir, ".git"), "--work-tree", submoduleDir, "pull", "-f"], { cwd: submoduleDir }); } - exec("git", ["reset", "HEAD", "--hard"], { cwd: submoduleDir }); - exec("git", ["clean", "-f"], { cwd: submoduleDir }); - exec("git", ["pull", "-f"], { cwd: submoduleDir }); types = config.types; @@ -79,15 +81,17 @@ namespace Harness { if (types) { args.push("--types", types.join(",")); // Also actually install those types (for, eg, the js projects which need node) - exec("npm", ["i", ...types.map(t => `@types/${t}`), "--no-save", "--ignore-scripts"], { cwd: originalCwd, timeout: timeout / 2 }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure + if (types.length) { + exec("npm", ["i", ...types.map(t => `@types/${t}`), "--no-save", "--ignore-scripts"], { cwd: originalCwd, timeout: timeout / 2 }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure + } } args.push("--noEmit"); Baseline.runBaseline(`${cls.kind()}/${directoryName}.log`, cls.report(cp.spawnSync(`node`, args, { cwd, timeout, shell: true }), cwd)); function exec(command: string, args: string[], options: { cwd: string, timeout?: number }): void { - const res = cp.spawnSync(command, args, { timeout, shell: true, stdio, ...options }); + const res = cp.spawnSync(isWorker ? `${command} 2>&1` : command, args, { shell: true, stdio, ...options }); if (res.status !== 0) { - throw new Error(`${command} ${args.join(" ")} for ${directoryName} failed: ${res.stderr && res.stderr.toString()}`); + throw new Error(`${command} ${args.join(" ")} for ${directoryName} failed: ${res.stdout && res.stdout.toString()}`); } } }); @@ -123,7 +127,7 @@ ${stripAbsoluteImportPaths(result.stderr.toString().replace(/\r\n/g, "\n"))}`; // eslint-disable-next-line @typescript-eslint/no-this-alias const cls = this; - describe(`${this.kind()} code samples`, function(this: Mocha.ISuiteCallbackContext) { + describe(`${this.kind()} code samples`, function (this: Mocha.ISuiteCallbackContext) { this.timeout(cls.timeout); // 20 minutes before(() => { cls.exec("docker", ["build", ".", "-t", "typescript/typescript"], { cwd: IO.getWorkspaceRoot() }); // cached because workspace is hashed to determine cacheability @@ -142,12 +146,12 @@ ${stripAbsoluteImportPaths(result.stderr.toString().replace(/\r\n/g, "\n"))}`; } private timeout = 1_200_000; // 20 minutes; - private exec(command: string, args: string[], options: { cwd: string, timeout?: number }): void { + private exec(command: string, args: string[], options: { cwd: string }): void { const cp: typeof import("child_process") = require("child_process"); const stdio = isWorker ? "pipe" : "inherit"; - const res = cp.spawnSync(command, args, { timeout: this.timeout, shell: true, stdio, ...options }); + const res = cp.spawnSync(isWorker ? `${command} 2>&1` : command, args, { timeout: this.timeout, shell: true, stdio, ...options }); if (res.status !== 0) { - throw new Error(`${command} ${args.join(" ")} for ${options.cwd} failed: ${res.stderr && res.stderr.toString()}`); + throw new Error(`${command} ${args.join(" ")} for ${options.cwd} failed: ${res.stdout && res.stdout.toString()}`); } } report(result: ExecResult) { @@ -204,7 +208,8 @@ ${sanitizeDockerfileOutput(result.stderr.toString())}`; return result.replace(/^.*(\] (Starting)|(Finished)).*$/gm, "") // "gulp" task start/end messages (nondeterministic order) .replace(/^.*(\] . (finished)|(started)).*$/gm, "") // "just" task start/end messages (nondeterministic order) .replace(/^.*\] Respawned to PID: \d+.*$/gm, "") // PID of child is OS and system-load dependent (likely stableish in a container but still dangerous) - .replace(/\n+/g, "\n"); + .replace(/\n+/g, "\n") + .replace(/\/tmp\/yarn--.*?\/node/g, ""); } function sanitizeTimestamps(result: string): string { @@ -337,4 +342,4 @@ ${stderr.replace(/\r\n/g, "\n")}`; } return result; } -} \ No newline at end of file +} diff --git a/src/testRunner/rwcRunner.ts b/src/testRunner/rwcRunner.ts index 0a3e0e090b7f2..a50447b2d0065 100644 --- a/src/testRunner/rwcRunner.ts +++ b/src/testRunner/rwcRunner.ts @@ -47,7 +47,7 @@ namespace RWC { caseSensitive = false; }); - it("can compile", function(this: Mocha.ITestCallbackContext) { + it("can compile", function (this: Mocha.ITestCallbackContext) { this.timeout(800_000); // Allow long timeouts for RWC compilations let opts!: ts.ParsedCommandLine; @@ -145,7 +145,7 @@ namespace RWC { }); - it("has the expected emitted code", function(this: Mocha.ITestCallbackContext) { + it("has the expected emitted code", function (this: Mocha.ITestCallbackContext) { this.timeout(100_000); // Allow longer timeouts for RWC js verification Harness.Baseline.runMultifileBaseline(baseName, "", () => { return Harness.Compiler.iterateOutputs(compilerResult.js.values()); diff --git a/src/testRunner/tsconfig.json b/src/testRunner/tsconfig.json index 73ccca0bac2ef..5fdc05ae1ce03 100644 --- a/src/testRunner/tsconfig.json +++ b/src/testRunner/tsconfig.json @@ -126,6 +126,7 @@ "unittests/tsbuild/transitiveReferences.ts", "unittests/tsbuild/watchEnvironment.ts", "unittests/tsbuild/watchMode.ts", + "unittests/tsc/composite.ts", "unittests/tsc/declarationEmit.ts", "unittests/tsc/incremental.ts", "unittests/tsc/listFilesOnly.ts", @@ -149,6 +150,7 @@ "unittests/tsserver/declarationFileMaps.ts", "unittests/tsserver/documentRegistry.ts", "unittests/tsserver/duplicatePackages.ts", + "unittests/tsserver/dynamicFiles.ts", "unittests/tsserver/events/largeFileReferenced.ts", "unittests/tsserver/events/projectLanguageServiceState.ts", "unittests/tsserver/events/projectLoading.ts", @@ -189,7 +191,6 @@ "unittests/tsserver/typeOnlyImportChains.ts", "unittests/tsserver/typeReferenceDirectives.ts", "unittests/tsserver/typingsInstaller.ts", - "unittests/tsserver/untitledFiles.ts", "unittests/tsserver/versionCache.ts", "unittests/tsserver/watchEnvironment.ts" ] diff --git a/src/testRunner/unittests/config/commandLineParsing.ts b/src/testRunner/unittests/config/commandLineParsing.ts index 47e66bac19735..8dbbffaf20d84 100644 --- a/src/testRunner/unittests/config/commandLineParsing.ts +++ b/src/testRunner/unittests/config/commandLineParsing.ts @@ -1,11 +1,9 @@ namespace ts { describe("unittests:: config:: commandLineParsing:: parseCommandLine", () => { - function assertParseResult(commandLine: string[], expectedParsedCommandLine: ParsedCommandLine) { - const parsed = parseCommandLine(commandLine); - const parsedCompilerOptions = JSON.stringify(parsed.options); - const expectedCompilerOptions = JSON.stringify(expectedParsedCommandLine.options); - assert.equal(parsedCompilerOptions, expectedCompilerOptions); + function assertParseResult(commandLine: string[], expectedParsedCommandLine: ParsedCommandLine, workerDiagnostic?: () => ParseCommandLineWorkerDiagnostics) { + const parsed = parseCommandLineWorker(workerDiagnostic?.() || compilerOptionsDidYouMeanDiagnostics, commandLine); + assert.deepEqual(parsed.options, expectedParsedCommandLine.options); assert.deepEqual(parsed.watchOptions, expectedParsedCommandLine.watchOptions); const parsedErrors = parsed.errors; @@ -120,7 +118,7 @@ namespace ts { length: undefined, }], fileNames: ["0.ts"], - options: {} + options: { jsx: undefined } }); }); @@ -146,7 +144,7 @@ namespace ts { length: undefined, }], fileNames: ["0.ts"], - options: {} + options: { module: undefined } }); }); @@ -172,7 +170,7 @@ namespace ts { length: undefined, }], fileNames: ["0.ts"], - options: {} + options: { newLine: undefined } }); }); @@ -198,7 +196,7 @@ namespace ts { length: undefined, }], fileNames: ["0.ts"], - options: {} + options: { target: undefined } }); }); @@ -224,7 +222,7 @@ namespace ts { length: undefined, }], fileNames: ["0.ts"], - options: {} + options: { moduleResolution: undefined } }); }); @@ -414,6 +412,183 @@ namespace ts { }); }); + describe("parses command line null for tsconfig only option", () => { + interface VerifyNull { + optionName: string; + nonNullValue?: string; + workerDiagnostic?: () => ParseCommandLineWorkerDiagnostics; + diagnosticMessage: DiagnosticMessage; + } + function verifyNull({ optionName, nonNullValue, workerDiagnostic, diagnosticMessage }: VerifyNull) { + it("allows setting it to null", () => { + assertParseResult( + [`--${optionName}`, "null", "0.ts"], + { + errors: [], + fileNames: ["0.ts"], + options: { [optionName]: undefined } + }, + workerDiagnostic + ); + }); + + if (nonNullValue) { + it("errors if non null value is passed", () => { + assertParseResult( + [`--${optionName}`, nonNullValue, "0.ts"], + { + errors: [{ + messageText: formatStringFromArgs(diagnosticMessage.message, [optionName]), + category: diagnosticMessage.category, + code: diagnosticMessage.code, + file: undefined, + start: undefined, + length: undefined + }], + fileNames: ["0.ts"], + options: {} + }, + workerDiagnostic + ); + }); + } + + it("errors if its followed by another option", () => { + assertParseResult( + ["0.ts", "--strictNullChecks", `--${optionName}`], + { + errors: [{ + messageText: formatStringFromArgs(diagnosticMessage.message, [optionName]), + category: diagnosticMessage.category, + code: diagnosticMessage.code, + file: undefined, + start: undefined, + length: undefined + }], + fileNames: ["0.ts"], + options: { strictNullChecks: true } + }, + workerDiagnostic + ); + }); + + it("errors if its last option", () => { + assertParseResult( + ["0.ts", `--${optionName}`], + { + errors: [{ + messageText: formatStringFromArgs(diagnosticMessage.message, [optionName]), + category: diagnosticMessage.category, + code: diagnosticMessage.code, + file: undefined, + start: undefined, + length: undefined + }], + fileNames: ["0.ts"], + options: {} + }, + workerDiagnostic + ); + }); + } + + interface VerifyNullNonIncludedOption { + type: () => "string" | "number" | Map; + nonNullValue?: string; + } + function verifyNullNonIncludedOption({ type, nonNullValue }: VerifyNullNonIncludedOption) { + verifyNull({ + optionName: "optionName", + nonNullValue, + diagnosticMessage: Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, + workerDiagnostic: () => { + const optionDeclarations = [ + ...compilerOptionsDidYouMeanDiagnostics.optionDeclarations, + { + name: "optionName", + type: type(), + isTSConfigOnly: true, + category: Diagnostics.Basic_Options, + description: Diagnostics.Enable_project_compilation, + } + ]; + return { + ...compilerOptionsDidYouMeanDiagnostics, + optionDeclarations, + getOptionsNameMap: () => createOptionNameMap(optionDeclarations) + }; + } + }); + } + + describe("option of type boolean", () => { + it("allows setting it to false", () => { + assertParseResult( + ["--composite", "false", "0.ts"], + { + errors: [], + fileNames: ["0.ts"], + options: { composite: false } + } + ); + }); + + verifyNull({ + optionName: "composite", + nonNullValue: "true", + diagnosticMessage: Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line + }); + }); + + describe("option of type object", () => { + verifyNull({ + optionName: "paths", + diagnosticMessage: Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line + }); + }); + + describe("option of type list", () => { + verifyNull({ + optionName: "rootDirs", + nonNullValue: "abc,xyz", + diagnosticMessage: Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line + }); + }); + + describe("option of type string", () => { + verifyNullNonIncludedOption({ + type: () => "string", + nonNullValue: "hello" + }); + }); + + describe("option of type number", () => { + verifyNullNonIncludedOption({ + type: () => "number", + nonNullValue: "10" + }); + }); + + describe("option of type Map", () => { + verifyNullNonIncludedOption({ + type: () => createMapFromTemplate({ + node: ModuleResolutionKind.NodeJs, + classic: ModuleResolutionKind.Classic, + }), + nonNullValue: "node" + }); + }); + }); + + it("allows tsconfig only option to be set to null", () => { + assertParseResult(["--composite", "null", "-tsBuildInfoFile", "null", "0.ts"], + { + errors: [], + fileNames: ["0.ts"], + options: { composite: undefined, tsBuildInfoFile: undefined } + }); + }); + describe("Watch options", () => { it("parse --watchFile", () => { assertParseResult(["--watchFile", "UseFsEvents", "0.ts"], @@ -487,9 +662,7 @@ namespace ts { describe("unittests:: config:: commandLineParsing:: parseBuildOptions", () => { function assertParseResult(commandLine: string[], expectedParsedBuildCommand: ParsedBuildCommand) { const parsed = parseBuildCommand(commandLine); - const parsedBuildOptions = JSON.stringify(parsed.buildOptions); - const expectedBuildOptions = JSON.stringify(expectedParsedBuildCommand.buildOptions); - assert.equal(parsedBuildOptions, expectedBuildOptions); + assert.deepEqual(parsed.buildOptions, expectedParsedBuildCommand.buildOptions); assert.deepEqual(parsed.watchOptions, expectedParsedBuildCommand.watchOptions); const parsedErrors = parsed.errors; diff --git a/src/testRunner/unittests/paths.ts b/src/testRunner/unittests/paths.ts index b1555ab2174d3..cf2bde3acbee2 100644 --- a/src/testRunner/unittests/paths.ts +++ b/src/testRunner/unittests/paths.ts @@ -289,4 +289,22 @@ describe("unittests:: core paths", () => { assert.strictEqual(ts.getRelativePathFromDirectory("file:///a/b/c", "file:///a/b", /*ignoreCase*/ false), ".."); assert.strictEqual(ts.getRelativePathFromDirectory("file:///c:", "file:///d:", /*ignoreCase*/ false), "file:///d:/"); }); + it("toFileNameLowerCase", () => { + assert.strictEqual( + ts.toFileNameLowerCase("/user/UserName/projects/Project/file.ts"), + "/user/username/projects/project/file.ts" + ); + assert.strictEqual( + ts.toFileNameLowerCase("/user/UserName/projects/projectß/file.ts"), + "/user/username/projects/projectß/file.ts" + ); + assert.strictEqual( + ts.toFileNameLowerCase("/user/UserName/projects/İproject/file.ts"), + "/user/username/projects/İproject/file.ts" + ); + assert.strictEqual( + ts.toFileNameLowerCase("/user/UserName/projects/ı/file.ts"), + "/user/username/projects/ı/file.ts" + ); + }); }); diff --git a/src/testRunner/unittests/programApi.ts b/src/testRunner/unittests/programApi.ts index 5f5251afaf253..8b13792d35ea5 100644 --- a/src/testRunner/unittests/programApi.ts +++ b/src/testRunner/unittests/programApi.ts @@ -178,4 +178,30 @@ namespace ts { assert.isNotNaN(program.getIdentifierCount()); }); }); + + describe("unittests:: programApi:: Program.getDiagnosticsProducingTypeChecker / Program.getSemanticDiagnostics", () => { + it("does not produce errors on `as const` it would not normally produce on the command line", () => { + const main = new documents.TextDocument("/main.ts", "0 as const"); + + const fs = vfs.createFromFileSystem(Harness.IO, /*ignoreCase*/ false, { documents: [main], cwd: "/" }); + const program = createProgram(["/main.ts"], {}, new fakes.CompilerHost(fs, { newLine: NewLineKind.LineFeed })); + const typeChecker = program.getDiagnosticsProducingTypeChecker(); + const sourceFile = program.getSourceFile("main.ts")!; + typeChecker.getTypeAtLocation(((sourceFile.statements[0] as ExpressionStatement).expression as AsExpression).type); + const diag = program.getSemanticDiagnostics(); + assert.isEmpty(diag); + }); + it("getSymbolAtLocation does not cause additional error to be added on module resolution failure", () => { + const main = new documents.TextDocument("/main.ts", "import \"./module\";"); + const mod = new documents.TextDocument("/module.d.ts", "declare const foo: any;"); + + const fs = vfs.createFromFileSystem(Harness.IO, /*ignoreCase*/ false, { documents: [main, mod], cwd: "/" }); + const program = createProgram(["/main.ts"], {}, new fakes.CompilerHost(fs, { newLine: NewLineKind.LineFeed })); + + const sourceFile = program.getSourceFile("main.ts")!; + const typeChecker = program.getDiagnosticsProducingTypeChecker(); + typeChecker.getSymbolAtLocation((sourceFile.statements[0] as ImportDeclaration).moduleSpecifier); + assert.isEmpty(program.getSemanticDiagnostics()); + }); + }); } diff --git a/src/testRunner/unittests/services/languageService.ts b/src/testRunner/unittests/services/languageService.ts index 557ed9370c1d8..01b1a73e9d8c3 100644 --- a/src/testRunner/unittests/services/languageService.ts +++ b/src/testRunner/unittests/services/languageService.ts @@ -46,7 +46,7 @@ export function Component(x: Config): any;` it("should be able to create a language service which can respond to deinition requests without throwing", () => { const languageService = createLanguageService(); const definitions = languageService.getDefinitionAtPosition("foo.ts", 160); // 160 is the latter `vueTemplateHtml` position - expect(definitions).to.exist; // eslint-disable-line no-unused-expressions + expect(definitions).to.exist; // eslint-disable-line @typescript-eslint/no-unused-expressions }); it("getEmitOutput on language service has way to force dts emit", () => { @@ -80,5 +80,61 @@ export function Component(x: Config): any;` } ); }); + + describe("detects program upto date correctly", () => { + function verifyProgramUptoDate(useProjectVersion: boolean) { + let projectVersion = "1"; + const files = createMap<{ version: string, text: string; }>(); + files.set("/project/root.ts", { version: "1", text: `import { foo } from "./other"` }); + files.set("/project/other.ts", { version: "1", text: `export function foo() { }` }); + files.set("/lib/lib.d.ts", { version: "1", text: projectSystem.libFile.content }); + const host: LanguageServiceHost = { + useCaseSensitiveFileNames: returnTrue, + getCompilationSettings: getDefaultCompilerOptions, + fileExists: path => files.has(path), + getProjectVersion: !useProjectVersion ? undefined : () => projectVersion, + getScriptFileNames: () => ["/project/root.ts"], + getScriptVersion: path => files.get(path)?.version || "", + getScriptSnapshot: path => { + const text = files.get(path)?.text; + return text ? ScriptSnapshot.fromString(text) : undefined; + }, + getCurrentDirectory: () => "/project", + getDefaultLibFileName: () => "/lib/lib.d.ts" + }; + const ls = ts.createLanguageService(host); + const program1 = ls.getProgram()!; + const program2 = ls.getProgram()!; + assert.strictEqual(program1, program2); + verifyProgramFiles(program1); + + // Change other + projectVersion = "2"; + files.set("/project/other.ts", { version: "2", text: `export function foo() { } export function bar() { }` }); + const program3 = ls.getProgram()!; + assert.notStrictEqual(program2, program3); + verifyProgramFiles(program3); + + // change root + projectVersion = "3"; + files.set("/project/root.ts", { version: "2", text: `import { foo, bar } from "./other"` }); + const program4 = ls.getProgram()!; + assert.notStrictEqual(program3, program4); + verifyProgramFiles(program4); + + function verifyProgramFiles(program: Program) { + assert.deepEqual( + program.getSourceFiles().map(f => f.fileName), + ["/lib/lib.d.ts", "/project/other.ts", "/project/root.ts"] + ); + } + } + it("when host implements getProjectVersion", () => { + verifyProgramUptoDate(/*useProjectVersion*/ true); + }); + it("when host does not implement getProjectVersion", () => { + verifyProgramUptoDate(/*useProjectVersion*/ false); + }); + }); }); } diff --git a/src/testRunner/unittests/services/organizeImports.ts b/src/testRunner/unittests/services/organizeImports.ts index 984091a2aa122..6627616a67dfe 100644 --- a/src/testRunner/unittests/services/organizeImports.ts +++ b/src/testRunner/unittests/services/organizeImports.ts @@ -168,6 +168,30 @@ namespace ts { const expectedCoalescedImports = sortedImports; assertListEqual(actualCoalescedImports, expectedCoalescedImports); }); + + it("Combine type-only imports separately from other imports", () => { + const sortedImports = parseImports( + `import type { x } from "lib";`, + `import type { y } from "lib";`, + `import { z } from "lib";`); + const actualCoalescedImports = OrganizeImports.coalesceImports(sortedImports); + const expectedCoalescedImports = parseImports( + `import { z } from "lib";`, + `import type { x, y } from "lib";`); + assertListEqual(actualCoalescedImports, expectedCoalescedImports); + }); + + it("Do not combine type-only default, namespace, or named imports with each other", () => { + const sortedImports = parseImports( + `import type { x } from "lib";`, + `import type * as y from "lib";`, + `import type z from "lib";`); + // Default import could be rewritten as a named import to combine with `x`, + // but seems of debatable merit. + const actualCoalescedImports = OrganizeImports.coalesceImports(sortedImports); + const expectedCoalescedImports = actualCoalescedImports; + assertListEqual(actualCoalescedImports, expectedCoalescedImports); + }); }); describe("Coalesce exports", () => { @@ -240,6 +264,25 @@ namespace ts { `export { x as a, y, z as b } from "lib";`); assertListEqual(actualCoalescedExports, expectedCoalescedExports); }); + + it("Keep type-only exports separate", () => { + const sortedExports = parseExports( + `export { x };`, + `export type { y };`); + const actualCoalescedExports = OrganizeImports.coalesceExports(sortedExports); + const expectedCoalescedExports = sortedExports; + assertListEqual(actualCoalescedExports, expectedCoalescedExports); + }); + + it("Combine type-only exports", () => { + const sortedExports = parseExports( + `export type { x };`, + `export type { y };`); + const actualCoalescedExports = OrganizeImports.coalesceExports(sortedExports); + const expectedCoalescedExports = parseExports( + `export type { x, y };`); + assertListEqual(actualCoalescedExports, expectedCoalescedExports); + }); }); describe("Baselines", () => { @@ -425,6 +468,18 @@ D(); libFile); /* eslint-enable no-template-curly-in-string */ + testOrganizeImports("TypeOnly", + { + path: "/test.ts", + content: ` +import { X } from "lib"; +import type Y from "lib"; +import { Z } from "lib"; +import type { A, B } from "lib"; + +export { A, B, X, Y, Z };` + }); + testOrganizeImports("CoalesceMultipleModules", { path: "/test.ts", diff --git a/src/testRunner/unittests/transform.ts b/src/testRunner/unittests/transform.ts index b244b942a503c..cce8c92ad4183 100644 --- a/src/testRunner/unittests/transform.ts +++ b/src/testRunner/unittests/transform.ts @@ -101,7 +101,7 @@ namespace ts { return transformSourceFile(`let a!: () => void`, [ context => file => visitNode(file, function visitor(node: Node): VisitResult { if (node.kind === SyntaxKind.VoidKeyword) { - return createIdentifier("undefined"); + return createKeywordTypeNode(SyntaxKind.UndefinedKeyword); } return visitEachChild(node, visitor, context); }) diff --git a/src/testRunner/unittests/tsc/composite.ts b/src/testRunner/unittests/tsc/composite.ts new file mode 100644 index 0000000000000..8eb0ea3bd8595 --- /dev/null +++ b/src/testRunner/unittests/tsc/composite.ts @@ -0,0 +1,85 @@ +namespace ts { + describe("unittests:: tsc:: composite::", () => { + verifyTsc({ + scenario: "composite", + subScenario: "when setting composite false on command line", + fs: () => loadProjectFromFiles({ + "/src/project/src/main.ts": "export const x = 10;", + "/src/project/tsconfig.json": Utils.dedent` + { + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "composite": true, + }, + "include": [ + "src/**/*.ts" + ] + }`, + }), + commandLineArgs: ["--composite", "false", "--p", "src/project"], + }); + + verifyTsc({ + scenario: "composite", + subScenario: "when setting composite null on command line", + fs: () => loadProjectFromFiles({ + "/src/project/src/main.ts": "export const x = 10;", + "/src/project/tsconfig.json": Utils.dedent` + { + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "composite": true, + }, + "include": [ + "src/**/*.ts" + ] + }`, + }), + commandLineArgs: ["--composite", "null", "--p", "src/project"], + }); + + verifyTsc({ + scenario: "composite", + subScenario: "when setting composite false on command line but has tsbuild info in config", + fs: () => loadProjectFromFiles({ + "/src/project/src/main.ts": "export const x = 10;", + "/src/project/tsconfig.json": Utils.dedent` + { + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "composite": true, + "tsBuildInfoFile": "tsconfig.json.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ] + }`, + }), + commandLineArgs: ["--composite", "false", "--p", "src/project"], + }); + + verifyTsc({ + scenario: "composite", + subScenario: "when setting composite false and tsbuildinfo as null on command line but has tsbuild info in config", + fs: () => loadProjectFromFiles({ + "/src/project/src/main.ts": "export const x = 10;", + "/src/project/tsconfig.json": Utils.dedent` + { + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "composite": true, + "tsBuildInfoFile": "tsconfig.json.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ] + }`, + }), + commandLineArgs: ["--composite", "false", "--p", "src/project", "--tsBuildInfoFile", "null"], + }); + }); +} diff --git a/src/testRunner/unittests/tscWatch/helpers.ts b/src/testRunner/unittests/tscWatch/helpers.ts index 5809b5ee2e5cf..34d278031b871 100644 --- a/src/testRunner/unittests/tscWatch/helpers.ts +++ b/src/testRunner/unittests/tscWatch/helpers.ts @@ -419,7 +419,7 @@ namespace ts.tscWatch { } export function replaceFileText(sys: WatchedSystem, file: string, searchValue: string | RegExp, replaceValue: string) { - const content = Debug.assertDefined(sys.readFile(file)); + const content = Debug.checkDefined(sys.readFile(file)); sys.writeFile(file, content.replace(searchValue, replaceValue)); } } diff --git a/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts b/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts index 316ecc8b65234..6d5ee91d68d67 100644 --- a/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts +++ b/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts @@ -29,7 +29,11 @@ ${file.content}`; assert.equal(Number(project.getProjectVersion()), expected); } - function verify(applyChangesToOpen: (session: TestSession) => void) { + interface Verify { + applyChangesToOpen: (session: TestSession) => void; + openFile1Again: (session: TestSession) => void; + } + function verify({ applyChangesToOpen, openFile1Again }: Verify) { const host = createServerHost([app, file3, commonFile1, commonFile2, libFile, configFile]); const session = createSession(host); session.executeCommandSeq({ @@ -65,11 +69,22 @@ ${file.content}`; verifyText(service, commonFile2.path, fileContentWithComment(commonFile2)); verifyText(service, app.path, "let zzz = 10;let zz = 10;let z = 1;"); verifyText(service, file3.path, file3.content); + + // Open file1 again + openFile1Again(session); + assert.isTrue(service.getScriptInfo(commonFile1.path)!.isScriptOpen()); + + // Verify that file1 contents are changed + verifyProjectVersion(project, 4); + verifyText(service, commonFile1.path, commonFile1.content); + verifyText(service, commonFile2.path, fileContentWithComment(commonFile2)); + verifyText(service, app.path, "let zzz = 10;let zz = 10;let z = 1;"); + verifyText(service, file3.path, file3.content); } it("with applyChangedToOpenFiles request", () => { - verify(session => - session.executeCommandSeq({ + verify({ + applyChangesToOpen: session => session.executeCommandSeq({ command: protocol.CommandTypes.ApplyChangedToOpenFiles, arguments: { openFiles: [ @@ -101,13 +116,22 @@ ${file.content}`; file3.path ] } - }) - ); + }), + openFile1Again: session => session.executeCommandSeq({ + command: protocol.CommandTypes.ApplyChangedToOpenFiles, + arguments: { + openFiles: [{ + fileName: commonFile1.path, + content: commonFile1.content + }] + } + }), + }); }); it("with updateOpen request", () => { - verify(session => - session.executeCommandSeq({ + verify({ + applyChangesToOpen: session => session.executeCommandSeq({ command: protocol.CommandTypes.UpdateOpen, arguments: { openFiles: [ @@ -141,8 +165,17 @@ ${file.content}`; file3.path ] } - }) - ); + }), + openFile1Again: session => session.executeCommandSeq({ + command: protocol.CommandTypes.UpdateOpen, + arguments: { + openFiles: [{ + file: commonFile1.path, + fileContent: commonFile1.content + }] + } + }), + }); }); }); } diff --git a/src/testRunner/unittests/tsserver/configFileSearch.ts b/src/testRunner/unittests/tsserver/configFileSearch.ts index 76897b8128767..5b8bce403c5dc 100644 --- a/src/testRunner/unittests/tsserver/configFileSearch.ts +++ b/src/testRunner/unittests/tsserver/configFileSearch.ts @@ -114,7 +114,7 @@ namespace ts.projectSystem { function verifyConfiguredProject(host: TestServerHost, projectService: TestProjectService, orphanInferredProject?: boolean) { projectService.checkNumberOfProjects({ configuredProjects: 1, inferredProjects: orphanInferredProject ? 1 : 0 }); - const project = Debug.assertDefined(projectService.configuredProjects.get(tsconfig.path)); + const project = Debug.checkDefined(projectService.configuredProjects.get(tsconfig.path)); if (orphanInferredProject) { const inferredProject = projectService.inferredProjects[0]; diff --git a/src/testRunner/unittests/tsserver/declarationFileMaps.ts b/src/testRunner/unittests/tsserver/declarationFileMaps.ts index 833b61f7430a0..0fb08aa051bce 100644 --- a/src/testRunner/unittests/tsserver/declarationFileMaps.ts +++ b/src/testRunner/unittests/tsserver/declarationFileMaps.ts @@ -26,9 +26,9 @@ namespace ts.projectSystem { function checkDeclarationFiles(file: File, session: TestSession, expectedFiles: readonly File[]): void { openFilesForSession([file], session); - const project = Debug.assertDefined(session.getProjectService().getDefaultProjectForFile(file.path as server.NormalizedPath, /*ensureProject*/ false)); + const project = Debug.checkDefined(session.getProjectService().getDefaultProjectForFile(file.path as server.NormalizedPath, /*ensureProject*/ false)); const program = project.getCurrentProgram()!; - const output = getFileEmitOutput(program, Debug.assertDefined(program.getSourceFile(file.path)), /*emitOnlyDtsFiles*/ true); + const output = getFileEmitOutput(program, Debug.checkDefined(program.getSourceFile(file.path)), /*emitOnlyDtsFiles*/ true); closeFilesForSession([file], session); Debug.assert(!output.emitSkipped); diff --git a/src/testRunner/unittests/tsserver/dynamicFiles.ts b/src/testRunner/unittests/tsserver/dynamicFiles.ts new file mode 100644 index 0000000000000..214fd020d65b9 --- /dev/null +++ b/src/testRunner/unittests/tsserver/dynamicFiles.ts @@ -0,0 +1,214 @@ +namespace ts.projectSystem { + export function verifyDynamic(service: server.ProjectService, path: string) { + const info = Debug.checkDefined(service.filenameToScriptInfo.get(path), `Expected ${path} in :: ${JSON.stringify(arrayFrom(service.filenameToScriptInfo.entries(), ([key, f]) => ({ key, fileName: f.fileName, path: f.path })))}`); + assert.isTrue(info.isDynamic); + } + + function verifyPathRecognizedAsDynamic(path: string) { + const file: File = { + path, + content: `/// +/// +var x = 10;` + }; + const host = createServerHost([libFile]); + const projectService = createProjectService(host); + projectService.openClientFile(file.path, file.content); + verifyDynamic(projectService, projectService.toPath(file.path)); + + projectService.checkNumberOfProjects({ inferredProjects: 1 }); + const project = projectService.inferredProjects[0]; + checkProjectRootFiles(project, [file.path]); + checkProjectActualFiles(project, [file.path, libFile.path]); + } + + describe("unittests:: tsserver:: dynamicFiles:: Untitled files", () => { + const untitledFile = "untitled:^Untitled-1"; + it("Can convert positions to locations", () => { + const aTs: File = { path: "/proj/a.ts", content: "" }; + const tsconfig: File = { path: "/proj/tsconfig.json", content: "{}" }; + const session = createSession(createServerHost([aTs, tsconfig]), { useInferredProjectPerProjectRoot: true }); + + openFilesForSession([aTs], session); + + executeSessionRequestNoResponse(session, protocol.CommandTypes.Open, { + file: untitledFile, + fileContent: `/// \nlet foo = 1;\nfooo/**/`, + scriptKindName: "TS", + projectRootPath: "/proj", + }); + verifyDynamic(session.getProjectService(), `/proj/untitled:^untitled-1`); + const response = executeSessionRequest(session, protocol.CommandTypes.GetCodeFixes, { + file: untitledFile, + startLine: 3, + startOffset: 1, + endLine: 3, + endOffset: 5, + errorCodes: [Diagnostics.Cannot_find_name_0_Did_you_mean_1.code], + }); + assert.deepEqual(response, [ + { + description: "Change spelling to 'foo'", + fixName: "spelling", + changes: [{ + fileName: untitledFile, + textChanges: [{ + start: { line: 3, offset: 1 }, + end: { line: 3, offset: 5 }, + newText: "foo", + }], + }], + commands: undefined, + fixId: undefined, + fixAllDescription: undefined + }, + ]); + }); + + it("opening untitled files", () => { + const config: File = { + path: `${tscWatch.projectRoot}/tsconfig.json`, + content: "{}" + }; + const host = createServerHost([config, libFile], { useCaseSensitiveFileNames: true, currentDirectory: tscWatch.projectRoot }); + const service = createProjectService(host); + service.openClientFile(untitledFile, "const x = 10;", /*scriptKind*/ undefined, tscWatch.projectRoot); + checkNumberOfProjects(service, { inferredProjects: 1 }); + checkProjectActualFiles(service.inferredProjects[0], [untitledFile, libFile.path]); + verifyDynamic(service, `${tscWatch.projectRoot}/${untitledFile}`); + + const untitled: File = { + path: `${tscWatch.projectRoot}/Untitled-1.ts`, + content: "const x = 10;" + }; + host.writeFile(untitled.path, untitled.content); + host.checkTimeoutQueueLength(0); + service.openClientFile(untitled.path, untitled.content, /*scriptKind*/ undefined, tscWatch.projectRoot); + checkNumberOfProjects(service, { configuredProjects: 1, inferredProjects: 1 }); + checkProjectActualFiles(service.configuredProjects.get(config.path)!, [untitled.path, libFile.path, config.path]); + checkProjectActualFiles(service.inferredProjects[0], [untitledFile, libFile.path]); + + service.closeClientFile(untitledFile); + checkProjectActualFiles(service.configuredProjects.get(config.path)!, [untitled.path, libFile.path, config.path]); + checkProjectActualFiles(service.inferredProjects[0], [untitledFile, libFile.path]); + + service.openClientFile(untitledFile, "const x = 10;", /*scriptKind*/ undefined, tscWatch.projectRoot); + verifyDynamic(service, `${tscWatch.projectRoot}/${untitledFile}`); + checkProjectActualFiles(service.configuredProjects.get(config.path)!, [untitled.path, libFile.path, config.path]); + checkProjectActualFiles(service.inferredProjects[0], [untitledFile, libFile.path]); + }); + }); + + describe("unittests:: tsserver:: dynamicFiles:: ", () => { + it("dynamic file without external project", () => { + const file: File = { + path: "^walkThroughSnippet:/Users/UserName/projects/someProject/out/someFile#1.js", + content: "var x = 10;" + }; + const host = createServerHost([libFile], { useCaseSensitiveFileNames: true }); + const projectService = createProjectService(host); + projectService.setCompilerOptionsForInferredProjects({ + module: ModuleKind.CommonJS, + allowJs: true, + allowSyntheticDefaultImports: true, + allowNonTsExtensions: true + }); + projectService.openClientFile(file.path, "var x = 10;"); + + projectService.checkNumberOfProjects({ inferredProjects: 1 }); + const project = projectService.inferredProjects[0]; + checkProjectRootFiles(project, [file.path]); + checkProjectActualFiles(project, [file.path, libFile.path]); + verifyDynamic(projectService, `/${file.path}`); + + assert.strictEqual(projectService.ensureDefaultProjectForFile(server.toNormalizedPath(file.path)), project); + const indexOfX = file.content.indexOf("x"); + assert.deepEqual(project.getLanguageService(/*ensureSynchronized*/ true).getQuickInfoAtPosition(file.path, indexOfX), { + kind: ScriptElementKind.variableElement, + kindModifiers: "", + textSpan: { start: indexOfX, length: 1 }, + displayParts: [ + { text: "var", kind: "keyword" }, + { text: " ", kind: "space" }, + { text: "x", kind: "localName" }, + { text: ":", kind: "punctuation" }, + { text: " ", kind: "space" }, + { text: "number", kind: "keyword" } + ], + documentation: [], + tags: undefined, + }); + }); + + it("dynamic file with reference paths without external project", () => { + verifyPathRecognizedAsDynamic("^walkThroughSnippet:/Users/UserName/projects/someProject/out/someFile#1.js"); + }); + + describe("dynamic file with projectRootPath", () => { + const file: File = { + path: "^walkThroughSnippet:/Users/UserName/projects/someProject/out/someFile#1.js", + content: "var x = 10;" + }; + const configFile: File = { + path: `${tscWatch.projectRoot}/tsconfig.json`, + content: "{}" + }; + const configProjectFile: File = { + path: `${tscWatch.projectRoot}/a.ts`, + content: "let y = 10;" + }; + it("with useInferredProjectPerProjectRoot", () => { + const host = createServerHost([libFile, configFile, configProjectFile], { useCaseSensitiveFileNames: true }); + const session = createSession(host, { useInferredProjectPerProjectRoot: true }); + openFilesForSession([{ file: file.path, projectRootPath: tscWatch.projectRoot }], session); + + const projectService = session.getProjectService(); + checkNumberOfProjects(projectService, { inferredProjects: 1 }); + checkProjectActualFiles(projectService.inferredProjects[0], [file.path, libFile.path]); + verifyDynamic(projectService, `${tscWatch.projectRoot}/${file.path}`); + + session.executeCommandSeq({ + command: protocol.CommandTypes.GetOutliningSpans, + arguments: { + file: file.path + } + }); + + // Without project root + const file2Path = file.path.replace("#1", "#2"); + projectService.openClientFile(file2Path, file.content); + checkNumberOfProjects(projectService, { inferredProjects: 2 }); + checkProjectActualFiles(projectService.inferredProjects[0], [file.path, libFile.path]); + checkProjectActualFiles(projectService.inferredProjects[1], [file2Path, libFile.path]); + }); + + it("fails when useInferredProjectPerProjectRoot is false", () => { + const host = createServerHost([libFile, configFile, configProjectFile], { useCaseSensitiveFileNames: true }); + const projectService = createProjectService(host); + try { + projectService.openClientFile(file.path, file.content, /*scriptKind*/ undefined, tscWatch.projectRoot); + } + catch (e) { + assert.strictEqual( + e.message.replace(/\r?\n/, "\n"), + `Debug Failure. False expression.\nVerbose Debug Information: {"fileName":"^walkThroughSnippet:/Users/UserName/projects/someProject/out/someFile#1.js","currentDirectory":"/user/username/projects/myproject","hostCurrentDirectory":"/","openKeys":[]}\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.` + ); + } + const file2Path = file.path.replace("#1", "#2"); + projectService.openClientFile(file2Path, file.content); + projectService.checkNumberOfProjects({ inferredProjects: 1 }); + checkProjectActualFiles(projectService.inferredProjects[0], [file2Path, libFile.path]); + }); + }); + + describe("verify accepts known schemas as dynamic file", () => { + it("walkThroughSnippet", () => { + verifyPathRecognizedAsDynamic("walkThroughSnippet:/usr/share/code/resources/app/out/vs/workbench/contrib/welcome/walkThrough/browser/editor/^vs_code_editor_walkthrough.md#1.ts"); + }); + + it("untitled", () => { + verifyPathRecognizedAsDynamic("untitled:/Users/matb/projects/san/^newFile.ts"); + }); + }); + }); +} diff --git a/src/testRunner/unittests/tsserver/helpers.ts b/src/testRunner/unittests/tsserver/helpers.ts index 4097e24d86d81..ce776323879a4 100644 --- a/src/testRunner/unittests/tsserver/helpers.ts +++ b/src/testRunner/unittests/tsserver/helpers.ts @@ -241,7 +241,7 @@ namespace ts.projectSystem { } return true; }); - return Debug.assertDefined(eventData); + return Debug.checkDefined(eventData); } hasZeroEvent(eventName: T["eventName"]) { diff --git a/src/testRunner/unittests/tsserver/navTo.ts b/src/testRunner/unittests/tsserver/navTo.ts index b3aebef104368..0ce98a076de3f 100644 --- a/src/testRunner/unittests/tsserver/navTo.ts +++ b/src/testRunner/unittests/tsserver/navTo.ts @@ -26,5 +26,46 @@ namespace ts.projectSystem { const items2 = session.executeCommand(localFunctionNavToRequst).response as protocol.NavtoItem[]; assert.isTrue(containsNavToItem(items2, "foo", "function"), `Cannot find function symbol "foo".`); }); + + it("should de-duplicate symbols", () => { + const configFile1: File = { + path: "/a/tsconfig.json", + content: `{ + "compilerOptions": { + "composite": true + } +}` + }; + const file1: File = { + path: "/a/index.ts", + content: "export const abcdef = 1;" + }; + const configFile2: File = { + path: "/b/tsconfig.json", + content: `{ + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "../a" } + ] +}` + }; + const file2: File = { + path: "/b/index.ts", + content: `import a = require("../a"); +export const ghijkl = a.abcdef;` + }; + const host = createServerHost([configFile1, file1, configFile2, file2]); + const session = createSession(host); + openFilesForSession([file1, file2], session); + + const request = makeSessionRequest(CommandNames.Navto, { searchValue: "abcdef", file: file1.path }); + const items = session.executeCommand(request).response as protocol.NavtoItem[]; + assert.strictEqual(items.length, 1); + const item = items[0]; + assert.strictEqual(item.name, "abcdef"); + assert.strictEqual(item.file, file1.path); + }); }); } diff --git a/src/testRunner/unittests/tsserver/openFile.ts b/src/testRunner/unittests/tsserver/openFile.ts index d2a995c68f88e..62a7fcc729ac8 100644 --- a/src/testRunner/unittests/tsserver/openFile.ts +++ b/src/testRunner/unittests/tsserver/openFile.ts @@ -104,5 +104,29 @@ namespace ts.projectSystem { checkProjectActualFiles(project, files.map(f => f.path)); } }); + + it("can open same file again", () => { + const projectFolder = "/user/someuser/projects/myproject"; + const aFile: File = { + path: `${projectFolder}/src/a.ts`, + content: "export const x = 0;" + }; + const configFile: File = { + path: `${projectFolder}/tsconfig.json`, + content: "{}" + }; + const files = [aFile, configFile, libFile]; + const host = createServerHost(files); + const service = createProjectService(host); + verifyProject(aFile.content); + verifyProject(`${aFile.content}export const y = 10;`); + + function verifyProject(aFileContent: string) { + service.openClientFile(aFile.path, aFileContent, ScriptKind.TS, projectFolder); + const project = service.configuredProjects.get(configFile.path)!; + checkProjectActualFiles(project, files.map(f => f.path)); + assert.equal(project.getCurrentProgram()?.getSourceFile(aFile.path)!.text, aFileContent); + } + }); }); } diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts index fa5196bb4bdd4..8baa3a1f0cf63 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -470,7 +470,7 @@ fn5(); interface VerifierAndWithRefs { withRefs: boolean; disableSourceOfProjectReferenceRedirect?: true; - verifier: (withRefs: boolean) => readonly DocumentPositionMapperVerifier[]; + verifier: (withRefs: boolean, disableSourceOfProjectReferenceRedirect?: true) => readonly DocumentPositionMapperVerifier[]; } function openFiles(verifiers: readonly DocumentPositionMapperVerifier[]) { @@ -502,7 +502,7 @@ fn5(); onHostCreate(host); } const session = createSession(host); - const verifiers = verifier(withRefs && !disableSourceOfProjectReferenceRedirect); + const verifiers = verifier(withRefs && !disableSourceOfProjectReferenceRedirect, disableSourceOfProjectReferenceRedirect); openFilesForSession([...openFiles(verifiers), randomFile], session); return { host, session, verifiers }; } @@ -724,13 +724,14 @@ fn5(); scenarioName, verifier, withRefs, + disableSourceOfProjectReferenceRedirect, change, afterChangeActionKey }: VerifyScenarioWithChanges, timeoutBeforeAction: boolean, ) { it(scenarioName, () => { - const { host, session, verifiers } = openTsFile({ verifier, withRefs }); + const { host, session, verifiers } = openTsFile({ verifier, withRefs, disableSourceOfProjectReferenceRedirect }); // Create DocumentPositionMapper firstAction(session, verifiers); @@ -790,6 +791,7 @@ fn5(); scenarioName, verifier, withRefs, + disableSourceOfProjectReferenceRedirect, fileLocation, fileNotPresentKey, fileCreatedKey, @@ -801,6 +803,7 @@ fn5(); const { host, session, verifiers } = openTsFile({ verifier, withRefs, + disableSourceOfProjectReferenceRedirect, onHostCreate: host => host.deleteFile(fileLocation) }); checkProject(session, verifiers, noDts); @@ -813,6 +816,7 @@ fn5(); const { host, session, verifiers } = openTsFile({ verifier, withRefs, + disableSourceOfProjectReferenceRedirect, onHostCreate: host => { fileContents = host.readFile(fileLocation); host.deleteFile(fileLocation); @@ -825,7 +829,7 @@ fn5(); }); it("when file is deleted after actions on the projects", () => { - const { host, session, verifiers } = openTsFile({ verifier, withRefs }); + const { host, session, verifiers } = openTsFile({ verifier, disableSourceOfProjectReferenceRedirect, withRefs }); firstAction(session, verifiers); // The dependency file is deleted when orphan files are collected @@ -967,31 +971,35 @@ ${dependencyTs.content}`); interface VerifyScenario { mainScenario: string; - verifier: (withRefs: boolean) => readonly DocumentPositionMapperVerifier[]; + verifier: (withRefs: boolean, disableSourceOfProjectReferenceRedirect?: true) => readonly DocumentPositionMapperVerifier[]; } function verifyScenario(scenario: VerifyScenario) { - describe("when main tsconfig doesnt have project reference", () => { - verifyScenarioWorker(scenario, /*withRefs*/ false); - }); - describe("when main tsconfig has project reference", () => { - verifyScenarioWorker(scenario, /*withRefs*/ true); - }); - describe("when main tsconfig has but has disableSourceOfProjectReferenceRedirect", () => { - verifyScenarioWorker(scenario, /*withRefs*/ true); + describe(scenario.mainScenario, () => { + describe("when main tsconfig doesnt have project reference", () => { + verifyScenarioWorker(scenario, /*withRefs*/ false); + }); + describe("when main tsconfig has project reference", () => { + verifyScenarioWorker(scenario, /*withRefs*/ true); + }); + describe("when main tsconfig has disableSourceOfProjectReferenceRedirect along with project reference", () => { + verifyScenarioWorker(scenario, /*withRefs*/ true, /*disableSourceOfProjectReferenceRedirect*/ true); + }); }); } describe("from project that uses dependency", () => { verifyScenario({ mainScenario: "can go to definition correctly", - verifier: withRefs => [ + verifier: (withRefs, disableSourceOfProjectReferenceRedirect) => [ { ...goToDefFromMainTsProjectInfoVerifier(withRefs), main: () => ({ action: goToDefFromMainTs, closedInfos: withRefs ? [dependencyTs.path, dependencyConfig.path, libFile.path] : - [dependencyTs.path, libFile.path, dtsPath, dtsMapLocation], + disableSourceOfProjectReferenceRedirect ? + [dependencyTs.path, libFile.path, dtsPath, dtsMapLocation, dependencyConfig.path] : + [dependencyTs.path, libFile.path, dtsPath, dtsMapLocation], otherWatchedFiles: [mainConfig.path], expectsDts: !withRefs, // Dts script info present only if no project reference expectsMap: !withRefs // Map script info present only if no project reference @@ -1097,7 +1105,7 @@ ${dependencyTs.content}`); describe("when opening depedency and usage project", () => { verifyScenario({ mainScenario: "goto Definition in usage and rename locations from defining project", - verifier: withRefs => [ + verifier: (withRefs, disableSourceOfProjectReferenceRedirect) => [ { ...goToDefFromMainTsProjectInfoVerifier(withRefs), main: () => ({ @@ -1105,9 +1113,11 @@ ${dependencyTs.content}`); // DependencyTs is open, so omit it from closed infos closedInfos: withRefs ? [dependencyConfig.path, libFile.path] : - [libFile.path, dtsPath, dtsMapLocation], - otherWatchedFiles: withRefs ? - [mainConfig.path] : // Its in closed info + disableSourceOfProjectReferenceRedirect ? + [libFile.path, dtsPath, dtsMapLocation, dependencyConfig.path] : + [libFile.path, dtsPath, dtsMapLocation], + otherWatchedFiles: withRefs || disableSourceOfProjectReferenceRedirect ? + [mainConfig.path] : // dependencyConfig is in closed info [mainConfig.path, dependencyConfig.path], expectsDts: !withRefs, // Dts script info present only if no project reference expectsMap: !withRefs // Map script info present only if no project reference @@ -1179,9 +1189,11 @@ ${dependencyTs.content}`); // DependencyTs is open, so omit it from closed infos closedInfos: withRefs ? [dependencyConfig.path, libFile.path, dtsLocation, dtsMapLocation] : - [libFile.path, dtsPath, dtsMapLocation], - otherWatchedFiles: withRefs ? - [mainConfig.path] : // Its in closed info + disableSourceOfProjectReferenceRedirect ? + [libFile.path, dtsPath, dtsMapLocation, dependencyConfig.path] : + [libFile.path, dtsPath, dtsMapLocation], + otherWatchedFiles: withRefs || disableSourceOfProjectReferenceRedirect ? + [mainConfig.path] : // dependencyConfig is in closed info [mainConfig.path, dependencyConfig.path], expectsDts: true, expectsMap: true, diff --git a/src/testRunner/unittests/tsserver/projects.ts b/src/testRunner/unittests/tsserver/projects.ts index ae2573852684e..80e1efcac22d3 100644 --- a/src/testRunner/unittests/tsserver/projects.ts +++ b/src/testRunner/unittests/tsserver/projects.ts @@ -1075,121 +1075,6 @@ namespace ts.projectSystem { assert.equal(options.outDir, "C:/a/b", ""); }); - it("dynamic file without external project", () => { - const file: File = { - path: "^walkThroughSnippet:/Users/UserName/projects/someProject/out/someFile#1.js", - content: "var x = 10;" - }; - const host = createServerHost([libFile], { useCaseSensitiveFileNames: true }); - const projectService = createProjectService(host); - projectService.setCompilerOptionsForInferredProjects({ - module: ModuleKind.CommonJS, - allowJs: true, - allowSyntheticDefaultImports: true, - allowNonTsExtensions: true - }); - projectService.openClientFile(file.path, "var x = 10;"); - - projectService.checkNumberOfProjects({ inferredProjects: 1 }); - const project = projectService.inferredProjects[0]; - checkProjectRootFiles(project, [file.path]); - checkProjectActualFiles(project, [file.path, libFile.path]); - verifyDynamic(projectService, `/${file.path}`); - - assert.strictEqual(projectService.ensureDefaultProjectForFile(server.toNormalizedPath(file.path)), project); - const indexOfX = file.content.indexOf("x"); - assert.deepEqual(project.getLanguageService(/*ensureSynchronized*/ true).getQuickInfoAtPosition(file.path, indexOfX), { - kind: ScriptElementKind.variableElement, - kindModifiers: "", - textSpan: { start: indexOfX, length: 1 }, - displayParts: [ - { text: "var", kind: "keyword" }, - { text: " ", kind: "space" }, - { text: "x", kind: "localName" }, - { text: ":", kind: "punctuation" }, - { text: " ", kind: "space" }, - { text: "number", kind: "keyword" } - ], - documentation: [], - tags: undefined, - }); - }); - - it("dynamic file with reference paths without external project", () => { - const file: File = { - path: "^walkThroughSnippet:/Users/UserName/projects/someProject/out/someFile#1.js", - content: `/// -/// -var x = 10;` - }; - const host = createServerHost([libFile]); - const projectService = createProjectService(host); - projectService.openClientFile(file.path, file.content); - verifyDynamic(projectService, projectService.toPath(file.path)); - - projectService.checkNumberOfProjects({ inferredProjects: 1 }); - const project = projectService.inferredProjects[0]; - checkProjectRootFiles(project, [file.path]); - checkProjectActualFiles(project, [file.path, libFile.path]); - }); - - describe("dynamic file with projectRootPath", () => { - const file: File = { - path: "^walkThroughSnippet:/Users/UserName/projects/someProject/out/someFile#1.js", - content: "var x = 10;" - }; - const configFile: File = { - path: `${tscWatch.projectRoot}/tsconfig.json`, - content: "{}" - }; - const configProjectFile: File = { - path: `${tscWatch.projectRoot}/a.ts`, - content: "let y = 10;" - }; - it("with useInferredProjectPerProjectRoot", () => { - const host = createServerHost([libFile, configFile, configProjectFile], { useCaseSensitiveFileNames: true }); - const session = createSession(host, { useInferredProjectPerProjectRoot: true }); - openFilesForSession([{ file: file.path, projectRootPath: tscWatch.projectRoot }], session); - - const projectService = session.getProjectService(); - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - checkProjectActualFiles(projectService.inferredProjects[0], [file.path, libFile.path]); - verifyDynamic(projectService, `${tscWatch.projectRoot}/${file.path}`); - - session.executeCommandSeq({ - command: protocol.CommandTypes.GetOutliningSpans, - arguments: { - file: file.path - } - }); - - // Without project root - const file2Path = file.path.replace("#1", "#2"); - projectService.openClientFile(file2Path, file.content); - checkNumberOfProjects(projectService, { inferredProjects: 2 }); - checkProjectActualFiles(projectService.inferredProjects[0], [file.path, libFile.path]); - checkProjectActualFiles(projectService.inferredProjects[1], [file2Path, libFile.path]); - }); - - it("fails when useInferredProjectPerProjectRoot is false", () => { - const host = createServerHost([libFile, configFile, configProjectFile], { useCaseSensitiveFileNames: true }); - const projectService = createProjectService(host); - try { - projectService.openClientFile(file.path, file.content, /*scriptKind*/ undefined, tscWatch.projectRoot); - } - catch (e) { - assert.strictEqual( - e.message.replace(/\r?\n/, "\n"), - `Debug Failure. False expression: \nVerbose Debug Information: {"fileName":"^walkThroughSnippet:/Users/UserName/projects/someProject/out/someFile#1.js","currentDirectory":"/user/username/projects/myproject","hostCurrentDirectory":"/","openKeys":[]}\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.` - ); - } - const file2Path = file.path.replace("#1", "#2"); - projectService.openClientFile(file2Path, file.content); - projectService.checkNumberOfProjects({ inferredProjects: 1 }); - checkProjectActualFiles(projectService.inferredProjects[0], [file2Path, libFile.path]); - }); - }); - it("files opened, closed affecting multiple projects", () => { const file: File = { path: "/a/b/projects/config/file.ts", @@ -1406,7 +1291,7 @@ var x = 10;` verifyFile2InfoIsOrphan(); function verifyFile2InfoIsOrphan() { - const info = Debug.assertDefined(service.getScriptInfoForPath(file2.path as Path)); + const info = Debug.checkDefined(service.getScriptInfoForPath(file2.path as Path)); assert.equal(info.containingProjects.length, 0); } }); diff --git a/src/testRunner/unittests/tsserver/resolutionCache.ts b/src/testRunner/unittests/tsserver/resolutionCache.ts index 690af6a3d868a..ed6de15a16886 100644 --- a/src/testRunner/unittests/tsserver/resolutionCache.ts +++ b/src/testRunner/unittests/tsserver/resolutionCache.ts @@ -918,7 +918,7 @@ export const x = 10;` const service = createProjectService(host); service.openClientFile(file1.path); checkNumberOfProjects(service, { configuredProjects: 1 }); - const project = Debug.assertDefined(service.configuredProjects.get(config.path)); + const project = Debug.checkDefined(service.configuredProjects.get(config.path)); checkProjectActualFiles(project, files.map(f => f.path)); host.checkTimeoutQueueLength(0); diff --git a/src/testRunner/unittests/tsserver/session.ts b/src/testRunner/unittests/tsserver/session.ts index 258ac29d26ffc..b41df99f4a2c6 100644 --- a/src/testRunner/unittests/tsserver/session.ts +++ b/src/testRunner/unittests/tsserver/session.ts @@ -343,7 +343,7 @@ namespace ts.server { session.send = Session.prototype.send; assert(session.send); - expect(session.send(msg)).to.not.exist; // eslint-disable-line no-unused-expressions + expect(session.send(msg)).to.not.exist; // eslint-disable-line @typescript-eslint/no-unused-expressions expect(lastWrittenToHost).to.equal(resultMsg); }); }); diff --git a/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts b/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts index 7c484983f8535..616daf5fb1f30 100644 --- a/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts +++ b/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts @@ -14,7 +14,7 @@ namespace ts.projectSystem { content: "import { a } from './b'; new a.A();" }; - assertUsageError([a, b, c], c); + assertUsageError([a, b, c], c, Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type); }); it("named export -> type-only named import -> named export -> named import", () => { @@ -31,7 +31,7 @@ namespace ts.projectSystem { content: "import { A } from './b'; new A();" }; - assertUsageError([a, b, c], c); + assertUsageError([a, b, c], c, Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type); }); it("named export -> type-only namespace import -> export equals -> import equals", () => { @@ -48,7 +48,7 @@ namespace ts.projectSystem { content: "import a = require('./b'); new a.A();" }; - assertUsageError([a, b, c], c); + assertUsageError([a, b, c], c, Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type); }); it("named export -> type-only namespace import -> export default -> import default", () => { @@ -65,13 +65,13 @@ namespace ts.projectSystem { content: "import a from './b'; new a.A();" }; - assertUsageError([a, b, c], c); + assertUsageError([a, b, c], c, Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type); }); it("export default -> type-only import default -> export default -> import default", () => { const a = { path: "/a.ts", - content: "export defai;t class A {}" + content: "export default class A {}" }; const b = { path: "/b.ts", @@ -82,11 +82,74 @@ namespace ts.projectSystem { content: "import A from './b'; new A();" }; - assertUsageError([a, b, c], c); + assertUsageError([a, b, c], c, Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type); + }); + + it("named export -> type-only export from -> export star from -> named import", () => { + const a = { + path: "/a.ts", + content: "export class A {}" + }; + const b = { + path: "/b.ts", + content: "export type { A } from './a';" + }; + const c = { + path: "/c.ts", + content: "export * from './b';" + }; + const d = { + path: "/d.ts", + content: "import { A } from './c'; new A();" + }; + + assertUsageError([a, b, c, d], d, Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type); + }); + + it("named export -> export namespace from -> type-only named import -> named export -> named import", () => { + const a = { + path: "/a.ts", + content: "export class A {}" + }; + const b = { + path: "/b.ts", + content: "export * as a from './a';" + }; + const c = { + path: "/c.ts", + content: "import type { a } from './b'; export { a };" + }; + const d = { + path: "/d.ts", + content: "import { a } from './c'; new a.A();" + }; + + assertUsageError([a, b, c, d], d, Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type); + }); + + it("named export -> type-only export from -> export namespace from -> named import", () => { + const a = { + path: "/a.ts", + content: "export class A {}" + }; + const b = { + path: "/b.ts", + content: "export type { A } from './a';" + }; + const c = { + path: "/c.ts", + content: "export * as a from './b';" + }; + const d = { + path: "/d.ts", + content: "import { a } from './c'; new a.A();" + }; + + assertUsageError([a, b, c, d], d, Diagnostics.Property_0_does_not_exist_on_type_1); }); }); - function assertUsageError(files: readonly TestFSWithWatch.File[], openFile: TestFSWithWatch.File) { + function assertUsageError(files: readonly TestFSWithWatch.File[], openFile: TestFSWithWatch.File, diagnostic: DiagnosticMessage) { const host = createServerHost(files); const session = createSession(host); openFilesForSession([openFile], session); @@ -96,9 +159,6 @@ namespace ts.projectSystem { ); const diagnostics = session.executeCommand(req).response as protocol.Diagnostic[]; assert.lengthOf(diagnostics, 1); - assert.oneOf(diagnostics[0].code, [ - Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code, - Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type.code - ]); + assert.equal(diagnostics[0].code, diagnostic.code); } } diff --git a/src/testRunner/unittests/tsserver/untitledFiles.ts b/src/testRunner/unittests/tsserver/untitledFiles.ts deleted file mode 100644 index 6ba8da3cf398f..0000000000000 --- a/src/testRunner/unittests/tsserver/untitledFiles.ts +++ /dev/null @@ -1,83 +0,0 @@ -namespace ts.projectSystem { - export function verifyDynamic(service: server.ProjectService, path: string) { - const info = Debug.assertDefined(service.filenameToScriptInfo.get(path), `Expected ${path} in :: ${JSON.stringify(arrayFrom(service.filenameToScriptInfo.entries(), ([key, f]) => ({ key, fileName: f.fileName, path: f.path })))}`); - assert.isTrue(info.isDynamic); - } - - describe("unittests:: tsserver:: Untitled files", () => { - const untitledFile = "untitled:^Untitled-1"; - it("Can convert positions to locations", () => { - const aTs: File = { path: "/proj/a.ts", content: "" }; - const tsconfig: File = { path: "/proj/tsconfig.json", content: "{}" }; - const session = createSession(createServerHost([aTs, tsconfig]), { useInferredProjectPerProjectRoot: true }); - - openFilesForSession([aTs], session); - - executeSessionRequestNoResponse(session, protocol.CommandTypes.Open, { - file: untitledFile, - fileContent: `/// \nlet foo = 1;\nfooo/**/`, - scriptKindName: "TS", - projectRootPath: "/proj", - }); - verifyDynamic(session.getProjectService(), `/proj/untitled:^untitled-1`); - const response = executeSessionRequest(session, protocol.CommandTypes.GetCodeFixes, { - file: untitledFile, - startLine: 3, - startOffset: 1, - endLine: 3, - endOffset: 5, - errorCodes: [Diagnostics.Cannot_find_name_0_Did_you_mean_1.code], - }); - assert.deepEqual(response, [ - { - description: "Change spelling to 'foo'", - fixName: "spelling", - changes: [{ - fileName: untitledFile, - textChanges: [{ - start: { line: 3, offset: 1 }, - end: { line: 3, offset: 5 }, - newText: "foo", - }], - }], - commands: undefined, - fixId: undefined, - fixAllDescription: undefined - }, - ]); - }); - - it("opening untitled files", () => { - const config: File = { - path: `${tscWatch.projectRoot}/tsconfig.json`, - content: "{}" - }; - const host = createServerHost([config, libFile], { useCaseSensitiveFileNames: true, currentDirectory: tscWatch.projectRoot }); - const service = createProjectService(host); - service.openClientFile(untitledFile, "const x = 10;", /*scriptKind*/ undefined, tscWatch.projectRoot); - checkNumberOfProjects(service, { inferredProjects: 1 }); - checkProjectActualFiles(service.inferredProjects[0], [untitledFile, libFile.path]); - verifyDynamic(service, `${tscWatch.projectRoot}/${untitledFile}`); - - const untitled: File = { - path: `${tscWatch.projectRoot}/Untitled-1.ts`, - content: "const x = 10;" - }; - host.writeFile(untitled.path, untitled.content); - host.checkTimeoutQueueLength(0); - service.openClientFile(untitled.path, untitled.content, /*scriptKind*/ undefined, tscWatch.projectRoot); - checkNumberOfProjects(service, { configuredProjects: 1, inferredProjects: 1 }); - checkProjectActualFiles(service.configuredProjects.get(config.path)!, [untitled.path, libFile.path, config.path]); - checkProjectActualFiles(service.inferredProjects[0], [untitledFile, libFile.path]); - - service.closeClientFile(untitledFile); - checkProjectActualFiles(service.configuredProjects.get(config.path)!, [untitled.path, libFile.path, config.path]); - checkProjectActualFiles(service.inferredProjects[0], [untitledFile, libFile.path]); - - service.openClientFile(untitledFile, "const x = 10;", /*scriptKind*/ undefined, tscWatch.projectRoot); - verifyDynamic(service, `${tscWatch.projectRoot}/${untitledFile}`); - checkProjectActualFiles(service.configuredProjects.get(config.path)!, [untitled.path, libFile.path, config.path]); - checkProjectActualFiles(service.inferredProjects[0], [untitledFile, libFile.path]); - }); - }); -} diff --git a/src/testRunner/unittests/tsserver/watchEnvironment.ts b/src/testRunner/unittests/tsserver/watchEnvironment.ts index 71757490147a1..421d02fff8caf 100644 --- a/src/testRunner/unittests/tsserver/watchEnvironment.ts +++ b/src/testRunner/unittests/tsserver/watchEnvironment.ts @@ -45,7 +45,7 @@ namespace ts.projectSystem { const projectService = createProjectService(host); projectService.openClientFile(index.path); - const project = Debug.assertDefined(projectService.configuredProjects.get(configFile.path)); + const project = Debug.checkDefined(projectService.configuredProjects.get(configFile.path)); verifyProjectAndCompletions(); // Add file2 @@ -168,7 +168,7 @@ namespace ts.projectSystem { const projectService = createProjectService(host); projectService.openClientFile(index.path); - const project = Debug.assertDefined(projectService.configuredProjects.get(configFile.path)); + const project = Debug.checkDefined(projectService.configuredProjects.get(configFile.path)); verifyProject(); const nodeModulesIgnoredFileFromIgnoreDirectory: File = { @@ -286,6 +286,7 @@ namespace ts.projectSystem { files, f => f.path.toLowerCase(), f => [{ + directoryName: f.path, fallbackPollingInterval: f === configFile ? PollingInterval.High : PollingInterval.Medium, fallbackOptions: { watchFile: WatchFileKind.PriorityPollingInterval } }] @@ -299,7 +300,8 @@ namespace ts.projectSystem { arrayToMap( ["/a/b", "/a/b/node_modules/@types"], identity, - () => [{ + directoryName => [{ + directoryName, fallbackPollingInterval: PollingInterval.Medium, fallbackOptions: { watchFile: WatchFileKind.PriorityPollingInterval } }] @@ -337,7 +339,10 @@ namespace ts.projectSystem { arrayToMap( files, f => f.path.toLowerCase(), - () => [PollingInterval.Low] + f => [{ + fileName: f.path, + pollingInterval: PollingInterval.Low + }] ) ); checkWatchedDirectoriesDetailed( @@ -348,7 +353,8 @@ namespace ts.projectSystem { arrayToMap( ["/a/b", "/a/b/node_modules/@types"], identity, - () => [{ + directoryName => [{ + directoryName, fallbackPollingInterval: PollingInterval.Medium, fallbackOptions: { watchFile: WatchFileKind.PriorityPollingInterval } }] @@ -380,15 +386,19 @@ namespace ts.projectSystem { files.map(f => f.path).concat(commonFile1.path) ); - const filePaths = files.map(f => f.path.toLowerCase()); + const filePaths = files.map(f => f.path); + const allFilePaths = filePaths.concat(["/a/b", "/a/b/node_modules/@types"]); checkWatchedFilesDetailed( host, - filePaths.concat(["/a/b", "/a/b/node_modules/@types"]), + allFilePaths.map(toLowerCase), 1, arrayToMap( - filePaths.concat(["/a/b", "/a/b/node_modules/@types"]), - identity, - f => [contains(filePaths, f) ? PollingInterval.Low : PollingInterval.Medium] + allFilePaths, + toLowerCase, + fileName => [{ + fileName, + pollingInterval: contains(filePaths, fileName) ? PollingInterval.Low : PollingInterval.Medium + }] ) ); checkWatchedDirectories(host, emptyArray, /*recursive*/ false); @@ -422,7 +432,10 @@ namespace ts.projectSystem { arrayToMap( [libFile, commonFile2], f => f.path.toLowerCase(), - () => [PollingInterval.Low] + f => [{ + fileName: f.path, + pollingInterval: PollingInterval.Low + }] ) ); // Config file with the setting with fsWatch @@ -432,9 +445,10 @@ namespace ts.projectSystem { 1, /*recursive*/ false, arrayToMap( - [configFile.path.toLowerCase()], - identity, - () => [{ + [configFile.path], + toLowerCase, + directoryName => [{ + directoryName, fallbackPollingInterval: PollingInterval.High, fallbackOptions: { watchFile: WatchFileKind.PriorityPollingInterval } }] @@ -448,7 +462,8 @@ namespace ts.projectSystem { arrayToMap( ["/a/b", "/a/b/node_modules/@types"], identity, - () => [{ + directoryName => [{ + directoryName, fallbackPollingInterval: PollingInterval.Medium, fallbackOptions: { watchFile: WatchFileKind.PriorityPollingInterval } }] @@ -482,7 +497,10 @@ namespace ts.projectSystem { arrayToMap( files, f => f.path.toLowerCase(), - () => [PollingInterval.Low] + f => [{ + fileName: f.path, + pollingInterval: PollingInterval.Low + }] ) ); checkWatchedDirectoriesDetailed( @@ -493,7 +511,8 @@ namespace ts.projectSystem { arrayToMap( ["/a/b", "/a/b/node_modules/@types"], identity, - () => [{ + directoryName => [{ + directoryName, fallbackPollingInterval: PollingInterval.Medium, fallbackOptions: { watchFile: WatchFileKind.PriorityPollingInterval } }] @@ -529,19 +548,79 @@ namespace ts.projectSystem { files.map(f => f.path).concat(commonFile1.path) ); - const filePaths = files.map(f => f.path.toLowerCase()); + const filePaths = files.map(f => f.path); + const allFilePaths = filePaths.concat(["/a/b", "/a/b/node_modules/@types"]); checkWatchedFilesDetailed( host, - filePaths.concat(["/a/b", "/a/b/node_modules/@types"]), + allFilePaths.map(toLowerCase), 1, arrayToMap( - filePaths.concat(["/a/b", "/a/b/node_modules/@types"]), - identity, - f => [contains(filePaths, f) ? PollingInterval.Low : PollingInterval.Medium] + allFilePaths, + toLowerCase, + fileName => [{ + fileName, + pollingInterval: contains(filePaths, fileName) ? PollingInterval.Low : PollingInterval.Medium + }] ) ); checkWatchedDirectories(host, emptyArray, /*recursive*/ false); checkWatchedDirectories(host, emptyArray, /*recursive*/ true); }); }); + + describe("unittests:: tsserver:: watchEnvironment:: file names on case insensitive file system", () => { + function verifyFileNames(projectRoot: string, projectRootPath: string) { + const keyMapper = (str: string) => str.replace(projectRoot, projectRootPath); + const file: File = { + path: `${projectRoot}/foo.ts`, + content: `import { foo } from "bar"` + }; + const host = createServerHost([file, libFile]); + const service = createProjectService(host); + service.openClientFile(file.path, /*fileContent*/ undefined, /*scriptKind*/ undefined, projectRoot); + const expectedWatchFiles = [libFile.path, `${projectRoot}/tsconfig.json`, `${projectRoot}/jsconfig.json`]; + checkWatchedFilesDetailed( + host, + expectedWatchFiles.map(keyMapper), + 1, + arrayToMap( + expectedWatchFiles, + keyMapper, + fileName => [{ + fileName, + pollingInterval: PollingInterval.Low + }] + ) + ); + checkWatchedDirectories(host, [], /*recursive*/ false); + const expectedWatchedDirectories = [`${projectRoot}/node_modules`, `${projectRoot}/node_modules/@types`]; + checkWatchedDirectoriesDetailed( + host, + expectedWatchedDirectories.map(keyMapper), + 1, + /*recursive*/ true, + arrayToMap( + expectedWatchedDirectories, + keyMapper, + directoryName => [{ + directoryName, + fallbackPollingInterval: PollingInterval.Medium, + fallbackOptions: { watchFile: WatchFileKind.PriorityPollingInterval } + }] + ) + ); + } + + it("project with ascii file names", () => { + verifyFileNames("/User/userName/Projects/I", "/user/username/projects/i"); + }); + + it("project with ascii file names with i", () => { + verifyFileNames("/User/userName/Projects/i", "/user/username/projects/i"); + }); + + it("project with unicode file names", () => { + verifyFileNames("/User/userName/Projects/İ", "/user/username/projects/İ"); + }); + }); } diff --git a/src/tsserver/server.ts b/src/tsserver/server.ts index 4915158d7c1ad..7e3fd4b16f194 100644 --- a/src/tsserver/server.ts +++ b/src/tsserver/server.ts @@ -211,7 +211,7 @@ namespace ts.server { if (this.fd >= 0) { const buf = sys.bufferFrom!(s); // eslint-disable-next-line no-null/no-null - fs.writeSync(this.fd, buf, 0, buf.length, /*position*/ null!); // TODO: GH#18217 + fs.writeSync(this.fd, buf as globalThis.Buffer, 0, buf.length, /*position*/ null!); // TODO: GH#18217 } if (this.traceToConsole) { console.warn(s); @@ -792,7 +792,7 @@ namespace ts.server { // //server/location // ^ <- from 0 to this position const firstSlash = path.indexOf(directorySeparator, 2); - return firstSlash !== -1 ? path.substring(0, firstSlash).toLowerCase() : path; + return firstSlash !== -1 ? toFileNameLowerCase(path.substring(0, firstSlash)) : path; } const rootLength = getRootLength(path); if (rootLength === 0) { @@ -801,7 +801,7 @@ namespace ts.server { } if (path.charCodeAt(1) === CharacterCodes.colon && path.charCodeAt(2) === CharacterCodes.slash) { // rooted path that starts with c:/... - extract drive letter - return path.charAt(0).toLowerCase(); + return toFileNameLowerCase(path.charAt(0)); } if (path.charCodeAt(0) === CharacterCodes.slash && path.charCodeAt(1) !== CharacterCodes.slash) { // rooted path that starts with slash - /somename - use key for current drive @@ -884,7 +884,7 @@ namespace ts.server { } // Override sys.write because fs.writeSync is not reliable on Node 4 - sys.write = (s: string) => writeMessage(sys.bufferFrom!(s, "utf8")); + sys.write = (s: string) => writeMessage(sys.bufferFrom!(s, "utf8") as globalThis.Buffer); sys.watchFile = (fileName, callback) => { const watchedFile = pollingWatchedFileSet.addFile(fileName, callback); return { diff --git a/tests/baselines/reference/MemberAccessorDeclaration15.js b/tests/baselines/reference/MemberAccessorDeclaration15.js index 42c4cb760145c..3ab84331c9546 100644 --- a/tests/baselines/reference/MemberAccessorDeclaration15.js +++ b/tests/baselines/reference/MemberAccessorDeclaration15.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index a7d63d5545233..5fc7f19d7c66e 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -51,7 +51,7 @@ var C = /** @class */ (function (_super) { Object.defineProperty(C.prototype, "prop", { get: function () { return "foo"; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.m = function () { }; diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index df07c9f7a3e47..a26369108ab0b 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -71,7 +71,7 @@ var C = /** @class */ (function (_super) { } Object.defineProperty(C.prototype, "concreteWithNoBody", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -104,7 +104,7 @@ var WrongTypeAccessorImpl = /** @class */ (function (_super) { } Object.defineProperty(WrongTypeAccessorImpl.prototype, "num", { get: function () { return "nope, wrong"; }, - enumerable: true, + enumerable: false, configurable: true }); return WrongTypeAccessorImpl; @@ -123,13 +123,13 @@ var AbstractAccessorMismatch = /** @class */ (function () { } Object.defineProperty(AbstractAccessorMismatch.prototype, "p1", { set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); ; Object.defineProperty(AbstractAccessorMismatch.prototype, "p2", { get: function () { return "should work"; }, - enumerable: true, + enumerable: false, configurable: true }); return AbstractAccessorMismatch; diff --git a/tests/baselines/reference/accessibilityModifiers.js b/tests/baselines/reference/accessibilityModifiers.js index c7d1efc2b4da6..6adbc15f7e4ed 100644 --- a/tests/baselines/reference/accessibilityModifiers.js +++ b/tests/baselines/reference/accessibilityModifiers.js @@ -52,34 +52,34 @@ var C = /** @class */ (function () { C.privateMethod = function () { }; Object.defineProperty(C, "privateGetter", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "privateSetter", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); C.protectedMethod = function () { }; Object.defineProperty(C, "protectedGetter", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "protectedSetter", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); C.publicMethod = function () { }; Object.defineProperty(C, "publicGetter", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "publicSetter", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -91,34 +91,34 @@ var D = /** @class */ (function () { D.privateMethod = function () { }; Object.defineProperty(D, "privateGetter", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(D, "privateSetter", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); D.protectedMethod = function () { }; Object.defineProperty(D, "protectedGetter", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(D, "protectedSetter", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); D.publicMethod = function () { }; Object.defineProperty(D, "publicGetter", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(D, "publicSetter", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return D; @@ -130,12 +130,12 @@ var E = /** @class */ (function () { E.prototype.method = function () { }; Object.defineProperty(E.prototype, "getter", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(E.prototype, "setter", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return E; diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier.js b/tests/baselines/reference/accessorParameterAccessibilityModifier.js index c2484d848c8ed..66a8ad7430501 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier.js +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier.js @@ -10,12 +10,12 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "X", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "X", { set: function (v2) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/accessorWithES3.js b/tests/baselines/reference/accessorWithES3.js index 36ea6317f08ba..5137754c845d1 100644 --- a/tests/baselines/reference/accessorWithES3.js +++ b/tests/baselines/reference/accessorWithES3.js @@ -29,7 +29,7 @@ var C = /** @class */ (function () { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -40,7 +40,7 @@ var D = /** @class */ (function () { Object.defineProperty(D.prototype, "x", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return D; diff --git a/tests/baselines/reference/accessorWithES5.js b/tests/baselines/reference/accessorWithES5.js index ccd2c3e7573d8..0f75d614de3e0 100644 --- a/tests/baselines/reference/accessorWithES5.js +++ b/tests/baselines/reference/accessorWithES5.js @@ -26,7 +26,7 @@ var C = /** @class */ (function () { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -37,7 +37,7 @@ var D = /** @class */ (function () { Object.defineProperty(D.prototype, "x", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return D; diff --git a/tests/baselines/reference/accessorWithInitializer.js b/tests/baselines/reference/accessorWithInitializer.js index a573e244f3b25..9fa2908855c36 100644 --- a/tests/baselines/reference/accessorWithInitializer.js +++ b/tests/baselines/reference/accessorWithInitializer.js @@ -12,14 +12,14 @@ var C = /** @class */ (function () { set: function (v) { if (v === void 0) { v = 0; } }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "X", { set: function (v2) { if (v2 === void 0) { v2 = 0; } }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/accessorWithLineTerminator.js b/tests/baselines/reference/accessorWithLineTerminator.js index 51310c101a8a3..ca521c6fe3822 100644 --- a/tests/baselines/reference/accessorWithLineTerminator.js +++ b/tests/baselines/reference/accessorWithLineTerminator.js @@ -14,7 +14,7 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "x", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.js b/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.js index fa68ac3e0056f..5545ea379db2a 100644 --- a/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.js +++ b/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.js @@ -41,7 +41,7 @@ var C = /** @class */ (function () { }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -55,7 +55,7 @@ var D = /** @class */ (function () { }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return D; @@ -69,7 +69,7 @@ var E = /** @class */ (function () { }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return E; @@ -83,7 +83,7 @@ var F = /** @class */ (function () { }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return F; diff --git a/tests/baselines/reference/accessorWithRestParam.js b/tests/baselines/reference/accessorWithRestParam.js index 0ba0ebc062f4d..c9afc192f5064 100644 --- a/tests/baselines/reference/accessorWithRestParam.js +++ b/tests/baselines/reference/accessorWithRestParam.js @@ -15,7 +15,7 @@ var C = /** @class */ (function () { v[_i] = arguments[_i]; } }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "X", { @@ -25,7 +25,7 @@ var C = /** @class */ (function () { v2[_i] = arguments[_i]; } }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/accessorsAreNotContextuallyTyped.js b/tests/baselines/reference/accessorsAreNotContextuallyTyped.js index 7ec27cbb9267a..171fce799b9dd 100644 --- a/tests/baselines/reference/accessorsAreNotContextuallyTyped.js +++ b/tests/baselines/reference/accessorsAreNotContextuallyTyped.js @@ -24,7 +24,7 @@ var C = /** @class */ (function () { }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/accessorsEmit.js b/tests/baselines/reference/accessorsEmit.js index dc2f24f076b66..46c35a643d5f2 100644 --- a/tests/baselines/reference/accessorsEmit.js +++ b/tests/baselines/reference/accessorsEmit.js @@ -29,7 +29,7 @@ var Test = /** @class */ (function () { var x = 1; return null; }, - enumerable: true, + enumerable: false, configurable: true }); return Test; @@ -42,7 +42,7 @@ var Test2 = /** @class */ (function () { var x = 1; return null; }, - enumerable: true, + enumerable: false, configurable: true }); return Test2; diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.js b/tests/baselines/reference/accessorsNotAllowedInES3.js index fa3eb8e7b8d74..ec37d8b02de54 100644 --- a/tests/baselines/reference/accessorsNotAllowedInES3.js +++ b/tests/baselines/reference/accessorsNotAllowedInES3.js @@ -11,7 +11,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "x", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/accessorsOverrideProperty7.js b/tests/baselines/reference/accessorsOverrideProperty7.js index 5c5b0de250708..938bae0337405 100644 --- a/tests/baselines/reference/accessorsOverrideProperty7.js +++ b/tests/baselines/reference/accessorsOverrideProperty7.js @@ -40,7 +40,7 @@ var B = /** @class */ (function (_super) { Object.defineProperty(B.prototype, "p", { get: function () { return 'oh no'; } // error , - enumerable: true, + enumerable: false, configurable: true }); return B; diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js index 11d45b206432b..da28ba4f65303 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js @@ -20,25 +20,25 @@ var LanguageSpec_section_4_5_error_cases = /** @class */ (function () { Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedSetter_SetterFirst", { get: function () { return ""; }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedSetter_SetterLast", { get: function () { return ""; }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedGetter_GetterFirst", { get: function () { return ""; }, set: function (aStr) { aStr = 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedGetter_GetterLast", { get: function () { return ""; }, set: function (aStr) { aStr = 0; }, - enumerable: true, + enumerable: false, configurable: true }); return LanguageSpec_section_4_5_error_cases; diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js index 9be63d5e41a15..9d0a9689e05e2 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -56,37 +56,37 @@ var LanguageSpec_section_4_5_inference = /** @class */ (function () { Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredGetterFromSetterAnnotation", { get: function () { return new B(); }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredGetterFromSetterAnnotation_GetterFirst", { get: function () { return new B(); }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredFromGetter", { get: function () { return new B(); }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredFromGetter_SetterFirst", { get: function () { return new B(); }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredSetterFromGetterAnnotation", { get: function () { return new B(); }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredSetterFromGetterAnnotation_GetterFirst", { get: function () { return new B(); }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return LanguageSpec_section_4_5_inference; diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index 107466601d327..af28b9ce82946 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -75,7 +75,7 @@ var C2 = /** @class */ (function () { set: function (x) { x = moduleA; }, - enumerable: true, + enumerable: false, configurable: true }); return C2; diff --git a/tests/baselines/reference/aliasUsedAsNameValue.js b/tests/baselines/reference/aliasUsedAsNameValue.js index 168567eb80fac..0f23419a930a4 100644 --- a/tests/baselines/reference/aliasUsedAsNameValue.js +++ b/tests/baselines/reference/aliasUsedAsNameValue.js @@ -21,6 +21,7 @@ export var a = function () { //// [aliasUsedAsNameValue_0.js] "use strict"; exports.__esModule = true; +exports.id = void 0; //// [aliasUsedAsNameValue_1.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/ambientShorthand_reExport.js b/tests/baselines/reference/ambientShorthand_reExport.js index 6842d0f75541f..a9fef57c1c690 100644 --- a/tests/baselines/reference/ambientShorthand_reExport.js +++ b/tests/baselines/reference/ambientShorthand_reExport.js @@ -18,16 +18,30 @@ x($); //// [reExportX.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var jquery_1 = require("jquery"); -exports.x = jquery_1.x; +__createBinding(exports, jquery_1, "x"); //// [reExportAll.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("jquery")); +__exportStar(require("jquery"), exports); //// [reExportUser.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/anyIdenticalToItself.js b/tests/baselines/reference/anyIdenticalToItself.js index d88abadeed1be..6ec3d0d43e619 100644 --- a/tests/baselines/reference/anyIdenticalToItself.js +++ b/tests/baselines/reference/anyIdenticalToItself.js @@ -24,7 +24,7 @@ var C = /** @class */ (function () { }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 392e104e6cd2a..1f2c02120cc5c 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -1,20 +1,20 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "3.8"; + const versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -383,29 +383,30 @@ declare namespace ts { JSDocSignature = 305, JSDocTag = 306, JSDocAugmentsTag = 307, - JSDocAuthorTag = 308, - JSDocClassTag = 309, - JSDocPublicTag = 310, - JSDocPrivateTag = 311, - JSDocProtectedTag = 312, - JSDocReadonlyTag = 313, - JSDocCallbackTag = 314, - JSDocEnumTag = 315, - JSDocParameterTag = 316, - JSDocReturnTag = 317, - JSDocThisTag = 318, - JSDocTypeTag = 319, - JSDocTemplateTag = 320, - JSDocTypedefTag = 321, - JSDocPropertyTag = 322, - SyntaxList = 323, - NotEmittedStatement = 324, - PartiallyEmittedExpression = 325, - CommaListExpression = 326, - MergeDeclarationMarker = 327, - EndOfDeclarationMarker = 328, - SyntheticReferenceExpression = 329, - Count = 330, + JSDocImplementsTag = 308, + JSDocAuthorTag = 309, + JSDocClassTag = 310, + JSDocPublicTag = 311, + JSDocPrivateTag = 312, + JSDocProtectedTag = 313, + JSDocReadonlyTag = 314, + JSDocCallbackTag = 315, + JSDocEnumTag = 316, + JSDocParameterTag = 317, + JSDocReturnTag = 318, + JSDocThisTag = 319, + JSDocTypeTag = 320, + JSDocTemplateTag = 321, + JSDocTypedefTag = 322, + JSDocPropertyTag = 323, + SyntaxList = 324, + NotEmittedStatement = 325, + PartiallyEmittedExpression = 326, + CommaListExpression = 327, + MergeDeclarationMarker = 328, + EndOfDeclarationMarker = 329, + SyntheticReferenceExpression = 330, + Count = 331, FirstAssignment = 62, LastAssignment = 74, FirstCompoundAssignment = 63, @@ -434,9 +435,9 @@ declare namespace ts { LastStatement = 241, FirstNode = 153, FirstJSDocNode = 294, - LastJSDocNode = 322, + LastJSDocNode = 323, FirstJSDocTagNode = 306, - LastJSDocTagNode = 322, + LastJSDocTagNode = 323, } export enum NodeFlags { None = 0, @@ -1145,7 +1146,7 @@ declare namespace ts { } export interface ExpressionWithTypeArguments extends NodeWithTypeArguments { kind: SyntaxKind.ExpressionWithTypeArguments; - parent: HeritageClause | JSDocAugmentsTag; + parent: HeritageClause | JSDocAugmentsTag | JSDocImplementsTag; expression: LeftHandSideExpression; } export interface NewExpression extends PrimaryExpression, Declaration { @@ -1638,6 +1639,12 @@ declare namespace ts { expression: Identifier | PropertyAccessEntityNameExpression; }; } + export interface JSDocImplementsTag extends JSDocTag { + kind: SyntaxKind.JSDocImplementsTag; + class: ExpressionWithTypeArguments & { + expression: Identifier | PropertyAccessEntityNameExpression; + }; + } export interface JSDocAuthorTag extends JSDocTag { kind: SyntaxKind.JSDocAuthorTag; } @@ -1729,10 +1736,9 @@ declare namespace ts { SwitchClause = 128, ArrayMutation = 256, Call = 512, - Referenced = 1024, - Shared = 2048, - PreFinally = 4096, - AfterFinally = 8192, + ReduceLabel = 1024, + Referenced = 2048, + Shared = 4096, Label = 12, Condition = 96 } @@ -1779,6 +1785,11 @@ declare namespace ts { node: CallExpression | BinaryExpression; antecedent: FlowNode; } + export interface FlowReduceLabel extends FlowNodeBase { + target: FlowLabel; + antecedents: FlowNode[]; + antecedent: FlowNode; + } export type FlowType = Type | IncompleteType; export interface IncompleteType { flags: TypeFlags; @@ -1951,6 +1962,7 @@ declare namespace ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; + getInstantiationCount(): number; getRelationCacheSizes(): { assignable: number; identity: number; @@ -2975,6 +2987,7 @@ declare namespace ts { readonly scoped: boolean; readonly text: string | ((node: EmitHelperUniqueNameCallback) => string); readonly priority?: number; + readonly dependencies?: EmitHelper[]; } export interface UnscopedEmitHelper extends EmitHelper { readonly scoped: false; @@ -3262,7 +3275,7 @@ declare namespace ts { readonly includeCompletionsWithInsertText?: boolean; readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ - readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; + readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; } @@ -3348,7 +3361,8 @@ declare namespace ts { isUnterminated(): boolean; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; + reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; + reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; scanJsxIdentifier(): SyntaxKind; scanJsxAttributeValue(): SyntaxKind; reScanJsxAttributeValue(): SyntaxKind; @@ -3512,6 +3526,8 @@ declare namespace ts { function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean; /** Gets the JSDoc augments tag for the node if present */ function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined; + /** Gets the JSDoc implements tags for the node if present */ + function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[]; /** Gets the JSDoc class tag for the node if present */ function getJSDocClassTag(node: Node): JSDocClassTag | undefined; /** Gets the JSDoc public tag for the node if present */ @@ -3553,7 +3569,9 @@ 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): readonly JSDocTag[]; - /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + /** Gets all JSDoc tags that match a specified predicate */ + function getAllJSDocTags(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]; + /** Gets all JSDoc tags of a specified kind */ function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[]; /** * Gets the effective type parameters. If the node was parsed in a @@ -3730,6 +3748,7 @@ declare namespace ts { function isJSDoc(node: Node): node is JSDoc; function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag; function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; + function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; function isJSDocClassTag(node: Node): node is JSDocClassTag; function isJSDocPublicTag(node: Node): node is JSDocPublicTag; function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag; @@ -3791,6 +3810,8 @@ declare namespace ts { function isJSDocCommentContainingNode(node: Node): boolean; function isSetAccessor(node: Node): node is SetAccessorDeclaration; function isGetAccessor(node: Node): node is GetAccessorDeclaration; + /** True if has initializer node attached to it. */ + function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer; function isObjectLiteralElement(node: Node): node is ObjectLiteralElement; function isStringLiteralLike(node: Node): node is StringLiteralLike; } @@ -6259,6 +6280,16 @@ declare namespace ts.server.protocol { * Contains extra information that plugin can include to be passed on */ metadata?: unknown; + /** + * Exposes information about the performance of this request-response pair. + */ + performanceData?: PerformanceData; + } + interface PerformanceData { + /** + * Time spent updating the program graph, in milliseconds. + */ + updateGraphDurationMs?: number; } /** * Arguments for FileRequest messages. @@ -8520,6 +8551,8 @@ declare namespace ts.server.protocol { */ readonly includeAutomaticOptionalChainCompletions?: boolean; readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; + /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ + readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly lazyConfiguredProjectsFromExternalProject?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; @@ -9557,6 +9590,7 @@ declare namespace ts.server { private configurePlugin; private getSmartSelectionRange; private mapSelectionRange; + private getScriptInfoFromProjectService; private toProtocolCallHierarchyItem; private toProtocolCallHierarchyIncomingCall; private toProtocolCallHierarchyOutgoingCall; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index e96f9da251ccf..028810b82f401 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -1,20 +1,20 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "3.8"; + const versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -383,29 +383,30 @@ declare namespace ts { JSDocSignature = 305, JSDocTag = 306, JSDocAugmentsTag = 307, - JSDocAuthorTag = 308, - JSDocClassTag = 309, - JSDocPublicTag = 310, - JSDocPrivateTag = 311, - JSDocProtectedTag = 312, - JSDocReadonlyTag = 313, - JSDocCallbackTag = 314, - JSDocEnumTag = 315, - JSDocParameterTag = 316, - JSDocReturnTag = 317, - JSDocThisTag = 318, - JSDocTypeTag = 319, - JSDocTemplateTag = 320, - JSDocTypedefTag = 321, - JSDocPropertyTag = 322, - SyntaxList = 323, - NotEmittedStatement = 324, - PartiallyEmittedExpression = 325, - CommaListExpression = 326, - MergeDeclarationMarker = 327, - EndOfDeclarationMarker = 328, - SyntheticReferenceExpression = 329, - Count = 330, + JSDocImplementsTag = 308, + JSDocAuthorTag = 309, + JSDocClassTag = 310, + JSDocPublicTag = 311, + JSDocPrivateTag = 312, + JSDocProtectedTag = 313, + JSDocReadonlyTag = 314, + JSDocCallbackTag = 315, + JSDocEnumTag = 316, + JSDocParameterTag = 317, + JSDocReturnTag = 318, + JSDocThisTag = 319, + JSDocTypeTag = 320, + JSDocTemplateTag = 321, + JSDocTypedefTag = 322, + JSDocPropertyTag = 323, + SyntaxList = 324, + NotEmittedStatement = 325, + PartiallyEmittedExpression = 326, + CommaListExpression = 327, + MergeDeclarationMarker = 328, + EndOfDeclarationMarker = 329, + SyntheticReferenceExpression = 330, + Count = 331, FirstAssignment = 62, LastAssignment = 74, FirstCompoundAssignment = 63, @@ -434,9 +435,9 @@ declare namespace ts { LastStatement = 241, FirstNode = 153, FirstJSDocNode = 294, - LastJSDocNode = 322, + LastJSDocNode = 323, FirstJSDocTagNode = 306, - LastJSDocTagNode = 322, + LastJSDocTagNode = 323, } export enum NodeFlags { None = 0, @@ -1145,7 +1146,7 @@ declare namespace ts { } export interface ExpressionWithTypeArguments extends NodeWithTypeArguments { kind: SyntaxKind.ExpressionWithTypeArguments; - parent: HeritageClause | JSDocAugmentsTag; + parent: HeritageClause | JSDocAugmentsTag | JSDocImplementsTag; expression: LeftHandSideExpression; } export interface NewExpression extends PrimaryExpression, Declaration { @@ -1638,6 +1639,12 @@ declare namespace ts { expression: Identifier | PropertyAccessEntityNameExpression; }; } + export interface JSDocImplementsTag extends JSDocTag { + kind: SyntaxKind.JSDocImplementsTag; + class: ExpressionWithTypeArguments & { + expression: Identifier | PropertyAccessEntityNameExpression; + }; + } export interface JSDocAuthorTag extends JSDocTag { kind: SyntaxKind.JSDocAuthorTag; } @@ -1729,10 +1736,9 @@ declare namespace ts { SwitchClause = 128, ArrayMutation = 256, Call = 512, - Referenced = 1024, - Shared = 2048, - PreFinally = 4096, - AfterFinally = 8192, + ReduceLabel = 1024, + Referenced = 2048, + Shared = 4096, Label = 12, Condition = 96 } @@ -1779,6 +1785,11 @@ declare namespace ts { node: CallExpression | BinaryExpression; antecedent: FlowNode; } + export interface FlowReduceLabel extends FlowNodeBase { + target: FlowLabel; + antecedents: FlowNode[]; + antecedent: FlowNode; + } export type FlowType = Type | IncompleteType; export interface IncompleteType { flags: TypeFlags; @@ -1951,6 +1962,7 @@ declare namespace ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; + getInstantiationCount(): number; getRelationCacheSizes(): { assignable: number; identity: number; @@ -2975,6 +2987,7 @@ declare namespace ts { readonly scoped: boolean; readonly text: string | ((node: EmitHelperUniqueNameCallback) => string); readonly priority?: number; + readonly dependencies?: EmitHelper[]; } export interface UnscopedEmitHelper extends EmitHelper { readonly scoped: false; @@ -3262,7 +3275,7 @@ declare namespace ts { readonly includeCompletionsWithInsertText?: boolean; readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ - readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; + readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; } @@ -3348,7 +3361,8 @@ declare namespace ts { isUnterminated(): boolean; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; + reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; + reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; scanJsxIdentifier(): SyntaxKind; scanJsxAttributeValue(): SyntaxKind; reScanJsxAttributeValue(): SyntaxKind; @@ -3512,6 +3526,8 @@ declare namespace ts { function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean; /** Gets the JSDoc augments tag for the node if present */ function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined; + /** Gets the JSDoc implements tags for the node if present */ + function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[]; /** Gets the JSDoc class tag for the node if present */ function getJSDocClassTag(node: Node): JSDocClassTag | undefined; /** Gets the JSDoc public tag for the node if present */ @@ -3553,7 +3569,9 @@ 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): readonly JSDocTag[]; - /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + /** Gets all JSDoc tags that match a specified predicate */ + function getAllJSDocTags(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]; + /** Gets all JSDoc tags of a specified kind */ function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[]; /** * Gets the effective type parameters. If the node was parsed in a @@ -3730,6 +3748,7 @@ declare namespace ts { function isJSDoc(node: Node): node is JSDoc; function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag; function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; + function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; function isJSDocClassTag(node: Node): node is JSDocClassTag; function isJSDocPublicTag(node: Node): node is JSDocPublicTag; function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag; @@ -3791,6 +3810,8 @@ declare namespace ts { function isJSDocCommentContainingNode(node: Node): boolean; function isSetAccessor(node: Node): node is SetAccessorDeclaration; function isGetAccessor(node: Node): node is GetAccessorDeclaration; + /** True if has initializer node attached to it. */ + function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer; function isObjectLiteralElement(node: Node): node is ObjectLiteralElement; function isStringLiteralLike(node: Node): node is StringLiteralLike; } diff --git a/tests/baselines/reference/argumentExpressionContextualTyping.types b/tests/baselines/reference/argumentExpressionContextualTyping.types index 46ef3a3857027..a67b0b5e609f4 100644 --- a/tests/baselines/reference/argumentExpressionContextualTyping.types +++ b/tests/baselines/reference/argumentExpressionContextualTyping.types @@ -122,7 +122,7 @@ baz(array); // Error baz(["string", 1, true, ...array]); // Error >baz(["string", 1, true, ...array]) : void >baz : (x: [string, number, boolean]) => void ->["string", 1, true, ...array] : (string | number | boolean)[] +>["string", 1, true, ...array] : [string, number, true, ...(string | number | boolean)[]] >"string" : "string" >1 : 1 >true : true diff --git a/tests/baselines/reference/arrayAssignmentTest3.types b/tests/baselines/reference/arrayAssignmentTest3.types index ec1b5de51b27d..df87d9d7fc481 100644 --- a/tests/baselines/reference/arrayAssignmentTest3.types +++ b/tests/baselines/reference/arrayAssignmentTest3.types @@ -17,8 +17,8 @@ class a { var xx = new a(null, 7, new B()); ->xx : any ->new a(null, 7, new B()) : any +>xx : a +>new a(null, 7, new B()) : a >a : typeof a >null : null >7 : 7 diff --git a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.errors.txt b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.errors.txt index e2d047ac711c1..8c62ba2d6b783 100644 --- a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.errors.txt +++ b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.errors.txt @@ -7,9 +7,9 @@ tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionConte tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts(8,5): error TS2322: Type '[number, number, number, string]' is not assignable to type '[number, number, number]'. Types of property 'length' are incompatible. Type '4' is not assignable to type '3'. -tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts(14,5): error TS2322: Type '[number, number, number, ...number[]]' is not assignable to type '[number, number, number]'. +tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts(14,5): error TS2322: Type '[number, number, number, number, number, number]' is not assignable to type '[number, number, number]'. Types of property 'length' are incompatible. - Type 'number' is not assignable to type '3'. + Type '6' is not assignable to type '3'. ==== tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts (4 errors) ==== @@ -40,7 +40,7 @@ tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionConte var spr1 = [1, 2, 3, ...tup]; var spr2:[number, number, number] = [1, 2, 3, ...tup]; // Error ~~~~ -!!! error TS2322: Type '[number, number, number, ...number[]]' is not assignable to type '[number, number, number]'. +!!! error TS2322: Type '[number, number, number, number, number, number]' is not assignable to type '[number, number, number]'. !!! error TS2322: Types of property 'length' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type '3'. +!!! error TS2322: Type '6' is not assignable to type '3'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.types b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.types index 3c1a9b6ba722b..dc942ebb9d5e8 100644 --- a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.types +++ b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.types @@ -62,7 +62,7 @@ var spr1 = [1, 2, 3, ...tup]; var spr2:[number, number, number] = [1, 2, 3, ...tup]; // Error >spr2 : [number, number, number] ->[1, 2, 3, ...tup] : [number, number, number, ...number[]] +>[1, 2, 3, ...tup] : [number, number, number, number, number, number] >1 : 1 >2 : 2 >3 : 3 diff --git a/tests/baselines/reference/arrayLiterals3.errors.txt b/tests/baselines/reference/arrayLiterals3.errors.txt index 5f592b74f3ebc..7a7213dd30b3e 100644 --- a/tests/baselines/reference/arrayLiterals3.errors.txt +++ b/tests/baselines/reference/arrayLiterals3.errors.txt @@ -5,7 +5,6 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(11,51): erro tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(17,5): error TS2322: Type '[number, number, string, boolean]' is not assignable to type '[number, number]'. Types of property 'length' are incompatible. Type '4' is not assignable to type '2'. -tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(32,5): error TS2739: Type '(number[] | string[])[]' is missing the following properties from type 'tup': 0, 1 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(33,5): error TS2739: Type 'number[]' is missing the following properties from type '[number, number, number]': 0, 1, 2 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error TS2322: Type '(string | number)[]' is not assignable to type 'myArray'. The types returned by 'pop()' are incompatible between these types. @@ -13,7 +12,7 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error Type 'string' is not assignable to type 'Number'. -==== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts (8 errors) ==== +==== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts (7 errors) ==== // Each element expression in a non-empty array literal is processed as follows: // - If the array literal contains no spread elements, and if the array literal is contextually typed (section 4.19) // by a type T and T has a property with the numeric name N, where N is the index of the element expression in the array literal, @@ -58,8 +57,6 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error interface myArray extends Array { } interface myArray2 extends Array { } var c0: tup = [...temp2]; // Error - ~~ -!!! error TS2739: Type '(number[] | string[])[]' is missing the following properties from type 'tup': 0, 1 var c1: [number, number, number] = [...temp1]; // Error cannot assign number[] to [number, number, number] ~~ !!! error TS2739: Type 'number[]' is missing the following properties from type '[number, number, number]': 0, 1, 2 diff --git a/tests/baselines/reference/arrayLiterals3.types b/tests/baselines/reference/arrayLiterals3.types index 44845feae035a..ec2aab18322c8 100644 --- a/tests/baselines/reference/arrayLiterals3.types +++ b/tests/baselines/reference/arrayLiterals3.types @@ -71,7 +71,7 @@ interface myArray extends Array { } interface myArray2 extends Array { } var c0: tup = [...temp2]; // Error >c0 : tup ->[...temp2] : (number[] | string[])[] +>[...temp2] : [number[], string[]] >...temp2 : number[] | string[] >temp2 : [number[], string[]] diff --git a/tests/baselines/reference/assignmentCompatBug3.js b/tests/baselines/reference/assignmentCompatBug3.js index 0a080ff5da473..ac79938f9364a 100644 --- a/tests/baselines/reference/assignmentCompatBug3.js +++ b/tests/baselines/reference/assignmentCompatBug3.js @@ -44,7 +44,7 @@ var C = /** @class */ (function () { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/asyncGetter_es5.js b/tests/baselines/reference/asyncGetter_es5.js index 3e5faa41f35da..d063c0166770e 100644 --- a/tests/baselines/reference/asyncGetter_es5.js +++ b/tests/baselines/reference/asyncGetter_es5.js @@ -11,7 +11,7 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "foo", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/asyncSetter_es5.js b/tests/baselines/reference/asyncSetter_es5.js index c1f1295ae97c6..a49ee1c73c99c 100644 --- a/tests/baselines/reference/asyncSetter_es5.js +++ b/tests/baselines/reference/asyncSetter_es5.js @@ -11,7 +11,7 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "foo", { set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/awaitAndYieldInProperty.js b/tests/baselines/reference/awaitAndYieldInProperty.js index 73c04a612c2d0..1be0d297bb989 100644 --- a/tests/baselines/reference/awaitAndYieldInProperty.js +++ b/tests/baselines/reference/awaitAndYieldInProperty.js @@ -19,27 +19,31 @@ async function* test(x: Promise) { //// [awaitAndYieldInProperty.js] async function* test(x) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j; - class C { - constructor() { - this[_a] = await x; - this[_c] = yield 2; - } - } - _a = await x, _b = await x, _c = yield 1, _d = yield 3; - C[_b] = await x; - C[_d] = yield 4; - return _j = class { + var _a, _b, _c, _d, _e; + const C = /** @class */ (() => { + var _e, _f, _g, _h; + class C { constructor() { this[_e] = await x; this[_g] = yield 2; } + } + _e = await x, _f = await x, _g = yield 1, _h = yield 3; + C[_f] = await x; + C[_h] = yield 4; + return C; + })(); + return _e = class { + constructor() { + this[_a] = await x; + this[_c] = yield 2; + } }, - _e = await x, - _f = await x, - _g = yield 1, - _h = yield 3, - _j[_f] = await x, - _j[_h] = yield 4, - _j; + _a = await x, + _b = await x, + _c = yield 1, + _d = yield 3, + _e[_b] = await x, + _e[_d] = yield 4, + _e; } diff --git a/tests/baselines/reference/betterErrorForAccidentalCall.errors.txt b/tests/baselines/reference/betterErrorForAccidentalCall.errors.txt index 46b359017e0bd..7575fa2ca7e9e 100644 --- a/tests/baselines/reference/betterErrorForAccidentalCall.errors.txt +++ b/tests/baselines/reference/betterErrorForAccidentalCall.errors.txt @@ -27,20 +27,20 @@ tests/cases/compiler/betterErrorForAccidentalCall.ts(13,1): error TS2349: This e ~~~~~ !!! error TS2349: This expression is not callable. !!! error TS2349: Type 'String' has no call signatures. -!!! related TS2734 tests/cases/compiler/betterErrorForAccidentalCall.ts:7:1: It is highly likely that you are missing a semicolon. +!!! related TS2734 tests/cases/compiler/betterErrorForAccidentalCall.ts:7:1: Are you missing a semicolon? (1 as number).toString(); foo() ~~~~~ !!! error TS2349: This expression is not callable. !!! error TS2349: Type 'String' has no call signatures. -!!! related TS2734 tests/cases/compiler/betterErrorForAccidentalCall.ts:10:1: It is highly likely that you are missing a semicolon. +!!! related TS2734 tests/cases/compiler/betterErrorForAccidentalCall.ts:10:1: Are you missing a semicolon? (1 + 2).toString(); foo() ~~~~~ !!! error TS2349: This expression is not callable. !!! error TS2349: Type 'String' has no call signatures. -!!! related TS2734 tests/cases/compiler/betterErrorForAccidentalCall.ts:13:1: It is highly likely that you are missing a semicolon. +!!! related TS2734 tests/cases/compiler/betterErrorForAccidentalCall.ts:13:1: Are you missing a semicolon? (1).toString(); \ No newline at end of file diff --git a/tests/baselines/reference/bigintWithLib.types b/tests/baselines/reference/bigintWithLib.types index a1d79119cf6e5..6715dc70c3b2b 100644 --- a/tests/baselines/reference/bigintWithLib.types +++ b/tests/baselines/reference/bigintWithLib.types @@ -94,9 +94,9 @@ bigIntArray = new BigInt64Array([1n, 2n, 3n]); >3n : 3n bigIntArray = new BigInt64Array([1, 2, 3]); // should error ->bigIntArray = new BigInt64Array([1, 2, 3]) : any +>bigIntArray = new BigInt64Array([1, 2, 3]) : BigInt64Array >bigIntArray : BigInt64Array ->new BigInt64Array([1, 2, 3]) : any +>new BigInt64Array([1, 2, 3]) : BigInt64Array >BigInt64Array : BigInt64ArrayConstructor >[1, 2, 3] : number[] >1 : 1 @@ -174,9 +174,9 @@ bigUintArray = new BigUint64Array([1n, 2n, 3n]); >3n : 3n bigUintArray = new BigUint64Array([1, 2, 3]); // should error ->bigUintArray = new BigUint64Array([1, 2, 3]) : any +>bigUintArray = new BigUint64Array([1, 2, 3]) : BigUint64Array >bigUintArray : BigUint64Array ->new BigUint64Array([1, 2, 3]) : any +>new BigUint64Array([1, 2, 3]) : BigUint64Array >BigUint64Array : BigUint64ArrayConstructor >[1, 2, 3] : number[] >1 : 1 diff --git a/tests/baselines/reference/bigintWithoutLib.types b/tests/baselines/reference/bigintWithoutLib.types index 6881b53b7da12..24470aa45db6e 100644 --- a/tests/baselines/reference/bigintWithoutLib.types +++ b/tests/baselines/reference/bigintWithoutLib.types @@ -56,7 +56,7 @@ let stringVal: string = bigintVal.toString(); // should not error - bigintVal in >toString : () => string stringVal = bigintVal.toString(2); // should error - bigintVal inferred as {} ->stringVal = bigintVal.toString(2) : any +>stringVal = bigintVal.toString(2) : string >stringVal : string >bigintVal.toString(2) : string >bigintVal.toString : () => string diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.types b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.types index ca53002f949f7..28a718cb328be 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.types +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.types @@ -16,7 +16,7 @@ function foo(a: number) { >foo : { (): void; (): void; } foo(10); // not ok ->foo(10) : any +>foo(10) : void >foo : { (): void; (): void; } >10 : 10 } @@ -29,12 +29,12 @@ function foo(a: number) { >foo : { (): void; (): void; } foo(10); // not ok ->foo(10) : any +>foo(10) : void >foo : { (): void; (): void; } >10 : 10 } foo(10); // not ok ->foo(10) : any +>foo(10) : void >foo : { (): void; (): void; } >10 : 10 diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.types b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.types index 982ace6809c46..967ec902a16e4 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.types +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.types @@ -16,7 +16,7 @@ function foo(a: number) { >foo : { (): void; (): void; } foo(10); // not ok ->foo(10) : any +>foo(10) : void >foo : { (): void; (): void; } >10 : 10 } @@ -29,12 +29,12 @@ function foo(a: number) { >foo : { (): void; (): void; } foo(10);// not ok ->foo(10) : any +>foo(10) : void >foo : { (): void; (): void; } >10 : 10 } foo(10); // not ok ->foo(10) : any +>foo(10) : void >foo : { (): void; (): void; } >10 : 10 diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types index 9d5d0e19ebb64..0ce7d67b618f2 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types @@ -9,15 +9,15 @@ function f(x: T, y: U): T { return null; } >null : null var r1 = f(1, ''); ->r1 : any ->f(1, '') : any +>r1 : number +>f(1, '') : number >f : (x: T, y: U) => T >1 : 1 >'' : "" var r1b = f(1, ''); ->r1b : any ->f(1, '') : any +>r1b : number +>f(1, '') : number >f : (x: T, y: U) => T >1 : 1 >'' : "" @@ -30,15 +30,15 @@ var f2 = (x: T, y: U): T => { return null; } >null : null var r2 = f2(1, ''); ->r2 : any ->f2(1, '') : any +>r2 : number +>f2(1, '') : number >f2 : (x: T, y: U) => T >1 : 1 >'' : "" var r2b = f2(1, ''); ->r2b : any ->f2(1, '') : any +>r2b : number +>f2(1, '') : number >f2 : (x: T, y: U) => T >1 : 1 >'' : "" @@ -49,15 +49,15 @@ var f3: { (x: T, y: U): T; } >y : U var r3 = f3(1, ''); ->r3 : any ->f3(1, '') : any +>r3 : number +>f3(1, '') : number >f3 : (x: T, y: U) => T >1 : 1 >'' : "" var r3b = f3(1, ''); ->r3b : any ->f3(1, '') : any +>r3b : number +>f3(1, '') : number >f3 : (x: T, y: U) => T >1 : 1 >'' : "" @@ -75,8 +75,8 @@ class C { } } var r4 = (new C()).f(1, ''); ->r4 : any ->(new C()).f(1, '') : any +>r4 : number +>(new C()).f(1, '') : number >(new C()).f : (x: T, y: U) => T >(new C()) : C >new C() : C @@ -86,8 +86,8 @@ var r4 = (new C()).f(1, ''); >'' : "" var r4b = (new C()).f(1, ''); ->r4b : any ->(new C()).f(1, '') : any +>r4b : number +>(new C()).f(1, '') : number >(new C()).f : (x: T, y: U) => T >(new C()) : C >new C() : C @@ -106,8 +106,8 @@ var i: I; >i : I var r5 = i.f(1, ''); ->r5 : any ->i.f(1, '') : any +>r5 : number +>i.f(1, '') : number >i.f : (x: T, y: U) => T >i : I >f : (x: T, y: U) => T @@ -115,8 +115,8 @@ var r5 = i.f(1, ''); >'' : "" var r5b = i.f(1, ''); ->r5b : any ->i.f(1, '') : any +>r5b : number +>i.f(1, '') : number >i.f : (x: T, y: U) => T >i : I >f : (x: T, y: U) => T diff --git a/tests/baselines/reference/callHierarchyCrossFile.callHierarchy.txt b/tests/baselines/reference/callHierarchyCrossFile.callHierarchy.txt new file mode 100644 index 0000000000000..e301fbdf8b14d --- /dev/null +++ b/tests/baselines/reference/callHierarchyCrossFile.callHierarchy.txt @@ -0,0 +1,63 @@ +╭ name: createModelReference +├ kind: function +├ file: /a.ts +├ span: +│ ╭ /a.ts:1:1-1:42 +│ │ 1: export function createModelReference() {} +│ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +│ ╰ +├ selectionSpan: +│ ╭ /a.ts:1:17-1:37 +│ │ 1: export function createModelReference() {} +│ │ ^^^^^^^^^^^^^^^^^^^^ +│ ╰ +├ incoming: +│ ╭ from: +│ │ ╭ name: openElementsAtEditor +│ │ ├ kind: function +│ │ ├ file: /b.ts +│ │ ├ span: +│ │ │ ╭ /b.ts:2:1-4:2 +│ │ │ │ 2: function openElementsAtEditor() { +│ │ │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +│ │ │ │ 3: createModelReference(); +│ │ │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^ +│ │ │ │ 4: } +│ │ │ │ ^ +│ │ │ ╰ +│ │ ├ selectionSpan: +│ │ │ ╭ /b.ts:2:10-2:30 +│ │ │ │ 2: function openElementsAtEditor() { +│ │ │ │ ^^^^^^^^^^^^^^^^^^^^ +│ │ │ ╰ +│ │ ╰ incoming: none +│ ├ fromSpans: +│ │ ╭ /b.ts:3:3-3:23 +│ │ │ 3: createModelReference(); +│ │ │ ^^^^^^^^^^^^^^^^^^^^ +│ ╰ ╰ +│ ╭ from: +│ │ ╭ name: registerDefaultLanguageCommand +│ │ ├ kind: function +│ │ ├ file: /c.ts +│ │ ├ span: +│ │ │ ╭ /c.ts:2:1-4:2 +│ │ │ │ 2: function registerDefaultLanguageCommand() { +│ │ │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +│ │ │ │ 3: createModelReference(); +│ │ │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^ +│ │ │ │ 4: } +│ │ │ │ ^ +│ │ │ ╰ +│ │ ├ selectionSpan: +│ │ │ ╭ /c.ts:2:10-2:40 +│ │ │ │ 2: function registerDefaultLanguageCommand() { +│ │ │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +│ │ │ ╰ +│ │ ╰ incoming: none +│ ├ fromSpans: +│ │ ╭ /c.ts:3:3-3:23 +│ │ │ 3: createModelReference(); +│ │ │ ^^^^^^^^^^^^^^^^^^^^ +│ ╰ ╰ +╰ outgoing: none diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types index da2b23747a5ae..f0d875055337c 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types @@ -19,7 +19,7 @@ function foo() { >"expects boolean instead of string" : "expects boolean instead of string" test(true); // should error - string expected ->test(true) : any +>test(true) : void >test : I1 >true : true } diff --git a/tests/baselines/reference/callWithMissingVoid.types b/tests/baselines/reference/callWithMissingVoid.types index 4fbcbbf5d1b8f..6f9638daae567 100644 --- a/tests/baselines/reference/callWithMissingVoid.types +++ b/tests/baselines/reference/callWithMissingVoid.types @@ -99,7 +99,7 @@ new MyPromise(resolve => resolve()); // no error new MyPromise(resolve => resolve()); // error, `any` arguments cannot be omitted >new MyPromise(resolve => resolve()) : MyPromise >MyPromise : typeof MyPromise ->resolve => resolve() : (resolve: (value: any) => void) => any +>resolve => resolve() : (resolve: (value: any) => void) => void >resolve : (value: any) => void >resolve() : void >resolve : (value: any) => void @@ -107,7 +107,7 @@ new MyPromise(resolve => resolve()); // error, `any` arguments cannot be om new MyPromise(resolve => resolve()); // error, `unknown` arguments cannot be omitted >new MyPromise(resolve => resolve()) : MyPromise >MyPromise : typeof MyPromise ->resolve => resolve() : (resolve: (value: unknown) => void) => any +>resolve => resolve() : (resolve: (value: unknown) => void) => void >resolve : (value: unknown) => void >resolve() : void >resolve : (value: unknown) => void @@ -115,7 +115,7 @@ new MyPromise(resolve => resolve()); // error, `unknown` arguments cann new MyPromise(resolve => resolve()); // error, `never` arguments cannot be omitted >new MyPromise(resolve => resolve()) : MyPromise >MyPromise : typeof MyPromise ->resolve => resolve() : (resolve: (value: never) => void) => any +>resolve => resolve() : (resolve: (value: never) => void) => void >resolve : (value: never) => void >resolve() : void >resolve : (value: never) => void @@ -234,7 +234,7 @@ declare function call( >args : TS call((x: number, y: number) => x + y) // error ->call((x: number, y: number) => x + y) : any +>call((x: number, y: number) => x + y) : void >call : (handler: (...args: TS) => unknown, ...args: TS) => void >(x: number, y: number) => x + y : (x: number, y: number) => number >x : number diff --git a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.types b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.types index 29d4ea5ec4b22..557c48e49e30b 100644 --- a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.types +++ b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.types @@ -3,7 +3,7 @@ function f() { } >f : () => void f(); ->f() : any +>f() : void >f : () => void f(); @@ -11,6 +11,6 @@ f(); >f : () => void f(); ->f() : any +>f() : void >f : () => void diff --git a/tests/baselines/reference/capturedParametersInInitializers2.js b/tests/baselines/reference/capturedParametersInInitializers2.js index 26b01dbab9a5e..53d5da5d44532 100644 --- a/tests/baselines/reference/capturedParametersInInitializers2.js +++ b/tests/baselines/reference/capturedParametersInInitializers2.js @@ -22,7 +22,7 @@ function foo(y, x, z) { } Object.defineProperty(class_1.prototype, x, { get: function () { return x; }, - enumerable: true, + enumerable: false, configurable: true }); class_1.prototype[z] = function () { return z; }; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt index 2e39f19d86ad3..777130d8893b6 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt @@ -1,7 +1,8 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,64): error TS2741: Property 'z' is missing in type 'B' but required in type 'C'. +tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,81): error TS2739: Type 'A' is missing the following properties from type 'C': z, y -==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts (1 errors) ==== +==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts (2 errors) ==== class Chain { constructor(public value: T) { } then(cb: (x: T) => S): Chain { @@ -24,4 +25,7 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParamete ~~~~~ !!! error TS2741: Property 'z' is missing in type 'B' but required in type 'C'. !!! related TS2728 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:15:5: 'z' is declared here. +!!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. + ~~~~~ +!!! error TS2739: Type 'A' is missing the following properties from type 'C': z, y !!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.symbols b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.symbols index c4a3f7b5f4d77..164005d035c32 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.symbols +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.symbols @@ -46,6 +46,7 @@ class C extends B { // Ok to go down the chain, but error to try to climb back up (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); +>(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then : Symbol(Chain.then, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 1, 36)) >(new Chain(new A)).then(a => new B).then(b => new C).then : Symbol(Chain.then, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 1, 36)) >(new Chain(new A)).then(a => new B).then : Symbol(Chain.then, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 1, 36)) >(new Chain(new A)).then : Symbol(Chain.then, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 1, 36)) @@ -60,6 +61,7 @@ class C extends B { >then : Symbol(Chain.then, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 1, 36)) >c : Symbol(c, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 18, 58)) >B : Symbol(B, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 9, 1)) +>then : Symbol(Chain.then, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 1, 36)) >b : Symbol(b, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 18, 75)) >A : Symbol(A, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 5, 1)) diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types index 3716b9b56f1d5..d6712329fc42f 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types @@ -38,9 +38,9 @@ class C extends B { // Ok to go down the chain, but error to try to climb back up (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); ->(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A) : any ->(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then : any ->(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B) : any +>(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A) : Chain +>(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then : (cb: (x: C) => S) => Chain +>(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B) : Chain >(new Chain(new A)).then(a => new B).then(b => new C).then : (cb: (x: C) => S) => Chain >(new Chain(new A)).then(a => new B).then(b => new C) : Chain >(new Chain(new A)).then(a => new B).then : (cb: (x: B) => S) => Chain @@ -66,9 +66,9 @@ class C extends B { >c : C >new B : B >B : typeof B ->then : any ->b => new A : (b: any) => A ->b : any +>then : (cb: (x: C) => S) => Chain +>b => new A : (b: C) => A +>b : C >new A : A >A : typeof A diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types index 59627a5f620df..91b0d4fcb37cd 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types @@ -18,7 +18,7 @@ class Chain { // Ok to go down the chain, but error to climb up the chain (new Chain(t)).then(tt => s).then(ss => t); ->(new Chain(t)).then(tt => s).then(ss => t) : any +>(new Chain(t)).then(tt => s).then(ss => t) : Chain >(new Chain(t)).then(tt => s).then : (cb: (x: S) => S) => Chain >(new Chain(t)).then(tt => s) : Chain >(new Chain(t)).then : (cb: (x: T) => S) => Chain @@ -37,7 +37,7 @@ class Chain { // But error to try to climb up the chain (new Chain(s)).then(ss => t); ->(new Chain(s)).then(ss => t) : any +>(new Chain(s)).then(ss => t) : Chain >(new Chain(s)).then : (cb: (x: S) => S) => Chain >(new Chain(s)) : Chain >new Chain(s) : Chain diff --git a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.errors.txt b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.errors.txt index 3d1051fdfd441..a94d8f7a3ba36 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.errors.txt @@ -4,10 +4,11 @@ tests/cases/conformance/jsdoc/0.js(11,20): error TS2322: Type '"lol"' is not ass tests/cases/conformance/jsdoc/0.js(13,15): error TS2322: Type '"0"' is not assignable to type 'number'. tests/cases/conformance/jsdoc/0.js(15,3): error TS2322: Type 'undefined' is not assignable to type 'string'. tests/cases/conformance/jsdoc/0.js(19,5): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/jsdoc/0.js(22,5): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/conformance/jsdoc/0.js(22,22): error TS2345: Argument of type '"0"' is not assignable to parameter of type 'number'. -==== tests/cases/conformance/jsdoc/0.js (7 errors) ==== +==== tests/cases/conformance/jsdoc/0.js (8 errors) ==== // @ts-check var lol; const obj = { @@ -42,5 +43,7 @@ tests/cases/conformance/jsdoc/0.js(22,22): error TS2345: Argument of type '"0"' /** @type {string} */ var s1 = obj.method2("0"); + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. ~~~ !!! error TS2345: Argument of type '"0"' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.types b/tests/baselines/reference/checkJsxChildrenProperty13.types index da159a74aa0e2..0e9542845fe2d 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.types +++ b/tests/baselines/reference/checkJsxChildrenProperty13.types @@ -27,9 +27,9 @@ class Button extends React.Component { >(
Hello World
) : JSX.Element >
Hello World
: JSX.Element >InnerButton : typeof InnerButton ->this.props : ButtonProp & { children?: React.ReactNode; } +>this.props : ButtonProp & { children?: string | number | boolean | {} | React.ReactElement | (string | number | boolean | any[] | React.ReactElement)[] | undefined; } >this : this ->props : ButtonProp & { children?: React.ReactNode; } +>props : ButtonProp & { children?: string | number | boolean | {} | React.ReactElement | (string | number | boolean | any[] | React.ReactElement)[] | undefined; } >children : string
Hello World
diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt index b289fb97d2bba..23b6b7287147d 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt @@ -71,4 +71,5 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2746: This JSX tag's 'childr !!! error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
My Div
My Div
- ; \ No newline at end of file + ; + \ No newline at end of file diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.js b/tests/baselines/reference/checkJsxChildrenProperty2.js index dd92bb5dba899..1320766b89aca 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty2.js +++ b/tests/baselines/reference/checkJsxChildrenProperty2.js @@ -50,7 +50,8 @@ let k5 =
My Div
My Div
-
; + ; + //// [file.jsx] "use strict"; diff --git a/tests/baselines/reference/checkJsxChildrenProperty3.types b/tests/baselines/reference/checkJsxChildrenProperty3.types index 2d4380a197531..f2ed3dc8fd00a 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty3.types +++ b/tests/baselines/reference/checkJsxChildrenProperty3.types @@ -31,11 +31,11 @@ class FetchUser extends React.Component { ? this.props.children(this.state.result) >this.props.children(this.state.result) : JSX.Element ->this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement | any[])[]) +>this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement)[]) >this.props : IFetchUserProps & { children?: React.ReactNode; } >this : this >props : IFetchUserProps & { children?: React.ReactNode; } ->children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement | any[])[]) +>children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement)[]) >this.state.result : any >this.state : any >this : this diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt index 40eb1d77677f5..34bd218996483 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt @@ -1,8 +1,8 @@ tests/cases/conformance/jsx/file.tsx(24,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'? -tests/cases/conformance/jsx/file.tsx(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement | any[]'. - Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more. -tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement | any[]'. - Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more. +tests/cases/conformance/jsx/file.tsx(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. + Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props +tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. + Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props ==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== @@ -50,8 +50,8 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) } ~~~~~~~~~~~~~ -!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement | any[]'. -!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more. +!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. +!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props !!! related TS6212 tests/cases/conformance/jsx/file.tsx:36:15: Did you mean to call this expression? { user => ( ~~~~~~~~~ @@ -59,8 +59,8 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) } ~~~~~~~~~~~~~ -!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | ReactElement | any[]'. -!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'any[]': push, pop, concat, join, and 15 more. +!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. +!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props !!! related TS6212 tests/cases/conformance/jsx/file.tsx:39:15: Did you mean to call this expression? ); diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.types b/tests/baselines/reference/checkJsxChildrenProperty4.types index 4f753cf9f3b03..067e8f2611af6 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.types +++ b/tests/baselines/reference/checkJsxChildrenProperty4.types @@ -31,11 +31,11 @@ class FetchUser extends React.Component { ? this.props.children(this.state.result) >this.props.children(this.state.result) : JSX.Element ->this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement | any[])[]) +>this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement)[]) >this.props : IFetchUserProps & { children?: React.ReactNode; } >this : this >props : IFetchUserProps & { children?: React.ReactNode; } ->children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | React.ReactElement | any[])[]) +>children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement)[]) >this.state.result : any >this.state : any >this : this diff --git a/tests/baselines/reference/circularOptionalityRemoval.errors.txt b/tests/baselines/reference/circularOptionalityRemoval.errors.txt new file mode 100644 index 0000000000000..2b60b5b66213a --- /dev/null +++ b/tests/baselines/reference/circularOptionalityRemoval.errors.txt @@ -0,0 +1,32 @@ +tests/cases/compiler/circularOptionalityRemoval.ts(2,14): error TS2502: 'x' is referenced directly or indirectly in its own type annotation. +tests/cases/compiler/circularOptionalityRemoval.ts(2,38): error TS2372: Parameter 'x' cannot be referenced in its initializer. +tests/cases/compiler/circularOptionalityRemoval.ts(2,38): error TS2532: Object is possibly 'undefined'. +tests/cases/compiler/circularOptionalityRemoval.ts(2,46): error TS2372: Parameter 'x' cannot be referenced in its initializer. +tests/cases/compiler/circularOptionalityRemoval.ts(5,14): error TS1015: Parameter cannot have question mark and initializer. +tests/cases/compiler/circularOptionalityRemoval.ts(5,14): error TS2502: 'x' is referenced directly or indirectly in its own type annotation. +tests/cases/compiler/circularOptionalityRemoval.ts(5,27): error TS2304: Cannot find name 'someCondition'. +tests/cases/compiler/circularOptionalityRemoval.ts(5,54): error TS2372: Parameter 'x' cannot be referenced in its initializer. + + +==== tests/cases/compiler/circularOptionalityRemoval.ts (8 errors) ==== + // Constructed repro + function fn1(x: number | undefined = x > 0 ? x : 0) { } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2502: 'x' is referenced directly or indirectly in its own type annotation. + ~ +!!! error TS2372: Parameter 'x' cannot be referenced in its initializer. + ~ +!!! error TS2532: Object is possibly 'undefined'. + ~ +!!! error TS2372: Parameter 'x' cannot be referenced in its initializer. + + // Report from user + function fn2(x?: string = someCondition ? 'value1' : x) { } + ~ +!!! error TS1015: Parameter cannot have question mark and initializer. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2502: 'x' is referenced directly or indirectly in its own type annotation. + ~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'someCondition'. + ~ +!!! error TS2372: Parameter 'x' cannot be referenced in its initializer. \ No newline at end of file diff --git a/tests/baselines/reference/circularOptionalityRemoval.js b/tests/baselines/reference/circularOptionalityRemoval.js new file mode 100644 index 0000000000000..c584c2f3949f8 --- /dev/null +++ b/tests/baselines/reference/circularOptionalityRemoval.js @@ -0,0 +1,16 @@ +//// [circularOptionalityRemoval.ts] +// Constructed repro +function fn1(x: number | undefined = x > 0 ? x : 0) { } + +// Report from user +function fn2(x?: string = someCondition ? 'value1' : x) { } + +//// [circularOptionalityRemoval.js] +// Constructed repro +function fn1(x) { + if (x === void 0) { x = x > 0 ? x : 0; } +} +// Report from user +function fn2(x) { + if (x === void 0) { x = someCondition ? 'value1' : x; } +} diff --git a/tests/baselines/reference/circularOptionalityRemoval.symbols b/tests/baselines/reference/circularOptionalityRemoval.symbols new file mode 100644 index 0000000000000..06bfd9da771a6 --- /dev/null +++ b/tests/baselines/reference/circularOptionalityRemoval.symbols @@ -0,0 +1,14 @@ +=== tests/cases/compiler/circularOptionalityRemoval.ts === +// Constructed repro +function fn1(x: number | undefined = x > 0 ? x : 0) { } +>fn1 : Symbol(fn1, Decl(circularOptionalityRemoval.ts, 0, 0)) +>x : Symbol(x, Decl(circularOptionalityRemoval.ts, 1, 13)) +>x : Symbol(x, Decl(circularOptionalityRemoval.ts, 1, 13)) +>x : Symbol(x, Decl(circularOptionalityRemoval.ts, 1, 13)) + +// Report from user +function fn2(x?: string = someCondition ? 'value1' : x) { } +>fn2 : Symbol(fn2, Decl(circularOptionalityRemoval.ts, 1, 55)) +>x : Symbol(x, Decl(circularOptionalityRemoval.ts, 4, 13)) +>x : Symbol(x, Decl(circularOptionalityRemoval.ts, 4, 13)) + diff --git a/tests/baselines/reference/circularOptionalityRemoval.types b/tests/baselines/reference/circularOptionalityRemoval.types new file mode 100644 index 0000000000000..5783b24a6c379 --- /dev/null +++ b/tests/baselines/reference/circularOptionalityRemoval.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/circularOptionalityRemoval.ts === +// Constructed repro +function fn1(x: number | undefined = x > 0 ? x : 0) { } +>fn1 : (x?: number | undefined) => void +>x : number | undefined +>x > 0 ? x : 0 : number | undefined +>x > 0 : boolean +>x : number | undefined +>0 : 0 +>x : number | undefined +>0 : 0 + +// Report from user +function fn2(x?: string = someCondition ? 'value1' : x) { } +>fn2 : (x?: string | undefined) => void +>x : string | undefined +>someCondition ? 'value1' : x : string | undefined +>someCondition : any +>'value1' : "value1" +>x : string | undefined + diff --git a/tests/baselines/reference/classAbstractAccessor.js b/tests/baselines/reference/classAbstractAccessor.js index de6c15aa9df7b..209e89f6d8eb4 100644 --- a/tests/baselines/reference/classAbstractAccessor.js +++ b/tests/baselines/reference/classAbstractAccessor.js @@ -14,13 +14,13 @@ var A = /** @class */ (function () { Object.defineProperty(A.prototype, "aa", { get: function () { return 1; } // error , - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(A.prototype, "bb", { set: function (x) { } // error , - enumerable: true, + enumerable: false, configurable: true }); return A; diff --git a/tests/baselines/reference/classCanExtendConstructorFunction.types b/tests/baselines/reference/classCanExtendConstructorFunction.types index d2de5468efd0c..b7a379caf1140 100644 --- a/tests/baselines/reference/classCanExtendConstructorFunction.types +++ b/tests/baselines/reference/classCanExtendConstructorFunction.types @@ -284,13 +284,13 @@ chowder.flavour.claim >claim : "ignorant" | "malicious" var errorNoArgs = new Chowder(); ->errorNoArgs : any ->new Chowder() : any +>errorNoArgs : Chowder +>new Chowder() : Chowder >Chowder : typeof Chowder var errorArgType = new Chowder(0); ->errorArgType : any ->new Chowder(0) : any +>errorArgType : Chowder +>new Chowder(0) : Chowder >Chowder : typeof Chowder >0 : 0 diff --git a/tests/baselines/reference/classDeclarationCheckUsedBeforeDefinitionInItself.js b/tests/baselines/reference/classDeclarationCheckUsedBeforeDefinitionInItself.js index b3a3d25a81935..347054aa347a9 100644 --- a/tests/baselines/reference/classDeclarationCheckUsedBeforeDefinitionInItself.js +++ b/tests/baselines/reference/classDeclarationCheckUsedBeforeDefinitionInItself.js @@ -4,6 +4,9 @@ class C3 { } //// [classDeclarationCheckUsedBeforeDefinitionInItself.js] -class C3 { -} -C3.intance = new C3(); // ok +const C3 = /** @class */ (() => { + class C3 { + } + C3.intance = new C3(); // ok + return C3; +})(); diff --git a/tests/baselines/reference/classInConvertedLoopES5.js b/tests/baselines/reference/classInConvertedLoopES5.js new file mode 100644 index 0000000000000..eb7f3d4ebf526 --- /dev/null +++ b/tests/baselines/reference/classInConvertedLoopES5.js @@ -0,0 +1,27 @@ +//// [classInConvertedLoopES5.ts] +const classesByRow: Record = {}; +for (const row of ['1', '2', '3', '4', '5']) { + class RowClass { + row = row; + static factory = () => new RowClass(); + } + + classesByRow[row] = RowClass; +} + +//// [classInConvertedLoopES5.js] +var classesByRow = {}; +var _loop_1 = function (row) { + var RowClass = /** @class */ (function () { + function RowClass() { + this.row = row; + } + RowClass.factory = function () { return new RowClass(); }; + return RowClass; + }()); + classesByRow[row] = RowClass; +}; +for (var _i = 0, _a = ['1', '2', '3', '4', '5']; _i < _a.length; _i++) { + var row = _a[_i]; + _loop_1(row); +} diff --git a/tests/baselines/reference/classInConvertedLoopES5.symbols b/tests/baselines/reference/classInConvertedLoopES5.symbols new file mode 100644 index 0000000000000..20a8a6a36a895 --- /dev/null +++ b/tests/baselines/reference/classInConvertedLoopES5.symbols @@ -0,0 +1,25 @@ +=== tests/cases/compiler/classInConvertedLoopES5.ts === +const classesByRow: Record = {}; +>classesByRow : Symbol(classesByRow, Decl(classInConvertedLoopES5.ts, 0, 5)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) + +for (const row of ['1', '2', '3', '4', '5']) { +>row : Symbol(row, Decl(classInConvertedLoopES5.ts, 1, 10)) + + class RowClass { +>RowClass : Symbol(RowClass, Decl(classInConvertedLoopES5.ts, 1, 46)) + + row = row; +>row : Symbol(RowClass.row, Decl(classInConvertedLoopES5.ts, 2, 18)) +>row : Symbol(row, Decl(classInConvertedLoopES5.ts, 1, 10)) + + static factory = () => new RowClass(); +>factory : Symbol(RowClass.factory, Decl(classInConvertedLoopES5.ts, 3, 14)) +>RowClass : Symbol(RowClass, Decl(classInConvertedLoopES5.ts, 1, 46)) + } + + classesByRow[row] = RowClass; +>classesByRow : Symbol(classesByRow, Decl(classInConvertedLoopES5.ts, 0, 5)) +>row : Symbol(row, Decl(classInConvertedLoopES5.ts, 1, 10)) +>RowClass : Symbol(RowClass, Decl(classInConvertedLoopES5.ts, 1, 46)) +} diff --git a/tests/baselines/reference/classInConvertedLoopES5.types b/tests/baselines/reference/classInConvertedLoopES5.types new file mode 100644 index 0000000000000..63a4ed8f359fc --- /dev/null +++ b/tests/baselines/reference/classInConvertedLoopES5.types @@ -0,0 +1,35 @@ +=== tests/cases/compiler/classInConvertedLoopES5.ts === +const classesByRow: Record = {}; +>classesByRow : Record +>{} : {} + +for (const row of ['1', '2', '3', '4', '5']) { +>row : string +>['1', '2', '3', '4', '5'] : string[] +>'1' : "1" +>'2' : "2" +>'3' : "3" +>'4' : "4" +>'5' : "5" + + class RowClass { +>RowClass : RowClass + + row = row; +>row : string +>row : string + + static factory = () => new RowClass(); +>factory : () => RowClass +>() => new RowClass() : () => RowClass +>new RowClass() : RowClass +>RowClass : typeof RowClass + } + + classesByRow[row] = RowClass; +>classesByRow[row] = RowClass : typeof RowClass +>classesByRow[row] : object +>classesByRow : Record +>row : string +>RowClass : typeof RowClass +} diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js index a0aa11d30d6be..721e1b42eb8c5 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js @@ -18,6 +18,7 @@ export class Test1 { //// [classMemberInitializerWithLamdaScoping3_0.js] "use strict"; exports.__esModule = true; +exports.field1 = void 0; //// [classMemberInitializerWithLamdaScoping3_1.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/classPropertyAsPrivate.js b/tests/baselines/reference/classPropertyAsPrivate.js index cdcea7e56afbb..08f1b091c89a4 100644 --- a/tests/baselines/reference/classPropertyAsPrivate.js +++ b/tests/baselines/reference/classPropertyAsPrivate.js @@ -30,14 +30,14 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "y", { get: function () { return null; }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { }; Object.defineProperty(C, "b", { get: function () { return null; }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); C.foo = function () { }; diff --git a/tests/baselines/reference/classPropertyAsProtected.js b/tests/baselines/reference/classPropertyAsProtected.js index 56848f6680eb5..7628adee04e06 100644 --- a/tests/baselines/reference/classPropertyAsProtected.js +++ b/tests/baselines/reference/classPropertyAsProtected.js @@ -30,14 +30,14 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "y", { get: function () { return null; }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { }; Object.defineProperty(C, "b", { get: function () { return null; }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); C.foo = function () { }; diff --git a/tests/baselines/reference/classPropertyIsPublicByDefault.js b/tests/baselines/reference/classPropertyIsPublicByDefault.js index f70ef694bb5a2..116f25a67e50d 100644 --- a/tests/baselines/reference/classPropertyIsPublicByDefault.js +++ b/tests/baselines/reference/classPropertyIsPublicByDefault.js @@ -29,14 +29,14 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "y", { get: function () { return null; }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { }; Object.defineProperty(C, "b", { get: function () { return null; }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); C.foo = function () { }; diff --git a/tests/baselines/reference/classStaticPropertyTypeGuard.js b/tests/baselines/reference/classStaticPropertyTypeGuard.js index f56d1c495122b..d833e812b3658 100644 --- a/tests/baselines/reference/classStaticPropertyTypeGuard.js +++ b/tests/baselines/reference/classStaticPropertyTypeGuard.js @@ -24,7 +24,7 @@ var A = /** @class */ (function () { } return A._a = 'helloworld'; }, - enumerable: true, + enumerable: false, configurable: true }); return A; diff --git a/tests/baselines/reference/classUsedBeforeInitializedVariables.js b/tests/baselines/reference/classUsedBeforeInitializedVariables.js index 3a3591cfdad97..eb3e7908ea5fe 100644 --- a/tests/baselines/reference/classUsedBeforeInitializedVariables.js +++ b/tests/baselines/reference/classUsedBeforeInitializedVariables.js @@ -74,14 +74,14 @@ var Test = /** @class */ (function () { get: function () { return true; }, - enumerable: true, + enumerable: false, configurable: true }), _b); this.withinObjectLiteralSetterName = (_c = {}, Object.defineProperty(_c, this.withinObjectLiteralSetterName, { set: function (_) { }, - enumerable: true, + enumerable: false, configurable: true }), _c); diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.types b/tests/baselines/reference/classWithBaseClassButNoConstructor.types index 1b8aa28818441..7c7af56a2d2ee 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.types +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.types @@ -19,8 +19,8 @@ var r = C; >C : typeof C var c = new C(); // error ->c : any ->new C() : any +>c : C +>new C() : C >C : typeof C var c2 = new C(1); // ok @@ -49,8 +49,8 @@ var r2 = D; >D : typeof D var d = new D(); // error ->d : any ->new D() : any +>d : D +>new D() : D >D : typeof D var d2 = new D(1); // ok @@ -73,8 +73,8 @@ var r3 = D2; >D2 : typeof D2 var d3 = new D(); // error ->d3 : any ->new D() : any +>d3 : D +>new D() : D >D : typeof D var d4 = new D(1); // ok @@ -96,8 +96,8 @@ var r4 = D3; >D3 : typeof D3 var d5 = new D(); // error ->d5 : any ->new D() : any +>d5 : D +>new D() : D >D : typeof D var d6 = new D(1); // ok diff --git a/tests/baselines/reference/classWithConstructors.types b/tests/baselines/reference/classWithConstructors.types index 07a5be543eb8c..dcac0e7e254f5 100644 --- a/tests/baselines/reference/classWithConstructors.types +++ b/tests/baselines/reference/classWithConstructors.types @@ -10,8 +10,8 @@ module NonGeneric { } var c = new C(); // error ->c : any ->new C() : any +>c : C +>new C() : C >C : typeof C var c2 = new C(''); // ok @@ -34,8 +34,8 @@ module NonGeneric { } var c3 = new C2(); // error ->c3 : any ->new C2() : any +>c3 : C2 +>new C2() : C2 >C2 : typeof C2 var c4 = new C2(''); // ok @@ -55,8 +55,8 @@ module NonGeneric { >C2 : C2 var d = new D(); // error ->d : any ->new D() : any +>d : D +>new D() : D >D : typeof D var d2 = new D(1); // ok @@ -83,8 +83,8 @@ module Generics { } var c = new C(); // error ->c : any ->new C() : any +>c : C +>new C() : C >C : typeof C var c2 = new C(''); // ok @@ -108,8 +108,8 @@ module Generics { } var c3 = new C2(); // error ->c3 : any ->new C2() : any +>c3 : C2 +>new C2() : C2 >C2 : typeof C2 var c4 = new C2(''); // ok @@ -130,8 +130,8 @@ module Generics { >C2 : C2 var d = new D(); // error ->d : any ->new D() : any +>d : D +>new D() : D >D : typeof D var d2 = new D(1); // ok diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js index 6a71bc490dce1..0ed9cefb24667 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js @@ -34,7 +34,7 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "z", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js index d04b6598b70f5..bd5bcd6589548 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js @@ -36,7 +36,7 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "z", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index a97208519aaf4..d2a181c5b8d9a 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -42,7 +42,7 @@ var C = /** @class */ (function () { Object.defineProperty(C, "x", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/classWithoutExplicitConstructor.types b/tests/baselines/reference/classWithoutExplicitConstructor.types index 4fdf46227bf50..682baa38e6e06 100644 --- a/tests/baselines/reference/classWithoutExplicitConstructor.types +++ b/tests/baselines/reference/classWithoutExplicitConstructor.types @@ -17,8 +17,8 @@ var c = new C(); >C : typeof C var c2 = new C(null); // error ->c2 : any ->new C(null) : any +>c2 : C +>new C(null) : C >C : typeof C >null : null @@ -40,8 +40,8 @@ var d = new D(); >D : typeof D var d2 = new D(null); // error ->d2 : any ->new D(null) : any +>d2 : D +>new D(null) : D >D : typeof D >null : null diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index 43d67d0cb1110..a3506a880354e 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -117,14 +117,14 @@ var a = /** @class */ (function () { }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(a, "p2", { get: function () { return { x: 30, y: 40 }; }, - enumerable: true, + enumerable: false, configurable: true }); a.d2 = function () { @@ -133,7 +133,7 @@ var a = /** @class */ (function () { get: function () { return "string"; }, - enumerable: true, + enumerable: false, configurable: true }); a.prototype.foo = function (ns) { diff --git a/tests/baselines/reference/cloduleTest2.types b/tests/baselines/reference/cloduleTest2.types index 2dbd5f13e953a..74204130c261c 100644 --- a/tests/baselines/reference/cloduleTest2.types +++ b/tests/baselines/reference/cloduleTest2.types @@ -14,8 +14,8 @@ module T1 { >bar : () => any var r = new m3d(); // error ->r : any ->new m3d() : any +>r : m3d +>new m3d() : m3d >m3d : typeof m3d } @@ -34,8 +34,8 @@ module T2 { >2 : 2 var r = new m3d(); // error ->r : any ->new m3d() : any +>r : m3d +>new m3d() : m3d >m3d : typeof m3d } @@ -123,8 +123,8 @@ declare class m3d { constructor(foo); foo(): void; static bar(); } >bar : () => any var r = new m3d(); // error ->r : any ->new m3d() : any +>r : m3d +>new m3d() : m3d >m3d : typeof m3d declare class m4d extends m3d { } @@ -132,7 +132,7 @@ declare class m4d extends m3d { } >m3d : m3d var r2 = new m4d(); // error ->r2 : any ->new m4d() : any +>r2 : m4d +>new m4d() : m4d >m4d : typeof m4d diff --git a/tests/baselines/reference/cloduleWithDuplicateMember1.js b/tests/baselines/reference/cloduleWithDuplicateMember1.js index b8178a3ca51cc..74c587713b1e3 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember1.js +++ b/tests/baselines/reference/cloduleWithDuplicateMember1.js @@ -21,14 +21,14 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "x", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "x", { get: function () { return ''; }, - enumerable: true, + enumerable: false, configurable: true }); C.foo = function () { }; diff --git a/tests/baselines/reference/cloduleWithDuplicateMember2.js b/tests/baselines/reference/cloduleWithDuplicateMember2.js index 62b2fa3c11d12..cab96adb3c550 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember2.js +++ b/tests/baselines/reference/cloduleWithDuplicateMember2.js @@ -17,12 +17,12 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "x", { set: function (y) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "y", { set: function (z) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js index e43eddd3a46ff..390bc80e51413 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js @@ -56,7 +56,7 @@ var M; set: function (M) { this.y = M_1.x; }, - enumerable: true, + enumerable: false, configurable: true }); return c; @@ -71,7 +71,7 @@ var M; var M = 10; this.y = M_2.x; }, - enumerable: true, + enumerable: false, configurable: true }); return d; @@ -85,7 +85,7 @@ var M; set: function (p) { this.y = M.x; }, - enumerable: true, + enumerable: false, configurable: true }); return e; @@ -100,7 +100,7 @@ var M; var M = 10; return M_3.x; }, - enumerable: true, + enumerable: false, configurable: true }); return f; @@ -114,7 +114,7 @@ var M; get: function () { return M.x; }, - enumerable: true, + enumerable: false, configurable: true }); return e; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index e6a09cea65bbe..2814b7dc2b4c4 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -68,7 +68,7 @@ var Foo = /** @class */ (function () { function _super() { } }, - enumerable: true, + enumerable: false, configurable: true }); return Foo; @@ -88,7 +88,7 @@ var b = /** @class */ (function (_super_1) { function _super() { } }, - enumerable: true, + enumerable: false, configurable: true }); return b; @@ -112,7 +112,7 @@ var c = /** @class */ (function (_super_1) { } }; }, - enumerable: true, + enumerable: false, configurable: true }); return c; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index 3fb07f807d42d..7aa17672460cd 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -58,7 +58,7 @@ var Foo = /** @class */ (function () { set: function (val) { var _super = 10; // No error }, - enumerable: true, + enumerable: false, configurable: true }); return Foo; @@ -76,7 +76,7 @@ var b = /** @class */ (function (_super_1) { set: function (val) { var _super = 10; // Should be error }, - enumerable: true, + enumerable: false, configurable: true }); return b; @@ -98,7 +98,7 @@ var c = /** @class */ (function (_super_1) { var _super = 10; // Should be error }; }, - enumerable: true, + enumerable: false, configurable: true }); return c; diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index f56a5bc170637..8b85ad6b9c595 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -94,7 +94,7 @@ var Foo = /** @class */ (function () { Object.defineProperty(Foo.prototype, "c", { set: function (_super) { }, - enumerable: true, + enumerable: false, configurable: true }); return Foo; @@ -124,7 +124,7 @@ var Foo2 = /** @class */ (function (_super_1) { Object.defineProperty(Foo2.prototype, "z", { set: function (_super) { }, - enumerable: true, + enumerable: false, configurable: true }); return Foo2; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js index ffa350a04eff1..fd782ed9273d5 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js @@ -67,7 +67,7 @@ var class1 = /** @class */ (function () { }; } }; }, - enumerable: true, + enumerable: false, configurable: true }); return class1; @@ -95,7 +95,7 @@ var class2 = /** @class */ (function () { }; } }; }, - enumerable: true, + enumerable: false, configurable: true }); return class2; diff --git a/tests/baselines/reference/commentOnClassAccessor1.js b/tests/baselines/reference/commentOnClassAccessor1.js index 3836bd8681866..9b381d749b7f8 100644 --- a/tests/baselines/reference/commentOnClassAccessor1.js +++ b/tests/baselines/reference/commentOnClassAccessor1.js @@ -15,7 +15,7 @@ var C = /** @class */ (function () { * @type {number} */ get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/commentOnClassAccessor2.js b/tests/baselines/reference/commentOnClassAccessor2.js index 5ab91eb6adc86..ec34f56f825f6 100644 --- a/tests/baselines/reference/commentOnClassAccessor2.js +++ b/tests/baselines/reference/commentOnClassAccessor2.js @@ -24,7 +24,7 @@ var C = /** @class */ (function () { * Setter. */ set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/commentsBeforeVariableStatement1.js b/tests/baselines/reference/commentsBeforeVariableStatement1.js index 9a06a3e7c228c..f0d6b3ad3ae1a 100644 --- a/tests/baselines/reference/commentsBeforeVariableStatement1.js +++ b/tests/baselines/reference/commentsBeforeVariableStatement1.js @@ -7,4 +7,6 @@ export var b: number; define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + /** b's comment*/ + exports.b = void 0; }); diff --git a/tests/baselines/reference/commentsClassMembers.js b/tests/baselines/reference/commentsClassMembers.js index bba4b44fc6023..e4f7e4bc5d2cd 100644 --- a/tests/baselines/reference/commentsClassMembers.js +++ b/tests/baselines/reference/commentsClassMembers.js @@ -238,7 +238,7 @@ var c1 = /** @class */ (function () { this.p1 = this.p2(value); } // trailing comment Setter , - enumerable: true, + enumerable: false, configurable: true }); /** sum with property*/ @@ -254,7 +254,7 @@ var c1 = /** @class */ (function () { set: function (/** this is value*/ value) { this.pp1 = this.pp2(value); }, - enumerable: true, + enumerable: false, configurable: true }); /** static sum with property*/ @@ -270,7 +270,7 @@ var c1 = /** @class */ (function () { set: function (/** this is value*/ value) { c1.s1 = c1.s2(value); } /*trailing comment 2 */ /*setter*/, - enumerable: true, + enumerable: false, configurable: true }); c1.prototype.nc_p2 = function (b) { @@ -283,7 +283,7 @@ var c1 = /** @class */ (function () { set: function (value) { this.nc_p1 = this.nc_p2(value); }, - enumerable: true, + enumerable: false, configurable: true }); c1.prototype.nc_pp2 = function (b) { @@ -296,7 +296,7 @@ var c1 = /** @class */ (function () { set: function (value) { this.nc_pp1 = this.nc_pp2(value); }, - enumerable: true, + enumerable: false, configurable: true }); c1.nc_s2 = function (b) { @@ -309,7 +309,7 @@ var c1 = /** @class */ (function () { set: function (value) { c1.nc_s1 = c1.nc_s2(value); }, - enumerable: true, + enumerable: false, configurable: true }); // sum with property @@ -325,7 +325,7 @@ var c1 = /** @class */ (function () { set: function (value) { this.a_p1 = this.a_p2(value); }, - enumerable: true, + enumerable: false, configurable: true }); // sum with property @@ -341,7 +341,7 @@ var c1 = /** @class */ (function () { set: function (value) { this.a_pp1 = this.a_pp2(value); }, - enumerable: true, + enumerable: false, configurable: true }); // static sum with property @@ -357,7 +357,7 @@ var c1 = /** @class */ (function () { set: function (value) { c1.a_s1 = c1.a_s2(value); }, - enumerable: true, + enumerable: false, configurable: true }); /** sum with property */ @@ -373,7 +373,7 @@ var c1 = /** @class */ (function () { set: function (value) { this.b_p1 = this.b_p2(value); }, - enumerable: true, + enumerable: false, configurable: true }); /** sum with property */ @@ -389,7 +389,7 @@ var c1 = /** @class */ (function () { set: function (value) { this.b_pp1 = this.b_pp2(value); }, - enumerable: true, + enumerable: false, configurable: true }); /** static sum with property */ @@ -408,7 +408,7 @@ var c1 = /** @class */ (function () { /** setter */ c1.b_s1 = c1.b_s2(value); }, - enumerable: true, + enumerable: false, configurable: true }); return c1; @@ -446,14 +446,14 @@ var cProperties = /** @class */ (function () { return this.val; } // trailing comment of only getter , - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(cProperties.prototype, "nc_p1", { get: function () { return this.val; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(cProperties.prototype, "p2", { @@ -461,14 +461,14 @@ var cProperties = /** @class */ (function () { set: function (value) { this.val = value; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(cProperties.prototype, "nc_p2", { set: function (value) { this.val = value; } /* trailing comment of setter only*/, - enumerable: true, + enumerable: false, configurable: true }); return cProperties; diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index 9779df371a2ec..0ea3bbbe42288 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -197,7 +197,7 @@ var c2 = /** @class */ (function () { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); c2.prototype.c2_nc_f1 = function () { @@ -206,7 +206,7 @@ var c2 = /** @class */ (function () { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); /** c2 f1*/ @@ -217,7 +217,7 @@ var c2 = /** @class */ (function () { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); c2.prototype.nc_f1 = function () { @@ -226,7 +226,7 @@ var c2 = /** @class */ (function () { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); return c2; @@ -244,7 +244,7 @@ var c3 = /** @class */ (function (_super) { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); c3.prototype.nc_f1 = function () { @@ -253,7 +253,7 @@ var c3 = /** @class */ (function (_super) { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); return c3; diff --git a/tests/baselines/reference/commentsOnRequireStatement.js b/tests/baselines/reference/commentsOnRequireStatement.js index 2a39206ecf3c0..7053651b6b149 100644 --- a/tests/baselines/reference/commentsOnRequireStatement.js +++ b/tests/baselines/reference/commentsOnRequireStatement.js @@ -32,7 +32,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); // blah // blah var _0_1 = require("./0"); -exports.subject = _0_1.subject; +Object.defineProperty(exports, "subject", { enumerable: true, get: function () { return _0_1.subject; } }); /* blah1 */ var _1_1 = require("./1"); -exports.subject1 = _1_1.subject1; +Object.defineProperty(exports, "subject1", { enumerable: true, get: function () { return _1_1.subject1; } }); diff --git a/tests/baselines/reference/commentsdoNotEmitComments.js b/tests/baselines/reference/commentsdoNotEmitComments.js index 865ae43c4de22..ec39b272ca1d7 100644 --- a/tests/baselines/reference/commentsdoNotEmitComments.js +++ b/tests/baselines/reference/commentsdoNotEmitComments.js @@ -113,7 +113,7 @@ var c = (function () { set: function (val) { this.b = val; }, - enumerable: true, + enumerable: false, configurable: true }); c.prototype.foo1 = function (aOrb) { diff --git a/tests/baselines/reference/commentsemitComments.js b/tests/baselines/reference/commentsemitComments.js index 8bfb1c59c9abd..d99759cdbe807 100644 --- a/tests/baselines/reference/commentsemitComments.js +++ b/tests/baselines/reference/commentsemitComments.js @@ -117,7 +117,7 @@ var c = /** @class */ (function () { set: function (val) { this.b = val; }, - enumerable: true, + enumerable: false, configurable: true }); /** overload implementation signature*/ diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index ac5e231b44d3c..cf2133f765cf6 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -89,7 +89,7 @@ var Thing = /** @class */ (function () { } Object.defineProperty(Thing.prototype, "Components", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); return Thing; @@ -109,7 +109,7 @@ var Foo = /** @class */ (function () { get: function () { return new GenericType(this); }, - enumerable: true, + enumerable: false, configurable: true }); Foo.prototype.populate = function () { @@ -119,7 +119,7 @@ var Foo = /** @class */ (function () { get: function () { return new BaseCollection(Derived.createEmpty); }, - enumerable: true, + enumerable: false, configurable: true }); return Foo; diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt index fde460bb0f424..3e9f17e4d205b 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt @@ -1,8 +1,9 @@ tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts(1,7): error TS2506: 'S18' is referenced directly or indirectly in its own base expression. tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts(4,10): error TS2554: Expected 0 arguments, but got 1. +tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts(4,16): error TS2339: Property 'S18' does not exist on type 'S18'. -==== tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts (2 errors) ==== +==== tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts (3 errors) ==== class S18 extends S18 ~~~ !!! error TS2506: 'S18' is referenced directly or indirectly in its own base expression. @@ -11,4 +12,6 @@ tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts(4,10): err (new S18(123)).S18 = 0; ~~~ !!! error TS2554: Expected 0 arguments, but got 1. + ~~~ +!!! error TS2339: Property 'S18' does not exist on type 'S18'. \ No newline at end of file diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.types b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.types index 0e03c6df8aa0d..445ac37884681 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.types +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.types @@ -8,8 +8,8 @@ class S18 extends S18 (new S18(123)).S18 = 0; >(new S18(123)).S18 = 0 : 0 >(new S18(123)).S18 : any ->(new S18(123)) : any ->new S18(123) : any +>(new S18(123)) : S18 +>new S18(123) : S18 >S18 : typeof S18 >123 : 123 >S18 : any diff --git a/tests/baselines/reference/complicatedPrivacy.js b/tests/baselines/reference/complicatedPrivacy.js index 94c00e32330a8..472a03fa4fbac 100644 --- a/tests/baselines/reference/complicatedPrivacy.js +++ b/tests/baselines/reference/complicatedPrivacy.js @@ -124,7 +124,7 @@ var m1; }, set: function (arg1) { }, - enumerable: true, + enumerable: false, configurable: true }); C2.prototype.f55 = function () { diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.js b/tests/baselines/reference/computedPropertyNames11_ES5.js index 78247461c140f..8123ba00c3539 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.js +++ b/tests/baselines/reference/computedPropertyNames11_ES5.js @@ -24,57 +24,57 @@ var a; var v = (_a = {}, Object.defineProperty(_a, s, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, n, { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, s + s, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, s + n, { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, +s, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, "", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, 0, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, a, { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, true, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, "hello bye", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, "hello " + a + " bye", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }), _a); diff --git a/tests/baselines/reference/computedPropertyNames12_ES6.js b/tests/baselines/reference/computedPropertyNames12_ES6.js index f56dbf287a8c6..7be7ee2313b29 100644 --- a/tests/baselines/reference/computedPropertyNames12_ES6.js +++ b/tests/baselines/reference/computedPropertyNames12_ES6.js @@ -17,16 +17,19 @@ class C { } //// [computedPropertyNames12_ES6.js] -var _a, _b, _c; var s; var n; var a; -class C { - constructor() { - this[_a] = n; - this[_b] = 2; - this[`hello bye`] = 0; +const C = /** @class */ (() => { + var _a, _b, _c; + class C { + constructor() { + this[_a] = n; + this[_b] = 2; + this[`hello bye`] = 0; + } } -} -_a = n, s + s, _b = s + n, +s, _c = `hello ${a} bye`; -C[_c] = 0; + _a = n, s + s, _b = s + n, +s, _c = `hello ${a} bye`; + C[_c] = 0; + return C; +})(); diff --git a/tests/baselines/reference/computedPropertyNames16_ES5.js b/tests/baselines/reference/computedPropertyNames16_ES5.js index 6a140aac782d1..1fec4a6f2eab4 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES5.js +++ b/tests/baselines/reference/computedPropertyNames16_ES5.js @@ -25,57 +25,57 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, s, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, n, { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, s + s, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, s + n, { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, +s, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, 0, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, a, { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, true, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "hello bye", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "hello " + a + " bye", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/computedPropertyNames17_ES5.js b/tests/baselines/reference/computedPropertyNames17_ES5.js index d49f5f78de72b..fff40d50edd81 100644 --- a/tests/baselines/reference/computedPropertyNames17_ES5.js +++ b/tests/baselines/reference/computedPropertyNames17_ES5.js @@ -16,32 +16,32 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, b, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, true, { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, [], { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, {}, { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, undefined, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, null, { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/computedPropertyNames1_ES5.js b/tests/baselines/reference/computedPropertyNames1_ES5.js index b93096f6821d4..a72090cc77906 100644 --- a/tests/baselines/reference/computedPropertyNames1_ES5.js +++ b/tests/baselines/reference/computedPropertyNames1_ES5.js @@ -9,13 +9,13 @@ var _a; var v = (_a = {}, Object.defineProperty(_a, 0 + 1, { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, 0 + 1, { set: function (v) { } //No error , - enumerable: true, + enumerable: false, configurable: true }), _a); diff --git a/tests/baselines/reference/computedPropertyNames2_ES5.js b/tests/baselines/reference/computedPropertyNames2_ES5.js index dc8fa061f0a59..051222f6dc641 100644 --- a/tests/baselines/reference/computedPropertyNames2_ES5.js +++ b/tests/baselines/reference/computedPropertyNames2_ES5.js @@ -20,22 +20,22 @@ var C = /** @class */ (function () { C[methodName] = function () { }; Object.defineProperty(C.prototype, accessorName, { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, accessorName, { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, accessorName, { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, accessorName, { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/computedPropertyNames36_ES5.js b/tests/baselines/reference/computedPropertyNames36_ES5.js index e13ef0a9e360d..f91acfd036c78 100644 --- a/tests/baselines/reference/computedPropertyNames36_ES5.js +++ b/tests/baselines/reference/computedPropertyNames36_ES5.js @@ -27,12 +27,12 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "get1", { // Computed properties get: function () { return new Foo; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "set1", { set: function (p) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/computedPropertyNames37_ES5.js b/tests/baselines/reference/computedPropertyNames37_ES5.js index 633c4c612087e..6bb490c85a480 100644 --- a/tests/baselines/reference/computedPropertyNames37_ES5.js +++ b/tests/baselines/reference/computedPropertyNames37_ES5.js @@ -27,12 +27,12 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "get1", { // Computed properties get: function () { return new Foo; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "set1", { set: function (p) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/computedPropertyNames38_ES5.js b/tests/baselines/reference/computedPropertyNames38_ES5.js index 00bbe51917fd3..d5114169215a6 100644 --- a/tests/baselines/reference/computedPropertyNames38_ES5.js +++ b/tests/baselines/reference/computedPropertyNames38_ES5.js @@ -27,12 +27,12 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, 1 << 6, { // Computed properties get: function () { return new Foo; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, 1 << 6, { set: function (p) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/computedPropertyNames39_ES5.js b/tests/baselines/reference/computedPropertyNames39_ES5.js index e4297f3768f50..7196b9334da9e 100644 --- a/tests/baselines/reference/computedPropertyNames39_ES5.js +++ b/tests/baselines/reference/computedPropertyNames39_ES5.js @@ -27,12 +27,12 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, 1 << 6, { // Computed properties get: function () { return new Foo; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, 1 << 6, { set: function (p) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/computedPropertyNames3_ES5.js b/tests/baselines/reference/computedPropertyNames3_ES5.js index a915d2a2542ea..535a841f6e7a8 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES5.js +++ b/tests/baselines/reference/computedPropertyNames3_ES5.js @@ -18,22 +18,22 @@ var C = /** @class */ (function () { C[function () { }] = function () { }; Object.defineProperty(C.prototype, delete id, { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, [0, 1], { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, id.toString(), { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index 77371c9a58b3d..4069ebc6d6a3b 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -49,12 +49,12 @@ var D = /** @class */ (function (_super) { Object.defineProperty(D.prototype, "get1", { // Computed properties get: function () { return new Foo; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(D.prototype, "set1", { set: function (p) { }, - enumerable: true, + enumerable: false, configurable: true }); return D; diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index 03b75f9e85d4e..378fa73c2170e 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -40,7 +40,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "get1", { get: function () { return new Foo; }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -52,7 +52,7 @@ var D = /** @class */ (function (_super) { } Object.defineProperty(D.prototype, "set1", { set: function (p) { }, - enumerable: true, + enumerable: false, configurable: true }); return D; diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index 35e6b1c85f86e..e93fe496eeec2 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -41,7 +41,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "get1", { get: function () { return new Foo; }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -53,7 +53,7 @@ var D = /** @class */ (function (_super) { } Object.defineProperty(D.prototype, "set1", { set: function (p) { }, - enumerable: true, + enumerable: false, configurable: true }); return D; diff --git a/tests/baselines/reference/computedPropertyNames49_ES5.js b/tests/baselines/reference/computedPropertyNames49_ES5.js index a1ec1540b6f4d..9353ddf4587aa 100644 --- a/tests/baselines/reference/computedPropertyNames49_ES5.js +++ b/tests/baselines/reference/computedPropertyNames49_ES5.js @@ -33,14 +33,14 @@ var x = (_a = { get: function () { throw 10; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, 1 + 1, { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, 1 + 1, { @@ -48,7 +48,7 @@ var x = (_a = { // just throw throw 10; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, "foo", { @@ -57,7 +57,7 @@ var x = (_a = { return 10; } }, - enumerable: true, + enumerable: false, configurable: true }), _a.p2 = 20, diff --git a/tests/baselines/reference/computedPropertyNames50_ES5.js b/tests/baselines/reference/computedPropertyNames50_ES5.js index 86653855b552a..b978330aa61ed 100644 --- a/tests/baselines/reference/computedPropertyNames50_ES5.js +++ b/tests/baselines/reference/computedPropertyNames50_ES5.js @@ -38,7 +38,7 @@ var x = (_a = { get: function () { throw 10; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, 1 + 1, { @@ -46,14 +46,14 @@ var x = (_a = { // just throw throw 10; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, 1 + 1, { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }), _a.p2 = 20, diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js index 30c2ce7cef5d1..4eb744ca77a1e 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js @@ -12,12 +12,12 @@ var C = /** @class */ (function () { C.prototype["" + ""] = function () { }; Object.defineProperty(C.prototype, "" + "", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "" + "", { set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js index 91b9d62b9f3dd..a5b452ebd93fa 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js @@ -12,12 +12,12 @@ var C = /** @class */ (function () { C["" + ""] = function () { }; Object.defineProperty(C, "" + "", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "" + "", { set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js index 0a7f9a7866a8e..d8ef8067b5112 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js @@ -13,12 +13,12 @@ var v = (_a = {}, _a["" + ""] = function () { }, Object.defineProperty(_a, "" + "", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, "" + "", { set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }), _a); diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.js b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.js index 1ee8511171150..d83c02499baee 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.js @@ -19,7 +19,7 @@ var C = /** @class */ (function () { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt index c8fbb2cc1dbba..e1b9e6800e002 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt +++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5.sourcemap.txt @@ -111,14 +111,14 @@ sourceFile:computedPropertyNamesSourceMap1_ES5.ts >>> }, 1 >^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^-> 1 > > 2 > } 1 >Emitted(10, 9) Source(7, 5) + SourceIndex(0) 2 >Emitted(10, 10) Source(7, 6) + SourceIndex(0) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1->^^^^^^^ diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js index 65dc560187875..1e0e93451786a 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js @@ -18,7 +18,7 @@ var v = (_a = {}, get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }), _a); diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt index f22de8aaeabd8..2072f305db345 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt @@ -91,14 +91,14 @@ sourceFile:computedPropertyNamesSourceMap2_ES5.ts >>> }, 1 >^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^-> 1 > > 2 > } 1 >Emitted(9, 9) Source(7, 2) + SourceIndex(0) 2 >Emitted(9, 10) Source(7, 3) + SourceIndex(0) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }), >>> _a); diff --git a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.js b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.js index 9f0407588a83e..83481347b43e1 100644 --- a/tests/baselines/reference/computedPropertyNamesWithStaticProperty.js +++ b/tests/baselines/reference/computedPropertyNamesWithStaticProperty.js @@ -11,13 +11,16 @@ class C { } //// [computedPropertyNamesWithStaticProperty.js] -class C { - get [C.staticProp]() { - return "hello"; +const C = /** @class */ (() => { + class C { + get [C.staticProp]() { + return "hello"; + } + set [C.staticProp](x) { + var y = x; + } + [C.staticProp]() { } } - set [C.staticProp](x) { - var y = x; - } - [C.staticProp]() { } -} -C.staticProp = 10; + C.staticProp = 10; + return C; +})(); diff --git a/tests/baselines/reference/constAssertions.js b/tests/baselines/reference/constAssertions.js index c994db7a2565e..1dc997a2c5819 100644 --- a/tests/baselines/reference/constAssertions.js +++ b/tests/baselines/reference/constAssertions.js @@ -143,7 +143,7 @@ declare let vc1: "abc"; declare let a1: readonly []; declare let a2: readonly [1, 2, 3]; declare let a3: readonly [10, "hello", true]; -declare let a4: readonly (1 | 2 | 3)[]; +declare let a4: readonly [1, 2, 3]; declare let a5: number[]; declare let a6: readonly number[]; declare let a7: number[]; diff --git a/tests/baselines/reference/constAssertions.types b/tests/baselines/reference/constAssertions.types index 8ee3797f3a26d..68b442e0c4456 100644 --- a/tests/baselines/reference/constAssertions.types +++ b/tests/baselines/reference/constAssertions.types @@ -125,9 +125,9 @@ let a3 = [10, 'hello', true] as const; >true : true let a4 = [...[1, 2, 3]] as const; ->a4 : readonly (1 | 2 | 3)[] ->[...[1, 2, 3]] as const : readonly (1 | 2 | 3)[] ->[...[1, 2, 3]] : readonly (1 | 2 | 3)[] +>a4 : readonly [1, 2, 3] +>[...[1, 2, 3]] as const : readonly [1, 2, 3] +>[...[1, 2, 3]] : readonly [1, 2, 3] >...[1, 2, 3] : 1 | 2 | 3 >[1, 2, 3] : readonly [1, 2, 3] >1 : 1 diff --git a/tests/baselines/reference/constEnumPreserveEmitReexport.js b/tests/baselines/reference/constEnumPreserveEmitReexport.js index 24914ee899b0d..1374703d95cef 100644 --- a/tests/baselines/reference/constEnumPreserveEmitReexport.js +++ b/tests/baselines/reference/constEnumPreserveEmitReexport.js @@ -27,6 +27,13 @@ var ConstEnum_1 = require("./ConstEnum"); exports["default"] = ConstEnum_1.MyConstEnum; //// [ReExport.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var ConstEnum_1 = require("./ConstEnum"); -exports["default"] = ConstEnum_1.MyConstEnum; +__createBinding(exports, ConstEnum_1, "MyConstEnum", "default"); diff --git a/tests/baselines/reference/constructorFunctions.types b/tests/baselines/reference/constructorFunctions.types index 05f3998a09c11..ba2fedb66438e 100644 --- a/tests/baselines/reference/constructorFunctions.types +++ b/tests/baselines/reference/constructorFunctions.types @@ -178,7 +178,7 @@ function C7(num) {} >num : number var c7_v1 = new C7(); ->c7_v1 : any ->new C7() : any +>c7_v1 : C7 +>new C7() : C7 >C7 : typeof C7 diff --git a/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.types b/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.types index bd93ce518e9b3..28c8b2c8e64b8 100644 --- a/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.types +++ b/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.types @@ -11,7 +11,7 @@ class D { } var d = new D(); ->d : any ->new D() : any +>d : D +>new D() : D >D : typeof D diff --git a/tests/baselines/reference/constructorOverloads1.errors.txt b/tests/baselines/reference/constructorOverloads1.errors.txt index 8bc0c1ecdbb26..0692c9ddda51f 100644 --- a/tests/baselines/reference/constructorOverloads1.errors.txt +++ b/tests/baselines/reference/constructorOverloads1.errors.txt @@ -9,9 +9,9 @@ tests/cases/compiler/constructorOverloads1.ts(16,18): error TS2769: No overload Argument of type 'Foo' is not assignable to parameter of type 'number'. tests/cases/compiler/constructorOverloads1.ts(17,18): error TS2769: No overload matches this call. Overload 1 of 2, '(s: string): Foo', gave the following error. - Argument of type 'any[]' is not assignable to parameter of type 'string'. + Argument of type 'Foo[]' is not assignable to parameter of type 'string'. Overload 2 of 2, '(n: number): Foo', gave the following error. - Argument of type 'any[]' is not assignable to parameter of type 'number'. + Argument of type 'Foo[]' is not assignable to parameter of type 'number'. ==== tests/cases/compiler/constructorOverloads1.ts (6 errors) ==== @@ -53,9 +53,9 @@ tests/cases/compiler/constructorOverloads1.ts(17,18): error TS2769: No overload ~~~~~~~~~~ !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 2, '(s: string): Foo', gave the following error. -!!! error TS2769: Argument of type 'any[]' is not assignable to parameter of type 'string'. +!!! error TS2769: Argument of type 'Foo[]' is not assignable to parameter of type 'string'. !!! error TS2769: Overload 2 of 2, '(n: number): Foo', gave the following error. -!!! error TS2769: Argument of type 'any[]' is not assignable to parameter of type 'number'. +!!! error TS2769: Argument of type 'Foo[]' is not assignable to parameter of type 'number'. f1.bar1(); f1.bar2(); diff --git a/tests/baselines/reference/constructorOverloads1.types b/tests/baselines/reference/constructorOverloads1.types index 40a806b9e71c6..312f52fc9b64b 100644 --- a/tests/baselines/reference/constructorOverloads1.types +++ b/tests/baselines/reference/constructorOverloads1.types @@ -36,19 +36,19 @@ var f2 = new Foo(0); >0 : 0 var f3 = new Foo(f1); ->f3 : any ->new Foo(f1) : any +>f3 : Foo +>new Foo(f1) : Foo >Foo : typeof Foo >f1 : Foo var f4 = new Foo([f1,f2,f3]); ->f4 : any ->new Foo([f1,f2,f3]) : any +>f4 : Foo +>new Foo([f1,f2,f3]) : Foo >Foo : typeof Foo ->[f1,f2,f3] : any[] +>[f1,f2,f3] : Foo[] >f1 : Foo >f2 : Foo ->f3 : any +>f3 : Foo f1.bar1(); >f1.bar1() : void diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index f59e2a2184f68..3872e27c5f3c9 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -499,7 +499,7 @@ var CLASS = /** @class */ (function () { } Object.defineProperty(CLASS.prototype, "Property", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); CLASS.prototype.Member = function () { diff --git a/tests/baselines/reference/contextualSignatureInstantiation.errors.txt b/tests/baselines/reference/contextualSignatureInstantiation.errors.txt index 6c14ad3c1503a..497937c7a4e82 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation.errors.txt +++ b/tests/baselines/reference/contextualSignatureInstantiation.errors.txt @@ -1,15 +1,18 @@ +tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts(19,13): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. Types of parameters 'y' and 'y' are incompatible. Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts(20,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts(20,23): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. Types of parameters 'y' and 'y' are incompatible. Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts(21,23): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: string, y: number) => string'. Types of parameters 'y' and 'y' are incompatible. Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts (3 errors) ==== +==== tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts (6 errors) ==== // TypeScript Spec, section 4.12.2: // If e is an expression of a function type that contains exactly one generic call signature and no other members, // and T is a function type with exactly one non - generic call signature and no other members, then any inferences @@ -29,16 +32,25 @@ tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatur var b: number | string; var b = foo(g); // Error, number and string are disjoint types + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +!!! related TS6203 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. ~ !!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. !!! error TS2345: Types of parameters 'y' and 'y' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. var b = bar(1, "one", g); // Error, number and string are disjoint types + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +!!! related TS6203 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. ~ !!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. !!! error TS2345: Types of parameters 'y' and 'y' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. var b = bar("one", 1, g); // Error, number and string are disjoint types + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +!!! related TS6203 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. ~ !!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: string, y: number) => string'. !!! error TS2345: Types of parameters 'y' and 'y' are incompatible. diff --git a/tests/baselines/reference/contextualSignatureInstantiation.types b/tests/baselines/reference/contextualSignatureInstantiation.types index ae5a40005377e..a98e9d95b56a7 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation.types +++ b/tests/baselines/reference/contextualSignatureInstantiation.types @@ -61,13 +61,13 @@ var b: number | string; var b = foo(g); // Error, number and string are disjoint types >b : string | number ->foo(g) : any +>foo(g) : unknown >foo : (cb: (x: number, y: string) => T) => T >g : (x: T, y: T) => T var b = bar(1, "one", g); // Error, number and string are disjoint types >b : string | number ->bar(1, "one", g) : any +>bar(1, "one", g) : unknown >bar : (x: T, y: U, cb: (x: T, y: U) => V) => V >1 : 1 >"one" : "one" @@ -75,7 +75,7 @@ var b = bar(1, "one", g); // Error, number and string are disjoint types var b = bar("one", 1, g); // Error, number and string are disjoint types >b : string | number ->bar("one", 1, g) : any +>bar("one", 1, g) : unknown >bar : (x: T, y: U, cb: (x: T, y: U) => V) => V >"one" : "one" >1 : 1 diff --git a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.types b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.types index c7466ec2ebb87..dc3e1e40599cc 100644 --- a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.types +++ b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.types @@ -37,8 +37,8 @@ var f = (x: number) => { return x.toFixed() }; >toFixed : (fractionDigits?: number) => string var r5 = _.forEach(c2, f); ->r5 : any ->_.forEach(c2, f) : any +>r5 : void +>_.forEach(c2, f) : void >_.forEach : (c: Collection, f: (x: T) => Date) => void >_ : Combinators >forEach : (c: Collection, f: (x: T) => Date) => void @@ -46,8 +46,8 @@ var r5 = _.forEach(c2, f); >f : (x: number) => string var r6 = _.forEach(c2, (x) => { return x.toFixed() }); ->r6 : any ->_.forEach(c2, (x) => { return x.toFixed() }) : any +>r6 : void +>_.forEach(c2, (x) => { return x.toFixed() }) : void >_.forEach : (c: Collection, f: (x: T) => Date) => void >_ : Combinators >forEach : (c: Collection, f: (x: T) => Date) => void diff --git a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.types b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.types index cd2e946ed7263..35784d79f3cc0 100644 --- a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.types +++ b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.types @@ -19,8 +19,8 @@ f10('', () => a => a.foo, ''); // a is "" >'' : "" var r9 = f10('', () => (a => a.foo), 1); // error ->r9 : any ->f10('', () => (a => a.foo), 1) : any +>r9 : string +>f10('', () => (a => a.foo), 1) : "" >f10 : (x: T, b: () => (a: T) => void, y: T) => T >'' : "" >() => (a => a.foo) : () => (a: "") => any diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types index 01b5e85100786..3ce1ee12915b8 100644 --- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types +++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types @@ -36,11 +36,11 @@ const FooComponent = (props: { foo: "A" | "B" | "C" }) => {props.foo}; > : JSX.Element >FooComponent : (props: { foo: "A" | "B" | "C"; }) => JSX.Element ->foo : string +>foo : "f" >"f" : "f" ; > : JSX.Element >FooComponent : (props: { foo: "A" | "B" | "C"; }) => JSX.Element ->foo : string +>foo : "f" diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.types b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.types index badb7b0d4e97c..1f69721445968 100644 --- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.types +++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.types @@ -95,8 +95,8 @@ const b3 = ; // goTo has type"home" | "c >b3 : JSX.Element > : JSX.Element >MainButton : { (buttonProps: ButtonProps): JSX.Element; (linkProps: LinkProps): JSX.Element; } ->{goTo:"home"} : { goTo: string; } ->goTo : string +>{goTo:"home"} : { goTo: "home"; } +>goTo : "home" >"home" : "home" >extra : true @@ -104,7 +104,7 @@ const b4 = ; // goTo has type "home" | "contact >b4 : JSX.Element > : JSX.Element >MainButton : { (buttonProps: ButtonProps): JSX.Element; (linkProps: LinkProps): JSX.Element; } ->goTo : string +>goTo : "home" >extra : true export function NoOverload(buttonProps: ButtonProps): JSX.Element { return undefined } @@ -138,8 +138,8 @@ const d1 = ; // goTo has type "home" | >d1 : JSX.Element > : JSX.Element >NoOverload1 : (linkProps: LinkProps) => JSX.Element ->{goTo:"home"} : { goTo: string; } ->goTo : string +>{goTo:"home"} : { goTo: "home"; } +>goTo : "home" >"home" : "home" >extra : true diff --git a/tests/baselines/reference/controlFlowArrayErrors.types b/tests/baselines/reference/controlFlowArrayErrors.types index eee5ed5a6abcf..c69c5a22785e7 100644 --- a/tests/baselines/reference/controlFlowArrayErrors.types +++ b/tests/baselines/reference/controlFlowArrayErrors.types @@ -152,7 +152,7 @@ function f6() { >x : (string | number)[] | boolean[] x.push(99); // Error ->x.push(99) : any +>x.push(99) : number >x.push : ((...items: (string | number)[]) => number) | ((...items: boolean[]) => number) >x : (string | number)[] | boolean[] >push : ((...items: (string | number)[]) => number) | ((...items: boolean[]) => number) diff --git a/tests/baselines/reference/controlFlowIterationErrors.types b/tests/baselines/reference/controlFlowIterationErrors.types index 7312944e3bf37..2635ca168e2d3 100644 --- a/tests/baselines/reference/controlFlowIterationErrors.types +++ b/tests/baselines/reference/controlFlowIterationErrors.types @@ -27,7 +27,7 @@ function f1() { >cond : boolean x = len(x); ->x = len(x) : any +>x = len(x) : number >x : string | number | boolean >len(x) : number >len : (s: string) => number @@ -58,7 +58,7 @@ function f2() { >x : string | number x = len(x); ->x = len(x) : any +>x = len(x) : number >x : string | number | boolean >len(x) : number >len : (s: string) => number @@ -91,14 +91,14 @@ function g1() { >cond : boolean x = foo(x); ->x = foo(x) : any +>x = foo(x) : never >x : string | number | boolean ->foo(x) : any +>foo(x) : never >foo : { (x: string): number; (x: number): string; } >x : string | number x; ->x : string | number | boolean +>x : never } x; >x : string | number @@ -122,9 +122,9 @@ function g2() { >x : string | number x = foo(x); ->x = foo(x) : any +>x = foo(x) : never >x : string | number | boolean ->foo(x) : any +>foo(x) : never >foo : { (x: string): number; (x: number): string; } >x : string | number } diff --git a/tests/baselines/reference/controlFlowLoopAnalysis.types b/tests/baselines/reference/controlFlowLoopAnalysis.types index c38a0d735e7d7..f3aa3bd2bd0da 100644 --- a/tests/baselines/reference/controlFlowLoopAnalysis.types +++ b/tests/baselines/reference/controlFlowLoopAnalysis.types @@ -25,7 +25,7 @@ function test1() { >cond : true x = foo(x); ->x = foo(x) : any +>x = foo(x) : number >x : number | undefined >foo(x) : number >foo : (x: number) => number diff --git a/tests/baselines/reference/couldNotSelectGenericOverload.types b/tests/baselines/reference/couldNotSelectGenericOverload.types index 3fbcd77647d51..ad1e9ab4e15aa 100644 --- a/tests/baselines/reference/couldNotSelectGenericOverload.types +++ b/tests/baselines/reference/couldNotSelectGenericOverload.types @@ -11,8 +11,8 @@ var b = [1, ""]; >"" : "" var b1G = makeArray(1, ""); // any, no error ->b1G : any ->makeArray(1, "") : any +>b1G : unknown[] +>makeArray(1, "") : unknown[] >makeArray : (items: T[]) => T[] >1 : 1 >"" : "" diff --git a/tests/baselines/reference/crashInEmitTokenWithComment.errors.txt b/tests/baselines/reference/crashInEmitTokenWithComment.errors.txt new file mode 100644 index 0000000000000..b11ca0d32bc23 --- /dev/null +++ b/tests/baselines/reference/crashInEmitTokenWithComment.errors.txt @@ -0,0 +1,14 @@ +tests/cases/compiler/crashInEmitTokenWithComment.ts(5,4): error TS2345: Argument of type '({ [foo.bar]: c }: {}) => any' is not assignable to parameter of type 'string'. +tests/cases/compiler/crashInEmitTokenWithComment.ts(5,7): error TS2537: Type '{}' has no matching index signature for type 'string'. + + +==== tests/cases/compiler/crashInEmitTokenWithComment.ts (2 errors) ==== + // GH#32358 + const fn = (param: string) => undefined; + + const foo = {bar: 'a'}; + fn(({[foo.bar]: c}) => undefined); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '({ [foo.bar]: c }: {}) => any' is not assignable to parameter of type 'string'. + ~~~~~~~ +!!! error TS2537: Type '{}' has no matching index signature for type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/crashInEmitTokenWithComment.js b/tests/baselines/reference/crashInEmitTokenWithComment.js new file mode 100644 index 0000000000000..e799cc3acd34f --- /dev/null +++ b/tests/baselines/reference/crashInEmitTokenWithComment.js @@ -0,0 +1,15 @@ +//// [crashInEmitTokenWithComment.ts] +// GH#32358 +const fn = (param: string) => undefined; + +const foo = {bar: 'a'}; +fn(({[foo.bar]: c}) => undefined); + +//// [crashInEmitTokenWithComment.js] +// GH#32358 +var fn = function (param) { return undefined; }; +var foo = { bar: 'a' }; +fn(function (_a) { + var _b = foo.bar, c = _a[_b]; + return undefined; +}); diff --git a/tests/baselines/reference/declFileAccessors.js b/tests/baselines/reference/declFileAccessors.js index 103f86d688e69..9f8e42bd2c867 100644 --- a/tests/baselines/reference/declFileAccessors.js +++ b/tests/baselines/reference/declFileAccessors.js @@ -115,7 +115,7 @@ var c1 = /** @class */ (function () { /** setter property*/ set: function (/** this is value*/ value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c1.prototype, "pp3", { @@ -126,7 +126,7 @@ var c1 = /** @class */ (function () { /** private setter property*/ set: function (/** this is value*/ value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c1, "s3", { @@ -137,7 +137,7 @@ var c1 = /** @class */ (function () { /** setter property*/ set: function (/** this is value*/ value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c1.prototype, "nc_p3", { @@ -146,7 +146,7 @@ var c1 = /** @class */ (function () { }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c1.prototype, "nc_pp3", { @@ -155,7 +155,7 @@ var c1 = /** @class */ (function () { }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c1, "nc_s3", { @@ -164,7 +164,7 @@ var c1 = /** @class */ (function () { }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c1.prototype, "onlyGetter", { @@ -172,14 +172,14 @@ var c1 = /** @class */ (function () { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c1.prototype, "onlySetter", { // Only setter property set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); return c1; @@ -198,7 +198,7 @@ var c2 = /** @class */ (function () { /** setter property*/ set: function (/** this is value*/ value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c2.prototype, "pp3", { @@ -209,7 +209,7 @@ var c2 = /** @class */ (function () { /** private setter property*/ set: function (/** this is value*/ value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c2, "s3", { @@ -220,7 +220,7 @@ var c2 = /** @class */ (function () { /** setter property*/ set: function (/** this is value*/ value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c2.prototype, "nc_p3", { @@ -229,7 +229,7 @@ var c2 = /** @class */ (function () { }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c2.prototype, "nc_pp3", { @@ -238,7 +238,7 @@ var c2 = /** @class */ (function () { }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c2, "nc_s3", { @@ -247,7 +247,7 @@ var c2 = /** @class */ (function () { }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c2.prototype, "onlyGetter", { @@ -255,14 +255,14 @@ var c2 = /** @class */ (function () { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c2.prototype, "onlySetter", { // Only setter property set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); return c2; diff --git a/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js b/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js index 627a1865d8fc8..d31237753aa50 100644 --- a/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js +++ b/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js @@ -21,6 +21,7 @@ export var x: SubModule.m.m3.c; //// [declFileAmbientExternalModuleWithSingleExportedModule_1.js] "use strict"; exports.__esModule = true; +exports.x = void 0; //// [declFileAmbientExternalModuleWithSingleExportedModule_0.d.ts] diff --git a/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js b/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js index cefff0be4eac9..d1a56d4a5f9dd 100644 --- a/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js +++ b/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js @@ -20,6 +20,7 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.x = void 0; exports.x.a; }); diff --git a/tests/baselines/reference/declFileExportImportChain.js b/tests/baselines/reference/declFileExportImportChain.js index 8a6b297f81d3f..238d40c23a4dc 100644 --- a/tests/baselines/reference/declFileExportImportChain.js +++ b/tests/baselines/reference/declFileExportImportChain.js @@ -61,6 +61,7 @@ define(["require", "exports", "declFileExportImportChain_b1"], function (require define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.x = void 0; }); diff --git a/tests/baselines/reference/declFileExportImportChain2.js b/tests/baselines/reference/declFileExportImportChain2.js index 684ac2a1dfbe2..c2c9ffe67899d 100644 --- a/tests/baselines/reference/declFileExportImportChain2.js +++ b/tests/baselines/reference/declFileExportImportChain2.js @@ -52,6 +52,7 @@ define(["require", "exports", "declFileExportImportChain2_b"], function (require define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.x = void 0; }); diff --git a/tests/baselines/reference/declFileForExportedImport.js b/tests/baselines/reference/declFileForExportedImport.js index 809f01878d4a9..42dfc2fa8fe49 100644 --- a/tests/baselines/reference/declFileForExportedImport.js +++ b/tests/baselines/reference/declFileForExportedImport.js @@ -14,6 +14,7 @@ var z = b.x; //// [declFileForExportedImport_0.js] "use strict"; exports.__esModule = true; +exports.x = void 0; //// [declFileForExportedImport_1.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index c95fc26d3187d..2f7be9484b71a 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -89,6 +89,7 @@ var C; }()); C.D = D; })(C = exports.C || (exports.C = {})); +exports.a = void 0; exports.b = C.F; exports.c = C.F2; exports.d = C.F3; diff --git a/tests/baselines/reference/declFilePrivateStatic.js b/tests/baselines/reference/declFilePrivateStatic.js index 9dd2adc8c59ef..78d3cb4051bc8 100644 --- a/tests/baselines/reference/declFilePrivateStatic.js +++ b/tests/baselines/reference/declFilePrivateStatic.js @@ -21,22 +21,22 @@ var C = /** @class */ (function () { C.b = function () { }; Object.defineProperty(C, "c", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "d", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "e", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "f", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); C.x = 1; diff --git a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorAccessors.js b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorAccessors.js index 598ac67c20ed5..88f43150ed69e 100644 --- a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorAccessors.js +++ b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorAccessors.js @@ -130,7 +130,7 @@ var m; get: function () { return; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo2", { @@ -138,14 +138,14 @@ var m; get: function () { return new private1(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo3", { // setter with annotation set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo4", { @@ -155,7 +155,7 @@ var m; }, set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo5", { @@ -165,7 +165,7 @@ var m; }, set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo11", { @@ -173,7 +173,7 @@ var m; get: function () { return; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo12", { @@ -181,14 +181,14 @@ var m; get: function () { return new public1(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo13", { // setter with annotation set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo14", { @@ -198,7 +198,7 @@ var m; }, set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo15", { @@ -208,7 +208,7 @@ var m; }, set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo111", { @@ -216,7 +216,7 @@ var m; get: function () { return; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo112", { @@ -224,14 +224,14 @@ var m; get: function () { return new m2.public2(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo113", { // setter with annotation set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo114", { @@ -241,7 +241,7 @@ var m; }, set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(c.prototype, "foo115", { @@ -251,7 +251,7 @@ var m; }, set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return c; diff --git a/tests/baselines/reference/declarationEmitClassMemberNameConflict.js b/tests/baselines/reference/declarationEmitClassMemberNameConflict.js index 43523aba38f0e..d5d2a98e49309 100644 --- a/tests/baselines/reference/declarationEmitClassMemberNameConflict.js +++ b/tests/baselines/reference/declarationEmitClassMemberNameConflict.js @@ -65,7 +65,7 @@ var C3 = /** @class */ (function () { Object.defineProperty(C3.prototype, "C3", { get: function () { return 0; } // has to be the same as the class name , - enumerable: true, + enumerable: false, configurable: true }); C3.prototype.bar = function () { @@ -81,7 +81,7 @@ var C4 = /** @class */ (function () { Object.defineProperty(C4.prototype, "C4", { set: function (v) { } // has to be the same as the class name , - enumerable: true, + enumerable: false, configurable: true }); C4.prototype.bar = function () { diff --git a/tests/baselines/reference/declarationEmitExportDeclaration.js b/tests/baselines/reference/declarationEmitExportDeclaration.js index 1cde34aeba0d2..15dcc58e8f7d7 100644 --- a/tests/baselines/reference/declarationEmitExportDeclaration.js +++ b/tests/baselines/reference/declarationEmitExportDeclaration.js @@ -23,7 +23,7 @@ exports.bar = bar; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var utils_1 = require("./utils"); -exports.bar = utils_1.bar; +Object.defineProperty(exports, "bar", { enumerable: true, get: function () { return utils_1.bar; } }); utils_1.foo(); var obj; diff --git a/tests/baselines/reference/declarationEmitProtectedMembers.js b/tests/baselines/reference/declarationEmitProtectedMembers.js index e0a2b40ffd50c..ae696091aae8a 100644 --- a/tests/baselines/reference/declarationEmitProtectedMembers.js +++ b/tests/baselines/reference/declarationEmitProtectedMembers.js @@ -73,7 +73,7 @@ var C1 = /** @class */ (function () { Object.defineProperty(C1.prototype, "accessor", { get: function () { return 0; }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); C1.sf = function () { @@ -81,12 +81,12 @@ var C1 = /** @class */ (function () { }; Object.defineProperty(C1, "staticSetter", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C1, "staticGetter", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); return C1; @@ -119,7 +119,7 @@ var C3 = /** @class */ (function (_super) { }; Object.defineProperty(C3, "staticGetter", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C3; diff --git a/tests/baselines/reference/declarationEmitReexportedSymlinkReference.js b/tests/baselines/reference/declarationEmitReexportedSymlinkReference.js index 0683f21cd575a..670c6ab7184df 100644 --- a/tests/baselines/reference/declarationEmitReexportedSymlinkReference.js +++ b/tests/baselines/reference/declarationEmitReexportedSymlinkReference.js @@ -50,11 +50,18 @@ var pkg2_1 = require("@raymondfeng/pkg2"); exports.ADMIN = pkg2_1.MetadataAccessor.create('1'); //// [index.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./keys")); +__exportStar(require("./keys"), exports); //// [keys.d.ts] diff --git a/tests/baselines/reference/declarationEmitReexportedSymlinkReference2.js b/tests/baselines/reference/declarationEmitReexportedSymlinkReference2.js index 5403cb95effe5..9a89697f98e15 100644 --- a/tests/baselines/reference/declarationEmitReexportedSymlinkReference2.js +++ b/tests/baselines/reference/declarationEmitReexportedSymlinkReference2.js @@ -53,11 +53,18 @@ var pkg2_1 = require("@raymondfeng/pkg2"); exports.ADMIN = pkg2_1.MetadataAccessor.create('1'); //// [index.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./keys")); +__exportStar(require("./keys"), exports); //// [keys.d.ts] diff --git a/tests/baselines/reference/declarationEmitReexportedSymlinkReference3.js b/tests/baselines/reference/declarationEmitReexportedSymlinkReference3.js index 46b3eded6341d..d03363e388213 100644 --- a/tests/baselines/reference/declarationEmitReexportedSymlinkReference3.js +++ b/tests/baselines/reference/declarationEmitReexportedSymlinkReference3.js @@ -50,11 +50,18 @@ var pkg2_1 = require("@raymondfeng/pkg2"); exports.ADMIN = pkg2_1.MetadataAccessor.create('1'); //// [index.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./keys")); +__exportStar(require("./keys"), exports); //// [keys.d.ts] diff --git a/tests/baselines/reference/declarationsAndAssignments.types b/tests/baselines/reference/declarationsAndAssignments.types index ed157a7e69ce5..8faf550681e2a 100644 --- a/tests/baselines/reference/declarationsAndAssignments.types +++ b/tests/baselines/reference/declarationsAndAssignments.types @@ -463,12 +463,12 @@ f14([2, ["abc", { x: 0 }]]); f14([2, ["abc", { y: false }]]); // Error, no x >f14([2, ["abc", { y: false }]]) : void >f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void ->[2, ["abc", { y: false }]] : (number | (string | { y: boolean; })[])[] +>[2, ["abc", { y: false }]] : [number, [string, { y: false; }]] >2 : 2 ->["abc", { y: false }] : (string | { y: boolean; })[] +>["abc", { y: false }] : [string, { y: false; }] >"abc" : "abc" ->{ y: false } : { y: boolean; } ->y : boolean +>{ y: false } : { y: false; } +>y : false >false : false module M { @@ -727,14 +727,14 @@ function f20(v: [number, number, number]) { [...a3] = v; >[...a3] = v : [number, number, number] ->[...a3] : number[] +>[...a3] : [number, number, number] >...a3 : number >a3 : [number, number, number] >v : [number, number, number] [x, ...a2] = v; >[x, ...a2] = v : [number, number, number] ->[x, ...a2] : [number, ...number[]] +>[x, ...a2] : [number, number, number] >x : number >...a2 : number >a2 : [number, number] @@ -742,7 +742,7 @@ function f20(v: [number, number, number]) { [x, y, ...a1] = v; >[x, y, ...a1] = v : [number, number, number] ->[x, y, ...a1] : [number, number, ...number[]] +>[x, y, ...a1] : [number, number, number] >x : number >y : number >...a1 : number @@ -751,7 +751,7 @@ function f20(v: [number, number, number]) { [x, y, z, ...a0] = v; >[x, y, z, ...a0] = v : [number, number, number] ->[x, y, z, ...a0] : [number, number, number, ...never[]] +>[x, y, z, ...a0] : [number, number, number] >x : number >y : number >z : number @@ -809,14 +809,14 @@ function f21(v: [number, string, boolean]) { [...a0] = v; >[...a0] = v : [number, string, boolean] ->[...a0] : (string | number | boolean)[] +>[...a0] : [number, string, boolean] >...a0 : string | number | boolean >a0 : [number, string, boolean] >v : [number, string, boolean] [x, ...a1] = v; >[x, ...a1] = v : [number, string, boolean] ->[x, ...a1] : [number, ...(string | boolean)[]] +>[x, ...a1] : [number, string, boolean] >x : number >...a1 : string | boolean >a1 : [string, boolean] @@ -824,7 +824,7 @@ function f21(v: [number, string, boolean]) { [x, y, ...a2] = v; >[x, y, ...a2] = v : [number, string, boolean] ->[x, y, ...a2] : [number, string, ...boolean[]] +>[x, y, ...a2] : [number, string, boolean] >x : number >y : string >...a2 : boolean @@ -833,7 +833,7 @@ function f21(v: [number, string, boolean]) { [x, y, z, ...a3] = v; >[x, y, z, ...a3] = v : [number, string, boolean] ->[x, y, z, ...a3] : [number, string, boolean, ...never[]] +>[x, y, z, ...a3] : [number, string, boolean] >x : number >y : string >z : boolean diff --git a/tests/baselines/reference/decoratedClassExportsCommonJS1.js b/tests/baselines/reference/decoratedClassExportsCommonJS1.js index d9ba6a5ce1261..d537217f8bdba 100644 --- a/tests/baselines/reference/decoratedClassExportsCommonJS1.js +++ b/tests/baselines/reference/decoratedClassExportsCommonJS1.js @@ -14,12 +14,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 Testing123_1; Object.defineProperty(exports, "__esModule", { value: true }); -let Testing123 = Testing123_1 = class Testing123 { -}; -Testing123.prop1 = Testing123_1.prop0; -Testing123 = Testing123_1 = __decorate([ - Something({ v: () => Testing123_1 }) -], Testing123); +const Testing123 = /** @class */ (() => { + var Testing123_1; + let Testing123 = Testing123_1 = class Testing123 { + }; + Testing123.prop1 = Testing123_1.prop0; + Testing123 = Testing123_1 = __decorate([ + Something({ v: () => Testing123_1 }) + ], Testing123); + return Testing123; +})(); exports.Testing123 = Testing123; diff --git a/tests/baselines/reference/decoratedClassExportsCommonJS2.js b/tests/baselines/reference/decoratedClassExportsCommonJS2.js index 2ed37afa881bf..05be638f93b5e 100644 --- a/tests/baselines/reference/decoratedClassExportsCommonJS2.js +++ b/tests/baselines/reference/decoratedClassExportsCommonJS2.js @@ -12,11 +12,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 Testing123_1; Object.defineProperty(exports, "__esModule", { value: true }); -let Testing123 = Testing123_1 = class Testing123 { -}; -Testing123 = Testing123_1 = __decorate([ - Something({ v: () => Testing123_1 }) -], Testing123); +const Testing123 = /** @class */ (() => { + var Testing123_1; + let Testing123 = Testing123_1 = class Testing123 { + }; + Testing123 = Testing123_1 = __decorate([ + Something({ v: () => Testing123_1 }) + ], Testing123); + return Testing123; +})(); exports.Testing123 = Testing123; diff --git a/tests/baselines/reference/decoratedClassExportsSystem1.js b/tests/baselines/reference/decoratedClassExportsSystem1.js index 844a87fe0930b..8d26dfb9a4e5b 100644 --- a/tests/baselines/reference/decoratedClassExportsSystem1.js +++ b/tests/baselines/reference/decoratedClassExportsSystem1.js @@ -16,17 +16,21 @@ System.register([], function (exports_1, context_1) { 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 Testing123_1, Testing123; + var Testing123; var __moduleName = context_1 && context_1.id; return { setters: [], execute: function () { - Testing123 = Testing123_1 = class Testing123 { - }; - Testing123.prop1 = Testing123_1.prop0; - Testing123 = Testing123_1 = __decorate([ - Something({ v: () => Testing123_1 }) - ], Testing123); + Testing123 = /** @class */ (() => { + var Testing123_1; + let Testing123 = Testing123_1 = class Testing123 { + }; + Testing123.prop1 = Testing123_1.prop0; + Testing123 = Testing123_1 = __decorate([ + Something({ v: () => Testing123_1 }) + ], Testing123); + return Testing123; + })(); exports_1("Testing123", Testing123); } }; diff --git a/tests/baselines/reference/decoratedClassExportsSystem2.js b/tests/baselines/reference/decoratedClassExportsSystem2.js index a9458e125b325..cc26df71f033a 100644 --- a/tests/baselines/reference/decoratedClassExportsSystem2.js +++ b/tests/baselines/reference/decoratedClassExportsSystem2.js @@ -13,16 +13,20 @@ System.register([], function (exports_1, context_1) { 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 Testing123_1, Testing123; + var Testing123; var __moduleName = context_1 && context_1.id; return { setters: [], execute: function () { - Testing123 = Testing123_1 = class Testing123 { - }; - Testing123 = Testing123_1 = __decorate([ - Something({ v: () => Testing123_1 }) - ], Testing123); + Testing123 = /** @class */ (() => { + var Testing123_1; + let Testing123 = Testing123_1 = class Testing123 { + }; + Testing123 = Testing123_1 = __decorate([ + Something({ v: () => Testing123_1 }) + ], Testing123); + return Testing123; + })(); exports_1("Testing123", Testing123); } }; diff --git a/tests/baselines/reference/decoratedClassFromExternalModule.js b/tests/baselines/reference/decoratedClassFromExternalModule.js index ce397323d9ccd..9bce0de4dd491 100644 --- a/tests/baselines/reference/decoratedClassFromExternalModule.js +++ b/tests/baselines/reference/decoratedClassFromExternalModule.js @@ -17,10 +17,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, return c > 3 && r && Object.defineProperty(target, key, r), r; }; function decorate(target) { } -let Decorated = class Decorated { -}; -Decorated = __decorate([ - decorate -], Decorated); +const Decorated = /** @class */ (() => { + let Decorated = class Decorated { + }; + Decorated = __decorate([ + decorate + ], Decorated); + return Decorated; +})(); export default Decorated; //// [undecorated.js] diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.js index dadaa5ed6df1b..fa1d60e5b59cd 100644 --- a/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.js +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.js @@ -24,11 +24,14 @@ define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var decorator; - let Foo = class Foo { - }; - Foo = __decorate([ - decorator - ], Foo); + const Foo = /** @class */ (() => { + let Foo = class Foo { + }; + Foo = __decorate([ + decorator + ], Foo); + return Foo; + })(); exports.default = Foo; }); //// [b.js] @@ -42,10 +45,13 @@ define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var decorator; - let default_1 = class { - }; - default_1 = __decorate([ - decorator - ], default_1); + const default_1 = /** @class */ (() => { + let default_1 = class { + }; + default_1 = __decorate([ + decorator + ], default_1); + return default_1; + })(); exports.default = default_1; }); diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.js index f6c7b7cbc8b80..bf7bf3170dabc 100644 --- a/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.js +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.js @@ -23,11 +23,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, }; Object.defineProperty(exports, "__esModule", { value: true }); var decorator; -let Foo = class Foo { -}; -Foo = __decorate([ - decorator -], Foo); +const Foo = /** @class */ (() => { + let Foo = class Foo { + }; + Foo = __decorate([ + decorator + ], Foo); + return Foo; +})(); exports.default = Foo; //// [b.js] "use strict"; @@ -39,9 +42,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, }; Object.defineProperty(exports, "__esModule", { value: true }); var decorator; -let default_1 = class { -}; -default_1 = __decorate([ - decorator -], default_1); +const default_1 = /** @class */ (() => { + let default_1 = class { + }; + default_1 = __decorate([ + decorator + ], default_1); + return default_1; +})(); exports.default = default_1; diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js index 63290f4176a2b..2c92aa2a6c372 100644 --- a/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js @@ -26,11 +26,14 @@ System.register([], function (exports_1, context_1) { return { setters: [], execute: function () { - Foo = class Foo { - }; - Foo = __decorate([ - decorator - ], Foo); + Foo = /** @class */ (() => { + let Foo = class Foo { + }; + Foo = __decorate([ + decorator + ], Foo); + return Foo; + })(); exports_1("default", Foo); } }; @@ -49,11 +52,14 @@ System.register([], function (exports_1, context_1) { return { setters: [], execute: function () { - default_1 = class { - }; - default_1 = __decorate([ - decorator - ], default_1); + default_1 = /** @class */ (() => { + let default_1 = class { + }; + default_1 = __decorate([ + decorator + ], default_1); + return default_1; + })(); exports_1("default", default_1); } }; diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.js index beb5fa26755ef..48dd01c3fbf14 100644 --- a/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.js +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.js @@ -32,11 +32,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var decorator; - let Foo = class Foo { - }; - Foo = __decorate([ - decorator - ], Foo); + const Foo = /** @class */ (() => { + let Foo = class Foo { + }; + Foo = __decorate([ + decorator + ], Foo); + return Foo; + })(); exports.default = Foo; }); //// [b.js] @@ -58,10 +61,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var decorator; - let default_1 = class { - }; - default_1 = __decorate([ - decorator - ], default_1); + const default_1 = /** @class */ (() => { + let default_1 = class { + }; + default_1 = __decorate([ + decorator + ], default_1); + return default_1; + })(); exports.default = default_1; }); diff --git a/tests/baselines/reference/decoratorMetadataPromise.js b/tests/baselines/reference/decoratorMetadataPromise.js index 41bb42e27328e..b20a3d18e068a 100644 --- a/tests/baselines/reference/decoratorMetadataPromise.js +++ b/tests/baselines/reference/decoratorMetadataPromise.js @@ -30,30 +30,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -class A { - foo() { - return __awaiter(this, void 0, void 0, function* () { }); +const A = /** @class */ (() => { + class A { + foo() { + return __awaiter(this, void 0, void 0, function* () { }); + } + bar() { + return __awaiter(this, void 0, void 0, function* () { return 0; }); + } + baz(n) { return n; } } - bar() { - return __awaiter(this, void 0, void 0, function* () { return 0; }); - } - baz(n) { return n; } -} -__decorate([ - decorator, - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) -], A.prototype, "foo", null); -__decorate([ - decorator, - __metadata("design:type", Function), - __metadata("design:paramtypes", []), - __metadata("design:returntype", Promise) -], A.prototype, "bar", null); -__decorate([ - decorator, - __metadata("design:type", Function), - __metadata("design:paramtypes", [Promise]), - __metadata("design:returntype", Promise) -], A.prototype, "baz", null); + __decorate([ + decorator, + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], A.prototype, "foo", null); + __decorate([ + decorator, + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], A.prototype, "bar", null); + __decorate([ + decorator, + __metadata("design:type", Function), + __metadata("design:paramtypes", [Promise]), + __metadata("design:returntype", Promise) + ], A.prototype, "baz", null); + return A; +})(); diff --git a/tests/baselines/reference/decoratorOnArrowFunction.types b/tests/baselines/reference/decoratorOnArrowFunction.types index 5edbff0e92113..84ca4a9ffbe88 100644 --- a/tests/baselines/reference/decoratorOnArrowFunction.types +++ b/tests/baselines/reference/decoratorOnArrowFunction.types @@ -6,6 +6,6 @@ declare function dec(target: T): T; var F = @dec () => { >F : any > : any ->dec () : any +>dec () : unknown >dec : (target: T) => T } diff --git a/tests/baselines/reference/decoratorOnClass1.es6.js b/tests/baselines/reference/decoratorOnClass1.es6.js index 7a02b9f5cd877..2a313e39f4e7f 100644 --- a/tests/baselines/reference/decoratorOnClass1.es6.js +++ b/tests/baselines/reference/decoratorOnClass1.es6.js @@ -14,9 +14,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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; }; -let C = class C { -}; -C = __decorate([ - dec -], C); +const C = /** @class */ (() => { + let C = class C { + }; + C = __decorate([ + dec + ], C); + return C; +})(); let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass2.es6.js b/tests/baselines/reference/decoratorOnClass2.es6.js index d1258af98b90f..79b8a0eabe26b 100644 --- a/tests/baselines/reference/decoratorOnClass2.es6.js +++ b/tests/baselines/reference/decoratorOnClass2.es6.js @@ -14,10 +14,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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; }; -let C = class C { -}; -C = __decorate([ - dec -], C); +const C = /** @class */ (() => { + let C = class C { + }; + C = __decorate([ + dec + ], C); + return C; +})(); export { C }; let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass3.es6.js b/tests/baselines/reference/decoratorOnClass3.es6.js index a6b1d6e258997..7f86ee49d1fc8 100644 --- a/tests/baselines/reference/decoratorOnClass3.es6.js +++ b/tests/baselines/reference/decoratorOnClass3.es6.js @@ -14,10 +14,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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; }; -let C = class C { -}; -C = __decorate([ - dec -], C); +const C = /** @class */ (() => { + let C = class C { + }; + C = __decorate([ + dec + ], C); + return C; +})(); export default C; let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass4.es6.js b/tests/baselines/reference/decoratorOnClass4.es6.js index 0435c822da6bc..b6963270e9fc3 100644 --- a/tests/baselines/reference/decoratorOnClass4.es6.js +++ b/tests/baselines/reference/decoratorOnClass4.es6.js @@ -12,9 +12,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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; }; -let default_1 = class { -}; -default_1 = __decorate([ - dec -], default_1); +const default_1 = /** @class */ (() => { + let default_1 = class { + }; + default_1 = __decorate([ + dec + ], default_1); + return default_1; +})(); export default default_1; diff --git a/tests/baselines/reference/decoratorOnClass5.es6.js b/tests/baselines/reference/decoratorOnClass5.es6.js index b1c45cbce312c..6330c41d2b76d 100644 --- a/tests/baselines/reference/decoratorOnClass5.es6.js +++ b/tests/baselines/reference/decoratorOnClass5.es6.js @@ -16,12 +16,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 C_1; -let C = C_1 = class C { - static x() { return C_1.y; } -}; -C.y = 1; -C = C_1 = __decorate([ - dec -], C); +const C = /** @class */ (() => { + var C_1; + let C = C_1 = class C { + static x() { return C_1.y; } + }; + C.y = 1; + C = C_1 = __decorate([ + dec + ], C); + return C; +})(); let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass6.es6.js b/tests/baselines/reference/decoratorOnClass6.es6.js index f9d8d2f419929..eb674f058aed8 100644 --- a/tests/baselines/reference/decoratorOnClass6.es6.js +++ b/tests/baselines/reference/decoratorOnClass6.es6.js @@ -16,13 +16,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 C_1; -let C = C_1 = class C { - static x() { return C_1.y; } -}; -C.y = 1; -C = C_1 = __decorate([ - dec -], C); +const C = /** @class */ (() => { + var C_1; + let C = C_1 = class C { + static x() { return C_1.y; } + }; + C.y = 1; + C = C_1 = __decorate([ + dec + ], C); + return C; +})(); export { C }; let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass7.es6.js b/tests/baselines/reference/decoratorOnClass7.es6.js index aefc9536a878c..484697d7a9b1d 100644 --- a/tests/baselines/reference/decoratorOnClass7.es6.js +++ b/tests/baselines/reference/decoratorOnClass7.es6.js @@ -16,13 +16,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 C_1; -let C = C_1 = class C { - static x() { return C_1.y; } -}; -C.y = 1; -C = C_1 = __decorate([ - dec -], C); +const C = /** @class */ (() => { + var C_1; + let C = C_1 = class C { + static x() { return C_1.y; } + }; + C.y = 1; + C = C_1 = __decorate([ + dec + ], C); + return C; +})(); export default C; let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass8.es6.js b/tests/baselines/reference/decoratorOnClass8.es6.js index 88dd41e7b6065..1d291fe920ad5 100644 --- a/tests/baselines/reference/decoratorOnClass8.es6.js +++ b/tests/baselines/reference/decoratorOnClass8.es6.js @@ -13,10 +13,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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; }; -let default_1 = class default_1 { -}; -default_1.y = 1; -default_1 = __decorate([ - dec -], default_1); +const default_1 = /** @class */ (() => { + let default_1 = class default_1 { + }; + default_1.y = 1; + default_1 = __decorate([ + dec + ], default_1); + return default_1; +})(); export default default_1; diff --git a/tests/baselines/reference/decoratorOnClassAccessor1.es6.js b/tests/baselines/reference/decoratorOnClassAccessor1.es6.js index 484005b7a3680..16d2632342f4d 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor1.es6.js +++ b/tests/baselines/reference/decoratorOnClassAccessor1.es6.js @@ -12,9 +12,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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; }; -export default class default_1 { - get accessor() { return 1; } -} -__decorate([ - dec -], default_1.prototype, "accessor", null); +const default_1 = /** @class */ (() => { + class default_1 { + get accessor() { return 1; } + } + __decorate([ + dec + ], default_1.prototype, "accessor", null); + return default_1; +})(); +export default default_1; diff --git a/tests/baselines/reference/decoratorOnClassAccessor1.js b/tests/baselines/reference/decoratorOnClassAccessor1.js index 5efcfb15678cd..81f3141177a7e 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor1.js +++ b/tests/baselines/reference/decoratorOnClassAccessor1.js @@ -17,7 +17,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "accessor", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ diff --git a/tests/baselines/reference/decoratorOnClassAccessor2.js b/tests/baselines/reference/decoratorOnClassAccessor2.js index 4ad30d0c7f42a..f32960a9e1213 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor2.js +++ b/tests/baselines/reference/decoratorOnClassAccessor2.js @@ -17,7 +17,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "accessor", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ diff --git a/tests/baselines/reference/decoratorOnClassAccessor3.js b/tests/baselines/reference/decoratorOnClassAccessor3.js index 207d51295a3f6..cc056160a9d3f 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor3.js +++ b/tests/baselines/reference/decoratorOnClassAccessor3.js @@ -17,7 +17,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "accessor", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ diff --git a/tests/baselines/reference/decoratorOnClassAccessor4.js b/tests/baselines/reference/decoratorOnClassAccessor4.js index 15d521d373ba6..ae7295764aa89 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor4.js +++ b/tests/baselines/reference/decoratorOnClassAccessor4.js @@ -17,7 +17,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "accessor", { set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ diff --git a/tests/baselines/reference/decoratorOnClassAccessor5.js b/tests/baselines/reference/decoratorOnClassAccessor5.js index 37d8d28c262b8..91e07d81603c7 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor5.js +++ b/tests/baselines/reference/decoratorOnClassAccessor5.js @@ -17,7 +17,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "accessor", { set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ diff --git a/tests/baselines/reference/decoratorOnClassAccessor6.js b/tests/baselines/reference/decoratorOnClassAccessor6.js index 0a0109ecd7f19..ff6ccdb8a60ed 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor6.js +++ b/tests/baselines/reference/decoratorOnClassAccessor6.js @@ -17,7 +17,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "accessor", { set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ diff --git a/tests/baselines/reference/decoratorOnClassAccessor7.js b/tests/baselines/reference/decoratorOnClassAccessor7.js index d32e0eb4911af..5ad01245e8bda 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor7.js +++ b/tests/baselines/reference/decoratorOnClassAccessor7.js @@ -45,7 +45,7 @@ var A = /** @class */ (function () { Object.defineProperty(A.prototype, "x", { get: function () { return 0; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ @@ -59,7 +59,7 @@ var B = /** @class */ (function () { Object.defineProperty(B.prototype, "x", { get: function () { return 0; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ @@ -73,7 +73,7 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "x", { get: function () { return 0; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ @@ -87,7 +87,7 @@ var D = /** @class */ (function () { Object.defineProperty(D.prototype, "x", { get: function () { return 0; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ @@ -101,7 +101,7 @@ var E = /** @class */ (function () { Object.defineProperty(E.prototype, "x", { get: function () { return 0; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ @@ -115,7 +115,7 @@ var F = /** @class */ (function () { Object.defineProperty(F.prototype, "x", { get: function () { return 0; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ diff --git a/tests/baselines/reference/decoratorOnClassAccessor8.js b/tests/baselines/reference/decoratorOnClassAccessor8.js index e1fffdaec839d..1f74cf74c07c6 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor8.js +++ b/tests/baselines/reference/decoratorOnClassAccessor8.js @@ -45,7 +45,7 @@ var A = /** @class */ (function () { Object.defineProperty(A.prototype, "x", { get: function () { return 0; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ @@ -61,7 +61,7 @@ var B = /** @class */ (function () { Object.defineProperty(B.prototype, "x", { get: function () { return 0; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ @@ -77,7 +77,7 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "x", { get: function () { return 0; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ @@ -93,7 +93,7 @@ var D = /** @class */ (function () { Object.defineProperty(D.prototype, "x", { get: function () { return 0; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ @@ -108,7 +108,7 @@ var E = /** @class */ (function () { } Object.defineProperty(E.prototype, "x", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ @@ -123,7 +123,7 @@ var F = /** @class */ (function () { } Object.defineProperty(F.prototype, "x", { set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ diff --git a/tests/baselines/reference/decoratorOnClassMethod1.es6.js b/tests/baselines/reference/decoratorOnClassMethod1.es6.js index 6c518ae805ee0..e416c5ed21996 100644 --- a/tests/baselines/reference/decoratorOnClassMethod1.es6.js +++ b/tests/baselines/reference/decoratorOnClassMethod1.es6.js @@ -12,9 +12,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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; }; -export default class default_1 { - method() { } -} -__decorate([ - dec -], default_1.prototype, "method", null); +const default_1 = /** @class */ (() => { + class default_1 { + method() { } + } + __decorate([ + dec + ], default_1.prototype, "method", null); + return default_1; +})(); +export default default_1; diff --git a/tests/baselines/reference/decoratorOnClassMethod13.js b/tests/baselines/reference/decoratorOnClassMethod13.js index e8a913070fcea..b9766fac9d3ca 100644 --- a/tests/baselines/reference/decoratorOnClassMethod13.js +++ b/tests/baselines/reference/decoratorOnClassMethod13.js @@ -13,13 +13,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 C { - ["1"]() { } - ["b"]() { } -} -__decorate([ - dec -], C.prototype, "1", null); -__decorate([ - dec -], C.prototype, "b", null); +const C = /** @class */ (() => { + class C { + ["1"]() { } + ["b"]() { } + } + __decorate([ + dec + ], C.prototype, "1", null); + __decorate([ + dec + ], C.prototype, "b", null); + return C; +})(); diff --git a/tests/baselines/reference/decoratorOnClassMethod4.js b/tests/baselines/reference/decoratorOnClassMethod4.js index c68cca5d3a04f..a324ca34ec9c0 100644 --- a/tests/baselines/reference/decoratorOnClassMethod4.js +++ b/tests/baselines/reference/decoratorOnClassMethod4.js @@ -12,9 +12,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 C { - ["method"]() { } -} -__decorate([ - dec -], C.prototype, "method", null); +const C = /** @class */ (() => { + class C { + ["method"]() { } + } + __decorate([ + dec + ], C.prototype, "method", null); + return C; +})(); diff --git a/tests/baselines/reference/decoratorOnClassMethod5.js b/tests/baselines/reference/decoratorOnClassMethod5.js index c89ebc6bb38e3..b870b287b838b 100644 --- a/tests/baselines/reference/decoratorOnClassMethod5.js +++ b/tests/baselines/reference/decoratorOnClassMethod5.js @@ -12,9 +12,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 C { - ["method"]() { } -} -__decorate([ - dec() -], C.prototype, "method", null); +const C = /** @class */ (() => { + class C { + ["method"]() { } + } + __decorate([ + dec() + ], C.prototype, "method", null); + return C; +})(); diff --git a/tests/baselines/reference/decoratorOnClassMethod6.js b/tests/baselines/reference/decoratorOnClassMethod6.js index 45f5eeddb8129..d72030ae43556 100644 --- a/tests/baselines/reference/decoratorOnClassMethod6.js +++ b/tests/baselines/reference/decoratorOnClassMethod6.js @@ -12,9 +12,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 C { - ["method"]() { } -} -__decorate([ - dec -], C.prototype, "method", null); +const C = /** @class */ (() => { + class C { + ["method"]() { } + } + __decorate([ + dec + ], C.prototype, "method", null); + return C; +})(); diff --git a/tests/baselines/reference/decoratorOnClassMethod7.js b/tests/baselines/reference/decoratorOnClassMethod7.js index dc92364cd89eb..9d99b26bcc6a7 100644 --- a/tests/baselines/reference/decoratorOnClassMethod7.js +++ b/tests/baselines/reference/decoratorOnClassMethod7.js @@ -12,9 +12,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 C { - ["method"]() { } -} -__decorate([ - dec -], C.prototype, "method", null); +const C = /** @class */ (() => { + class C { + ["method"]() { } + } + __decorate([ + dec + ], C.prototype, "method", null); + return C; +})(); diff --git a/tests/baselines/reference/decoratorOnClassMethod8.errors.txt b/tests/baselines/reference/decoratorOnClassMethod8.errors.txt index 3ada30296b6b1..adfd69b9dff99 100644 --- a/tests/baselines/reference/decoratorOnClassMethod8.errors.txt +++ b/tests/baselines/reference/decoratorOnClassMethod8.errors.txt @@ -1,11 +1,16 @@ tests/cases/conformance/decorators/class/method/decoratorOnClassMethod8.ts(4,5): error TS1241: Unable to resolve signature of method decorator when called as an expression. +tests/cases/conformance/decorators/class/method/decoratorOnClassMethod8.ts(4,5): error TS1241: Unable to resolve signature of method decorator when called as an expression. + Type 'C' has no properties in common with type 'TypedPropertyDescriptor<() => void>'. -==== tests/cases/conformance/decorators/class/method/decoratorOnClassMethod8.ts (1 errors) ==== +==== tests/cases/conformance/decorators/class/method/decoratorOnClassMethod8.ts (2 errors) ==== declare function dec(target: T): T; class C { @dec method() {} ~~~~ !!! error TS1241: Unable to resolve signature of method decorator when called as an expression. + ~~~~ +!!! error TS1241: Unable to resolve signature of method decorator when called as an expression. +!!! error TS1241: Type 'C' has no properties in common with type 'TypedPropertyDescriptor<() => void>'. } \ No newline at end of file diff --git a/tests/baselines/reference/decoratorOnClassMethodParameter1.es6.js b/tests/baselines/reference/decoratorOnClassMethodParameter1.es6.js index b58c69150e5e8..bfd5ce04d4763 100644 --- a/tests/baselines/reference/decoratorOnClassMethodParameter1.es6.js +++ b/tests/baselines/reference/decoratorOnClassMethodParameter1.es6.js @@ -15,9 +15,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; -export default class default_1 { - method(p) { } -} -__decorate([ - __param(0, dec) -], default_1.prototype, "method", null); +const default_1 = /** @class */ (() => { + class default_1 { + method(p) { } + } + __decorate([ + __param(0, dec) + ], default_1.prototype, "method", null); + return default_1; +})(); +export default default_1; diff --git a/tests/baselines/reference/decoratorOnClassProperty1.es6.js b/tests/baselines/reference/decoratorOnClassProperty1.es6.js index 81b72acf47811..e5572c70edd3e 100644 --- a/tests/baselines/reference/decoratorOnClassProperty1.es6.js +++ b/tests/baselines/reference/decoratorOnClassProperty1.es6.js @@ -12,8 +12,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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; }; -export default class default_1 { -} -__decorate([ - dec -], default_1.prototype, "prop", void 0); +const default_1 = /** @class */ (() => { + class default_1 { + } + __decorate([ + dec + ], default_1.prototype, "prop", void 0); + return default_1; +})(); +export default default_1; diff --git a/tests/baselines/reference/decoratorOnImportEquals2.js b/tests/baselines/reference/decoratorOnImportEquals2.js index aa8273699e38e..78b352959c211 100644 --- a/tests/baselines/reference/decoratorOnImportEquals2.js +++ b/tests/baselines/reference/decoratorOnImportEquals2.js @@ -12,6 +12,7 @@ declare function dec(target: T): T; //// [decoratorOnImportEquals2_0.js] "use strict"; exports.__esModule = true; +exports.X = void 0; //// [decoratorOnImportEquals2_1.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/decoratorsOnComputedProperties.js b/tests/baselines/reference/decoratorsOnComputedProperties.js index 3f0444b310aaa..9969cca2430b5 100644 --- a/tests/baselines/reference/decoratorsOnComputedProperties.js +++ b/tests/baselines/reference/decoratorsOnComputedProperties.js @@ -197,262 +197,282 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, return c > 3 && r && Object.defineProperty(target, key, r), r; }; var _a, _b, _c, _d; -var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21; +var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0; function x(o, k) { } let i = 0; function foo() { return ++i + ""; } const fieldNameA = "fieldName1"; const fieldNameB = "fieldName2"; const fieldNameC = "fieldName3"; -class A { - constructor() { - this["property2"] = 2; - this[Symbol.iterator] = null; - this["property4"] = 2; - this[Symbol.match] = null; - this[_f] = null; - this[_h] = null; +const A = /** @class */ (() => { + var _a, _b, _c, _d; + class A { + constructor() { + this["property2"] = 2; + this[Symbol.iterator] = null; + this["property4"] = 2; + this[Symbol.match] = null; + this[_b] = null; + this[_d] = null; + } } -} -foo(), _e = foo(), _f = foo(), _g = fieldNameB, _h = fieldNameC; -__decorate([ - x -], A.prototype, "property", void 0); -__decorate([ - x -], A.prototype, Symbol.toStringTag, void 0); -__decorate([ - x -], A.prototype, "property2", void 0); -__decorate([ - x -], A.prototype, Symbol.iterator, void 0); -__decorate([ - x -], A.prototype, _e, void 0); -__decorate([ - x -], A.prototype, _f, void 0); -__decorate([ - x -], A.prototype, _g, void 0); -__decorate([ - x -], A.prototype, _h, void 0); + foo(), _a = foo(), _b = foo(), _c = fieldNameB, _d = fieldNameC; + __decorate([ + x + ], A.prototype, "property", void 0); + __decorate([ + x + ], A.prototype, Symbol.toStringTag, void 0); + __decorate([ + x + ], A.prototype, "property2", void 0); + __decorate([ + x + ], A.prototype, Symbol.iterator, void 0); + __decorate([ + x + ], A.prototype, _a, void 0); + __decorate([ + x + ], A.prototype, _b, void 0); + __decorate([ + x + ], A.prototype, _c, void 0); + __decorate([ + x + ], A.prototype, _d, void 0); + return A; +})(); void (_a = class B { constructor() { this["property2"] = 2; this[Symbol.iterator] = null; this["property4"] = 2; this[Symbol.match] = null; - this[_k] = null; - this[_m] = null; + this[_f] = null; + this[_h] = null; } }, foo(), - _j = foo(), - _k = foo(), - _l = fieldNameB, - _m = fieldNameC, + _e = foo(), + _f = foo(), + _g = fieldNameB, + _h = fieldNameC, _a); -class C { - constructor() { - this["property2"] = 2; - this[Symbol.iterator] = null; - this["property4"] = 2; - this[Symbol.match] = null; - this[_p] = null; - this[_r] = null; +const C = /** @class */ (() => { + var _a, _b, _c, _d; + class C { + constructor() { + this["property2"] = 2; + this[Symbol.iterator] = null; + this["property4"] = 2; + this[Symbol.match] = null; + this[_b] = null; + this[_d] = null; + } + [(foo(), _a = foo(), _b = foo(), _c = fieldNameB, _d = fieldNameC, "some" + "method")]() { } } - [(foo(), _o = foo(), _p = foo(), _q = fieldNameB, _r = fieldNameC, "some" + "method")]() { } -} -__decorate([ - x -], C.prototype, "property", void 0); -__decorate([ - x -], C.prototype, Symbol.toStringTag, void 0); -__decorate([ - x -], C.prototype, "property2", void 0); -__decorate([ - x -], C.prototype, Symbol.iterator, void 0); -__decorate([ - x -], C.prototype, _o, void 0); -__decorate([ - x -], C.prototype, _p, void 0); -__decorate([ - x -], C.prototype, _q, void 0); -__decorate([ - x -], C.prototype, _r, void 0); + __decorate([ + x + ], C.prototype, "property", void 0); + __decorate([ + x + ], C.prototype, Symbol.toStringTag, void 0); + __decorate([ + x + ], C.prototype, "property2", void 0); + __decorate([ + x + ], C.prototype, Symbol.iterator, void 0); + __decorate([ + x + ], C.prototype, _a, void 0); + __decorate([ + x + ], C.prototype, _b, void 0); + __decorate([ + x + ], C.prototype, _c, void 0); + __decorate([ + x + ], C.prototype, _d, void 0); + return C; +})(); void class D { constructor() { this["property2"] = 2; this[Symbol.iterator] = null; this["property4"] = 2; this[Symbol.match] = null; - this[_t] = null; - this[_v] = null; + this[_k] = null; + this[_m] = null; } - [(foo(), _s = foo(), _t = foo(), _u = fieldNameB, _v = fieldNameC, "some" + "method")]() { } + [(foo(), _j = foo(), _k = foo(), _l = fieldNameB, _m = fieldNameC, "some" + "method")]() { } }; -class E { - constructor() { - this["property2"] = 2; - this[Symbol.iterator] = null; - this["property4"] = 2; - this[Symbol.match] = null; - this[_x] = null; - this[_z] = null; +const E = /** @class */ (() => { + var _a, _b, _c, _d; + class E { + constructor() { + this["property2"] = 2; + this[Symbol.iterator] = null; + this["property4"] = 2; + this[Symbol.match] = null; + this[_b] = null; + this[_d] = null; + } + [(foo(), _a = foo(), _b = foo(), "some" + "method")]() { } } - [(foo(), _w = foo(), _x = foo(), "some" + "method")]() { } -} -_y = fieldNameB, _z = fieldNameC; -__decorate([ - x -], E.prototype, "property", void 0); -__decorate([ - x -], E.prototype, Symbol.toStringTag, void 0); -__decorate([ - x -], E.prototype, "property2", void 0); -__decorate([ - x -], E.prototype, Symbol.iterator, void 0); -__decorate([ - x -], E.prototype, _w, void 0); -__decorate([ - x -], E.prototype, _x, void 0); -__decorate([ - x -], E.prototype, _y, void 0); -__decorate([ - x -], E.prototype, _z, void 0); + _c = fieldNameB, _d = fieldNameC; + __decorate([ + x + ], E.prototype, "property", void 0); + __decorate([ + x + ], E.prototype, Symbol.toStringTag, void 0); + __decorate([ + x + ], E.prototype, "property2", void 0); + __decorate([ + x + ], E.prototype, Symbol.iterator, void 0); + __decorate([ + x + ], E.prototype, _a, void 0); + __decorate([ + x + ], E.prototype, _b, void 0); + __decorate([ + x + ], E.prototype, _c, void 0); + __decorate([ + x + ], E.prototype, _d, void 0); + return E; +})(); void (_b = class F { constructor() { this["property2"] = 2; this[Symbol.iterator] = null; this["property4"] = 2; this[Symbol.match] = null; - this[_1] = null; - this[_3] = null; + this[_p] = null; + this[_r] = null; } - [(foo(), _0 = foo(), _1 = foo(), "some" + "method")]() { } + [(foo(), _o = foo(), _p = foo(), "some" + "method")]() { } }, - _2 = fieldNameB, - _3 = fieldNameC, + _q = fieldNameB, + _r = fieldNameC, _b); -class G { - constructor() { - this["property2"] = 2; - this[Symbol.iterator] = null; - this["property4"] = 2; - this[Symbol.match] = null; - this[_5] = null; - this[_7] = null; +const G = /** @class */ (() => { + var _a, _b, _c, _d; + class G { + constructor() { + this["property2"] = 2; + this[Symbol.iterator] = null; + this["property4"] = 2; + this[Symbol.match] = null; + this[_b] = null; + this[_d] = null; + } + [(foo(), _a = foo(), _b = foo(), "some" + "method")]() { } + [(_c = fieldNameB, "some" + "method2")]() { } } - [(foo(), _4 = foo(), _5 = foo(), "some" + "method")]() { } - [(_6 = fieldNameB, "some" + "method2")]() { } -} -_7 = fieldNameC; -__decorate([ - x -], G.prototype, "property", void 0); -__decorate([ - x -], G.prototype, Symbol.toStringTag, void 0); -__decorate([ - x -], G.prototype, "property2", void 0); -__decorate([ - x -], G.prototype, Symbol.iterator, void 0); -__decorate([ - x -], G.prototype, _4, void 0); -__decorate([ - x -], G.prototype, _5, void 0); -__decorate([ - x -], G.prototype, _6, void 0); -__decorate([ - x -], G.prototype, _7, void 0); + _d = fieldNameC; + __decorate([ + x + ], G.prototype, "property", void 0); + __decorate([ + x + ], G.prototype, Symbol.toStringTag, void 0); + __decorate([ + x + ], G.prototype, "property2", void 0); + __decorate([ + x + ], G.prototype, Symbol.iterator, void 0); + __decorate([ + x + ], G.prototype, _a, void 0); + __decorate([ + x + ], G.prototype, _b, void 0); + __decorate([ + x + ], G.prototype, _c, void 0); + __decorate([ + x + ], G.prototype, _d, void 0); + return G; +})(); void (_c = class H { constructor() { this["property2"] = 2; this[Symbol.iterator] = null; this["property4"] = 2; this[Symbol.match] = null; - this[_9] = null; - this[_11] = null; + this[_t] = null; + this[_v] = null; } - [(foo(), _8 = foo(), _9 = foo(), "some" + "method")]() { } - [(_10 = fieldNameB, "some" + "method2")]() { } + [(foo(), _s = foo(), _t = foo(), "some" + "method")]() { } + [(_u = fieldNameB, "some" + "method2")]() { } }, - _11 = fieldNameC, + _v = fieldNameC, _c); -class I { - constructor() { - this["property2"] = 2; - this[Symbol.iterator] = null; - this["property4"] = 2; - this[Symbol.match] = null; - this[_13] = null; - this[_16] = null; +const I = /** @class */ (() => { + var _a, _b, _c, _d, _e; + class I { + constructor() { + this["property2"] = 2; + this[Symbol.iterator] = null; + this["property4"] = 2; + this[Symbol.match] = null; + this[_b] = null; + this[_e] = null; + } + [(foo(), _a = foo(), _b = foo(), _c = "some" + "method")]() { } + [(_d = fieldNameB, "some" + "method2")]() { } } - [(foo(), _12 = foo(), _13 = foo(), _14 = "some" + "method")]() { } - [(_15 = fieldNameB, "some" + "method2")]() { } -} -_16 = fieldNameC; -__decorate([ - x -], I.prototype, "property", void 0); -__decorate([ - x -], I.prototype, Symbol.toStringTag, void 0); -__decorate([ - x -], I.prototype, "property2", void 0); -__decorate([ - x -], I.prototype, Symbol.iterator, void 0); -__decorate([ - x -], I.prototype, _12, void 0); -__decorate([ - x -], I.prototype, _13, void 0); -__decorate([ - x -], I.prototype, _14, null); -__decorate([ - x -], I.prototype, _15, void 0); -__decorate([ - x -], I.prototype, _16, void 0); + _e = fieldNameC; + __decorate([ + x + ], I.prototype, "property", void 0); + __decorate([ + x + ], I.prototype, Symbol.toStringTag, void 0); + __decorate([ + x + ], I.prototype, "property2", void 0); + __decorate([ + x + ], I.prototype, Symbol.iterator, void 0); + __decorate([ + x + ], I.prototype, _a, void 0); + __decorate([ + x + ], I.prototype, _b, void 0); + __decorate([ + x + ], I.prototype, _c, null); + __decorate([ + x + ], I.prototype, _d, void 0); + __decorate([ + x + ], I.prototype, _e, void 0); + return I; +})(); void (_d = class J { constructor() { this["property2"] = 2; this[Symbol.iterator] = null; this["property4"] = 2; this[Symbol.match] = null; - this[_18] = null; - this[_21] = null; + this[_x] = null; + this[_0] = null; } - [(foo(), _17 = foo(), _18 = foo(), _19 = "some" + "method")]() { } - [(_20 = fieldNameB, "some" + "method2")]() { } + [(foo(), _w = foo(), _x = foo(), _y = "some" + "method")]() { } + [(_z = fieldNameB, "some" + "method2")]() { } }, - _21 = fieldNameC, + _0 = fieldNameC, _d); diff --git a/tests/baselines/reference/deepKeysIndexing.types b/tests/baselines/reference/deepKeysIndexing.types index 8e115412c20f0..2ab3088178153 100644 --- a/tests/baselines/reference/deepKeysIndexing.types +++ b/tests/baselines/reference/deepKeysIndexing.types @@ -91,7 +91,7 @@ const bar = new Bar(); // all 3 of the below should error on passing `true` for `"1"` bar.broken("a", "1", true); // was broken in the past - with 2nd argument incorrectly of type "1" | "2" | "3". ->bar.broken("a", "1", true) : any +>bar.broken("a", "1", true) : void >bar.broken : , V extends Foo[K1][K2]>(k1: K1, k2: K2, value: V) => void >bar : Bar >broken : , V extends Foo[K1][K2]>(k1: K1, k2: K2, value: V) => void @@ -100,7 +100,7 @@ bar.broken("a", "1", true); // was broken in the past - with 2nd argument incorr >true : true bar.working("a", "1", true); // ok - true is not allowed ->bar.working("a", "1", true) : any +>bar.working("a", "1", true) : void >bar.working : , V extends Foo[K1][K2]>(k1: K1, k2: K2, value: V) => void >bar : Bar >working : , V extends Foo[K1][K2]>(k1: K1, k2: K2, value: V) => void @@ -109,7 +109,7 @@ bar.working("a", "1", true); // ok - true is not allowed >true : true bar.workaround("a", "1", true); // ok - true is not allowed ->bar.workaround("a", "1", true) : any +>bar.workaround("a", "1", true) : void >bar.workaround : , V extends Foo[K1][K2]>(k1: K1, k2: K2, value: V) => void >bar : Bar >workaround : , V extends Foo[K1][K2]>(k1: K1, k2: K2, value: V) => void diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt index 805f25d8dbcd6..ef919a768ec6d 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt @@ -1,3 +1,4 @@ +tests/cases/compiler/defaultArgsInFunctionExpressions.ts(4,5): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/compiler/defaultArgsInFunctionExpressions.ts(4,19): error TS2345: Argument of type '""' is not assignable to parameter of type 'number'. tests/cases/compiler/defaultArgsInFunctionExpressions.ts(5,1): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/compiler/defaultArgsInFunctionExpressions.ts(8,20): error TS2322: Type '3' is not assignable to type 'string'. @@ -8,11 +9,13 @@ tests/cases/compiler/defaultArgsInFunctionExpressions.ts(20,62): error TS2352: C tests/cases/compiler/defaultArgsInFunctionExpressions.ts(28,15): error TS2708: Cannot use namespace 'T' as a value. -==== tests/cases/compiler/defaultArgsInFunctionExpressions.ts (8 errors) ==== +==== tests/cases/compiler/defaultArgsInFunctionExpressions.ts (9 errors) ==== var f = function (a = 3) { return a; }; // Type should be (a?: number) => number var n: number = f(4); n = f(); var s: string = f(''); + ~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. ~~ !!! error TS2345: Argument of type '""' is not assignable to parameter of type 'number'. s = f(); diff --git a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt index a59e8c59fdfcb..5b8772a881566 100644 --- a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt +++ b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt @@ -1,9 +1,11 @@ tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(2,6): error TS2339: Property 'length' does not exist on type '{}'. tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(5,6): error TS2339: Property 'length' does not exist on type 'Object'. tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(8,24): error TS2345: Argument of type '""' is not assignable to parameter of type '1'. +tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(9,27): error TS2339: Property 'length' does not exist on type 'number'. +tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(13,28): error TS2339: Property 'length' does not exist on type 'number'. -==== tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts (3 errors) ==== +==== tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts (5 errors) ==== var obj1: {}; obj1.length; ~~~~~~ @@ -19,9 +21,13 @@ tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(8,24): error TS2345: Arg ~~ !!! error TS2345: Argument of type '""' is not assignable to parameter of type '1'. var elementCount = result.length; + ~~~~~~ +!!! error TS2339: Property 'length' does not exist on type 'number'. function concat2(x: T, y: U) { return null; } var result2 = concat2(1, ""); // result2 will be number|string var elementCount2 = result.length; + ~~~~~~ +!!! error TS2339: Property 'length' does not exist on type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.types b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.types index 7fb09643d899f..90e1c6df9a339 100644 --- a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.types +++ b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.types @@ -22,8 +22,8 @@ function concat(x: T, y: T): T { return null; } >null : null var result = concat(1, ""); // error ->result : any ->concat(1, "") : any +>result : number +>concat(1, "") : 1 >concat : (x: T, y: T) => T >1 : 1 >"" : "" @@ -31,7 +31,7 @@ var result = concat(1, ""); // error var elementCount = result.length; >elementCount : any >result.length : any ->result : any +>result : number >length : any function concat2(x: T, y: U) { return null; } @@ -50,7 +50,7 @@ var result2 = concat2(1, ""); // result2 will be number|string var elementCount2 = result.length; >elementCount2 : any >result.length : any ->result : any +>result : number >length : any diff --git a/tests/baselines/reference/definiteAssignmentOfDestructuredVariable.types b/tests/baselines/reference/definiteAssignmentOfDestructuredVariable.types index 96d632736dd84..6ae08a4ae0cd2 100644 --- a/tests/baselines/reference/definiteAssignmentOfDestructuredVariable.types +++ b/tests/baselines/reference/definiteAssignmentOfDestructuredVariable.types @@ -18,20 +18,20 @@ class C { >method : () => void let { a, b } = this.foo; ->a : T["a"] +>a : T["a"] | undefined >b : T["b"] >this.foo : { [P in keyof T]: T[P]; } >this : this >foo : { [P in keyof T]: T[P]; } !(a && b); ->!(a && b) : false ->(a && b) : T["b"] ->a && b : T["b"] ->a : T["a"] +>!(a && b) : boolean +>(a && b) : T["b"] | undefined +>a && b : T["b"] | undefined +>a : T["a"] | undefined >b : T["b"] a; ->a : T["a"] +>a : T["a"] | undefined } } diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index 0df523b753138..6c7ef87451b51 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -37,7 +37,7 @@ var Base = /** @class */ (function () { }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Base; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index f80e3c38b89ea..2b7977f27ffb4 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -61,14 +61,14 @@ var Base = /** @class */ (function () { Object.defineProperty(Base.prototype, "c", { get: function () { return ''; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Base.s = function () { }; Object.defineProperty(Base, "t", { get: function () { return ''; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Base; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index f8f20fb6c00c4..9c8a5ecd12cc1 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -58,14 +58,14 @@ var Base = /** @class */ (function () { Object.defineProperty(Base.prototype, "c", { get: function () { return x; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Base.s = function (a) { }; Object.defineProperty(Base, "t", { get: function () { return x; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Base; @@ -79,14 +79,14 @@ var Derived = /** @class */ (function (_super) { Object.defineProperty(Derived.prototype, "c", { get: function () { return y; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Derived.s = function (a) { }; Object.defineProperty(Derived, "t", { get: function () { return y; }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return Derived; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 2b0e072f86531..c956c36d1e5ff 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -86,14 +86,14 @@ var Base = /** @class */ (function () { Object.defineProperty(Base.prototype, "c", { get: function () { return x; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Base.s = function (a) { }; Object.defineProperty(Base, "t", { get: function () { return x; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Base; @@ -108,14 +108,14 @@ var Derived = /** @class */ (function (_super) { Object.defineProperty(Derived.prototype, "c", { get: function () { return y; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Derived.s = function (a) { }; Object.defineProperty(Derived, "t", { get: function () { return y; }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return Derived; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index 568e7ecd32f10..d709622f3569f 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -93,14 +93,14 @@ var Base = /** @class */ (function () { Object.defineProperty(Base.prototype, "c", { get: function () { return x; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Base.s = function (a) { }; Object.defineProperty(Base, "t", { get: function () { return x; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Base; @@ -129,7 +129,7 @@ var Derived3 = /** @class */ (function (_super) { } Object.defineProperty(Derived3.prototype, "c", { get: function () { return x; }, - enumerable: true, + enumerable: false, configurable: true }); return Derived3; @@ -141,7 +141,7 @@ var Derived4 = /** @class */ (function (_super) { } Object.defineProperty(Derived4.prototype, "c", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Derived4; @@ -175,7 +175,7 @@ var Derived8 = /** @class */ (function (_super) { } Object.defineProperty(Derived8, "t", { get: function () { return x; }, - enumerable: true, + enumerable: false, configurable: true }); return Derived8; @@ -187,7 +187,7 @@ var Derived9 = /** @class */ (function (_super) { } Object.defineProperty(Derived9, "t", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Derived9; diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 6e6b27452cd12..f0c9651258b7c 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -85,14 +85,14 @@ var Base = /** @class */ (function () { Object.defineProperty(Base.prototype, "c", { get: function () { return x; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Base.s = function (a) { }; Object.defineProperty(Base, "t", { get: function () { return x; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Base; @@ -106,14 +106,14 @@ var Derived = /** @class */ (function (_super) { Object.defineProperty(Derived.prototype, "c", { get: function () { return y; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); Derived.s = function (a) { }; Object.defineProperty(Derived, "t", { get: function () { return y; }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return Derived; diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index d5f2e6309332a..57d540bed82f3 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -78,7 +78,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "X", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { @@ -88,7 +88,7 @@ var C = /** @class */ (function () { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); C.bar = function () { @@ -105,7 +105,7 @@ var D = /** @class */ (function (_super) { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); D.prototype.foo = function () { @@ -115,7 +115,7 @@ var D = /** @class */ (function (_super) { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); D.bar = function () { @@ -131,7 +131,7 @@ var E = /** @class */ (function (_super) { } Object.defineProperty(E.prototype, "X", { get: function () { return ''; }, - enumerable: true, + enumerable: false, configurable: true }); E.prototype.foo = function () { @@ -141,7 +141,7 @@ var E = /** @class */ (function (_super) { get: function () { return ''; }, - enumerable: true, + enumerable: false, configurable: true }); E.bar = function () { diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 710a400dc7ba7..550927ab3acd4 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -44,7 +44,7 @@ var Base = /** @class */ (function () { Object.defineProperty(Base.prototype, "a", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Base; @@ -61,7 +61,7 @@ var Derived = /** @class */ (function (_super) { Object.defineProperty(Derived.prototype, "a", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Derived; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index d16dd43a10951..b2fc8c9ccb0a0 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -55,7 +55,7 @@ var Base = /** @class */ (function () { Object.defineProperty(Base.prototype, "a", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Base; @@ -72,7 +72,7 @@ var Derived = /** @class */ (function (_super) { Object.defineProperty(Derived.prototype, "a", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Derived; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index c00b52f5d8623..35ef4038dd4c2 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -43,7 +43,7 @@ var Base = /** @class */ (function () { Object.defineProperty(Base, "a", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Base; @@ -60,7 +60,7 @@ var Derived = /** @class */ (function (_super) { Object.defineProperty(Derived, "a", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Derived; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index e6fb931ed946e..35b9386cd9464 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -56,7 +56,7 @@ var Base = /** @class */ (function () { Object.defineProperty(Base, "a", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Base; @@ -74,7 +74,7 @@ var Derived = /** @class */ (function (_super) { Object.defineProperty(Derived, "a", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return Derived; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.types b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.types index 3a719ebd59790..04dd1ee3717e7 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.types +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.types @@ -29,8 +29,8 @@ class Derived extends Base { } var r = new Derived(); // error ->r : any ->new Derived() : any +>r : Derived +>new Derived() : Derived >Derived : typeof Derived var r2 = new Derived(1); @@ -68,8 +68,8 @@ class D extends Base2 { } var d = new D(); // error ->d : any ->new D() : any +>d : D +>new D() : D >D : typeof D var d2 = new D(new Date()); // ok diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.types b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.types index bfe6cf18613cd..a7561b044e460 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.types +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.types @@ -38,8 +38,8 @@ class Derived extends Base { } var r = new Derived(); // error ->r : any ->new Derived() : any +>r : Derived +>new Derived() : Derived >Derived : typeof Derived var r2 = new Derived(1); @@ -101,8 +101,8 @@ class D extends Base2 { } var d = new D(); // error ->d : any ->new D() : any +>d : D +>new D() : D >D : typeof D var d2 = new D(new Date()); // ok diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.types b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.types index bb63fe1ab615b..b674626ec0038 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.types +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.types @@ -57,13 +57,13 @@ class Derived2 extends Derived { } var r = new Derived(); // error ->r : any ->new Derived() : any +>r : Derived +>new Derived() : Derived >Derived : typeof Derived var r2 = new Derived2(1); // error ->r2 : any ->new Derived2(1) : any +>r2 : Derived2 +>new Derived2(1) : Derived2 >Derived2 : typeof Derived2 >1 : 1 @@ -130,13 +130,13 @@ class D2 extends D { } var d = new D2(); // error ->d : any ->new D2() : any +>d : D2 +>new D2() : D2 >D2 : typeof D2 var d2 = new D2(new Date()); // error ->d2 : any ->new D2(new Date()) : any +>d2 : D2 +>new D2(new Date()) : D2 >D2 : typeof D2 >new Date() : Date >Date : DateConstructor diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index e5ba39f15a1a7..ef245a7ee1e86 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -61,7 +61,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "X", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { @@ -78,7 +78,7 @@ var D = /** @class */ (function (_super) { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); D.prototype.foo = function () { @@ -88,7 +88,7 @@ var D = /** @class */ (function (_super) { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); D.bar = function () { @@ -105,7 +105,7 @@ var E = /** @class */ (function (_super) { Object.defineProperty(E.prototype, "X", { get: function () { return ''; } // error , - enumerable: true, + enumerable: false, configurable: true }); E.prototype.foo = function () { diff --git a/tests/baselines/reference/destructuringAssignmentWithExportedName.js b/tests/baselines/reference/destructuringAssignmentWithExportedName.js index 4dc60ecff7766..9ebc9073a770f 100644 --- a/tests/baselines/reference/destructuringAssignmentWithExportedName.js +++ b/tests/baselines/reference/destructuringAssignmentWithExportedName.js @@ -29,6 +29,7 @@ export { exportedFoo as foo, nonexportedFoo as nfoo }; "use strict"; var _a, _b, _c, _d, _e; Object.defineProperty(exports, "__esModule", { value: true }); +exports.exportedFoo = void 0; exports.foo = exports.exportedFoo; let nonexportedFoo; exports.nonexportedFoo = nonexportedFoo; diff --git a/tests/baselines/reference/destructuringParameterDeclaration1ES5.types b/tests/baselines/reference/destructuringParameterDeclaration1ES5.types index a346856223a65..9b36241c7b0cd 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration1ES5.types +++ b/tests/baselines/reference/destructuringParameterDeclaration1ES5.types @@ -54,7 +54,7 @@ a1([1, 2, [["world"]]]); a1([1, 2, [["world"]], 3]); >a1([1, 2, [["world"]], 3]) : void >a1 : ([a, b, [[c]]]: [number, number, string[][]]) => void ->[1, 2, [["world"]], 3] : (number | string[][])[] +>[1, 2, [["world"]], 3] : [number, number, string[][], number] >1 : 1 >2 : 2 >[["world"]] : string[][] @@ -302,11 +302,11 @@ c5([1, 2, [["string"]]]); // Implied type is is [any, any, [[any]] c5([1, 2, [["string"]], false, true]); // Implied type is is [any, any, [[any]]] >c5([1, 2, [["string"]], false, true]) : void >c5 : ([a, b, [[c]]]: [any, any, [[any]]]) => void ->[1, 2, [["string"]], false, true] : (number | boolean | string[][])[] +>[1, 2, [["string"]], false, true] : [number, number, [[string]], boolean, boolean] >1 : 1 >2 : 2 ->[["string"]] : string[][] ->["string"] : string[] +>[["string"]] : [[string]] +>["string"] : [string] >"string" : "string" >false : false >true : true diff --git a/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types b/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types index 3797a5da9570e..9b7c194480c87 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types +++ b/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types @@ -54,7 +54,7 @@ a1([1, 2, [["world"]]]); a1([1, 2, [["world"]], 3]); >a1([1, 2, [["world"]], 3]) : void >a1 : ([a, b, [[c]]]: [number, number, string[][]]) => void ->[1, 2, [["world"]], 3] : (number | string[][])[] +>[1, 2, [["world"]], 3] : [number, number, string[][], number] >1 : 1 >2 : 2 >[["world"]] : string[][] @@ -302,11 +302,11 @@ c5([1, 2, [["string"]]]); // Implied type is is [any, any, [[any]] c5([1, 2, [["string"]], false, true]); // Implied type is is [any, any, [[any]]] >c5([1, 2, [["string"]], false, true]) : void >c5 : ([a, b, [[c]]]: [any, any, [[any]]]) => void ->[1, 2, [["string"]], false, true] : (number | boolean | string[][])[] +>[1, 2, [["string"]], false, true] : [number, number, [[string]], boolean, boolean] >1 : 1 >2 : 2 ->[["string"]] : string[][] ->["string"] : string[] +>[["string"]] : [[string]] +>["string"] : [string] >"string" : "string" >false : false >true : true diff --git a/tests/baselines/reference/destructuringParameterDeclaration1ES6.types b/tests/baselines/reference/destructuringParameterDeclaration1ES6.types index 04d282c76b75c..d91aebfc1bf7e 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration1ES6.types +++ b/tests/baselines/reference/destructuringParameterDeclaration1ES6.types @@ -56,7 +56,7 @@ a1([1, 2, [["world"]]]); a1([1, 2, [["world"]], 3]); >a1([1, 2, [["world"]], 3]) : void >a1 : ([a, b, [[c]]]: [number, number, string[][]]) => void ->[1, 2, [["world"]], 3] : (number | string[][])[] +>[1, 2, [["world"]], 3] : [number, number, string[][], number] >1 : 1 >2 : 2 >[["world"]] : string[][] @@ -285,11 +285,11 @@ c5([1, 2, [["string"]]]); // Implied type is is [any, any, [[any]] c5([1, 2, [["string"]], false, true]); // Implied type is is [any, any, [[any]]] >c5([1, 2, [["string"]], false, true]) : void >c5 : ([a, b, [[c]]]: [any, any, [[any]]]) => void ->[1, 2, [["string"]], false, true] : (number | boolean | string[][])[] +>[1, 2, [["string"]], false, true] : [number, number, [[string]], boolean, boolean] >1 : 1 >2 : 2 ->[["string"]] : string[][] ->["string"] : string[] +>[["string"]] : [[string]] +>["string"] : [string] >"string" : "string" >false : false >true : true diff --git a/tests/baselines/reference/destructuringParameterDeclaration2.types b/tests/baselines/reference/destructuringParameterDeclaration2.types index 27ab690860681..6780d97d02667 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration2.types +++ b/tests/baselines/reference/destructuringParameterDeclaration2.types @@ -13,7 +13,7 @@ function a0([a, b, [[c]]]: [number, number, string[][]]) { } a0([1, "string", [["world"]]); // Error >a0([1, "string", [["world"]]) : void >a0 : ([a, b, [[c]]]: [number, number, string[][]]) => void ->[1, "string", [["world"]] : (string | number | string[][])[] +>[1, "string", [["world"]] : [number, string, string[][]] >1 : 1 >"string" : "string" >[["world"]] : string[][] @@ -23,7 +23,7 @@ a0([1, "string", [["world"]]); // Error a0([1, 2, [["world"]], "string"]); // Error >a0([1, 2, [["world"]], "string"]) : void >a0 : ([a, b, [[c]]]: [number, number, string[][]]) => void ->[1, 2, [["world"]], "string"] : (string | number | string[][])[] +>[1, 2, [["world"]], "string"] : [number, number, string[][], string] >1 : 1 >2 : 2 >[["world"]] : string[][] @@ -183,7 +183,7 @@ c3({ b: true }); // Error, implied type is { b: number|string }. c5([1, 2, false, true]); // Error, implied type is [any, any, [[any]]] >c5([1, 2, false, true]) : void >c5 : ([a, b, [[c]]]: [any, any, [[any]]]) => void ->[1, 2, false, true] : (number | boolean)[] +>[1, 2, false, true] : [number, number, boolean, boolean] >1 : 1 >2 : 2 >false : false @@ -192,11 +192,11 @@ c5([1, 2, false, true]); // Error, implied type is [any, any, [[any]]] c6([1, 2, [["string"]]]); // Error, implied type is [any, any, [[number]]] // Use initializer >c6([1, 2, [["string"]]]) : void >c6 : ([a, b, [[c]]]: [any, any, [[number?]]]) => void ->[1, 2, [["string"]]] : (number | string[][])[] +>[1, 2, [["string"]]] : [number, number, [[string]]] >1 : 1 >2 : 2 ->[["string"]] : string[][] ->["string"] : string[] +>[["string"]] : [[string]] +>["string"] : [string] >"string" : "string" // A parameter can be marked optional by following its name or binding pattern with a question mark (?) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES5.types b/tests/baselines/reference/destructuringParameterDeclaration3ES5.types index a18a2c4f0a960..feaaef5858ead 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES5.types +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES5.types @@ -85,11 +85,11 @@ a1(...array); a9([1, 2, [["string"]], false, true]); // Parameter type is [any, any, [[any]]] >a9([1, 2, [["string"]], false, true]) : void >a9 : ([a, b, [[c]]]: [any, any, [[any]]]) => void ->[1, 2, [["string"]], false, true] : (number | boolean | string[][])[] +>[1, 2, [["string"]], false, true] : [number, number, [[string]], boolean, boolean] >1 : 1 >2 : 2 ->[["string"]] : string[][] ->["string"] : string[] +>[["string"]] : [[string]] +>["string"] : [string] >"string" : "string" >false : false >true : true @@ -109,7 +109,7 @@ a10([1, 2, [["string"]], false, true]); // Parameter type is any[] a10([1, 2, 3, false, true]); // Parameter type is any[] >a10([1, 2, 3, false, true]) : void >a10 : ([a, b, [[c]], ...x]: [any, any, [[any]], ...any[]]) => void ->[1, 2, 3, false, true] : (number | boolean)[] +>[1, 2, 3, false, true] : [number, number, number, boolean, boolean] >1 : 1 >2 : 2 >3 : 3 @@ -119,7 +119,7 @@ a10([1, 2, 3, false, true]); // Parameter type is any[] a10([1, 2]); // Parameter type is any[] >a10([1, 2]) : void >a10 : ([a, b, [[c]], ...x]: [any, any, [[any]], ...any[]]) => void ->[1, 2] : number[] +>[1, 2] : [number, number] >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.types b/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.types index e41c2e5d75acf..429073b17a669 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.types +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.types @@ -85,11 +85,11 @@ a1(...array); a9([1, 2, [["string"]], false, true]); // Parameter type is [any, any, [[any]]] >a9([1, 2, [["string"]], false, true]) : void >a9 : ([a, b, [[c]]]: [any, any, [[any]]]) => void ->[1, 2, [["string"]], false, true] : (number | boolean | string[][])[] +>[1, 2, [["string"]], false, true] : [number, number, [[string]], boolean, boolean] >1 : 1 >2 : 2 ->[["string"]] : string[][] ->["string"] : string[] +>[["string"]] : [[string]] +>["string"] : [string] >"string" : "string" >false : false >true : true @@ -109,7 +109,7 @@ a10([1, 2, [["string"]], false, true]); // Parameter type is any[] a10([1, 2, 3, false, true]); // Parameter type is any[] >a10([1, 2, 3, false, true]) : void >a10 : ([a, b, [[c]], ...x]: [any, any, [[any]], ...any[]]) => void ->[1, 2, 3, false, true] : (number | boolean)[] +>[1, 2, 3, false, true] : [number, number, number, boolean, boolean] >1 : 1 >2 : 2 >3 : 3 @@ -119,7 +119,7 @@ a10([1, 2, 3, false, true]); // Parameter type is any[] a10([1, 2]); // Parameter type is any[] >a10([1, 2]) : void >a10 : ([a, b, [[c]], ...x]: [any, any, [[any]], ...any[]]) => void ->[1, 2] : number[] +>[1, 2] : [number, number] >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES6.types b/tests/baselines/reference/destructuringParameterDeclaration3ES6.types index 4adacfd11ffd2..3b59fdb0da52c 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES6.types +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES6.types @@ -85,11 +85,11 @@ a1(...array); a9([1, 2, [["string"]], false, true]); // Parameter type is [any, any, [[any]]] >a9([1, 2, [["string"]], false, true]) : void >a9 : ([a, b, [[c]]]: [any, any, [[any]]]) => void ->[1, 2, [["string"]], false, true] : (number | boolean | string[][])[] +>[1, 2, [["string"]], false, true] : [number, number, [[string]], boolean, boolean] >1 : 1 >2 : 2 ->[["string"]] : string[][] ->["string"] : string[] +>[["string"]] : [[string]] +>["string"] : [string] >"string" : "string" >false : false >true : true @@ -109,7 +109,7 @@ a10([1, 2, [["string"]], false, true]); // Parameter type is any[] a10([1, 2, 3, false, true]); // Parameter type is any[] >a10([1, 2, 3, false, true]) : void >a10 : ([a, b, [[c]], ...x]: [any, any, [[any]], ...any[]]) => void ->[1, 2, 3, false, true] : (number | boolean)[] +>[1, 2, 3, false, true] : [number, number, number, boolean, boolean] >1 : 1 >2 : 2 >3 : 3 @@ -119,7 +119,7 @@ a10([1, 2, 3, false, true]); // Parameter type is any[] a10([1, 2]); // Parameter type is any[] >a10([1, 2]) : void >a10 : ([a, b, [[c]], ...x]: [any, any, [[any]], ...any[]]) => void ->[1, 2] : number[] +>[1, 2] : [number, number] >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.types b/tests/baselines/reference/destructuringParameterDeclaration4.types index 2c3a7dc5f9586..5d1ac7e4f4c1f 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.types +++ b/tests/baselines/reference/destructuringParameterDeclaration4.types @@ -69,7 +69,7 @@ a1(...array2); // Error parameter type is (number|string)[] a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, [[any]]] >a5([1, 2, "string", false, true]) : void >a5 : ([a, b, [[c]]]: [any, any, [[any]]]) => void ->[1, 2, "string", false, true] : (string | number | boolean)[] +>[1, 2, "string", false, true] : [number, number, string, boolean, boolean] >1 : 1 >2 : 2 >"string" : "string" @@ -79,7 +79,7 @@ a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, a5([1, 2]); // Error, parameter type is [any, any, [[any]]] >a5([1, 2]) : void >a5 : ([a, b, [[c]]]: [any, any, [[any]]]) => void ->[1, 2] : number[] +>[1, 2] : [number, number] >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.types b/tests/baselines/reference/destructuringParameterDeclaration5.types index e3066702b7dc1..859b391f71c54 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.types +++ b/tests/baselines/reference/destructuringParameterDeclaration5.types @@ -156,7 +156,7 @@ d3({ y: new SubClass() }); // Error d3({ y: new Class() }); ->d3({ y: new Class() }) : any +>d3({ y: new Class() }) : void >d3 : ({ y }: { y: D; }) => void >{ y: new Class() } : { y: Class; } >y : Class @@ -164,19 +164,19 @@ d3({ y: new Class() }); >Class : typeof Class d3({}); ->d3({}) : any +>d3({}) : void >d3 : ({ y }: { y: D; }) => void >{} : {} d3({ y: 1 }); ->d3({ y: 1 }) : any +>d3({ y: 1 }) : void >d3 : ({ y }: { y: D; }) => void >{ y: 1 } : { y: number; } >y : number >1 : 1 d3({ y: "world" }); ->d3({ y: "world" }) : any +>d3({ y: "world" }) : void >d3 : ({ y }: { y: D; }) => void >{ y: "world" } : { y: string; } >y : string diff --git a/tests/baselines/reference/destructuringParameterDeclaration8.types b/tests/baselines/reference/destructuringParameterDeclaration8.types index 6ca691fcff158..870cbd057647a 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration8.types +++ b/tests/baselines/reference/destructuringParameterDeclaration8.types @@ -49,22 +49,22 @@ test({ method: 'x', nested: { p: 'a' } }) test({ method: 'z', nested: { p: 'b' } }) >test({ method: 'z', nested: { p: 'b' } }) : void >test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void ->{ method: 'z', nested: { p: 'b' } } : { method: string; nested: { p: string; }; } ->method : string +>{ method: 'z', nested: { p: 'b' } } : { method: "z"; nested: { p: "b"; }; } +>method : "z" >'z' : "z" ->nested : { p: string; } ->{ p: 'b' } : { p: string; } ->p : string +>nested : { p: "b"; } +>{ p: 'b' } : { p: "b"; } +>p : "b" >'b' : "b" test({ method: 'one', nested: { p: 'a' } }) >test({ method: 'one', nested: { p: 'a' } }) : void >test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void ->{ method: 'one', nested: { p: 'a' } } : { method: string; nested: { p: string; }; } ->method : string +>{ method: 'one', nested: { p: 'a' } } : { method: "one"; nested: { p: "a"; }; } +>method : "one" >'one' : "one" ->nested : { p: string; } ->{ p: 'a' } : { p: string; } ->p : string +>nested : { p: "a"; } +>{ p: 'a' } : { p: "a"; } +>p : "a" >'a' : "a" diff --git a/tests/baselines/reference/destructuringParameterProperties2.symbols b/tests/baselines/reference/destructuringParameterProperties2.symbols index 3b1662111e49b..b89a8fdb791dc 100644 --- a/tests/baselines/reference/destructuringParameterProperties2.symbols +++ b/tests/baselines/reference/destructuringParameterProperties2.symbols @@ -57,9 +57,15 @@ var [x_a, x_b, x_c] = [x.getA(), x.getB(), x.getC()]; >x_a : Symbol(x_a, Decl(destructuringParameterProperties2.ts, 21, 5)) >x_b : Symbol(x_b, Decl(destructuringParameterProperties2.ts, 21, 9)) >x_c : Symbol(x_c, Decl(destructuringParameterProperties2.ts, 21, 14)) +>x.getA : Symbol(C1.getA, Decl(destructuringParameterProperties2.ts, 5, 5)) >x : Symbol(x, Decl(destructuringParameterProperties2.ts, 20, 3)) +>getA : Symbol(C1.getA, Decl(destructuringParameterProperties2.ts, 5, 5)) +>x.getB : Symbol(C1.getB, Decl(destructuringParameterProperties2.ts, 9, 5)) >x : Symbol(x, Decl(destructuringParameterProperties2.ts, 20, 3)) +>getB : Symbol(C1.getB, Decl(destructuringParameterProperties2.ts, 9, 5)) +>x.getC : Symbol(C1.getC, Decl(destructuringParameterProperties2.ts, 13, 5)) >x : Symbol(x, Decl(destructuringParameterProperties2.ts, 20, 3)) +>getC : Symbol(C1.getC, Decl(destructuringParameterProperties2.ts, 13, 5)) var y = new C1(10, [0, "", true]); >y : Symbol(y, Decl(destructuringParameterProperties2.ts, 23, 3)) diff --git a/tests/baselines/reference/destructuringParameterProperties2.types b/tests/baselines/reference/destructuringParameterProperties2.types index 3b9ea8d273f3a..54b6959f8fbcf 100644 --- a/tests/baselines/reference/destructuringParameterProperties2.types +++ b/tests/baselines/reference/destructuringParameterProperties2.types @@ -71,11 +71,11 @@ class C1 { } var x = new C1(undefined, [0, undefined, ""]); ->x : any ->new C1(undefined, [0, undefined, ""]) : any +>x : C1 +>new C1(undefined, [0, undefined, ""]) : C1 >C1 : typeof C1 >undefined : undefined ->[0, undefined, ""] : (string | number)[] +>[0, undefined, ""] : [number, undefined, string] >0 : 0 >undefined : undefined >"" : "" @@ -86,17 +86,17 @@ var [x_a, x_b, x_c] = [x.getA(), x.getB(), x.getC()]; >x_c : any >[x.getA(), x.getB(), x.getC()] : [any, any, any] >x.getA() : any ->x.getA : any ->x : any ->getA : any +>x.getA : () => any +>x : C1 +>getA : () => any >x.getB() : any ->x.getB : any ->x : any ->getB : any +>x.getB : () => any +>x : C1 +>getB : () => any >x.getC() : any ->x.getC : any ->x : any ->getC : any +>x.getC : () => any +>x : C1 +>getC : () => any var y = new C1(10, [0, "", true]); >y : C1 diff --git a/tests/baselines/reference/destructuringParameterProperties5.errors.txt b/tests/baselines/reference/destructuringParameterProperties5.errors.txt index fa57ae150a053..6e0f017341da5 100644 --- a/tests/baselines/reference/destructuringParameterProperties5.errors.txt +++ b/tests/baselines/reference/destructuringParameterProperties5.errors.txt @@ -11,9 +11,14 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1 Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,47): error TS2322: Type 'string' is not assignable to type 'number'. tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,51): error TS2322: Type 'false' is not assignable to type 'string'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(12,39): error TS2339: Property 'x1' does not exist on type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(12,45): error TS2339: Property 'x2' does not exist on type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(12,51): error TS2339: Property 'x3' does not exist on type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(12,57): error TS2339: Property 'y' does not exist on type 'C1'. +tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(12,62): error TS2339: Property 'z' does not exist on type 'C1'. -==== tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts (12 errors) ==== +==== tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts (17 errors) ==== type ObjType1 = { x: number; y: string; z: boolean } type TupleType1 = [ObjType1, number, string] @@ -50,4 +55,14 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1 !!! error TS2322: Type 'string' is not assignable to type 'number'. ~~~~~ !!! error TS2322: Type 'false' is not assignable to type 'string'. - var [a_x1, a_x2, a_x3, a_y, a_z] = [a.x1, a.x2, a.x3, a.y, a.z]; \ No newline at end of file + var [a_x1, a_x2, a_x3, a_y, a_z] = [a.x1, a.x2, a.x3, a.y, a.z]; + ~~ +!!! error TS2339: Property 'x1' does not exist on type 'C1'. + ~~ +!!! error TS2339: Property 'x2' does not exist on type 'C1'. + ~~ +!!! error TS2339: Property 'x3' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'z' does not exist on type 'C1'. \ No newline at end of file diff --git a/tests/baselines/reference/destructuringParameterProperties5.types b/tests/baselines/reference/destructuringParameterProperties5.types index 976b79e94957b..58d3b6d005dc6 100644 --- a/tests/baselines/reference/destructuringParameterProperties5.types +++ b/tests/baselines/reference/destructuringParameterProperties5.types @@ -55,10 +55,10 @@ class C1 { } var a = new C1([{ x1: 10, x2: "", x3: true }, "", false]); ->a : any ->new C1([{ x1: 10, x2: "", x3: true }, "", false]) : any +>a : C1 +>new C1([{ x1: 10, x2: "", x3: true }, "", false]) : C1 >C1 : typeof C1 ->[{ x1: 10, x2: "", x3: true }, "", false] : (string | boolean | { x1: number; x2: string; x3: boolean; })[] +>[{ x1: 10, x2: "", x3: true }, "", false] : [{ x1: number; x2: string; x3: boolean; }, string, boolean] >{ x1: 10, x2: "", x3: true } : { x1: number; x2: string; x3: boolean; } >x1 : number >10 : 10 @@ -77,18 +77,18 @@ var [a_x1, a_x2, a_x3, a_y, a_z] = [a.x1, a.x2, a.x3, a.y, a.z]; >a_z : any >[a.x1, a.x2, a.x3, a.y, a.z] : [any, any, any, any, any] >a.x1 : any ->a : any +>a : C1 >x1 : any >a.x2 : any ->a : any +>a : C1 >x2 : any >a.x3 : any ->a : any +>a : C1 >x3 : any >a.y : any ->a : any +>a : C1 >y : any >a.z : any ->a : any +>a : C1 >z : any diff --git a/tests/baselines/reference/destructuringSpread.errors.txt b/tests/baselines/reference/destructuringSpread.errors.txt new file mode 100644 index 0000000000000..b9cd4a85d850e --- /dev/null +++ b/tests/baselines/reference/destructuringSpread.errors.txt @@ -0,0 +1,34 @@ +tests/cases/conformance/es6/destructuring/destructuringSpread.ts(16,21): error TS2525: Initializer provides no value for this binding element and the binding element has no default value. + + +==== tests/cases/conformance/es6/destructuring/destructuringSpread.ts (1 errors) ==== + const { x } = { + ...{}, + x: 0 + }; + + const { y } = { + y: 0, + ...{} + }; + + const { z, a, b } = { + z: 0, + ...{ a: 0, b: 0 } + }; + + const { c, d, e, f, g } = { + ~ +!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value. + ...{ + ...{ + ...{ + c: 0, + }, + d: 0 + }, + e: 0 + }, + f: 0 + }; + \ No newline at end of file diff --git a/tests/baselines/reference/destructuringSpread.js b/tests/baselines/reference/destructuringSpread.js new file mode 100644 index 0000000000000..e5e146d0e3433 --- /dev/null +++ b/tests/baselines/reference/destructuringSpread.js @@ -0,0 +1,48 @@ +//// [destructuringSpread.ts] +const { x } = { + ...{}, + x: 0 +}; + +const { y } = { + y: 0, + ...{} +}; + +const { z, a, b } = { + z: 0, + ...{ a: 0, b: 0 } +}; + +const { c, d, e, f, g } = { + ...{ + ...{ + ...{ + c: 0, + }, + d: 0 + }, + e: 0 + }, + f: 0 +}; + + +//// [destructuringSpread.js] +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var x = __assign({}, { x: 0 }).x; +var y = __assign({ y: 0 }, {}).y; +var _a = __assign({ z: 0 }, { a: 0, b: 0 }), z = _a.z, a = _a.a, b = _a.b; +var _b = __assign(__assign({}, __assign(__assign({}, __assign({ + c: 0 +}, { d: 0 })), { e: 0 })), { f: 0 }), c = _b.c, d = _b.d, e = _b.e, f = _b.f, g = _b.g; diff --git a/tests/baselines/reference/destructuringSpread.symbols b/tests/baselines/reference/destructuringSpread.symbols new file mode 100644 index 0000000000000..eaee771f3e18a --- /dev/null +++ b/tests/baselines/reference/destructuringSpread.symbols @@ -0,0 +1,60 @@ +=== tests/cases/conformance/es6/destructuring/destructuringSpread.ts === +const { x } = { +>x : Symbol(x, Decl(destructuringSpread.ts, 0, 7)) + + ...{}, + x: 0 +>x : Symbol(x, Decl(destructuringSpread.ts, 1, 8)) + +}; + +const { y } = { +>y : Symbol(y, Decl(destructuringSpread.ts, 5, 7)) + + y: 0, +>y : Symbol(y, Decl(destructuringSpread.ts, 5, 15)) + + ...{} +}; + +const { z, a, b } = { +>z : Symbol(z, Decl(destructuringSpread.ts, 10, 7)) +>a : Symbol(a, Decl(destructuringSpread.ts, 10, 10)) +>b : Symbol(b, Decl(destructuringSpread.ts, 10, 13)) + + z: 0, +>z : Symbol(z, Decl(destructuringSpread.ts, 10, 21)) + + ...{ a: 0, b: 0 } +>a : Symbol(a, Decl(destructuringSpread.ts, 12, 6)) +>b : Symbol(b, Decl(destructuringSpread.ts, 12, 12)) + +}; + +const { c, d, e, f, g } = { +>c : Symbol(c, Decl(destructuringSpread.ts, 15, 7)) +>d : Symbol(d, Decl(destructuringSpread.ts, 15, 10)) +>e : Symbol(e, Decl(destructuringSpread.ts, 15, 13)) +>f : Symbol(f, Decl(destructuringSpread.ts, 15, 16)) +>g : Symbol(g, Decl(destructuringSpread.ts, 15, 19)) + + ...{ + ...{ + ...{ + c: 0, +>c : Symbol(c, Decl(destructuringSpread.ts, 18, 10)) + + }, + d: 0 +>d : Symbol(d, Decl(destructuringSpread.ts, 20, 8)) + + }, + e: 0 +>e : Symbol(e, Decl(destructuringSpread.ts, 22, 6)) + + }, + f: 0 +>f : Symbol(f, Decl(destructuringSpread.ts, 24, 4)) + +}; + diff --git a/tests/baselines/reference/destructuringSpread.types b/tests/baselines/reference/destructuringSpread.types new file mode 100644 index 0000000000000..14911b8b7f163 --- /dev/null +++ b/tests/baselines/reference/destructuringSpread.types @@ -0,0 +1,84 @@ +=== tests/cases/conformance/es6/destructuring/destructuringSpread.ts === +const { x } = { +>x : number +>{ ...{}, x: 0} : { x: number; } + + ...{}, +>{} : {} + + x: 0 +>x : number +>0 : 0 + +}; + +const { y } = { +>y : number +>{ y: 0, ...{}} : { y: number; } + + y: 0, +>y : number +>0 : 0 + + ...{} +>{} : {} + +}; + +const { z, a, b } = { +>z : number +>a : number +>b : number +>{ z: 0, ...{ a: 0, b: 0 }} : { a: number; b: number; z: number; } + + z: 0, +>z : number +>0 : 0 + + ...{ a: 0, b: 0 } +>{ a: 0, b: 0 } : { a: number; b: number; } +>a : number +>0 : 0 +>b : number +>0 : 0 + +}; + +const { c, d, e, f, g } = { +>c : number +>d : number +>e : number +>f : number +>g : any +>{ ...{ ...{ ...{ c: 0, }, d: 0 }, e: 0 }, f: 0} : { f: number; g: any; e: number; d: number; c: number; } + + ...{ +>{ ...{ ...{ c: 0, }, d: 0 }, e: 0 } : { e: number; d: number; c: number; } + + ...{ +>{ ...{ c: 0, }, d: 0 } : { d: number; c: number; } + + ...{ +>{ c: 0, } : { c: number; } + + c: 0, +>c : number +>0 : 0 + + }, + d: 0 +>d : number +>0 : 0 + + }, + e: 0 +>e : number +>0 : 0 + + }, + f: 0 +>f : number +>0 : 0 + +}; + diff --git a/tests/baselines/reference/destructuringTuple.errors.txt b/tests/baselines/reference/destructuringTuple.errors.txt index 0f3c3c3618230..67700d89b5ad2 100644 --- a/tests/baselines/reference/destructuringTuple.errors.txt +++ b/tests/baselines/reference/destructuringTuple.errors.txt @@ -1,4 +1,11 @@ -tests/cases/compiler/destructuringTuple.ts(11,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'. +tests/cases/compiler/destructuringTuple.ts(11,7): error TS2461: Type 'number' is not an array type. +tests/cases/compiler/destructuringTuple.ts(11,48): error TS2769: No overload matches this call. + Overload 1 of 3, '(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number', gave the following error. + Type 'never[]' is not assignable to type 'number'. + Overload 2 of 3, '(callbackfn: (previousValue: [], currentValue: number, currentIndex: number, array: number[]) => [], initialValue: []): []', gave the following error. + Type 'never[]' is not assignable to type '[]'. + Types of property 'length' are incompatible. + Type 'number' is not assignable to type '0'. tests/cases/compiler/destructuringTuple.ts(11,60): error TS2769: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. Argument of type 'number' is not assignable to parameter of type 'ConcatArray'. @@ -6,7 +13,7 @@ tests/cases/compiler/destructuringTuple.ts(11,60): error TS2769: No overload mat Argument of type 'number' is not assignable to parameter of type 'ConcatArray'. -==== tests/cases/compiler/destructuringTuple.ts (2 errors) ==== +==== tests/cases/compiler/destructuringTuple.ts (3 errors) ==== declare var tuple: [boolean, number, ...string[]]; const [a, b, c, ...rest] = tuple; @@ -18,8 +25,18 @@ tests/cases/compiler/destructuringTuple.ts(11,60): error TS2769: No overload mat // Repros from #32140 const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []); - ~~~~~ -!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'. + ~~~~~~~ +!!! error TS2461: Type 'number' is not an array type. + ~~~~~~~~~~~~~~~ +!!! error TS2769: No overload matches this call. +!!! error TS2769: Overload 1 of 3, '(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number', gave the following error. +!!! error TS2769: Type 'never[]' is not assignable to type 'number'. +!!! error TS2769: Overload 2 of 3, '(callbackfn: (previousValue: [], currentValue: number, currentIndex: number, array: number[]) => [], initialValue: []): []', gave the following error. +!!! error TS2769: Type 'never[]' is not assignable to type '[]'. +!!! error TS2769: Types of property 'length' are incompatible. +!!! error TS2769: Type 'number' is not assignable to type '0'. +!!! related TS6502 /.ts/lib.es5.d.ts:1350:24: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1356:27: The expected type comes from the return type of this signature. ~~ !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. diff --git a/tests/baselines/reference/destructuringTuple.types b/tests/baselines/reference/destructuringTuple.types index 466e4495a1646..0227d82572ddc 100644 --- a/tests/baselines/reference/destructuringTuple.types +++ b/tests/baselines/reference/destructuringTuple.types @@ -15,7 +15,7 @@ declare var receiver: typeof tuple; [...receiver] = tuple; >[...receiver] = tuple : [boolean, number, ...string[]] ->[...receiver] : (string | number | boolean)[] +>[...receiver] : [boolean, number, ...string[]] >...receiver : string | number | boolean >receiver : [boolean, number, ...string[]] >tuple : [boolean, number, ...string[]] @@ -23,23 +23,23 @@ declare var receiver: typeof tuple; // Repros from #32140 const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []); ->oops1 : undefined ->[1, 2, 3].reduce((accu, el) => accu.concat(el), []) : [] +>oops1 : any +>[1, 2, 3].reduce((accu, el) => accu.concat(el), []) : number >[1, 2, 3].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; } >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 >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; } ->(accu, el) => accu.concat(el) : (accu: [], el: number) => any +>(accu, el) => accu.concat(el) : (accu: [], el: number) => never[] >accu : [] >el : number ->accu.concat(el) : any +>accu.concat(el) : never[] >accu.concat : { (...items: ConcatArray[]): never[]; (...items: ConcatArray[]): never[]; } >accu : [] >concat : { (...items: ConcatArray[]): never[]; (...items: ConcatArray[]): never[]; } >el : number ->[] : [] +>[] : never[] const [oops2] = [1, 2, 3].reduce((acc: number[], e) => acc.concat(e), []); >oops2 : number diff --git a/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.types b/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.types index bd60a27864513..8bf53bf6dd025 100644 --- a/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.types +++ b/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.types @@ -71,7 +71,7 @@ foo({ }, getNum(), [ >getNum() : number >getNum : () => number ->[ 1, 2, getNum] : (number | (() => number))[] +>[ 1, 2, getNum] : [number, number, () => number] 1, >1 : 1 diff --git a/tests/baselines/reference/discriminableUnionWithIntersectedMembers.js b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.js new file mode 100644 index 0000000000000..3be6283454be0 --- /dev/null +++ b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.js @@ -0,0 +1,21 @@ +//// [discriminableUnionWithIntersectedMembers.ts] +// regression test for https://github.com/microsoft/TypeScript/issues/33243 +type X = + | { x: 'x', y: number } & { y: number } + | { x: 'y', y: number, z?: boolean } & { y: number } + +// error +const x: X = 4 as any as { x: 'x' | 'y', y: number }; + +type Y = + | { x: 'x', y: number } + | { x: 'y', y: number, z?: boolean } + +// no error +const y: Y = 4 as any as { x: 'x' | 'y', y: number }; + +//// [discriminableUnionWithIntersectedMembers.js] +// error +var x = 4; +// no error +var y = 4; diff --git a/tests/baselines/reference/discriminableUnionWithIntersectedMembers.symbols b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.symbols new file mode 100644 index 0000000000000..49725db5bfb0d --- /dev/null +++ b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.symbols @@ -0,0 +1,42 @@ +=== tests/cases/compiler/discriminableUnionWithIntersectedMembers.ts === +// regression test for https://github.com/microsoft/TypeScript/issues/33243 +type X = +>X : Symbol(X, Decl(discriminableUnionWithIntersectedMembers.ts, 0, 0)) + + | { x: 'x', y: number } & { y: number } +>x : Symbol(x, Decl(discriminableUnionWithIntersectedMembers.ts, 2, 4)) +>y : Symbol(y, Decl(discriminableUnionWithIntersectedMembers.ts, 2, 12)) +>y : Symbol(y, Decl(discriminableUnionWithIntersectedMembers.ts, 2, 28)) + + | { x: 'y', y: number, z?: boolean } & { y: number } +>x : Symbol(x, Decl(discriminableUnionWithIntersectedMembers.ts, 3, 4)) +>y : Symbol(y, Decl(discriminableUnionWithIntersectedMembers.ts, 3, 12)) +>z : Symbol(z, Decl(discriminableUnionWithIntersectedMembers.ts, 3, 23)) +>y : Symbol(y, Decl(discriminableUnionWithIntersectedMembers.ts, 3, 41)) + +// error +const x: X = 4 as any as { x: 'x' | 'y', y: number }; +>x : Symbol(x, Decl(discriminableUnionWithIntersectedMembers.ts, 6, 5)) +>X : Symbol(X, Decl(discriminableUnionWithIntersectedMembers.ts, 0, 0)) +>x : Symbol(x, Decl(discriminableUnionWithIntersectedMembers.ts, 6, 26)) +>y : Symbol(y, Decl(discriminableUnionWithIntersectedMembers.ts, 6, 40)) + +type Y = +>Y : Symbol(Y, Decl(discriminableUnionWithIntersectedMembers.ts, 6, 53)) + + | { x: 'x', y: number } +>x : Symbol(x, Decl(discriminableUnionWithIntersectedMembers.ts, 9, 4)) +>y : Symbol(y, Decl(discriminableUnionWithIntersectedMembers.ts, 9, 12)) + + | { x: 'y', y: number, z?: boolean } +>x : Symbol(x, Decl(discriminableUnionWithIntersectedMembers.ts, 10, 4)) +>y : Symbol(y, Decl(discriminableUnionWithIntersectedMembers.ts, 10, 12)) +>z : Symbol(z, Decl(discriminableUnionWithIntersectedMembers.ts, 10, 23)) + +// no error +const y: Y = 4 as any as { x: 'x' | 'y', y: number }; +>y : Symbol(y, Decl(discriminableUnionWithIntersectedMembers.ts, 13, 5)) +>Y : Symbol(Y, Decl(discriminableUnionWithIntersectedMembers.ts, 6, 53)) +>x : Symbol(x, Decl(discriminableUnionWithIntersectedMembers.ts, 13, 26)) +>y : Symbol(y, Decl(discriminableUnionWithIntersectedMembers.ts, 13, 40)) + diff --git a/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types new file mode 100644 index 0000000000000..8f7899806f6d7 --- /dev/null +++ b/tests/baselines/reference/discriminableUnionWithIntersectedMembers.types @@ -0,0 +1,46 @@ +=== tests/cases/compiler/discriminableUnionWithIntersectedMembers.ts === +// regression test for https://github.com/microsoft/TypeScript/issues/33243 +type X = +>X : X + + | { x: 'x', y: number } & { y: number } +>x : "x" +>y : number +>y : number + + | { x: 'y', y: number, z?: boolean } & { y: number } +>x : "y" +>y : number +>z : boolean +>y : number + +// error +const x: X = 4 as any as { x: 'x' | 'y', y: number }; +>x : X +>4 as any as { x: 'x' | 'y', y: number } : { x: "x" | "y"; y: number; } +>4 as any : any +>4 : 4 +>x : "x" | "y" +>y : number + +type Y = +>Y : Y + + | { x: 'x', y: number } +>x : "x" +>y : number + + | { x: 'y', y: number, z?: boolean } +>x : "y" +>y : number +>z : boolean + +// no error +const y: Y = 4 as any as { x: 'x' | 'y', y: number }; +>y : Y +>4 as any as { x: 'x' | 'y', y: number } : { x: "x" | "y"; y: number; } +>4 as any : any +>4 : 4 +>x : "x" | "y" +>y : number + diff --git a/tests/baselines/reference/docker/azure-sdk.log b/tests/baselines/reference/docker/azure-sdk.log index a8a12bd94808a..9e59547a43878 100644 --- a/tests/baselines/reference/docker/azure-sdk.log +++ b/tests/baselines/reference/docker/azure-sdk.log @@ -2,7 +2,7 @@ Exit Code: 1 Standard output: Rush Multi-Project Build Tool 5.X.X - https://rushjs.io -Node.js version is 12.14.1 (LTS) +Node.js version is 12.16.1 (LTS) Starting "rush rebuild" Executing a maximum of ?simultaneous processes... XX of XX: [@azure/abort-controller] completed successfully in ? seconds @@ -15,46 +15,48 @@ XX of XX: [@azure/core-amqp] completed successfully in ? seconds XX of XX: [@azure/core-lro] completed successfully in ? seconds XX of XX: [@azure/core-paging] completed successfully in ? seconds XX of XX: [@azure/test-utils-recorder] completed successfully in ? seconds +XX of XX: [@azure/eslint-plugin-azure-sdk] completed successfully in ? seconds XX of XX: [@azure/event-hubs] completed successfully in ? seconds XX of XX: [@azure/event-processor-host] completed successfully in ? seconds -XX of XX: [@azure/keyvault-keys] completed successfully in ? seconds -XX of XX: [@azure/keyvault-secrets] completed successfully in ? seconds -XX of XX: [@azure/storage-blob] completed successfully in ? seconds -XX of XX: [@azure/ai-text-analytics] completed successfully in ? seconds -XX of XX: [@azure/core-arm] completed successfully in ? seconds -XX of XX: [@azure/core-tracing] completed successfully in ? seconds -dist-esm/index.js → dist/index.js... -(!) Unresolved dependencies -https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency -os-name (imported by dist-esm/utils/user-agent.js) -(!) Missing global variable name -Use output.globals to specify browser global variable names corresponding to external modules -os-name (guessing 'osName') -created dist/index.js in ?s npm ERR! code ELIFECYCLE npm ERR! errno 2 -npm ERR! @azure/keyvault-certificates@X.X.X extract-api: `tsc -p . && api-extractor run --local` +npm ERR! @azure/keyvault-keys@X.X.X extract-api: `tsc -p . && api-extractor run --local` npm ERR! Exit status 2 npm ERR! -npm ERR! Failed at the @azure/keyvault-certificates@X.X.X extract-api script. +npm ERR! Failed at the @azure/keyvault-keys@X.X.X extract-api script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log -XX of XX: [@azure/service-bus] completed successfully in ? seconds npm ERR! code ELIFECYCLE npm ERR! errno 2 -npm ERR! @azure/storage-file-datalake@X.X.X-preview.7 build:es6: `tsc -p tsconfig.json` +npm ERR! @azure/keyvault-secrets@X.X.X extract-api: `tsc -p . && api-extractor run --local` npm ERR! Exit status 2 npm ERR! -npm ERR! Failed at the @azure/storage-file-datalake@X.X.X-preview.7 build:es?script. +npm ERR! Failed at the @azure/keyvault-secrets@X.X.X extract-api script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log +XX of XX: [@azure/storage-blob] completed successfully in ? seconds +XX of XX: [@azure/ai-text-analytics] completed successfully in ? seconds +XX of XX: [@azure/app-configuration] completed successfully in ? seconds +XX of XX: [@azure/core-arm] completed successfully in ? seconds +XX of XX: [@azure/core-tracing] completed successfully in ? seconds +dist-esm/index.js → dist/index.js... +(!) Unresolved dependencies +https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency +os-name (imported by dist-esm/utils/user-agent.js) +(!) Missing global variable name +Use output.globals to specify browser global variable names corresponding to external modules +os-name (guessing 'osName') +created dist/index.js in ?s +XX of XX: [@azure/eventhubs-checkpointstore-blob] completed successfully in ? seconds +XX of XX: [@azure/service-bus] completed successfully in ? seconds +XX of XX: [@azure/storage-file-datalake] completed successfully in ? seconds XX of XX: [@azure/storage-file-share] completed successfully in ? seconds XX of XX: [@azure/storage-queue] completed successfully in ? seconds XX of XX: [@azure/template] completed successfully in ? seconds XX of XX: [testhub] completed successfully in ? seconds -SUCCESS (23) +SUCCESS (25) ================================ @azure/abort-controller (? seconds) @azure/core-auth (? seconds) @@ -66,15 +68,17 @@ SUCCESS (23) @azure/core-lro (? seconds) @azure/core-paging (? seconds) @azure/test-utils-recorder (? seconds) +@azure/eslint-plugin-azure-sdk (? seconds) @azure/event-hubs (? seconds) @azure/event-processor-host (? seconds) -@azure/keyvault-keys (? seconds) -@azure/keyvault-secrets (? seconds) @azure/storage-blob (? seconds) @azure/ai-text-analytics (? seconds) +@azure/app-configuration (? seconds) @azure/core-arm (? seconds) @azure/core-tracing (? seconds) +@azure/eventhubs-checkpointstore-blob (? seconds) @azure/service-bus (? seconds) +@azure/storage-file-datalake (? seconds) @azure/storage-file-share (? seconds) @azure/storage-queue (? seconds) @azure/template (? seconds) @@ -92,77 +96,43 @@ Use output.globals to specify browser global variable names corresponding to ext os-name (guessing 'osName') created dist/index.js in ?s ================================ -FAILURE (4) +BLOCKED (1) ================================ -@azure/app-configuration ( ? seconds) ->>> @azure/app-configuration -tsc -p . && rollup -c 2>&1 && npm run extract-api -test/testHelpers.ts(74,31): error TS2322: Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterable'. - Types of property '[Symbol.asyncIterator]' are incompatible. - Type '() => PagedAsyncIterableIterator' is not assignable to type '() => AsyncIterator'. - Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterator'. - Types of property 'next' are incompatible. - Type '() => Promise<{ done?: boolean | undefined; value: ConfigurationSetting; }>' is not assignable to type '(value?: any) => Promise>'. - Type 'Promise<{ done?: boolean | undefined; value: ConfigurationSetting; }>' is not assignable to type 'Promise>'. - Type '{ done?: boolean | undefined; value: ConfigurationSetting; }' is not assignable to type 'IteratorResult'. - Types of property 'done' are incompatible. - Type 'boolean | undefined' is not assignable to type 'boolean'. - Type 'undefined' is not assignable to type 'boolean'. -test/testHelpers.ts(92,31): error TS2322: Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterable'. - Types of property '[Symbol.asyncIterator]' are incompatible. - Type '() => PagedAsyncIterableIterator' is not assignable to type '() => AsyncIterator'. - Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterator'. - Types of property 'next' are incompatible. - Type '() => Promise<{ done?: boolean | undefined; value: ConfigurationSetting; }>' is not assignable to type '(value?: any) => Promise>'. - Type 'Promise<{ done?: boolean | undefined; value: ConfigurationSetting; }>' is not assignable to type 'Promise>'. -@azure/eventhubs-checkpointstore-blob ( ? seconds) ->>> @azure/eventhubs-checkpointstore-blob -tsc -p . && rollup -c 2>&1 && npm run extract-api -src/blobCheckpointStore.ts(50,32): error TS2322: Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterable'. - Types of property '[Symbol.asyncIterator]' are incompatible. - Type '() => PagedAsyncIterableIterator' is not assignable to type '() => AsyncIterator'. - Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterator'. - Types of property 'next' are incompatible. - Type '() => Promise<{ done?: boolean | undefined; value: BlobItem; }>' is not assignable to type '(value?: any) => Promise>'. - Type 'Promise<{ done?: boolean | undefined; value: BlobItem; }>' is not assignable to type 'Promise>'. - Type '{ done?: boolean | undefined; value: BlobItem; }' is not assignable to type 'IteratorResult'. - Types of property 'done' are incompatible. - Type 'boolean | undefined' is not assignable to type 'boolean'. - Type 'undefined' is not assignable to type 'boolean'. -@azure/keyvault-certificates ( ? seconds) +@azure/keyvault-certificates +================================ +FAILURE (2) +================================ +@azure/keyvault-keys ( ? seconds) npm ERR! code ELIFECYCLE npm ERR! errno 2 -npm ERR! @azure/keyvault-certificates@X.X.X extract-api: `tsc -p . && api-extractor run --local` +npm ERR! @azure/keyvault-keys@X.X.X extract-api: `tsc -p . && api-extractor run --local` npm ERR! Exit status 2 npm ERR! -npm ERR! Failed at the @azure/keyvault-certificates@X.X.X extract-api script. +npm ERR! Failed at the @azure/keyvault-keys@X.X.X extract-api script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log -@azure/storage-file-datalake (? seconds) +@azure/keyvault-secrets ( ? seconds) npm ERR! code ELIFECYCLE npm ERR! errno 2 -npm ERR! @azure/storage-file-datalake@X.X.X-preview.7 build:es6: `tsc -p tsconfig.json` +npm ERR! @azure/keyvault-secrets@X.X.X extract-api: `tsc -p . && api-extractor run --local` npm ERR! Exit status 2 npm ERR! -npm ERR! Failed at the @azure/storage-file-datalake@X.X.X-preview.7 build:es?script. +npm ERR! Failed at the @azure/keyvault-secrets@X.X.X extract-api script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log ================================ -Error: Project(s) failed to build +Error: Project(s) failed rush rebuild - Errors! ( ? seconds) Standard error: -XX of XX: [@azure/app-configuration] failed to build! +XX of XX: [@azure/keyvault-keys] failed! +XX of XX: [@azure/keyvault-certificates] blocked by [@azure/keyvault-keys]! +XX of XX: [@azure/keyvault-secrets] failed! XX of XX: [@azure/cosmos] completed with warnings in ? seconds -XX of XX: [@azure/eventhubs-checkpointstore-blob] failed to build! -XX of XX: [@azure/keyvault-certificates] failed to build! -XX of XX: [@azure/storage-file-datalake] failed to build! -[@azure/app-configuration] Returned error code: 2 -[@azure/eventhubs-checkpointstore-blob] Returned error code: 2 -[@azure/keyvault-certificates] Returned error code: 2 -[@azure/storage-file-datalake] Returned error code: 2 +[@azure/keyvault-keys] Returned error code: 2 +[@azure/keyvault-secrets] Returned error code: 2 diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index 4432930782959..778cf93e3e83f 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -1,36 +1,35 @@ Exit Code: 1 Standard output: +@fluentui/ability-attributes: yarn run vX.X.X +@fluentui/ability-attributes: $ npm run schema && gulp bundle:package:no-umd +@fluentui/ability-attributes: > @fluentui/ability-attributes@X.X.X schema /office-ui-fabric-react/packages/fluentui/ability-attributes +@fluentui/ability-attributes: > allyschema -c "process.env.NODE_ENV !== 'production'" schema.json > ./src/schema.ts +@fluentui/ability-attributes: [XX:XX:XX] Requiring external module @uifabric/build/babel/register +@fluentui/ability-attributes: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/ability-attributes/gulpfile.ts +@fluentui/ability-attributes: Done in ?s. +@fluentui/digest: yarn run vX.X.X +@fluentui/digest: $ just-scripts build +@fluentui/digest: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/fluentui/digest/tsconfig.json +@fluentui/digest: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --module esnext --outDir lib --project "/office-ui-fabric-react/packages/fluentui/digest/tsconfig.json" +@fluentui/digest: [XX:XX:XX XM] ■ Running Webpack +@fluentui/digest: [XX:XX:XX XM] ■ Webpack Config Path: null +@fluentui/digest: [XX:XX:XX XM] ■ webpack.config.js not found, skipping webpack +@fluentui/digest: Done in ?s. +@fluentui/docs-components: yarn run vX.X.X +@fluentui/docs-components: $ gulp bundle:package:no-umd +@fluentui/docs-components: [XX:XX:XX] Requiring external module @uifabric/build/babel/register +@fluentui/docs-components: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/docs-components/gulpfile.ts +@fluentui/docs-components: Done in ?s. @uifabric/build: yarn run vX.X.X @uifabric/build: $ node ./just-scripts.js no-op @uifabric/build: Done in ?s. @uifabric/example-data: yarn run vX.X.X @uifabric/example-data: $ just-scripts build @uifabric/example-data: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] -@uifabric/example-data: [XX:XX:XX XM] ■ Running tslint -@uifabric/example-data: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/tslint/lib/tslintCli.js" --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" -t stylish -r /office-ui-fabric-react/node_modules/tslint-microsoft-contrib @uifabric/example-data: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-data/tsconfig.json @uifabric/example-data: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" @uifabric/example-data: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-data/tsconfig.json @uifabric/example-data: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" -@uifabric/example-data: [XX:XX:XX XM] ■ Running webpack-cli as a node process -@uifabric/example-data: [XX:XX:XX XM] ■ webpack-cli arguments: /usr/local/bin/node --max-old-space-size=4096 /office-ui-fabric-react/node_modules/webpack-cli/bin/cli.js -@uifabric/example-data: Webpack version: 4.X.X -@uifabric/example-data: Hash: [redacted] -@uifabric/example-data: Version: webpack 4.X.X -@uifabric/example-data: Child -@uifabric/example-data: Hash: [redacted] -@uifabric/example-data: Time: ?s -@uifabric/example-data: Built at: XX/XX/XX XX:XX:XX XM -@uifabric/example-data: Asset Size Chunks Chunk Names -@uifabric/example-data: example-data.js X KiB example-data [emitted] example-data -@uifabric/example-data: example-data.js.map X KiB example-data [emitted] example-data -@uifabric/example-data: Entrypoint example-data = example-data.js example-data.js.map -@uifabric/example-data: [./lib/facepile.js] X KiB {example-data} [built] -@uifabric/example-data: [./lib/index.js] X KiB {example-data} [built] -@uifabric/example-data: [./lib/listItems.js] X KiB {example-data} [built] -@uifabric/example-data: [./lib/lorem.js] X KiB {example-data} [built] -@uifabric/example-data: [./lib/people.js] X KiB {example-data} [built] -@uifabric/example-data: [./lib/testImages.js] X KiB {example-data} [built] @uifabric/example-data: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/example-data/lib/index.d.ts' @uifabric/example-data: Done in ?s. @uifabric/migration: yarn run vX.X.X @@ -50,8 +49,6 @@ Standard output: @uifabric/set-version: yarn run vX.X.X @uifabric/set-version: $ just-scripts build @uifabric/set-version: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] -@uifabric/set-version: [XX:XX:XX XM] ■ Running tslint -@uifabric/set-version: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/tslint/lib/tslintCli.js" --project "/office-ui-fabric-react/packages/set-version/tsconfig.json" -t stylish -r /office-ui-fabric-react/node_modules/tslint-microsoft-contrib @uifabric/set-version: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/set-version/tsconfig.json @uifabric/set-version: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/set-version/tsconfig.json" @uifabric/set-version: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/set-version/tsconfig.json @@ -60,193 +57,81 @@ Standard output: @uifabric/webpack-utils: yarn run vX.X.X @uifabric/webpack-utils: $ just-scripts build @uifabric/webpack-utils: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] -@uifabric/webpack-utils: [XX:XX:XX XM] ■ Running tslint -@uifabric/webpack-utils: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/tslint/lib/tslintCli.js" --project "/office-ui-fabric-react/packages/webpack-utils/tsconfig.json" -t stylish -r /office-ui-fabric-react/node_modules/tslint-microsoft-contrib @uifabric/webpack-utils: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/webpack-utils/tsconfig.json @uifabric/webpack-utils: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module commonjs --project "/office-ui-fabric-react/packages/webpack-utils/tsconfig.json" @uifabric/webpack-utils: Done in ?s. -@uifabric/merge-styles: yarn run vX.X.X -@uifabric/merge-styles: $ just-scripts build -@uifabric/merge-styles: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] -@uifabric/merge-styles: [XX:XX:XX XM] ■ Running tslint -@uifabric/merge-styles: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/tslint/lib/tslintCli.js" --project "/office-ui-fabric-react/packages/merge-styles/tsconfig.json" -t stylish -r /office-ui-fabric-react/node_modules/tslint-microsoft-contrib -@uifabric/merge-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/merge-styles/tsconfig.json -@uifabric/merge-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/merge-styles/tsconfig.json" -@uifabric/merge-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/merge-styles/tsconfig.json -@uifabric/merge-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/merge-styles/tsconfig.json" -@uifabric/merge-styles: [XX:XX:XX XM] ■ Running Jest -@uifabric/merge-styles: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/merge-styles/jest.config.js" --passWithNoTests --colors --forceExit -@uifabric/merge-styles: [XX:XX:XX XM] ■ Running webpack-cli as a node process -@uifabric/merge-styles: [XX:XX:XX XM] ■ webpack-cli arguments: /usr/local/bin/node --max-old-space-size=4096 /office-ui-fabric-react/node_modules/webpack-cli/bin/cli.js -@uifabric/merge-styles: Webpack version: 4.X.X -@uifabric/merge-styles: Hash: [redacted] -@uifabric/merge-styles: Version: webpack 4.X.X -@uifabric/merge-styles: Child -@uifabric/merge-styles: Hash: [redacted] -@uifabric/merge-styles: Time: ?s -@uifabric/merge-styles: Built at: XX/XX/XX XX:XX:XX XM -@uifabric/merge-styles: Asset Size Chunks Chunk Names -@uifabric/merge-styles: merge-styles.js X KiB merge-styles [emitted] merge-styles -@uifabric/merge-styles: merge-styles.js.map X KiB merge-styles [emitted] merge-styles -@uifabric/merge-styles: Entrypoint merge-styles = merge-styles.js merge-styles.js.map -@uifabric/merge-styles: [../set-version/lib/index.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [../set-version/lib/setVersion.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/StyleOptionsState.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/Stylesheet.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/concatStyleSets.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/concatStyleSetsWithProps.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/extractStyleParts.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/fontFace.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/index.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/keyframes.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/mergeStyleSets.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/mergeStyles.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/styleToClassName.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/transforms/kebabRules.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: [./lib/version.js] X KiB {merge-styles} [built] -@uifabric/merge-styles: + 5 hidden modules -@uifabric/merge-styles: Child -@uifabric/merge-styles: Hash: [redacted] -@uifabric/merge-styles: Time: ?s -@uifabric/merge-styles: Built at: XX/XX/XX XX:XX:XX XM -@uifabric/merge-styles: Asset Size Chunks Chunk Names -@uifabric/merge-styles: merge-styles.min.js X KiB 0 [emitted] merge-styles -@uifabric/merge-styles: merge-styles.min.js.map X KiB 0 [emitted] merge-styles -@uifabric/merge-styles: Entrypoint merge-styles = merge-styles.min.js merge-styles.min.js.map -@uifabric/merge-styles: [0] ./lib/index.js + 19 modules X KiB {0} [built] -@uifabric/merge-styles: | ./lib/index.js X KiB [built] -@uifabric/merge-styles: | ./lib/Stylesheet.js X KiB [built] -@uifabric/merge-styles: | ./lib/StyleOptionsState.js X KiB [built] -@uifabric/merge-styles: | ./lib/mergeStyles.js X KiB [built] -@uifabric/merge-styles: | ./lib/concatStyleSets.js X KiB [built] -@uifabric/merge-styles: | ./lib/mergeStyleSets.js X KiB [built] -@uifabric/merge-styles: | ./lib/concatStyleSetsWithProps.js X KiB [built] -@uifabric/merge-styles: | ./lib/fontFace.js X KiB [built] -@uifabric/merge-styles: | ./lib/keyframes.js X KiB [built] -@uifabric/merge-styles: | ./lib/version.js X KiB [built] -@uifabric/merge-styles: | ./lib/extractStyleParts.js X KiB [built] -@uifabric/merge-styles: | ./lib/styleToClassName.js X KiB [built] -@uifabric/merge-styles: | ../set-version/lib/index.js X KiB [built] -@uifabric/merge-styles: | ./lib/transforms/kebabRules.js X KiB [built] -@uifabric/merge-styles: | ./lib/transforms/prefixRules.js X KiB [built] -@uifabric/merge-styles: | + 5 hidden modules -@uifabric/merge-styles: PASS src/styleToClassName.test.ts -@uifabric/merge-styles: PASS src/mergeStyleSets.test.ts -@uifabric/merge-styles: PASS src/mergeStyles.test.ts -@uifabric/merge-styles: PASS src/concatStyleSets.test.ts -@uifabric/merge-styles: PASS src/transforms/rtlifyRules.test.ts -@uifabric/merge-styles: PASS src/mergeCssSets.test.ts -@uifabric/merge-styles: PASS src/transforms/prefixRules.test.ts -@uifabric/merge-styles: PASS src/transforms/provideUnits.test.ts -@uifabric/merge-styles: PASS src/keyframes.test.ts -@uifabric/merge-styles: PASS src/mergeCss.test.ts -@uifabric/merge-styles: PASS src/server.test.ts -@uifabric/merge-styles: PASS src/Stylesheet.test.ts -@uifabric/merge-styles: PASS src/extractStyleParts.test.ts -@uifabric/merge-styles: PASS src/concatStyleSetsWithProps.test.ts -@uifabric/merge-styles: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/merge-styles/lib/index.d.ts' -@uifabric/merge-styles: Done in ?s. -@uifabric/jest-serializer-merge-styles: yarn run vX.X.X -@uifabric/jest-serializer-merge-styles: $ just-scripts build -@uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/jest-serializer-merge-styles/tsconfig.json -@uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/jest-serializer-merge-styles/tsconfig.json" -@uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/jest-serializer-merge-styles/tsconfig.json -@uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/jest-serializer-merge-styles/tsconfig.json" -@uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Running Jest -@uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/jest-serializer-merge-styles/jest.config.js" --passWithNoTests --colors --forceExit -@uifabric/jest-serializer-merge-styles: PASS src/index.test.tsx -@uifabric/jest-serializer-merge-styles: Done in ?s. -@uifabric/test-utilities: yarn run vX.X.X -@uifabric/test-utilities: $ just-scripts build -@uifabric/test-utilities: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] -@uifabric/test-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/test-utilities/tsconfig.json -@uifabric/test-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/test-utilities/tsconfig.json" -@uifabric/test-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/test-utilities/tsconfig.json -@uifabric/test-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/test-utilities/tsconfig.json" -@uifabric/test-utilities: Done in ?s. -@uifabric/utilities: yarn run vX.X.X -@uifabric/utilities: $ just-scripts build -@uifabric/utilities: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] -@uifabric/utilities: [XX:XX:XX XM] ■ Running tslint -@uifabric/utilities: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/tslint/lib/tslintCli.js" --project "/office-ui-fabric-react/packages/utilities/tsconfig.json" -t stylish -r /office-ui-fabric-react/node_modules/tslint-microsoft-contrib -@uifabric/utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/utilities/tsconfig.json -@uifabric/utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/utilities/tsconfig.json" -@uifabric/utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/utilities/tsconfig.json -@uifabric/utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/utilities/tsconfig.json" -@uifabric/utilities: [XX:XX:XX XM] ■ Running Jest -@uifabric/utilities: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/utilities/jest.config.js" --passWithNoTests --colors --forceExit -@uifabric/utilities: PASS src/warn/warnControlledUsage.test.ts -@uifabric/utilities: PASS src/focus.test.tsx -@uifabric/utilities: PASS src/styled.test.tsx -@uifabric/utilities: PASS src/customizations/Customizer.test.tsx -@uifabric/utilities: PASS src/EventGroup.test.ts -@uifabric/utilities: PASS src/array.test.ts -@uifabric/utilities: PASS src/math.test.ts -@uifabric/utilities: PASS src/warn/warn.test.ts -@uifabric/utilities: PASS src/dom/dom.test.ts -@uifabric/utilities: PASS src/customizations/customizable.test.tsx -@uifabric/utilities: PASS src/initials.test.ts -@uifabric/utilities: PASS src/selection/Selection.test.ts -@uifabric/utilities: PASS src/initializeFocusRects.test.ts -@uifabric/utilities: PASS src/memoize.test.ts -@uifabric/utilities: PASS src/rtl.test.ts -@uifabric/utilities: PASS src/osDetector.test.ts -@uifabric/utilities: PASS src/mobileDetector.test.ts -@uifabric/utilities: PASS src/aria.test.ts -@uifabric/utilities: PASS src/setFocusVisibility.test.ts -@uifabric/utilities: PASS src/properties.test.ts -@uifabric/utilities: PASS src/asAsync.test.tsx -@uifabric/utilities: PASS src/object.test.ts -@uifabric/utilities: PASS src/classNamesFunction.test.ts -@uifabric/utilities: PASS src/merge.test.ts -@uifabric/utilities: PASS src/customizations/Customizations.test.ts -@uifabric/utilities: PASS src/safeSetTimeout.test.tsx -@uifabric/utilities: PASS src/safeRequestAnimationFrame.test.tsx -@uifabric/utilities: PASS src/overflow.test.ts -@uifabric/utilities: PASS src/appendFunction.test.ts -@uifabric/utilities: PASS src/controlled.test.ts -@uifabric/utilities: PASS src/extendComponent.test.tsx -@uifabric/utilities: PASS src/initializeComponentRef.test.tsx -@uifabric/utilities: PASS src/BaseComponent.test.tsx -@uifabric/utilities: PASS src/keyboard.test.ts -@uifabric/utilities: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/utilities/lib/index.d.ts' -@uifabric/utilities: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/accessibility: yarn run vX.X.X +@fluentui/accessibility: $ gulp bundle:package:no-umd +@fluentui/accessibility: [XX:XX:XX] Requiring external module @uifabric/build/babel/register +@fluentui/accessibility: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/accessibility/gulpfile.ts +@fluentui/accessibility: Done in ?s. +@fluentui/docs: yarn run vX.X.X +@fluentui/docs: $ gulp build:docs +@fluentui/docs: [XX:XX:XX] Requiring external module @uifabric/build/babel/register +@fluentui/docs: [XX:XX:XX] Working directory changed to /office-ui-fabric-react +@fluentui/docs: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/gulpfile.ts +@fluentui/docs: > @fluentui/ability-attributes@X.X.X schema /office-ui-fabric-react/packages/fluentui/ability-attributes +@fluentui/docs: > allyschema -c "process.env.NODE_ENV !== 'production'" schema.json > ./src/schema.ts +@fluentui/docs: DocToccing single file "/office-ui-fabric-react/.github/CONTRIBUTING.md" for github.com. +@fluentui/docs: ================== +@fluentui/docs: "/office-ui-fabric-react/.github/CONTRIBUTING.md" will be updated +@fluentui/docs: Everything is OK. +@fluentui/docs: DocToccing single file "/office-ui-fabric-react/.github/setup-local-development.md" for github.com. +@fluentui/docs: ================== +@fluentui/docs: "/office-ui-fabric-react/.github/setup-local-development.md" will be updated +@fluentui/docs: Everything is OK. +@fluentui/docs: DocToccing single file "/office-ui-fabric-react/.github/add-a-feature.md" for github.com. +@fluentui/docs: ================== +@fluentui/docs: "/office-ui-fabric-react/.github/add-a-feature.md" will be updated +@fluentui/docs: Everything is OK. +@fluentui/docs: DocToccing single file "/office-ui-fabric-react/.github/document-a-feature.md" for github.com. +@fluentui/docs: ================== +@fluentui/docs: "/office-ui-fabric-react/.github/document-a-feature.md" will be updated +@fluentui/docs: Everything is OK. +@fluentui/docs: DocToccing single file "/office-ui-fabric-react/.github/test-a-feature.md" for github.com. +@fluentui/docs: ================== +@fluentui/docs: "/office-ui-fabric-react/.github/test-a-feature.md" will be updated +@fluentui/docs: Everything is OK. +@fluentui/docs: Starting type checking service... +@fluentui/docs: Using 1 worker with 2048MB memory limit +@fluentui/docs: [XX:XX:XX] Time: ?s +@fluentui/docs: Built at: XX/XX/XX XX:XX:XX XM +@fluentui/docs: Entrypoint app = runtime~app.js 2.js app.js +@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/docs/src/examples/components/Toolbar/Content/ToolbarExampleMenuRadioGroup.shorthand.tsx +@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/docs/src/examples/components/Toolbar/Content/ToolbarExampleMenuRadioGroup.shorthand.tsx(35,25): +@fluentui/docs: TS2345: Argument of type 'boolean' is not assignable to parameter of type '(prevState: undefined) => undefined'. +@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/docs/src/prototypes/VirtualizedTree/VirtualizedTree.tsx +@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/docs/src/prototypes/VirtualizedTree/VirtualizedTree.tsx(34,22): +@fluentui/docs: TS2345: Argument of type 'number' is not assignable to parameter of type '(prevState: undefined) => undefined'. +@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/docs/src/prototypes/VirtualizedTree/VirtualizedTree.tsx +@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/docs/src/prototypes/VirtualizedTree/VirtualizedTree.tsx(64,31): +@fluentui/docs: TS2538: Type 'undefined' cannot be used as an index type. +@fluentui/docs: Child HtmlWebpackCompiler: +@fluentui/docs: Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0 +@fluentui/docs: [XX:XX:XX] Webpack compiler encountered errors. +@fluentui/docs: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Standard error: info cli using local version of lerna -lerna notice cli vX.X.X -lerna info Executing command in 42 packages: "yarn run build" +@fluentui/ability-attributes: npm WARN lifecycle The node binary used for scripts is but npm is using /usr/local/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with. @uifabric/example-data: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect @uifabric/set-version: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@uifabric/merge-styles: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@uifabric/merge-styles: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. -@uifabric/merge-styles: Force exiting Jest -@uifabric/merge-styles: -@uifabric/merge-styles: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? -@uifabric/jest-serializer-merge-styles: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. -@uifabric/jest-serializer-merge-styles: Force exiting Jest -@uifabric/jest-serializer-merge-styles: -@uifabric/jest-serializer-merge-styles: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? -@uifabric/utilities: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@uifabric/utilities: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. -@uifabric/utilities: Force exiting Jest -@uifabric/utilities: -@uifabric/utilities: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? -@uifabric/utilities: Warning: You have changed the public API signature for this project. Please copy the file "temp/utilities.api.md" to "etc/utilities.api.md", or perform a local build (which does this automatically). See the Git repo documentation for more info. -@uifabric/utilities: [XX:XX:XX XM] x Error detected while running '_wrapFunction' -@uifabric/utilities: [XX:XX:XX XM] x ------------------------------------ -@uifabric/utilities: [XX:XX:XX XM] x Error: The public API file is out of date. Please run the API snapshot and commit the updated API file. -@uifabric/utilities: at apiExtractorVerify (/office-ui-fabric-react/node_modules/just-scripts/lib/tasks/apiExtractorTask.js:26:19) -@uifabric/utilities: at _wrapFunction (/office-ui-fabric-react/node_modules/just-task/lib/wrapTask.js:13:36) -@uifabric/utilities: at verify-api-extractor (/office-ui-fabric-react/node_modules/undertaker/lib/set-task.js:13:15) -@uifabric/utilities: at _wrapFunction (/office-ui-fabric-react/node_modules/just-task/lib/wrapTask.js:10:16) -@uifabric/utilities: at bound (domain.js:419:14) -@uifabric/utilities: at runBound (domain.js:432:12) -@uifabric/utilities: at asyncRunner (/office-ui-fabric-react/node_modules/async-done/index.js:55:18) -@uifabric/utilities: at processTicksAndRejections (internal/process/task_queues.js:75:11) -@uifabric/utilities: [XX:XX:XX XM] x ------------------------------------ -@uifabric/utilities: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@uifabric/utilities: error Command failed with exit code 1. -lerna ERR! yarn run build exited 1 in '@uifabric/utilities' +@fluentui/docs: npm WARN lifecycle The node binary used for scripts is but npm is using /usr/local/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with. +@fluentui/docs: @fluentui/react: You are running Fela in production mode. This limits your ability to edit styles in browsers development tools. To enable development mode please paste `window.localStorage.felaDevMode = true` to your browsers console and reload the page. +@fluentui/docs: [XX:XX:XX] 'build:docs:webpack' errored after +@fluentui/docs: [XX:XX:XX] Error in plugin 'webpack' +@fluentui/docs: Message: +@fluentui/docs: /office-ui-fabric-react/packages/fluentui/docs/src/examples/components/Toolbar/Content/ToolbarExampleMenuRadioGroup.shorthand.tsx +@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/docs/src/examples/components/Toolbar/Content/ToolbarExampleMenuRadioGroup.shorthand.tsx(35,25): +@fluentui/docs: TS2345: Argument of type 'boolean' is not assignable to parameter of type '(prevState: undefined) => undefined'.,/office-ui-fabric-react/packages/fluentui/docs/src/prototypes/VirtualizedTree/VirtualizedTree.tsx +@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/docs/src/prototypes/VirtualizedTree/VirtualizedTree.tsx(34,22): +@fluentui/docs: TS2345: Argument of type 'number' is not assignable to parameter of type '(prevState: undefined) => undefined'.,/office-ui-fabric-react/packages/fluentui/docs/src/prototypes/VirtualizedTree/VirtualizedTree.tsx +@fluentui/docs: ERROR in /office-ui-fabric-react/packages/fluentui/docs/src/prototypes/VirtualizedTree/VirtualizedTree.tsx(64,31): +@fluentui/docs: TS2538: Type 'undefined' cannot be used as an index type. +@fluentui/docs: Details: +@fluentui/docs: domainThrown: true +@fluentui/docs: [XX:XX:XX] 'build:docs' errored after +@fluentui/docs: error Command failed with exit code 1. +lerna ERR! yarn run build exited 1 in '@fluentui/docs' diff --git a/tests/baselines/reference/docker/rxjs.log b/tests/baselines/reference/docker/rxjs.log new file mode 100644 index 0000000000000..538e25373ab81 --- /dev/null +++ b/tests/baselines/reference/docker/rxjs.log @@ -0,0 +1,9 @@ +Exit Code: 1 +Standard output: + + + +Standard error: +npm ERR! missing script: build_all +npm ERR! A complete log of this run can be found in: +npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log diff --git a/tests/baselines/reference/docker/vscode.log b/tests/baselines/reference/docker/vscode.log index 45c7728bdb5d0..9465251dcc994 100644 --- a/tests/baselines/reference/docker/vscode.log +++ b/tests/baselines/reference/docker/vscode.log @@ -1,11 +1,24 @@ -Exit Code: 0 +Exit Code: 1 Standard output: yarn run vX.X.X $ gulp compile --max_old_space_size=4095 [XX:XX:XX] Node flags detected: --max_old_space_size=4095 [XX:XX:XX] Using gulpfile /vscode/gulpfile.js -Done in ?s. +[XX:XX:XX] Error: /vscode/extensions/typescript-language-features/src/typescriptServiceClient.ts(738,37): 'command' is specified more than once, so this usage will be overwritten. +info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Standard error: +[XX:XX:XX] 'compile' errored after ?s +[XX:XX:XX] Error: Found 1 errors + at Stream. (/vscode/build/lib/reporter.js:74:29) + at _end (/vscode/node_modules/through/index.js:65:9) + at Stream.stream.end (/vscode/node_modules/through/index.js:74:5) + at StreamFilter.onend (/vscode/node_modules/readable-stream/lib/_stream_readable.js:570:10) + at Object.onceWrapper (events.js:286:20) + at StreamFilter.emit (events.js:203:15) + at StreamFilter.EventEmitter.emit (domain.js:466:23) + at endReadableNT (/vscode/node_modules/readable-stream/lib/_stream_readable.js:992:12) + at process._tickCallback (internal/process/next_tick.js:63:19) +error Command failed with exit code 1. diff --git a/tests/baselines/reference/docker/vue-next.log b/tests/baselines/reference/docker/vue-next.log new file mode 100644 index 0000000000000..8ddd3fd3327d5 --- /dev/null +++ b/tests/baselines/reference/docker/vue-next.log @@ -0,0 +1,153 @@ +Exit Code: 0 +Standard output: + +> @X.X.X-alpha.6 build /vue-next +> node scripts/build.js "--types" +Rolling up type definitions for compiler-core... +Writing: /vue-next/temp/compiler-core.api.json +The API report is up to date: temp/compiler-core.api.md +Writing package typings: /vue-next/packages/compiler-core/dist/compiler-core.d.ts +API Extractor completed successfully. +Rolling up type definitions for compiler-dom... +Writing: /vue-next/temp/compiler-dom.api.json +The API report is up to date: temp/compiler-dom.api.md +Writing package typings: /vue-next/packages/compiler-dom/dist/compiler-dom.d.ts +API Extractor completed successfully. +Rolling up type definitions for compiler-sfc... +Writing: /vue-next/temp/compiler-sfc.api.json +The API report is up to date: temp/compiler-sfc.api.md +Writing package typings: /vue-next/packages/compiler-sfc/dist/compiler-sfc.d.ts +API Extractor completed successfully. +Rolling up type definitions for compiler-ssr... +Writing: /vue-next/temp/compiler-ssr.api.json +The API report is up to date: temp/compiler-ssr.api.md +Writing package typings: /vue-next/packages/compiler-ssr/dist/compiler-ssr.d.ts +API Extractor completed successfully. +Rolling up type definitions for reactivity... +Writing: /vue-next/temp/reactivity.api.json +The API report is up to date: temp/reactivity.api.md +Writing package typings: /vue-next/packages/reactivity/dist/reactivity.d.ts +API Extractor completed successfully. +Rolling up type definitions for runtime-core... +Writing: /vue-next/temp/runtime-core.api.json +The API report is up to date: temp/runtime-core.api.md +Writing package typings: /vue-next/packages/runtime-core/dist/runtime-core.d.ts +API Extractor completed successfully. +Rolling up type definitions for runtime-dom... +Writing: /vue-next/temp/runtime-dom.api.json +The API report is up to date: temp/runtime-dom.api.md +Writing package typings: /vue-next/packages/runtime-dom/dist/runtime-dom.d.ts +API Extractor completed successfully. +Rolling up type definitions for runtime-test... +Writing: /vue-next/temp/runtime-test.api.json +The API report is up to date: temp/runtime-test.api.md +Writing package typings: /vue-next/packages/runtime-test/dist/runtime-test.d.ts +API Extractor completed successfully. +Rolling up type definitions for server-renderer... +Writing: /vue-next/temp/server-renderer.api.json +The API report is up to date: temp/server-renderer.api.md +Writing package typings: /vue-next/packages/server-renderer/dist/server-renderer.d.ts +API Extractor completed successfully. + + + +Standard error: + +/vue-next/packages/compiler-core/src/index.ts → packages/compiler-core/dist/compiler-core.esm-bundler.js... +created packages/compiler-core/dist/compiler-core.esm-bundler.js in ?s +/vue-next/packages/compiler-core/src/index.ts → packages/compiler-core/dist/compiler-core.cjs.js... +created packages/compiler-core/dist/compiler-core.cjs.js in ?s +/vue-next/packages/compiler-core/src/index.ts → packages/compiler-core/dist/compiler-core.cjs.prod.js... +created packages/compiler-core/dist/compiler-core.cjs.prod.js in ?s +/vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.esm-bundler.js... +created packages/compiler-dom/dist/compiler-dom.esm-bundler.js in ?s +/vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.cjs.js... +created packages/compiler-dom/dist/compiler-dom.cjs.js in ?s +/vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.global.js... +created packages/compiler-dom/dist/compiler-dom.global.js in ?s +/vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.esm.js... +created packages/compiler-dom/dist/compiler-dom.esm.js in ?s +/vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.cjs.prod.js... +created packages/compiler-dom/dist/compiler-dom.cjs.prod.js in ?s +/vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.global.prod.js... +created packages/compiler-dom/dist/compiler-dom.global.prod.js in ?s +/vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.esm.prod.js... +created packages/compiler-dom/dist/compiler-dom.esm.prod.js in ?s +/vue-next/packages/compiler-sfc/src/index.ts → packages/compiler-sfc/dist/compiler-sfc.cjs.js... +(!) Unresolved dependencies +https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency +url (imported by packages/compiler-sfc/src/templateUtils.ts) +created packages/compiler-sfc/dist/compiler-sfc.cjs.js in ?s +/vue-next/packages/compiler-ssr/src/index.ts → packages/compiler-ssr/dist/compiler-ssr.cjs.js... +created packages/compiler-ssr/dist/compiler-ssr.cjs.js in ?s +/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.esm-bundler.js... +created packages/reactivity/dist/reactivity.esm-bundler.js in ?s +/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.cjs.js... +created packages/reactivity/dist/reactivity.cjs.js in ?s +/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.global.js... +created packages/reactivity/dist/reactivity.global.js in ?s +/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.esm.js... +created packages/reactivity/dist/reactivity.esm.js in ?s +/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.cjs.prod.js... +created packages/reactivity/dist/reactivity.cjs.prod.js in ?s +/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.global.prod.js... +created packages/reactivity/dist/reactivity.global.prod.js in ?s +/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.esm.prod.js... +created packages/reactivity/dist/reactivity.esm.prod.js in ?s +/vue-next/packages/runtime-core/src/index.ts → packages/runtime-core/dist/runtime-core.esm-bundler.js... +created packages/runtime-core/dist/runtime-core.esm-bundler.js in ?s +/vue-next/packages/runtime-core/src/index.ts → packages/runtime-core/dist/runtime-core.cjs.js... +created packages/runtime-core/dist/runtime-core.cjs.js in ?s +/vue-next/packages/runtime-core/src/index.ts → packages/runtime-core/dist/runtime-core.cjs.prod.js... +created packages/runtime-core/dist/runtime-core.cjs.prod.js in ?s +/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.esm-bundler.js... +created packages/runtime-dom/dist/runtime-dom.esm-bundler.js in ?s +/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.cjs.js... +created packages/runtime-dom/dist/runtime-dom.cjs.js in ?s +/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.global.js... +created packages/runtime-dom/dist/runtime-dom.global.js in ?s +/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.esm.js... +created packages/runtime-dom/dist/runtime-dom.esm.js in ?s +/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.cjs.prod.js... +created packages/runtime-dom/dist/runtime-dom.cjs.prod.js in ?s +/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.global.prod.js... +created packages/runtime-dom/dist/runtime-dom.global.prod.js in ?s +/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.esm.prod.js... +created packages/runtime-dom/dist/runtime-dom.esm.prod.js in ?s +/vue-next/packages/runtime-test/src/index.ts → packages/runtime-test/dist/runtime-test.global.js... +created packages/runtime-test/dist/runtime-test.global.js in ?s +/vue-next/packages/runtime-test/src/index.ts → packages/runtime-test/dist/runtime-test.global.prod.js... +created packages/runtime-test/dist/runtime-test.global.prod.js in ?s +/vue-next/packages/server-renderer/src/index.ts → packages/server-renderer/dist/server-renderer.cjs.js... +created packages/server-renderer/dist/server-renderer.cjs.js in ?s +/vue-next/packages/server-renderer/src/index.ts → packages/server-renderer/dist/server-renderer.cjs.prod.js... +created packages/server-renderer/dist/server-renderer.cjs.prod.js in ?s +/vue-next/packages/size-check/src/index.ts → packages/size-check/dist/size-check.global.js... +created packages/size-check/dist/size-check.global.js in ?s +/vue-next/packages/size-check/src/index.ts → packages/size-check/dist/size-check.global.prod.js... +created packages/size-check/dist/size-check.global.prod.js in ?s +/vue-next/packages/template-explorer/src/index.ts → packages/template-explorer/dist/template-explorer.global.js... +created packages/template-explorer/dist/template-explorer.global.js in ?s +/vue-next/packages/vue/src/index.ts → packages/vue/dist/vue.esm-bundler.js... +[!] (plugin rpt2) Error: /vue-next/packages/vue/src/devCheck.ts(2,11): semantic error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +packages/vue/src/devCheck.ts +Error: /vue-next/packages/vue/src/devCheck.ts(2,11): semantic error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + at error (/vue-next/node_modules/rollup/dist/shared/node-entry.js:5400:30) + at throwPluginError (/vue-next/node_modules/rollup/dist/shared/node-entry.js:11874:12) + at Object.error (/vue-next/node_modules/rollup/dist/shared/node-entry.js:12908:24) + at Object.error (/vue-next/node_modules/rollup/dist/shared/node-entry.js:12077:38) + at RollupContext.error (/vue-next/node_modules/rollup-plugin-typescript2/src/rollupcontext.ts:37:18) + at /vue-next/node_modules/rollup-plugin-typescript2/src/print-diagnostics.ts:41:11 + at arrayEach (/vue-next/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:516:11) + at forEach (/vue-next/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:9342:14) + at _.each (/vue-next/node_modules/rollup-plugin-typescript2/src/print-diagnostics.ts:9:2) + at Object.transform (/vue-next/node_modules/rollup-plugin-typescript2/src/index.ts:234:5) +(node:17) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1 (EPERM): rollup -c --environment COMMIT:d4c6957,NODE_ENV:production,TARGET:vue,TYPES:true + at makeError (/vue-next/node_modules/execa/lib/error.js:59:11) + at handlePromise (/vue-next/node_modules/execa/index.js:112:26) + at processTicksAndRejections (internal/process/task_queues.js:97:5) + at async build (/vue-next/scripts/build.js:72:3) + at async buildAll (/vue-next/scripts/build.js:51:5) + at async run (/vue-next/scripts/build.js:41:5) +(node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) +(node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. diff --git a/tests/baselines/reference/docker/xterm.js.log b/tests/baselines/reference/docker/xterm.js.log index 7fa6b68dfe85f..3bfbe02903186 100644 --- a/tests/baselines/reference/docker/xterm.js.log +++ b/tests/baselines/reference/docker/xterm.js.log @@ -7,14 +7,6 @@ node_modules/@types/ws/index.d.ts(44,39): error TS2694: Namespace '"url"' has no node_modules/@types/ws/index.d.ts(45,39): error TS2694: Namespace '"url"' has no exported member 'URL'. node_modules/@types/ws/index.d.ts(44,39): error TS2694: Namespace '"url"' has no exported member 'URL'. node_modules/@types/ws/index.d.ts(45,39): error TS2694: Namespace '"url"' has no exported member 'URL'. -node_modules/@types/ws/index.d.ts(44,39): error TS2694: Namespace '"url"' has no exported member 'URL'. -node_modules/@types/ws/index.d.ts(45,39): error TS2694: Namespace '"url"' has no exported member 'URL'. -node_modules/@types/ws/index.d.ts(44,39): error TS2694: Namespace '"url"' has no exported member 'URL'. -node_modules/@types/ws/index.d.ts(45,39): error TS2694: Namespace '"url"' has no exported member 'URL'. -node_modules/@types/ws/index.d.ts(44,39): error TS2694: Namespace '"url"' has no exported member 'URL'. -node_modules/@types/ws/index.d.ts(45,39): error TS2694: Namespace '"url"' has no exported member 'URL'. -node_modules/@types/ws/index.d.ts(44,39): error TS2694: Namespace '"url"' has no exported member 'URL'. -node_modules/@types/ws/index.d.ts(45,39): error TS2694: Namespace '"url"' has no exported member 'URL'. diff --git a/tests/baselines/reference/doubleUnderscoreExportStarConflict.js b/tests/baselines/reference/doubleUnderscoreExportStarConflict.js index e73c586852575..fbabacfed7df1 100644 --- a/tests/baselines/reference/doubleUnderscoreExportStarConflict.js +++ b/tests/baselines/reference/doubleUnderscoreExportStarConflict.js @@ -23,9 +23,16 @@ function __foo() { } exports.__foo = __foo; //// [index.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./b")); -__export(require("./c")); +__exportStar(require("./b"), exports); +__exportStar(require("./c"), exports); diff --git a/tests/baselines/reference/duplicateClassElements.js b/tests/baselines/reference/duplicateClassElements.js index 1a37490c2fbd6..95145562f4fb0 100644 --- a/tests/baselines/reference/duplicateClassElements.js +++ b/tests/baselines/reference/duplicateClassElements.js @@ -58,7 +58,7 @@ var a = /** @class */ (function () { }, set: function (_x) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(a.prototype, "y", { @@ -67,7 +67,7 @@ var a = /** @class */ (function () { }, set: function (_y) { }, - enumerable: true, + enumerable: false, configurable: true }); a.prototype.z = function () { @@ -78,7 +78,7 @@ var a = /** @class */ (function () { }, set: function (_y) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(a.prototype, "x2", { @@ -87,7 +87,7 @@ var a = /** @class */ (function () { }, set: function (_x) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(a.prototype, "z2", { @@ -96,7 +96,7 @@ var a = /** @class */ (function () { }, set: function (_y) { }, - enumerable: true, + enumerable: false, configurable: true }); a.prototype.z2 = function () { diff --git a/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.js b/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.js index 961bd4041cdf8..135c7a729c799 100644 --- a/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.js +++ b/tests/baselines/reference/emitClassDeclarationWithLiteralPropertyNameInES6.js @@ -15,19 +15,22 @@ class B { } //// [emitClassDeclarationWithLiteralPropertyNameInES6.js] -class B { - constructor() { - this["hello"] = 10; - this[0b110] = "world"; - this[0o23534] = "WORLD"; - this[20] = "twenty"; +const B = /** @class */ (() => { + class B { + constructor() { + this["hello"] = 10; + this[0b110] = "world"; + this[0o23534] = "WORLD"; + this[20] = "twenty"; + } + "foo"() { } + 0b1110() { } + 11() { } + interface() { } } - "foo"() { } - 0b1110() { } - 11() { } - interface() { } -} -B["hi"] = 10000; -B[22] = "twenty-two"; -B[0b101] = "binary"; -B[0o3235] = "octal"; + B["hi"] = 10000; + B[22] = "twenty-two"; + B[0b101] = "binary"; + B[0o3235] = "octal"; + return B; +})(); diff --git a/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.js b/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.js index 8e0bf3de06bcd..29f77cb4b9e4f 100644 --- a/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.js +++ b/tests/baselines/reference/emitClassDeclarationWithStaticPropertyAssignmentInES6.js @@ -10,12 +10,18 @@ class D { //// [emitClassDeclarationWithStaticPropertyAssignmentInES6.js] -class C { -} -C.z = "Foo"; -class D { - constructor() { - this.x = 20000; +const C = /** @class */ (() => { + class C { } -} -D.b = true; + C.z = "Foo"; + return C; +})(); +const D = /** @class */ (() => { + class D { + constructor() { + this.x = 20000; + } + } + D.b = true; + return D; +})(); diff --git a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=amd).js b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=amd).js new file mode 100644 index 0000000000000..5448443c9fdb1 --- /dev/null +++ b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=amd).js @@ -0,0 +1,31 @@ +//// [a.ts] +declare var dec: any, __decorate: any; +@dec export class A { +} + +const o = { a: 1 }; +const y = { ...o }; + + +//// [a.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; +}; +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + const A = /** @class */ (() => { + let A = class A { + }; + A = __decorate([ + dec + ], A); + return A; + })(); + exports.A = A; + const o = { a: 1 }; + const y = Object.assign({}, o); +}); diff --git a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=commonjs).js b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=commonjs).js new file mode 100644 index 0000000000000..23c16638f7c6d --- /dev/null +++ b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=commonjs).js @@ -0,0 +1,29 @@ +//// [a.ts] +declare var dec: any, __decorate: any; +@dec export class A { +} + +const o = { a: 1 }; +const y = { ...o }; + + +//// [a.js] +"use strict"; +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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const A = /** @class */ (() => { + let A = class A { + }; + A = __decorate([ + dec + ], A); + return A; +})(); +exports.A = A; +const o = { a: 1 }; +const y = Object.assign({}, o); diff --git a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=es2020).js b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=es2020).js new file mode 100644 index 0000000000000..7733aaf50295e --- /dev/null +++ b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=es2020).js @@ -0,0 +1,27 @@ +//// [a.ts] +declare var dec: any, __decorate: any; +@dec export class A { +} + +const o = { a: 1 }; +const y = { ...o }; + + +//// [a.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; +}; +const A = /** @class */ (() => { + let A = class A { + }; + A = __decorate([ + dec + ], A); + return A; +})(); +export { A }; +const o = { a: 1 }; +const y = Object.assign({}, o); diff --git a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=es6).js b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=es6).js new file mode 100644 index 0000000000000..7733aaf50295e --- /dev/null +++ b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=es6).js @@ -0,0 +1,27 @@ +//// [a.ts] +declare var dec: any, __decorate: any; +@dec export class A { +} + +const o = { a: 1 }; +const y = { ...o }; + + +//// [a.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; +}; +const A = /** @class */ (() => { + let A = class A { + }; + A = __decorate([ + dec + ], A); + return A; +})(); +export { A }; +const o = { a: 1 }; +const y = Object.assign({}, o); diff --git a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=esnext).js b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=esnext).js new file mode 100644 index 0000000000000..7733aaf50295e --- /dev/null +++ b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=esnext).js @@ -0,0 +1,27 @@ +//// [a.ts] +declare var dec: any, __decorate: any; +@dec export class A { +} + +const o = { a: 1 }; +const y = { ...o }; + + +//// [a.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; +}; +const A = /** @class */ (() => { + let A = class A { + }; + A = __decorate([ + dec + ], A); + return A; +})(); +export { A }; +const o = { a: 1 }; +const y = Object.assign({}, o); diff --git a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=none).js b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=none).js new file mode 100644 index 0000000000000..23c16638f7c6d --- /dev/null +++ b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=none).js @@ -0,0 +1,29 @@ +//// [a.ts] +declare var dec: any, __decorate: any; +@dec export class A { +} + +const o = { a: 1 }; +const y = { ...o }; + + +//// [a.js] +"use strict"; +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; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const A = /** @class */ (() => { + let A = class A { + }; + A = __decorate([ + dec + ], A); + return A; +})(); +exports.A = A; +const o = { a: 1 }; +const y = Object.assign({}, o); diff --git a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=system).js b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=system).js new file mode 100644 index 0000000000000..399428ad01502 --- /dev/null +++ b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=system).js @@ -0,0 +1,37 @@ +//// [a.ts] +declare var dec: any, __decorate: any; +@dec export class A { +} + +const o = { a: 1 }; +const y = { ...o }; + + +//// [a.js] +System.register([], function (exports_1, context_1) { + "use strict"; + 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 A, o, y; + var __moduleName = context_1 && context_1.id; + return { + setters: [], + execute: function () { + A = /** @class */ (() => { + let A = class A { + }; + A = __decorate([ + dec + ], A); + return A; + })(); + exports_1("A", A); + o = { a: 1 }; + y = Object.assign({}, o); + } + }; +}); diff --git a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=umd).js b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=umd).js new file mode 100644 index 0000000000000..58c293f53ff43 --- /dev/null +++ b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=umd).js @@ -0,0 +1,39 @@ +//// [a.ts] +declare var dec: any, __decorate: any; +@dec export class A { +} + +const o = { a: 1 }; +const y = { ...o }; + + +//// [a.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; +}; +(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 }); + const A = /** @class */ (() => { + let A = class A { + }; + A = __decorate([ + dec + ], A); + return A; + })(); + exports.A = A; + const o = { a: 1 }; + const y = Object.assign({}, o); +}); diff --git a/tests/baselines/reference/errorForConflictingExportEqualsValue.js b/tests/baselines/reference/errorForConflictingExportEqualsValue.js index 65adec3590272..9d5514422c805 100644 --- a/tests/baselines/reference/errorForConflictingExportEqualsValue.js +++ b/tests/baselines/reference/errorForConflictingExportEqualsValue.js @@ -6,5 +6,6 @@ import("./a"); //// [a.js] "use strict"; +exports.x = void 0; Promise.resolve().then(function () { return require("./a"); }); module.exports = exports.x; diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.types b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.types index 5610ea98be071..1cbecfbd3e351 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.types +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.types @@ -5,8 +5,8 @@ function f() { >f : () => void var d1 = new derived(); ->d1 : any ->new derived() : any +>d1 : derived +>new derived() : derived >derived : typeof derived var d2 = new derived(4); diff --git a/tests/baselines/reference/errorOnUnionVsObjectShouldDeeplyDisambiguate.errors.txt b/tests/baselines/reference/errorOnUnionVsObjectShouldDeeplyDisambiguate.errors.txt index 62c559e417b7e..ae3564fa70570 100644 --- a/tests/baselines/reference/errorOnUnionVsObjectShouldDeeplyDisambiguate.errors.txt +++ b/tests/baselines/reference/errorOnUnionVsObjectShouldDeeplyDisambiguate.errors.txt @@ -37,41 +37,51 @@ tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts(27,16): err ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:3:8: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:18:10: Did you mean to mark this function as 'async'? c: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:4:8: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:19:10: Did you mean to mark this function as 'async'? d: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:5:8: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:20:10: Did you mean to mark this function as 'async'? e: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:6:8: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:21:10: Did you mean to mark this function as 'async'? f: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:7:8: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:22:10: Did you mean to mark this function as 'async'? g: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:8:8: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:23:10: Did you mean to mark this function as 'async'? h: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:9:8: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:24:10: Did you mean to mark this function as 'async'? i: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:10:8: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:25:10: Did you mean to mark this function as 'async'? j: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:11:8: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:26:10: Did you mean to mark this function as 'async'? k: () => 123 ~~~ !!! error TS2322: Type 'number' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:12:8: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.ts:27:10: Did you mean to mark this function as 'async'? } } \ No newline at end of file diff --git a/tests/baselines/reference/errorOnUnionVsObjectShouldDeeplyDisambiguate2.errors.txt b/tests/baselines/reference/errorOnUnionVsObjectShouldDeeplyDisambiguate2.errors.txt index 694a367bf9b76..41970afe08654 100644 --- a/tests/baselines/reference/errorOnUnionVsObjectShouldDeeplyDisambiguate2.errors.txt +++ b/tests/baselines/reference/errorOnUnionVsObjectShouldDeeplyDisambiguate2.errors.txt @@ -37,41 +37,51 @@ tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts(27,14): er ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:3:6: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:18:8: Did you mean to mark this function as 'async'? c: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:4:6: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:19:8: Did you mean to mark this function as 'async'? d: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:5:6: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:20:8: Did you mean to mark this function as 'async'? e: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:6:6: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:21:8: Did you mean to mark this function as 'async'? f: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:7:6: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:22:8: Did you mean to mark this function as 'async'? g: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:8:6: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:23:8: Did you mean to mark this function as 'async'? h: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:9:6: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:24:8: Did you mean to mark this function as 'async'? i: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:10:6: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:25:8: Did you mean to mark this function as 'async'? j: () => "hello", ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:11:6: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:26:8: Did you mean to mark this function as 'async'? k: () => 123 ~~~ !!! error TS2322: Type 'number' is not assignable to type 'Promise'. !!! related TS6502 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:12:6: The expected type comes from the return type of this signature. +!!! related TS1356 tests/cases/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts:27:8: Did you mean to mark this function as 'async'? } } \ No newline at end of file diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 11cda4b76f7cb..5239c92a10fd4 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -108,7 +108,7 @@ var NoBase = /** @class */ (function () { set: function (v) { _this = _super.call(this) || this; }, - enumerable: true, + enumerable: false, configurable: true }); //super call in static class member function with no base type @@ -124,7 +124,7 @@ var NoBase = /** @class */ (function () { set: function (n) { _this = _super.call(this) || this; }, - enumerable: true, + enumerable: false, configurable: true }); //super call in static class member initializer with no base type @@ -172,7 +172,7 @@ var OtherDerived = /** @class */ (function (_super) { set: function (n) { _this = _super.call(this) || this; }, - enumerable: true, + enumerable: false, configurable: true }); return OtherDerived; diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index f393fc37668b4..e63854304d7c9 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -169,7 +169,7 @@ var NoBase = /** @class */ (function () { set: function (n) { _super.hasOwnProperty.call(this, ''); }, - enumerable: true, + enumerable: false, configurable: true }); return NoBase; @@ -209,7 +209,7 @@ var SomeDerived1 = /** @class */ (function (_super) { set: function (n) { n = _super.prototype.publicMember; }, - enumerable: true, + enumerable: false, configurable: true }); SomeDerived1.prototype.fn2 = function () { @@ -243,7 +243,7 @@ var SomeDerived2 = /** @class */ (function (_super) { set: function (n) { n = _super.prototype.privateMember; }, - enumerable: true, + enumerable: false, configurable: true }); return SomeDerived2; @@ -274,7 +274,7 @@ var SomeDerived3 = /** @class */ (function (_super) { _super.privateStaticMember = 3; _super.privateStaticFunc.call(this); }, - enumerable: true, + enumerable: false, configurable: true }); return SomeDerived3; diff --git a/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.errors.txt b/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.errors.txt new file mode 100644 index 0000000000000..93996556e651b --- /dev/null +++ b/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/errorsForCallAndAssignmentAreSimilar.ts(11,11): error TS2322: Type '"hdpvd"' is not assignable to type '"hddvd" | "bluray"'. +tests/cases/compiler/errorsForCallAndAssignmentAreSimilar.ts(16,11): error TS2322: Type '"hdpvd"' is not assignable to type '"hddvd" | "bluray"'. + + +==== tests/cases/compiler/errorsForCallAndAssignmentAreSimilar.ts (2 errors) ==== + function minimalExample1() { + type Disc = + | { kind: "hddvd" } + | { kind: "bluray" } + + function foo(x: Disc[]) { + } + + foo([ + { kind: "bluray", }, + { kind: "hdpvd", } + ~~~~ +!!! error TS2322: Type '"hdpvd"' is not assignable to type '"hddvd" | "bluray"'. +!!! related TS6500 tests/cases/compiler/errorsForCallAndAssignmentAreSimilar.ts:3:13: The expected type comes from property 'kind' which is declared here on type 'Disc' + ]); + + const ds: Disc[] = [ + { kind: "bluray", }, + { kind: "hdpvd", } + ~~~~ +!!! error TS2322: Type '"hdpvd"' is not assignable to type '"hddvd" | "bluray"'. +!!! related TS6500 tests/cases/compiler/errorsForCallAndAssignmentAreSimilar.ts:3:13: The expected type comes from property 'kind' which is declared here on type 'Disc' + ]; + } \ No newline at end of file diff --git a/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.js b/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.js new file mode 100644 index 0000000000000..72a043f0d8b23 --- /dev/null +++ b/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.js @@ -0,0 +1,33 @@ +//// [errorsForCallAndAssignmentAreSimilar.ts] +function minimalExample1() { + type Disc = + | { kind: "hddvd" } + | { kind: "bluray" } + + function foo(x: Disc[]) { + } + + foo([ + { kind: "bluray", }, + { kind: "hdpvd", } + ]); + + const ds: Disc[] = [ + { kind: "bluray", }, + { kind: "hdpvd", } + ]; +} + +//// [errorsForCallAndAssignmentAreSimilar.js] +function minimalExample1() { + function foo(x) { + } + foo([ + { kind: "bluray" }, + { kind: "hdpvd" } + ]); + var ds = [ + { kind: "bluray" }, + { kind: "hdpvd" } + ]; +} diff --git a/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.symbols b/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.symbols new file mode 100644 index 0000000000000..e29e884697aaa --- /dev/null +++ b/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.symbols @@ -0,0 +1,42 @@ +=== tests/cases/compiler/errorsForCallAndAssignmentAreSimilar.ts === +function minimalExample1() { +>minimalExample1 : Symbol(minimalExample1, Decl(errorsForCallAndAssignmentAreSimilar.ts, 0, 0)) + + type Disc = +>Disc : Symbol(Disc, Decl(errorsForCallAndAssignmentAreSimilar.ts, 0, 28)) + + | { kind: "hddvd" } +>kind : Symbol(kind, Decl(errorsForCallAndAssignmentAreSimilar.ts, 2, 11)) + + | { kind: "bluray" } +>kind : Symbol(kind, Decl(errorsForCallAndAssignmentAreSimilar.ts, 3, 11)) + + function foo(x: Disc[]) { +>foo : Symbol(foo, Decl(errorsForCallAndAssignmentAreSimilar.ts, 3, 28)) +>x : Symbol(x, Decl(errorsForCallAndAssignmentAreSimilar.ts, 5, 17)) +>Disc : Symbol(Disc, Decl(errorsForCallAndAssignmentAreSimilar.ts, 0, 28)) + } + + foo([ +>foo : Symbol(foo, Decl(errorsForCallAndAssignmentAreSimilar.ts, 3, 28)) + + { kind: "bluray", }, +>kind : Symbol(kind, Decl(errorsForCallAndAssignmentAreSimilar.ts, 9, 9)) + + { kind: "hdpvd", } +>kind : Symbol(kind, Decl(errorsForCallAndAssignmentAreSimilar.ts, 10, 9)) + + ]); + + const ds: Disc[] = [ +>ds : Symbol(ds, Decl(errorsForCallAndAssignmentAreSimilar.ts, 13, 9)) +>Disc : Symbol(Disc, Decl(errorsForCallAndAssignmentAreSimilar.ts, 0, 28)) + + { kind: "bluray", }, +>kind : Symbol(kind, Decl(errorsForCallAndAssignmentAreSimilar.ts, 14, 9)) + + { kind: "hdpvd", } +>kind : Symbol(kind, Decl(errorsForCallAndAssignmentAreSimilar.ts, 15, 9)) + + ]; +} diff --git a/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.types b/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.types new file mode 100644 index 0000000000000..6f22f7f49960b --- /dev/null +++ b/tests/baselines/reference/errorsForCallAndAssignmentAreSimilar.types @@ -0,0 +1,51 @@ +=== tests/cases/compiler/errorsForCallAndAssignmentAreSimilar.ts === +function minimalExample1() { +>minimalExample1 : () => void + + type Disc = +>Disc : { kind: "hddvd"; } | { kind: "bluray"; } + + | { kind: "hddvd" } +>kind : "hddvd" + + | { kind: "bluray" } +>kind : "bluray" + + function foo(x: Disc[]) { +>foo : (x: ({ kind: "hddvd"; } | { kind: "bluray"; })[]) => void +>x : ({ kind: "hddvd"; } | { kind: "bluray"; })[] + } + + foo([ +>foo([ { kind: "bluray", }, { kind: "hdpvd", } ]) : void +>foo : (x: ({ kind: "hddvd"; } | { kind: "bluray"; })[]) => void +>[ { kind: "bluray", }, { kind: "hdpvd", } ] : ({ kind: "bluray"; } | { kind: "hdpvd"; })[] + + { kind: "bluray", }, +>{ kind: "bluray", } : { kind: "bluray"; } +>kind : "bluray" +>"bluray" : "bluray" + + { kind: "hdpvd", } +>{ kind: "hdpvd", } : { kind: "hdpvd"; } +>kind : "hdpvd" +>"hdpvd" : "hdpvd" + + ]); + + const ds: Disc[] = [ +>ds : ({ kind: "hddvd"; } | { kind: "bluray"; })[] +>[ { kind: "bluray", }, { kind: "hdpvd", } ] : ({ kind: "bluray"; } | { kind: "hdpvd"; })[] + + { kind: "bluray", }, +>{ kind: "bluray", } : { kind: "bluray"; } +>kind : "bluray" +>"bluray" : "bluray" + + { kind: "hdpvd", } +>{ kind: "hdpvd", } : { kind: "hdpvd"; } +>kind : "hdpvd" +>"hdpvd" : "hdpvd" + + ]; +} diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index 409c26494498d..d64719af60239 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -115,7 +115,7 @@ var testClass3 = /** @class */ (function () { Object.defineProperty(testClass3.prototype, "a", { set: function (value) { } // error: could not find symbol V , - enumerable: true, + enumerable: false, configurable: true }); return testClass3; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 2766bbcb7d1d6..86edc5adcdbc0 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -203,7 +203,7 @@ var GetSetMonster = /** @class */ (function () { get: function () { return this._health > 0; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(GetSetMonster.prototype, "health", { @@ -214,7 +214,7 @@ var GetSetMonster = /** @class */ (function () { } this._health = value; }, - enumerable: true, + enumerable: false, configurable: true }); return GetSetMonster; diff --git a/tests/baselines/reference/es6ExportAllInEs5.js b/tests/baselines/reference/es6ExportAllInEs5.js index ee949682f625d..2f356a8923373 100644 --- a/tests/baselines/reference/es6ExportAllInEs5.js +++ b/tests/baselines/reference/es6ExportAllInEs5.js @@ -31,11 +31,18 @@ var m; exports.x = 10; //// [client.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./server")); +__exportStar(require("./server"), exports); //// [server.d.ts] diff --git a/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifierInEs5.js b/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifierInEs5.js index 00e5f73f0fdde..a593ce18d60ad 100644 --- a/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifierInEs5.js +++ b/tests/baselines/reference/es6ExportClauseWithoutModuleSpecifierInEs5.js @@ -37,13 +37,13 @@ exports.x = 10; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var server_1 = require("./server"); -exports.c = server_1.c; +Object.defineProperty(exports, "c", { enumerable: true, get: function () { return server_1.c; } }); var server_2 = require("./server"); -exports.c2 = server_2.c; +Object.defineProperty(exports, "c2", { enumerable: true, get: function () { return server_2.c; } }); var server_3 = require("./server"); -exports.instantiatedModule = server_3.m; +Object.defineProperty(exports, "instantiatedModule", { enumerable: true, get: function () { return server_3.m; } }); var server_4 = require("./server"); -exports.x = server_4.x; +Object.defineProperty(exports, "x", { enumerable: true, get: function () { return server_4.x; } }); //// [server.d.ts] diff --git a/tests/baselines/reference/es6ExportEqualsInterop.js b/tests/baselines/reference/es6ExportEqualsInterop.js index 13908a29e2d6b..297e053d4b6f7 100644 --- a/tests/baselines/reference/es6ExportEqualsInterop.js +++ b/tests/baselines/reference/es6ExportEqualsInterop.js @@ -209,8 +209,15 @@ export * from "class-module"; //// [main.js] "use strict"; /// -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; var z2 = require("variable"); @@ -274,31 +281,31 @@ class_1.a; class_module_1.a; // named export var interface_2 = require("interface"); -exports.a1 = interface_2.a; +__createBinding(exports, interface_2, "a", "a1"); var variable_2 = require("variable"); -exports.a2 = variable_2.a; +__createBinding(exports, variable_2, "a", "a2"); var interface_variable_2 = require("interface-variable"); -exports.a3 = interface_variable_2.a; +__createBinding(exports, interface_variable_2, "a", "a3"); var module_2 = require("module"); -exports.a4 = module_2.a; +__createBinding(exports, module_2, "a", "a4"); var interface_module_2 = require("interface-module"); -exports.a5 = interface_module_2.a; +__createBinding(exports, interface_module_2, "a", "a5"); var variable_module_2 = require("variable-module"); -exports.a6 = variable_module_2.a; +__createBinding(exports, variable_module_2, "a", "a6"); var function_2 = require("function"); -exports.a7 = function_2.a; +__createBinding(exports, function_2, "a", "a7"); var function_module_2 = require("function-module"); -exports.a8 = function_module_2.a; +__createBinding(exports, function_module_2, "a", "a8"); var class_2 = require("class"); -exports.a9 = class_2.a; +__createBinding(exports, class_2, "a", "a9"); var class_module_2 = require("class-module"); -exports.a0 = class_module_2.a; -__export(require("variable")); -__export(require("interface-variable")); -__export(require("module")); -__export(require("interface-module")); -__export(require("variable-module")); -__export(require("function")); -__export(require("function-module")); -__export(require("class")); -__export(require("class-module")); +__createBinding(exports, class_module_2, "a", "a0"); +__exportStar(require("variable"), exports); +__exportStar(require("interface-variable"), exports); +__exportStar(require("module"), exports); +__exportStar(require("interface-module"), exports); +__exportStar(require("variable-module"), exports); +__exportStar(require("function"), exports); +__exportStar(require("function-module"), exports); +__exportStar(require("class"), exports); +__exportStar(require("class-module"), exports); diff --git a/tests/baselines/reference/es6ModuleClassDeclaration.js b/tests/baselines/reference/es6ModuleClassDeclaration.js index a228739abbfb7..e5d4b1a3f52e7 100644 --- a/tests/baselines/reference/es6ModuleClassDeclaration.js +++ b/tests/baselines/reference/es6ModuleClassDeclaration.js @@ -113,43 +113,8 @@ module m2 { } //// [es6ModuleClassDeclaration.js] -export class c { - constructor() { - this.x = 10; - this.y = 30; - } - method1() { - } - method2() { - } - static method3() { - } - static method4() { - } -} -c.k = 20; -c.l = 30; -class c2 { - constructor() { - this.x = 10; - this.y = 30; - } - method1() { - } - method2() { - } - static method3() { - } - static method4() { - } -} -c2.k = 20; -c2.l = 30; -new c(); -new c2(); -export var m1; -(function (m1) { - class c3 { +const c = /** @class */ (() => { + class c { constructor() { this.x = 10; this.y = 30; @@ -163,10 +128,13 @@ export var m1; static method4() { } } - c3.k = 20; - c3.l = 30; - m1.c3 = c3; - class c4 { + c.k = 20; + c.l = 30; + return c; +})(); +export { c }; +const c2 = /** @class */ (() => { + class c2 { constructor() { this.x = 10; this.y = 30; @@ -180,8 +148,53 @@ export var m1; static method4() { } } - c4.k = 20; - c4.l = 30; + c2.k = 20; + c2.l = 30; + return c2; +})(); +new c(); +new c2(); +export var m1; +(function (m1) { + const c3 = /** @class */ (() => { + class c3 { + constructor() { + this.x = 10; + this.y = 30; + } + method1() { + } + method2() { + } + static method3() { + } + static method4() { + } + } + c3.k = 20; + c3.l = 30; + return c3; + })(); + m1.c3 = c3; + const c4 = /** @class */ (() => { + class c4 { + constructor() { + this.x = 10; + this.y = 30; + } + method1() { + } + method2() { + } + static method3() { + } + static method4() { + } + } + c4.k = 20; + c4.l = 30; + return c4; + })(); new c(); new c2(); new c3(); @@ -189,39 +202,45 @@ export var m1; })(m1 || (m1 = {})); var m2; (function (m2) { - class c3 { - constructor() { - this.x = 10; - this.y = 30; - } - method1() { - } - method2() { - } - static method3() { - } - static method4() { - } - } - c3.k = 20; - c3.l = 30; + const c3 = /** @class */ (() => { + class c3 { + constructor() { + this.x = 10; + this.y = 30; + } + method1() { + } + method2() { + } + static method3() { + } + static method4() { + } + } + c3.k = 20; + c3.l = 30; + return c3; + })(); m2.c3 = c3; - class c4 { - constructor() { - this.x = 10; - this.y = 30; - } - method1() { - } - method2() { - } - static method3() { - } - static method4() { - } - } - c4.k = 20; - c4.l = 30; + const c4 = /** @class */ (() => { + class c4 { + constructor() { + this.x = 10; + this.y = 30; + } + method1() { + } + method2() { + } + static method3() { + } + static method4() { + } + } + c4.k = 20; + c4.l = 30; + return c4; + })(); new c(); new c2(); new c3(); diff --git a/tests/baselines/reference/esModuleInterop.js b/tests/baselines/reference/esModuleInterop.js index c5cc264fe7192..20c009e80a4b0 100644 --- a/tests/baselines/reference/esModuleInterop.js +++ b/tests/baselines/reference/esModuleInterop.js @@ -20,16 +20,28 @@ fs; //// [mjts.js] "use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; exports.__esModule = true; var hybrid_1 = require("./hybrid"); var path_1 = __importDefault(require("./path")); diff --git a/tests/baselines/reference/esModuleInteropImportCall.js b/tests/baselines/reference/esModuleInteropImportCall.js index d7bf027b001d0..cb29b51cd43d8 100644 --- a/tests/baselines/reference/esModuleInteropImportCall.js +++ b/tests/baselines/reference/esModuleInteropImportCall.js @@ -11,11 +11,23 @@ import("./foo").then(f => { }); //// [index.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; Promise.resolve().then(function () { return __importStar(require("./foo")); }).then(function (f) { diff --git a/tests/baselines/reference/esModuleInteropImportNamespace.js b/tests/baselines/reference/esModuleInteropImportNamespace.js index 74449347623bb..8704f95b0a883 100644 --- a/tests/baselines/reference/esModuleInteropImportNamespace.js +++ b/tests/baselines/reference/esModuleInteropImportNamespace.js @@ -12,11 +12,23 @@ foo.default; //// [index.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; exports.__esModule = true; diff --git a/tests/baselines/reference/esModuleInteropNamedDefaultImports.js b/tests/baselines/reference/esModuleInteropNamedDefaultImports.js index f8181c5955066..ccb1be9e273cc 100644 --- a/tests/baselines/reference/esModuleInteropNamedDefaultImports.js +++ b/tests/baselines/reference/esModuleInteropNamedDefaultImports.js @@ -29,16 +29,28 @@ var Bar = /** @class */ (function () { exports.Bar = Bar; //// [idx.js] "use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; exports.__esModule = true; var mod_1 = __importDefault(require("./mod")); var mod_2 = __importDefault(require("./mod")); diff --git a/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.js b/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.js index 80809deefc593..556414576d179 100644 --- a/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.js +++ b/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.js @@ -12,11 +12,23 @@ invoke(foo); //// [index.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; exports.__esModule = true; diff --git a/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.js b/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.js index a15c1907f8da2..1e20e8e208c53 100644 --- a/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.js +++ b/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.js @@ -5,11 +5,23 @@ void var2; //// [esModuleInteropUsesExportStarWhenDefaultPlusNames.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; exports.__esModule = true; diff --git a/tests/baselines/reference/esModuleInteropWithExportStar(target=es3).js b/tests/baselines/reference/esModuleInteropWithExportStar(target=es3).js new file mode 100644 index 0000000000000..ec8b93e9f9d3a --- /dev/null +++ b/tests/baselines/reference/esModuleInteropWithExportStar(target=es3).js @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/esModuleInteropWithExportStar.ts] //// + +//// [fs.d.ts] +export const x: number; +//// [mjts.ts] +import * as fs from "./fs"; + +fs; + +export * from "./fs"; +export {x} from "./fs"; +export {x as y} from "./fs"; + + +//// [mjts.js] +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); +} +exports.__esModule = true; +var fs = __importStar(require("./fs")); +fs; +__exportStar(require("./fs"), exports); +var fs_1 = require("./fs"); +__createBinding(exports, fs_1, "x"); +var fs_2 = require("./fs"); +__createBinding(exports, fs_2, "x", "y"); diff --git a/tests/baselines/reference/esModuleInteropWithExportStar(target=es3).symbols b/tests/baselines/reference/esModuleInteropWithExportStar(target=es3).symbols new file mode 100644 index 0000000000000..4f0fea6225b69 --- /dev/null +++ b/tests/baselines/reference/esModuleInteropWithExportStar(target=es3).symbols @@ -0,0 +1,19 @@ +=== tests/cases/compiler/fs.d.ts === +export const x: number; +>x : Symbol(x, Decl(fs.d.ts, 0, 12)) + +=== tests/cases/compiler/mjts.ts === +import * as fs from "./fs"; +>fs : Symbol(fs, Decl(mjts.ts, 0, 6)) + +fs; +>fs : Symbol(fs, Decl(mjts.ts, 0, 6)) + +export * from "./fs"; +export {x} from "./fs"; +>x : Symbol(x, Decl(mjts.ts, 5, 8)) + +export {x as y} from "./fs"; +>x : Symbol(fs.x, Decl(fs.d.ts, 0, 12)) +>y : Symbol(y, Decl(mjts.ts, 6, 8)) + diff --git a/tests/baselines/reference/esModuleInteropWithExportStar(target=es3).types b/tests/baselines/reference/esModuleInteropWithExportStar(target=es3).types new file mode 100644 index 0000000000000..7dfb40bef6178 --- /dev/null +++ b/tests/baselines/reference/esModuleInteropWithExportStar(target=es3).types @@ -0,0 +1,19 @@ +=== tests/cases/compiler/fs.d.ts === +export const x: number; +>x : number + +=== tests/cases/compiler/mjts.ts === +import * as fs from "./fs"; +>fs : typeof fs + +fs; +>fs : typeof fs + +export * from "./fs"; +export {x} from "./fs"; +>x : number + +export {x as y} from "./fs"; +>x : number +>y : number + diff --git a/tests/baselines/reference/esModuleInteropWithExportStar(target=es5).js b/tests/baselines/reference/esModuleInteropWithExportStar(target=es5).js new file mode 100644 index 0000000000000..77459782f1d64 --- /dev/null +++ b/tests/baselines/reference/esModuleInteropWithExportStar(target=es5).js @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/esModuleInteropWithExportStar.ts] //// + +//// [fs.d.ts] +export const x: number; +//// [mjts.ts] +import * as fs from "./fs"; + +fs; + +export * from "./fs"; +export {x} from "./fs"; +export {x as y} from "./fs"; + + +//// [mjts.js] +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); +} +Object.defineProperty(exports, "__esModule", { value: true }); +var fs = __importStar(require("./fs")); +fs; +__exportStar(require("./fs"), exports); +var fs_1 = require("./fs"); +Object.defineProperty(exports, "x", { enumerable: true, get: function () { return fs_1.x; } }); +var fs_2 = require("./fs"); +Object.defineProperty(exports, "y", { enumerable: true, get: function () { return fs_2.x; } }); diff --git a/tests/baselines/reference/esModuleInteropWithExportStar(target=es5).symbols b/tests/baselines/reference/esModuleInteropWithExportStar(target=es5).symbols new file mode 100644 index 0000000000000..4f0fea6225b69 --- /dev/null +++ b/tests/baselines/reference/esModuleInteropWithExportStar(target=es5).symbols @@ -0,0 +1,19 @@ +=== tests/cases/compiler/fs.d.ts === +export const x: number; +>x : Symbol(x, Decl(fs.d.ts, 0, 12)) + +=== tests/cases/compiler/mjts.ts === +import * as fs from "./fs"; +>fs : Symbol(fs, Decl(mjts.ts, 0, 6)) + +fs; +>fs : Symbol(fs, Decl(mjts.ts, 0, 6)) + +export * from "./fs"; +export {x} from "./fs"; +>x : Symbol(x, Decl(mjts.ts, 5, 8)) + +export {x as y} from "./fs"; +>x : Symbol(fs.x, Decl(fs.d.ts, 0, 12)) +>y : Symbol(y, Decl(mjts.ts, 6, 8)) + diff --git a/tests/baselines/reference/esModuleInteropWithExportStar(target=es5).types b/tests/baselines/reference/esModuleInteropWithExportStar(target=es5).types new file mode 100644 index 0000000000000..7dfb40bef6178 --- /dev/null +++ b/tests/baselines/reference/esModuleInteropWithExportStar(target=es5).types @@ -0,0 +1,19 @@ +=== tests/cases/compiler/fs.d.ts === +export const x: number; +>x : number + +=== tests/cases/compiler/mjts.ts === +import * as fs from "./fs"; +>fs : typeof fs + +fs; +>fs : typeof fs + +export * from "./fs"; +export {x} from "./fs"; +>x : number + +export {x as y} from "./fs"; +>x : number +>y : number + diff --git a/tests/baselines/reference/esModuleIntersectionCrash.js b/tests/baselines/reference/esModuleIntersectionCrash.js index 27de446e93c04..5f1b5b2e10498 100644 --- a/tests/baselines/reference/esModuleIntersectionCrash.js +++ b/tests/baselines/reference/esModuleIntersectionCrash.js @@ -14,11 +14,23 @@ mod.b; //// [idx.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; exports.__esModule = true; diff --git a/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.js b/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.js index e242825b852da..5f4f49217a811 100644 --- a/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.js +++ b/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.js @@ -81,6 +81,7 @@ var c = { a: { x: 'hello', y: 2 } }; // error - y does not exist in type A var d = { a: { x: 'hello' }, c: 5 }; // ok var e = { a: { x: 2 }, c: 5 }; // error - types of property x are incompatible var f = { a: { x: 'hello', y: 2 }, c: 5 }; // error - y does not exist in type A +exports.obj = void 0; exports.photo = { id: 1, url: '', diff --git a/tests/baselines/reference/exportAsNamespace1(module=amd).symbols b/tests/baselines/reference/exportAsNamespace1(module=amd).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace1(module=amd).symbols +++ b/tests/baselines/reference/exportAsNamespace1(module=amd).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace1(module=commonjs).symbols b/tests/baselines/reference/exportAsNamespace1(module=commonjs).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace1(module=commonjs).symbols +++ b/tests/baselines/reference/exportAsNamespace1(module=commonjs).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace1(module=es2015).symbols b/tests/baselines/reference/exportAsNamespace1(module=es2015).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace1(module=es2015).symbols +++ b/tests/baselines/reference/exportAsNamespace1(module=es2015).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace1(module=esnext).symbols b/tests/baselines/reference/exportAsNamespace1(module=esnext).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace1(module=esnext).symbols +++ b/tests/baselines/reference/exportAsNamespace1(module=esnext).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace1(module=system).symbols b/tests/baselines/reference/exportAsNamespace1(module=system).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace1(module=system).symbols +++ b/tests/baselines/reference/exportAsNamespace1(module=system).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace1(module=umd).symbols b/tests/baselines/reference/exportAsNamespace1(module=umd).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace1(module=umd).symbols +++ b/tests/baselines/reference/exportAsNamespace1(module=umd).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace2(module=amd).js b/tests/baselines/reference/exportAsNamespace2(module=amd).js index 623de698072cd..e00e5f7477696 100644 --- a/tests/baselines/reference/exportAsNamespace2(module=amd).js +++ b/tests/baselines/reference/exportAsNamespace2(module=amd).js @@ -31,11 +31,23 @@ define(["require", "exports", "./0"], function (require, exports, ns) { ns.b; }); //// [2.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; define(["require", "exports", "./1"], function (require, exports, foo) { diff --git a/tests/baselines/reference/exportAsNamespace2(module=amd).symbols b/tests/baselines/reference/exportAsNamespace2(module=amd).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace2(module=amd).symbols +++ b/tests/baselines/reference/exportAsNamespace2(module=amd).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace2(module=commonjs).js b/tests/baselines/reference/exportAsNamespace2(module=commonjs).js index 80341d5a5b396..5a0c90421bae5 100644 --- a/tests/baselines/reference/exportAsNamespace2(module=commonjs).js +++ b/tests/baselines/reference/exportAsNamespace2(module=commonjs).js @@ -22,11 +22,23 @@ exports.a = 1; exports.b = 2; //// [1.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; exports.__esModule = true; @@ -35,11 +47,23 @@ ns.a; ns.b; //// [2.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; exports.__esModule = true; diff --git a/tests/baselines/reference/exportAsNamespace2(module=commonjs).symbols b/tests/baselines/reference/exportAsNamespace2(module=commonjs).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace2(module=commonjs).symbols +++ b/tests/baselines/reference/exportAsNamespace2(module=commonjs).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace2(module=es2015).symbols b/tests/baselines/reference/exportAsNamespace2(module=es2015).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace2(module=es2015).symbols +++ b/tests/baselines/reference/exportAsNamespace2(module=es2015).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace2(module=esnext).symbols b/tests/baselines/reference/exportAsNamespace2(module=esnext).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace2(module=esnext).symbols +++ b/tests/baselines/reference/exportAsNamespace2(module=esnext).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace2(module=system).symbols b/tests/baselines/reference/exportAsNamespace2(module=system).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace2(module=system).symbols +++ b/tests/baselines/reference/exportAsNamespace2(module=system).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace2(module=umd).js b/tests/baselines/reference/exportAsNamespace2(module=umd).js index dda2e48a8ab9a..b018e5d60bcd0 100644 --- a/tests/baselines/reference/exportAsNamespace2(module=umd).js +++ b/tests/baselines/reference/exportAsNamespace2(module=umd).js @@ -31,11 +31,23 @@ foo.ns.b; exports.b = 2; }); //// [1.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; (function (factory) { @@ -54,11 +66,23 @@ var __importStar = (this && this.__importStar) || function (mod) { ns.b; }); //// [2.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; (function (factory) { diff --git a/tests/baselines/reference/exportAsNamespace2(module=umd).symbols b/tests/baselines/reference/exportAsNamespace2(module=umd).symbols index 3c6b7529361ba..2ac5cba812883 100644 --- a/tests/baselines/reference/exportAsNamespace2(module=umd).symbols +++ b/tests/baselines/reference/exportAsNamespace2(module=umd).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; ns.b; @@ -18,15 +18,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace3(module=amd).js b/tests/baselines/reference/exportAsNamespace3(module=amd).js index 0935ee0c33b18..b8fb1bd8bb30d 100644 --- a/tests/baselines/reference/exportAsNamespace3(module=amd).js +++ b/tests/baselines/reference/exportAsNamespace3(module=amd).js @@ -37,11 +37,23 @@ define(["require", "exports", "./0"], function (require, exports, ns) { ns.b; }); //// [2.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; define(["require", "exports", "./1"], function (require, exports, foo) { diff --git a/tests/baselines/reference/exportAsNamespace3(module=amd).symbols b/tests/baselines/reference/exportAsNamespace3(module=amd).symbols index 0414e93a36357..b66876b8cb602 100644 --- a/tests/baselines/reference/exportAsNamespace3(module=amd).symbols +++ b/tests/baselines/reference/exportAsNamespace3(module=amd).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; >ns.a : Symbol(a, Decl(1.ts, 3, 10)) @@ -40,15 +40,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace3(module=commonjs).js b/tests/baselines/reference/exportAsNamespace3(module=commonjs).js index b05708a69df8d..1c14e4f8d3fdf 100644 --- a/tests/baselines/reference/exportAsNamespace3(module=commonjs).js +++ b/tests/baselines/reference/exportAsNamespace3(module=commonjs).js @@ -25,11 +25,23 @@ exports.a = 1; exports.b = 2; //// [1.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; exports.__esModule = true; @@ -41,11 +53,23 @@ ns.a; ns.b; //// [2.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; exports.__esModule = true; diff --git a/tests/baselines/reference/exportAsNamespace3(module=commonjs).symbols b/tests/baselines/reference/exportAsNamespace3(module=commonjs).symbols index 0414e93a36357..b66876b8cb602 100644 --- a/tests/baselines/reference/exportAsNamespace3(module=commonjs).symbols +++ b/tests/baselines/reference/exportAsNamespace3(module=commonjs).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; >ns.a : Symbol(a, Decl(1.ts, 3, 10)) @@ -40,15 +40,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace3(module=es2015).symbols b/tests/baselines/reference/exportAsNamespace3(module=es2015).symbols index 0414e93a36357..b66876b8cb602 100644 --- a/tests/baselines/reference/exportAsNamespace3(module=es2015).symbols +++ b/tests/baselines/reference/exportAsNamespace3(module=es2015).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; >ns.a : Symbol(a, Decl(1.ts, 3, 10)) @@ -40,15 +40,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace3(module=esnext).symbols b/tests/baselines/reference/exportAsNamespace3(module=esnext).symbols index 0414e93a36357..b66876b8cb602 100644 --- a/tests/baselines/reference/exportAsNamespace3(module=esnext).symbols +++ b/tests/baselines/reference/exportAsNamespace3(module=esnext).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; >ns.a : Symbol(a, Decl(1.ts, 3, 10)) @@ -40,15 +40,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace3(module=system).symbols b/tests/baselines/reference/exportAsNamespace3(module=system).symbols index 0414e93a36357..b66876b8cb602 100644 --- a/tests/baselines/reference/exportAsNamespace3(module=system).symbols +++ b/tests/baselines/reference/exportAsNamespace3(module=system).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; >ns.a : Symbol(a, Decl(1.ts, 3, 10)) @@ -40,15 +40,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAsNamespace3(module=umd).js b/tests/baselines/reference/exportAsNamespace3(module=umd).js index 11eed84883f3f..00f01b0efc941 100644 --- a/tests/baselines/reference/exportAsNamespace3(module=umd).js +++ b/tests/baselines/reference/exportAsNamespace3(module=umd).js @@ -34,11 +34,23 @@ foo.ns.b; exports.b = 2; }); //// [1.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; (function (factory) { @@ -60,11 +72,23 @@ var __importStar = (this && this.__importStar) || function (mod) { ns.b; }); //// [2.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; (function (factory) { diff --git a/tests/baselines/reference/exportAsNamespace3(module=umd).symbols b/tests/baselines/reference/exportAsNamespace3(module=umd).symbols index 0414e93a36357..b66876b8cb602 100644 --- a/tests/baselines/reference/exportAsNamespace3(module=umd).symbols +++ b/tests/baselines/reference/exportAsNamespace3(module=umd).symbols @@ -7,7 +7,7 @@ export const b = 2; === tests/cases/conformance/es2020/modules/1.ts === export * as ns from './0'; ->ns : Symbol(ns, Decl(1.ts, 0, 11)) +>ns : Symbol(ns, Decl(1.ts, 0, 6)) ns.a; >ns.a : Symbol(a, Decl(1.ts, 3, 10)) @@ -40,15 +40,15 @@ import * as foo from './1' foo.ns.a; >foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >a : Symbol(foo.ns.a, Decl(0.ts, 0, 12)) foo.ns.b; >foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) ->foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >foo : Symbol(foo, Decl(2.ts, 0, 6)) ->ns : Symbol(foo.ns, Decl(1.ts, 0, 11)) +>ns : Symbol(foo.ns, Decl(1.ts, 0, 6)) >b : Symbol(foo.ns.b, Decl(0.ts, 1, 12)) diff --git a/tests/baselines/reference/exportAssignmentConstrainedGenericType.types b/tests/baselines/reference/exportAssignmentConstrainedGenericType.types index f70d2001a112f..08ac4560e108e 100644 --- a/tests/baselines/reference/exportAssignmentConstrainedGenericType.types +++ b/tests/baselines/reference/exportAssignmentConstrainedGenericType.types @@ -3,8 +3,8 @@ import foo = require("./foo_0"); >foo : typeof foo var x = new foo(true); // Should error ->x : any ->new foo(true) : any +>x : foo<{ a: string; b: number; }> +>new foo(true) : foo<{ a: string; b: number; }> >foo : typeof foo >true : true diff --git a/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js b/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js index c9c681ac40b3d..7d68df54c2c54 100644 --- a/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js +++ b/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js @@ -25,19 +25,40 @@ exports.__esModule = true; exports.x = "x"; //// [t2.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var t1_1 = require("./t1"); -exports.x = t1_1.x; +__createBinding(exports, t1_1, "x"); //// [t3.js] "use strict"; exports.__esModule = true; //// [t4.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var t1_1 = require("./t1"); -exports.a = t1_1.x; +__createBinding(exports, t1_1, "x", "a"); //// [t5.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var t1_1 = require("./t1"); -exports.a = t1_1.x; +__createBinding(exports, t1_1, "x", "a"); diff --git a/tests/baselines/reference/exportDefault.js b/tests/baselines/reference/exportDefault.js index ed91b0f593e81..3e0e266ad5077 100644 --- a/tests/baselines/reference/exportDefault.js +++ b/tests/baselines/reference/exportDefault.js @@ -43,11 +43,23 @@ exports.__esModule = true; exports["default"] = types; //// [c.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; exports.__esModule = true; @@ -64,11 +76,23 @@ var types = require("./b"); new types.A(); // Error //// [f.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; exports.__esModule = true; diff --git a/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.js b/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.js index 3acb89b8696d7..bf4b3cfa31434 100644 --- a/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.js +++ b/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.js @@ -4,6 +4,10 @@ export default class { } //// [exportDefaultClassWithStaticPropertyAssignmentsInES6.js] -export default class default_1 { -} -default_1.z = "Foo"; +const default_1 = /** @class */ (() => { + class default_1 { + } + default_1.z = "Foo"; + return default_1; +})(); +export default default_1; diff --git a/tests/baselines/reference/exportNamespace1.errors.txt b/tests/baselines/reference/exportNamespace1.errors.txt new file mode 100644 index 0000000000000..d5a07917b511a --- /dev/null +++ b/tests/baselines/reference/exportNamespace1.errors.txt @@ -0,0 +1,19 @@ +tests/cases/conformance/externalModules/typeOnly/d.ts(2,5): error TS1362: 'A' cannot be used as a value because it was exported using 'export type'. + + +==== tests/cases/conformance/externalModules/typeOnly/a.ts (0 errors) ==== + export class A {} + +==== tests/cases/conformance/externalModules/typeOnly/b.ts (0 errors) ==== + export type { A } from './a'; + +==== tests/cases/conformance/externalModules/typeOnly/c.ts (0 errors) ==== + export * from './b'; + +==== tests/cases/conformance/externalModules/typeOnly/d.ts (1 errors) ==== + import { A } from './c'; + new A(); // Error + ~ +!!! error TS1362: 'A' cannot be used as a value because it was exported using 'export type'. +!!! related TS1377 tests/cases/conformance/externalModules/typeOnly/b.ts:1:15: 'A' was exported here. + \ No newline at end of file diff --git a/tests/baselines/reference/exportNamespace1.js b/tests/baselines/reference/exportNamespace1.js new file mode 100644 index 0000000000000..7a53e95c418b5 --- /dev/null +++ b/tests/baselines/reference/exportNamespace1.js @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/externalModules/typeOnly/exportNamespace1.ts] //// + +//// [a.ts] +export class A {} + +//// [b.ts] +export type { A } from './a'; + +//// [c.ts] +export * from './b'; + +//// [d.ts] +import { A } from './c'; +new A(); // Error + + +//// [a.js] +"use strict"; +exports.__esModule = true; +var A = /** @class */ (function () { + function A() { + } + return A; +}()); +exports.A = A; +//// [b.js] +"use strict"; +exports.__esModule = true; +//// [c.js] +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); +} +exports.__esModule = true; +__exportStar(require("./b"), exports); +//// [d.js] +"use strict"; +exports.__esModule = true; +new A(); // Error diff --git a/tests/baselines/reference/exportNamespace1.symbols b/tests/baselines/reference/exportNamespace1.symbols new file mode 100644 index 0000000000000..b3212c06df35a --- /dev/null +++ b/tests/baselines/reference/exportNamespace1.symbols @@ -0,0 +1,18 @@ +=== tests/cases/conformance/externalModules/typeOnly/a.ts === +export class A {} +>A : Symbol(A, Decl(a.ts, 0, 0)) + +=== tests/cases/conformance/externalModules/typeOnly/b.ts === +export type { A } from './a'; +>A : Symbol(A, Decl(b.ts, 0, 13)) + +=== tests/cases/conformance/externalModules/typeOnly/c.ts === +export * from './b'; +No type information for this code. +No type information for this code.=== tests/cases/conformance/externalModules/typeOnly/d.ts === +import { A } from './c'; +>A : Symbol(A, Decl(d.ts, 0, 8)) + +new A(); // Error +>A : Symbol(A, Decl(d.ts, 0, 8)) + diff --git a/tests/baselines/reference/exportNamespace1.types b/tests/baselines/reference/exportNamespace1.types new file mode 100644 index 0000000000000..17a88aadaaad5 --- /dev/null +++ b/tests/baselines/reference/exportNamespace1.types @@ -0,0 +1,19 @@ +=== tests/cases/conformance/externalModules/typeOnly/a.ts === +export class A {} +>A : A + +=== tests/cases/conformance/externalModules/typeOnly/b.ts === +export type { A } from './a'; +>A : import("tests/cases/conformance/externalModules/typeOnly/a").A + +=== tests/cases/conformance/externalModules/typeOnly/c.ts === +export * from './b'; +No type information for this code. +No type information for this code.=== tests/cases/conformance/externalModules/typeOnly/d.ts === +import { A } from './c'; +>A : typeof A + +new A(); // Error +>new A() : A +>A : typeof A + diff --git a/tests/baselines/reference/exportNamespace2.errors.txt b/tests/baselines/reference/exportNamespace2.errors.txt new file mode 100644 index 0000000000000..989c954428323 --- /dev/null +++ b/tests/baselines/reference/exportNamespace2.errors.txt @@ -0,0 +1,20 @@ +tests/cases/conformance/externalModules/typeOnly/d.ts(2,5): error TS1361: 'a' cannot be used as a value because it was imported using 'import type'. + + +==== tests/cases/conformance/externalModules/typeOnly/a.ts (0 errors) ==== + export class A {} + +==== tests/cases/conformance/externalModules/typeOnly/b.ts (0 errors) ==== + export * as a from './a'; + +==== tests/cases/conformance/externalModules/typeOnly/c.ts (0 errors) ==== + import type { a } from './b'; + export { a }; + +==== tests/cases/conformance/externalModules/typeOnly/d.ts (1 errors) ==== + import { a } from './c'; + new a.A(); // Error + ~ +!!! error TS1361: 'a' cannot be used as a value because it was imported using 'import type'. +!!! related TS1376 tests/cases/conformance/externalModules/typeOnly/c.ts:1:15: 'a' was imported here. + \ No newline at end of file diff --git a/tests/baselines/reference/exportNamespace2.js b/tests/baselines/reference/exportNamespace2.js new file mode 100644 index 0000000000000..360b0a424bac3 --- /dev/null +++ b/tests/baselines/reference/exportNamespace2.js @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/externalModules/typeOnly/exportNamespace2.ts] //// + +//// [a.ts] +export class A {} + +//// [b.ts] +export * as a from './a'; + +//// [c.ts] +import type { a } from './b'; +export { a }; + +//// [d.ts] +import { a } from './c'; +new a.A(); // Error + + +//// [a.js] +"use strict"; +exports.__esModule = true; +var A = /** @class */ (function () { + function A() { + } + return A; +}()); +exports.A = A; +//// [b.js] +"use strict"; +exports.__esModule = true; +exports.a = require("./a"); +//// [c.js] +"use strict"; +exports.__esModule = true; +//// [d.js] +"use strict"; +exports.__esModule = true; +new a.A(); // Error diff --git a/tests/baselines/reference/exportNamespace2.symbols b/tests/baselines/reference/exportNamespace2.symbols new file mode 100644 index 0000000000000..4e0cbd9f48435 --- /dev/null +++ b/tests/baselines/reference/exportNamespace2.symbols @@ -0,0 +1,24 @@ +=== tests/cases/conformance/externalModules/typeOnly/a.ts === +export class A {} +>A : Symbol(A, Decl(a.ts, 0, 0)) + +=== tests/cases/conformance/externalModules/typeOnly/b.ts === +export * as a from './a'; +>a : Symbol(a, Decl(b.ts, 0, 6)) + +=== tests/cases/conformance/externalModules/typeOnly/c.ts === +import type { a } from './b'; +>a : Symbol(a, Decl(c.ts, 0, 13)) + +export { a }; +>a : Symbol(a, Decl(c.ts, 1, 8)) + +=== tests/cases/conformance/externalModules/typeOnly/d.ts === +import { a } from './c'; +>a : Symbol(a, Decl(d.ts, 0, 8)) + +new a.A(); // Error +>a.A : Symbol(a.A, Decl(a.ts, 0, 0)) +>a : Symbol(a, Decl(d.ts, 0, 8)) +>A : Symbol(a.A, Decl(a.ts, 0, 0)) + diff --git a/tests/baselines/reference/exportNamespace2.types b/tests/baselines/reference/exportNamespace2.types new file mode 100644 index 0000000000000..78c73db6b1d54 --- /dev/null +++ b/tests/baselines/reference/exportNamespace2.types @@ -0,0 +1,25 @@ +=== tests/cases/conformance/externalModules/typeOnly/a.ts === +export class A {} +>A : A + +=== tests/cases/conformance/externalModules/typeOnly/b.ts === +export * as a from './a'; +>a : typeof a + +=== tests/cases/conformance/externalModules/typeOnly/c.ts === +import type { a } from './b'; +>a : any + +export { a }; +>a : typeof a + +=== tests/cases/conformance/externalModules/typeOnly/d.ts === +import { a } from './c'; +>a : typeof a + +new a.A(); // Error +>new a.A() : a.A +>a.A : typeof a.A +>a : typeof a +>A : typeof a.A + diff --git a/tests/baselines/reference/exportNamespace3.errors.txt b/tests/baselines/reference/exportNamespace3.errors.txt new file mode 100644 index 0000000000000..44c3d0c0a3401 --- /dev/null +++ b/tests/baselines/reference/exportNamespace3.errors.txt @@ -0,0 +1,18 @@ +tests/cases/conformance/externalModules/typeOnly/d.ts(2,7): error TS2339: Property 'A' does not exist on type 'typeof import("tests/cases/conformance/externalModules/typeOnly/b")'. + + +==== tests/cases/conformance/externalModules/typeOnly/a.ts (0 errors) ==== + export class A {} + +==== tests/cases/conformance/externalModules/typeOnly/b.ts (0 errors) ==== + export type { A } from './a'; + +==== tests/cases/conformance/externalModules/typeOnly/c.ts (0 errors) ==== + export * as a from './b'; + +==== tests/cases/conformance/externalModules/typeOnly/d.ts (1 errors) ==== + import { a } from './c'; + new a.A(); // Error + ~ +!!! error TS2339: Property 'A' does not exist on type 'typeof import("tests/cases/conformance/externalModules/typeOnly/b")'. + \ No newline at end of file diff --git a/tests/baselines/reference/exportNamespace3.js b/tests/baselines/reference/exportNamespace3.js new file mode 100644 index 0000000000000..2aa9d01301328 --- /dev/null +++ b/tests/baselines/reference/exportNamespace3.js @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/externalModules/typeOnly/exportNamespace3.ts] //// + +//// [a.ts] +export class A {} + +//// [b.ts] +export type { A } from './a'; + +//// [c.ts] +export * as a from './b'; + +//// [d.ts] +import { a } from './c'; +new a.A(); // Error + + +//// [a.js] +"use strict"; +exports.__esModule = true; +var A = /** @class */ (function () { + function A() { + } + return A; +}()); +exports.A = A; +//// [b.js] +"use strict"; +exports.__esModule = true; +//// [c.js] +"use strict"; +exports.__esModule = true; +exports.a = require("./b"); +//// [d.js] +"use strict"; +exports.__esModule = true; +var c_1 = require("./c"); +new c_1.a.A(); // Error diff --git a/tests/baselines/reference/exportNamespace3.symbols b/tests/baselines/reference/exportNamespace3.symbols new file mode 100644 index 0000000000000..6bf10e589b339 --- /dev/null +++ b/tests/baselines/reference/exportNamespace3.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/externalModules/typeOnly/a.ts === +export class A {} +>A : Symbol(A, Decl(a.ts, 0, 0)) + +=== tests/cases/conformance/externalModules/typeOnly/b.ts === +export type { A } from './a'; +>A : Symbol(A, Decl(b.ts, 0, 13)) + +=== tests/cases/conformance/externalModules/typeOnly/c.ts === +export * as a from './b'; +>a : Symbol(a, Decl(c.ts, 0, 6)) + +=== tests/cases/conformance/externalModules/typeOnly/d.ts === +import { a } from './c'; +>a : Symbol(a, Decl(d.ts, 0, 8)) + +new a.A(); // Error +>a : Symbol(a, Decl(d.ts, 0, 8)) + diff --git a/tests/baselines/reference/exportNamespace3.types b/tests/baselines/reference/exportNamespace3.types new file mode 100644 index 0000000000000..f2c6bfe18d4d6 --- /dev/null +++ b/tests/baselines/reference/exportNamespace3.types @@ -0,0 +1,22 @@ +=== tests/cases/conformance/externalModules/typeOnly/a.ts === +export class A {} +>A : A + +=== tests/cases/conformance/externalModules/typeOnly/b.ts === +export type { A } from './a'; +>A : import("tests/cases/conformance/externalModules/typeOnly/a").A + +=== tests/cases/conformance/externalModules/typeOnly/c.ts === +export * as a from './b'; +>a : typeof a + +=== tests/cases/conformance/externalModules/typeOnly/d.ts === +import { a } from './c'; +>a : typeof a + +new a.A(); // Error +>new a.A() : any +>a.A : any +>a : typeof a +>A : any + diff --git a/tests/baselines/reference/exportNamespace4.errors.txt b/tests/baselines/reference/exportNamespace4.errors.txt new file mode 100644 index 0000000000000..30b849456e67f --- /dev/null +++ b/tests/baselines/reference/exportNamespace4.errors.txt @@ -0,0 +1,25 @@ +tests/cases/conformance/externalModules/typeOnly/b.ts(1,1): error TS1383: Only named exports may use 'export type'. +tests/cases/conformance/externalModules/typeOnly/c.ts(1,1): error TS1383: Only named exports may use 'export type'. + + +==== tests/cases/conformance/externalModules/typeOnly/a.ts (0 errors) ==== + export class A {} + +==== tests/cases/conformance/externalModules/typeOnly/b.ts (1 errors) ==== + export type * from './a'; // Grammar error + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1383: Only named exports may use 'export type'. + +==== tests/cases/conformance/externalModules/typeOnly/c.ts (1 errors) ==== + export type * as ns from './a'; // Grammar error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1383: Only named exports may use 'export type'. + +==== tests/cases/conformance/externalModules/typeOnly/d.ts (0 errors) ==== + import { A } from './b'; + A; + +==== tests/cases/conformance/externalModules/typeOnly/e.ts (0 errors) ==== + import { ns } from './c'; + ns.A; + \ No newline at end of file diff --git a/tests/baselines/reference/exportNamespace4.js b/tests/baselines/reference/exportNamespace4.js new file mode 100644 index 0000000000000..e7da4ca86d055 --- /dev/null +++ b/tests/baselines/reference/exportNamespace4.js @@ -0,0 +1,45 @@ +//// [tests/cases/conformance/externalModules/typeOnly/exportNamespace4.ts] //// + +//// [a.ts] +export class A {} + +//// [b.ts] +export type * from './a'; // Grammar error + +//// [c.ts] +export type * as ns from './a'; // Grammar error + +//// [d.ts] +import { A } from './b'; +A; + +//// [e.ts] +import { ns } from './c'; +ns.A; + + +//// [a.js] +"use strict"; +exports.__esModule = true; +var A = /** @class */ (function () { + function A() { + } + return A; +}()); +exports.A = A; +//// [b.js] +"use strict"; +exports.__esModule = true; +//// [c.js] +"use strict"; +exports.__esModule = true; +//// [d.js] +"use strict"; +exports.__esModule = true; +var b_1 = require("./b"); +b_1.A; +//// [e.js] +"use strict"; +exports.__esModule = true; +var c_1 = require("./c"); +c_1.ns.A; diff --git a/tests/baselines/reference/exportNamespace4.symbols b/tests/baselines/reference/exportNamespace4.symbols new file mode 100644 index 0000000000000..860bb80b87795 --- /dev/null +++ b/tests/baselines/reference/exportNamespace4.symbols @@ -0,0 +1,27 @@ +=== tests/cases/conformance/externalModules/typeOnly/a.ts === +export class A {} +>A : Symbol(A, Decl(a.ts, 0, 0)) + +=== tests/cases/conformance/externalModules/typeOnly/b.ts === +export type * from './a'; // Grammar error +No type information for this code. +No type information for this code.=== tests/cases/conformance/externalModules/typeOnly/c.ts === +export type * as ns from './a'; // Grammar error +>ns : Symbol(ns, Decl(c.ts, 0, 11)) + +=== tests/cases/conformance/externalModules/typeOnly/d.ts === +import { A } from './b'; +>A : Symbol(A, Decl(d.ts, 0, 8)) + +A; +>A : Symbol(A, Decl(d.ts, 0, 8)) + +=== tests/cases/conformance/externalModules/typeOnly/e.ts === +import { ns } from './c'; +>ns : Symbol(ns, Decl(e.ts, 0, 8)) + +ns.A; +>ns.A : Symbol(ns.A, Decl(a.ts, 0, 0)) +>ns : Symbol(ns, Decl(e.ts, 0, 8)) +>A : Symbol(ns.A, Decl(a.ts, 0, 0)) + diff --git a/tests/baselines/reference/exportNamespace4.types b/tests/baselines/reference/exportNamespace4.types new file mode 100644 index 0000000000000..18155fb4eb6e8 --- /dev/null +++ b/tests/baselines/reference/exportNamespace4.types @@ -0,0 +1,27 @@ +=== tests/cases/conformance/externalModules/typeOnly/a.ts === +export class A {} +>A : A + +=== tests/cases/conformance/externalModules/typeOnly/b.ts === +export type * from './a'; // Grammar error +No type information for this code. +No type information for this code.=== tests/cases/conformance/externalModules/typeOnly/c.ts === +export type * as ns from './a'; // Grammar error +>ns : typeof ns + +=== tests/cases/conformance/externalModules/typeOnly/d.ts === +import { A } from './b'; +>A : typeof A + +A; +>A : typeof A + +=== tests/cases/conformance/externalModules/typeOnly/e.ts === +import { ns } from './c'; +>ns : typeof ns + +ns.A; +>ns.A : typeof ns.A +>ns : typeof ns +>A : typeof ns.A + diff --git a/tests/baselines/reference/exportNonInitializedVariablesAMD.js b/tests/baselines/reference/exportNonInitializedVariablesAMD.js index 24ecd232495c9..c22b8d5a458ab 100644 --- a/tests/baselines/reference/exportNonInitializedVariablesAMD.js +++ b/tests/baselines/reference/exportNonInitializedVariablesAMD.js @@ -40,11 +40,17 @@ define(["require", "exports"], function (require, exports) { var ; let; var ; + exports.a = void 0; + exports.b = void 0; + exports.c = void 0; + exports.d = void 0; var A = /** @class */ (function () { function A() { } return A; }()); + exports.e = void 0; + exports.f = void 0; var B; (function (B) { B.a = 1, B.c = 2; diff --git a/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js b/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js index 8b4475e4bf9fa..bfa215c062968 100644 --- a/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js +++ b/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js @@ -39,11 +39,17 @@ exports.__esModule = true; var ; let; var ; +exports.a = void 0; +exports.b = void 0; +exports.c = void 0; +exports.d = void 0; var A = /** @class */ (function () { function A() { } return A; }()); +exports.e = void 0; +exports.f = void 0; var B; (function (B) { B.a = 1, B.c = 2; diff --git a/tests/baselines/reference/exportNonInitializedVariablesUMD.js b/tests/baselines/reference/exportNonInitializedVariablesUMD.js index bbea71b763dca..f2665d67b1030 100644 --- a/tests/baselines/reference/exportNonInitializedVariablesUMD.js +++ b/tests/baselines/reference/exportNonInitializedVariablesUMD.js @@ -48,11 +48,17 @@ export let h1: D = new D; var ; let; var ; + exports.a = void 0; + exports.b = void 0; + exports.c = void 0; + exports.d = void 0; var A = /** @class */ (function () { function A() { } return A; }()); + exports.e = void 0; + exports.f = void 0; var B; (function (B) { B.a = 1, B.c = 2; diff --git a/tests/baselines/reference/exportStar-amd.js b/tests/baselines/reference/exportStar-amd.js index 7658c470e5574..02a1c32415d8c 100644 --- a/tests/baselines/reference/exportStar-amd.js +++ b/tests/baselines/reference/exportStar-amd.js @@ -55,15 +55,22 @@ define(["require", "exports"], function (require, exports) { exports.z = z; }); //// [t4.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); +} define(["require", "exports", "./t1", "./t2", "./t3"], function (require, exports, t1_1, t2_1, t3_1) { "use strict"; - function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - } Object.defineProperty(exports, "__esModule", { value: true }); - __export(t1_1); - __export(t2_1); - __export(t3_1); + __exportStar(t1_1, exports); + __exportStar(t2_1, exports); + __exportStar(t3_1, exports); }); //// [main.js] define(["require", "exports", "./t4"], function (require, exports, t4_1) { diff --git a/tests/baselines/reference/exportStar.js b/tests/baselines/reference/exportStar.js index 36818f8ae9b76..00b20b2c45474 100644 --- a/tests/baselines/reference/exportStar.js +++ b/tests/baselines/reference/exportStar.js @@ -50,13 +50,20 @@ var z = "z"; exports.z = z; //// [t4.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./t1")); -__export(require("./t2")); -__export(require("./t3")); +__exportStar(require("./t1"), exports); +__exportStar(require("./t2"), exports); +__exportStar(require("./t3"), exports); //// [main.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/exportStarForValues5.js b/tests/baselines/reference/exportStarForValues5.js index 812058ebd06f3..53e7c68907aca 100644 --- a/tests/baselines/reference/exportStarForValues5.js +++ b/tests/baselines/reference/exportStarForValues5.js @@ -16,4 +16,5 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.x = void 0; }); diff --git a/tests/baselines/reference/exportStarForValues7.js b/tests/baselines/reference/exportStarForValues7.js index af213d1308028..69d636af2917e 100644 --- a/tests/baselines/reference/exportStarForValues7.js +++ b/tests/baselines/reference/exportStarForValues7.js @@ -23,12 +23,19 @@ define(["require", "exports"], function (require, exports) { exports.x = 1; }); //// [file3.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); +} define(["require", "exports", "file2"], function (require, exports, file2_1) { "use strict"; - function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - } exports.__esModule = true; - __export(file2_1); + __exportStar(file2_1, exports); exports.x = 1; }); diff --git a/tests/baselines/reference/exportStarForValues8.js b/tests/baselines/reference/exportStarForValues8.js index 7a0045c22cb23..61ddc4eccf4f1 100644 --- a/tests/baselines/reference/exportStarForValues8.js +++ b/tests/baselines/reference/exportStarForValues8.js @@ -41,23 +41,37 @@ define(["require", "exports"], function (require, exports) { exports.x = 1; }); //// [file4.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); +} define(["require", "exports", "file2", "file3"], function (require, exports, file2_1, file3_1) { "use strict"; - function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - } exports.__esModule = true; - __export(file2_1); - __export(file3_1); + __exportStar(file2_1, exports); + __exportStar(file3_1, exports); exports.x = 1; }); //// [file5.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); +} define(["require", "exports", "file4"], function (require, exports, file4_1) { "use strict"; - function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - } exports.__esModule = true; - __export(file4_1); + __exportStar(file4_1, exports); exports.x = 1; }); diff --git a/tests/baselines/reference/exportStarForValues9.js b/tests/baselines/reference/exportStarForValues9.js index 8eb92c05e741f..5bbf6bce4ce96 100644 --- a/tests/baselines/reference/exportStarForValues9.js +++ b/tests/baselines/reference/exportStarForValues9.js @@ -21,22 +21,36 @@ define(["require", "exports"], function (require, exports) { exports.__esModule = true; }); //// [file3.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); +} define(["require", "exports", "file2"], function (require, exports, file2_1) { "use strict"; - function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - } exports.__esModule = true; - __export(file2_1); + __exportStar(file2_1, exports); exports.x = 1; }); //// [file2.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); +} define(["require", "exports", "file3"], function (require, exports, file3_1) { "use strict"; - function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - } exports.__esModule = true; - __export(file3_1); + __exportStar(file3_1, exports); exports.x = 1; }); diff --git a/tests/baselines/reference/exportStarFromEmptyModule.js b/tests/baselines/reference/exportStarFromEmptyModule.js index be7de642a6a6e..ef3571a47467c 100644 --- a/tests/baselines/reference/exportStarFromEmptyModule.js +++ b/tests/baselines/reference/exportStarFromEmptyModule.js @@ -35,12 +35,19 @@ exports.A = A; // empty //// [exportStarFromEmptyModule_module3.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./exportStarFromEmptyModule_module2")); -__export(require("./exportStarFromEmptyModule_module1")); +__exportStar(require("./exportStarFromEmptyModule_module2"), exports); +__exportStar(require("./exportStarFromEmptyModule_module1"), exports); var A = /** @class */ (function () { function A() { } diff --git a/tests/baselines/reference/exportedAliasedEnumTag.symbols b/tests/baselines/reference/exportedAliasedEnumTag.symbols new file mode 100644 index 0000000000000..81cc69aa7e0e4 --- /dev/null +++ b/tests/baselines/reference/exportedAliasedEnumTag.symbols @@ -0,0 +1,18 @@ +=== tests/cases/conformance/jsdoc/exportedAliasedEnumTag.js === +var middlewarify = module.exports = {}; +>middlewarify : Symbol(middlewarify, Decl(exportedAliasedEnumTag.js, 0, 3)) +>module.exports : Symbol("tests/cases/conformance/jsdoc/exportedAliasedEnumTag", Decl(exportedAliasedEnumTag.js, 0, 0)) +>module : Symbol(module, Decl(exportedAliasedEnumTag.js, 0, 18)) +>exports : Symbol("tests/cases/conformance/jsdoc/exportedAliasedEnumTag", Decl(exportedAliasedEnumTag.js, 0, 0)) + +/** @enum */ +middlewarify.Type = { +>middlewarify.Type : Symbol(Type, Decl(exportedAliasedEnumTag.js, 0, 39), Decl(exportedAliasedEnumTag.js, 3, 13), Decl(exportedAliasedEnumTag.js, 2, 4)) +>middlewarify : Symbol(middlewarify, Decl(exportedAliasedEnumTag.js, 0, 3)) +>Type : Symbol(Type, Decl(exportedAliasedEnumTag.js, 0, 39), Decl(exportedAliasedEnumTag.js, 3, 13), Decl(exportedAliasedEnumTag.js, 2, 4)) + + BEFORE: 'before' +>BEFORE : Symbol(BEFORE, Decl(exportedAliasedEnumTag.js, 3, 21)) + +}; + diff --git a/tests/baselines/reference/exportedAliasedEnumTag.types b/tests/baselines/reference/exportedAliasedEnumTag.types new file mode 100644 index 0000000000000..b4c14bc52b2ab --- /dev/null +++ b/tests/baselines/reference/exportedAliasedEnumTag.types @@ -0,0 +1,23 @@ +=== tests/cases/conformance/jsdoc/exportedAliasedEnumTag.js === +var middlewarify = module.exports = {}; +>middlewarify : typeof import("tests/cases/conformance/jsdoc/exportedAliasedEnumTag") +>module.exports = {} : typeof import("tests/cases/conformance/jsdoc/exportedAliasedEnumTag") +>module.exports : typeof import("tests/cases/conformance/jsdoc/exportedAliasedEnumTag") +>module : { "\"tests/cases/conformance/jsdoc/exportedAliasedEnumTag\"": typeof import("tests/cases/conformance/jsdoc/exportedAliasedEnumTag"); } +>exports : typeof import("tests/cases/conformance/jsdoc/exportedAliasedEnumTag") +>{} : {} + +/** @enum */ +middlewarify.Type = { +>middlewarify.Type = { BEFORE: 'before'} : { BEFORE: string; } +>middlewarify.Type : { BEFORE: string; } +>middlewarify : typeof import("tests/cases/conformance/jsdoc/exportedAliasedEnumTag") +>Type : { BEFORE: string; } +>{ BEFORE: 'before'} : { BEFORE: string; } + + BEFORE: 'before' +>BEFORE : string +>'before' : "before" + +}; + diff --git a/tests/baselines/reference/exportingContainingVisibleType.js b/tests/baselines/reference/exportingContainingVisibleType.js index b7c3be9487601..453f730c9462a 100644 --- a/tests/baselines/reference/exportingContainingVisibleType.js +++ b/tests/baselines/reference/exportingContainingVisibleType.js @@ -22,7 +22,7 @@ define(["require", "exports"], function (require, exports) { var i; return i; // Should be fine (previous bug report visibility error). }, - enumerable: true, + enumerable: false, configurable: true }); return Foo; diff --git a/tests/baselines/reference/exportsAndImports1-amd.js b/tests/baselines/reference/exportsAndImports1-amd.js index f93abb906d2a7..21463d68762b5 100644 --- a/tests/baselines/reference/exportsAndImports1-amd.js +++ b/tests/baselines/reference/exportsAndImports1-amd.js @@ -65,21 +65,21 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports", "./t1"], function (require, exports, t1_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.v = t1_1.v; - exports.f = t1_1.f; - exports.C = t1_1.C; - exports.E = t1_1.E; - exports.M = t1_1.M; - exports.a = t1_1.a; + Object.defineProperty(exports, "v", { enumerable: true, get: function () { return t1_1.v; } }); + Object.defineProperty(exports, "f", { enumerable: true, get: function () { return t1_1.f; } }); + Object.defineProperty(exports, "C", { enumerable: true, get: function () { return t1_1.C; } }); + Object.defineProperty(exports, "E", { enumerable: true, get: function () { return t1_1.E; } }); + Object.defineProperty(exports, "M", { enumerable: true, get: function () { return t1_1.M; } }); + Object.defineProperty(exports, "a", { enumerable: true, get: function () { return t1_1.a; } }); }); //// [t3.js] define(["require", "exports", "./t1"], function (require, exports, t1_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.v = t1_1.v; - exports.f = t1_1.f; - exports.C = t1_1.C; - exports.E = t1_1.E; - exports.M = t1_1.M; - exports.a = t1_1.a; + Object.defineProperty(exports, "v", { enumerable: true, get: function () { return t1_1.v; } }); + Object.defineProperty(exports, "f", { enumerable: true, get: function () { return t1_1.f; } }); + Object.defineProperty(exports, "C", { enumerable: true, get: function () { return t1_1.C; } }); + Object.defineProperty(exports, "E", { enumerable: true, get: function () { return t1_1.E; } }); + Object.defineProperty(exports, "M", { enumerable: true, get: function () { return t1_1.M; } }); + Object.defineProperty(exports, "a", { enumerable: true, get: function () { return t1_1.a; } }); }); diff --git a/tests/baselines/reference/exportsAndImports1-es6.js b/tests/baselines/reference/exportsAndImports1-es6.js index 71e8de6f9faa0..d6bd4f9f8ca00 100644 --- a/tests/baselines/reference/exportsAndImports1-es6.js +++ b/tests/baselines/reference/exportsAndImports1-es6.js @@ -60,19 +60,19 @@ exports.a = a; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); -exports.v = t1_1.v; -exports.f = t1_1.f; -exports.C = t1_1.C; -exports.E = t1_1.E; -exports.M = t1_1.M; -exports.a = t1_1.a; +Object.defineProperty(exports, "v", { enumerable: true, get: function () { return t1_1.v; } }); +Object.defineProperty(exports, "f", { enumerable: true, get: function () { return t1_1.f; } }); +Object.defineProperty(exports, "C", { enumerable: true, get: function () { return t1_1.C; } }); +Object.defineProperty(exports, "E", { enumerable: true, get: function () { return t1_1.E; } }); +Object.defineProperty(exports, "M", { enumerable: true, get: function () { return t1_1.M; } }); +Object.defineProperty(exports, "a", { enumerable: true, get: function () { return t1_1.a; } }); //// [t3.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const t1_1 = require("./t1"); -exports.v = t1_1.v; -exports.f = t1_1.f; -exports.C = t1_1.C; -exports.E = t1_1.E; -exports.M = t1_1.M; -exports.a = t1_1.a; +Object.defineProperty(exports, "v", { enumerable: true, get: function () { return t1_1.v; } }); +Object.defineProperty(exports, "f", { enumerable: true, get: function () { return t1_1.f; } }); +Object.defineProperty(exports, "C", { enumerable: true, get: function () { return t1_1.C; } }); +Object.defineProperty(exports, "E", { enumerable: true, get: function () { return t1_1.E; } }); +Object.defineProperty(exports, "M", { enumerable: true, get: function () { return t1_1.M; } }); +Object.defineProperty(exports, "a", { enumerable: true, get: function () { return t1_1.a; } }); diff --git a/tests/baselines/reference/exportsAndImports1.js b/tests/baselines/reference/exportsAndImports1.js index 156a7bd1152a2..223f3c2c963f9 100644 --- a/tests/baselines/reference/exportsAndImports1.js +++ b/tests/baselines/reference/exportsAndImports1.js @@ -61,14 +61,21 @@ var a = M.x; exports.a = a; //// [t2.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var t1_1 = require("./t1"); -exports.v = t1_1.v; -exports.f = t1_1.f; -exports.C = t1_1.C; -exports.E = t1_1.E; -exports.M = t1_1.M; -exports.a = t1_1.a; +__createBinding(exports, t1_1, "v"); +__createBinding(exports, t1_1, "f"); +__createBinding(exports, t1_1, "C"); +__createBinding(exports, t1_1, "E"); +__createBinding(exports, t1_1, "M"); +__createBinding(exports, t1_1, "a"); //// [t3.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/exportsAndImports2-amd.js b/tests/baselines/reference/exportsAndImports2-amd.js index 04685dcaa332a..26fc9a74ec513 100644 --- a/tests/baselines/reference/exportsAndImports2-amd.js +++ b/tests/baselines/reference/exportsAndImports2-amd.js @@ -23,13 +23,13 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports", "./t1"], function (require, exports, t1_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.y = t1_1.x; - exports.x = t1_1.y; + Object.defineProperty(exports, "y", { enumerable: true, get: function () { return t1_1.x; } }); + Object.defineProperty(exports, "x", { enumerable: true, get: function () { return t1_1.y; } }); }); //// [t3.js] define(["require", "exports", "./t1"], function (require, exports, t1_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.y = t1_1.x; - exports.x = t1_1.y; + Object.defineProperty(exports, "y", { enumerable: true, get: function () { return t1_1.x; } }); + Object.defineProperty(exports, "x", { enumerable: true, get: function () { return t1_1.y; } }); }); diff --git a/tests/baselines/reference/exportsAndImports2-es6.js b/tests/baselines/reference/exportsAndImports2-es6.js index 2a57a43f1a5ff..465092395eeee 100644 --- a/tests/baselines/reference/exportsAndImports2-es6.js +++ b/tests/baselines/reference/exportsAndImports2-es6.js @@ -21,11 +21,11 @@ exports.y = "y"; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); -exports.y = t1_1.x; -exports.x = t1_1.y; +Object.defineProperty(exports, "y", { enumerable: true, get: function () { return t1_1.x; } }); +Object.defineProperty(exports, "x", { enumerable: true, get: function () { return t1_1.y; } }); //// [t3.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const t1_1 = require("./t1"); -exports.y = t1_1.x; -exports.x = t1_1.y; +Object.defineProperty(exports, "y", { enumerable: true, get: function () { return t1_1.x; } }); +Object.defineProperty(exports, "x", { enumerable: true, get: function () { return t1_1.y; } }); diff --git a/tests/baselines/reference/exportsAndImports2.js b/tests/baselines/reference/exportsAndImports2.js index d905ab3827fc5..d19d399ef91d3 100644 --- a/tests/baselines/reference/exportsAndImports2.js +++ b/tests/baselines/reference/exportsAndImports2.js @@ -19,10 +19,17 @@ exports.x = "x"; exports.y = "y"; //// [t2.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var t1_1 = require("./t1"); -exports.y = t1_1.x; -exports.x = t1_1.y; +__createBinding(exports, t1_1, "x", "y"); +__createBinding(exports, t1_1, "y", "x"); //// [t3.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/exportsAndImports3-amd.js b/tests/baselines/reference/exportsAndImports3-amd.js index 6ee327f979d8a..67001be7e8886 100644 --- a/tests/baselines/reference/exportsAndImports3-amd.js +++ b/tests/baselines/reference/exportsAndImports3-amd.js @@ -67,21 +67,21 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports", "./t1"], function (require, exports, t1_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.v = t1_1.v1; - exports.f = t1_1.f1; - exports.C = t1_1.C1; - exports.E = t1_1.E1; - exports.M = t1_1.M1; - exports.a = t1_1.a1; + Object.defineProperty(exports, "v", { enumerable: true, get: function () { return t1_1.v1; } }); + Object.defineProperty(exports, "f", { enumerable: true, get: function () { return t1_1.f1; } }); + Object.defineProperty(exports, "C", { enumerable: true, get: function () { return t1_1.C1; } }); + Object.defineProperty(exports, "E", { enumerable: true, get: function () { return t1_1.E1; } }); + Object.defineProperty(exports, "M", { enumerable: true, get: function () { return t1_1.M1; } }); + Object.defineProperty(exports, "a", { enumerable: true, get: function () { return t1_1.a1; } }); }); //// [t3.js] define(["require", "exports", "./t1"], function (require, exports, t1_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.v = t1_1.v1; - exports.f = t1_1.f1; - exports.C = t1_1.C1; - exports.E = t1_1.E1; - exports.M = t1_1.M1; - exports.a = t1_1.a1; + Object.defineProperty(exports, "v", { enumerable: true, get: function () { return t1_1.v1; } }); + Object.defineProperty(exports, "f", { enumerable: true, get: function () { return t1_1.f1; } }); + Object.defineProperty(exports, "C", { enumerable: true, get: function () { return t1_1.C1; } }); + Object.defineProperty(exports, "E", { enumerable: true, get: function () { return t1_1.E1; } }); + Object.defineProperty(exports, "M", { enumerable: true, get: function () { return t1_1.M1; } }); + Object.defineProperty(exports, "a", { enumerable: true, get: function () { return t1_1.a1; } }); }); diff --git a/tests/baselines/reference/exportsAndImports3-es6.js b/tests/baselines/reference/exportsAndImports3-es6.js index 541223717773e..b5c407f445fd8 100644 --- a/tests/baselines/reference/exportsAndImports3-es6.js +++ b/tests/baselines/reference/exportsAndImports3-es6.js @@ -62,19 +62,19 @@ exports.a1 = exports.a; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); -exports.v = t1_1.v1; -exports.f = t1_1.f1; -exports.C = t1_1.C1; -exports.E = t1_1.E1; -exports.M = t1_1.M1; -exports.a = t1_1.a1; +Object.defineProperty(exports, "v", { enumerable: true, get: function () { return t1_1.v1; } }); +Object.defineProperty(exports, "f", { enumerable: true, get: function () { return t1_1.f1; } }); +Object.defineProperty(exports, "C", { enumerable: true, get: function () { return t1_1.C1; } }); +Object.defineProperty(exports, "E", { enumerable: true, get: function () { return t1_1.E1; } }); +Object.defineProperty(exports, "M", { enumerable: true, get: function () { return t1_1.M1; } }); +Object.defineProperty(exports, "a", { enumerable: true, get: function () { return t1_1.a1; } }); //// [t3.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const t1_1 = require("./t1"); -exports.v = t1_1.v1; -exports.f = t1_1.f1; -exports.C = t1_1.C1; -exports.E = t1_1.E1; -exports.M = t1_1.M1; -exports.a = t1_1.a1; +Object.defineProperty(exports, "v", { enumerable: true, get: function () { return t1_1.v1; } }); +Object.defineProperty(exports, "f", { enumerable: true, get: function () { return t1_1.f1; } }); +Object.defineProperty(exports, "C", { enumerable: true, get: function () { return t1_1.C1; } }); +Object.defineProperty(exports, "E", { enumerable: true, get: function () { return t1_1.E1; } }); +Object.defineProperty(exports, "M", { enumerable: true, get: function () { return t1_1.M1; } }); +Object.defineProperty(exports, "a", { enumerable: true, get: function () { return t1_1.a1; } }); diff --git a/tests/baselines/reference/exportsAndImports3.js b/tests/baselines/reference/exportsAndImports3.js index e5a0b47639107..29c7c926d1fb9 100644 --- a/tests/baselines/reference/exportsAndImports3.js +++ b/tests/baselines/reference/exportsAndImports3.js @@ -63,14 +63,21 @@ exports.a = M.x; exports.a1 = exports.a; //// [t2.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var t1_1 = require("./t1"); -exports.v = t1_1.v1; -exports.f = t1_1.f1; -exports.C = t1_1.C1; -exports.E = t1_1.E1; -exports.M = t1_1.M1; -exports.a = t1_1.a1; +__createBinding(exports, t1_1, "v1", "v"); +__createBinding(exports, t1_1, "f1", "f"); +__createBinding(exports, t1_1, "C1", "C"); +__createBinding(exports, t1_1, "E1", "E"); +__createBinding(exports, t1_1, "M1", "M"); +__createBinding(exports, t1_1, "a1", "a"); //// [t3.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/exportsAndImports4-amd.js b/tests/baselines/reference/exportsAndImports4-amd.js index 52a41a0a4512b..3d97e29a852c4 100644 --- a/tests/baselines/reference/exportsAndImports4-amd.js +++ b/tests/baselines/reference/exportsAndImports4-amd.js @@ -54,7 +54,7 @@ define(["require", "exports", "./t1", "./t1", "./t1", "./t1", "./t1", "./t1"], f t1_1.default; exports.c = c; c.default; - exports.d = t1_2.default; + Object.defineProperty(exports, "d", { enumerable: true, get: function () { return t1_2.default; } }); t1_2.default; var e2 = t1_3; exports.e1 = t1_3.default; @@ -62,7 +62,7 @@ define(["require", "exports", "./t1", "./t1", "./t1", "./t1", "./t1", "./t1"], f t1_3.default; e2.default; exports.f1 = t1_4.default; - exports.f2 = t1_4.default; + Object.defineProperty(exports, "f2", { enumerable: true, get: function () { return t1_4.default; } }); t1_4.default; t1_4.default; }); diff --git a/tests/baselines/reference/exportsAndImports4-es6.js b/tests/baselines/reference/exportsAndImports4-es6.js index ee35571942f6c..e40192c9626d5 100644 --- a/tests/baselines/reference/exportsAndImports4-es6.js +++ b/tests/baselines/reference/exportsAndImports4-es6.js @@ -55,7 +55,7 @@ const c = require("./t1"); exports.c = c; c.default; const t1_2 = require("./t1"); -exports.d = t1_2.default; +Object.defineProperty(exports, "d", { enumerable: true, get: function () { return t1_2.default; } }); t1_2.default; const t1_3 = require("./t1"), e2 = t1_3; exports.e1 = t1_3.default; @@ -64,6 +64,6 @@ t1_3.default; e2.default; const t1_4 = require("./t1"); exports.f1 = t1_4.default; -exports.f2 = t1_4.default; +Object.defineProperty(exports, "f2", { enumerable: true, get: function () { return t1_4.default; } }); t1_4.default; t1_4.default; diff --git a/tests/baselines/reference/exportsAndImports4.js b/tests/baselines/reference/exportsAndImports4.js index efb93eeebf62e..bbd6271e72193 100644 --- a/tests/baselines/reference/exportsAndImports4.js +++ b/tests/baselines/reference/exportsAndImports4.js @@ -55,7 +55,7 @@ var c = require("./t1"); exports.c = c; c.default; var t1_2 = require("./t1"); -exports.d = t1_2.default; +Object.defineProperty(exports, "d", { enumerable: true, get: function () { return t1_2.default; } }); t1_2.default; var t1_3 = require("./t1"), e2 = t1_3; exports.e1 = t1_3.default; @@ -64,6 +64,6 @@ t1_3.default; e2.default; var t1_4 = require("./t1"); exports.f1 = t1_4.default; -exports.f2 = t1_4.default; +Object.defineProperty(exports, "f2", { enumerable: true, get: function () { return t1_4.default; } }); t1_4.default; t1_4.default; diff --git a/tests/baselines/reference/extractInferenceImprovement.errors.txt b/tests/baselines/reference/extractInferenceImprovement.errors.txt index b3582f6b02227..74b2f61451505 100644 --- a/tests/baselines/reference/extractInferenceImprovement.errors.txt +++ b/tests/baselines/reference/extractInferenceImprovement.errors.txt @@ -1,8 +1,10 @@ tests/cases/compiler/extractInferenceImprovement.ts(26,26): error TS2345: Argument of type 'unique symbol' is not assignable to parameter of type 'never'. +tests/cases/compiler/extractInferenceImprovement.ts(28,1): error TS2322: Type 'string | number' is not assignable to type 'string'. + Type 'number' is not assignable to type 'string'. tests/cases/compiler/extractInferenceImprovement.ts(28,26): error TS2345: Argument of type 'unique symbol' is not assignable to parameter of type '"first" | "second"'. -==== tests/cases/compiler/extractInferenceImprovement.ts (2 errors) ==== +==== tests/cases/compiler/extractInferenceImprovement.ts (3 errors) ==== // repro mostly from https://github.com/Microsoft/TypeScript/issues/25065 function getProperty2(obj: T, key: Extract): T[K] { return obj[key]; @@ -33,6 +35,9 @@ tests/cases/compiler/extractInferenceImprovement.ts(28,26): error TS2345: Argume !!! error TS2345: Argument of type 'unique symbol' is not assignable to parameter of type 'never'. prop = getProperty3(obj, s); + ~~~~ +!!! error TS2322: Type 'string | number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. ~ !!! error TS2345: Argument of type 'unique symbol' is not assignable to parameter of type '"first" | "second"'. \ No newline at end of file diff --git a/tests/baselines/reference/extractInferenceImprovement.types b/tests/baselines/reference/extractInferenceImprovement.types index 0e18dc30ee005..e14e293e8197a 100644 --- a/tests/baselines/reference/extractInferenceImprovement.types +++ b/tests/baselines/reference/extractInferenceImprovement.types @@ -65,17 +65,17 @@ prop = getProperty3(obj, 'first'); // Should fail prop = getProperty2(obj, s); ->prop = getProperty2(obj, s) : any +>prop = getProperty2(obj, s) : string >prop : string ->getProperty2(obj, s) : any +>getProperty2(obj, s) : string >getProperty2 : (obj: T, key: Extract) => T[K] >obj : StrNum >s : unique symbol prop = getProperty3(obj, s); ->prop = getProperty3(obj, s) : any +>prop = getProperty3(obj, s) : string | number >prop : string ->getProperty3(obj, s) : any +>getProperty3(obj, s) : string | number >getProperty3 : >(obj: T, key: K) => T[K] >obj : StrNum >s : unique symbol diff --git a/tests/baselines/reference/fieldAndGetterWithSameName.js b/tests/baselines/reference/fieldAndGetterWithSameName.js index d753aa707563d..165797687d4f2 100644 --- a/tests/baselines/reference/fieldAndGetterWithSameName.js +++ b/tests/baselines/reference/fieldAndGetterWithSameName.js @@ -13,7 +13,7 @@ define(["require", "exports"], function (require, exports) { } Object.defineProperty(C.prototype, "x", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.types b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.types index 776ecd2fc5d61..e097957fcdfc0 100644 --- a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.types +++ b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.types @@ -5,7 +5,7 @@ function bar(item1: T, item2: T) { } >item2 : T bar(1, ""); // Should be ok ->bar(1, "") : any +>bar(1, "") : void >bar : (item1: T, item2: T) => void >1 : 1 >"" : "" diff --git a/tests/baselines/reference/fixingTypeParametersRepeatedly2.errors.txt b/tests/baselines/reference/fixingTypeParametersRepeatedly2.errors.txt index 24aa0d124ca19..7ef4455e3d821 100644 --- a/tests/baselines/reference/fixingTypeParametersRepeatedly2.errors.txt +++ b/tests/baselines/reference/fixingTypeParametersRepeatedly2.errors.txt @@ -1,7 +1,8 @@ tests/cases/compiler/fixingTypeParametersRepeatedly2.ts(11,32): error TS2741: Property 'toBase' is missing in type 'Base' but required in type 'Derived'. +tests/cases/compiler/fixingTypeParametersRepeatedly2.ts(17,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'result' must be of type 'Derived', but here has type 'Base'. -==== tests/cases/compiler/fixingTypeParametersRepeatedly2.ts (1 errors) ==== +==== tests/cases/compiler/fixingTypeParametersRepeatedly2.ts (2 errors) ==== interface Base { baseProp; } @@ -22,4 +23,7 @@ tests/cases/compiler/fixingTypeParametersRepeatedly2.ts(11,32): error TS2741: Pr // The same error should be observed in both cases. declare function bar(x: T, func: (p: T) => T): T; declare function bar(x: T, func: (p: T) => T): T; - var result = bar(derived, d => d.toBase()); \ No newline at end of file + var result = bar(derived, d => d.toBase()); + ~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'result' must be of type 'Derived', but here has type 'Base'. +!!! related TS6203 tests/cases/compiler/fixingTypeParametersRepeatedly2.ts:11:5: 'result' was also declared here. \ No newline at end of file diff --git a/tests/baselines/reference/fixingTypeParametersRepeatedly2.types b/tests/baselines/reference/fixingTypeParametersRepeatedly2.types index 204e83fe60048..52fb38c025c43 100644 --- a/tests/baselines/reference/fixingTypeParametersRepeatedly2.types +++ b/tests/baselines/reference/fixingTypeParametersRepeatedly2.types @@ -18,8 +18,8 @@ declare function foo(x: T, func: (p: T) => T): T; >p : T var result = foo(derived, d => d.toBase()); ->result : any ->foo(derived, d => d.toBase()) : any +>result : Derived +>foo(derived, d => d.toBase()) : Derived >foo : (x: T, func: (p: T) => T) => T >derived : Derived >d => d.toBase() : (d: Derived) => Base @@ -44,7 +44,7 @@ declare function bar(x: T, func: (p: T) => T): T; >p : T var result = bar(derived, d => d.toBase()); ->result : any +>result : Derived >bar(derived, d => d.toBase()) : Base >bar : { (x: T, func: (p: T) => T): T; (x: T, func: (p: T) => T): T; } >derived : Derived diff --git a/tests/baselines/reference/for-of39.types b/tests/baselines/reference/for-of39.types index 0b69e4d1b3063..fe0b788c3b31d 100644 --- a/tests/baselines/reference/for-of39.types +++ b/tests/baselines/reference/for-of39.types @@ -1,24 +1,24 @@ === tests/cases/conformance/es6/for-ofStatements/for-of39.ts === var map = new Map([["", true], ["", 0]]); ->map : any ->new Map([["", true], ["", 0]]) : any +>map : Map +>new Map([["", true], ["", 0]]) : Map >Map : MapConstructor ->[["", true], ["", 0]] : ((string | boolean)[] | (string | number)[])[] ->["", true] : (string | boolean)[] +>[["", true], ["", 0]] : ([string, number] | [string, true])[] +>["", true] : [string, true] >"" : "" >true : true ->["", 0] : (string | number)[] +>["", 0] : [string, number] >"" : "" >0 : 0 for (var [k, v] of map) { ->k : any ->v : any ->map : any +>k : string +>v : boolean +>map : Map k; ->k : any +>k : string v; ->v : any +>v : boolean } diff --git a/tests/baselines/reference/for-of49.types b/tests/baselines/reference/for-of49.types index fe46157c2864e..3666ba5432bed 100644 --- a/tests/baselines/reference/for-of49.types +++ b/tests/baselines/reference/for-of49.types @@ -13,7 +13,7 @@ var map = new Map([["", true]]); >true : true for ([k, ...[v]] of map) { ->[k, ...[v]] : [string, ...boolean[]] +>[k, ...[v]] : [string, boolean] >k : string >...[v] : boolean >[v] : [boolean] diff --git a/tests/baselines/reference/functionAndPropertyNameConflict.js b/tests/baselines/reference/functionAndPropertyNameConflict.js index b2e77a8b5bedf..38eb08f68627b 100644 --- a/tests/baselines/reference/functionAndPropertyNameConflict.js +++ b/tests/baselines/reference/functionAndPropertyNameConflict.js @@ -15,7 +15,7 @@ var C65 = /** @class */ (function () { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C65; diff --git a/tests/baselines/reference/functionCallOnConstrainedTypeVariable.types b/tests/baselines/reference/functionCallOnConstrainedTypeVariable.types index 173f8c8e3ecab..cc053d93d0592 100644 --- a/tests/baselines/reference/functionCallOnConstrainedTypeVariable.types +++ b/tests/baselines/reference/functionCallOnConstrainedTypeVariable.types @@ -23,7 +23,7 @@ function call0(p: A | B) { >p : A | B p.a("s"); // Error ->p.a("s") : any +>p.a("s") : string >p.a : ((x: number) => string) | ((x: boolean) => string) >p : A | B >a : ((x: number) => string) | ((x: boolean) => string) @@ -35,7 +35,7 @@ function callN(p: T) { >p : T p.a("s"); // Error ->p.a("s") : any +>p.a("s") : string >p.a : ((x: number) => string) | ((x: boolean) => string) >p : T >a : ((x: number) => string) | ((x: boolean) => string) @@ -48,12 +48,12 @@ function callN(p: T) { >a : ((x: number) => string) | ((x: boolean) => string) a(""); // Error ->a("") : any +>a("") : string >a : T["a"] >"" : "" a("", "", "", ""); // Error ->a("", "", "", "") : any +>a("", "", "", "") : string >a : T["a"] >"" : "" >"" : "" diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.types b/tests/baselines/reference/functionConstraintSatisfaction2.types index f0a0f3b61f221..2bfb78286db1f 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.types +++ b/tests/baselines/reference/functionConstraintSatisfaction2.types @@ -7,18 +7,18 @@ function foo(x: T): T { return x; } >x : T foo(1); ->foo(1) : any +>foo(1) : Function >foo : (x: T) => T >1 : 1 foo(() => { }, 1); ->foo(() => { }, 1) : any +>foo(() => { }, 1) : () => void >foo : (x: T) => T >() => { } : () => void >1 : 1 foo(1, () => { }); ->foo(1, () => { }) : any +>foo(1, () => { }) : Function >foo : (x: T) => T >1 : 1 >() => { } : () => void @@ -52,29 +52,29 @@ var b2: { new (x: T): T }; >x : T var r = foo2(new Function()); ->r : any ->foo2(new Function()) : any +>r : (x: string) => string +>foo2(new Function()) : (x: string) => string >foo2 : string>(x: T) => T >new Function() : Function >Function : FunctionConstructor var r2 = foo2((x: string[]) => x); ->r2 : any ->foo2((x: string[]) => x) : any +>r2 : (x: string) => string +>foo2((x: string[]) => x) : (x: string) => string >foo2 : string>(x: T) => T >(x: string[]) => x : (x: string[]) => string[] >x : string[] >x : string[] var r6 = foo2(C); ->r6 : any ->foo2(C) : any +>r6 : (x: string) => string +>foo2(C) : (x: string) => string >foo2 : string>(x: T) => T >C : typeof C var r7 = foo2(b); ->r7 : any ->foo2(b) : any +>r7 : (x: string) => string +>foo2(b) : (x: string) => string >foo2 : string>(x: T) => T >b : new (x: string) => string @@ -87,8 +87,8 @@ var r8 = foo2((x: U) => x); // no error expected >x : U var r11 = foo2((x: U, y: V) => x); ->r11 : any ->foo2((x: U, y: V) => x) : any +>r11 : (x: string) => string +>foo2((x: U, y: V) => x) : (x: string) => string >foo2 : string>(x: T) => T >(x: U, y: V) => x : (x: U, y: V) => U >x : U @@ -96,14 +96,14 @@ var r11 = foo2((x: U, y: V) => x); >x : U var r13 = foo2(C2); ->r13 : any ->foo2(C2) : any +>r13 : (x: string) => string +>foo2(C2) : (x: string) => string >foo2 : string>(x: T) => T >C2 : typeof C2 var r14 = foo2(b2); ->r14 : any ->foo2(b2) : any +>r14 : (x: string) => string +>foo2(b2) : (x: string) => string >foo2 : string>(x: T) => T >b2 : new (x: T) => T @@ -114,8 +114,8 @@ var f2: F2; >f2 : F2 var r16 = foo2(f2); ->r16 : any ->foo2(f2) : any +>r16 : (x: string) => string +>foo2(f2) : (x: string) => string >foo2 : string>(x: T) => T >f2 : F2 @@ -125,12 +125,12 @@ function fff(x: T, y: U) { >y : U foo2(x); ->foo2(x) : any +>foo2(x) : (x: string) => string >foo2 : string>(x: T) => T >x : T foo2(y); ->foo2(y) : any +>foo2(y) : (x: string) => string >foo2 : string>(x: T) => T >y : U } diff --git a/tests/baselines/reference/functionOverloads.types b/tests/baselines/reference/functionOverloads.types index f3fd68f1cb7a1..b3e2616832914 100644 --- a/tests/baselines/reference/functionOverloads.types +++ b/tests/baselines/reference/functionOverloads.types @@ -12,8 +12,8 @@ function foo(bar?: string): any { return "" }; >"" : "" var x = foo(5); ->x : any ->foo(5) : any +>x : never +>foo(5) : never >foo : { (): string; (bar: string): number; } >5 : 5 diff --git a/tests/baselines/reference/functionOverloads2.types b/tests/baselines/reference/functionOverloads2.types index 4b6c7edce6c0c..d6075a93af856 100644 --- a/tests/baselines/reference/functionOverloads2.types +++ b/tests/baselines/reference/functionOverloads2.types @@ -13,8 +13,8 @@ function foo(bar: any): any { return bar }; >bar : any var x = foo(true); ->x : any ->foo(true) : any +>x : never +>foo(true) : never >foo : { (bar: string): string; (bar: number): number; } >true : true diff --git a/tests/baselines/reference/functionOverloads27.types b/tests/baselines/reference/functionOverloads27.types index 49e4d80571786..c976e42d93ad6 100644 --- a/tests/baselines/reference/functionOverloads27.types +++ b/tests/baselines/reference/functionOverloads27.types @@ -12,8 +12,8 @@ function foo(bar?:any):any{ return '' } >'' : "" var x = foo(5); ->x : any ->foo(5) : any +>x : never +>foo(5) : never >foo : { (): string; (bar: string): number; } >5 : 5 diff --git a/tests/baselines/reference/functionOverloads29.types b/tests/baselines/reference/functionOverloads29.types index cf24c2b1f24b0..adc25ad5c0ab2 100644 --- a/tests/baselines/reference/functionOverloads29.types +++ b/tests/baselines/reference/functionOverloads29.types @@ -13,7 +13,7 @@ function foo(bar:any):any{ return bar } >bar : any var x = foo(); ->x : any ->foo() : any +>x : never +>foo() : never >foo : { (bar: string): string; (bar: number): number; } diff --git a/tests/baselines/reference/functionOverloads34.types b/tests/baselines/reference/functionOverloads34.types index e49f86b5f5a94..8e979aaa96f47 100644 --- a/tests/baselines/reference/functionOverloads34.types +++ b/tests/baselines/reference/functionOverloads34.types @@ -16,7 +16,7 @@ function foo(bar:{a:any;}):any{ return bar } >bar : { a: any; } var x = foo(); ->x : any ->foo() : any +>x : never +>foo() : never >foo : { (bar: { a: number; }): string; (bar: { a: boolean; }): number; } diff --git a/tests/baselines/reference/functionOverloads37.types b/tests/baselines/reference/functionOverloads37.types index ccb7db26e5833..99087180604f3 100644 --- a/tests/baselines/reference/functionOverloads37.types +++ b/tests/baselines/reference/functionOverloads37.types @@ -16,7 +16,7 @@ function foo(bar:{a:any;}[]):any{ return bar } >bar : { a: any; }[] var x = foo(); ->x : any ->foo() : any +>x : never +>foo() : never >foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } diff --git a/tests/baselines/reference/functionOverloads40.types b/tests/baselines/reference/functionOverloads40.types index 7d744c5b10c67..3ba5b993b5d86 100644 --- a/tests/baselines/reference/functionOverloads40.types +++ b/tests/baselines/reference/functionOverloads40.types @@ -16,8 +16,8 @@ function foo(bar:{a:any;}[]):any{ return bar } >bar : { a: any; }[] var x = foo([{a:'bar'}]); ->x : any ->foo([{a:'bar'}]) : any +>x : never +>foo([{a:'bar'}]) : never >foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >[{a:'bar'}] : { a: string; }[] >{a:'bar'} : { a: string; } diff --git a/tests/baselines/reference/functionOverloads41.types b/tests/baselines/reference/functionOverloads41.types index d16c412737ca4..6dfeb47f22e77 100644 --- a/tests/baselines/reference/functionOverloads41.types +++ b/tests/baselines/reference/functionOverloads41.types @@ -16,8 +16,8 @@ function foo(bar:{a:any;}[]):any{ return bar } >bar : { a: any; }[] var x = foo([{}]); ->x : any ->foo([{}]) : any +>x : never +>foo([{}]) : never >foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >[{}] : {}[] >{} : {} diff --git a/tests/baselines/reference/functionTypeArgumentArityErrors.types b/tests/baselines/reference/functionTypeArgumentArityErrors.types index c91cf39674fe8..3bb8e7ee0c846 100644 --- a/tests/baselines/reference/functionTypeArgumentArityErrors.types +++ b/tests/baselines/reference/functionTypeArgumentArityErrors.types @@ -7,11 +7,11 @@ declare function f1(): void; >f1 : { (): void; (): void; } f1(); ->f1() : any +>f1() : void >f1 : { (): void; (): void; } f1(); ->f1() : any +>f1() : void >f1 : { (): void; (): void; } // Overloaded functions with no default type arguments @@ -22,11 +22,11 @@ declare function f2(): void; >f2 : { (): void; (): void; } f2(); ->f2() : any +>f2() : void >f2 : { (): void; (): void; } f2(); ->f2() : any +>f2() : void >f2 : { (): void; (): void; } // Overloaded non-generic functions @@ -38,7 +38,7 @@ declare function f3(a): void; >a : any f3(); ->f3() : any +>f3() : void >f3 : { (): void; (a: any): void; } // Generic function with default type parameters @@ -46,11 +46,11 @@ declare function f4(): void; >f4 : () => void f4(); ->f4() : any +>f4() : void >f4 : () => void f4(); ->f4() : any +>f4() : void >f4 : () => void // Generic function with no default type arguments @@ -58,10 +58,10 @@ declare function f5(): void; >f5 : () => void f5(); ->f5() : any +>f5() : void >f5 : () => void f5(); ->f5() : any +>f5() : void >f5 : () => void diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js index 7e6bbb43f8a7f..a0cfa3f9fcea3 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js @@ -216,7 +216,7 @@ var C = /** @class */ (function () { get: function () { // Errors; get accessors must return a value. }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "m2", { @@ -224,14 +224,14 @@ var C = /** @class */ (function () { // Permissible; returns undefined. return; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "m3", { get: function () { return "Okay, because this is a return expression."; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "m4", { @@ -239,7 +239,7 @@ var C = /** @class */ (function () { // Fine since this consists of a single throw statement. throw null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "m5", { @@ -250,7 +250,7 @@ var C = /** @class */ (function () { throw undefined. ; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/generatorTypeCheck39.js b/tests/baselines/reference/generatorTypeCheck39.js index 1e0009d24ed7c..4da3470e419b5 100644 --- a/tests/baselines/reference/generatorTypeCheck39.js +++ b/tests/baselines/reference/generatorTypeCheck39.js @@ -20,12 +20,15 @@ function decorator(x) { return y => { }; } function* g() { - let C = class C { - constructor() { - this.x = yield 0; - } - }; - C = __decorate([ - decorator(yield 0) - ], C); + const C = /** @class */ (() => { + let C = class C { + constructor() { + this.x = yield 0; + } + }; + C = __decorate([ + decorator(yield 0) + ], C); + return C; + })(); } diff --git a/tests/baselines/reference/generatorTypeCheck58.js b/tests/baselines/reference/generatorTypeCheck58.js index 925fc2b76d26d..e8ddded5319a1 100644 --- a/tests/baselines/reference/generatorTypeCheck58.js +++ b/tests/baselines/reference/generatorTypeCheck58.js @@ -7,8 +7,11 @@ function* g() { //// [generatorTypeCheck58.js] function* g() { - class C { - } - C.x = yield 0; + const C = /** @class */ (() => { + class C { + } + C.x = yield 0; + return C; + })(); ; } diff --git a/tests/baselines/reference/generatorTypeCheck59.js b/tests/baselines/reference/generatorTypeCheck59.js index 8fd32e7730a98..24b3dd1cf1121 100644 --- a/tests/baselines/reference/generatorTypeCheck59.js +++ b/tests/baselines/reference/generatorTypeCheck59.js @@ -14,11 +14,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, return c > 3 && r && Object.defineProperty(target, key, r), r; }; function* g() { - class C { - m() { } - } - __decorate([ - (yield "") - ], C.prototype, "m", null); + const C = /** @class */ (() => { + class C { + m() { } + } + __decorate([ + (yield "") + ], C.prototype, "m", null); + return C; + })(); ; } diff --git a/tests/baselines/reference/generatorTypeCheck61.js b/tests/baselines/reference/generatorTypeCheck61.js index 9cc157f26840d..9b0a4dbec1163 100644 --- a/tests/baselines/reference/generatorTypeCheck61.js +++ b/tests/baselines/reference/generatorTypeCheck61.js @@ -12,10 +12,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, return c > 3 && r && Object.defineProperty(target, key, r), r; }; function* g() { - let C = class C { - }; - C = __decorate([ - (yield 0) - ], C); + const C = /** @class */ (() => { + let C = class C { + }; + C = __decorate([ + (yield 0) + ], C); + return C; + })(); ; } diff --git a/tests/baselines/reference/generatorTypeCheck63.types b/tests/baselines/reference/generatorTypeCheck63.types index 12d78bac5df81..5af197f769a14 100644 --- a/tests/baselines/reference/generatorTypeCheck63.types +++ b/tests/baselines/reference/generatorTypeCheck63.types @@ -50,14 +50,14 @@ export interface State extends StrategicState { export const Nothing: Strategy = strategy("Nothing", function* (state: State) { >Nothing : Strategy ->strategy("Nothing", function* (state: State) { yield 1; return state;}) : any +>strategy("Nothing", function* (state: State) { yield 1; return state;}) : (a: State) => IterableIterator >strategy : (stratName: string, gen: (a: T) => IterableIterator) => (a: T) => IterableIterator >"Nothing" : "Nothing" >function* (state: State) { yield 1; return state;} : (state: State) => Generator >state : State yield 1; ->yield 1 : any +>yield 1 : undefined >1 : 1 return state; diff --git a/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.types b/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.types index abb103ccb5cb3..ff35469d81b3c 100644 --- a/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.types +++ b/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.types @@ -27,11 +27,11 @@ declare var _: Underscore.Static; // No error, Call signatures of types '(value: T) => T' and 'Underscore.Iterator<{}, boolean>' are compatible when instantiated with any. // Ideally, we would not have a generic signature here, because it should be instantiated with {} during inferential typing _.all([true, 1, null, 'yes'], _.identity); ->_.all([true, 1, null, 'yes'], _.identity) : any +>_.all([true, 1, null, 'yes'], _.identity) : boolean >_.all : (list: T[], iterator?: Underscore.Iterator, context?: any) => boolean >_ : Underscore.Static >all : (list: T[], iterator?: Underscore.Iterator, context?: any) => boolean ->[true, 1, null, 'yes'] : (string | number | boolean)[] +>[true, 1, null, 'yes'] : (string | number | true)[] >true : true >1 : 1 >null : null diff --git a/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.types b/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.types index 4b7c092e01282..f9d17fc71b371 100644 --- a/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.types +++ b/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.types @@ -49,8 +49,8 @@ module m2 { >numPromise : Promise var newPromise = numPromise.then(testFunction); ->newPromise : any ->numPromise.then(testFunction) : any +>newPromise : Promise +>numPromise.then(testFunction) : Promise >numPromise.then : (cb: (x: number) => Promise) => Promise >numPromise : Promise >then : (cb: (x: number) => Promise) => Promise @@ -123,8 +123,8 @@ module m4 { >numPromise : Promise var newPromise = numPromise.then(testFunction); ->newPromise : any ->numPromise.then(testFunction) : any +>newPromise : Promise +>numPromise.then(testFunction) : Promise >numPromise.then : { (cb: (x: number) => Promise): Promise; (cb: (x: number) => Promise, error?: (error: any) => Promise): Promise; } >numPromise : Promise >then : { (cb: (x: number) => Promise): Promise; (cb: (x: number) => Promise, error?: (error: any) => Promise): Promise; } @@ -171,8 +171,8 @@ module m5 { >numPromise : Promise var newPromise = numPromise.then(testFunction); ->newPromise : any ->numPromise.then(testFunction) : any +>newPromise : Promise +>numPromise.then(testFunction) : Promise >numPromise.then : { (cb: (x: number) => Promise): Promise; (cb: (x: number) => Promise, error?: (error: any) => Promise): Promise; (cb: (x: number) => Promise, error?: (error: any) => U, progress?: (preservation: any) => void): Promise; } >numPromise : Promise >then : { (cb: (x: number) => Promise): Promise; (cb: (x: number) => Promise, error?: (error: any) => Promise): Promise; (cb: (x: number) => Promise, error?: (error: any) => U, progress?: (preservation: any) => void): Promise; } @@ -214,8 +214,8 @@ module m6 { >numPromise : Promise var newPromise = numPromise.then(testFunction); ->newPromise : any ->numPromise.then(testFunction) : any +>newPromise : Promise +>numPromise.then(testFunction) : Promise >numPromise.then : { (cb: (x: number) => Promise): Promise; (cb: (x: number) => Promise, error?: (error: any) => Promise): Promise; } >numPromise : Promise >then : { (cb: (x: number) => Promise): Promise; (cb: (x: number) => Promise, error?: (error: any) => Promise): Promise; } diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.types b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.types index 23a2a5651a40b..2bad0294bda21 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.types +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.types @@ -32,8 +32,8 @@ var r3 = foo(new Object()); // {} >Object : ObjectConstructor var r4 = foo(1); // error ->r4 : any ->foo(1) : any +>r4 : Date +>foo(1) : Date >foo : (t: T) => U >1 : 1 diff --git a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types index 75d775c761c31..4902b207eafd6 100644 --- a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types +++ b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types @@ -34,8 +34,8 @@ var arg2: { cb: new (x: T, y: T) => string }; >y : T var r2 = foo(arg2); // error ->r2 : any ->foo(arg2) : any +>r2 : string +>foo(arg2) : string >foo : (arg: { cb: new (t: T) => U; }) => U >arg2 : { cb: new (x: T, y: T) => string; } @@ -46,8 +46,8 @@ var arg3: { cb: new (x: string, y: number) => string }; >y : number var r3 = foo(arg3); // error ->r3 : any ->foo(arg3) : any +>r3 : string +>foo(arg3) : string >foo : (arg: { cb: new (t: T) => U; }) => U >arg3 : { cb: new (x: string, y: number) => string; } diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments.types b/tests/baselines/reference/genericCallWithFunctionTypedArguments.types index 0297af07b23cd..30cd1e29ad42e 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments.types +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments.types @@ -100,8 +100,8 @@ var r7 = foo3(1, (a: Z) => '', ''); // string >'' : "" var r8 = foo3(1, function (a) { return '' }, 1); // error ->r8 : any ->foo3(1, function (a) { return '' }, 1) : any +>r8 : number +>foo3(1, function (a) { return '' }, 1) : 1 >foo3 : (x: T, cb: (a: T) => U, y: U) => U >1 : 1 >function (a) { return '' } : (a: number) => string @@ -125,8 +125,8 @@ function other(t: T, u: U) { >u : U var r10 = foo2(1, (x: T) => ''); // error ->r10 : any ->foo2(1, (x: T) => '') : any +>r10 : string +>foo2(1, (x: T) => '') : string >foo2 : (x: T, cb: (a: T) => U) => U >1 : 1 >(x: T) => '' : (x: T) => string @@ -134,7 +134,7 @@ function other(t: T, u: U) { >'' : "" var r10 = foo2(1, (x) => ''); // string ->r10 : any +>r10 : string >foo2(1, (x) => '') : string >foo2 : (x: T, cb: (a: T) => U) => U >1 : 1 @@ -143,8 +143,8 @@ function other(t: T, u: U) { >'' : "" var r11 = foo3(1, (x: T) => '', ''); // error ->r11 : any ->foo3(1, (x: T) => '', '') : any +>r11 : string +>foo3(1, (x: T) => '', '') : string >foo3 : (x: T, cb: (a: T) => U, y: U) => U >1 : 1 >(x: T) => '' : (x: T) => string @@ -153,8 +153,8 @@ function other(t: T, u: U) { >'' : "" var r11b = foo3(1, (x: T) => '', 1); // error ->r11b : any ->foo3(1, (x: T) => '', 1) : any +>r11b : string +>foo3(1, (x: T) => '', 1) : string >foo3 : (x: T, cb: (a: T) => U, y: U) => U >1 : 1 >(x: T) => '' : (x: T) => string @@ -163,8 +163,8 @@ function other(t: T, u: U) { >1 : 1 var r12 = foo3(1, function (a) { return '' }, 1); // error ->r12 : any ->foo3(1, function (a) { return '' }, 1) : any +>r12 : number +>foo3(1, function (a) { return '' }, 1) : 1 >foo3 : (x: T, cb: (a: T) => U, y: U) => U >1 : 1 >function (a) { return '' } : (a: number) => string diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.types b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.types index 9699261a641fb..7b7d4680af2eb 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.types +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.types @@ -71,8 +71,8 @@ function foo2(x: T, cb: new(a: T) => U) { } var r4 = foo2(1, i2); // error ->r4 : any ->foo2(1, i2) : any +>r4 : string +>foo2(1, i2) : string >foo2 : (x: T, cb: new (a: T) => U) => U >1 : 1 >i2 : I2 @@ -128,8 +128,8 @@ var r7b = foo3(null, a, ''); // any >'' : "" var r8 = foo3(1, i2, 1); // error ->r8 : any ->foo3(1, i2, 1) : any +>r8 : string +>foo3(1, i2, 1) : string >foo3 : (x: T, cb: new (a: T) => U, y: U) => U >1 : 1 >i2 : I2 diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types index 864aa0ec90d87..99087a71453b8 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types @@ -31,8 +31,8 @@ var r = foo(arg); // {} // more args not allowed var r2 = foo({ cb: (x: T, y: T) => '' }); // error ->r2 : any ->foo({ cb: (x: T, y: T) => '' }) : any +>r2 : unknown +>foo({ cb: (x: T, y: T) => '' }) : unknown >foo : (arg: { cb: (t: T) => U; }) => U >{ cb: (x: T, y: T) => '' } : { cb: (x: T, y: T) => string; } >cb : (x: T, y: T) => string @@ -42,8 +42,8 @@ var r2 = foo({ cb: (x: T, y: T) => '' }); // error >'' : "" var r3 = foo({ cb: (x: string, y: number) => '' }); // error ->r3 : any ->foo({ cb: (x: string, y: number) => '' }) : any +>r3 : string +>foo({ cb: (x: string, y: number) => '' }) : string >foo : (arg: { cb: (t: T) => U; }) => U >{ cb: (x: string, y: number) => '' } : { cb: (x: string, y: number) => string; } >cb : (x: string, y: number) => string diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.types b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.types index 64acb69d4e600..30394aa970f53 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.types +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.types @@ -23,7 +23,7 @@ module onlyT { var r1: (x: {}) => {} = foo((x: number) => 1, (x: string) => ''); >r1 : (x: {}) => {} >x : {} ->foo((x: number) => 1, (x: string) => '') : any +>foo((x: number) => 1, (x: string) => '') : (x: number) => number >foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x: number) => 1 : (x: number) => number >x : number @@ -82,8 +82,8 @@ module onlyT { >x : T var r7 = foo2((a: T) => a, (b: T) => b); // error ->r7 : any ->foo2((a: T) => a, (b: T) => b) : any +>r7 : (x: Date) => Date +>foo2((a: T) => a, (b: T) => b) : (x: Date) => Date >foo2 : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(a: T) => a : (a: T) => T >a : T @@ -129,8 +129,8 @@ module onlyT { } var r7 = foo3(E.A, (x) => E.A, (x) => F.A); // error ->r7 : any ->foo3(E.A, (x) => E.A, (x) => F.A) : any +>r7 : (x: E) => E +>foo3(E.A, (x) => E.A, (x) => F.A) : (x: E) => E >foo3 : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T >E.A : E >E : typeof E @@ -226,8 +226,8 @@ module TU { >x : T var r7 = foo2((a: T) => a, (b: T) => b); ->r7 : any ->foo2((a: T) => a, (b: T) => b) : any +>r7 : (x: Date) => Date +>foo2((a: T) => a, (b: T) => b) : (x: Date) => Date >foo2 : (a: (x: T) => T, b: (x: U) => U) => (x: T) => T >(a: T) => a : (a: T) => T >a : T diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.types b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.types index 5bd041097239a..531225ad6b25f 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.types +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.types @@ -175,8 +175,8 @@ var x: (a: string) => boolean; >a : string var r11 = foo2(x, (a1: (y: string) => string) => (n: Object) => 1, (a2: (z: string) => string) => 2); // error ->r11 : any ->foo2(x, (a1: (y: string) => string) => (n: Object) => 1, (a2: (z: string) => string) => 2) : any +>r11 : (x: (a: string) => boolean) => (n: Object) => number +>foo2(x, (a1: (y: string) => string) => (n: Object) => 1, (a2: (z: string) => string) => 2) : (x: (a: string) => boolean) => (n: Object) => number >foo2 : (x: T, a: (x: T) => U, b: (x: T) => U) => (x: T) => U >x : (a: string) => boolean >(a1: (y: string) => string) => (n: Object) => 1 : (a1: (y: string) => string) => (n: Object) => number @@ -191,8 +191,8 @@ var r11 = foo2(x, (a1: (y: string) => string) => (n: Object) => 1, (a2: (z: stri >2 : 2 var r12 = foo2(x, (a1: (y: string) => boolean) => (n: Object) => 1, (a2: (z: string) => boolean) => 2); // error ->r12 : any ->foo2(x, (a1: (y: string) => boolean) => (n: Object) => 1, (a2: (z: string) => boolean) => 2) : any +>r12 : (x: (z: string) => boolean) => (n: Object) => number +>foo2(x, (a1: (y: string) => boolean) => (n: Object) => 1, (a2: (z: string) => boolean) => 2) : (x: (z: string) => boolean) => (n: Object) => number >foo2 : (x: T, a: (x: T) => U, b: (x: T) => U) => (x: T) => U >x : (a: string) => boolean >(a1: (y: string) => boolean) => (n: Object) => 1 : (a1: (y: string) => boolean) => (n: Object) => number diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArgs.types b/tests/baselines/reference/genericCallWithObjectLiteralArgs.types index e19a6b327c614..7343f8a703fab 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArgs.types +++ b/tests/baselines/reference/genericCallWithObjectLiteralArgs.types @@ -10,8 +10,8 @@ function foo(x: { bar: T; baz: T }) { } var r = foo({ bar: 1, baz: '' }); // error ->r : any ->foo({ bar: 1, baz: '' }) : any +>r : { bar: number; baz: number; } +>foo({ bar: 1, baz: '' }) : { bar: number; baz: number; } >foo : (x: { bar: T; baz: T; }) => { bar: T; baz: T; } >{ bar: 1, baz: '' } : { bar: number; baz: string; } >bar : number diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.types b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.types index 1ecc71016f701..633a0cd3fbbb4 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.types +++ b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.types @@ -9,8 +9,8 @@ function foo(n: { x: T; y: T }, m: T) { return m; } // these are all errors var x = foo({ x: 3, y: "" }, 4); ->x : any ->foo({ x: 3, y: "" }, 4) : any +>x : number +>foo({ x: 3, y: "" }, 4) : number >foo : (n: { x: T; y: T; }, m: T) => T >{ x: 3, y: "" } : { x: number; y: string; } >x : number @@ -20,8 +20,8 @@ var x = foo({ x: 3, y: "" }, 4); >4 : 4 var x2 = foo({ x: 3, y: "" }, 4); ->x2 : any ->foo({ x: 3, y: "" }, 4) : any +>x2 : number +>foo({ x: 3, y: "" }, 4) : number >foo : (n: { x: T; y: T; }, m: T) => T >{ x: 3, y: "" } : { x: number; y: string; } >x : number @@ -31,8 +31,8 @@ var x2 = foo({ x: 3, y: "" }, 4); >4 : 4 var x3 = foo({ x: 3, y: "" }, 4); ->x3 : any ->foo({ x: 3, y: "" }, 4) : any +>x3 : string +>foo({ x: 3, y: "" }, 4) : string >foo : (n: { x: T; y: T; }, m: T) => T >{ x: 3, y: "" } : { x: number; y: string; } >x : number @@ -42,8 +42,8 @@ var x3 = foo({ x: 3, y: "" }, 4); >4 : 4 var x4 = foo({ x: "", y: 4 }, ""); ->x4 : any ->foo({ x: "", y: 4 }, "") : any +>x4 : number +>foo({ x: "", y: 4 }, "") : number >foo : (n: { x: T; y: T; }, m: T) => T >{ x: "", y: 4 } : { x: string; y: number; } >x : string @@ -53,8 +53,8 @@ var x4 = foo({ x: "", y: 4 }, ""); >"" : "" var x5 = foo({ x: "", y: 4 }, ""); ->x5 : any ->foo({ x: "", y: 4 }, "") : any +>x5 : string +>foo({ x: "", y: 4 }, "") : string >foo : (n: { x: T; y: T; }, m: T) => T >{ x: "", y: 4 } : { x: string; y: number; } >x : string diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs.types b/tests/baselines/reference/genericCallWithObjectTypeArgs.types index 1a82a3c6f55c2..17d86f72378e3 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs.types @@ -43,8 +43,8 @@ var d1 = new X(); >X : typeof X var r = foo(c1, d1); // error ->r : any ->foo(c1, d1) : any +>r : C +>foo(c1, d1) : C >foo : (t: X, t2: X) => T >c1 : X >d1 : X diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.types index b0b6e89d23c7e..a670d20e03987 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.types @@ -36,8 +36,8 @@ function f(a: { x: T; y: T }) { } var r1 = f({ x: new Derived(), y: new Derived2() }); // error because neither is supertype of the other ->r1 : any ->f({ x: new Derived(), y: new Derived2() }) : any +>r1 : Derived +>f({ x: new Derived(), y: new Derived2() }) : Derived >f : (a: { x: T; y: T; }) => T >{ x: new Derived(), y: new Derived2() } : { x: Derived; y: Derived2; } >x : Derived diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.types index bffffbd102138..b8711333c4da7 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.types @@ -43,8 +43,8 @@ var r = foo(c, d); >d : D var r2 = foo(d, c); // error because C does not extend D ->r2 : any ->foo(d, c) : any +>r2 : (x: D) => D +>foo(d, c) : (x: D) => D >foo : (t: T, t2: U) => (x: T) => U >d : D >c : C @@ -114,8 +114,8 @@ function other() { >d : D var r5 = foo(c, d); // error ->r5 : any ->foo(c, d) : any +>r5 : (x: T) => U +>foo(c, d) : (x: T) => U >foo : (t: T, t2: U) => (x: T) => U >c : C >d : D diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.types index 1d54e41e6bec8..5b8b72fa61cef 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.types @@ -36,15 +36,15 @@ var d: D; >d : D var r2 = foo(d, c); // the constraints are self-referencing, no downstream error ->r2 : any ->foo(d, c) : any +>r2 : (x: D) => D +>foo(d, c) : (x: D) => D >foo : (t: T, t2: U) => (x: T) => U >d : D >c : C var r9 = foo(() => 1, () => { }); // the constraints are self-referencing, no downstream error ->r9 : any ->foo(() => 1, () => { }) : any +>r9 : (x: () => number) => () => number +>foo(() => 1, () => { }) : (x: () => number) => () => number >foo : (t: T, t2: U) => (x: T) => U >() => 1 : () => number >1 : 1 @@ -54,8 +54,8 @@ function other() { >other : () => void var r5 = foo(c, d); // error ->r5 : any ->foo(c, d) : any +>r5 : (x: T) => U +>foo(c, d) : (x: T) => U >foo : (t: T, t2: U) => (x: T) => U >c : C >d : D diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types index 94183b183549f..36baf9fa2b9aa 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types @@ -75,8 +75,8 @@ module GenericParameter { >y : T var r10 = foo6(b); // error ->r10 : any ->foo6(b) : any +>r10 : { new (x: unknown): string; new (x: unknown, y?: unknown): string; } +>foo6(b) : { new (x: unknown): string; new (x: unknown, y?: unknown): string; } >foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >b : new (x: T, y: T) => string diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types index 1d18c07210ec6..b199cf05b3a00 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types @@ -67,8 +67,8 @@ module GenericParameter { } var r10 = foo6((x: T, y: T) => ''); // error ->r10 : any ->foo6((x: T, y: T) => '') : any +>r10 : { (x: unknown): string; (x: unknown, y?: unknown): string; } +>foo6((x: T, y: T) => '') : { (x: unknown): string; (x: unknown, y?: unknown): string; } >foo6 : (cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >(x: T, y: T) => '' : (x: T, y: T) => string >x : T diff --git a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.types b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.types index 01f98d4bbfcaa..d24b98a758e0c 100644 --- a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.types +++ b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.types @@ -220,8 +220,8 @@ module WithCandidates { >u : U var r10 = c.foo2(1, (x: T) => ''); // error ->r10 : any ->c.foo2(1, (x: T) => '') : any +>r10 : string +>c.foo2(1, (x: T) => '') : string >c.foo2 : (x: T, cb: (a: T) => U) => U >c : C >foo2 : (x: T, cb: (a: T) => U) => U @@ -231,7 +231,7 @@ module WithCandidates { >'' : "" var r10 = c.foo2(1, (x) => ''); // string ->r10 : any +>r10 : string >c.foo2(1, (x) => '') : string >c.foo2 : (x: T, cb: (a: T) => U) => U >c : C @@ -242,8 +242,8 @@ module WithCandidates { >'' : "" var r11 = c3.foo3(1, (x: T) => '', ''); // error ->r11 : any ->c3.foo3(1, (x: T) => '', '') : any +>r11 : string +>c3.foo3(1, (x: T) => '', '') : string >c3.foo3 : (x: T, cb: (a: T) => U, y: U) => U >c3 : C3 >foo3 : (x: T, cb: (a: T) => U, y: U) => U @@ -254,8 +254,8 @@ module WithCandidates { >'' : "" var r11b = c3.foo3(1, (x: T) => '', 1); // error ->r11b : any ->c3.foo3(1, (x: T) => '', 1) : any +>r11b : string +>c3.foo3(1, (x: T) => '', 1) : string >c3.foo3 : (x: T, cb: (a: T) => U, y: U) => U >c3 : C3 >foo3 : (x: T, cb: (a: T) => U, y: U) => U @@ -266,8 +266,8 @@ module WithCandidates { >1 : 1 var r12 = c3.foo3(1, function (a) { return '' }, 1); // error ->r12 : any ->c3.foo3(1, function (a) { return '' }, 1) : any +>r12 : number +>c3.foo3(1, function (a) { return '' }, 1) : 1 >c3.foo3 : (x: T, cb: (a: T) => U, y: U) => U >c3 : C3 >foo3 : (x: T, cb: (a: T) => U, y: U) => U diff --git a/tests/baselines/reference/genericCombinators2.types b/tests/baselines/reference/genericCombinators2.types index 1d76958d23bbc..4935b2a8c403f 100644 --- a/tests/baselines/reference/genericCombinators2.types +++ b/tests/baselines/reference/genericCombinators2.types @@ -47,8 +47,8 @@ var rf1 = (x: number, y: string) => { return x.toFixed() }; >toFixed : (fractionDigits?: number) => string var r5a = _.map(c2, (x, y) => { return x.toFixed() }); ->r5a : any ->_.map(c2, (x, y) => { return x.toFixed() }) : any +>r5a : Collection +>_.map(c2, (x, y) => { return x.toFixed() }) : Collection >_.map : { (c: Collection, f: (x: T, y: U) => any): Collection; (c: Collection, f: (x: T, y: U) => V): Collection; } >_ : Combinators >map : { (c: Collection, f: (x: T, y: U) => any): Collection; (c: Collection, f: (x: T, y: U) => V): Collection; } @@ -62,8 +62,8 @@ var r5a = _.map(c2, (x, y) => { return x.toFixed() }); >toFixed : (fractionDigits?: number) => string var r5b = _.map(c2, rf1); ->r5b : any ->_.map(c2, rf1) : any +>r5b : Collection +>_.map(c2, rf1) : Collection >_.map : { (c: Collection, f: (x: T, y: U) => any): Collection; (c: Collection, f: (x: T, y: U) => V): Collection; } >_ : Combinators >map : { (c: Collection, f: (x: T, y: U) => any): Collection; (c: Collection, f: (x: T, y: U) => V): Collection; } diff --git a/tests/baselines/reference/genericConstraint1.types b/tests/baselines/reference/genericConstraint1.types index 2aedad33876ca..ae005eb07c57b 100644 --- a/tests/baselines/reference/genericConstraint1.types +++ b/tests/baselines/reference/genericConstraint1.types @@ -18,7 +18,7 @@ var x = new C(); >C : typeof C x.bar2(2, ""); ->x.bar2(2, "") : any +>x.bar2(2, "") : number >x.bar2 : (x: number, y: U) => number >x : C >bar2 : (x: number, y: U) => number diff --git a/tests/baselines/reference/genericConstraint2.types b/tests/baselines/reference/genericConstraint2.types index 2bdd415ea1bb8..2f168704deb44 100644 --- a/tests/baselines/reference/genericConstraint2.types +++ b/tests/baselines/reference/genericConstraint2.types @@ -64,8 +64,8 @@ var b = new ComparableString("b"); >"b" : "b" var c = compare(a, b); ->c : any ->compare(a, b) : any +>c : number +>compare(a, b) : number >compare : >(x: T, y: T) => number >a : ComparableString >b : ComparableString diff --git a/tests/baselines/reference/genericConstraintSatisfaction1.types b/tests/baselines/reference/genericConstraintSatisfaction1.types index aad6f0fe72850..8c7558e1d372a 100644 --- a/tests/baselines/reference/genericConstraintSatisfaction1.types +++ b/tests/baselines/reference/genericConstraintSatisfaction1.types @@ -10,7 +10,7 @@ var x: I<{s: string}> >s : string x.f({s: 1}) ->x.f({s: 1}) : any +>x.f({s: 1}) : void >x.f : (x: T) => void >x : I<{ s: string; }> >f : (x: T) => void diff --git a/tests/baselines/reference/genericDefaultsErrors.types b/tests/baselines/reference/genericDefaultsErrors.types index 5eaf9af1cc1b8..d72f7f0486342 100644 --- a/tests/baselines/reference/genericDefaultsErrors.types +++ b/tests/baselines/reference/genericDefaultsErrors.types @@ -22,7 +22,7 @@ f11(); // ok >f11 : () => void f11<1>(); // error ->f11<1>() : any +>f11<1>() : void >f11 : () => void f11<1, 2>(); // ok @@ -34,7 +34,7 @@ f11<1, 2, 3>(); // ok >f11 : () => void f11<1, 2, 3, 4>(); // error ->f11<1, 2, 3, 4>() : any +>f11<1, 2, 3, 4>() : void >f11 : () => void declare function f12(a?: U): void; @@ -46,7 +46,7 @@ f12(); // ok >f12 : (a?: U) => void f12("a"); // error ->f12("a") : any +>f12("a") : void >f12 : (a?: U) => void >"a" : "a" diff --git a/tests/baselines/reference/genericFunctionInference1.types b/tests/baselines/reference/genericFunctionInference1.types index 1974fe17bea80..2b44e9560dfcc 100644 --- a/tests/baselines/reference/genericFunctionInference1.types +++ b/tests/baselines/reference/genericFunctionInference1.types @@ -649,7 +649,7 @@ declare function toKeys(values: a[], toKey: (value: a) => string): string[]; >value : a toKeys(data, keyOf); // Error ->toKeys(data, keyOf) : any +>toKeys(data, keyOf) : string[] >toKeys : (values: a[], toKey: (value: a) => string) => string[] >data : Data[] >keyOf : (value: { key: a; }) => a diff --git a/tests/baselines/reference/genericFunctionsWithOptionalParameters2.types b/tests/baselines/reference/genericFunctionsWithOptionalParameters2.types index 7c385445c07e2..1bb4cb7f6fd76 100644 --- a/tests/baselines/reference/genericFunctionsWithOptionalParameters2.types +++ b/tests/baselines/reference/genericFunctionsWithOptionalParameters2.types @@ -13,7 +13,7 @@ var utils: Utils; >utils : Utils utils.fold(); // error ->utils.fold() : any +>utils.fold() : unknown >utils.fold : (c: T[], folder?: (s: S, t: T) => T, init?: S) => T >utils : Utils >fold : (c: T[], folder?: (s: S, t: T) => T, init?: S) => T diff --git a/tests/baselines/reference/genericGetter.js b/tests/baselines/reference/genericGetter.js index 6c0e511f01d0a..8c79116d59b24 100644 --- a/tests/baselines/reference/genericGetter.js +++ b/tests/baselines/reference/genericGetter.js @@ -17,7 +17,7 @@ var C = /** @class */ (function () { get: function () { return this.data; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/genericGetter2.js b/tests/baselines/reference/genericGetter2.js index e1211adf1c589..f7682171935e0 100644 --- a/tests/baselines/reference/genericGetter2.js +++ b/tests/baselines/reference/genericGetter2.js @@ -21,7 +21,7 @@ var C = /** @class */ (function () { get: function () { return this.data; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/genericGetter3.js b/tests/baselines/reference/genericGetter3.js index 6252d6f3c010c..06ac4b5c771dc 100644 --- a/tests/baselines/reference/genericGetter3.js +++ b/tests/baselines/reference/genericGetter3.js @@ -24,7 +24,7 @@ var C = /** @class */ (function () { get: function () { return this.data; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/genericNewInterface.types b/tests/baselines/reference/genericNewInterface.types index ccfd13ec1b0f2..089e927923e19 100644 --- a/tests/baselines/reference/genericNewInterface.types +++ b/tests/baselines/reference/genericNewInterface.types @@ -5,7 +5,7 @@ function createInstance(ctor: new (s: string) => T): T { >s : string return new ctor(42); //should be an error ->new ctor(42) : any +>new ctor(42) : T >ctor : new (s: string) => T >42 : 42 } @@ -20,7 +20,7 @@ function createInstance2(ctor: INewable): T { >ctor : INewable return new ctor(1024); //should be an error ->new ctor(1024) : any +>new ctor(1024) : T >ctor : INewable >1024 : 1024 } diff --git a/tests/baselines/reference/genericRestArgs.types b/tests/baselines/reference/genericRestArgs.types index be5182e5d312d..6fb079cd5dedb 100644 --- a/tests/baselines/reference/genericRestArgs.types +++ b/tests/baselines/reference/genericRestArgs.types @@ -5,8 +5,8 @@ function makeArrayG(...items: T[]): T[] { return items; } >items : T[] var a1Ga = makeArrayG(1, ""); // no error ->a1Ga : any ->makeArrayG(1, "") : any +>a1Ga : number[] +>makeArrayG(1, "") : number[] >makeArrayG : (...items: T[]) => T[] >1 : 1 >"" : "" @@ -26,8 +26,8 @@ var a1Gc = makeArrayG(1, ""); >"" : "" var a1Gd = makeArrayG(1, ""); // error ->a1Gd : any ->makeArrayG(1, "") : any +>a1Gd : number[] +>makeArrayG(1, "") : number[] >makeArrayG : (...items: T[]) => T[] >1 : 1 >"" : "" @@ -45,8 +45,8 @@ function makeArrayGOpt(item1?: T, item2?: T, item3?: T) { >item3 : T } var a2Ga = makeArrayGOpt(1, ""); ->a2Ga : any ->makeArrayGOpt(1, "") : any +>a2Ga : number[] +>makeArrayGOpt(1, "") : number[] >makeArrayGOpt : (item1?: T, item2?: T, item3?: T) => T[] >1 : 1 >"" : "" @@ -59,8 +59,8 @@ var a2Gb = makeArrayG(1, ""); >"" : "" var a2Gc = makeArrayG(1, ""); // error ->a2Gc : any ->makeArrayG(1, "") : any +>a2Gc : any[][] +>makeArrayG(1, "") : any[][] >makeArrayG : (...items: T[]) => T[] >1 : 1 >"" : "" diff --git a/tests/baselines/reference/genericRestArity.types b/tests/baselines/reference/genericRestArity.types index 74ce565c9d3d5..d3947499b7d90 100644 --- a/tests/baselines/reference/genericRestArity.types +++ b/tests/baselines/reference/genericRestArity.types @@ -12,7 +12,7 @@ declare function call( >args : TS call((x: number, y: number) => x + y); ->call((x: number, y: number) => x + y) : any +>call((x: number, y: number) => x + y) : void >call : (handler: (...args: TS) => void, ...args: TS) => void >(x: number, y: number) => x + y : (x: number, y: number) => number >x : number @@ -22,7 +22,7 @@ call((x: number, y: number) => x + y); >y : number call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7); ->call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7) : any +>call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7) : void >call : (handler: (...args: TS) => void, ...args: TS) => void >(x: number, y: number) => x + y : (x: number, y: number) => number >x : number diff --git a/tests/baselines/reference/genericRestArityStrict.types b/tests/baselines/reference/genericRestArityStrict.types index 0bdf6d0e96dc8..d74a957605a40 100644 --- a/tests/baselines/reference/genericRestArityStrict.types +++ b/tests/baselines/reference/genericRestArityStrict.types @@ -12,7 +12,7 @@ declare function call( >args : TS call((x: number, y: number) => x + y); ->call((x: number, y: number) => x + y) : any +>call((x: number, y: number) => x + y) : void >call : (handler: (...args: TS) => void, ...args: TS) => void >(x: number, y: number) => x + y : (x: number, y: number) => number >x : number @@ -22,7 +22,7 @@ call((x: number, y: number) => x + y); >y : number call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7); ->call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7) : any +>call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7) : void >call : (handler: (...args: TS) => void, ...args: TS) => void >(x: number, y: number) => x + y : (x: number, y: number) => number >x : number diff --git a/tests/baselines/reference/genericRestParameters3.js b/tests/baselines/reference/genericRestParameters3.js index 6767fa094c917..bba4ddd54e381 100644 --- a/tests/baselines/reference/genericRestParameters3.js +++ b/tests/baselines/reference/genericRestParameters3.js @@ -127,7 +127,7 @@ interface CoolArray extends Array { declare function foo(cb: (...args: T) => void): void; declare function bar(...args: T): T; declare let a: [number, number]; -declare let b: any; +declare let b: CoolArray; declare function baz(...args: CoolArray): void; declare const ca: CoolArray; declare function hmm(...args: A): void; diff --git a/tests/baselines/reference/genericRestParameters3.types b/tests/baselines/reference/genericRestParameters3.types index a0d90a308d7b4..add3bbab9d51e 100644 --- a/tests/baselines/reference/genericRestParameters3.types +++ b/tests/baselines/reference/genericRestParameters3.types @@ -126,16 +126,16 @@ declare function foo(cb: (...args: T) => void): void; >args : T foo>(); // Error ->foo>() : any +>foo>() : void >foo : (cb: (...args: T) => void) => void foo>(100); // Error ->foo>(100) : any +>foo>(100) : void >foo : (cb: (...args: T) => void) => void >100 : 100 foo>(foo); // Error ->foo>(foo) : any +>foo>(foo) : void >foo : (cb: (...args: T) => void) => void >foo : (cb: (...args: T) => void) => void @@ -155,8 +155,8 @@ let a = bar(10, 20); >20 : 20 let b = bar>(10, 20); // Error ->b : any ->bar>(10, 20) : any +>b : CoolArray +>bar>(10, 20) : CoolArray >bar : (...args: T) => T >10 : 10 >20 : 20 @@ -169,22 +169,22 @@ declare const ca: CoolArray; >ca : CoolArray baz(); // Error ->baz() : any +>baz() : void >baz : (...args: CoolArray) => void baz(1); // Error ->baz(1) : any +>baz(1) : void >baz : (...args: CoolArray) => void >1 : 1 baz(1, 2); // Error ->baz(1, 2) : any +>baz(1, 2) : void >baz : (...args: CoolArray) => void >1 : 1 >2 : 2 baz(...ca); // Error ->baz(...ca) : any +>baz(...ca) : void >baz : (...args: CoolArray) => void >...ca : number >ca : CoolArray @@ -206,7 +206,7 @@ hmm(1, "s"); // okay, A = [1, "s"] >"s" : "s" hmm("what"); // no error? A = [] | [number, string] ? ->hmm("what") : any +>hmm("what") : void >hmm : (...args: A) => void >"what" : "what" diff --git a/tests/baselines/reference/genericReturnTypeFromGetter1.js b/tests/baselines/reference/genericReturnTypeFromGetter1.js index f193c6ca05f98..6379c464f6cde 100644 --- a/tests/baselines/reference/genericReturnTypeFromGetter1.js +++ b/tests/baselines/reference/genericReturnTypeFromGetter1.js @@ -18,7 +18,7 @@ define(["require", "exports"], function (require, exports) { Object.defineProperty(DbSet.prototype, "entityType", { get: function () { return this._entityType; } // used to ICE without return type annotation , - enumerable: true, + enumerable: false, configurable: true }); return DbSet; diff --git a/tests/baselines/reference/genericTypeArgumentInference1.types b/tests/baselines/reference/genericTypeArgumentInference1.types index 76c768abea8dd..dd3ab70adac30 100644 --- a/tests/baselines/reference/genericTypeArgumentInference1.types +++ b/tests/baselines/reference/genericTypeArgumentInference1.types @@ -23,12 +23,12 @@ declare var _: Underscore.Static; >Underscore : any var r = _.all([true, 1, null, 'yes'], _.identity); ->r : any ->_.all([true, 1, null, 'yes'], _.identity) : any +>r : string | number | boolean +>_.all([true, 1, null, 'yes'], _.identity) : string | number | boolean >_.all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T >_ : Underscore.Static >all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T ->[true, 1, null, 'yes'] : (string | number | boolean)[] +>[true, 1, null, 'yes'] : (string | number | true)[] >true : true >1 : 1 >null : null diff --git a/tests/baselines/reference/genericWithOpenTypeParameters1.types b/tests/baselines/reference/genericWithOpenTypeParameters1.types index 5abde36756ee5..8530281578789 100644 --- a/tests/baselines/reference/genericWithOpenTypeParameters1.types +++ b/tests/baselines/reference/genericWithOpenTypeParameters1.types @@ -19,8 +19,8 @@ x.foo(1); // no error >1 : 1 var f = (x: B) => { return x.foo(1); } // error ->f : (x: B) => any ->(x: B) => { return x.foo(1); } : (x: B) => any +>f : (x: B) => T +>(x: B) => { return x.foo(1); } : (x: B) => T >x : B >x.foo(1) : T >x.foo : (x: T) => T @@ -29,8 +29,8 @@ var f = (x: B) => { return x.foo(1); } // error >1 : 1 var f2 = (x: B) => { return x.foo(1); } // error ->f2 : (x: B) => any ->(x: B) => { return x.foo(1); } : (x: B) => any +>f2 : (x: B) => T +>(x: B) => { return x.foo(1); } : (x: B) => T >x : B >x.foo(1) : T >x.foo : (x: T) => T @@ -39,8 +39,8 @@ var f2 = (x: B) => { return x.foo(1); } // error >1 : 1 var f3 = (x: B) => { return x.foo(1); } // error ->f3 : (x: B) => any ->(x: B) => { return x.foo(1); } : (x: B) => any +>f3 : (x: B) => T +>(x: B) => { return x.foo(1); } : (x: B) => T >x : B >x.foo(1) : T >x.foo : (x: T) => T diff --git a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js index bc4a40dfecdff..5d2c8e6d42831 100644 --- a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js +++ b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js @@ -38,7 +38,7 @@ var MyModule; var obj = {}; return obj; }, - enumerable: true, + enumerable: false, configurable: true }); return MyClass; diff --git a/tests/baselines/reference/getAndSetAsMemberNames.js b/tests/baselines/reference/getAndSetAsMemberNames.js index 1433e3cd3a8b0..2cfbea0b8590e 100644 --- a/tests/baselines/reference/getAndSetAsMemberNames.js +++ b/tests/baselines/reference/getAndSetAsMemberNames.js @@ -54,7 +54,7 @@ var C5 = /** @class */ (function () { C5.prototype.get = function () { return true; }; Object.defineProperty(C5.prototype, "t", { set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); return C5; diff --git a/tests/baselines/reference/getAndSetNotIdenticalType.js b/tests/baselines/reference/getAndSetNotIdenticalType.js index edebef235b8fd..281aa9c2f5364 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType.js +++ b/tests/baselines/reference/getAndSetNotIdenticalType.js @@ -15,7 +15,7 @@ var C = /** @class */ (function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/getAndSetNotIdenticalType2.js b/tests/baselines/reference/getAndSetNotIdenticalType2.js index af729eb7d7aee..699e5f7fa395b 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType2.js +++ b/tests/baselines/reference/getAndSetNotIdenticalType2.js @@ -31,7 +31,7 @@ var C = /** @class */ (function () { set: function (v) { this.data = v; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/getAndSetNotIdenticalType3.js b/tests/baselines/reference/getAndSetNotIdenticalType3.js index ff2d04ef1509f..a466cefbb5275 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType3.js +++ b/tests/baselines/reference/getAndSetNotIdenticalType3.js @@ -31,7 +31,7 @@ var C = /** @class */ (function () { set: function (v) { this.data = v; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/getSetAccessorContextualTyping.js b/tests/baselines/reference/getSetAccessorContextualTyping.js index 383e7894aef91..515ab16c9d1a7 100644 --- a/tests/baselines/reference/getSetAccessorContextualTyping.js +++ b/tests/baselines/reference/getSetAccessorContextualTyping.js @@ -37,7 +37,7 @@ var C = /** @class */ (function () { return "string"; // Error; get contextual type by set accessor parameter type annotation }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "Y", { @@ -45,7 +45,7 @@ var C = /** @class */ (function () { return true; }, set: function (y) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "W", { @@ -53,7 +53,7 @@ var C = /** @class */ (function () { return true; }, set: function (w) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "Z", { @@ -61,7 +61,7 @@ var C = /** @class */ (function () { return 1; }, set: function (z) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/getSetEnumerable.js b/tests/baselines/reference/getSetEnumerable.js new file mode 100644 index 0000000000000..33ce99fca553c --- /dev/null +++ b/tests/baselines/reference/getSetEnumerable.js @@ -0,0 +1,70 @@ +//// [getSetEnumerable.ts] +class GetSetEnumerableClassGet { + get prop() { return true;} +} + +class GetSetEnumerableClassSet { + set prop(value: boolean) { } +} + +class GetSetEnumerableClassGetSet { + get prop() { return true;} + set prop(value: boolean) { } +} + +const GetSetEnumerableObjectGet = { + get prop() { return true; } +}; + +const GetSetEnumerableObjectSet = { + set prop(value: boolean) { } +}; + +const GetSetEnumerableObjectGetSet = { + get prop() { return true; }, + set prop(value: boolean) { } +}; + + +//// [getSetEnumerable.js] +var GetSetEnumerableClassGet = /** @class */ (function () { + function GetSetEnumerableClassGet() { + } + Object.defineProperty(GetSetEnumerableClassGet.prototype, "prop", { + get: function () { return true; }, + enumerable: false, + configurable: true + }); + return GetSetEnumerableClassGet; +}()); +var GetSetEnumerableClassSet = /** @class */ (function () { + function GetSetEnumerableClassSet() { + } + Object.defineProperty(GetSetEnumerableClassSet.prototype, "prop", { + set: function (value) { }, + enumerable: false, + configurable: true + }); + return GetSetEnumerableClassSet; +}()); +var GetSetEnumerableClassGetSet = /** @class */ (function () { + function GetSetEnumerableClassGetSet() { + } + Object.defineProperty(GetSetEnumerableClassGetSet.prototype, "prop", { + get: function () { return true; }, + set: function (value) { }, + enumerable: false, + configurable: true + }); + return GetSetEnumerableClassGetSet; +}()); +var GetSetEnumerableObjectGet = { + get prop() { return true; } +}; +var GetSetEnumerableObjectSet = { + set prop(value) { } +}; +var GetSetEnumerableObjectGetSet = { + get prop() { return true; }, + set prop(value) { } +}; diff --git a/tests/baselines/reference/getSetEnumerable.symbols b/tests/baselines/reference/getSetEnumerable.symbols new file mode 100644 index 0000000000000..33efdc248a701 --- /dev/null +++ b/tests/baselines/reference/getSetEnumerable.symbols @@ -0,0 +1,56 @@ +=== tests/cases/compiler/getSetEnumerable.ts === +class GetSetEnumerableClassGet { +>GetSetEnumerableClassGet : Symbol(GetSetEnumerableClassGet, Decl(getSetEnumerable.ts, 0, 0)) + + get prop() { return true;} +>prop : Symbol(GetSetEnumerableClassGet.prop, Decl(getSetEnumerable.ts, 0, 32)) +} + +class GetSetEnumerableClassSet { +>GetSetEnumerableClassSet : Symbol(GetSetEnumerableClassSet, Decl(getSetEnumerable.ts, 2, 1)) + + set prop(value: boolean) { } +>prop : Symbol(GetSetEnumerableClassSet.prop, Decl(getSetEnumerable.ts, 4, 32)) +>value : Symbol(value, Decl(getSetEnumerable.ts, 5, 13)) +} + +class GetSetEnumerableClassGetSet { +>GetSetEnumerableClassGetSet : Symbol(GetSetEnumerableClassGetSet, Decl(getSetEnumerable.ts, 6, 1)) + + get prop() { return true;} +>prop : Symbol(GetSetEnumerableClassGetSet.prop, Decl(getSetEnumerable.ts, 8, 35), Decl(getSetEnumerable.ts, 9, 30)) + + set prop(value: boolean) { } +>prop : Symbol(GetSetEnumerableClassGetSet.prop, Decl(getSetEnumerable.ts, 8, 35), Decl(getSetEnumerable.ts, 9, 30)) +>value : Symbol(value, Decl(getSetEnumerable.ts, 10, 13)) +} + +const GetSetEnumerableObjectGet = { +>GetSetEnumerableObjectGet : Symbol(GetSetEnumerableObjectGet, Decl(getSetEnumerable.ts, 13, 5)) + + get prop() { return true; } +>prop : Symbol(prop, Decl(getSetEnumerable.ts, 13, 35)) + +}; + +const GetSetEnumerableObjectSet = { +>GetSetEnumerableObjectSet : Symbol(GetSetEnumerableObjectSet, Decl(getSetEnumerable.ts, 17, 5)) + + set prop(value: boolean) { } +>prop : Symbol(prop, Decl(getSetEnumerable.ts, 17, 35)) +>value : Symbol(value, Decl(getSetEnumerable.ts, 18, 13)) + +}; + +const GetSetEnumerableObjectGetSet = { +>GetSetEnumerableObjectGetSet : Symbol(GetSetEnumerableObjectGetSet, Decl(getSetEnumerable.ts, 21, 5)) + + get prop() { return true; }, +>prop : Symbol(prop, Decl(getSetEnumerable.ts, 21, 38), Decl(getSetEnumerable.ts, 22, 32)) + + set prop(value: boolean) { } +>prop : Symbol(prop, Decl(getSetEnumerable.ts, 21, 38), Decl(getSetEnumerable.ts, 22, 32)) +>value : Symbol(value, Decl(getSetEnumerable.ts, 23, 13)) + +}; + diff --git a/tests/baselines/reference/getSetEnumerable.types b/tests/baselines/reference/getSetEnumerable.types new file mode 100644 index 0000000000000..c171adce6226c --- /dev/null +++ b/tests/baselines/reference/getSetEnumerable.types @@ -0,0 +1,63 @@ +=== tests/cases/compiler/getSetEnumerable.ts === +class GetSetEnumerableClassGet { +>GetSetEnumerableClassGet : GetSetEnumerableClassGet + + get prop() { return true;} +>prop : boolean +>true : true +} + +class GetSetEnumerableClassSet { +>GetSetEnumerableClassSet : GetSetEnumerableClassSet + + set prop(value: boolean) { } +>prop : boolean +>value : boolean +} + +class GetSetEnumerableClassGetSet { +>GetSetEnumerableClassGetSet : GetSetEnumerableClassGetSet + + get prop() { return true;} +>prop : boolean +>true : true + + set prop(value: boolean) { } +>prop : boolean +>value : boolean +} + +const GetSetEnumerableObjectGet = { +>GetSetEnumerableObjectGet : { readonly prop: boolean; } +>{ get prop() { return true; }} : { readonly prop: boolean; } + + get prop() { return true; } +>prop : boolean +>true : true + +}; + +const GetSetEnumerableObjectSet = { +>GetSetEnumerableObjectSet : { prop: boolean; } +>{ set prop(value: boolean) { }} : { prop: boolean; } + + set prop(value: boolean) { } +>prop : boolean +>value : boolean + +}; + +const GetSetEnumerableObjectGetSet = { +>GetSetEnumerableObjectGetSet : { prop: boolean; } +>{ get prop() { return true; }, set prop(value: boolean) { }} : { prop: boolean; } + + get prop() { return true; }, +>prop : boolean +>true : true + + set prop(value: boolean) { } +>prop : boolean +>value : boolean + +}; + diff --git a/tests/baselines/reference/getterControlFlowStrictNull.js b/tests/baselines/reference/getterControlFlowStrictNull.js index 00f50144586b6..cebae8174d645 100644 --- a/tests/baselines/reference/getterControlFlowStrictNull.js +++ b/tests/baselines/reference/getterControlFlowStrictNull.js @@ -52,7 +52,7 @@ var B = /** @class */ (function () { } // it should error here because it returns undefined }, - enumerable: true, + enumerable: false, configurable: true }); return B; @@ -69,7 +69,7 @@ var C = /** @class */ (function () { }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/getterMissingReturnError.js b/tests/baselines/reference/getterMissingReturnError.js index b24458c189b44..dd308dd6ebd4c 100644 --- a/tests/baselines/reference/getterMissingReturnError.js +++ b/tests/baselines/reference/getterMissingReturnError.js @@ -13,7 +13,7 @@ var test = /** @class */ (function () { Object.defineProperty(test.prototype, "p2", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return test; diff --git a/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.js b/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.js index e9ed7bdd28a10..9bb61a6d7bcd2 100644 --- a/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.js +++ b/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.js @@ -17,7 +17,7 @@ var Greeter = /** @class */ (function () { get: function () { throw ''; // should not raise an error }, - enumerable: true, + enumerable: false, configurable: true }); Greeter.prototype.greeting = function () { diff --git a/tests/baselines/reference/gettersAndSetters.js b/tests/baselines/reference/gettersAndSetters.js index b69a468ce9cb1..497bf1d3d7f60 100644 --- a/tests/baselines/reference/gettersAndSetters.js +++ b/tests/baselines/reference/gettersAndSetters.js @@ -54,7 +54,7 @@ var C = /** @class */ (function () { , set: function (foo) { this.fooBack = foo; } // ok , - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "Bar", { @@ -62,7 +62,7 @@ var C = /** @class */ (function () { , set: function (bar) { C.barBack = bar; } // ok , - enumerable: true, + enumerable: false, configurable: true }); C.barBack = ""; diff --git a/tests/baselines/reference/gettersAndSettersAccessibility.js b/tests/baselines/reference/gettersAndSettersAccessibility.js index 77747909f4865..b2393ce17db5c 100644 --- a/tests/baselines/reference/gettersAndSettersAccessibility.js +++ b/tests/baselines/reference/gettersAndSettersAccessibility.js @@ -13,7 +13,7 @@ var C99 = /** @class */ (function () { get: function () { return 0; }, set: function (n) { } // error - accessors do not agree in visibility , - enumerable: true, + enumerable: false, configurable: true }); return C99; diff --git a/tests/baselines/reference/gettersAndSettersErrors.js b/tests/baselines/reference/gettersAndSettersErrors.js index 2cd6bbd296a18..8e994e6dd0001 100644 --- a/tests/baselines/reference/gettersAndSettersErrors.js +++ b/tests/baselines/reference/gettersAndSettersErrors.js @@ -26,7 +26,7 @@ var C = /** @class */ (function () { , set: function (foo) { } // ok , - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "Goo", { @@ -34,7 +34,7 @@ var C = /** @class */ (function () { , set: function (v) { } // error - setters must not specify a return type , - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -46,7 +46,7 @@ var E = /** @class */ (function () { get: function () { return 0; }, set: function (n) { } // error - accessors do not agree in visibility , - enumerable: true, + enumerable: false, configurable: true }); return E; diff --git a/tests/baselines/reference/gettersAndSettersTypesAgree.js b/tests/baselines/reference/gettersAndSettersTypesAgree.js index d2c50e1fd4f69..bb74877ea9352 100644 --- a/tests/baselines/reference/gettersAndSettersTypesAgree.js +++ b/tests/baselines/reference/gettersAndSettersTypesAgree.js @@ -19,7 +19,7 @@ var C = /** @class */ (function () { , set: function (foo) { } // ok - type inferred from getter return statement , - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "Bar", { @@ -27,7 +27,7 @@ var C = /** @class */ (function () { , set: function (bar) { } // ok - type must be declared , - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/giant.js b/tests/baselines/reference/giant.js index 9adf046d8cfc2..7aa7656be6d74 100644 --- a/tests/baselines/reference/giant.js +++ b/tests/baselines/reference/giant.js @@ -708,38 +708,38 @@ define(["require", "exports"], function (require, exports) { C.prototype.pgF = function () { }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.psF = function (param) { }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.rgF = function () { }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.rsF = function (param) { }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); C.tF = function () { }; C.tsF = function (param) { }; Object.defineProperty(C, "tsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); C.tgF = function () { }; Object.defineProperty(C, "tgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -757,38 +757,38 @@ define(["require", "exports"], function (require, exports) { C.prototype.pgF = function () { }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.psF = function (param) { }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.rgF = function () { }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.rsF = function (param) { }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); C.tF = function () { }; C.tsF = function (param) { }; Object.defineProperty(C, "tsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); C.tgF = function () { }; Object.defineProperty(C, "tgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -833,38 +833,38 @@ define(["require", "exports"], function (require, exports) { eC.prototype.pgF = function () { }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); eC.prototype.psF = function (param) { }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); eC.prototype.rgF = function () { }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); eC.prototype.rsF = function (param) { }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); eC.tF = function () { }; eC.tsF = function (param) { }; Object.defineProperty(eC, "tsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); eC.tgF = function () { }; Object.defineProperty(eC, "tgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return eC; @@ -901,6 +901,7 @@ define(["require", "exports"], function (require, exports) { })(eM = M_1.eM || (M_1.eM = {})); ; })(M || (M = {})); + exports.eV = void 0; function eF() { } exports.eF = eF; ; @@ -912,38 +913,38 @@ define(["require", "exports"], function (require, exports) { eC.prototype.pgF = function () { }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); eC.prototype.psF = function (param) { }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); eC.prototype.rgF = function () { }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); eC.prototype.rsF = function (param) { }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); eC.tF = function () { }; eC.tsF = function (param) { }; Object.defineProperty(eC, "tsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); eC.tgF = function () { }; Object.defineProperty(eC, "tgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return eC; @@ -962,38 +963,38 @@ define(["require", "exports"], function (require, exports) { C.prototype.pgF = function () { }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.psF = function (param) { }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.rgF = function () { }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.rsF = function (param) { }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); C.tF = function () { }; C.tsF = function (param) { }; Object.defineProperty(C, "tsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); C.tgF = function () { }; Object.defineProperty(C, "tgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -1038,38 +1039,38 @@ define(["require", "exports"], function (require, exports) { eC.prototype.pgF = function () { }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); eC.prototype.psF = function (param) { }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); eC.prototype.rgF = function () { }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); eC.prototype.rsF = function (param) { }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); eC.tF = function () { }; eC.tsF = function (param) { }; Object.defineProperty(eC, "tsF", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); eC.tgF = function () { }; Object.defineProperty(eC, "tgF", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return eC; diff --git a/tests/baselines/reference/highlightsForExportFromUnfoundModule.baseline b/tests/baselines/reference/highlightsForExportFromUnfoundModule.baseline new file mode 100644 index 0000000000000..6f5759046e706 --- /dev/null +++ b/tests/baselines/reference/highlightsForExportFromUnfoundModule.baseline @@ -0,0 +1,5 @@ +/*====== /tests/cases/fourslash/b.js ======*/ + +export { + [|RENAME|] +} from './a'; diff --git a/tests/baselines/reference/implicitAnyCastedValue.js b/tests/baselines/reference/implicitAnyCastedValue.js index 51993d692e013..423c898433271 100644 --- a/tests/baselines/reference/implicitAnyCastedValue.js +++ b/tests/baselines/reference/implicitAnyCastedValue.js @@ -94,7 +94,7 @@ var C = /** @class */ (function () { get: function () { return 0; // this should not be an error }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.returnBarWithCase = function () { @@ -113,14 +113,14 @@ var C1 = /** @class */ (function () { get: function () { return this.getValue; // this should not be an error }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C1.prototype, "notCastedGet", { get: function () { return this.getValue; // this should not be an error }, - enumerable: true, + enumerable: false, configurable: true }); return C1; diff --git a/tests/baselines/reference/implicitAnyFromCircularInference.js b/tests/baselines/reference/implicitAnyFromCircularInference.js index 1f522a601f2f3..7833694772e03 100644 --- a/tests/baselines/reference/implicitAnyFromCircularInference.js +++ b/tests/baselines/reference/implicitAnyFromCircularInference.js @@ -89,7 +89,7 @@ var D = /** @class */ (function () { get: function () { return this.x; }, - enumerable: true, + enumerable: false, configurable: true }); return D; diff --git a/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.js b/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.js index 48793de094d08..c349e77a9a2b6 100644 --- a/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.js +++ b/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.js @@ -37,7 +37,7 @@ var GetAndSet = /** @class */ (function () { set: function (value) { this.getAndSet = value; }, - enumerable: true, + enumerable: false, configurable: true }); return GetAndSet; @@ -48,7 +48,7 @@ var SetterOnly = /** @class */ (function () { Object.defineProperty(SetterOnly.prototype, "haveOnlySet", { set: function (newXValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return SetterOnly; @@ -60,7 +60,7 @@ var GetterOnly = /** @class */ (function () { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); return GetterOnly; diff --git a/tests/baselines/reference/importDecl.js b/tests/baselines/reference/importDecl.js index 2eb9208910a07..3fa11f81aba6f 100644 --- a/tests/baselines/reference/importDecl.js +++ b/tests/baselines/reference/importDecl.js @@ -90,6 +90,7 @@ var d = /** @class */ (function () { return d; }()); exports.d = d; +exports.x = void 0; function foo() { return null; } exports.foo = foo; //// [importDecl_require1.js] @@ -113,6 +114,7 @@ var d = /** @class */ (function () { return d; }()); exports.d = d; +exports.x = void 0; function foo() { return null; } exports.foo = foo; //// [importDecl_require3.js] @@ -124,6 +126,7 @@ var d = /** @class */ (function () { return d; }()); exports.d = d; +exports.x = void 0; function foo() { return null; } exports.foo = foo; //// [importDecl_require4.js] diff --git a/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js b/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js index a6431f6a2c3f0..bbcca5d202484 100644 --- a/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js +++ b/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js @@ -23,6 +23,7 @@ exports.B = B; //// [importDeclarationUsedAsTypeQuery_1.js] "use strict"; exports.__esModule = true; +exports.x = void 0; //// [importDeclarationUsedAsTypeQuery_require.d.ts] diff --git a/tests/baselines/reference/importEquals1.js b/tests/baselines/reference/importEquals1.js index 1789b73d58f3d..7a07d4d99066f 100644 --- a/tests/baselines/reference/importEquals1.js +++ b/tests/baselines/reference/importEquals1.js @@ -42,11 +42,23 @@ exports.A = A; module.exports = types; //// [c.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; var types = __importStar(require("./a")); diff --git a/tests/baselines/reference/importEquals2.js b/tests/baselines/reference/importEquals2.js index 05401a6cb539e..a96a14a6514f2 100644 --- a/tests/baselines/reference/importEquals2.js +++ b/tests/baselines/reference/importEquals2.js @@ -23,11 +23,23 @@ var A = /** @class */ (function () { }()); //// [b.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; var a = __importStar(require("./a")); diff --git a/tests/baselines/reference/importHelpersES6.js b/tests/baselines/reference/importHelpersES6.js index 9eb0e980c0f8c..63f0b231248d2 100644 --- a/tests/baselines/reference/importHelpersES6.js +++ b/tests/baselines/reference/importHelpersES6.js @@ -19,11 +19,14 @@ export declare function __awaiter(thisArg: any, _arguments: any, P: Function, ge //// [a.js] import { __decorate } from "tslib"; -let A = class A { -}; -A = __decorate([ - dec -], A); +const A = /** @class */ (() => { + let A = class A { + }; + A = __decorate([ + dec + ], A); + return A; +})(); export { A }; const o = { a: 1 }; const y = Object.assign({}, o); diff --git a/tests/baselines/reference/importHelpersWithLocalCollisions(module=amd).js b/tests/baselines/reference/importHelpersWithLocalCollisions(module=amd).js index d603b0ade17f2..f330893743748 100644 --- a/tests/baselines/reference/importHelpersWithLocalCollisions(module=amd).js +++ b/tests/baselines/reference/importHelpersWithLocalCollisions(module=amd).js @@ -21,11 +21,14 @@ export declare function __awaiter(thisArg: any, _arguments: any, P: Function, ge define(["require", "exports", "tslib"], function (require, exports, tslib_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - let A = class A { - }; - A = tslib_1.__decorate([ - dec - ], A); + const A = /** @class */ (() => { + let A = class A { + }; + A = tslib_1.__decorate([ + dec + ], A); + return A; + })(); exports.A = A; const o = { a: 1 }; const y = Object.assign({}, o); diff --git a/tests/baselines/reference/importHelpersWithLocalCollisions(module=commonjs).js b/tests/baselines/reference/importHelpersWithLocalCollisions(module=commonjs).js index 560bc114c3d4c..94bd8b70974a3 100644 --- a/tests/baselines/reference/importHelpersWithLocalCollisions(module=commonjs).js +++ b/tests/baselines/reference/importHelpersWithLocalCollisions(module=commonjs).js @@ -21,11 +21,14 @@ export declare function __awaiter(thisArg: any, _arguments: any, P: Function, ge "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); -let A = class A { -}; -A = tslib_1.__decorate([ - dec -], A); +const A = /** @class */ (() => { + let A = class A { + }; + A = tslib_1.__decorate([ + dec + ], A); + return A; +})(); exports.A = A; const o = { a: 1 }; const y = Object.assign({}, o); diff --git a/tests/baselines/reference/importHelpersWithLocalCollisions(module=es2015).js b/tests/baselines/reference/importHelpersWithLocalCollisions(module=es2015).js index ba22069c306f2..730f5078980b5 100644 --- a/tests/baselines/reference/importHelpersWithLocalCollisions(module=es2015).js +++ b/tests/baselines/reference/importHelpersWithLocalCollisions(module=es2015).js @@ -19,11 +19,14 @@ export declare function __awaiter(thisArg: any, _arguments: any, P: Function, ge //// [a.js] import { __decorate as __decorate_1 } from "tslib"; -let A = class A { -}; -A = __decorate_1([ - dec -], A); +const A = /** @class */ (() => { + let A = class A { + }; + A = __decorate_1([ + dec + ], A); + return A; +})(); export { A }; const o = { a: 1 }; const y = Object.assign({}, o); diff --git a/tests/baselines/reference/importHelpersWithLocalCollisions(module=system).js b/tests/baselines/reference/importHelpersWithLocalCollisions(module=system).js index fb10d64b45af3..1ebf0c245bacf 100644 --- a/tests/baselines/reference/importHelpersWithLocalCollisions(module=system).js +++ b/tests/baselines/reference/importHelpersWithLocalCollisions(module=system).js @@ -29,11 +29,14 @@ System.register(["tslib"], function (exports_1, context_1) { } ], execute: function () { - A = class A { - }; - A = tslib_1.__decorate([ - dec - ], A); + A = /** @class */ (() => { + let A = class A { + }; + A = tslib_1.__decorate([ + dec + ], A); + return A; + })(); exports_1("A", A); o = { a: 1 }; y = Object.assign({}, o); diff --git a/tests/baselines/reference/importNonExportedMember2.errors.txt b/tests/baselines/reference/importNonExportedMember2.errors.txt new file mode 100644 index 0000000000000..4f98bc46da957 --- /dev/null +++ b/tests/baselines/reference/importNonExportedMember2.errors.txt @@ -0,0 +1,13 @@ +tests/cases/compiler/b.ts(1,10): error TS2459: Module '"./a"' declares 'Foo' locally, but it is not exported. + + +==== tests/cases/compiler/a.ts (0 errors) ==== + export {} + interface Foo {} + +==== tests/cases/compiler/b.ts (1 errors) ==== + import { Foo } from './a'; + ~~~ +!!! error TS2459: Module '"./a"' declares 'Foo' locally, but it is not exported. +!!! related TS2728 tests/cases/compiler/a.ts:2:11: 'Foo' is declared here. + \ No newline at end of file diff --git a/tests/baselines/reference/importNonExportedMember2.js b/tests/baselines/reference/importNonExportedMember2.js new file mode 100644 index 0000000000000..33c3fd0985daf --- /dev/null +++ b/tests/baselines/reference/importNonExportedMember2.js @@ -0,0 +1,16 @@ +//// [tests/cases/compiler/importNonExportedMember2.ts] //// + +//// [a.ts] +export {} +interface Foo {} + +//// [b.ts] +import { Foo } from './a'; + + +//// [a.js] +"use strict"; +exports.__esModule = true; +//// [b.js] +"use strict"; +exports.__esModule = true; diff --git a/tests/baselines/reference/importNonExportedMember2.symbols b/tests/baselines/reference/importNonExportedMember2.symbols new file mode 100644 index 0000000000000..8aec39c716947 --- /dev/null +++ b/tests/baselines/reference/importNonExportedMember2.symbols @@ -0,0 +1,9 @@ +=== tests/cases/compiler/a.ts === +export {} +interface Foo {} +>Foo : Symbol(Foo, Decl(a.ts, 0, 9)) + +=== tests/cases/compiler/b.ts === +import { Foo } from './a'; +>Foo : Symbol(Foo, Decl(b.ts, 0, 8)) + diff --git a/tests/baselines/reference/importNonExportedMember2.types b/tests/baselines/reference/importNonExportedMember2.types new file mode 100644 index 0000000000000..d6956acb15e61 --- /dev/null +++ b/tests/baselines/reference/importNonExportedMember2.types @@ -0,0 +1,8 @@ +=== tests/cases/compiler/a.ts === +export {} +No type information for this code.interface Foo {} +No type information for this code. +No type information for this code.=== tests/cases/compiler/b.ts === +import { Foo } from './a'; +>Foo : any + diff --git a/tests/baselines/reference/importNonExportedMember3.errors.txt b/tests/baselines/reference/importNonExportedMember3.errors.txt new file mode 100644 index 0000000000000..8555564657e04 --- /dev/null +++ b/tests/baselines/reference/importNonExportedMember3.errors.txt @@ -0,0 +1,17 @@ +tests/cases/compiler/b.ts(1,10): error TS2459: Module '"./a"' declares 'Foo' locally, but it is not exported. + + +==== tests/cases/compiler/a.ts (0 errors) ==== + export {} + interface Foo {} + interface Foo {} + namespace Foo {} + +==== tests/cases/compiler/b.ts (1 errors) ==== + import { Foo } from './a'; + ~~~ +!!! error TS2459: Module '"./a"' declares 'Foo' locally, but it is not exported. +!!! related TS2728 tests/cases/compiler/a.ts:2:11: 'Foo' is declared here. +!!! related TS6204 tests/cases/compiler/a.ts:3:11: and here. +!!! related TS6204 tests/cases/compiler/a.ts:4:11: and here. + \ No newline at end of file diff --git a/tests/baselines/reference/importNonExportedMember3.js b/tests/baselines/reference/importNonExportedMember3.js new file mode 100644 index 0000000000000..bf7fd172e7221 --- /dev/null +++ b/tests/baselines/reference/importNonExportedMember3.js @@ -0,0 +1,18 @@ +//// [tests/cases/compiler/importNonExportedMember3.ts] //// + +//// [a.ts] +export {} +interface Foo {} +interface Foo {} +namespace Foo {} + +//// [b.ts] +import { Foo } from './a'; + + +//// [a.js] +"use strict"; +exports.__esModule = true; +//// [b.js] +"use strict"; +exports.__esModule = true; diff --git a/tests/baselines/reference/importNonExportedMember3.symbols b/tests/baselines/reference/importNonExportedMember3.symbols new file mode 100644 index 0000000000000..1d17fc06fecb8 --- /dev/null +++ b/tests/baselines/reference/importNonExportedMember3.symbols @@ -0,0 +1,15 @@ +=== tests/cases/compiler/a.ts === +export {} +interface Foo {} +>Foo : Symbol(Foo, Decl(a.ts, 0, 9), Decl(a.ts, 1, 16), Decl(a.ts, 2, 16)) + +interface Foo {} +>Foo : Symbol(Foo, Decl(a.ts, 0, 9), Decl(a.ts, 1, 16), Decl(a.ts, 2, 16)) + +namespace Foo {} +>Foo : Symbol(Foo, Decl(a.ts, 0, 9), Decl(a.ts, 1, 16), Decl(a.ts, 2, 16)) + +=== tests/cases/compiler/b.ts === +import { Foo } from './a'; +>Foo : Symbol(Foo, Decl(b.ts, 0, 8)) + diff --git a/tests/baselines/reference/importNonExportedMember3.types b/tests/baselines/reference/importNonExportedMember3.types new file mode 100644 index 0000000000000..7ca8de617e06f --- /dev/null +++ b/tests/baselines/reference/importNonExportedMember3.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.ts === +export {} +No type information for this code.interface Foo {} +No type information for this code.interface Foo {} +No type information for this code.namespace Foo {} +No type information for this code. +No type information for this code.=== tests/cases/compiler/b.ts === +import { Foo } from './a'; +>Foo : any + diff --git a/tests/baselines/reference/incompatibleTypes.types b/tests/baselines/reference/incompatibleTypes.types index df1f158831a15..e5ab878a9e5ab 100644 --- a/tests/baselines/reference/incompatibleTypes.types +++ b/tests/baselines/reference/incompatibleTypes.types @@ -82,7 +82,7 @@ var c2: C2; >c2 : C2 if1(c1); ->if1(c1) : any +>if1(c1) : void >if1 : { (i: IFoo1): void; (i: IFoo2): void; } >c1 : C1 @@ -107,7 +107,7 @@ function of1(a: any) { return null; } >null : null of1({ e: 0, f: 0 }); ->of1({ e: 0, f: 0 }) : any +>of1({ e: 0, f: 0 }) : never >of1 : { (n: { a: { a: string; }; b: string; }): number; (s: { c: { b: string; }; d: string; }): string; } >{ e: 0, f: 0 } : { e: number; f: number; } >e : number diff --git a/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.types b/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.types index 9d1f10ebb8254..184025a07fdf7 100644 --- a/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.types +++ b/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.types @@ -27,7 +27,7 @@ interface MyObjA { } fn({ ->fn({ a: {x: 'X', y: 'Y'}, b: {},}) : any +>fn({ a: {x: 'X', y: 'Y'}, b: {},}) : string >fn : (opts: Opts) => string >{ a: {x: 'X', y: 'Y'}, b: {},} : { a: { x: string; y: string; }; b: {}; } diff --git a/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types b/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types index 95f3ddcaf548b..980619458f89a 100644 --- a/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types +++ b/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types @@ -32,7 +32,7 @@ var stooges = [ ]; f(stooges); // Should throw ->f(stooges) : any +>f(stooges) : unknown >f : (x: { [x: string]: T; }) => T >stooges : { name: string; age: number; }[] diff --git a/tests/baselines/reference/indexSignatureTypeInference.errors.txt b/tests/baselines/reference/indexSignatureTypeInference.errors.txt index aa25f11db5937..148e583bc6038 100644 --- a/tests/baselines/reference/indexSignatureTypeInference.errors.txt +++ b/tests/baselines/reference/indexSignatureTypeInference.errors.txt @@ -1,8 +1,9 @@ +tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts(18,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'v1' must be of type 'Function[]', but here has type 'unknown[]'. tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts(18,27): error TS2345: Argument of type 'NumberMap' is not assignable to parameter of type 'StringMap'. Index signature is missing in type 'NumberMap'. -==== tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts (1 errors) ==== +==== tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts (2 errors) ==== interface NumberMap { [index: number]: T; } @@ -21,6 +22,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureType var v1 = numberMapToArray(numberMap); // Ok var v1 = numberMapToArray(stringMap); // Ok var v1 = stringMapToArray(numberMap); // Error expected here + ~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'v1' must be of type 'Function[]', but here has type 'unknown[]'. +!!! related TS6203 tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts:15:5: 'v1' was also declared here. ~~~~~~~~~ !!! error TS2345: Argument of type 'NumberMap' is not assignable to parameter of type 'StringMap'. !!! error TS2345: Index signature is missing in type 'NumberMap'. diff --git a/tests/baselines/reference/indexSignatureTypeInference.types b/tests/baselines/reference/indexSignatureTypeInference.types index b29a1d002dd1f..830af609193d6 100644 --- a/tests/baselines/reference/indexSignatureTypeInference.types +++ b/tests/baselines/reference/indexSignatureTypeInference.types @@ -40,7 +40,7 @@ var v1 = numberMapToArray(stringMap); // Ok var v1 = stringMapToArray(numberMap); // Error expected here >v1 : Function[] ->stringMapToArray(numberMap) : any +>stringMapToArray(numberMap) : unknown[] >stringMapToArray : (object: StringMap) => T[] >numberMap : NumberMap diff --git a/tests/baselines/reference/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js b/tests/baselines/reference/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js new file mode 100644 index 0000000000000..2ff1261fd794c --- /dev/null +++ b/tests/baselines/reference/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js @@ -0,0 +1,50 @@ +//// [indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts] +type AnyFunction = (...args: any[]) => any; +type Params = Parameters>; + +interface Wrapper { + call(event: K, ...args: Params): void; +} + +interface AWrapped { + foo(): void; +} + +class A { + foo: Wrapper; +} + +interface BWrapped extends AWrapped { + bar(): void; +} + +class B extends A { + foo: Wrapper; +} + +//// [indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js] +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var A = /** @class */ (function () { + function A() { + } + return A; +}()); +var B = /** @class */ (function (_super) { + __extends(B, _super); + function B() { + return _super !== null && _super.apply(this, arguments) || this; + } + return B; +}(A)); diff --git a/tests/baselines/reference/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.symbols b/tests/baselines/reference/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.symbols new file mode 100644 index 0000000000000..41f6b4a5ebceb --- /dev/null +++ b/tests/baselines/reference/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.symbols @@ -0,0 +1,62 @@ +=== tests/cases/compiler/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts === +type AnyFunction = (...args: any[]) => any; +>AnyFunction : Symbol(AnyFunction, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 0, 0)) +>args : Symbol(args, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 0, 20)) + +type Params = Parameters>; +>Params : Symbol(Params, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 0, 43)) +>T : Symbol(T, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 1, 12)) +>Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) +>Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 1, 12)) +>AnyFunction : Symbol(AnyFunction, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 0, 0)) + +interface Wrapper { +>Wrapper : Symbol(Wrapper, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 1, 53)) +>T : Symbol(T, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 3, 18)) + + call(event: K, ...args: Params): void; +>call : Symbol(Wrapper.call, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 3, 22)) +>K : Symbol(K, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 4, 6)) +>T : Symbol(T, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 3, 18)) +>event : Symbol(event, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 4, 25)) +>K : Symbol(K, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 4, 6)) +>args : Symbol(args, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 4, 34)) +>Params : Symbol(Params, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 0, 43)) +>T : Symbol(T, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 3, 18)) +>K : Symbol(K, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 4, 6)) +} + +interface AWrapped { +>AWrapped : Symbol(AWrapped, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 5, 1)) + + foo(): void; +>foo : Symbol(AWrapped.foo, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 7, 20)) +} + +class A { +>A : Symbol(A, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 9, 1)) + + foo: Wrapper; +>foo : Symbol(A.foo, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 11, 9)) +>Wrapper : Symbol(Wrapper, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 1, 53)) +>AWrapped : Symbol(AWrapped, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 5, 1)) +} + +interface BWrapped extends AWrapped { +>BWrapped : Symbol(BWrapped, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 13, 1)) +>AWrapped : Symbol(AWrapped, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 5, 1)) + + bar(): void; +>bar : Symbol(BWrapped.bar, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 15, 37)) +} + +class B extends A { +>B : Symbol(B, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 17, 1)) +>A : Symbol(A, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 9, 1)) + + foo: Wrapper; +>foo : Symbol(B.foo, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 19, 19)) +>Wrapper : Symbol(Wrapper, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 1, 53)) +>BWrapped : Symbol(BWrapped, Decl(indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts, 13, 1)) +} diff --git a/tests/baselines/reference/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.types b/tests/baselines/reference/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.types new file mode 100644 index 0000000000000..2c57c390ddc53 --- /dev/null +++ b/tests/baselines/reference/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.types @@ -0,0 +1,39 @@ +=== tests/cases/compiler/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts === +type AnyFunction = (...args: any[]) => any; +>AnyFunction : AnyFunction +>args : any[] + +type Params = Parameters>; +>Params : Parameters> + +interface Wrapper { + call(event: K, ...args: Params): void; +>call : (event: K, ...args: Parameters>) => void +>event : K +>args : Parameters> +} + +interface AWrapped { + foo(): void; +>foo : () => void +} + +class A { +>A : A + + foo: Wrapper; +>foo : Wrapper +} + +interface BWrapped extends AWrapped { + bar(): void; +>bar : () => void +} + +class B extends A { +>B : B +>A : A + + foo: Wrapper; +>foo : Wrapper +} diff --git a/tests/baselines/reference/indexedAccessRelation.types b/tests/baselines/reference/indexedAccessRelation.types index 180cff338ccc9..6d2ee19dda240 100644 --- a/tests/baselines/reference/indexedAccessRelation.types +++ b/tests/baselines/reference/indexedAccessRelation.types @@ -26,7 +26,7 @@ class Comp extends Component> >a : T this.setState({ a: a }); ->this.setState({ a: a }) : any +>this.setState({ a: a }) : void >this.setState : (state: Pick, K>) => void >this : this >setState : (state: Pick, K>) => void diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types index f9192dd11baad..baecdf626dd19 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types @@ -461,7 +461,7 @@ declare function foldLeft(z: U, f: (acc: U, t: boolean) => U): U; let res: boolean = foldLeft(true, (acc, t) => acc && t); // Error >res : boolean ->foldLeft(true, (acc, t) => acc && t) : any +>foldLeft(true, (acc, t) => acc && t) : true >foldLeft : (z: U, f: (acc: U, t: boolean) => U) => U >true : true >(acc, t) => acc && t : (acc: true, t: boolean) => boolean @@ -486,22 +486,22 @@ declare function bar(f: () => T[]): T[]; let x: Foo[] = bar(() => !!true ? [{ state: State.A }] : [{ state: State.B }]); // Error >x : Foo[] ->bar(() => !!true ? [{ state: State.A }] : [{ state: State.B }]) : any +>bar(() => !!true ? [{ state: State.A }] : [{ state: State.B }]) : { state: State.A; }[] >bar : (f: () => T[]) => T[] >() => !!true ? [{ state: State.A }] : [{ state: State.B }] : () => { state: State.A; }[] | { state: State.B; }[] ->!!true ? [{ state: State.A }] : [{ state: State.B }] : { state: State; }[] +>!!true ? [{ state: State.A }] : [{ state: State.B }] : { state: State.A; }[] | { state: State.B; }[] >!!true : true >!true : false >true : true ->[{ state: State.A }] : { state: State; }[] ->{ state: State.A } : { state: State; } ->state : State +>[{ state: State.A }] : { state: State.A; }[] +>{ state: State.A } : { state: State.A; } +>state : State.A >State.A : State.A >State : typeof State >A : State.A ->[{ state: State.B }] : { state: State; }[] ->{ state: State.B } : { state: State; } ->state : State +>[{ state: State.B }] : { state: State.B; }[] +>{ state: State.B } : { state: State.B; } +>state : State.B >State.B : State.B >State : typeof State >B : State.B diff --git a/tests/baselines/reference/inferSetterParamType.js b/tests/baselines/reference/inferSetterParamType.js index 7c1c2a44ecb3a..eff15a4c24e4e 100644 --- a/tests/baselines/reference/inferSetterParamType.js +++ b/tests/baselines/reference/inferSetterParamType.js @@ -28,7 +28,7 @@ var Foo = /** @class */ (function () { }, set: function (n) { }, - enumerable: true, + enumerable: false, configurable: true }); return Foo; @@ -42,7 +42,7 @@ var Foo2 = /** @class */ (function () { }, set: function (n) { }, - enumerable: true, + enumerable: false, configurable: true }); return Foo2; diff --git a/tests/baselines/reference/inferenceShouldFailOnEvolvingArrays.types b/tests/baselines/reference/inferenceShouldFailOnEvolvingArrays.types index 2d7876aefe986..1d40e6b5a820f 100644 --- a/tests/baselines/reference/inferenceShouldFailOnEvolvingArrays.types +++ b/tests/baselines/reference/inferenceShouldFailOnEvolvingArrays.types @@ -18,7 +18,7 @@ function logLength(arg: { [K in U]: T }[U]): >arg : { [K in U]: T; }[U] } logLength(42); // error ->logLength(42) : any +>logLength(42) : string >logLength : (arg: { [K in U]: T; }[U]) => T >42 : 42 @@ -26,9 +26,9 @@ let z; >z : any z = logLength(42); // no error; T is inferred as `any` ->z = logLength(42) : any +>z = logLength(42) : string >z : any ->logLength(42) : any +>logLength(42) : string >logLength : (arg: { [K in U]: T; }[U]) => T >42 : 42 @@ -51,7 +51,7 @@ function logFirstLength(arg: { [K in U]: T >arg : { [K in U]: T; }[U] } logFirstLength([42]); // error ->logFirstLength([42]) : any +>logFirstLength([42]) : string[] >logFirstLength : (arg: { [K in U]: T; }[U]) => T >[42] : number[] >42 : 42 @@ -65,14 +65,14 @@ zz.push(logLength(42)); // no error; T is inferred as `any` >zz.push : (...items: any[]) => number >zz : any[] >push : (...items: any[]) => number ->logLength(42) : any +>logLength(42) : string >logLength : (arg: { [K in U]: T; }[U]) => T >42 : 42 zz = logFirstLength([42]); // no error; T is inferred as `any[]` ->zz = logFirstLength([42]) : any +>zz = logFirstLength([42]) : string[] >zz : any[] ->logFirstLength([42]) : any +>logFirstLength([42]) : string[] >logFirstLength : (arg: { [K in U]: T; }[U]) => T >[42] : number[] >42 : 42 diff --git a/tests/baselines/reference/infiniteConstraints.types b/tests/baselines/reference/infiniteConstraints.types index 4b929ac667e67..17cd3a39d7df2 100644 --- a/tests/baselines/reference/infiniteConstraints.types +++ b/tests/baselines/reference/infiniteConstraints.types @@ -74,8 +74,8 @@ const shouldBeNoError = ensureNoDuplicates({main: value("test")}); >"test" : "test" const shouldBeError = ensureNoDuplicates({main: value("dup"), alternate: value("dup")}); ->shouldBeError : any ->ensureNoDuplicates({main: value("dup"), alternate: value("dup")}) : any +>shouldBeError : void +>ensureNoDuplicates({main: value("dup"), alternate: value("dup")}) : void >ensureNoDuplicates : >["val"] extends Extract], Record<"val", string>>["val"] ? never : any; }>(vals: T) => void >{main: value("dup"), alternate: value("dup")} : { main: Record<"val", "dup">; alternate: Record<"val", "dup">; } >main : Record<"val", "dup"> diff --git a/tests/baselines/reference/infinitelyExpandingOverloads.js b/tests/baselines/reference/infinitelyExpandingOverloads.js index fcf21983b7a4c..9b6dcafb60103 100644 --- a/tests/baselines/reference/infinitelyExpandingOverloads.js +++ b/tests/baselines/reference/infinitelyExpandingOverloads.js @@ -45,7 +45,7 @@ var Widget = /** @class */ (function () { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); return Widget; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index 6a336d64f3bbb..b8255468e1569 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -40,7 +40,7 @@ var a = /** @class */ (function () { }, set: function (aValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return a; @@ -56,7 +56,7 @@ var b = /** @class */ (function (_super) { }, set: function (aValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return b; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index 74da144f1d815..537be89bb5e49 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -47,7 +47,7 @@ var b = /** @class */ (function (_super) { }, set: function (aValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return b; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index 53e045be2d3bc..246cd5548fec9 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -42,7 +42,7 @@ var b = /** @class */ (function (_super) { }, set: function (aValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return b; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index ebafc23792581..2a05146e05356 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -37,7 +37,7 @@ var a = /** @class */ (function () { }, set: function (aValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return a; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index 1cab36c13994a..99c69af485342 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -37,7 +37,7 @@ var a = /** @class */ (function () { set: function (aValue) { this.__x = aValue; }, - enumerable: true, + enumerable: false, configurable: true }); return a; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index d72f6bd894b92..909680e76e138 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -40,7 +40,7 @@ var a = /** @class */ (function () { }, set: function (aValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return a; @@ -56,7 +56,7 @@ var b = /** @class */ (function (_super) { }, set: function (aValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return b; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index 350b3437e19a1..82813d3724ee3 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -47,7 +47,7 @@ var b = /** @class */ (function (_super) { }, set: function (aValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return b; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index 6cb06206ceb33..6ce9dd493b2d1 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -42,7 +42,7 @@ var b = /** @class */ (function (_super) { }, set: function (aValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return b; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index 4b1b97e3c0fc9..95c48fac13898 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -37,7 +37,7 @@ var a = /** @class */ (function () { }, set: function (aValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return a; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index 9d3166a5a4ba0..07523c6735604 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -32,7 +32,7 @@ var a = /** @class */ (function () { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); return a; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 02124e177f255..bb39efe42b408 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -35,7 +35,7 @@ var a = /** @class */ (function () { }, set: function (aValue) { }, - enumerable: true, + enumerable: false, configurable: true }); return a; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.types b/tests/baselines/reference/inheritedConstructorWithRestParams.types index 8089742b7a58b..62b76f7927382 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.types +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.types @@ -28,13 +28,13 @@ new Derived(); // Errors new Derived("", 3); ->new Derived("", 3) : any +>new Derived("", 3) : Derived >Derived : typeof Derived >"" : "" >3 : 3 new Derived(3); ->new Derived(3) : any +>new Derived(3) : Derived >Derived : typeof Derived >3 : 3 diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.types b/tests/baselines/reference/inheritedConstructorWithRestParams2.types index 511114298c69b..006bb8b306c10 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.types +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.types @@ -95,12 +95,12 @@ new Derived("", "", 3, 3); // Errors new Derived(3); ->new Derived(3) : any +>new Derived(3) : Derived >Derived : typeof Derived >3 : 3 new Derived("", 3, "", 3); ->new Derived("", 3, "", 3) : any +>new Derived("", 3, "", 3) : Derived >Derived : typeof Derived >"" : "" >3 : 3 @@ -108,7 +108,7 @@ new Derived("", 3, "", 3); >3 : 3 new Derived("", 3, "", ""); ->new Derived("", 3, "", "") : any +>new Derived("", 3, "", "") : Derived >Derived : typeof Derived >"" : "" >3 : 3 diff --git a/tests/baselines/reference/inlineJsxFactoryDeclarations.js b/tests/baselines/reference/inlineJsxFactoryDeclarations.js index 958c43af83f68..b4ec0ad196691 100644 --- a/tests/baselines/reference/inlineJsxFactoryDeclarations.js +++ b/tests/baselines/reference/inlineJsxFactoryDeclarations.js @@ -62,13 +62,20 @@ var renderer_1 = require("./renderer"); exports.prerendered3 = renderer_1["default"].createElement("h", null); //// [index.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; /** @jsx dom */ var renderer_1 = require("./renderer"); renderer_1.dom("h", null); -__export(require("./other")); -__export(require("./othernoalias")); -__export(require("./reacty")); +__exportStar(require("./other"), exports); +__exportStar(require("./othernoalias"), exports); +__exportStar(require("./reacty"), exports); diff --git a/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.errors.txt b/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.errors.txt index c4a7c6809bcc5..b62c3592ef6a8 100644 --- a/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.errors.txt +++ b/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.errors.txt @@ -1,10 +1,12 @@ tests/cases/conformance/jsx/inline/index.tsx(5,1): error TS2741: Property '__predomBrand' is missing in type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element' but required in type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element'. +tests/cases/conformance/jsx/inline/index.tsx(21,21): error TS2605: JSX element type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' is not a constructor function for JSX elements. + Property '__domBrand' is missing in type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' but required in type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element'. tests/cases/conformance/jsx/inline/index.tsx(21,40): error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element'. tests/cases/conformance/jsx/inline/index.tsx(21,40): error TS2605: JSX element type 'MyClass' is not a constructor function for JSX elements. Property '__domBrand' is missing in type 'MyClass' but required in type 'ElementClass'. tests/cases/conformance/jsx/inline/index.tsx(21,63): error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element'. tests/cases/conformance/jsx/inline/index.tsx(21,63): error TS2605: JSX element type 'MyClass' is not a constructor function for JSX elements. -tests/cases/conformance/jsx/inline/index.tsx(24,42): error TS2741: Property '__domBrand' is missing in type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' but required in type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element'. +tests/cases/conformance/jsx/inline/index.tsx(24,42): error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element'. tests/cases/conformance/jsx/inline/index.tsx(24,48): error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element'. @@ -68,7 +70,7 @@ tests/cases/conformance/jsx/inline/index.tsx(24,48): error TS2322: Type 'import( export default -==== tests/cases/conformance/jsx/inline/index.tsx (7 errors) ==== +==== tests/cases/conformance/jsx/inline/index.tsx (8 errors) ==== /** @jsx dom */ import { dom } from "./renderer" import prerendered, {MySFC, MyClass, tree} from "./component"; @@ -93,6 +95,10 @@ tests/cases/conformance/jsx/inline/index.tsx(24,48): error TS2322: Type 'import( // Should fail, no dom elements const _brokenTree = + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2605: JSX element type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' is not a constructor function for JSX elements. +!!! error TS2605: Property '__domBrand' is missing in type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' but required in type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element'. +!!! related TS2728 tests/cases/conformance/jsx/inline/renderer.d.ts:7:13: '__domBrand' is declared here. ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element'. ~~~~~~~~~~~~~~~~~~~~~~~ @@ -107,8 +113,7 @@ tests/cases/conformance/jsx/inline/index.tsx(24,48): error TS2322: Type 'import( // Should fail, nondom isn't allowed as children of dom const _brokenTree2 = {tree}{tree} ~~~~~~ -!!! error TS2741: Property '__domBrand' is missing in type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' but required in type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element'. -!!! related TS2728 tests/cases/conformance/jsx/inline/renderer.d.ts:7:13: '__domBrand' is declared here. +!!! error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element'. ~~~~~~ !!! error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element'. \ No newline at end of file diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index e209c0784c917..a63976a830e23 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -68,7 +68,7 @@ var NonGeneric; return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.fn = function () { return this; }; @@ -100,7 +100,7 @@ var Generic; return null; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.fn = function () { return this; }; diff --git a/tests/baselines/reference/instancePropertyInClassType.js b/tests/baselines/reference/instancePropertyInClassType.js index 32bd215f66aac..a3e39fc980706 100644 --- a/tests/baselines/reference/instancePropertyInClassType.js +++ b/tests/baselines/reference/instancePropertyInClassType.js @@ -51,7 +51,7 @@ var NonGeneric; return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.fn = function () { return this; }; @@ -76,7 +76,7 @@ var Generic; return null; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.fn = function () { return this; }; diff --git a/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.types b/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.types index ecf0704d0158c..f8f4f0a1f9e98 100644 --- a/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.types +++ b/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.types @@ -10,8 +10,8 @@ class C { } var c = new C(); ->c : any ->new C() : any +>c : C +>new C() : C >C : typeof C class D { @@ -26,7 +26,7 @@ class D { // BUG 794238 var d = new D(); ->d : any ->new D() : any +>d : D +>new D() : D >D : typeof D diff --git a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.types b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.types index 451cd75380fc0..cbcdceb660051 100644 --- a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.types +++ b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.types @@ -10,8 +10,8 @@ class C { } var c = new C(); ->c : any ->new C() : any +>c : C +>new C() : C >C : typeof C function Foo(): void { } diff --git a/tests/baselines/reference/interfaceAssignmentCompat.types b/tests/baselines/reference/interfaceAssignmentCompat.types index 31d667048b918..b1135f1d27ae3 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.types +++ b/tests/baselines/reference/interfaceAssignmentCompat.types @@ -100,7 +100,7 @@ module M { >Green : Color.Green x=x.sort(CompareYeux); // parameter mismatch ->x=x.sort(CompareYeux) : any +>x=x.sort(CompareYeux) : IEye[] >x : IEye[] >x.sort(CompareYeux) : IEye[] >x.sort : (compareFn?: (a: IEye, b: IEye) => number) => IEye[] diff --git a/tests/baselines/reference/interfaceExtendingClass.js b/tests/baselines/reference/interfaceExtendingClass.js index 388d4232e82a8..373b852f1d761 100644 --- a/tests/baselines/reference/interfaceExtendingClass.js +++ b/tests/baselines/reference/interfaceExtendingClass.js @@ -28,7 +28,7 @@ var Foo = /** @class */ (function () { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return Foo; diff --git a/tests/baselines/reference/interfaceExtendingClass2.js b/tests/baselines/reference/interfaceExtendingClass2.js index 9c4f56151e0ab..670a4dacb2ff5 100644 --- a/tests/baselines/reference/interfaceExtendingClass2.js +++ b/tests/baselines/reference/interfaceExtendingClass2.js @@ -24,7 +24,7 @@ var Foo = /** @class */ (function () { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return Foo; diff --git a/tests/baselines/reference/interfaceImplementation5.js b/tests/baselines/reference/interfaceImplementation5.js index 9b2ffd88e4059..1e4ffff35cc34 100644 --- a/tests/baselines/reference/interfaceImplementation5.js +++ b/tests/baselines/reference/interfaceImplementation5.js @@ -37,7 +37,7 @@ var C1 = /** @class */ (function () { } Object.defineProperty(C1.prototype, "getset1", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C1; @@ -47,7 +47,7 @@ var C2 = /** @class */ (function () { } Object.defineProperty(C2.prototype, "getset1", { set: function (baz) { }, - enumerable: true, + enumerable: false, configurable: true }); return C2; @@ -58,7 +58,7 @@ var C3 = /** @class */ (function () { Object.defineProperty(C3.prototype, "getset1", { get: function () { return 1; }, set: function (baz) { }, - enumerable: true, + enumerable: false, configurable: true }); return C3; @@ -68,7 +68,7 @@ var C4 = /** @class */ (function () { } Object.defineProperty(C4.prototype, "getset1", { get: function () { var x; return x; }, - enumerable: true, + enumerable: false, configurable: true }); return C4; @@ -78,7 +78,7 @@ var C5 = /** @class */ (function () { } Object.defineProperty(C5.prototype, "getset1", { set: function (baz) { }, - enumerable: true, + enumerable: false, configurable: true }); return C5; @@ -89,7 +89,7 @@ var C6 = /** @class */ (function () { Object.defineProperty(C6.prototype, "getset1", { get: function () { var x; return x; }, set: function (baz) { }, - enumerable: true, + enumerable: false, configurable: true }); return C6; diff --git a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js index 4434670366c56..5202f89d4d9fe 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js @@ -11,6 +11,7 @@ export var x: b; //// [internalAliasInterfaceInsideTopLevelModuleWithExport.js] "use strict"; exports.__esModule = true; +exports.x = void 0; //// [internalAliasInterfaceInsideTopLevelModuleWithExport.d.ts] diff --git a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js index 5645c76ed2ad5..e6bdc2d273797 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js @@ -12,6 +12,7 @@ export var x: b; define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.x = void 0; }); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js index a6b4f83de8e34..37b2fca2de8f1 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js @@ -24,4 +24,5 @@ define(["require", "exports"], function (require, exports) { (function (c) { c.x.foo(); })(c = exports.c || (exports.c = {})); + exports.z = void 0; }); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js index eccbd9a45bd58..523f4f07ff35a 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js @@ -16,6 +16,7 @@ x.foo(); define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.x = void 0; exports.x.foo(); }); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js index 27de6bbfd9837..3004c9c0e9bc9 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js @@ -15,6 +15,7 @@ x.foo(); //// [internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js] "use strict"; exports.__esModule = true; +exports.x = void 0; exports.x.foo(); diff --git a/tests/baselines/reference/invalidNewTarget.es5.js b/tests/baselines/reference/invalidNewTarget.es5.js index 56278dc56df19..f25847b1e983a 100644 --- a/tests/baselines/reference/invalidNewTarget.es5.js +++ b/tests/baselines/reference/invalidNewTarget.es5.js @@ -43,7 +43,7 @@ var C = /** @class */ (function () { var _newTarget = void 0; return _newTarget; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "e", { @@ -51,7 +51,7 @@ var C = /** @class */ (function () { var _newTarget = void 0; _ = _newTarget; }, - enumerable: true, + enumerable: false, configurable: true }); C[_newTarget] = function () { }; @@ -64,7 +64,7 @@ var C = /** @class */ (function () { var _newTarget = void 0; return _newTarget; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "i", { @@ -72,7 +72,7 @@ var C = /** @class */ (function () { var _newTarget = void 0; _ = _newTarget; }, - enumerable: true, + enumerable: false, configurable: true }); C.j = function () { return _newTarget; }; @@ -89,7 +89,7 @@ var O = (_a = {}, var _newTarget = void 0; return _newTarget; }, - enumerable: true, + enumerable: false, configurable: true }), Object.defineProperty(_a, "m", { @@ -97,7 +97,7 @@ var O = (_a = {}, var _newTarget = void 0; _ = _newTarget; }, - enumerable: true, + enumerable: false, configurable: true }), _a.n = _newTarget, diff --git a/tests/baselines/reference/invalidNewTarget.es6.js b/tests/baselines/reference/invalidNewTarget.es6.js index ed1b2cc1592a8..97444efb83717 100644 --- a/tests/baselines/reference/invalidNewTarget.es6.js +++ b/tests/baselines/reference/invalidNewTarget.es6.js @@ -27,20 +27,23 @@ const O = { //// [invalidNewTarget.es6.js] const a = new.target; const b = () => new.target; -class C { - constructor() { - this.f = () => new.target; +const C = /** @class */ (() => { + class C { + constructor() { + this.f = () => new.target; + } + [new.target]() { } + c() { return new.target; } + get d() { return new.target; } + set e(_) { _ = new.target; } + static [new.target]() { } + static g() { return new.target; } + static get h() { return new.target; } + static set i(_) { _ = new.target; } } - [new.target]() { } - c() { return new.target; } - get d() { return new.target; } - set e(_) { _ = new.target; } - static [new.target]() { } - static g() { return new.target; } - static get h() { return new.target; } - static set i(_) { _ = new.target; } -} -C.j = () => new.target; + C.j = () => new.target; + return C; +})(); const O = { [new.target]: undefined, k() { return new.target; }, diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).errors.txt b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).errors.txt new file mode 100644 index 0000000000000..c8846ae349714 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).errors.txt @@ -0,0 +1,49 @@ +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(7,18): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,18): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,27): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,51): error TS1125: Hexadecimal digit expected. + + +==== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts (7 errors) ==== + function tag (str: any, ...args: any[]): any { + return str + } + + const a = tag`123` + const b = tag`123 ${100}` + const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; + +!!! error TS1125: Hexadecimal digit expected. + const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + + const a1 = tag`${ 100 }\0` // \0 + const a2 = tag`${ 100 }\00` // \\00 + const a3 = tag`${ 100 }\u` // \\u + const a4 = tag`${ 100 }\u0` // \\u0 + const a5 = tag`${ 100 }\u00` // \\u00 + const a6 = tag`${ 100 }\u000` // \\u000 + const a7 = tag`${ 100 }\u0000` // \u0000 + const a8 = tag`${ 100 }\u{` // \\u{ + const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF + const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 + const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} + const a12 = tag`${ 100 }\x` // \\x + const a13 = tag`${ 100 }\x0` // \\x0 + const a14 = tag`${ 100 }\x00` // \x00 + \ No newline at end of file diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).js b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).js new file mode 100644 index 0000000000000..1ad643d360de1 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).js @@ -0,0 +1,54 @@ +//// [invalidTaggedTemplateEscapeSequences.ts] +function tag (str: any, ...args: any[]): any { + return str +} + +const a = tag`123` +const b = tag`123 ${100}` +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +const a1 = tag`${ 100 }\0` // \0 +const a2 = tag`${ 100 }\00` // \\00 +const a3 = tag`${ 100 }\u` // \\u +const a4 = tag`${ 100 }\u0` // \\u0 +const a5 = tag`${ 100 }\u00` // \\u00 +const a6 = tag`${ 100 }\u000` // \\u000 +const a7 = tag`${ 100 }\u0000` // \u0000 +const a8 = tag`${ 100 }\u{` // \\u{ +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +const a12 = tag`${ 100 }\x` // \\x +const a13 = tag`${ 100 }\x0` // \\x0 +const a14 = tag`${ 100 }\x00` // \x00 + + +//// [invalidTaggedTemplateEscapeSequences.js] +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +function tag(str, ...args) { + return str; +} +const a = tag `123`; +const b = tag `123 ${100}`; +const x = tag(__makeTemplateObject([undefined, undefined, " wonderful ", undefined], ["\\u{hello} ", " \\xtraordinary ", " wonderful ", " \\uworld"]), 100, 200, 300); +const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; // should error with NoSubstitutionTemplate +const z = tag(__makeTemplateObject([undefined], ["\\u{hello} \\xtraordinary wonderful \\uworld"])); // should work with Tagged NoSubstitutionTemplate +const a1 = tag `${100}\0`; // \0 +const a2 = tag(__makeTemplateObject(["", undefined], ["", "\\00"]), 100); // \\00 +const a3 = tag(__makeTemplateObject(["", undefined], ["", "\\u"]), 100); // \\u +const a4 = tag(__makeTemplateObject(["", undefined], ["", "\\u0"]), 100); // \\u0 +const a5 = tag(__makeTemplateObject(["", undefined], ["", "\\u00"]), 100); // \\u00 +const a6 = tag(__makeTemplateObject(["", undefined], ["", "\\u000"]), 100); // \\u000 +const a7 = tag `${100}\u0000`; // \u0000 +const a8 = tag(__makeTemplateObject(["", undefined], ["", "\\u{"]), 100); // \\u{ +const a9 = tag `${100}\u{10FFFF}`; // \\u{10FFFF +const a10 = tag(__makeTemplateObject(["", undefined], ["", "\\u{1f622"]), 100); // \\u{1f622 +const a11 = tag `${100}\u{1f622}`; // \u{1f622} +const a12 = tag(__makeTemplateObject(["", undefined], ["", "\\x"]), 100); // \\x +const a13 = tag(__makeTemplateObject(["", undefined], ["", "\\x0"]), 100); // \\x0 +const a14 = tag `${100}\x00`; // \x00 diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).symbols b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).symbols new file mode 100644 index 0000000000000..1f9954dcec177 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).symbols @@ -0,0 +1,85 @@ +=== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts === +function tag (str: any, ...args: any[]): any { +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) +>str : Symbol(str, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 14)) +>args : Symbol(args, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 23)) + + return str +>str : Symbol(str, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 14)) +} + +const a = tag`123` +>a : Symbol(a, Decl(invalidTaggedTemplateEscapeSequences.ts, 4, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const b = tag`123 ${100}` +>b : Symbol(b, Decl(invalidTaggedTemplateEscapeSequences.ts, 5, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +>x : Symbol(x, Decl(invalidTaggedTemplateEscapeSequences.ts, 6, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +>y : Symbol(y, Decl(invalidTaggedTemplateEscapeSequences.ts, 7, 5)) + +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate +>z : Symbol(z, Decl(invalidTaggedTemplateEscapeSequences.ts, 8, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a1 = tag`${ 100 }\0` // \0 +>a1 : Symbol(a1, Decl(invalidTaggedTemplateEscapeSequences.ts, 10, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a2 = tag`${ 100 }\00` // \\00 +>a2 : Symbol(a2, Decl(invalidTaggedTemplateEscapeSequences.ts, 11, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a3 = tag`${ 100 }\u` // \\u +>a3 : Symbol(a3, Decl(invalidTaggedTemplateEscapeSequences.ts, 12, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a4 = tag`${ 100 }\u0` // \\u0 +>a4 : Symbol(a4, Decl(invalidTaggedTemplateEscapeSequences.ts, 13, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a5 = tag`${ 100 }\u00` // \\u00 +>a5 : Symbol(a5, Decl(invalidTaggedTemplateEscapeSequences.ts, 14, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a6 = tag`${ 100 }\u000` // \\u000 +>a6 : Symbol(a6, Decl(invalidTaggedTemplateEscapeSequences.ts, 15, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a7 = tag`${ 100 }\u0000` // \u0000 +>a7 : Symbol(a7, Decl(invalidTaggedTemplateEscapeSequences.ts, 16, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a8 = tag`${ 100 }\u{` // \\u{ +>a8 : Symbol(a8, Decl(invalidTaggedTemplateEscapeSequences.ts, 17, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +>a9 : Symbol(a9, Decl(invalidTaggedTemplateEscapeSequences.ts, 18, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +>a10 : Symbol(a10, Decl(invalidTaggedTemplateEscapeSequences.ts, 19, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +>a11 : Symbol(a11, Decl(invalidTaggedTemplateEscapeSequences.ts, 20, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a12 = tag`${ 100 }\x` // \\x +>a12 : Symbol(a12, Decl(invalidTaggedTemplateEscapeSequences.ts, 21, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a13 = tag`${ 100 }\x0` // \\x0 +>a13 : Symbol(a13, Decl(invalidTaggedTemplateEscapeSequences.ts, 22, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a14 = tag`${ 100 }\x00` // \x00 +>a14 : Symbol(a14, Decl(invalidTaggedTemplateEscapeSequences.ts, 23, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).types b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).types new file mode 100644 index 0000000000000..08b1ed6844442 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es2015).types @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts === +function tag (str: any, ...args: any[]): any { +>tag : (str: any, ...args: any[]) => any +>str : any +>args : any[] + + return str +>str : any +} + +const a = tag`123` +>a : any +>tag`123` : any +>tag : (str: any, ...args: any[]) => any +>`123` : "123" + +const b = tag`123 ${100}` +>b : any +>tag`123 ${100}` : any +>tag : (str: any, ...args: any[]) => any +>`123 ${100}` : string +>100 : 100 + +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +>x : any +>tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : any +>tag : (str: any, ...args: any[]) => any +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string +>100 : 100 +>200 : 200 +>300 : 300 + +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +>y : string +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string +>100 : 100 +>200 : 200 +>300 : 300 + +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate +>z : any +>tag`\u{hello} \xtraordinary wonderful \uworld` : any +>tag : (str: any, ...args: any[]) => any +>`\u{hello} \xtraordinary wonderful \uworld` : "\\u{hello} \\xtraordinary wonderful \\uworld" + +const a1 = tag`${ 100 }\0` // \0 +>a1 : any +>tag`${ 100 }\0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\0` : string +>100 : 100 + +const a2 = tag`${ 100 }\00` // \\00 +>a2 : any +>tag`${ 100 }\00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\00` : string +>100 : 100 + +const a3 = tag`${ 100 }\u` // \\u +>a3 : any +>tag`${ 100 }\u` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u` : string +>100 : 100 + +const a4 = tag`${ 100 }\u0` // \\u0 +>a4 : any +>tag`${ 100 }\u0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u0` : string +>100 : 100 + +const a5 = tag`${ 100 }\u00` // \\u00 +>a5 : any +>tag`${ 100 }\u00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u00` : string +>100 : 100 + +const a6 = tag`${ 100 }\u000` // \\u000 +>a6 : any +>tag`${ 100 }\u000` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u000` : string +>100 : 100 + +const a7 = tag`${ 100 }\u0000` // \u0000 +>a7 : any +>tag`${ 100 }\u0000` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u0000` : string +>100 : 100 + +const a8 = tag`${ 100 }\u{` // \\u{ +>a8 : any +>tag`${ 100 }\u{` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{` : string +>100 : 100 + +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +>a9 : any +>tag`${ 100 }\u{10FFFF}` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{10FFFF}` : string +>100 : 100 + +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +>a10 : any +>tag`${ 100 }\u{1f622` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{1f622` : string +>100 : 100 + +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +>a11 : any +>tag`${ 100 }\u{1f622}` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{1f622}` : string +>100 : 100 + +const a12 = tag`${ 100 }\x` // \\x +>a12 : any +>tag`${ 100 }\x` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x` : string +>100 : 100 + +const a13 = tag`${ 100 }\x0` // \\x0 +>a13 : any +>tag`${ 100 }\x0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x0` : string +>100 : 100 + +const a14 = tag`${ 100 }\x00` // \x00 +>a14 : any +>tag`${ 100 }\x00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x00` : string +>100 : 100 + diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).errors.txt b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).errors.txt new file mode 100644 index 0000000000000..c8846ae349714 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).errors.txt @@ -0,0 +1,49 @@ +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(7,18): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,18): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,27): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,51): error TS1125: Hexadecimal digit expected. + + +==== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts (7 errors) ==== + function tag (str: any, ...args: any[]): any { + return str + } + + const a = tag`123` + const b = tag`123 ${100}` + const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; + +!!! error TS1125: Hexadecimal digit expected. + const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + + const a1 = tag`${ 100 }\0` // \0 + const a2 = tag`${ 100 }\00` // \\00 + const a3 = tag`${ 100 }\u` // \\u + const a4 = tag`${ 100 }\u0` // \\u0 + const a5 = tag`${ 100 }\u00` // \\u00 + const a6 = tag`${ 100 }\u000` // \\u000 + const a7 = tag`${ 100 }\u0000` // \u0000 + const a8 = tag`${ 100 }\u{` // \\u{ + const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF + const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 + const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} + const a12 = tag`${ 100 }\x` // \\x + const a13 = tag`${ 100 }\x0` // \\x0 + const a14 = tag`${ 100 }\x00` // \x00 + \ No newline at end of file diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).js b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).js new file mode 100644 index 0000000000000..362e2cf175cfc --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).js @@ -0,0 +1,58 @@ +//// [invalidTaggedTemplateEscapeSequences.ts] +function tag (str: any, ...args: any[]): any { + return str +} + +const a = tag`123` +const b = tag`123 ${100}` +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +const a1 = tag`${ 100 }\0` // \0 +const a2 = tag`${ 100 }\00` // \\00 +const a3 = tag`${ 100 }\u` // \\u +const a4 = tag`${ 100 }\u0` // \\u0 +const a5 = tag`${ 100 }\u00` // \\u00 +const a6 = tag`${ 100 }\u000` // \\u000 +const a7 = tag`${ 100 }\u0000` // \u0000 +const a8 = tag`${ 100 }\u{` // \\u{ +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +const a12 = tag`${ 100 }\x` // \\x +const a13 = tag`${ 100 }\x0` // \\x0 +const a14 = tag`${ 100 }\x00` // \x00 + + +//// [invalidTaggedTemplateEscapeSequences.js] +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +function tag(str) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + return str; +} +var a = tag(__makeTemplateObject(["123"], ["123"])); +var b = tag(__makeTemplateObject(["123 ", ""], ["123 ", ""]), 100); +var x = tag(__makeTemplateObject([undefined, undefined, " wonderful ", undefined], ["\\u{hello} ", " \\xtraordinary ", " wonderful ", " \\uworld"]), 100, 200, 300); +var y = "hello} " + 100 + " traordinary " + 200 + " wonderful " + 300 + " world"; // should error with NoSubstitutionTemplate +var z = tag(__makeTemplateObject([undefined], ["\\u{hello} \\xtraordinary wonderful \\uworld"])); // should work with Tagged NoSubstitutionTemplate +var a1 = tag(__makeTemplateObject(["", "\0"], ["", "\\0"]), 100); // \0 +var a2 = tag(__makeTemplateObject(["", undefined], ["", "\\00"]), 100); // \\00 +var a3 = tag(__makeTemplateObject(["", undefined], ["", "\\u"]), 100); // \\u +var a4 = tag(__makeTemplateObject(["", undefined], ["", "\\u0"]), 100); // \\u0 +var a5 = tag(__makeTemplateObject(["", undefined], ["", "\\u00"]), 100); // \\u00 +var a6 = tag(__makeTemplateObject(["", undefined], ["", "\\u000"]), 100); // \\u000 +var a7 = tag(__makeTemplateObject(["", "\0"], ["", "\\u0000"]), 100); // \u0000 +var a8 = tag(__makeTemplateObject(["", undefined], ["", "\\u{"]), 100); // \\u{ +var a9 = tag(__makeTemplateObject(["", "\uDBFF\uDFFF"], ["", "\\u{10FFFF}"]), 100); // \\u{10FFFF +var a10 = tag(__makeTemplateObject(["", undefined], ["", "\\u{1f622"]), 100); // \\u{1f622 +var a11 = tag(__makeTemplateObject(["", "\uD83D\uDE22"], ["", "\\u{1f622}"]), 100); // \u{1f622} +var a12 = tag(__makeTemplateObject(["", undefined], ["", "\\x"]), 100); // \\x +var a13 = tag(__makeTemplateObject(["", undefined], ["", "\\x0"]), 100); // \\x0 +var a14 = tag(__makeTemplateObject(["", "\0"], ["", "\\x00"]), 100); // \x00 diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).symbols b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).symbols new file mode 100644 index 0000000000000..1f9954dcec177 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).symbols @@ -0,0 +1,85 @@ +=== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts === +function tag (str: any, ...args: any[]): any { +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) +>str : Symbol(str, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 14)) +>args : Symbol(args, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 23)) + + return str +>str : Symbol(str, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 14)) +} + +const a = tag`123` +>a : Symbol(a, Decl(invalidTaggedTemplateEscapeSequences.ts, 4, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const b = tag`123 ${100}` +>b : Symbol(b, Decl(invalidTaggedTemplateEscapeSequences.ts, 5, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +>x : Symbol(x, Decl(invalidTaggedTemplateEscapeSequences.ts, 6, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +>y : Symbol(y, Decl(invalidTaggedTemplateEscapeSequences.ts, 7, 5)) + +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate +>z : Symbol(z, Decl(invalidTaggedTemplateEscapeSequences.ts, 8, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a1 = tag`${ 100 }\0` // \0 +>a1 : Symbol(a1, Decl(invalidTaggedTemplateEscapeSequences.ts, 10, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a2 = tag`${ 100 }\00` // \\00 +>a2 : Symbol(a2, Decl(invalidTaggedTemplateEscapeSequences.ts, 11, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a3 = tag`${ 100 }\u` // \\u +>a3 : Symbol(a3, Decl(invalidTaggedTemplateEscapeSequences.ts, 12, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a4 = tag`${ 100 }\u0` // \\u0 +>a4 : Symbol(a4, Decl(invalidTaggedTemplateEscapeSequences.ts, 13, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a5 = tag`${ 100 }\u00` // \\u00 +>a5 : Symbol(a5, Decl(invalidTaggedTemplateEscapeSequences.ts, 14, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a6 = tag`${ 100 }\u000` // \\u000 +>a6 : Symbol(a6, Decl(invalidTaggedTemplateEscapeSequences.ts, 15, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a7 = tag`${ 100 }\u0000` // \u0000 +>a7 : Symbol(a7, Decl(invalidTaggedTemplateEscapeSequences.ts, 16, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a8 = tag`${ 100 }\u{` // \\u{ +>a8 : Symbol(a8, Decl(invalidTaggedTemplateEscapeSequences.ts, 17, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +>a9 : Symbol(a9, Decl(invalidTaggedTemplateEscapeSequences.ts, 18, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +>a10 : Symbol(a10, Decl(invalidTaggedTemplateEscapeSequences.ts, 19, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +>a11 : Symbol(a11, Decl(invalidTaggedTemplateEscapeSequences.ts, 20, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a12 = tag`${ 100 }\x` // \\x +>a12 : Symbol(a12, Decl(invalidTaggedTemplateEscapeSequences.ts, 21, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a13 = tag`${ 100 }\x0` // \\x0 +>a13 : Symbol(a13, Decl(invalidTaggedTemplateEscapeSequences.ts, 22, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a14 = tag`${ 100 }\x00` // \x00 +>a14 : Symbol(a14, Decl(invalidTaggedTemplateEscapeSequences.ts, 23, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).types b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).types new file mode 100644 index 0000000000000..08b1ed6844442 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).types @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts === +function tag (str: any, ...args: any[]): any { +>tag : (str: any, ...args: any[]) => any +>str : any +>args : any[] + + return str +>str : any +} + +const a = tag`123` +>a : any +>tag`123` : any +>tag : (str: any, ...args: any[]) => any +>`123` : "123" + +const b = tag`123 ${100}` +>b : any +>tag`123 ${100}` : any +>tag : (str: any, ...args: any[]) => any +>`123 ${100}` : string +>100 : 100 + +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +>x : any +>tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : any +>tag : (str: any, ...args: any[]) => any +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string +>100 : 100 +>200 : 200 +>300 : 300 + +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +>y : string +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string +>100 : 100 +>200 : 200 +>300 : 300 + +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate +>z : any +>tag`\u{hello} \xtraordinary wonderful \uworld` : any +>tag : (str: any, ...args: any[]) => any +>`\u{hello} \xtraordinary wonderful \uworld` : "\\u{hello} \\xtraordinary wonderful \\uworld" + +const a1 = tag`${ 100 }\0` // \0 +>a1 : any +>tag`${ 100 }\0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\0` : string +>100 : 100 + +const a2 = tag`${ 100 }\00` // \\00 +>a2 : any +>tag`${ 100 }\00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\00` : string +>100 : 100 + +const a3 = tag`${ 100 }\u` // \\u +>a3 : any +>tag`${ 100 }\u` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u` : string +>100 : 100 + +const a4 = tag`${ 100 }\u0` // \\u0 +>a4 : any +>tag`${ 100 }\u0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u0` : string +>100 : 100 + +const a5 = tag`${ 100 }\u00` // \\u00 +>a5 : any +>tag`${ 100 }\u00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u00` : string +>100 : 100 + +const a6 = tag`${ 100 }\u000` // \\u000 +>a6 : any +>tag`${ 100 }\u000` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u000` : string +>100 : 100 + +const a7 = tag`${ 100 }\u0000` // \u0000 +>a7 : any +>tag`${ 100 }\u0000` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u0000` : string +>100 : 100 + +const a8 = tag`${ 100 }\u{` // \\u{ +>a8 : any +>tag`${ 100 }\u{` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{` : string +>100 : 100 + +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +>a9 : any +>tag`${ 100 }\u{10FFFF}` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{10FFFF}` : string +>100 : 100 + +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +>a10 : any +>tag`${ 100 }\u{1f622` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{1f622` : string +>100 : 100 + +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +>a11 : any +>tag`${ 100 }\u{1f622}` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{1f622}` : string +>100 : 100 + +const a12 = tag`${ 100 }\x` // \\x +>a12 : any +>tag`${ 100 }\x` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x` : string +>100 : 100 + +const a13 = tag`${ 100 }\x0` // \\x0 +>a13 : any +>tag`${ 100 }\x0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x0` : string +>100 : 100 + +const a14 = tag`${ 100 }\x00` // \x00 +>a14 : any +>tag`${ 100 }\x00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x00` : string +>100 : 100 + diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).errors.txt b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).errors.txt new file mode 100644 index 0000000000000..c8846ae349714 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).errors.txt @@ -0,0 +1,49 @@ +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(7,18): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,18): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,27): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,51): error TS1125: Hexadecimal digit expected. + + +==== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts (7 errors) ==== + function tag (str: any, ...args: any[]): any { + return str + } + + const a = tag`123` + const b = tag`123 ${100}` + const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; + +!!! error TS1125: Hexadecimal digit expected. + const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + + const a1 = tag`${ 100 }\0` // \0 + const a2 = tag`${ 100 }\00` // \\00 + const a3 = tag`${ 100 }\u` // \\u + const a4 = tag`${ 100 }\u0` // \\u0 + const a5 = tag`${ 100 }\u00` // \\u00 + const a6 = tag`${ 100 }\u000` // \\u000 + const a7 = tag`${ 100 }\u0000` // \u0000 + const a8 = tag`${ 100 }\u{` // \\u{ + const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF + const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 + const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} + const a12 = tag`${ 100 }\x` // \\x + const a13 = tag`${ 100 }\x0` // \\x0 + const a14 = tag`${ 100 }\x00` // \x00 + \ No newline at end of file diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).js b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).js new file mode 100644 index 0000000000000..97864caea188c --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).js @@ -0,0 +1,50 @@ +//// [invalidTaggedTemplateEscapeSequences.ts] +function tag (str: any, ...args: any[]): any { + return str +} + +const a = tag`123` +const b = tag`123 ${100}` +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +const a1 = tag`${ 100 }\0` // \0 +const a2 = tag`${ 100 }\00` // \\00 +const a3 = tag`${ 100 }\u` // \\u +const a4 = tag`${ 100 }\u0` // \\u0 +const a5 = tag`${ 100 }\u00` // \\u00 +const a6 = tag`${ 100 }\u000` // \\u000 +const a7 = tag`${ 100 }\u0000` // \u0000 +const a8 = tag`${ 100 }\u{` // \\u{ +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +const a12 = tag`${ 100 }\x` // \\x +const a13 = tag`${ 100 }\x0` // \\x0 +const a14 = tag`${ 100 }\x00` // \x00 + + +//// [invalidTaggedTemplateEscapeSequences.js] +function tag(str, ...args) { + return str; +} +const a = tag `123`; +const b = tag `123 ${100}`; +const x = tag `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; +const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; // should error with NoSubstitutionTemplate +const z = tag `\u{hello} \xtraordinary wonderful \uworld`; // should work with Tagged NoSubstitutionTemplate +const a1 = tag `${100}\0`; // \0 +const a2 = tag `${100}\00`; // \\00 +const a3 = tag `${100}\u`; // \\u +const a4 = tag `${100}\u0`; // \\u0 +const a5 = tag `${100}\u00`; // \\u00 +const a6 = tag `${100}\u000`; // \\u000 +const a7 = tag `${100}\u0000`; // \u0000 +const a8 = tag `${100}\u{`; // \\u{ +const a9 = tag `${100}\u{10FFFF}`; // \\u{10FFFF +const a10 = tag `${100}\u{1f622`; // \\u{1f622 +const a11 = tag `${100}\u{1f622}`; // \u{1f622} +const a12 = tag `${100}\x`; // \\x +const a13 = tag `${100}\x0`; // \\x0 +const a14 = tag `${100}\x00`; // \x00 diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).symbols b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).symbols new file mode 100644 index 0000000000000..1f9954dcec177 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).symbols @@ -0,0 +1,85 @@ +=== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts === +function tag (str: any, ...args: any[]): any { +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) +>str : Symbol(str, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 14)) +>args : Symbol(args, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 23)) + + return str +>str : Symbol(str, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 14)) +} + +const a = tag`123` +>a : Symbol(a, Decl(invalidTaggedTemplateEscapeSequences.ts, 4, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const b = tag`123 ${100}` +>b : Symbol(b, Decl(invalidTaggedTemplateEscapeSequences.ts, 5, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +>x : Symbol(x, Decl(invalidTaggedTemplateEscapeSequences.ts, 6, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +>y : Symbol(y, Decl(invalidTaggedTemplateEscapeSequences.ts, 7, 5)) + +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate +>z : Symbol(z, Decl(invalidTaggedTemplateEscapeSequences.ts, 8, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a1 = tag`${ 100 }\0` // \0 +>a1 : Symbol(a1, Decl(invalidTaggedTemplateEscapeSequences.ts, 10, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a2 = tag`${ 100 }\00` // \\00 +>a2 : Symbol(a2, Decl(invalidTaggedTemplateEscapeSequences.ts, 11, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a3 = tag`${ 100 }\u` // \\u +>a3 : Symbol(a3, Decl(invalidTaggedTemplateEscapeSequences.ts, 12, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a4 = tag`${ 100 }\u0` // \\u0 +>a4 : Symbol(a4, Decl(invalidTaggedTemplateEscapeSequences.ts, 13, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a5 = tag`${ 100 }\u00` // \\u00 +>a5 : Symbol(a5, Decl(invalidTaggedTemplateEscapeSequences.ts, 14, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a6 = tag`${ 100 }\u000` // \\u000 +>a6 : Symbol(a6, Decl(invalidTaggedTemplateEscapeSequences.ts, 15, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a7 = tag`${ 100 }\u0000` // \u0000 +>a7 : Symbol(a7, Decl(invalidTaggedTemplateEscapeSequences.ts, 16, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a8 = tag`${ 100 }\u{` // \\u{ +>a8 : Symbol(a8, Decl(invalidTaggedTemplateEscapeSequences.ts, 17, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +>a9 : Symbol(a9, Decl(invalidTaggedTemplateEscapeSequences.ts, 18, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +>a10 : Symbol(a10, Decl(invalidTaggedTemplateEscapeSequences.ts, 19, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +>a11 : Symbol(a11, Decl(invalidTaggedTemplateEscapeSequences.ts, 20, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a12 = tag`${ 100 }\x` // \\x +>a12 : Symbol(a12, Decl(invalidTaggedTemplateEscapeSequences.ts, 21, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a13 = tag`${ 100 }\x0` // \\x0 +>a13 : Symbol(a13, Decl(invalidTaggedTemplateEscapeSequences.ts, 22, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a14 = tag`${ 100 }\x00` // \x00 +>a14 : Symbol(a14, Decl(invalidTaggedTemplateEscapeSequences.ts, 23, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).types b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).types new file mode 100644 index 0000000000000..08b1ed6844442 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=esnext).types @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts === +function tag (str: any, ...args: any[]): any { +>tag : (str: any, ...args: any[]) => any +>str : any +>args : any[] + + return str +>str : any +} + +const a = tag`123` +>a : any +>tag`123` : any +>tag : (str: any, ...args: any[]) => any +>`123` : "123" + +const b = tag`123 ${100}` +>b : any +>tag`123 ${100}` : any +>tag : (str: any, ...args: any[]) => any +>`123 ${100}` : string +>100 : 100 + +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +>x : any +>tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : any +>tag : (str: any, ...args: any[]) => any +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string +>100 : 100 +>200 : 200 +>300 : 300 + +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +>y : string +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string +>100 : 100 +>200 : 200 +>300 : 300 + +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate +>z : any +>tag`\u{hello} \xtraordinary wonderful \uworld` : any +>tag : (str: any, ...args: any[]) => any +>`\u{hello} \xtraordinary wonderful \uworld` : "\\u{hello} \\xtraordinary wonderful \\uworld" + +const a1 = tag`${ 100 }\0` // \0 +>a1 : any +>tag`${ 100 }\0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\0` : string +>100 : 100 + +const a2 = tag`${ 100 }\00` // \\00 +>a2 : any +>tag`${ 100 }\00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\00` : string +>100 : 100 + +const a3 = tag`${ 100 }\u` // \\u +>a3 : any +>tag`${ 100 }\u` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u` : string +>100 : 100 + +const a4 = tag`${ 100 }\u0` // \\u0 +>a4 : any +>tag`${ 100 }\u0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u0` : string +>100 : 100 + +const a5 = tag`${ 100 }\u00` // \\u00 +>a5 : any +>tag`${ 100 }\u00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u00` : string +>100 : 100 + +const a6 = tag`${ 100 }\u000` // \\u000 +>a6 : any +>tag`${ 100 }\u000` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u000` : string +>100 : 100 + +const a7 = tag`${ 100 }\u0000` // \u0000 +>a7 : any +>tag`${ 100 }\u0000` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u0000` : string +>100 : 100 + +const a8 = tag`${ 100 }\u{` // \\u{ +>a8 : any +>tag`${ 100 }\u{` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{` : string +>100 : 100 + +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +>a9 : any +>tag`${ 100 }\u{10FFFF}` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{10FFFF}` : string +>100 : 100 + +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +>a10 : any +>tag`${ 100 }\u{1f622` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{1f622` : string +>100 : 100 + +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +>a11 : any +>tag`${ 100 }\u{1f622}` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{1f622}` : string +>100 : 100 + +const a12 = tag`${ 100 }\x` // \\x +>a12 : any +>tag`${ 100 }\x` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x` : string +>100 : 100 + +const a13 = tag`${ 100 }\x0` // \\x0 +>a13 : any +>tag`${ 100 }\x0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x0` : string +>100 : 100 + +const a14 = tag`${ 100 }\x00` // \x00 +>a14 : any +>tag`${ 100 }\x00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x00` : string +>100 : 100 + diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.errors.txt b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.errors.txt new file mode 100644 index 0000000000000..c8846ae349714 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.errors.txt @@ -0,0 +1,49 @@ +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(7,18): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,18): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,27): error TS1125: Hexadecimal digit expected. +tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,51): error TS1125: Hexadecimal digit expected. + + +==== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts (7 errors) ==== + function tag (str: any, ...args: any[]): any { + return str + } + + const a = tag`123` + const b = tag`123 ${100}` + const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; + +!!! error TS1125: Hexadecimal digit expected. + const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + + const a1 = tag`${ 100 }\0` // \0 + const a2 = tag`${ 100 }\00` // \\00 + const a3 = tag`${ 100 }\u` // \\u + const a4 = tag`${ 100 }\u0` // \\u0 + const a5 = tag`${ 100 }\u00` // \\u00 + const a6 = tag`${ 100 }\u000` // \\u000 + const a7 = tag`${ 100 }\u0000` // \u0000 + const a8 = tag`${ 100 }\u{` // \\u{ + const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF + const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 + const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} + const a12 = tag`${ 100 }\x` // \\x + const a13 = tag`${ 100 }\x0` // \\x0 + const a14 = tag`${ 100 }\x00` // \x00 + \ No newline at end of file diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.js b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.js new file mode 100644 index 0000000000000..362e2cf175cfc --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.js @@ -0,0 +1,58 @@ +//// [invalidTaggedTemplateEscapeSequences.ts] +function tag (str: any, ...args: any[]): any { + return str +} + +const a = tag`123` +const b = tag`123 ${100}` +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +const a1 = tag`${ 100 }\0` // \0 +const a2 = tag`${ 100 }\00` // \\00 +const a3 = tag`${ 100 }\u` // \\u +const a4 = tag`${ 100 }\u0` // \\u0 +const a5 = tag`${ 100 }\u00` // \\u00 +const a6 = tag`${ 100 }\u000` // \\u000 +const a7 = tag`${ 100 }\u0000` // \u0000 +const a8 = tag`${ 100 }\u{` // \\u{ +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +const a12 = tag`${ 100 }\x` // \\x +const a13 = tag`${ 100 }\x0` // \\x0 +const a14 = tag`${ 100 }\x00` // \x00 + + +//// [invalidTaggedTemplateEscapeSequences.js] +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +function tag(str) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + return str; +} +var a = tag(__makeTemplateObject(["123"], ["123"])); +var b = tag(__makeTemplateObject(["123 ", ""], ["123 ", ""]), 100); +var x = tag(__makeTemplateObject([undefined, undefined, " wonderful ", undefined], ["\\u{hello} ", " \\xtraordinary ", " wonderful ", " \\uworld"]), 100, 200, 300); +var y = "hello} " + 100 + " traordinary " + 200 + " wonderful " + 300 + " world"; // should error with NoSubstitutionTemplate +var z = tag(__makeTemplateObject([undefined], ["\\u{hello} \\xtraordinary wonderful \\uworld"])); // should work with Tagged NoSubstitutionTemplate +var a1 = tag(__makeTemplateObject(["", "\0"], ["", "\\0"]), 100); // \0 +var a2 = tag(__makeTemplateObject(["", undefined], ["", "\\00"]), 100); // \\00 +var a3 = tag(__makeTemplateObject(["", undefined], ["", "\\u"]), 100); // \\u +var a4 = tag(__makeTemplateObject(["", undefined], ["", "\\u0"]), 100); // \\u0 +var a5 = tag(__makeTemplateObject(["", undefined], ["", "\\u00"]), 100); // \\u00 +var a6 = tag(__makeTemplateObject(["", undefined], ["", "\\u000"]), 100); // \\u000 +var a7 = tag(__makeTemplateObject(["", "\0"], ["", "\\u0000"]), 100); // \u0000 +var a8 = tag(__makeTemplateObject(["", undefined], ["", "\\u{"]), 100); // \\u{ +var a9 = tag(__makeTemplateObject(["", "\uDBFF\uDFFF"], ["", "\\u{10FFFF}"]), 100); // \\u{10FFFF +var a10 = tag(__makeTemplateObject(["", undefined], ["", "\\u{1f622"]), 100); // \\u{1f622 +var a11 = tag(__makeTemplateObject(["", "\uD83D\uDE22"], ["", "\\u{1f622}"]), 100); // \u{1f622} +var a12 = tag(__makeTemplateObject(["", undefined], ["", "\\x"]), 100); // \\x +var a13 = tag(__makeTemplateObject(["", undefined], ["", "\\x0"]), 100); // \\x0 +var a14 = tag(__makeTemplateObject(["", "\0"], ["", "\\x00"]), 100); // \x00 diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.symbols b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.symbols new file mode 100644 index 0000000000000..1f9954dcec177 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.symbols @@ -0,0 +1,85 @@ +=== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts === +function tag (str: any, ...args: any[]): any { +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) +>str : Symbol(str, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 14)) +>args : Symbol(args, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 23)) + + return str +>str : Symbol(str, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 14)) +} + +const a = tag`123` +>a : Symbol(a, Decl(invalidTaggedTemplateEscapeSequences.ts, 4, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const b = tag`123 ${100}` +>b : Symbol(b, Decl(invalidTaggedTemplateEscapeSequences.ts, 5, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +>x : Symbol(x, Decl(invalidTaggedTemplateEscapeSequences.ts, 6, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +>y : Symbol(y, Decl(invalidTaggedTemplateEscapeSequences.ts, 7, 5)) + +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate +>z : Symbol(z, Decl(invalidTaggedTemplateEscapeSequences.ts, 8, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a1 = tag`${ 100 }\0` // \0 +>a1 : Symbol(a1, Decl(invalidTaggedTemplateEscapeSequences.ts, 10, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a2 = tag`${ 100 }\00` // \\00 +>a2 : Symbol(a2, Decl(invalidTaggedTemplateEscapeSequences.ts, 11, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a3 = tag`${ 100 }\u` // \\u +>a3 : Symbol(a3, Decl(invalidTaggedTemplateEscapeSequences.ts, 12, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a4 = tag`${ 100 }\u0` // \\u0 +>a4 : Symbol(a4, Decl(invalidTaggedTemplateEscapeSequences.ts, 13, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a5 = tag`${ 100 }\u00` // \\u00 +>a5 : Symbol(a5, Decl(invalidTaggedTemplateEscapeSequences.ts, 14, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a6 = tag`${ 100 }\u000` // \\u000 +>a6 : Symbol(a6, Decl(invalidTaggedTemplateEscapeSequences.ts, 15, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a7 = tag`${ 100 }\u0000` // \u0000 +>a7 : Symbol(a7, Decl(invalidTaggedTemplateEscapeSequences.ts, 16, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a8 = tag`${ 100 }\u{` // \\u{ +>a8 : Symbol(a8, Decl(invalidTaggedTemplateEscapeSequences.ts, 17, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +>a9 : Symbol(a9, Decl(invalidTaggedTemplateEscapeSequences.ts, 18, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +>a10 : Symbol(a10, Decl(invalidTaggedTemplateEscapeSequences.ts, 19, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +>a11 : Symbol(a11, Decl(invalidTaggedTemplateEscapeSequences.ts, 20, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a12 = tag`${ 100 }\x` // \\x +>a12 : Symbol(a12, Decl(invalidTaggedTemplateEscapeSequences.ts, 21, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a13 = tag`${ 100 }\x0` // \\x0 +>a13 : Symbol(a13, Decl(invalidTaggedTemplateEscapeSequences.ts, 22, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + +const a14 = tag`${ 100 }\x00` // \x00 +>a14 : Symbol(a14, Decl(invalidTaggedTemplateEscapeSequences.ts, 23, 5)) +>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0)) + diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.types b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.types new file mode 100644 index 0000000000000..08b1ed6844442 --- /dev/null +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences.types @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts === +function tag (str: any, ...args: any[]): any { +>tag : (str: any, ...args: any[]) => any +>str : any +>args : any[] + + return str +>str : any +} + +const a = tag`123` +>a : any +>tag`123` : any +>tag : (str: any, ...args: any[]) => any +>`123` : "123" + +const b = tag`123 ${100}` +>b : any +>tag`123 ${100}` : any +>tag : (str: any, ...args: any[]) => any +>`123 ${100}` : string +>100 : 100 + +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +>x : any +>tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : any +>tag : (str: any, ...args: any[]) => any +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string +>100 : 100 +>200 : 200 +>300 : 300 + +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +>y : string +>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string +>100 : 100 +>200 : 200 +>300 : 300 + +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate +>z : any +>tag`\u{hello} \xtraordinary wonderful \uworld` : any +>tag : (str: any, ...args: any[]) => any +>`\u{hello} \xtraordinary wonderful \uworld` : "\\u{hello} \\xtraordinary wonderful \\uworld" + +const a1 = tag`${ 100 }\0` // \0 +>a1 : any +>tag`${ 100 }\0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\0` : string +>100 : 100 + +const a2 = tag`${ 100 }\00` // \\00 +>a2 : any +>tag`${ 100 }\00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\00` : string +>100 : 100 + +const a3 = tag`${ 100 }\u` // \\u +>a3 : any +>tag`${ 100 }\u` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u` : string +>100 : 100 + +const a4 = tag`${ 100 }\u0` // \\u0 +>a4 : any +>tag`${ 100 }\u0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u0` : string +>100 : 100 + +const a5 = tag`${ 100 }\u00` // \\u00 +>a5 : any +>tag`${ 100 }\u00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u00` : string +>100 : 100 + +const a6 = tag`${ 100 }\u000` // \\u000 +>a6 : any +>tag`${ 100 }\u000` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u000` : string +>100 : 100 + +const a7 = tag`${ 100 }\u0000` // \u0000 +>a7 : any +>tag`${ 100 }\u0000` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u0000` : string +>100 : 100 + +const a8 = tag`${ 100 }\u{` // \\u{ +>a8 : any +>tag`${ 100 }\u{` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{` : string +>100 : 100 + +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +>a9 : any +>tag`${ 100 }\u{10FFFF}` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{10FFFF}` : string +>100 : 100 + +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +>a10 : any +>tag`${ 100 }\u{1f622` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{1f622` : string +>100 : 100 + +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +>a11 : any +>tag`${ 100 }\u{1f622}` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\u{1f622}` : string +>100 : 100 + +const a12 = tag`${ 100 }\x` // \\x +>a12 : any +>tag`${ 100 }\x` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x` : string +>100 : 100 + +const a13 = tag`${ 100 }\x0` // \\x0 +>a13 : any +>tag`${ 100 }\x0` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x0` : string +>100 : 100 + +const a14 = tag`${ 100 }\x00` // \x00 +>a14 : any +>tag`${ 100 }\x00` : any +>tag : (str: any, ...args: any[]) => any +>`${ 100 }\x00` : string +>100 : 100 + diff --git a/tests/baselines/reference/invariantGenericErrorElaboration.types b/tests/baselines/reference/invariantGenericErrorElaboration.types index 7c4bdd46d037f..e13a70f81e0ed 100644 --- a/tests/baselines/reference/invariantGenericErrorElaboration.types +++ b/tests/baselines/reference/invariantGenericErrorElaboration.types @@ -6,8 +6,8 @@ const wat: Runtype = Num; >Num : Num const Foo = Obj({ foo: Num }) ->Foo : any ->Obj({ foo: Num }) : any +>Foo : Obj<{ [_: string]: Runtype; }> +>Obj({ foo: Num }) : Obj<{ [_: string]: Runtype; }> >Obj : ; }>(fields: O) => Obj >{ foo: Num } : { foo: Num; } >foo : Num diff --git a/tests/baselines/reference/isDeclarationVisibleNodeKinds.js b/tests/baselines/reference/isDeclarationVisibleNodeKinds.js index 40f5e59083c0c..170ff405bd8af 100644 --- a/tests/baselines/reference/isDeclarationVisibleNodeKinds.js +++ b/tests/baselines/reference/isDeclarationVisibleNodeKinds.js @@ -134,13 +134,13 @@ var schema; get: function () { return undefined; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(T.prototype, "createValidator10", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return T; diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index 1122fc12d0637..e5eff5fc85aa0 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -41,5 +41,5 @@ var C = /** @class */ (function (_super) { var x = new module_1.c(); var y = ns.value; var module_3 = require("module"); -exports.c1 = module_3.c1; +Object.defineProperty(exports, "c1", { enumerable: true, get: function () { return module_3.c1; } }); exports.z = x; diff --git a/tests/baselines/reference/isolatedModulesReExportType.js b/tests/baselines/reference/isolatedModulesReExportType.js index f057395fc3039..f30c5f2a023eb 100644 --- a/tests/baselines/reference/isolatedModulesReExportType.js +++ b/tests/baselines/reference/isolatedModulesReExportType.js @@ -58,10 +58,17 @@ var C = /** @class */ (function () { exports.C = C; //// [user.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; // OK, has a value side var exportValue_1 = require("./exportValue"); -exports.C = exportValue_1.C; +__createBinding(exports, exportValue_1, "C"); // OK, even though the namespace it exports is only types. var NS = require("./exportT"); exports.NS = NS; diff --git a/tests/baselines/reference/isolatedModulesSpecifiedModule.js b/tests/baselines/reference/isolatedModulesSpecifiedModule.js index 895c47e250490..540dd535b773b 100644 --- a/tests/baselines/reference/isolatedModulesSpecifiedModule.js +++ b/tests/baselines/reference/isolatedModulesSpecifiedModule.js @@ -4,3 +4,4 @@ export var x; //// [file1.js] "use strict"; exports.__esModule = true; +exports.x = void 0; diff --git a/tests/baselines/reference/isolatedModulesUnspecifiedModule.js b/tests/baselines/reference/isolatedModulesUnspecifiedModule.js index 895c47e250490..540dd535b773b 100644 --- a/tests/baselines/reference/isolatedModulesUnspecifiedModule.js +++ b/tests/baselines/reference/isolatedModulesUnspecifiedModule.js @@ -4,3 +4,4 @@ export var x; //// [file1.js] "use strict"; exports.__esModule = true; +exports.x = void 0; diff --git a/tests/baselines/reference/iterableArrayPattern28.types b/tests/baselines/reference/iterableArrayPattern28.types index 97b1f809b01e4..063bf10e0db6c 100644 --- a/tests/baselines/reference/iterableArrayPattern28.types +++ b/tests/baselines/reference/iterableArrayPattern28.types @@ -9,14 +9,14 @@ function takeFirstTwoEntries(...[[k1, v1], [k2, v2]]: [string, number][]) { } takeFirstTwoEntries(...new Map([["", 0], ["hello", true]])); >takeFirstTwoEntries(...new Map([["", 0], ["hello", true]])) : void >takeFirstTwoEntries : (...[[k1, v1], [k2, v2]]: [string, number][]) => void ->...new Map([["", 0], ["hello", true]]) : any ->new Map([["", 0], ["hello", true]]) : any +>...new Map([["", 0], ["hello", true]]) : [string, number] +>new Map([["", 0], ["hello", true]]) : Map >Map : MapConstructor ->[["", 0], ["hello", true]] : ((string | number)[] | (string | boolean)[])[] ->["", 0] : (string | number)[] +>[["", 0], ["hello", true]] : ([string, number] | [string, boolean])[] +>["", 0] : [string, number] >"" : "" >0 : 0 ->["hello", true] : (string | boolean)[] +>["hello", true] : [string, boolean] >"hello" : "hello" >true : true diff --git a/tests/baselines/reference/iteratorSpreadInArray6.types b/tests/baselines/reference/iteratorSpreadInArray6.types index b964fdbca1304..60d3401b1a781 100644 --- a/tests/baselines/reference/iteratorSpreadInArray6.types +++ b/tests/baselines/reference/iteratorSpreadInArray6.types @@ -38,7 +38,7 @@ var array: number[] = [0, 1]; >1 : 1 array.concat([...new SymbolIterator]); ->array.concat([...new SymbolIterator]) : any +>array.concat([...new SymbolIterator]) : number[] >array.concat : { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; } >array : number[] >concat : { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; } diff --git a/tests/baselines/reference/iteratorSpreadInCall10.types b/tests/baselines/reference/iteratorSpreadInCall10.types index 9ff1f78dccfff..4e50ac9382182 100644 --- a/tests/baselines/reference/iteratorSpreadInCall10.types +++ b/tests/baselines/reference/iteratorSpreadInCall10.types @@ -39,7 +39,7 @@ class SymbolIterator { } foo(...new SymbolIterator); ->foo(...new SymbolIterator) : any +>foo(...new SymbolIterator) : unknown >foo : (s: T[]) => T >...new SymbolIterator : symbol >new SymbolIterator : SymbolIterator diff --git a/tests/baselines/reference/iteratorSpreadInCall7.types b/tests/baselines/reference/iteratorSpreadInCall7.types index d8f820ca804ad..a2b33c87d3d3a 100644 --- a/tests/baselines/reference/iteratorSpreadInCall7.types +++ b/tests/baselines/reference/iteratorSpreadInCall7.types @@ -70,7 +70,7 @@ class _StringIterator { } foo(...new SymbolIterator, ...new _StringIterator); ->foo(...new SymbolIterator, ...new _StringIterator) : any +>foo(...new SymbolIterator, ...new _StringIterator) : symbol >foo : (...s: T[]) => T >...new SymbolIterator : symbol >new SymbolIterator : SymbolIterator diff --git a/tests/baselines/reference/iteratorSpreadInCall8.types b/tests/baselines/reference/iteratorSpreadInCall8.types index c124a5e8dd7d8..dc8dabdc59ea6 100644 --- a/tests/baselines/reference/iteratorSpreadInCall8.types +++ b/tests/baselines/reference/iteratorSpreadInCall8.types @@ -70,7 +70,7 @@ class _StringIterator { } new Foo(...new SymbolIterator, ...new _StringIterator); ->new Foo(...new SymbolIterator, ...new _StringIterator) : any +>new Foo(...new SymbolIterator, ...new _StringIterator) : Foo >Foo : typeof Foo >...new SymbolIterator : symbol >new SymbolIterator : SymbolIterator diff --git a/tests/baselines/reference/iteratorSpreadInCall9.types b/tests/baselines/reference/iteratorSpreadInCall9.types index 2cc33ea3fddb5..ffb97ce731bb2 100644 --- a/tests/baselines/reference/iteratorSpreadInCall9.types +++ b/tests/baselines/reference/iteratorSpreadInCall9.types @@ -70,7 +70,7 @@ class _StringIterator { } new Foo(...new SymbolIterator, ...[...new _StringIterator]); ->new Foo(...new SymbolIterator, ...[...new _StringIterator]) : any +>new Foo(...new SymbolIterator, ...[...new _StringIterator]) : Foo >Foo : typeof Foo >...new SymbolIterator : symbol >new SymbolIterator : SymbolIterator diff --git a/tests/baselines/reference/jsDeclarationsClasses.js b/tests/baselines/reference/jsDeclarationsClasses.js index 7cf3145119595..13fc5d0f96779 100644 --- a/tests/baselines/reference/jsDeclarationsClasses.js +++ b/tests/baselines/reference/jsDeclarationsClasses.js @@ -264,7 +264,7 @@ var E = /** @class */ (function () { * @param {U} _p */ set: function (_p) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(E.prototype, "f2", { @@ -272,7 +272,7 @@ var E = /** @class */ (function () { * @return {U} */ get: function () { return /** @type {*} */ (null); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(E.prototype, "f3", { @@ -280,7 +280,7 @@ var E = /** @class */ (function () { * @param {U} _p */ set: function (_p) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(E, "s1", { @@ -292,7 +292,7 @@ var E = /** @class */ (function () { * @param {string} _p */ set: function (_p) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(E, "s2", { @@ -300,7 +300,7 @@ var E = /** @class */ (function () { * @return {string} */ get: function () { return ""; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(E, "s3", { @@ -308,7 +308,7 @@ var E = /** @class */ (function () { * @param {string} _p */ set: function (_p) { }, - enumerable: true, + enumerable: false, configurable: true }); E.staticInitializedField = 12; diff --git a/tests/baselines/reference/jsDeclarationsExportForms.js b/tests/baselines/reference/jsDeclarationsExportForms.js index b94a07eb3fd06..00ece3a293682 100644 --- a/tests/baselines/reference/jsDeclarationsExportForms.js +++ b/tests/baselines/reference/jsDeclarationsExportForms.js @@ -74,24 +74,38 @@ function func() { } exports.func = func; //// [bar.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./cls")); +__exportStar(require("./cls"), exports); //// [bar2.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./func")); -__export(require("./cls")); +__exportStar(require("./func"), exports); +__exportStar(require("./cls"), exports); //// [baz.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var cls_1 = require("./cls"); -exports.Foo = cls_1.Foo; +Object.defineProperty(exports, "Foo", { enumerable: true, get: function () { return cls_1.Foo; } }); //// [bat.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/jsDeclarationsExportFormsErr.js b/tests/baselines/reference/jsDeclarationsExportFormsErr.js index 993be331cd520..50e0e5da7724e 100644 --- a/tests/baselines/reference/jsDeclarationsExportFormsErr.js +++ b/tests/baselines/reference/jsDeclarationsExportFormsErr.js @@ -41,11 +41,18 @@ var ns = require("./cls"); module.exports = ns; // We refuse to bind cjs module exports assignments in the same file we find an import in //// [globalNs.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./cls")); +__exportStar(require("./cls"), exports); //// [includeAll.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/jsDeclarationsExportSpecifierNonlocal.js b/tests/baselines/reference/jsDeclarationsExportSpecifierNonlocal.js index adf1984e5d46a..7657cc6a3e20b 100644 --- a/tests/baselines/reference/jsDeclarationsExportSpecifierNonlocal.js +++ b/tests/baselines/reference/jsDeclarationsExportSpecifierNonlocal.js @@ -26,8 +26,8 @@ exports.OtherThing = OtherThing; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var source_1 = require("./source"); -exports.Thing = source_1.Thing; -exports.default = source_1.OtherThing; +Object.defineProperty(exports, "Thing", { enumerable: true, get: function () { return source_1.Thing; } }); +Object.defineProperty(exports, "default", { enumerable: true, get: function () { return source_1.OtherThing; } }); //// [source.d.ts] diff --git a/tests/baselines/reference/jsDeclarationsMultipleExportFromMerge.js b/tests/baselines/reference/jsDeclarationsMultipleExportFromMerge.js index 75e7c37bd8db2..3404a8d3b3600 100644 --- a/tests/baselines/reference/jsDeclarationsMultipleExportFromMerge.js +++ b/tests/baselines/reference/jsDeclarationsMultipleExportFromMerge.js @@ -30,31 +30,31 @@ exports.c = 3; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var items_1 = require("./items"); -exports.a = items_1.a; -exports.b = items_1.b; -exports.c = items_1.c; +Object.defineProperty(exports, "a", { enumerable: true, get: function () { return items_1.a; } }); +Object.defineProperty(exports, "b", { enumerable: true, get: function () { return items_1.b; } }); +Object.defineProperty(exports, "c", { enumerable: true, get: function () { return items_1.c; } }); //// [two.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var items_1 = require("./items"); -exports.a = items_1.a; +Object.defineProperty(exports, "a", { enumerable: true, get: function () { return items_1.a; } }); var items_2 = require("./items"); -exports.b = items_2.b; -exports.c = items_2.c; +Object.defineProperty(exports, "b", { enumerable: true, get: function () { return items_2.b; } }); +Object.defineProperty(exports, "c", { enumerable: true, get: function () { return items_2.c; } }); //// [multiple.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var items_1 = require("./items"); -exports.a = items_1.a; -exports.b = items_1.b; +Object.defineProperty(exports, "a", { enumerable: true, get: function () { return items_1.a; } }); +Object.defineProperty(exports, "b", { enumerable: true, get: function () { return items_1.b; } }); var two_1 = require("./two"); -exports.aa = two_1.a; +Object.defineProperty(exports, "aa", { enumerable: true, get: function () { return two_1.a; } }); var two_2 = require("./two"); -exports.bb = two_2.b; +Object.defineProperty(exports, "bb", { enumerable: true, get: function () { return two_2.b; } }); var two_3 = require("./two"); -exports.c = two_3.c; +Object.defineProperty(exports, "c", { enumerable: true, get: function () { return two_3.c; } }); var items_2 = require("./items"); -exports.cc = items_2.c; +Object.defineProperty(exports, "cc", { enumerable: true, get: function () { return items_2.c; } }); //// [items.d.ts] diff --git a/tests/baselines/reference/jsDeclarationsReexportAliases.js b/tests/baselines/reference/jsDeclarationsReexportAliases.js index 1d117661c5d80..3f49ff2c523ef 100644 --- a/tests/baselines/reference/jsDeclarationsReexportAliases.js +++ b/tests/baselines/reference/jsDeclarationsReexportAliases.js @@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var cls_1 = require("./cls"); exports.x = new cls_1.default(); var cls_2 = require("./cls"); -exports.Foob = cls_2.default; +Object.defineProperty(exports, "Foob", { enumerable: true, get: function () { return cls_2.default; } }); //// [cls.d.ts] diff --git a/tests/baselines/reference/jsDeclarationsReexportAliasesEsModuleInterop.js b/tests/baselines/reference/jsDeclarationsReexportAliasesEsModuleInterop.js index d00269b2658ec..518861877c019 100644 --- a/tests/baselines/reference/jsDeclarationsReexportAliasesEsModuleInterop.js +++ b/tests/baselines/reference/jsDeclarationsReexportAliasesEsModuleInterop.js @@ -28,7 +28,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var cls_1 = __importDefault(require("./cls")); exports.x = new cls_1.default(); var cls_2 = require("./cls"); -exports.Foob = cls_2.default; +Object.defineProperty(exports, "Foob", { enumerable: true, get: function () { return cls_2.default; } }); //// [cls.d.ts] diff --git a/tests/baselines/reference/jsFileCompilationAwaitModifier.js b/tests/baselines/reference/jsFileCompilationAwaitModifier.js new file mode 100644 index 0000000000000..9cc51eb2bbb6b --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationAwaitModifier.js @@ -0,0 +1,84 @@ +//// [a.js] +class Foo { + async a() { + await Promise.resolve(1); + } + + b = async () => { + await Promise.resolve(1); + } +} + + +//// [a.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + 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) : adopt(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 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, 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 Foo = /** @class */ (function () { + function Foo() { + var _this = this; + this.b = function () { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, Promise.resolve(1)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); }; + } + Foo.prototype.a = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, Promise.resolve(1)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + return Foo; +}()); + + +//// [a.d.ts] +declare class Foo { + a(): Promise; + b: () => Promise; +} diff --git a/tests/baselines/reference/jsFileCompilationAwaitModifier.symbols b/tests/baselines/reference/jsFileCompilationAwaitModifier.symbols new file mode 100644 index 0000000000000..dc54056d75649 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationAwaitModifier.symbols @@ -0,0 +1,23 @@ +=== tests/cases/compiler/a.js === +class Foo { +>Foo : Symbol(Foo, Decl(a.js, 0, 0)) + + async a() { +>a : Symbol(Foo.a, Decl(a.js, 0, 11)) + + await Promise.resolve(1); +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + } + + b = async () => { +>b : Symbol(Foo.b, Decl(a.js, 3, 5)) + + await Promise.resolve(1); +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + } +} + diff --git a/tests/baselines/reference/jsFileCompilationAwaitModifier.types b/tests/baselines/reference/jsFileCompilationAwaitModifier.types new file mode 100644 index 0000000000000..b4fe2405adadf --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationAwaitModifier.types @@ -0,0 +1,30 @@ +=== tests/cases/compiler/a.js === +class Foo { +>Foo : Foo + + async a() { +>a : () => Promise + + await Promise.resolve(1); +>await Promise.resolve(1) : number +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + } + + b = async () => { +>b : () => Promise +>async () => { await Promise.resolve(1); } : () => Promise + + await Promise.resolve(1); +>await Promise.resolve(1) : number +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + } +} + diff --git a/tests/baselines/reference/jsdocDisallowedInTypescript.types b/tests/baselines/reference/jsdocDisallowedInTypescript.types index f16e3d3c9f19d..76e595d8127ba 100644 --- a/tests/baselines/reference/jsdocDisallowedInTypescript.types +++ b/tests/baselines/reference/jsdocDisallowedInTypescript.types @@ -35,7 +35,7 @@ function hof(ctor: function(new: number, string)) { >'hi' : "hi" } function hof2(f: function(this: number, string): string) { ->hof2 : (f: (this: number, arg1: string) => string) => any +>hof2 : (f: (this: number, arg1: string) => string) => string >f : (this: number, arg1: string) => string >this : number diff --git a/tests/baselines/reference/jsdocImplements_class.errors.txt b/tests/baselines/reference/jsdocImplements_class.errors.txt new file mode 100644 index 0000000000000..b69bf19975879 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_class.errors.txt @@ -0,0 +1,35 @@ +/a.js(13,5): error TS2416: Property 'method' in type 'B2' is not assignable to the same property in base type 'A'. + Type '() => string' is not assignable to type '() => number'. + Type 'string' is not assignable to type 'number'. +/a.js(17,7): error TS2720: Class 'B3' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? + Property 'method' is missing in type 'B3' but required in type 'A'. + + +==== /a.js (2 errors) ==== + class A { + /** @return {number} */ + method() { throw new Error(); } + } + /** @implements {A} */ + class B { + method() { return 0 } + } + + /** @implements A */ + class B2 { + /** @return {string} */ + method() { return "" } + ~~~~~~ +!!! error TS2416: Property 'method' in type 'B2' is not assignable to the same property in base type 'A'. +!!! error TS2416: Type '() => string' is not assignable to type '() => number'. +!!! error TS2416: Type 'string' is not assignable to type 'number'. + } + + /** @implements {A} */ + class B3 { + ~~ +!!! error TS2720: Class 'B3' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? +!!! error TS2720: Property 'method' is missing in type 'B3' but required in type 'A'. +!!! related TS2728 /a.js:3:5: 'method' is declared here. + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsdocImplements_class.js b/tests/baselines/reference/jsdocImplements_class.js new file mode 100644 index 0000000000000..9f24bbb7203a4 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_class.js @@ -0,0 +1,40 @@ +//// [a.js] +class A { + /** @return {number} */ + method() { throw new Error(); } +} +/** @implements {A} */ +class B { + method() { return 0 } +} + +/** @implements A */ +class B2 { + /** @return {string} */ + method() { return "" } +} + +/** @implements {A} */ +class B3 { +} + + + + +//// [a.d.ts] +declare class A { + /** @return {number} */ + method(): number; +} +/** @implements {A} */ +declare class B implements A { + method(): number; +} +/** @implements A */ +declare class B2 implements A { + /** @return {string} */ + method(): string; +} +/** @implements {A} */ +declare class B3 implements A { +} diff --git a/tests/baselines/reference/jsdocImplements_class.symbols b/tests/baselines/reference/jsdocImplements_class.symbols new file mode 100644 index 0000000000000..f7c45ed256795 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_class.symbols @@ -0,0 +1,31 @@ +=== /a.js === +class A { +>A : Symbol(A, Decl(a.js, 0, 0)) + + /** @return {number} */ + method() { throw new Error(); } +>method : Symbol(A.method, Decl(a.js, 0, 9)) +>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +} +/** @implements {A} */ +class B { +>B : Symbol(B, Decl(a.js, 3, 1)) + + method() { return 0 } +>method : Symbol(B.method, Decl(a.js, 5, 10)) +} + +/** @implements A */ +class B2 { +>B2 : Symbol(B2, Decl(a.js, 7, 1)) + + /** @return {string} */ + method() { return "" } +>method : Symbol(B2.method, Decl(a.js, 10, 11)) +} + +/** @implements {A} */ +class B3 { +>B3 : Symbol(B3, Decl(a.js, 13, 1)) +} + diff --git a/tests/baselines/reference/jsdocImplements_class.types b/tests/baselines/reference/jsdocImplements_class.types new file mode 100644 index 0000000000000..fda48e992b675 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_class.types @@ -0,0 +1,34 @@ +=== /a.js === +class A { +>A : A + + /** @return {number} */ + method() { throw new Error(); } +>method : () => number +>new Error() : Error +>Error : ErrorConstructor +} +/** @implements {A} */ +class B { +>B : B + + method() { return 0 } +>method : () => number +>0 : 0 +} + +/** @implements A */ +class B2 { +>B2 : B2 + + /** @return {string} */ + method() { return "" } +>method : () => string +>"" : "" +} + +/** @implements {A} */ +class B3 { +>B3 : B3 +} + diff --git a/tests/baselines/reference/jsdocImplements_interface.errors.txt b/tests/baselines/reference/jsdocImplements_interface.errors.txt new file mode 100644 index 0000000000000..ed5546636079b --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_interface.errors.txt @@ -0,0 +1,36 @@ +/a.js(9,5): error TS2416: Property 'mNumber' in type 'B2' is not assignable to the same property in base type 'A'. + Type '() => string' is not assignable to type '() => number'. + Type 'string' is not assignable to type 'number'. +/a.js(14,7): error TS2420: Class 'B3' incorrectly implements interface 'A'. + Property 'mNumber' is missing in type 'B3' but required in type 'A'. + + +==== /defs.d.ts (0 errors) ==== + interface A { + mNumber(): number; + } +==== /a.js (2 errors) ==== + /** @implements A */ + class B { + mNumber() { + return 0; + } + } + /** @implements {A} */ + class B2 { + mNumber() { + ~~~~~~~ +!!! error TS2416: Property 'mNumber' in type 'B2' is not assignable to the same property in base type 'A'. +!!! error TS2416: Type '() => string' is not assignable to type '() => number'. +!!! error TS2416: Type 'string' is not assignable to type 'number'. + return ""; + } + } + /** @implements A */ + class B3 { + ~~ +!!! error TS2420: Class 'B3' incorrectly implements interface 'A'. +!!! error TS2420: Property 'mNumber' is missing in type 'B3' but required in type 'A'. +!!! related TS2728 /defs.d.ts:2:5: 'mNumber' is declared here. + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsdocImplements_interface.js b/tests/baselines/reference/jsdocImplements_interface.js new file mode 100644 index 0000000000000..0588f3a2a983c --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_interface.js @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/jsdoc/jsdocImplements_interface.ts] //// + +//// [defs.d.ts] +interface A { + mNumber(): number; +} +//// [a.js] +/** @implements A */ +class B { + mNumber() { + return 0; + } +} +/** @implements {A} */ +class B2 { + mNumber() { + return ""; + } +} +/** @implements A */ +class B3 { +} + + + + +//// [a.d.ts] +/** @implements A */ +declare class B implements A { + mNumber(): number; +} +/** @implements {A} */ +declare class B2 implements A { + mNumber(): string; +} +/** @implements A */ +declare class B3 implements A { +} diff --git a/tests/baselines/reference/jsdocImplements_interface.symbols b/tests/baselines/reference/jsdocImplements_interface.symbols new file mode 100644 index 0000000000000..5117208a15923 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_interface.symbols @@ -0,0 +1,33 @@ +=== /defs.d.ts === +interface A { +>A : Symbol(A, Decl(defs.d.ts, 0, 0)) + + mNumber(): number; +>mNumber : Symbol(A.mNumber, Decl(defs.d.ts, 0, 13)) +} +=== /a.js === +/** @implements A */ +class B { +>B : Symbol(B, Decl(a.js, 0, 0)) + + mNumber() { +>mNumber : Symbol(B.mNumber, Decl(a.js, 1, 9)) + + return 0; + } +} +/** @implements {A} */ +class B2 { +>B2 : Symbol(B2, Decl(a.js, 5, 1)) + + mNumber() { +>mNumber : Symbol(B2.mNumber, Decl(a.js, 7, 10)) + + return ""; + } +} +/** @implements A */ +class B3 { +>B3 : Symbol(B3, Decl(a.js, 11, 1)) +} + diff --git a/tests/baselines/reference/jsdocImplements_interface.types b/tests/baselines/reference/jsdocImplements_interface.types new file mode 100644 index 0000000000000..b0a053c72b94a --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_interface.types @@ -0,0 +1,33 @@ +=== /defs.d.ts === +interface A { + mNumber(): number; +>mNumber : () => number +} +=== /a.js === +/** @implements A */ +class B { +>B : B + + mNumber() { +>mNumber : () => number + + return 0; +>0 : 0 + } +} +/** @implements {A} */ +class B2 { +>B2 : B2 + + mNumber() { +>mNumber : () => string + + return ""; +>"" : "" + } +} +/** @implements A */ +class B3 { +>B3 : B3 +} + diff --git a/tests/baselines/reference/jsdocImplements_interface_multiple.errors.txt b/tests/baselines/reference/jsdocImplements_interface_multiple.errors.txt new file mode 100644 index 0000000000000..334422ee60a45 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_interface_multiple.errors.txt @@ -0,0 +1,37 @@ +/a.js(17,7): error TS2420: Class 'BadSquare' incorrectly implements interface 'Drawable'. + Property 'draw' is missing in type 'BadSquare' but required in type 'Drawable'. + + +==== /defs.d.ts (0 errors) ==== + interface Drawable { + draw(): number; + } + interface Sizable { + size(): number; + } +==== /a.js (1 errors) ==== + /** + * @implements {Drawable} + * @implements Sizable + **/ + class Square { + draw() { + return 0; + } + size() { + return 0; + } + } + /** + * @implements Drawable + * @implements {Sizable} + **/ + class BadSquare { + ~~~~~~~~~ +!!! error TS2420: Class 'BadSquare' incorrectly implements interface 'Drawable'. +!!! error TS2420: Property 'draw' is missing in type 'BadSquare' but required in type 'Drawable'. +!!! related TS2728 /defs.d.ts:2:5: 'draw' is declared here. + size() { + return 0; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/jsdocImplements_interface_multiple.js b/tests/baselines/reference/jsdocImplements_interface_multiple.js new file mode 100644 index 0000000000000..4ea9497f2b9b8 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_interface_multiple.js @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/jsdoc/jsdocImplements_interface_multiple.ts] //// + +//// [defs.d.ts] +interface Drawable { + draw(): number; +} +interface Sizable { + size(): number; +} +//// [a.js] +/** + * @implements {Drawable} + * @implements Sizable + **/ +class Square { + draw() { + return 0; + } + size() { + return 0; + } +} +/** + * @implements Drawable + * @implements {Sizable} + **/ +class BadSquare { + size() { + return 0; + } +} + + + +//// [a.d.ts] +/** + * @implements {Drawable} + * @implements Sizable + **/ +declare class Square implements Drawable, Sizable { + draw(): number; + size(): number; +} +/** + * @implements Drawable + * @implements {Sizable} + **/ +declare class BadSquare implements Drawable, Sizable { + size(): number; +} diff --git a/tests/baselines/reference/jsdocImplements_interface_multiple.symbols b/tests/baselines/reference/jsdocImplements_interface_multiple.symbols new file mode 100644 index 0000000000000..1b881aeb0b374 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_interface_multiple.symbols @@ -0,0 +1,45 @@ +=== /defs.d.ts === +interface Drawable { +>Drawable : Symbol(Drawable, Decl(defs.d.ts, 0, 0)) + + draw(): number; +>draw : Symbol(Drawable.draw, Decl(defs.d.ts, 0, 20)) +} +interface Sizable { +>Sizable : Symbol(Sizable, Decl(defs.d.ts, 2, 1)) + + size(): number; +>size : Symbol(Sizable.size, Decl(defs.d.ts, 3, 19)) +} +=== /a.js === +/** + * @implements {Drawable} + * @implements Sizable + **/ +class Square { +>Square : Symbol(Square, Decl(a.js, 0, 0)) + + draw() { +>draw : Symbol(Square.draw, Decl(a.js, 4, 14)) + + return 0; + } + size() { +>size : Symbol(Square.size, Decl(a.js, 7, 5)) + + return 0; + } +} +/** + * @implements Drawable + * @implements {Sizable} + **/ +class BadSquare { +>BadSquare : Symbol(BadSquare, Decl(a.js, 11, 1)) + + size() { +>size : Symbol(BadSquare.size, Decl(a.js, 16, 17)) + + return 0; + } +} diff --git a/tests/baselines/reference/jsdocImplements_interface_multiple.types b/tests/baselines/reference/jsdocImplements_interface_multiple.types new file mode 100644 index 0000000000000..2e0077e88a91f --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_interface_multiple.types @@ -0,0 +1,44 @@ +=== /defs.d.ts === +interface Drawable { + draw(): number; +>draw : () => number +} +interface Sizable { + size(): number; +>size : () => number +} +=== /a.js === +/** + * @implements {Drawable} + * @implements Sizable + **/ +class Square { +>Square : Square + + draw() { +>draw : () => number + + return 0; +>0 : 0 + } + size() { +>size : () => number + + return 0; +>0 : 0 + } +} +/** + * @implements Drawable + * @implements {Sizable} + **/ +class BadSquare { +>BadSquare : BadSquare + + size() { +>size : () => number + + return 0; +>0 : 0 + } +} diff --git a/tests/baselines/reference/jsdocImplements_missingType.errors.txt b/tests/baselines/reference/jsdocImplements_missingType.errors.txt new file mode 100644 index 0000000000000..2e3a04e21b681 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_missingType.errors.txt @@ -0,0 +1,11 @@ +/a.js(2,16): error TS1003: Identifier expected. + + +==== /a.js (1 errors) ==== + class A { constructor() { this.x = 0; } } + /** @implements */ + +!!! error TS1003: Identifier expected. + class B { + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsdocImplements_missingType.js b/tests/baselines/reference/jsdocImplements_missingType.js new file mode 100644 index 0000000000000..4042f40ca540c --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_missingType.js @@ -0,0 +1,16 @@ +//// [a.js] +class A { constructor() { this.x = 0; } } +/** @implements */ +class B { +} + + + + +//// [a.d.ts] +declare class A { + x: number; +} +/** @implements */ +declare class B { +} diff --git a/tests/baselines/reference/jsdocImplements_missingType.symbols b/tests/baselines/reference/jsdocImplements_missingType.symbols new file mode 100644 index 0000000000000..115ac771b9245 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_missingType.symbols @@ -0,0 +1,12 @@ +=== /a.js === +class A { constructor() { this.x = 0; } } +>A : Symbol(A, Decl(a.js, 0, 0)) +>this.x : Symbol(A.x, Decl(a.js, 0, 25)) +>this : Symbol(A, Decl(a.js, 0, 0)) +>x : Symbol(A.x, Decl(a.js, 0, 25)) + +/** @implements */ +class B { +>B : Symbol(B, Decl(a.js, 0, 41)) +} + diff --git a/tests/baselines/reference/jsdocImplements_missingType.types b/tests/baselines/reference/jsdocImplements_missingType.types new file mode 100644 index 0000000000000..7a63d6aa5f211 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_missingType.types @@ -0,0 +1,14 @@ +=== /a.js === +class A { constructor() { this.x = 0; } } +>A : A +>this.x = 0 : 0 +>this.x : number +>this : this +>x : number +>0 : 0 + +/** @implements */ +class B { +>B : B +} + diff --git a/tests/baselines/reference/jsdocImplements_properties.errors.txt b/tests/baselines/reference/jsdocImplements_properties.errors.txt new file mode 100644 index 0000000000000..5d509a500f933 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_properties.errors.txt @@ -0,0 +1,23 @@ +/a.js(3,7): error TS2720: Class 'B' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? + Property 'x' is missing in type 'B' but required in type 'A'. + + +==== /a.js (1 errors) ==== + class A { constructor() { this.x = 0; } } + /** @implements A*/ + class B {} + ~ +!!! error TS2720: Class 'B' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? +!!! error TS2720: Property 'x' is missing in type 'B' but required in type 'A'. +!!! related TS2728 /a.js:1:27: 'x' is declared here. + + /** @implements A*/ + class B2 { + x = 10 + } + + /** @implements {A}*/ + class B3 { + constructor() { this.x = 10 } + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsdocImplements_properties.js b/tests/baselines/reference/jsdocImplements_properties.js new file mode 100644 index 0000000000000..7030c701b6e91 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_properties.js @@ -0,0 +1,33 @@ +//// [a.js] +class A { constructor() { this.x = 0; } } +/** @implements A*/ +class B {} + +/** @implements A*/ +class B2 { + x = 10 +} + +/** @implements {A}*/ +class B3 { + constructor() { this.x = 10 } +} + + + + +//// [a.d.ts] +declare class A { + x: number; +} +/** @implements A*/ +declare class B implements A { +} +/** @implements A*/ +declare class B2 implements A { + x: number; +} +/** @implements {A}*/ +declare class B3 implements A { + x: number; +} diff --git a/tests/baselines/reference/jsdocImplements_properties.symbols b/tests/baselines/reference/jsdocImplements_properties.symbols new file mode 100644 index 0000000000000..3f64476a191d7 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_properties.symbols @@ -0,0 +1,29 @@ +=== /a.js === +class A { constructor() { this.x = 0; } } +>A : Symbol(A, Decl(a.js, 0, 0)) +>this.x : Symbol(A.x, Decl(a.js, 0, 25)) +>this : Symbol(A, Decl(a.js, 0, 0)) +>x : Symbol(A.x, Decl(a.js, 0, 25)) + +/** @implements A*/ +class B {} +>B : Symbol(B, Decl(a.js, 0, 41)) + +/** @implements A*/ +class B2 { +>B2 : Symbol(B2, Decl(a.js, 2, 10)) + + x = 10 +>x : Symbol(B2.x, Decl(a.js, 5, 10)) +} + +/** @implements {A}*/ +class B3 { +>B3 : Symbol(B3, Decl(a.js, 7, 1)) + + constructor() { this.x = 10 } +>this.x : Symbol(B3.x, Decl(a.js, 11, 19)) +>this : Symbol(B3, Decl(a.js, 7, 1)) +>x : Symbol(B3.x, Decl(a.js, 11, 19)) +} + diff --git a/tests/baselines/reference/jsdocImplements_properties.types b/tests/baselines/reference/jsdocImplements_properties.types new file mode 100644 index 0000000000000..fb00977b860e2 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_properties.types @@ -0,0 +1,34 @@ +=== /a.js === +class A { constructor() { this.x = 0; } } +>A : A +>this.x = 0 : 0 +>this.x : number +>this : this +>x : number +>0 : 0 + +/** @implements A*/ +class B {} +>B : B + +/** @implements A*/ +class B2 { +>B2 : B2 + + x = 10 +>x : number +>10 : 10 +} + +/** @implements {A}*/ +class B3 { +>B3 : B3 + + constructor() { this.x = 10 } +>this.x = 10 : 10 +>this.x : number +>this : this +>x : number +>10 : 10 +} + diff --git a/tests/baselines/reference/jsdocImplements_signatures.errors.txt b/tests/baselines/reference/jsdocImplements_signatures.errors.txt new file mode 100644 index 0000000000000..05760b4aadc0b --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_signatures.errors.txt @@ -0,0 +1,16 @@ +/a.js(2,7): error TS2420: Class 'B' incorrectly implements interface 'Sig'. + Index signature is missing in type 'B'. + + +==== /defs.d.ts (0 errors) ==== + interface Sig { + [index: string]: string + } +==== /a.js (1 errors) ==== + /** @implements {Sig} */ + class B { + ~ +!!! error TS2420: Class 'B' incorrectly implements interface 'Sig'. +!!! error TS2420: Index signature is missing in type 'B'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/jsdocImplements_signatures.js b/tests/baselines/reference/jsdocImplements_signatures.js new file mode 100644 index 0000000000000..500b32d0338f6 --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_signatures.js @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/jsdoc/jsdocImplements_signatures.ts] //// + +//// [defs.d.ts] +interface Sig { + [index: string]: string +} +//// [a.js] +/** @implements {Sig} */ +class B { +} + + + + +//// [a.d.ts] +/** @implements {Sig} */ +declare class B implements Sig { +} diff --git a/tests/baselines/reference/jsdocImplements_signatures.symbols b/tests/baselines/reference/jsdocImplements_signatures.symbols new file mode 100644 index 0000000000000..32ace896df7ea --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_signatures.symbols @@ -0,0 +1,13 @@ +=== /defs.d.ts === +interface Sig { +>Sig : Symbol(Sig, Decl(defs.d.ts, 0, 0)) + + [index: string]: string +>index : Symbol(index, Decl(defs.d.ts, 1, 5)) +} +=== /a.js === +/** @implements {Sig} */ +class B { +>B : Symbol(B, Decl(a.js, 0, 0)) +} + diff --git a/tests/baselines/reference/jsdocImplements_signatures.types b/tests/baselines/reference/jsdocImplements_signatures.types new file mode 100644 index 0000000000000..378459402ac7a --- /dev/null +++ b/tests/baselines/reference/jsdocImplements_signatures.types @@ -0,0 +1,11 @@ +=== /defs.d.ts === +interface Sig { + [index: string]: string +>index : string +} +=== /a.js === +/** @implements {Sig} */ +class B { +>B : B +} + diff --git a/tests/baselines/reference/jsdocTemplateTag3.types b/tests/baselines/reference/jsdocTemplateTag3.types index 7dd45f47f00e8..dd44c83de03c2 100644 --- a/tests/baselines/reference/jsdocTemplateTag3.types +++ b/tests/baselines/reference/jsdocTemplateTag3.types @@ -73,7 +73,7 @@ f({ a: 12, b: 'hi', c: null }, undefined, { c: false, d: 12, b: undefined }, 101 >'nope' : "nope" f({ a: 12 }, undefined, undefined, 101, 'nope'); ->f({ a: 12 }, undefined, undefined, 101, 'nope') : any +>f({ a: 12 }, undefined, undefined, 101, 'nope') : 101 | "nope" >f : (t: T, u: U, v: V, w: W, x: X) => W | X >{ a: 12 } : { a: number; } >a : number diff --git a/tests/baselines/reference/jsxAndTypeAssertion.errors.txt b/tests/baselines/reference/jsxAndTypeAssertion.errors.txt index 6d3f6874a88b1..c62cbf4be0598 100644 --- a/tests/baselines/reference/jsxAndTypeAssertion.errors.txt +++ b/tests/baselines/reference/jsxAndTypeAssertion.errors.txt @@ -1,20 +1,29 @@ tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(6,6): error TS17008: JSX element 'any' has no corresponding closing tag. tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(6,13): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`. tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(6,17): error TS1005: '}' expected. +tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(6,31): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(8,6): error TS17008: JSX element 'any' has no corresponding closing tag. tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(10,6): error TS17008: JSX element 'foo' has no corresponding closing tag. +tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(10,24): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(10,32): error TS1005: '}' expected. +tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(12,23): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? +tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(12,24): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(12,36): error TS1005: '}' expected. tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(14,17): error TS17008: JSX element 'foo' has no corresponding closing tag. +tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(14,23): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? +tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(14,24): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? +tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(14,38): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(14,45): error TS1005: '}' expected. tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(18,2): error TS17008: JSX element 'foo' has no corresponding closing tag. tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(18,8): error TS17008: JSX element 'foo' has no corresponding closing tag. tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(18,13): error TS17008: JSX element 'foo' has no corresponding closing tag. +tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(18,69): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? +tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(18,76): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(21,1): error TS1005: ':' expected. tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(21,1): error TS1005: '; ~~~ @@ -35,16 +46,28 @@ tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(21,1): error TS1005: 'hello {{}} ; ~~~ !!! error TS17008: JSX element 'foo' has no corresponding closing tag. + ~ +!!! error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? ~ !!! error TS1005: '}' expected. x = {}}>hello; + ~ +!!! error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? + ~ +!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? ~ !!! error TS1005: '}' expected. x = {}}>hello{{}}; ~~~ !!! error TS17008: JSX element 'foo' has no corresponding closing tag. + ~ +!!! error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? + ~ +!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? + ~ +!!! error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? ~ !!! error TS1005: '}' expected. @@ -57,6 +80,10 @@ tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(21,1): error TS1005: ' "y"} /> >arg : JSX.Element > "y"} /> : JSX.Element >ElemLit : (p: LitProps) => JSX.Element ->prop : string +>prop : "x" >children : (p: JSX.IntrinsicAttributes & LitProps<"x">) => "y" >p => "y" : (p: JSX.IntrinsicAttributes & LitProps<"x">) => "y" >p : JSX.IntrinsicAttributes & LitProps<"x"> @@ -126,7 +126,7 @@ const argchild = {p => "y"} >argchild : JSX.Element >{p => "y"} : JSX.Element >ElemLit : (p: LitProps) => JSX.Element ->prop : string +>prop : "x" >p => "y" : (p: JSX.IntrinsicAttributes & LitProps<"x">) => "y" >p : JSX.IntrinsicAttributes & LitProps<"x"> >"y" : "y" @@ -136,7 +136,7 @@ const mismatched = {() => 12} >mismatched : JSX.Element >{() => 12} : JSX.Element >ElemLit : (p: LitProps) => JSX.Element ->prop : string +>prop : "x" >() => 12 : () => number >12 : 12 >ElemLit : (p: LitProps) => JSX.Element diff --git a/tests/baselines/reference/jsxEsprimaFbTestSuite.errors.txt b/tests/baselines/reference/jsxEsprimaFbTestSuite.errors.txt index 7adde909489a6..91f3e22962cd3 100644 --- a/tests/baselines/reference/jsxEsprimaFbTestSuite.errors.txt +++ b/tests/baselines/reference/jsxEsprimaFbTestSuite.errors.txt @@ -2,11 +2,12 @@ tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,1): error TS2695: Left tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,17): error TS1005: '{' expected. tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,23): error TS2304: Cannot find name 'right'. tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,23): error TS2657: JSX expressions must have one parent element. +tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,41): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,57): error TS1109: Expression expected. tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,58): error TS1109: Expression expected. -==== tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx (6 errors) ==== +==== tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx (7 errors) ==== declare var React: any; declare var 日本語; declare var AbC_def; @@ -54,6 +55,8 @@ tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,58): error TS1109: Expr !!! error TS2304: Cannot find name 'right'. ~~~~~ !!! error TS2657: JSX expressions must have one parent element. + ~ +!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? ~ !!! error TS1109: Expression expected. ~ diff --git a/tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt b/tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt index 68b615525b536..1195ff4457e32 100644 --- a/tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt +++ b/tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt @@ -39,6 +39,7 @@ tests/cases/conformance/jsx/19.tsx(1,9): error TS2695: Left side of comma operat tests/cases/conformance/jsx/19.tsx(1,64): error TS2657: JSX expressions must have one parent element. tests/cases/conformance/jsx/2.tsx(1,3): error TS1003: Identifier expected. tests/cases/conformance/jsx/20.tsx(1,10): error TS1005: '}' expected. +tests/cases/conformance/jsx/20.tsx(1,11): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? tests/cases/conformance/jsx/21.tsx(1,20): error TS1003: Identifier expected. tests/cases/conformance/jsx/22.tsx(1,15): error TS1003: Identifier expected. tests/cases/conformance/jsx/22.tsx(1,21): error TS1109: Expression expected. @@ -55,6 +56,8 @@ tests/cases/conformance/jsx/25.tsx(1,29): error TS1128: Declaration or statement tests/cases/conformance/jsx/25.tsx(1,32): error TS2304: Cannot find name 'props'. tests/cases/conformance/jsx/25.tsx(1,38): error TS1109: Expression expected. tests/cases/conformance/jsx/25.tsx(1,39): error TS1109: Expression expected. +tests/cases/conformance/jsx/26.tsx(1,4): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? +tests/cases/conformance/jsx/27.tsx(1,5): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? tests/cases/conformance/jsx/28.tsx(1,2): error TS17008: JSX element 'a' has no corresponding closing tag. tests/cases/conformance/jsx/28.tsx(1,6): error TS1005: '{' expected. tests/cases/conformance/jsx/28.tsx(2,1): error TS1005: '{"str";}; ~ !!! error TS1005: '}' expected. + ~ +!!! error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? ==== tests/cases/conformance/jsx/21.tsx (1 errors) ==== ; ~ @@ -286,11 +292,15 @@ tests/cases/conformance/jsx/9.tsx(1,16): error TS1109: Expression expected. !!! error TS1109: Expression expected. -==== tests/cases/conformance/jsx/26.tsx (0 errors) ==== +==== tests/cases/conformance/jsx/26.tsx (1 errors) ==== >; + ~ +!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? -==== tests/cases/conformance/jsx/27.tsx (0 errors) ==== +==== tests/cases/conformance/jsx/27.tsx (1 errors) ==== >; + ~ +!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? ==== tests/cases/conformance/jsx/28.tsx (3 errors) ==== ; @@ -312,8 +322,10 @@ tests/cases/conformance/jsx/9.tsx(1,16): error TS1109: Expression expected. !!! error TS1005: '}; + ~ +!!! error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? ==== tests/cases/conformance/jsx/31.tsx (1 errors) ==== ; diff --git a/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.errors.txt b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.errors.txt new file mode 100644 index 0000000000000..f94c39ce5f893 --- /dev/null +++ b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.errors.txt @@ -0,0 +1,35 @@ +tests/cases/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx(19,12): error TS6229: Tag 'MyComp4' expects at least '4' arguments, but the JSX factory 'React.createElement' provides at most '2'. +tests/cases/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx(20,12): error TS6229: Tag 'MyComp3' expects at least '3' arguments, but the JSX factory 'React.createElement' provides at most '2'. + + +==== tests/cases/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx (2 errors) ==== + /// + + import * as React from "react"; + + interface MyProps { + x: number; + } + + function MyComp4(props: MyProps, context: any, bad: any, verybad: any) { + return
; + } + function MyComp3(props: MyProps, context: any, bad: any) { + return
; + } + function MyComp2(props: MyProps, context: any) { + return
+ } + + const a = ; // using `MyComp` as a component should error - it expects more arguments than react provides + ~~~~~~~ +!!! error TS6229: Tag 'MyComp4' expects at least '4' arguments, but the JSX factory 'React.createElement' provides at most '2'. +!!! related TS2728 tests/cases/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx:9:10: 'MyComp4' is declared here. + const b = ; // using `MyComp` as a component should error - it expects more arguments than react provides + ~~~~~~~ +!!! error TS6229: Tag 'MyComp3' expects at least '3' arguments, but the JSX factory 'React.createElement' provides at most '2'. +!!! related TS2728 tests/cases/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx:12:10: 'MyComp3' is declared here. + const c = ; // Should be OK, `context` is allowed, per react rules + + declare function MyTagWithOptionalNonJSXBits(props: MyProps, context: any, nonReactArg?: string): JSX.Element; + const d = ; // Technically OK, but probably questionable \ No newline at end of file diff --git a/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.js b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.js new file mode 100644 index 0000000000000..f00c2f3795b2e --- /dev/null +++ b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.js @@ -0,0 +1,44 @@ +//// [jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx] +/// + +import * as React from "react"; + +interface MyProps { + x: number; +} + +function MyComp4(props: MyProps, context: any, bad: any, verybad: any) { + return
; +} +function MyComp3(props: MyProps, context: any, bad: any) { + return
; +} +function MyComp2(props: MyProps, context: any) { + return
+} + +const a = ; // using `MyComp` as a component should error - it expects more arguments than react provides +const b = ; // using `MyComp` as a component should error - it expects more arguments than react provides +const c = ; // Should be OK, `context` is allowed, per react rules + +declare function MyTagWithOptionalNonJSXBits(props: MyProps, context: any, nonReactArg?: string): JSX.Element; +const d = ; // Technically OK, but probably questionable + +//// [jsxIssuesErrorWhenTagExpectsTooManyArguments.js] +"use strict"; +/// +exports.__esModule = true; +var React = require("react"); +function MyComp4(props, context, bad, verybad) { + return React.createElement("div", null); +} +function MyComp3(props, context, bad) { + return React.createElement("div", null); +} +function MyComp2(props, context) { + return React.createElement("div", null); +} +var a = React.createElement(MyComp4, { x: 2 }); // using `MyComp` as a component should error - it expects more arguments than react provides +var b = React.createElement(MyComp3, { x: 2 }); // using `MyComp` as a component should error - it expects more arguments than react provides +var c = React.createElement(MyComp2, { x: 2 }); // Should be OK, `context` is allowed, per react rules +var d = React.createElement(MyTagWithOptionalNonJSXBits, { x: 2 }); // Technically OK, but probably questionable diff --git a/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.symbols b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.symbols new file mode 100644 index 0000000000000..ce2ae27e6e285 --- /dev/null +++ b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.symbols @@ -0,0 +1,76 @@ +=== tests/cases/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx === +/// + +import * as React from "react"; +>React : Symbol(React, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 2, 6)) + +interface MyProps { +>MyProps : Symbol(MyProps, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 2, 31)) + + x: number; +>x : Symbol(MyProps.x, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 4, 19)) +} + +function MyComp4(props: MyProps, context: any, bad: any, verybad: any) { +>MyComp4 : Symbol(MyComp4, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 6, 1)) +>props : Symbol(props, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 8, 17)) +>MyProps : Symbol(MyProps, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 2, 31)) +>context : Symbol(context, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 8, 32)) +>bad : Symbol(bad, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 8, 46)) +>verybad : Symbol(verybad, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 8, 56)) + + return
; +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +} +function MyComp3(props: MyProps, context: any, bad: any) { +>MyComp3 : Symbol(MyComp3, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 10, 1)) +>props : Symbol(props, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 11, 17)) +>MyProps : Symbol(MyProps, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 2, 31)) +>context : Symbol(context, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 11, 32)) +>bad : Symbol(bad, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 11, 46)) + + return
; +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +} +function MyComp2(props: MyProps, context: any) { +>MyComp2 : Symbol(MyComp2, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 13, 1)) +>props : Symbol(props, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 14, 17)) +>MyProps : Symbol(MyProps, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 2, 31)) +>context : Symbol(context, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 14, 32)) + + return
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +} + +const a = ; // using `MyComp` as a component should error - it expects more arguments than react provides +>a : Symbol(a, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 18, 5)) +>MyComp4 : Symbol(MyComp4, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 6, 1)) +>x : Symbol(x, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 18, 18)) + +const b = ; // using `MyComp` as a component should error - it expects more arguments than react provides +>b : Symbol(b, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 19, 5)) +>MyComp3 : Symbol(MyComp3, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 10, 1)) +>x : Symbol(x, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 19, 18)) + +const c = ; // Should be OK, `context` is allowed, per react rules +>c : Symbol(c, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 20, 5)) +>MyComp2 : Symbol(MyComp2, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 13, 1)) +>x : Symbol(x, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 20, 19)) + +declare function MyTagWithOptionalNonJSXBits(props: MyProps, context: any, nonReactArg?: string): JSX.Element; +>MyTagWithOptionalNonJSXBits : Symbol(MyTagWithOptionalNonJSXBits, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 20, 28)) +>props : Symbol(props, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 22, 45)) +>MyProps : Symbol(MyProps, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 2, 31)) +>context : Symbol(context, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 22, 60)) +>nonReactArg : Symbol(nonReactArg, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 22, 74)) +>JSX : Symbol(JSX, Decl(react16.d.ts, 2367, 12)) +>Element : Symbol(JSX.Element, Decl(react16.d.ts, 2368, 23)) + +const d = ; // Technically OK, but probably questionable +>d : Symbol(d, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 23, 5)) +>MyTagWithOptionalNonJSXBits : Symbol(MyTagWithOptionalNonJSXBits, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 20, 28)) +>x : Symbol(x, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 23, 38)) + diff --git a/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.types b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.types new file mode 100644 index 0000000000000..a126895506183 --- /dev/null +++ b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.types @@ -0,0 +1,80 @@ +=== tests/cases/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx === +/// + +import * as React from "react"; +>React : typeof React + +interface MyProps { + x: number; +>x : number +} + +function MyComp4(props: MyProps, context: any, bad: any, verybad: any) { +>MyComp4 : (props: MyProps, context: any, bad: any, verybad: any) => JSX.Element +>props : MyProps +>context : any +>bad : any +>verybad : any + + return
; +>
: JSX.Element +>div : any +>div : any +} +function MyComp3(props: MyProps, context: any, bad: any) { +>MyComp3 : (props: MyProps, context: any, bad: any) => JSX.Element +>props : MyProps +>context : any +>bad : any + + return
; +>
: JSX.Element +>div : any +>div : any +} +function MyComp2(props: MyProps, context: any) { +>MyComp2 : (props: MyProps, context: any) => JSX.Element +>props : MyProps +>context : any + + return
+>
: JSX.Element +>div : any +>div : any +} + +const a = ; // using `MyComp` as a component should error - it expects more arguments than react provides +>a : JSX.Element +> : JSX.Element +>MyComp4 : (props: MyProps, context: any, bad: any, verybad: any) => JSX.Element +>x : number +>2 : 2 + +const b = ; // using `MyComp` as a component should error - it expects more arguments than react provides +>b : JSX.Element +> : JSX.Element +>MyComp3 : (props: MyProps, context: any, bad: any) => JSX.Element +>x : number +>2 : 2 + +const c = ; // Should be OK, `context` is allowed, per react rules +>c : JSX.Element +> : JSX.Element +>MyComp2 : (props: MyProps, context: any) => JSX.Element +>x : number +>2 : 2 + +declare function MyTagWithOptionalNonJSXBits(props: MyProps, context: any, nonReactArg?: string): JSX.Element; +>MyTagWithOptionalNonJSXBits : (props: MyProps, context: any, nonReactArg?: string) => JSX.Element +>props : MyProps +>context : any +>nonReactArg : string +>JSX : any + +const d = ; // Technically OK, but probably questionable +>d : JSX.Element +> : JSX.Element +>MyTagWithOptionalNonJSXBits : (props: MyProps, context: any, nonReactArg?: string) => JSX.Element +>x : number +>2 : 2 + diff --git a/tests/baselines/reference/jsxParsingError3.errors.txt b/tests/baselines/reference/jsxParsingError3.errors.txt new file mode 100644 index 0000000000000..d6c9790d42aa4 --- /dev/null +++ b/tests/baselines/reference/jsxParsingError3.errors.txt @@ -0,0 +1,46 @@ +tests/cases/conformance/jsx/Error1.tsx(1,15): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? +tests/cases/conformance/jsx/Error2.tsx(1,15): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? +tests/cases/conformance/jsx/Error3.tsx(1,22): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? +tests/cases/conformance/jsx/Error4.tsx(1,22): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? +tests/cases/conformance/jsx/Error5.tsx(1,15): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? +tests/cases/conformance/jsx/Error6.tsx(1,15): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? + + +==== tests/cases/conformance/jsx/file.tsx (0 errors) ==== + declare module JSX { + interface Element {} + interface IntrinsicElements { + [s: string]: any; + } + } + +==== tests/cases/conformance/jsx/Error1.tsx (1 errors) ==== + let x1 =
}
; + ~ +!!! error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? + +==== tests/cases/conformance/jsx/Error2.tsx (1 errors) ==== + let x2 =
>
; + ~ +!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? + +==== tests/cases/conformance/jsx/Error3.tsx (1 errors) ==== + let x3 =
{"foo"}}
; + ~ +!!! error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? + +==== tests/cases/conformance/jsx/Error4.tsx (1 errors) ==== + let x4 =
{"foo"}>
; + ~ +!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? + +==== tests/cases/conformance/jsx/Error5.tsx (1 errors) ==== + let x5 =
}{"foo"}
; + ~ +!!! error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? + +==== tests/cases/conformance/jsx/Error6.tsx (1 errors) ==== + let x6 =
>{"foo"}
; + ~ +!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? + \ No newline at end of file diff --git a/tests/baselines/reference/jsxParsingError3.js b/tests/baselines/reference/jsxParsingError3.js new file mode 100644 index 0000000000000..e10727128906f --- /dev/null +++ b/tests/baselines/reference/jsxParsingError3.js @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/jsx/jsxParsingError3.tsx] //// + +//// [file.tsx] +declare module JSX { + interface Element {} + interface IntrinsicElements { + [s: string]: any; + } +} + +//// [Error1.tsx] +let x1 =
}
; + +//// [Error2.tsx] +let x2 =
>
; + +//// [Error3.tsx] +let x3 =
{"foo"}}
; + +//// [Error4.tsx] +let x4 =
{"foo"}>
; + +//// [Error5.tsx] +let x5 =
}{"foo"}
; + +//// [Error6.tsx] +let x6 =
>{"foo"}
; + + +//// [file.jsx] +//// [Error1.jsx] +var x1 =
}
; +//// [Error2.jsx] +var x2 =
>
; +//// [Error3.jsx] +var x3 =
{"foo"}}
; +//// [Error4.jsx] +var x4 =
{"foo"}>
; +//// [Error5.jsx] +var x5 =
}{"foo"}
; +//// [Error6.jsx] +var x6 =
>{"foo"}
; diff --git a/tests/baselines/reference/jsxParsingError3.symbols b/tests/baselines/reference/jsxParsingError3.symbols new file mode 100644 index 0000000000000..6051929f2c309 --- /dev/null +++ b/tests/baselines/reference/jsxParsingError3.symbols @@ -0,0 +1,51 @@ +=== tests/cases/conformance/jsx/file.tsx === +declare module JSX { +>JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) + + interface Element {} +>Element : Symbol(Element, Decl(file.tsx, 0, 20)) + + interface IntrinsicElements { +>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22)) + + [s: string]: any; +>s : Symbol(s, Decl(file.tsx, 3, 5)) + } +} + +=== tests/cases/conformance/jsx/Error1.tsx === +let x1 =
}
; +>x1 : Symbol(x1, Decl(Error1.tsx, 0, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) + +=== tests/cases/conformance/jsx/Error2.tsx === +let x2 =
>
; +>x2 : Symbol(x2, Decl(Error2.tsx, 0, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) + +=== tests/cases/conformance/jsx/Error3.tsx === +let x3 =
{"foo"}}
; +>x3 : Symbol(x3, Decl(Error3.tsx, 0, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) + +=== tests/cases/conformance/jsx/Error4.tsx === +let x4 =
{"foo"}>
; +>x4 : Symbol(x4, Decl(Error4.tsx, 0, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) + +=== tests/cases/conformance/jsx/Error5.tsx === +let x5 =
}{"foo"}
; +>x5 : Symbol(x5, Decl(Error5.tsx, 0, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) + +=== tests/cases/conformance/jsx/Error6.tsx === +let x6 =
>{"foo"}
; +>x6 : Symbol(x6, Decl(Error6.tsx, 0, 3)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22)) + diff --git a/tests/baselines/reference/jsxParsingError3.types b/tests/baselines/reference/jsxParsingError3.types new file mode 100644 index 0000000000000..eceb955362dfd --- /dev/null +++ b/tests/baselines/reference/jsxParsingError3.types @@ -0,0 +1,55 @@ +=== tests/cases/conformance/jsx/file.tsx === +declare module JSX { + interface Element {} + interface IntrinsicElements { + [s: string]: any; +>s : string + } +} + +=== tests/cases/conformance/jsx/Error1.tsx === +let x1 =
}
; +>x1 : JSX.Element +>
}
: JSX.Element +>div : any +>div : any + +=== tests/cases/conformance/jsx/Error2.tsx === +let x2 =
>
; +>x2 : JSX.Element +>
>
: JSX.Element +>div : any +>div : any + +=== tests/cases/conformance/jsx/Error3.tsx === +let x3 =
{"foo"}}
; +>x3 : JSX.Element +>
{"foo"}}
: JSX.Element +>div : any +>"foo" : "foo" +>div : any + +=== tests/cases/conformance/jsx/Error4.tsx === +let x4 =
{"foo"}>
; +>x4 : JSX.Element +>
{"foo"}>
: JSX.Element +>div : any +>"foo" : "foo" +>div : any + +=== tests/cases/conformance/jsx/Error5.tsx === +let x5 =
}{"foo"}
; +>x5 : JSX.Element +>
}{"foo"}
: JSX.Element +>div : any +>"foo" : "foo" +>div : any + +=== tests/cases/conformance/jsx/Error6.tsx === +let x6 =
>{"foo"}
; +>x6 : JSX.Element +>
>{"foo"}
: JSX.Element +>div : any +>"foo" : "foo" +>div : any + diff --git a/tests/baselines/reference/keyofAndIndexedAccessErrors.types b/tests/baselines/reference/keyofAndIndexedAccessErrors.types index 90d2c462d0a69..4d4ad5783033a 100644 --- a/tests/baselines/reference/keyofAndIndexedAccessErrors.types +++ b/tests/baselines/reference/keyofAndIndexedAccessErrors.types @@ -162,15 +162,15 @@ function f10(shape: Shape) { >"name" : "name" let x2 = getProperty(shape, "size"); // Error ->x2 : any ->getProperty(shape, "size") : any +>x2 : string | number | boolean +>getProperty(shape, "size") : string | number | boolean >getProperty : (obj: T, key: K) => T[K] >shape : Shape >"size" : "size" let x3 = getProperty(shape, cond ? "name" : "size"); // Error ->x3 : any ->getProperty(shape, cond ? "name" : "size") : any +>x3 : string | number | boolean +>getProperty(shape, cond ? "name" : "size") : string | number | boolean >getProperty : (obj: T, key: K) => T[K] >shape : Shape >cond ? "name" : "size" : "name" | "size" @@ -186,14 +186,14 @@ function f10(shape: Shape) { >"rectangle" : "rectangle" setProperty(shape, "size", 10); // Error ->setProperty(shape, "size", 10) : any +>setProperty(shape, "size", 10) : void >setProperty : (obj: T, key: K, value: T[K]) => void >shape : Shape >"size" : "size" >10 : 10 setProperty(shape, cond ? "name" : "size", 10); // Error ->setProperty(shape, cond ? "name" : "size", 10) : any +>setProperty(shape, cond ? "name" : "size", 10) : void >setProperty : (obj: T, key: K, value: T[K]) => void >shape : Shape >cond ? "name" : "size" : "name" | "size" diff --git a/tests/baselines/reference/keyofDoesntContainSymbols.types b/tests/baselines/reference/keyofDoesntContainSymbols.types index 4a29560de8250..4842f171b4132 100644 --- a/tests/baselines/reference/keyofDoesntContainSymbols.types +++ b/tests/baselines/reference/keyofDoesntContainSymbols.types @@ -47,8 +47,8 @@ const val = set(obj, 'str', ''); // string const valB = set(obj, 'num', ''); ->valB : any ->set(obj, 'num', '') : any +>valB : number +>set(obj, 'num', '') : number >set : (obj: T, key: K, value: T[K]) => T[K] >obj : { num: number; str: string; 0: 0; [sym]: symbol; } >'num' : "num" @@ -57,8 +57,8 @@ const valB = set(obj, 'num', ''); // Expect type error // Argument of type '""' is not assignable to parameter of type 'number'. const valC = set(obj, sym, sym); ->valC : any ->set(obj, sym, sym) : any +>valC : string | number +>set(obj, sym, sym) : string | number >set : (obj: T, key: K, value: T[K]) => T[K] >obj : { num: number; str: string; 0: 0; [sym]: symbol; } >sym : unique symbol @@ -67,8 +67,8 @@ const valC = set(obj, sym, sym); // Expect type error // Argument of type 'unique symbol' is not assignable to parameter of type "str" | "num" const valD = set(obj, num, num); ->valD : any ->set(obj, num, num) : any +>valD : string | number +>set(obj, num, num) : string | number >set : (obj: T, key: K, value: T[K]) => T[K] >obj : { num: number; str: string; 0: 0; [sym]: symbol; } >num : 0 diff --git a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.errors.txt b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.errors.txt index 63e68d79d89bc..a2b08fbed9ef9 100644 --- a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.errors.txt +++ b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.errors.txt @@ -1,6 +1,5 @@ tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts(37,5): error TS2322: Type '"y"' is not assignable to type '"x"'. -tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts(60,5): error TS2322: Type 'string[]' is not assignable to type 'XY[]'. - Type 'string' is not assignable to type 'XY'. +tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts(60,12): error TS2322: Type 'string' is not assignable to type 'XY'. ==== tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts (2 errors) ==== @@ -66,7 +65,6 @@ tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts(60,5): error TS23 // Desired: OK // Error in all extant branches arr = [...['y']]; - ~~~ -!!! error TS2322: Type 'string[]' is not assignable to type 'XY[]'. -!!! error TS2322: Type 'string' is not assignable to type 'XY'. + ~~~~~~~~ +!!! error TS2322: Type 'string' is not assignable to type 'XY'. } \ No newline at end of file diff --git a/tests/baselines/reference/literalTypeNameAssertionNotTriggered.types b/tests/baselines/reference/literalTypeNameAssertionNotTriggered.types index 91854449abc5c..25730fe99b951 100644 --- a/tests/baselines/reference/literalTypeNameAssertionNotTriggered.types +++ b/tests/baselines/reference/literalTypeNameAssertionNotTriggered.types @@ -8,7 +8,7 @@ declare function f(obj: T, key: keyof T): void; >key : keyof T f(a, ""); ->f(a, "") : any +>f(a, "") : void >f : (obj: T, key: keyof T) => void >a : typeof a >"" : "" diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index 3d28af0939c00..8f59847f25847 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -292,7 +292,7 @@ var A = /** @class */ (function () { }()); return new C(); }, - enumerable: true, + enumerable: false, configurable: true }); return A; diff --git a/tests/baselines/reference/mappedTypeErrors.types b/tests/baselines/reference/mappedTypeErrors.types index cfa0df3cd586e..f8468ca0aad69 100644 --- a/tests/baselines/reference/mappedTypeErrors.types +++ b/tests/baselines/reference/mappedTypeErrors.types @@ -153,8 +153,8 @@ function f20() { >f20 : () => void let x1 = objAndReadonly({ x: 0, y: 0 }, { x: 1 }); // Error ->x1 : any ->objAndReadonly({ x: 0, y: 0 }, { x: 1 }) : any +>x1 : { x: number; y: number; } +>objAndReadonly({ x: 0, y: 0 }, { x: 1 }) : { x: number; y: number; } >objAndReadonly : (primary: T, secondary: Readonly) => T >{ x: 0, y: 0 } : { x: number; y: number; } >x : number @@ -181,8 +181,8 @@ function f20() { >1 : 1 let x3 = objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error ->x3 : any ->objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }) : any +>x3 : { x: number; y: number; } +>objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }) : { x: number; y: number; } >objAndReadonly : (primary: T, secondary: Readonly) => T >{ x: 0, y: 0 } : { x: number; y: number; } >x : number @@ -230,8 +230,8 @@ function f21() { >1 : 1 let x3 = objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error ->x3 : any ->objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }) : any +>x3 : { x: number; y: number; } +>objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }) : { x: number; y: number; } >objAndPartial : (primary: T, secondary: Partial) => T >{ x: 0, y: 0 } : { x: number; y: number; } >x : number @@ -324,7 +324,7 @@ setState(foo, foo); >foo : Foo setState(foo, { a: undefined }); // Error ->setState(foo, { a: undefined }) : any +>setState(foo, { a: undefined }) : void >setState : (obj: T, props: Pick) => void >foo : Foo >{ a: undefined } : { a: undefined; } @@ -332,7 +332,7 @@ setState(foo, { a: undefined }); // Error >undefined : undefined setState(foo, { c: true }); // Error ->setState(foo, { c: true }) : any +>setState(foo, { c: true }) : void >setState : (obj: T, props: Pick) => void >foo : Foo >{ c: true } : { c: boolean; } @@ -416,7 +416,7 @@ c.setState(foo); >foo : Foo c.setState({ a: undefined }); // Error ->c.setState({ a: undefined }) : any +>c.setState({ a: undefined }) : void >c.setState : (props: Pick) => void >c : C >setState : (props: Pick) => void @@ -425,7 +425,7 @@ c.setState({ a: undefined }); // Error >undefined : undefined c.setState({ c: true }); // Error ->c.setState({ c: true }) : any +>c.setState({ c: true }) : void >c.setState : (props: Pick) => void >c : C >setState : (props: Pick) => void diff --git a/tests/baselines/reference/mappedTypeInferenceErrors.symbols b/tests/baselines/reference/mappedTypeInferenceErrors.symbols index 577ddd443837b..75b81d03e06b0 100644 --- a/tests/baselines/reference/mappedTypeInferenceErrors.symbols +++ b/tests/baselines/reference/mappedTypeInferenceErrors.symbols @@ -43,7 +43,6 @@ foo({ let z = this.bar; >z : Symbol(z, Decl(mappedTypeInferenceErrors.ts, 12, 15)) >this.bar : Symbol(bar, Decl(mappedTypeInferenceErrors.ts, 10, 15)) ->this : Symbol(__object, Decl(mappedTypeInferenceErrors.ts, 10, 13)) >bar : Symbol(bar, Decl(mappedTypeInferenceErrors.ts, 10, 15)) return 42; diff --git a/tests/baselines/reference/mappedTypeInferenceErrors.types b/tests/baselines/reference/mappedTypeInferenceErrors.types index b6a0c3a8f2598..abacced1ee268 100644 --- a/tests/baselines/reference/mappedTypeInferenceErrors.types +++ b/tests/baselines/reference/mappedTypeInferenceErrors.types @@ -14,7 +14,7 @@ declare function foo(options: { props: P, computed: ComputedOf } & This >computed : ComputedOf foo({ ->foo({ props: { x: 10, y: 20 }, computed: { bar(): number { let z = this.bar; return 42; }, baz: 42 }}) : any +>foo({ props: { x: 10, y: 20 }, computed: { bar(): number { let z = this.bar; return 42; }, baz: 42 }}) : void >foo : (options: { props: P; computed: ComputedOf; } & ThisType

) => void >{ props: { x: 10, y: 20 }, computed: { bar(): number { let z = this.bar; return 42; }, baz: 42 }} : { props: { x: number; y: number; }; computed: { bar(): number; baz: number; }; } @@ -34,10 +34,10 @@ foo({ >bar : () => number let z = this.bar; ->z : () => number ->this.bar : () => number ->this : { bar(): number; baz: number; } ->bar : () => number +>z : unknown +>this.bar : unknown +>this : { x: number; y: number; } & { bar: unknown; baz: unknown; } +>bar : unknown return 42; >42 : 42 diff --git a/tests/baselines/reference/mappedTypeRecursiveInference.symbols b/tests/baselines/reference/mappedTypeRecursiveInference.symbols index bbd59ffdad58b..59109f15f91d2 100644 --- a/tests/baselines/reference/mappedTypeRecursiveInference.symbols +++ b/tests/baselines/reference/mappedTypeRecursiveInference.symbols @@ -93,8 +93,18 @@ const out2 = foo(xhr); >xhr : Symbol(xhr, Decl(mappedTypeRecursiveInference.ts, 17, 3)) out2.responseXML +>out2.responseXML : Symbol(responseXML, Decl(lib.dom.d.ts, --, --)) >out2 : Symbol(out2, Decl(mappedTypeRecursiveInference.ts, 18, 5)) +>responseXML : Symbol(responseXML, Decl(lib.dom.d.ts, --, --)) out2.responseXML.activeElement.className.length +>out2.responseXML.activeElement.className.length : Symbol(length, Decl(lib.es5.d.ts, --, --)) +>out2.responseXML.activeElement.className : Symbol(className, Decl(lib.dom.d.ts, --, --)) +>out2.responseXML.activeElement : Symbol(activeElement, Decl(lib.dom.d.ts, --, --)) +>out2.responseXML : Symbol(responseXML, Decl(lib.dom.d.ts, --, --)) >out2 : Symbol(out2, Decl(mappedTypeRecursiveInference.ts, 18, 5)) +>responseXML : Symbol(responseXML, Decl(lib.dom.d.ts, --, --)) +>activeElement : Symbol(activeElement, Decl(lib.dom.d.ts, --, --)) +>className : Symbol(className, Decl(lib.dom.d.ts, --, --)) +>length : Symbol(length, Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/mappedTypeRecursiveInference.types b/tests/baselines/reference/mappedTypeRecursiveInference.types index 298625be7bb8c..b89076e09d9a2 100644 --- a/tests/baselines/reference/mappedTypeRecursiveInference.types +++ b/tests/baselines/reference/mappedTypeRecursiveInference.types @@ -91,24 +91,24 @@ let xhr: XMLHttpRequest; >xhr : XMLHttpRequest const out2 = foo(xhr); ->out2 : any ->foo(xhr) : any +>out2 : { onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; } +>foo(xhr) : { onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; } >foo : (deep: Deep) => T >xhr : XMLHttpRequest out2.responseXML ->out2.responseXML : any ->out2 : any ->responseXML : any +>out2.responseXML : { readonly URL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; alinkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly all: { readonly length: any; item: any; namedItem: any; }; readonly anchors: { item: any; namedItem: any; readonly length: any; }; readonly applets: { item: any; namedItem: any; readonly length: any; }; bgColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; body: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly characterSet: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly charset: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly compatMode: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly contentType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; cookie: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly currentScript: { async: any; charset: any; crossOrigin: any; defer: any; event: any; htmlFor: any; integrity: any; noModule: any; referrerPolicy: any; src: any; text: any; type: any; addEventListener: any; removeEventListener: any; accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; } | { type: any; addEventListener: any; removeEventListener: any; readonly className: any; readonly ownerSVGElement: any; readonly viewportElement: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; readonly correspondingElement: any; readonly correspondingUseElement: any; readonly href: any; }; readonly defaultView: { readonly applicationCache: any; readonly clientInformation: any; readonly closed: any; customElements: any; defaultStatus: any; readonly devicePixelRatio: any; readonly doNotTrack: any; readonly document: any; readonly event: any; readonly external: any; readonly frameElement: any; readonly frames: any; readonly history: any; readonly innerHeight: any; readonly innerWidth: any; readonly isSecureContext: any; readonly length: any; location: any; readonly locationbar: any; readonly menubar: any; readonly msContentScript: any; name: any; readonly navigator: any; offscreenBuffering: any; oncompassneedscalibration: any; ondevicelight: any; ondevicemotion: any; ondeviceorientation: any; ondeviceorientationabsolute: any; onmousewheel: any; onmsgesturechange: any; onmsgesturedoubletap: any; onmsgestureend: any; onmsgesturehold: any; onmsgesturestart: any; onmsgesturetap: any; onmsinertiastart: any; onmspointercancel: any; onmspointerdown: any; onmspointerenter: any; onmspointerleave: any; onmspointermove: any; onmspointerout: any; onmspointerover: any; onmspointerup: any; onorientationchange: any; onreadystatechange: any; onvrdisplayactivate: any; onvrdisplayblur: any; onvrdisplayconnect: any; onvrdisplaydeactivate: any; onvrdisplaydisconnect: any; onvrdisplayfocus: any; onvrdisplaypointerrestricted: any; onvrdisplaypointerunrestricted: any; onvrdisplaypresentchange: any; opener: any; readonly orientation: any; readonly outerHeight: any; readonly outerWidth: any; readonly pageXOffset: any; readonly pageYOffset: any; readonly parent: any; readonly personalbar: any; readonly screen: any; readonly screenLeft: any; readonly screenTop: any; readonly screenX: any; readonly screenY: any; readonly scrollX: any; readonly scrollY: any; readonly scrollbars: any; readonly self: any; readonly speechSynthesis: any; status: any; readonly statusbar: any; readonly styleMedia: any; readonly toolbar: any; readonly top: any; readonly window: any; alert: any; blur: any; captureEvents: any; close: any; confirm: any; departFocus: any; focus: any; getComputedStyle: any; getMatchedCSSRules: any; getSelection: any; matchMedia: any; moveBy: any; moveTo: any; msWriteProfilerMark: any; open: any; postMessage: any; print: any; prompt: any; releaseEvents: any; resizeBy: any; resizeTo: any; scroll: any; scrollBy: any; scrollTo: any; stop: any; webkitCancelAnimationFrame: any; webkitConvertPointFromNodeToPage: any; webkitConvertPointFromPageToNode: any; webkitRequestAnimationFrame: any; addEventListener: any; removeEventListener: any; dispatchEvent: any; cancelAnimationFrame: any; requestAnimationFrame: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly console: any; onafterprint: any; onbeforeprint: any; onbeforeunload: any; onhashchange: any; onlanguagechange: any; onmessage: any; onmessageerror: any; onoffline: any; ononline: any; onpagehide: any; onpageshow: any; onpopstate: any; onrejectionhandled: any; onstorage: any; onunhandledrejection: any; onunload: any; readonly localStorage: any; readonly caches: any; readonly crypto: any; readonly indexedDB: any; readonly origin: any; readonly performance: any; atob: any; btoa: any; clearInterval: any; clearTimeout: any; createImageBitmap: any; fetch: any; queueMicrotask: any; setInterval: any; setTimeout: any; readonly sessionStorage: any; }; designMode: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; dir: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly doctype: { readonly name: any; readonly publicId: any; readonly systemId: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; after: any; before: any; remove: any; replaceWith: any; }; readonly documentElement: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly documentURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; domain: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly embeds: { item: any; namedItem: any; readonly length: any; }; fgColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly forms: { item: any; namedItem: any; readonly length: any; }; readonly fullscreen: { valueOf: any; }; readonly fullscreenEnabled: { valueOf: any; }; readonly head: { addEventListener: any; removeEventListener: any; accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly hidden: { valueOf: any; }; readonly images: { item: any; namedItem: any; readonly length: any; }; readonly implementation: { createDocument: any; createDocumentType: any; createHTMLDocument: any; hasFeature: any; }; readonly inputEncoding: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly lastModified: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; linkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly links: { item: any; namedItem: any; readonly length: any; }; location: { readonly ancestorOrigins: any; hash: any; host: any; hostname: any; href: any; toString: any; readonly origin: any; pathname: any; port: any; protocol: any; search: any; assign: any; reload: any; replace: any; }; onfullscreenchange: unknown; onfullscreenerror: unknown; onpointerlockchange: unknown; onpointerlockerror: unknown; onreadystatechange: unknown; onvisibilitychange: unknown; readonly origin: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly plugins: { item: any; namedItem: any; readonly length: any; }; readonly readyState: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly referrer: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly scripts: { item: any; namedItem: any; readonly length: any; }; readonly scrollingElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly timeline: { readonly currentTime: any; }; title: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly visibilityState: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; vlinkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; adoptNode: unknown; captureEvents: unknown; caretPositionFromPoint: unknown; caretRangeFromPoint: unknown; clear: unknown; close: unknown; createAttribute: unknown; createAttributeNS: unknown; createCDATASection: unknown; createComment: unknown; createDocumentFragment: unknown; createElement: unknown; createElementNS: unknown; createEvent: unknown; createNodeIterator: unknown; createProcessingInstruction: unknown; createRange: unknown; createTextNode: unknown; createTreeWalker: unknown; elementFromPoint: unknown; elementsFromPoint: unknown; execCommand: unknown; exitFullscreen: unknown; exitPointerLock: unknown; getAnimations: unknown; getElementById: unknown; getElementsByClassName: unknown; getElementsByName: unknown; getElementsByTagName: unknown; getElementsByTagNameNS: unknown; getSelection: unknown; hasFocus: unknown; importNode: unknown; open: unknown; queryCommandEnabled: unknown; queryCommandIndeterm: unknown; queryCommandState: unknown; queryCommandSupported: unknown; queryCommandValue: unknown; releaseEvents: unknown; write: unknown; writeln: unknown; addEventListener: unknown; removeEventListener: unknown; readonly baseURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly childNodes: { length: any; item: any; forEach: any; }; readonly firstChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly isConnected: { valueOf: any; }; readonly lastChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly namespaceURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nextSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly nodeName: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nodeType: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; nodeValue: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly ownerDocument: { readonly URL: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly parentElement: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly parentNode: { readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly previousSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; textContent: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; appendChild: unknown; cloneNode: unknown; compareDocumentPosition: unknown; contains: unknown; getRootNode: unknown; hasChildNodes: unknown; insertBefore: unknown; isDefaultNamespace: unknown; isEqualNode: unknown; isSameNode: unknown; lookupNamespaceURI: unknown; lookupPrefix: unknown; normalize: unknown; removeChild: unknown; replaceChild: unknown; readonly ATTRIBUTE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly CDATA_SECTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly COMMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_FRAGMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINED_BY: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINS: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_DISCONNECTED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_FOLLOWING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_PRECEDING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_TYPE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ELEMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_REFERENCE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly NOTATION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly PROCESSING_INSTRUCTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly TEXT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; dispatchEvent: unknown; oncopy: unknown; oncut: unknown; onpaste: unknown; readonly activeElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly fullscreenElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly pointerLockElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly styleSheets: { readonly length: any; item: any; }; onabort: unknown; onanimationcancel: unknown; onanimationend: unknown; onanimationiteration: unknown; onanimationstart: unknown; onauxclick: unknown; onblur: unknown; oncancel: unknown; oncanplay: unknown; oncanplaythrough: unknown; onchange: unknown; onclick: unknown; onclose: unknown; oncontextmenu: unknown; oncuechange: unknown; ondblclick: unknown; ondrag: unknown; ondragend: unknown; ondragenter: unknown; ondragexit: unknown; ondragleave: unknown; ondragover: unknown; ondragstart: unknown; ondrop: unknown; ondurationchange: unknown; onemptied: unknown; onended: unknown; onerror: unknown; onfocus: unknown; ongotpointercapture: unknown; oninput: unknown; oninvalid: unknown; onkeydown: unknown; onkeypress: unknown; onkeyup: unknown; onload: unknown; onloadeddata: unknown; onloadedmetadata: unknown; onloadstart: unknown; onlostpointercapture: unknown; onmousedown: unknown; onmouseenter: unknown; onmouseleave: unknown; onmousemove: unknown; onmouseout: unknown; onmouseover: unknown; onmouseup: unknown; onpause: unknown; onplay: unknown; onplaying: unknown; onpointercancel: unknown; onpointerdown: unknown; onpointerenter: unknown; onpointerleave: unknown; onpointermove: unknown; onpointerout: unknown; onpointerover: unknown; onpointerup: unknown; onprogress: unknown; onratechange: unknown; onreset: unknown; onresize: unknown; onscroll: unknown; onsecuritypolicyviolation: unknown; onseeked: unknown; onseeking: unknown; onselect: unknown; onselectionchange: unknown; onselectstart: unknown; onstalled: unknown; onsubmit: unknown; onsuspend: unknown; ontimeupdate: unknown; ontoggle: unknown; ontouchcancel?: unknown; ontouchend?: unknown; ontouchmove?: unknown; ontouchstart?: unknown; ontransitioncancel: unknown; ontransitionend: unknown; ontransitionrun: unknown; ontransitionstart: unknown; onvolumechange: unknown; onwaiting: unknown; onwheel: unknown; readonly childElementCount: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly children: { namedItem: any; readonly length: any; item: any; }; readonly firstElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly lastElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; append: unknown; prepend: unknown; querySelector: unknown; querySelectorAll: unknown; createExpression: unknown; createNSResolver: unknown; evaluate: unknown; } +>out2 : { onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; } +>responseXML : { readonly URL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; alinkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly all: { readonly length: any; item: any; namedItem: any; }; readonly anchors: { item: any; namedItem: any; readonly length: any; }; readonly applets: { item: any; namedItem: any; readonly length: any; }; bgColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; body: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly characterSet: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly charset: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly compatMode: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly contentType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; cookie: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly currentScript: { async: any; charset: any; crossOrigin: any; defer: any; event: any; htmlFor: any; integrity: any; noModule: any; referrerPolicy: any; src: any; text: any; type: any; addEventListener: any; removeEventListener: any; accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; } | { type: any; addEventListener: any; removeEventListener: any; readonly className: any; readonly ownerSVGElement: any; readonly viewportElement: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; readonly correspondingElement: any; readonly correspondingUseElement: any; readonly href: any; }; readonly defaultView: { readonly applicationCache: any; readonly clientInformation: any; readonly closed: any; customElements: any; defaultStatus: any; readonly devicePixelRatio: any; readonly doNotTrack: any; readonly document: any; readonly event: any; readonly external: any; readonly frameElement: any; readonly frames: any; readonly history: any; readonly innerHeight: any; readonly innerWidth: any; readonly isSecureContext: any; readonly length: any; location: any; readonly locationbar: any; readonly menubar: any; readonly msContentScript: any; name: any; readonly navigator: any; offscreenBuffering: any; oncompassneedscalibration: any; ondevicelight: any; ondevicemotion: any; ondeviceorientation: any; ondeviceorientationabsolute: any; onmousewheel: any; onmsgesturechange: any; onmsgesturedoubletap: any; onmsgestureend: any; onmsgesturehold: any; onmsgesturestart: any; onmsgesturetap: any; onmsinertiastart: any; onmspointercancel: any; onmspointerdown: any; onmspointerenter: any; onmspointerleave: any; onmspointermove: any; onmspointerout: any; onmspointerover: any; onmspointerup: any; onorientationchange: any; onreadystatechange: any; onvrdisplayactivate: any; onvrdisplayblur: any; onvrdisplayconnect: any; onvrdisplaydeactivate: any; onvrdisplaydisconnect: any; onvrdisplayfocus: any; onvrdisplaypointerrestricted: any; onvrdisplaypointerunrestricted: any; onvrdisplaypresentchange: any; opener: any; readonly orientation: any; readonly outerHeight: any; readonly outerWidth: any; readonly pageXOffset: any; readonly pageYOffset: any; readonly parent: any; readonly personalbar: any; readonly screen: any; readonly screenLeft: any; readonly screenTop: any; readonly screenX: any; readonly screenY: any; readonly scrollX: any; readonly scrollY: any; readonly scrollbars: any; readonly self: any; readonly speechSynthesis: any; status: any; readonly statusbar: any; readonly styleMedia: any; readonly toolbar: any; readonly top: any; readonly window: any; alert: any; blur: any; captureEvents: any; close: any; confirm: any; departFocus: any; focus: any; getComputedStyle: any; getMatchedCSSRules: any; getSelection: any; matchMedia: any; moveBy: any; moveTo: any; msWriteProfilerMark: any; open: any; postMessage: any; print: any; prompt: any; releaseEvents: any; resizeBy: any; resizeTo: any; scroll: any; scrollBy: any; scrollTo: any; stop: any; webkitCancelAnimationFrame: any; webkitConvertPointFromNodeToPage: any; webkitConvertPointFromPageToNode: any; webkitRequestAnimationFrame: any; addEventListener: any; removeEventListener: any; dispatchEvent: any; cancelAnimationFrame: any; requestAnimationFrame: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly console: any; onafterprint: any; onbeforeprint: any; onbeforeunload: any; onhashchange: any; onlanguagechange: any; onmessage: any; onmessageerror: any; onoffline: any; ononline: any; onpagehide: any; onpageshow: any; onpopstate: any; onrejectionhandled: any; onstorage: any; onunhandledrejection: any; onunload: any; readonly localStorage: any; readonly caches: any; readonly crypto: any; readonly indexedDB: any; readonly origin: any; readonly performance: any; atob: any; btoa: any; clearInterval: any; clearTimeout: any; createImageBitmap: any; fetch: any; queueMicrotask: any; setInterval: any; setTimeout: any; readonly sessionStorage: any; }; designMode: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; dir: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly doctype: { readonly name: any; readonly publicId: any; readonly systemId: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; after: any; before: any; remove: any; replaceWith: any; }; readonly documentElement: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly documentURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; domain: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly embeds: { item: any; namedItem: any; readonly length: any; }; fgColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly forms: { item: any; namedItem: any; readonly length: any; }; readonly fullscreen: { valueOf: any; }; readonly fullscreenEnabled: { valueOf: any; }; readonly head: { addEventListener: any; removeEventListener: any; accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly hidden: { valueOf: any; }; readonly images: { item: any; namedItem: any; readonly length: any; }; readonly implementation: { createDocument: any; createDocumentType: any; createHTMLDocument: any; hasFeature: any; }; readonly inputEncoding: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly lastModified: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; linkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly links: { item: any; namedItem: any; readonly length: any; }; location: { readonly ancestorOrigins: any; hash: any; host: any; hostname: any; href: any; toString: any; readonly origin: any; pathname: any; port: any; protocol: any; search: any; assign: any; reload: any; replace: any; }; onfullscreenchange: unknown; onfullscreenerror: unknown; onpointerlockchange: unknown; onpointerlockerror: unknown; onreadystatechange: unknown; onvisibilitychange: unknown; readonly origin: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly plugins: { item: any; namedItem: any; readonly length: any; }; readonly readyState: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly referrer: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly scripts: { item: any; namedItem: any; readonly length: any; }; readonly scrollingElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly timeline: { readonly currentTime: any; }; title: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly visibilityState: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; vlinkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; adoptNode: unknown; captureEvents: unknown; caretPositionFromPoint: unknown; caretRangeFromPoint: unknown; clear: unknown; close: unknown; createAttribute: unknown; createAttributeNS: unknown; createCDATASection: unknown; createComment: unknown; createDocumentFragment: unknown; createElement: unknown; createElementNS: unknown; createEvent: unknown; createNodeIterator: unknown; createProcessingInstruction: unknown; createRange: unknown; createTextNode: unknown; createTreeWalker: unknown; elementFromPoint: unknown; elementsFromPoint: unknown; execCommand: unknown; exitFullscreen: unknown; exitPointerLock: unknown; getAnimations: unknown; getElementById: unknown; getElementsByClassName: unknown; getElementsByName: unknown; getElementsByTagName: unknown; getElementsByTagNameNS: unknown; getSelection: unknown; hasFocus: unknown; importNode: unknown; open: unknown; queryCommandEnabled: unknown; queryCommandIndeterm: unknown; queryCommandState: unknown; queryCommandSupported: unknown; queryCommandValue: unknown; releaseEvents: unknown; write: unknown; writeln: unknown; addEventListener: unknown; removeEventListener: unknown; readonly baseURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly childNodes: { length: any; item: any; forEach: any; }; readonly firstChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly isConnected: { valueOf: any; }; readonly lastChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly namespaceURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nextSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly nodeName: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nodeType: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; nodeValue: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly ownerDocument: { readonly URL: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly parentElement: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly parentNode: { readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly previousSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; textContent: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; appendChild: unknown; cloneNode: unknown; compareDocumentPosition: unknown; contains: unknown; getRootNode: unknown; hasChildNodes: unknown; insertBefore: unknown; isDefaultNamespace: unknown; isEqualNode: unknown; isSameNode: unknown; lookupNamespaceURI: unknown; lookupPrefix: unknown; normalize: unknown; removeChild: unknown; replaceChild: unknown; readonly ATTRIBUTE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly CDATA_SECTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly COMMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_FRAGMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINED_BY: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINS: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_DISCONNECTED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_FOLLOWING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_PRECEDING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_TYPE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ELEMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_REFERENCE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly NOTATION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly PROCESSING_INSTRUCTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly TEXT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; dispatchEvent: unknown; oncopy: unknown; oncut: unknown; onpaste: unknown; readonly activeElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly fullscreenElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly pointerLockElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly styleSheets: { readonly length: any; item: any; }; onabort: unknown; onanimationcancel: unknown; onanimationend: unknown; onanimationiteration: unknown; onanimationstart: unknown; onauxclick: unknown; onblur: unknown; oncancel: unknown; oncanplay: unknown; oncanplaythrough: unknown; onchange: unknown; onclick: unknown; onclose: unknown; oncontextmenu: unknown; oncuechange: unknown; ondblclick: unknown; ondrag: unknown; ondragend: unknown; ondragenter: unknown; ondragexit: unknown; ondragleave: unknown; ondragover: unknown; ondragstart: unknown; ondrop: unknown; ondurationchange: unknown; onemptied: unknown; onended: unknown; onerror: unknown; onfocus: unknown; ongotpointercapture: unknown; oninput: unknown; oninvalid: unknown; onkeydown: unknown; onkeypress: unknown; onkeyup: unknown; onload: unknown; onloadeddata: unknown; onloadedmetadata: unknown; onloadstart: unknown; onlostpointercapture: unknown; onmousedown: unknown; onmouseenter: unknown; onmouseleave: unknown; onmousemove: unknown; onmouseout: unknown; onmouseover: unknown; onmouseup: unknown; onpause: unknown; onplay: unknown; onplaying: unknown; onpointercancel: unknown; onpointerdown: unknown; onpointerenter: unknown; onpointerleave: unknown; onpointermove: unknown; onpointerout: unknown; onpointerover: unknown; onpointerup: unknown; onprogress: unknown; onratechange: unknown; onreset: unknown; onresize: unknown; onscroll: unknown; onsecuritypolicyviolation: unknown; onseeked: unknown; onseeking: unknown; onselect: unknown; onselectionchange: unknown; onselectstart: unknown; onstalled: unknown; onsubmit: unknown; onsuspend: unknown; ontimeupdate: unknown; ontoggle: unknown; ontouchcancel?: unknown; ontouchend?: unknown; ontouchmove?: unknown; ontouchstart?: unknown; ontransitioncancel: unknown; ontransitionend: unknown; ontransitionrun: unknown; ontransitionstart: unknown; onvolumechange: unknown; onwaiting: unknown; onwheel: unknown; readonly childElementCount: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly children: { namedItem: any; readonly length: any; item: any; }; readonly firstElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly lastElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; append: unknown; prepend: unknown; querySelector: unknown; querySelectorAll: unknown; createExpression: unknown; createNSResolver: unknown; evaluate: unknown; } out2.responseXML.activeElement.className.length ->out2.responseXML.activeElement.className.length : any ->out2.responseXML.activeElement.className : any ->out2.responseXML.activeElement : any ->out2.responseXML : any ->out2 : any ->responseXML : any ->activeElement : any ->className : any ->length : any +>out2.responseXML.activeElement.className.length : { toString: unknown; toFixed: unknown; toExponential: unknown; toPrecision: unknown; valueOf: unknown; toLocaleString: unknown; } +>out2.responseXML.activeElement.className : { toString: unknown; charAt: unknown; charCodeAt: unknown; concat: unknown; indexOf: unknown; lastIndexOf: unknown; localeCompare: unknown; match: unknown; replace: unknown; search: unknown; slice: unknown; split: unknown; substring: unknown; toLowerCase: unknown; toLocaleLowerCase: unknown; toUpperCase: unknown; toLocaleUpperCase: unknown; trim: unknown; readonly length: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; substr: unknown; valueOf: unknown; codePointAt: unknown; includes: unknown; endsWith: unknown; normalize: unknown; repeat: unknown; startsWith: unknown; anchor: unknown; big: unknown; blink: unknown; bold: unknown; fixed: unknown; fontcolor: unknown; fontsize: unknown; italics: unknown; link: unknown; small: unknown; strike: unknown; sub: unknown; sup: unknown; [Symbol.iterator]: unknown; } +>out2.responseXML.activeElement : { readonly assignedSlot: { name: any; assignedElements: any; assignedNodes: any; addEventListener: any; removeEventListener: any; accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly attributes: { readonly length: any; getNamedItem: any; getNamedItemNS: any; item: any; removeNamedItem: any; removeNamedItemNS: any; setNamedItem: any; setNamedItemNS: any; }; readonly classList: { readonly length: any; value: any; toString: any; add: any; contains: any; item: any; remove: any; replace: any; supports: any; toggle: any; forEach: any; }; className: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly clientHeight: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly clientLeft: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly clientTop: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly clientWidth: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; id: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly localName: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly namespaceURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; onfullscreenchange: unknown; onfullscreenerror: unknown; outerHTML: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly prefix: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly scrollHeight: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; scrollLeft: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; scrollTop: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly scrollWidth: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly shadowRoot: { readonly host: any; readonly mode: any; getElementById: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; caretPositionFromPoint: any; caretRangeFromPoint: any; elementFromPoint: any; elementsFromPoint: any; getSelection: any; innerHTML: any; }; slot: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly tagName: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; attachShadow: unknown; closest: unknown; getAttribute: unknown; getAttributeNS: unknown; getAttributeNames: unknown; getAttributeNode: unknown; getAttributeNodeNS: unknown; getBoundingClientRect: unknown; getClientRects: unknown; getElementsByClassName: unknown; getElementsByTagName: unknown; getElementsByTagNameNS: unknown; hasAttribute: unknown; hasAttributeNS: unknown; hasAttributes: unknown; hasPointerCapture: unknown; insertAdjacentElement: unknown; insertAdjacentHTML: unknown; insertAdjacentText: unknown; matches: unknown; msGetRegionContent: unknown; releasePointerCapture: unknown; removeAttribute: unknown; removeAttributeNS: unknown; removeAttributeNode: unknown; requestFullscreen: unknown; requestPointerLock: unknown; scroll: unknown; scrollBy: unknown; scrollIntoView: unknown; scrollTo: unknown; setAttribute: unknown; setAttributeNS: unknown; setAttributeNode: unknown; setAttributeNodeNS: unknown; setPointerCapture: unknown; toggleAttribute: unknown; webkitMatchesSelector: unknown; addEventListener: unknown; removeEventListener: unknown; readonly baseURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly childNodes: { length: any; item: any; forEach: any; }; readonly firstChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly isConnected: { valueOf: any; }; readonly lastChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly nextSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly nodeName: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nodeType: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; nodeValue: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly ownerDocument: { readonly URL: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly parentElement: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly parentNode: { readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly previousSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; textContent: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; appendChild: unknown; cloneNode: unknown; compareDocumentPosition: unknown; contains: unknown; getRootNode: unknown; hasChildNodes: unknown; insertBefore: unknown; isDefaultNamespace: unknown; isEqualNode: unknown; isSameNode: unknown; lookupNamespaceURI: unknown; lookupPrefix: unknown; normalize: unknown; removeChild: unknown; replaceChild: unknown; readonly ATTRIBUTE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly CDATA_SECTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly COMMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_FRAGMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINED_BY: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINS: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_DISCONNECTED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_FOLLOWING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_PRECEDING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_TYPE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ELEMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_REFERENCE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly NOTATION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly PROCESSING_INSTRUCTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly TEXT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; dispatchEvent: unknown; animate: unknown; getAnimations: unknown; after: unknown; before: unknown; remove: unknown; replaceWith: unknown; innerHTML: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nextElementSibling: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly previousElementSibling: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly childElementCount: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly children: { namedItem: any; readonly length: any; item: any; }; readonly firstElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly lastElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; append: unknown; prepend: unknown; querySelector: unknown; querySelectorAll: unknown; } +>out2.responseXML : { readonly URL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; alinkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly all: { readonly length: any; item: any; namedItem: any; }; readonly anchors: { item: any; namedItem: any; readonly length: any; }; readonly applets: { item: any; namedItem: any; readonly length: any; }; bgColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; body: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly characterSet: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly charset: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly compatMode: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly contentType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; cookie: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly currentScript: { async: any; charset: any; crossOrigin: any; defer: any; event: any; htmlFor: any; integrity: any; noModule: any; referrerPolicy: any; src: any; text: any; type: any; addEventListener: any; removeEventListener: any; accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; } | { type: any; addEventListener: any; removeEventListener: any; readonly className: any; readonly ownerSVGElement: any; readonly viewportElement: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; readonly correspondingElement: any; readonly correspondingUseElement: any; readonly href: any; }; readonly defaultView: { readonly applicationCache: any; readonly clientInformation: any; readonly closed: any; customElements: any; defaultStatus: any; readonly devicePixelRatio: any; readonly doNotTrack: any; readonly document: any; readonly event: any; readonly external: any; readonly frameElement: any; readonly frames: any; readonly history: any; readonly innerHeight: any; readonly innerWidth: any; readonly isSecureContext: any; readonly length: any; location: any; readonly locationbar: any; readonly menubar: any; readonly msContentScript: any; name: any; readonly navigator: any; offscreenBuffering: any; oncompassneedscalibration: any; ondevicelight: any; ondevicemotion: any; ondeviceorientation: any; ondeviceorientationabsolute: any; onmousewheel: any; onmsgesturechange: any; onmsgesturedoubletap: any; onmsgestureend: any; onmsgesturehold: any; onmsgesturestart: any; onmsgesturetap: any; onmsinertiastart: any; onmspointercancel: any; onmspointerdown: any; onmspointerenter: any; onmspointerleave: any; onmspointermove: any; onmspointerout: any; onmspointerover: any; onmspointerup: any; onorientationchange: any; onreadystatechange: any; onvrdisplayactivate: any; onvrdisplayblur: any; onvrdisplayconnect: any; onvrdisplaydeactivate: any; onvrdisplaydisconnect: any; onvrdisplayfocus: any; onvrdisplaypointerrestricted: any; onvrdisplaypointerunrestricted: any; onvrdisplaypresentchange: any; opener: any; readonly orientation: any; readonly outerHeight: any; readonly outerWidth: any; readonly pageXOffset: any; readonly pageYOffset: any; readonly parent: any; readonly personalbar: any; readonly screen: any; readonly screenLeft: any; readonly screenTop: any; readonly screenX: any; readonly screenY: any; readonly scrollX: any; readonly scrollY: any; readonly scrollbars: any; readonly self: any; readonly speechSynthesis: any; status: any; readonly statusbar: any; readonly styleMedia: any; readonly toolbar: any; readonly top: any; readonly window: any; alert: any; blur: any; captureEvents: any; close: any; confirm: any; departFocus: any; focus: any; getComputedStyle: any; getMatchedCSSRules: any; getSelection: any; matchMedia: any; moveBy: any; moveTo: any; msWriteProfilerMark: any; open: any; postMessage: any; print: any; prompt: any; releaseEvents: any; resizeBy: any; resizeTo: any; scroll: any; scrollBy: any; scrollTo: any; stop: any; webkitCancelAnimationFrame: any; webkitConvertPointFromNodeToPage: any; webkitConvertPointFromPageToNode: any; webkitRequestAnimationFrame: any; addEventListener: any; removeEventListener: any; dispatchEvent: any; cancelAnimationFrame: any; requestAnimationFrame: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly console: any; onafterprint: any; onbeforeprint: any; onbeforeunload: any; onhashchange: any; onlanguagechange: any; onmessage: any; onmessageerror: any; onoffline: any; ononline: any; onpagehide: any; onpageshow: any; onpopstate: any; onrejectionhandled: any; onstorage: any; onunhandledrejection: any; onunload: any; readonly localStorage: any; readonly caches: any; readonly crypto: any; readonly indexedDB: any; readonly origin: any; readonly performance: any; atob: any; btoa: any; clearInterval: any; clearTimeout: any; createImageBitmap: any; fetch: any; queueMicrotask: any; setInterval: any; setTimeout: any; readonly sessionStorage: any; }; designMode: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; dir: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly doctype: { readonly name: any; readonly publicId: any; readonly systemId: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; after: any; before: any; remove: any; replaceWith: any; }; readonly documentElement: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly documentURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; domain: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly embeds: { item: any; namedItem: any; readonly length: any; }; fgColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly forms: { item: any; namedItem: any; readonly length: any; }; readonly fullscreen: { valueOf: any; }; readonly fullscreenEnabled: { valueOf: any; }; readonly head: { addEventListener: any; removeEventListener: any; accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly hidden: { valueOf: any; }; readonly images: { item: any; namedItem: any; readonly length: any; }; readonly implementation: { createDocument: any; createDocumentType: any; createHTMLDocument: any; hasFeature: any; }; readonly inputEncoding: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly lastModified: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; linkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly links: { item: any; namedItem: any; readonly length: any; }; location: { readonly ancestorOrigins: any; hash: any; host: any; hostname: any; href: any; toString: any; readonly origin: any; pathname: any; port: any; protocol: any; search: any; assign: any; reload: any; replace: any; }; onfullscreenchange: unknown; onfullscreenerror: unknown; onpointerlockchange: unknown; onpointerlockerror: unknown; onreadystatechange: unknown; onvisibilitychange: unknown; readonly origin: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly plugins: { item: any; namedItem: any; readonly length: any; }; readonly readyState: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly referrer: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly scripts: { item: any; namedItem: any; readonly length: any; }; readonly scrollingElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly timeline: { readonly currentTime: any; }; title: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly visibilityState: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; vlinkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; adoptNode: unknown; captureEvents: unknown; caretPositionFromPoint: unknown; caretRangeFromPoint: unknown; clear: unknown; close: unknown; createAttribute: unknown; createAttributeNS: unknown; createCDATASection: unknown; createComment: unknown; createDocumentFragment: unknown; createElement: unknown; createElementNS: unknown; createEvent: unknown; createNodeIterator: unknown; createProcessingInstruction: unknown; createRange: unknown; createTextNode: unknown; createTreeWalker: unknown; elementFromPoint: unknown; elementsFromPoint: unknown; execCommand: unknown; exitFullscreen: unknown; exitPointerLock: unknown; getAnimations: unknown; getElementById: unknown; getElementsByClassName: unknown; getElementsByName: unknown; getElementsByTagName: unknown; getElementsByTagNameNS: unknown; getSelection: unknown; hasFocus: unknown; importNode: unknown; open: unknown; queryCommandEnabled: unknown; queryCommandIndeterm: unknown; queryCommandState: unknown; queryCommandSupported: unknown; queryCommandValue: unknown; releaseEvents: unknown; write: unknown; writeln: unknown; addEventListener: unknown; removeEventListener: unknown; readonly baseURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly childNodes: { length: any; item: any; forEach: any; }; readonly firstChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly isConnected: { valueOf: any; }; readonly lastChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly namespaceURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nextSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly nodeName: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nodeType: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; nodeValue: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly ownerDocument: { readonly URL: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly parentElement: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly parentNode: { readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly previousSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; textContent: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; appendChild: unknown; cloneNode: unknown; compareDocumentPosition: unknown; contains: unknown; getRootNode: unknown; hasChildNodes: unknown; insertBefore: unknown; isDefaultNamespace: unknown; isEqualNode: unknown; isSameNode: unknown; lookupNamespaceURI: unknown; lookupPrefix: unknown; normalize: unknown; removeChild: unknown; replaceChild: unknown; readonly ATTRIBUTE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly CDATA_SECTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly COMMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_FRAGMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINED_BY: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINS: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_DISCONNECTED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_FOLLOWING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_PRECEDING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_TYPE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ELEMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_REFERENCE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly NOTATION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly PROCESSING_INSTRUCTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly TEXT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; dispatchEvent: unknown; oncopy: unknown; oncut: unknown; onpaste: unknown; readonly activeElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly fullscreenElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly pointerLockElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly styleSheets: { readonly length: any; item: any; }; onabort: unknown; onanimationcancel: unknown; onanimationend: unknown; onanimationiteration: unknown; onanimationstart: unknown; onauxclick: unknown; onblur: unknown; oncancel: unknown; oncanplay: unknown; oncanplaythrough: unknown; onchange: unknown; onclick: unknown; onclose: unknown; oncontextmenu: unknown; oncuechange: unknown; ondblclick: unknown; ondrag: unknown; ondragend: unknown; ondragenter: unknown; ondragexit: unknown; ondragleave: unknown; ondragover: unknown; ondragstart: unknown; ondrop: unknown; ondurationchange: unknown; onemptied: unknown; onended: unknown; onerror: unknown; onfocus: unknown; ongotpointercapture: unknown; oninput: unknown; oninvalid: unknown; onkeydown: unknown; onkeypress: unknown; onkeyup: unknown; onload: unknown; onloadeddata: unknown; onloadedmetadata: unknown; onloadstart: unknown; onlostpointercapture: unknown; onmousedown: unknown; onmouseenter: unknown; onmouseleave: unknown; onmousemove: unknown; onmouseout: unknown; onmouseover: unknown; onmouseup: unknown; onpause: unknown; onplay: unknown; onplaying: unknown; onpointercancel: unknown; onpointerdown: unknown; onpointerenter: unknown; onpointerleave: unknown; onpointermove: unknown; onpointerout: unknown; onpointerover: unknown; onpointerup: unknown; onprogress: unknown; onratechange: unknown; onreset: unknown; onresize: unknown; onscroll: unknown; onsecuritypolicyviolation: unknown; onseeked: unknown; onseeking: unknown; onselect: unknown; onselectionchange: unknown; onselectstart: unknown; onstalled: unknown; onsubmit: unknown; onsuspend: unknown; ontimeupdate: unknown; ontoggle: unknown; ontouchcancel?: unknown; ontouchend?: unknown; ontouchmove?: unknown; ontouchstart?: unknown; ontransitioncancel: unknown; ontransitionend: unknown; ontransitionrun: unknown; ontransitionstart: unknown; onvolumechange: unknown; onwaiting: unknown; onwheel: unknown; readonly childElementCount: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly children: { namedItem: any; readonly length: any; item: any; }; readonly firstElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly lastElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; append: unknown; prepend: unknown; querySelector: unknown; querySelectorAll: unknown; createExpression: unknown; createNSResolver: unknown; evaluate: unknown; } +>out2 : { onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; } +>responseXML : { readonly URL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; alinkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly all: { readonly length: any; item: any; namedItem: any; }; readonly anchors: { item: any; namedItem: any; readonly length: any; }; readonly applets: { item: any; namedItem: any; readonly length: any; }; bgColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; body: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly characterSet: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly charset: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly compatMode: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly contentType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; cookie: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly currentScript: { async: any; charset: any; crossOrigin: any; defer: any; event: any; htmlFor: any; integrity: any; noModule: any; referrerPolicy: any; src: any; text: any; type: any; addEventListener: any; removeEventListener: any; accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; } | { type: any; addEventListener: any; removeEventListener: any; readonly className: any; readonly ownerSVGElement: any; readonly viewportElement: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; readonly correspondingElement: any; readonly correspondingUseElement: any; readonly href: any; }; readonly defaultView: { readonly applicationCache: any; readonly clientInformation: any; readonly closed: any; customElements: any; defaultStatus: any; readonly devicePixelRatio: any; readonly doNotTrack: any; readonly document: any; readonly event: any; readonly external: any; readonly frameElement: any; readonly frames: any; readonly history: any; readonly innerHeight: any; readonly innerWidth: any; readonly isSecureContext: any; readonly length: any; location: any; readonly locationbar: any; readonly menubar: any; readonly msContentScript: any; name: any; readonly navigator: any; offscreenBuffering: any; oncompassneedscalibration: any; ondevicelight: any; ondevicemotion: any; ondeviceorientation: any; ondeviceorientationabsolute: any; onmousewheel: any; onmsgesturechange: any; onmsgesturedoubletap: any; onmsgestureend: any; onmsgesturehold: any; onmsgesturestart: any; onmsgesturetap: any; onmsinertiastart: any; onmspointercancel: any; onmspointerdown: any; onmspointerenter: any; onmspointerleave: any; onmspointermove: any; onmspointerout: any; onmspointerover: any; onmspointerup: any; onorientationchange: any; onreadystatechange: any; onvrdisplayactivate: any; onvrdisplayblur: any; onvrdisplayconnect: any; onvrdisplaydeactivate: any; onvrdisplaydisconnect: any; onvrdisplayfocus: any; onvrdisplaypointerrestricted: any; onvrdisplaypointerunrestricted: any; onvrdisplaypresentchange: any; opener: any; readonly orientation: any; readonly outerHeight: any; readonly outerWidth: any; readonly pageXOffset: any; readonly pageYOffset: any; readonly parent: any; readonly personalbar: any; readonly screen: any; readonly screenLeft: any; readonly screenTop: any; readonly screenX: any; readonly screenY: any; readonly scrollX: any; readonly scrollY: any; readonly scrollbars: any; readonly self: any; readonly speechSynthesis: any; status: any; readonly statusbar: any; readonly styleMedia: any; readonly toolbar: any; readonly top: any; readonly window: any; alert: any; blur: any; captureEvents: any; close: any; confirm: any; departFocus: any; focus: any; getComputedStyle: any; getMatchedCSSRules: any; getSelection: any; matchMedia: any; moveBy: any; moveTo: any; msWriteProfilerMark: any; open: any; postMessage: any; print: any; prompt: any; releaseEvents: any; resizeBy: any; resizeTo: any; scroll: any; scrollBy: any; scrollTo: any; stop: any; webkitCancelAnimationFrame: any; webkitConvertPointFromNodeToPage: any; webkitConvertPointFromPageToNode: any; webkitRequestAnimationFrame: any; addEventListener: any; removeEventListener: any; dispatchEvent: any; cancelAnimationFrame: any; requestAnimationFrame: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly console: any; onafterprint: any; onbeforeprint: any; onbeforeunload: any; onhashchange: any; onlanguagechange: any; onmessage: any; onmessageerror: any; onoffline: any; ononline: any; onpagehide: any; onpageshow: any; onpopstate: any; onrejectionhandled: any; onstorage: any; onunhandledrejection: any; onunload: any; readonly localStorage: any; readonly caches: any; readonly crypto: any; readonly indexedDB: any; readonly origin: any; readonly performance: any; atob: any; btoa: any; clearInterval: any; clearTimeout: any; createImageBitmap: any; fetch: any; queueMicrotask: any; setInterval: any; setTimeout: any; readonly sessionStorage: any; }; designMode: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; dir: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly doctype: { readonly name: any; readonly publicId: any; readonly systemId: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; after: any; before: any; remove: any; replaceWith: any; }; readonly documentElement: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly documentURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; domain: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly embeds: { item: any; namedItem: any; readonly length: any; }; fgColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly forms: { item: any; namedItem: any; readonly length: any; }; readonly fullscreen: { valueOf: any; }; readonly fullscreenEnabled: { valueOf: any; }; readonly head: { addEventListener: any; removeEventListener: any; accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly hidden: { valueOf: any; }; readonly images: { item: any; namedItem: any; readonly length: any; }; readonly implementation: { createDocument: any; createDocumentType: any; createHTMLDocument: any; hasFeature: any; }; readonly inputEncoding: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly lastModified: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; linkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly links: { item: any; namedItem: any; readonly length: any; }; location: { readonly ancestorOrigins: any; hash: any; host: any; hostname: any; href: any; toString: any; readonly origin: any; pathname: any; port: any; protocol: any; search: any; assign: any; reload: any; replace: any; }; onfullscreenchange: unknown; onfullscreenerror: unknown; onpointerlockchange: unknown; onpointerlockerror: unknown; onreadystatechange: unknown; onvisibilitychange: unknown; readonly origin: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly plugins: { item: any; namedItem: any; readonly length: any; }; readonly readyState: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly referrer: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly scripts: { item: any; namedItem: any; readonly length: any; }; readonly scrollingElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly timeline: { readonly currentTime: any; }; title: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly visibilityState: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; vlinkColor: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; adoptNode: unknown; captureEvents: unknown; caretPositionFromPoint: unknown; caretRangeFromPoint: unknown; clear: unknown; close: unknown; createAttribute: unknown; createAttributeNS: unknown; createCDATASection: unknown; createComment: unknown; createDocumentFragment: unknown; createElement: unknown; createElementNS: unknown; createEvent: unknown; createNodeIterator: unknown; createProcessingInstruction: unknown; createRange: unknown; createTextNode: unknown; createTreeWalker: unknown; elementFromPoint: unknown; elementsFromPoint: unknown; execCommand: unknown; exitFullscreen: unknown; exitPointerLock: unknown; getAnimations: unknown; getElementById: unknown; getElementsByClassName: unknown; getElementsByName: unknown; getElementsByTagName: unknown; getElementsByTagNameNS: unknown; getSelection: unknown; hasFocus: unknown; importNode: unknown; open: unknown; queryCommandEnabled: unknown; queryCommandIndeterm: unknown; queryCommandState: unknown; queryCommandSupported: unknown; queryCommandValue: unknown; releaseEvents: unknown; write: unknown; writeln: unknown; addEventListener: unknown; removeEventListener: unknown; readonly baseURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly childNodes: { length: any; item: any; forEach: any; }; readonly firstChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly isConnected: { valueOf: any; }; readonly lastChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly namespaceURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nextSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly nodeName: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nodeType: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; nodeValue: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly ownerDocument: { readonly URL: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly parentElement: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly parentNode: { readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly previousSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; textContent: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; appendChild: unknown; cloneNode: unknown; compareDocumentPosition: unknown; contains: unknown; getRootNode: unknown; hasChildNodes: unknown; insertBefore: unknown; isDefaultNamespace: unknown; isEqualNode: unknown; isSameNode: unknown; lookupNamespaceURI: unknown; lookupPrefix: unknown; normalize: unknown; removeChild: unknown; replaceChild: unknown; readonly ATTRIBUTE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly CDATA_SECTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly COMMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_FRAGMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINED_BY: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINS: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_DISCONNECTED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_FOLLOWING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_PRECEDING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_TYPE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ELEMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_REFERENCE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly NOTATION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly PROCESSING_INSTRUCTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly TEXT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; dispatchEvent: unknown; oncopy: unknown; oncut: unknown; onpaste: unknown; readonly activeElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly fullscreenElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly pointerLockElement: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly styleSheets: { readonly length: any; item: any; }; onabort: unknown; onanimationcancel: unknown; onanimationend: unknown; onanimationiteration: unknown; onanimationstart: unknown; onauxclick: unknown; onblur: unknown; oncancel: unknown; oncanplay: unknown; oncanplaythrough: unknown; onchange: unknown; onclick: unknown; onclose: unknown; oncontextmenu: unknown; oncuechange: unknown; ondblclick: unknown; ondrag: unknown; ondragend: unknown; ondragenter: unknown; ondragexit: unknown; ondragleave: unknown; ondragover: unknown; ondragstart: unknown; ondrop: unknown; ondurationchange: unknown; onemptied: unknown; onended: unknown; onerror: unknown; onfocus: unknown; ongotpointercapture: unknown; oninput: unknown; oninvalid: unknown; onkeydown: unknown; onkeypress: unknown; onkeyup: unknown; onload: unknown; onloadeddata: unknown; onloadedmetadata: unknown; onloadstart: unknown; onlostpointercapture: unknown; onmousedown: unknown; onmouseenter: unknown; onmouseleave: unknown; onmousemove: unknown; onmouseout: unknown; onmouseover: unknown; onmouseup: unknown; onpause: unknown; onplay: unknown; onplaying: unknown; onpointercancel: unknown; onpointerdown: unknown; onpointerenter: unknown; onpointerleave: unknown; onpointermove: unknown; onpointerout: unknown; onpointerover: unknown; onpointerup: unknown; onprogress: unknown; onratechange: unknown; onreset: unknown; onresize: unknown; onscroll: unknown; onsecuritypolicyviolation: unknown; onseeked: unknown; onseeking: unknown; onselect: unknown; onselectionchange: unknown; onselectstart: unknown; onstalled: unknown; onsubmit: unknown; onsuspend: unknown; ontimeupdate: unknown; ontoggle: unknown; ontouchcancel?: unknown; ontouchend?: unknown; ontouchmove?: unknown; ontouchstart?: unknown; ontransitioncancel: unknown; ontransitionend: unknown; ontransitionrun: unknown; ontransitionstart: unknown; onvolumechange: unknown; onwaiting: unknown; onwheel: unknown; readonly childElementCount: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly children: { namedItem: any; readonly length: any; item: any; }; readonly firstElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly lastElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; append: unknown; prepend: unknown; querySelector: unknown; querySelectorAll: unknown; createExpression: unknown; createNSResolver: unknown; evaluate: unknown; } +>activeElement : { readonly assignedSlot: { name: any; assignedElements: any; assignedNodes: any; addEventListener: any; removeEventListener: any; accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly attributes: { readonly length: any; getNamedItem: any; getNamedItemNS: any; item: any; removeNamedItem: any; removeNamedItemNS: any; setNamedItem: any; setNamedItemNS: any; }; readonly classList: { readonly length: any; value: any; toString: any; add: any; contains: any; item: any; remove: any; replace: any; supports: any; toggle: any; forEach: any; }; className: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly clientHeight: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly clientLeft: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly clientTop: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly clientWidth: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; id: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly localName: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly namespaceURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; onfullscreenchange: unknown; onfullscreenerror: unknown; outerHTML: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly prefix: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly scrollHeight: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; scrollLeft: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; scrollTop: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly scrollWidth: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly shadowRoot: { readonly host: any; readonly mode: any; getElementById: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; caretPositionFromPoint: any; caretRangeFromPoint: any; elementFromPoint: any; elementsFromPoint: any; getSelection: any; innerHTML: any; }; slot: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly tagName: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; attachShadow: unknown; closest: unknown; getAttribute: unknown; getAttributeNS: unknown; getAttributeNames: unknown; getAttributeNode: unknown; getAttributeNodeNS: unknown; getBoundingClientRect: unknown; getClientRects: unknown; getElementsByClassName: unknown; getElementsByTagName: unknown; getElementsByTagNameNS: unknown; hasAttribute: unknown; hasAttributeNS: unknown; hasAttributes: unknown; hasPointerCapture: unknown; insertAdjacentElement: unknown; insertAdjacentHTML: unknown; insertAdjacentText: unknown; matches: unknown; msGetRegionContent: unknown; releasePointerCapture: unknown; removeAttribute: unknown; removeAttributeNS: unknown; removeAttributeNode: unknown; requestFullscreen: unknown; requestPointerLock: unknown; scroll: unknown; scrollBy: unknown; scrollIntoView: unknown; scrollTo: unknown; setAttribute: unknown; setAttributeNS: unknown; setAttributeNode: unknown; setAttributeNodeNS: unknown; setPointerCapture: unknown; toggleAttribute: unknown; webkitMatchesSelector: unknown; addEventListener: unknown; removeEventListener: unknown; readonly baseURI: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly childNodes: { length: any; item: any; forEach: any; }; readonly firstChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly isConnected: { valueOf: any; }; readonly lastChild: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly nextSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; readonly nodeName: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nodeType: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; nodeValue: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly ownerDocument: { readonly URL: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly activeElement: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly parentElement: { accessKey: any; readonly accessKeyLabel: any; autocapitalize: any; dir: any; draggable: any; hidden: any; innerText: any; lang: any; readonly offsetHeight: any; readonly offsetLeft: any; readonly offsetParent: any; readonly offsetTop: any; readonly offsetWidth: any; spellcheck: any; title: any; translate: any; click: any; addEventListener: any; removeEventListener: any; readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; oncopy: any; oncut: any; onpaste: any; readonly style: any; contentEditable: any; inputMode: any; readonly isContentEditable: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; autofocus: any; readonly dataset: any; nonce?: any; tabIndex: any; blur: any; focus: any; }; readonly parentNode: { readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly previousSibling: { after: any; before: any; remove: any; replaceWith: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; addEventListener: any; dispatchEvent: any; removeEventListener: any; }; textContent: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; appendChild: unknown; cloneNode: unknown; compareDocumentPosition: unknown; contains: unknown; getRootNode: unknown; hasChildNodes: unknown; insertBefore: unknown; isDefaultNamespace: unknown; isEqualNode: unknown; isSameNode: unknown; lookupNamespaceURI: unknown; lookupPrefix: unknown; normalize: unknown; removeChild: unknown; replaceChild: unknown; readonly ATTRIBUTE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly CDATA_SECTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly COMMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_FRAGMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINED_BY: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_CONTAINS: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_DISCONNECTED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_FOLLOWING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_POSITION_PRECEDING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly DOCUMENT_TYPE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ELEMENT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly ENTITY_REFERENCE_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly NOTATION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly PROCESSING_INSTRUCTION_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly TEXT_NODE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; dispatchEvent: unknown; animate: unknown; getAnimations: unknown; after: unknown; before: unknown; remove: unknown; replaceWith: unknown; innerHTML: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly nextElementSibling: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly previousElementSibling: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly childElementCount: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly children: { namedItem: any; readonly length: any; item: any; }; readonly firstElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; readonly lastElementChild: { readonly assignedSlot: any; readonly attributes: any; readonly classList: any; className: any; readonly clientHeight: any; readonly clientLeft: any; readonly clientTop: any; readonly clientWidth: any; id: any; readonly localName: any; readonly namespaceURI: any; onfullscreenchange: any; onfullscreenerror: any; outerHTML: any; readonly prefix: any; readonly scrollHeight: any; scrollLeft: any; scrollTop: any; readonly scrollWidth: any; readonly shadowRoot: any; slot: any; readonly tagName: any; attachShadow: any; closest: any; getAttribute: any; getAttributeNS: any; getAttributeNames: any; getAttributeNode: any; getAttributeNodeNS: any; getBoundingClientRect: any; getClientRects: any; getElementsByClassName: any; getElementsByTagName: any; getElementsByTagNameNS: any; hasAttribute: any; hasAttributeNS: any; hasAttributes: any; hasPointerCapture: any; insertAdjacentElement: any; insertAdjacentHTML: any; insertAdjacentText: any; matches: any; msGetRegionContent: any; releasePointerCapture: any; removeAttribute: any; removeAttributeNS: any; removeAttributeNode: any; requestFullscreen: any; requestPointerLock: any; scroll: any; scrollBy: any; scrollIntoView: any; scrollTo: any; setAttribute: any; setAttributeNS: any; setAttributeNode: any; setAttributeNodeNS: any; setPointerCapture: any; toggleAttribute: any; webkitMatchesSelector: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; animate: any; getAnimations: any; after: any; before: any; remove: any; replaceWith: any; innerHTML: any; readonly nextElementSibling: any; readonly previousElementSibling: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; }; append: unknown; prepend: unknown; querySelector: unknown; querySelectorAll: unknown; } +>className : { toString: unknown; charAt: unknown; charCodeAt: unknown; concat: unknown; indexOf: unknown; lastIndexOf: unknown; localeCompare: unknown; match: unknown; replace: unknown; search: unknown; slice: unknown; split: unknown; substring: unknown; toLowerCase: unknown; toLocaleLowerCase: unknown; toUpperCase: unknown; toLocaleUpperCase: unknown; trim: unknown; readonly length: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; substr: unknown; valueOf: unknown; codePointAt: unknown; includes: unknown; endsWith: unknown; normalize: unknown; repeat: unknown; startsWith: unknown; anchor: unknown; big: unknown; blink: unknown; bold: unknown; fixed: unknown; fontcolor: unknown; fontsize: unknown; italics: unknown; link: unknown; small: unknown; strike: unknown; sub: unknown; sup: unknown; [Symbol.iterator]: unknown; } +>length : { toString: unknown; toFixed: unknown; toExponential: unknown; toPrecision: unknown; valueOf: unknown; toLocaleString: unknown; } diff --git a/tests/baselines/reference/maxConstraints.types b/tests/baselines/reference/maxConstraints.types index 3b46c115eec23..ad71dc20d5e89 100644 --- a/tests/baselines/reference/maxConstraints.types +++ b/tests/baselines/reference/maxConstraints.types @@ -27,8 +27,8 @@ var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y }; >y : T var maxResult = max2(1, 2); ->maxResult : any ->max2(1, 2) : any +>maxResult : Comparable<1 | 2> +>max2(1, 2) : Comparable<1 | 2> >max2 : Comparer >1 : 1 >2 : 2 diff --git a/tests/baselines/reference/metadataReferencedWithinFilteredUnion.js b/tests/baselines/reference/metadataReferencedWithinFilteredUnion.js index 6192ac3c0fde2..02d73fdd0710b 100644 --- a/tests/baselines/reference/metadataReferencedWithinFilteredUnion.js +++ b/tests/baselines/reference/metadataReferencedWithinFilteredUnion.js @@ -47,7 +47,7 @@ var Class2 = /** @class */ (function () { get: function () { return undefined; }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ diff --git a/tests/baselines/reference/methodChainError.symbols b/tests/baselines/reference/methodChainError.symbols index f17cad3687067..725fd46110d30 100644 --- a/tests/baselines/reference/methodChainError.symbols +++ b/tests/baselines/reference/methodChainError.symbols @@ -16,6 +16,7 @@ class Builder { } new Builder() +>new Builder() .method("a") .method() .method : Symbol(Builder.method, Decl(methodChainError.ts, 1, 21)) >new Builder() .method("a") .method : Symbol(Builder.method, Decl(methodChainError.ts, 1, 21)) >new Builder() .method : Symbol(Builder.method, Decl(methodChainError.ts, 1, 21)) >Builder : Symbol(Builder, Decl(methodChainError.ts, 0, 0)) @@ -27,6 +28,7 @@ new Builder() >method : Symbol(Builder.method, Decl(methodChainError.ts, 1, 21)) .method("a"); +>method : Symbol(Builder.method, Decl(methodChainError.ts, 1, 21)) new Builder() diff --git a/tests/baselines/reference/methodChainError.types b/tests/baselines/reference/methodChainError.types index 3ab9e22bd425c..de74e546f65c3 100644 --- a/tests/baselines/reference/methodChainError.types +++ b/tests/baselines/reference/methodChainError.types @@ -15,8 +15,8 @@ class Builder { } new Builder() ->new Builder() .method("a") .method() .method("a") : any ->new Builder() .method("a") .method() .method : any +>new Builder() .method("a") .method() .method("a") : Builder +>new Builder() .method("a") .method() .method : (param: string) => Builder >new Builder() .method("a") .method() : Builder >new Builder() .method("a") .method : (param: string) => Builder >new Builder() .method("a") : Builder @@ -32,7 +32,7 @@ new Builder() >method : (param: string) => Builder .method("a"); ->method : any +>method : (param: string) => Builder >"a" : "a" diff --git a/tests/baselines/reference/methodContainingLocalFunction.js b/tests/baselines/reference/methodContainingLocalFunction.js index 266178b35f865..b1d717ce31def 100644 --- a/tests/baselines/reference/methodContainingLocalFunction.js +++ b/tests/baselines/reference/methodContainingLocalFunction.js @@ -72,7 +72,7 @@ var BugExhibition2 = /** @class */ (function () { x = localFunction; return null; }, - enumerable: true, + enumerable: false, configurable: true }); return BugExhibition2; diff --git a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.symbols b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.symbols index ff8312a0e716b..76e53d7485959 100644 --- a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.symbols +++ b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.symbols @@ -57,13 +57,17 @@ var r7 = map([1, ""], (x) => x.toString()); // error >r7 : Symbol(r7, Decl(mismatchedExplicitTypeParameterAndArgumentType.ts, 9, 3)) >map : Symbol(map, Decl(mismatchedExplicitTypeParameterAndArgumentType.ts, 0, 0)) >x : Symbol(x, Decl(mismatchedExplicitTypeParameterAndArgumentType.ts, 9, 39)) +>x.toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(mismatchedExplicitTypeParameterAndArgumentType.ts, 9, 39)) +>toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --)) var r7b = map([1, ""], (x) => x.toString()); // error >r7b : Symbol(r7b, Decl(mismatchedExplicitTypeParameterAndArgumentType.ts, 10, 3)) >map : Symbol(map, Decl(mismatchedExplicitTypeParameterAndArgumentType.ts, 0, 0)) >x : Symbol(x, Decl(mismatchedExplicitTypeParameterAndArgumentType.ts, 10, 32)) +>x.toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(mismatchedExplicitTypeParameterAndArgumentType.ts, 10, 32)) +>toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --)) var r8 = map([1, ""], (x) => x.toString()); >r8 : Symbol(r8, Decl(mismatchedExplicitTypeParameterAndArgumentType.ts, 11, 3)) diff --git a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.types b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.types index 1278c61d6951c..6adf391870603 100644 --- a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.types +++ b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.types @@ -71,32 +71,32 @@ var r6 = map([1, ""], (x) => x.toString()); >toString : () => string var r7 = map([1, ""], (x) => x.toString()); // error ->r7 : any ->map([1, ""], (x) => x.toString()) : any +>r7 : string[] +>map([1, ""], (x) => x.toString()) : string[] >map : (xs: T[], f: (x: T) => U) => U[] >[1, ""] : (string | number)[] >1 : 1 >"" : "" ->(x) => x.toString() : (x: any) => any ->x : any ->x.toString() : any ->x.toString : any ->x : any ->toString : any +>(x) => x.toString() : (x: number) => string +>x : number +>x.toString() : string +>x.toString : (radix?: number) => string +>x : number +>toString : (radix?: number) => string var r7b = map([1, ""], (x) => x.toString()); // error ->r7b : any ->map([1, ""], (x) => x.toString()) : any +>r7b : unknown[] +>map([1, ""], (x) => x.toString()) : unknown[] >map : (xs: T[], f: (x: T) => U) => U[] >[1, ""] : (string | number)[] >1 : 1 >"" : "" ->(x) => x.toString() : (x: any) => any ->x : any ->x.toString() : any ->x.toString : any ->x : any ->toString : any +>(x) => x.toString() : (x: number) => string +>x : number +>x.toString() : string +>x.toString : (radix?: number) => string +>x : number +>toString : (radix?: number) => string var r8 = map([1, ""], (x) => x.toString()); >r8 : string[] diff --git a/tests/baselines/reference/moduleAliasAsFunctionArgument.js b/tests/baselines/reference/moduleAliasAsFunctionArgument.js index 16eb962a863ce..0630c1011cbd3 100644 --- a/tests/baselines/reference/moduleAliasAsFunctionArgument.js +++ b/tests/baselines/reference/moduleAliasAsFunctionArgument.js @@ -18,6 +18,7 @@ fn(a); // Error: property 'x' is missing from 'a' define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.x = void 0; }); //// [moduleAliasAsFunctionArgument_1.js] define(["require", "exports", "moduleAliasAsFunctionArgument_0"], function (require, exports, a) { diff --git a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings1.js b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings1.js index c4d451ba9f9d3..1701f2bfb54c7 100644 --- a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings1.js +++ b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings1.js @@ -16,16 +16,30 @@ exports.__esModule = true; exports.foo = 42; //// [b.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./c")); +__exportStar(require("./c"), exports); //// [a.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./b")); -__export(require("./c")); +__exportStar(require("./b"), exports); +__exportStar(require("./c"), exports); diff --git a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js index d1f6dc7abc7cf..a047c0b5aaf13 100644 --- a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js +++ b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js @@ -24,14 +24,28 @@ var Animals; ; //// [b.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var c_1 = require("./c"); -exports.Animals = c_1.Animals; +__createBinding(exports, c_1, "Animals"); //// [a.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./b")); -__export(require("./c")); +__exportStar(require("./b"), exports); +__exportStar(require("./c"), exports); diff --git a/tests/baselines/reference/moduledecl.js b/tests/baselines/reference/moduledecl.js index 9672b980929b0..d3013dbba402a 100644 --- a/tests/baselines/reference/moduledecl.js +++ b/tests/baselines/reference/moduledecl.js @@ -338,7 +338,7 @@ var exportTests; get: function () { return new C2_private(); }, - enumerable: true, + enumerable: false, configurable: true }); C3_public.prototype.getC1_public = function () { @@ -350,7 +350,7 @@ var exportTests; get: function () { return new C1_public(); }, - enumerable: true, + enumerable: false, configurable: true }); return C3_public; diff --git a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types index adf17b70d099a..24182276bb3e3 100644 --- a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types +++ b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types @@ -28,7 +28,7 @@ function test(x: A | B) { >B : typeof B acceptA(x); ->acceptA(x) : any +>acceptA(x) : void >acceptA : (a: A) => void >x : B } diff --git a/tests/baselines/reference/newMap.types b/tests/baselines/reference/newMap.types index d3fab45ccc0fd..c00ff104407c9 100644 --- a/tests/baselines/reference/newMap.types +++ b/tests/baselines/reference/newMap.types @@ -1,5 +1,5 @@ === tests/cases/compiler/newMap.ts === new Map(); ->new Map() : any +>new Map() : Map >Map : MapConstructor diff --git a/tests/baselines/reference/newOperator.js b/tests/baselines/reference/newOperator.js index 1c4756399caf6..1a867ff1d36ef 100644 --- a/tests/baselines/reference/newOperator.js +++ b/tests/baselines/reference/newOperator.js @@ -99,7 +99,7 @@ var S = /** @class */ (function () { get: function () { return new M.T[]; }, - enumerable: true, + enumerable: false, configurable: true }); return S; diff --git a/tests/baselines/reference/newTarget.es6.js b/tests/baselines/reference/newTarget.es6.js index 2bd95ff9f9871..c795ab217bfe6 100644 --- a/tests/baselines/reference/newTarget.es6.js +++ b/tests/baselines/reference/newTarget.es6.js @@ -33,14 +33,17 @@ const O = { //// [newTarget.es6.js] -class A { - constructor() { - this.d = function () { return new.target; }; - const a = new.target; - const b = () => new.target; +const A = /** @class */ (() => { + class A { + constructor() { + this.d = function () { return new.target; }; + const a = new.target; + const b = () => new.target; + } } -} -A.c = function () { return new.target; }; + A.c = function () { return new.target; }; + return A; +})(); class B extends A { constructor() { super(); diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js index 6df80b5b30fc6..6cda49b08e1a1 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js @@ -65,7 +65,7 @@ var class1 = /** @class */ (function () { }; } }; }, - enumerable: true, + enumerable: false, configurable: true }); return class1; @@ -91,7 +91,7 @@ var class2 = /** @class */ (function () { }; } }; }, - enumerable: true, + enumerable: false, configurable: true }); return class2; diff --git a/tests/baselines/reference/noErrorsInCallback.types b/tests/baselines/reference/noErrorsInCallback.types index 8e25379209327..b31417da11bd5 100644 --- a/tests/baselines/reference/noErrorsInCallback.types +++ b/tests/baselines/reference/noErrorsInCallback.types @@ -6,8 +6,8 @@ class Bar { >foo : string } var one = new Bar({}); // Error ->one : any ->new Bar({}) : any +>one : Bar +>new Bar({}) : Bar >Bar : typeof Bar >{} : {} @@ -19,8 +19,8 @@ var one = new Bar({}); // Error >() => { var two = new Bar({}); // No error?} : () => void var two = new Bar({}); // No error? ->two : any ->new Bar({}) : any +>two : Bar +>new Bar({}) : Bar >Bar : typeof Bar >{} : {} diff --git a/tests/baselines/reference/noImplicitAnyLoopCrash.errors.txt b/tests/baselines/reference/noImplicitAnyLoopCrash.errors.txt index 2937f133749d7..7526354a4c5e4 100644 --- a/tests/baselines/reference/noImplicitAnyLoopCrash.errors.txt +++ b/tests/baselines/reference/noImplicitAnyLoopCrash.errors.txt @@ -1,9 +1,8 @@ tests/cases/compiler/noImplicitAnyLoopCrash.ts(4,16): error TS2556: Expected 0 arguments, but got 1 or more. tests/cases/compiler/noImplicitAnyLoopCrash.ts(4,19): error TS2461: Type 'number' is not an array type. -tests/cases/compiler/noImplicitAnyLoopCrash.ts(4,19): error TS2461: Type 'undefined' is not an array type. -==== tests/cases/compiler/noImplicitAnyLoopCrash.ts (3 errors) ==== +==== tests/cases/compiler/noImplicitAnyLoopCrash.ts (2 errors) ==== let foo = () => {}; let bar; while (1) { @@ -12,7 +11,5 @@ tests/cases/compiler/noImplicitAnyLoopCrash.ts(4,19): error TS2461: Type 'undefi !!! error TS2556: Expected 0 arguments, but got 1 or more. ~~~ !!! error TS2461: Type 'number' is not an array type. - ~~~ -!!! error TS2461: Type 'undefined' is not an array type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index 6db2ef447d0c1..d5c7bdb091545 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -39,7 +39,7 @@ var Child = /** @class */ (function (_super) { set: function (str) { this._x = str; }, - enumerable: true, + enumerable: false, configurable: true }); return Child; diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index 6564d4deac4c1..c4db0caa2ce31 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -38,7 +38,7 @@ var Child = /** @class */ (function (_super) { get: function () { return ""; }, - enumerable: true, + enumerable: false, configurable: true }); return Child; diff --git a/tests/baselines/reference/nodeResolution4.js b/tests/baselines/reference/nodeResolution4.js index 3285f3b8e20b9..1613cdfb213fa 100644 --- a/tests/baselines/reference/nodeResolution4.js +++ b/tests/baselines/reference/nodeResolution4.js @@ -15,6 +15,8 @@ var x = 1; //// [a.js] "use strict"; exports.__esModule = true; +/// +exports.y = void 0; //// [b.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/nonPrimitiveInGeneric.types b/tests/baselines/reference/nonPrimitiveInGeneric.types index a57c41abde286..f46f0e0e7ef02 100644 --- a/tests/baselines/reference/nonPrimitiveInGeneric.types +++ b/tests/baselines/reference/nonPrimitiveInGeneric.types @@ -26,12 +26,12 @@ generic(a); >a : {} generic(123); // expect error ->generic(123) : any +>generic(123) : void >generic : (t: T) => void >123 : 123 generic(b); // expect error ->generic(b) : any +>generic(b) : void >generic : (t: T) => void >b : string @@ -55,12 +55,12 @@ bound(a); >a : {} bound(123); // expect error ->bound(123) : any +>bound(123) : void >bound : (t: T) => void >123 : 123 bound(b); // expect error ->bound(b) : any +>bound(b) : void >bound : (t: T) => void >b : string @@ -76,11 +76,11 @@ bound2(); >bound2 : () => void bound2(); // expect error ->bound2() : any +>bound2() : void >bound2 : () => void bound2(); // expect error ->bound2() : any +>bound2() : void >bound2 : () => void function bound3(t: T) { diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js index 28aada43f8e8c..8c08b8c30b4c3 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js @@ -108,7 +108,7 @@ var C = /** @class */ (function () { }, set: function (v) { } // ok , - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { @@ -119,7 +119,7 @@ var C = /** @class */ (function () { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/objectCreationExpressionInFunctionParameter.types b/tests/baselines/reference/objectCreationExpressionInFunctionParameter.types index 910c28d9e93b2..842bfdabb7bff 100644 --- a/tests/baselines/reference/objectCreationExpressionInFunctionParameter.types +++ b/tests/baselines/reference/objectCreationExpressionInFunctionParameter.types @@ -7,9 +7,9 @@ class A { } } function foo(x = new A(123)) { //should error, 123 is not string ->foo : (x?: any) => void ->x : any ->new A(123) : any +>foo : (x?: A) => void +>x : A +>new A(123) : A >A : typeof A >123 : 123 diff --git a/tests/baselines/reference/objectLiteralNormalization.js b/tests/baselines/reference/objectLiteralNormalization.js index aa37bdc2c5ee7..aa2fa9c7ec2e0 100644 --- a/tests/baselines/reference/objectLiteralNormalization.js +++ b/tests/baselines/reference/objectLiteralNormalization.js @@ -227,5 +227,13 @@ declare let e2: { a: number; b: number; }; -declare let e3: any; -declare let e4: any; +declare let e3: { + a: 1; + b: "abc"; + c: true; +}; +declare let e4: { + a: 1; + b: "abc"; + c: true; +}; diff --git a/tests/baselines/reference/objectLiteralNormalization.types b/tests/baselines/reference/objectLiteralNormalization.types index 15c3b6b3ecfda..28cf4bed6f792 100644 --- a/tests/baselines/reference/objectLiteralNormalization.types +++ b/tests/baselines/reference/objectLiteralNormalization.types @@ -304,20 +304,20 @@ let e2 = f({}, { a: "abc" }, { a: 1, b: 2 }); >2 : 2 let e3 = f(data, { a: 2 }); ->e3 : any ->f(data, { a: 2 }) : any +>e3 : { a: 1; b: "abc"; c: true; } +>f(data, { a: 2 }) : { a: 1; b: "abc"; c: true; } >f : (...items: T[]) => T >data : { a: 1; b: "abc"; c: true; } ->{ a: 2 } : { a: number; } ->a : number +>{ a: 2 } : { a: 2; } +>a : 2 >2 : 2 let e4 = f({ a: 2 }, data); ->e4 : any ->f({ a: 2 }, data) : any +>e4 : { a: 1; b: "abc"; c: true; } +>f({ a: 2 }, data) : { a: 1; b: "abc"; c: true; } >f : (...items: T[]) => T ->{ a: 2 } : { a: number; } ->a : number +>{ a: 2 } : { a: 2; } +>a : 2 >2 : 2 >data : { a: 1; b: "abc"; c: true; } diff --git a/tests/baselines/reference/objectRestParameterES5.js b/tests/baselines/reference/objectRestParameterES5.js index 1d7f518b54a57..fd7d03e4c65d1 100644 --- a/tests/baselines/reference/objectRestParameterES5.js +++ b/tests/baselines/reference/objectRestParameterES5.js @@ -57,7 +57,7 @@ var C = /** @class */ (function () { var a = _a.a, clone = __rest(_a, ["a"]); // actually, never mind, don't clone }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/objectSpread.js b/tests/baselines/reference/objectSpread.js index 1265cc889ff79..0aa167974edbb 100644 --- a/tests/baselines/reference/objectSpread.js +++ b/tests/baselines/reference/objectSpread.js @@ -7,23 +7,14 @@ let addAfter: { a: number, b: string, c: boolean } = { ...o, c: false } let addBefore: { a: number, b: string, c: boolean } = { c: false, ...o } -// Note: ignore still changes the order that properties are printed -let ignore: { a: number, b: string } = - { b: 'ignored', ...o } let override: { a: number, b: string } = { ...o, b: 'override' } let nested: { a: number, b: boolean, c: string } = { ...{ a: 3, ...{ b: false, c: 'overriden' } }, c: 'whatever' } let combined: { a: number, b: string, c: boolean } = { ...o, ...o2 } -let combinedBefore: { a: number, b: string, c: boolean } = - { b: 'ok', ...o, ...o2 } -let combinedMid: { a: number, b: string, c: boolean } = - { ...o, b: 'ok', ...o2 } let combinedAfter: { a: number, b: string, c: boolean } = { ...o, ...o2, b: 'ok' } -let combinedNested: { a: number, b: boolean, c: string, d: string } = - { ...{ a: 4, ...{ b: false, c: 'overriden' } }, d: 'actually new', ...{ a: 5, d: 'maybe new' } } let combinedNestedChangeType: { a: number, b: boolean, c: number } = { ...{ a: 1, ...{ b: false, c: 'overriden' } }, c: -1 } let propertyNested: { a: { a: number, b: string } } = @@ -91,8 +82,6 @@ cplus.plus(); // new field's type conflicting with existing field is OK let changeTypeAfter: { a: string, b: string } = { ...o, a: 'wrong type?' } -let changeTypeBefore: { a: number, b: string } = - { a: 'wrong type?', ...o }; let changeTypeBoth: { a: string, b: number } = { ...o, ...swap }; @@ -109,8 +98,6 @@ function container( // computed property let computedFirst: { a: number, b: string, "before everything": number } = { ['before everything']: 12, ...o, b: 'yes' } - let computedMiddle: { a: number, b: string, c: boolean, "in the middle": number } = - { ...o, ['in the middle']: 13, b: 'maybe?', ...o2 } let computedAfter: { a: number, b: string, "at the end": number } = { ...o, b: 'yeah', ['at the end']: 14 } } @@ -173,15 +160,10 @@ var o2 = { b: 'yes', c: true }; var swap = { a: 'yes', b: -1 }; var addAfter = __assign(__assign({}, o), { c: false }); var addBefore = __assign({ c: false }, o); -// Note: ignore still changes the order that properties are printed -var ignore = __assign({ b: 'ignored' }, o); var override = __assign(__assign({}, o), { b: 'override' }); var nested = __assign(__assign({}, __assign({ a: 3 }, { b: false, c: 'overriden' })), { c: 'whatever' }); var combined = __assign(__assign({}, o), o2); -var combinedBefore = __assign(__assign({ b: 'ok' }, o), o2); -var combinedMid = __assign(__assign(__assign({}, o), { b: 'ok' }), o2); var combinedAfter = __assign(__assign(__assign({}, o), o2), { b: 'ok' }); -var combinedNested = __assign(__assign(__assign({}, __assign({ a: 4 }, { b: false, c: 'overriden' })), { d: 'actually new' }), { a: 5, d: 'maybe new' }); var combinedNestedChangeType = __assign(__assign({}, __assign({ a: 1 }, { b: false, c: 'overriden' })), { c: -1 }); var propertyNested = { a: __assign({}, o) }; // accessors don't copy the descriptor @@ -231,18 +213,16 @@ var cplus = __assign(__assign({}, c), { plus: function () { return this.p + 1; } cplus.plus(); // new field's type conflicting with existing field is OK var changeTypeAfter = __assign(__assign({}, o), { a: 'wrong type?' }); -var changeTypeBefore = __assign({ a: 'wrong type?' }, o); var changeTypeBoth = __assign(__assign({}, o), swap); // optional function container(definiteBoolean, definiteString, optionalString, optionalNumber) { - var _a, _b, _c; + var _a, _b; var optionalUnionStops = __assign(__assign(__assign({}, definiteBoolean), definiteString), optionalNumber); var optionalUnionDuplicates = __assign(__assign(__assign(__assign({}, definiteBoolean), definiteString), optionalString), optionalNumber); var allOptional = __assign(__assign({}, optionalString), optionalNumber); // computed property var computedFirst = __assign(__assign((_a = {}, _a['before everything'] = 12, _a), o), { b: 'yes' }); - var computedMiddle = __assign(__assign(__assign({}, o), (_b = {}, _b['in the middle'] = 13, _b.b = 'maybe?', _b)), o2); - var computedAfter = __assign(__assign({}, o), (_c = { b: 'yeah' }, _c['at the end'] = 14, _c)); + var computedAfter = __assign(__assign({}, o), (_b = { b: 'yeah' }, _b['at the end'] = 14, _b)); } // shortcut syntax var a = 12; diff --git a/tests/baselines/reference/objectSpread.symbols b/tests/baselines/reference/objectSpread.symbols index e72772676e114..c663cb4f58098 100644 --- a/tests/baselines/reference/objectSpread.symbols +++ b/tests/baselines/reference/objectSpread.symbols @@ -34,324 +34,268 @@ let addBefore: { a: number, b: string, c: boolean } = >c : Symbol(c, Decl(objectSpread.ts, 7, 5)) >o : Symbol(o, Decl(objectSpread.ts, 0, 3)) -// Note: ignore still changes the order that properties are printed -let ignore: { a: number, b: string } = ->ignore : Symbol(ignore, Decl(objectSpread.ts, 9, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 9, 13)) ->b : Symbol(b, Decl(objectSpread.ts, 9, 24)) - - { b: 'ignored', ...o } ->b : Symbol(b, Decl(objectSpread.ts, 10, 5)) ->o : Symbol(o, Decl(objectSpread.ts, 0, 3)) - let override: { a: number, b: string } = ->override : Symbol(override, Decl(objectSpread.ts, 11, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 11, 15)) ->b : Symbol(b, Decl(objectSpread.ts, 11, 26)) +>override : Symbol(override, Decl(objectSpread.ts, 8, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 8, 15)) +>b : Symbol(b, Decl(objectSpread.ts, 8, 26)) { ...o, b: 'override' } >o : Symbol(o, Decl(objectSpread.ts, 0, 3)) ->b : Symbol(b, Decl(objectSpread.ts, 12, 11)) +>b : Symbol(b, Decl(objectSpread.ts, 9, 11)) let nested: { a: number, b: boolean, c: string } = ->nested : Symbol(nested, Decl(objectSpread.ts, 13, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 13, 13)) ->b : Symbol(b, Decl(objectSpread.ts, 13, 24)) ->c : Symbol(c, Decl(objectSpread.ts, 13, 36)) +>nested : Symbol(nested, Decl(objectSpread.ts, 10, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 10, 13)) +>b : Symbol(b, Decl(objectSpread.ts, 10, 24)) +>c : Symbol(c, Decl(objectSpread.ts, 10, 36)) { ...{ a: 3, ...{ b: false, c: 'overriden' } }, c: 'whatever' } ->a : Symbol(a, Decl(objectSpread.ts, 14, 10)) ->b : Symbol(b, Decl(objectSpread.ts, 14, 21)) ->c : Symbol(c, Decl(objectSpread.ts, 14, 31)) ->c : Symbol(c, Decl(objectSpread.ts, 14, 51)) +>a : Symbol(a, Decl(objectSpread.ts, 11, 10)) +>b : Symbol(b, Decl(objectSpread.ts, 11, 21)) +>c : Symbol(c, Decl(objectSpread.ts, 11, 31)) +>c : Symbol(c, Decl(objectSpread.ts, 11, 51)) let combined: { a: number, b: string, c: boolean } = ->combined : Symbol(combined, Decl(objectSpread.ts, 15, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 15, 15)) ->b : Symbol(b, Decl(objectSpread.ts, 15, 26)) ->c : Symbol(c, Decl(objectSpread.ts, 15, 37)) +>combined : Symbol(combined, Decl(objectSpread.ts, 12, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 12, 15)) +>b : Symbol(b, Decl(objectSpread.ts, 12, 26)) +>c : Symbol(c, Decl(objectSpread.ts, 12, 37)) { ...o, ...o2 } >o : Symbol(o, Decl(objectSpread.ts, 0, 3)) >o2 : Symbol(o2, Decl(objectSpread.ts, 1, 3)) -let combinedBefore: { a: number, b: string, c: boolean } = ->combinedBefore : Symbol(combinedBefore, Decl(objectSpread.ts, 17, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 17, 21)) ->b : Symbol(b, Decl(objectSpread.ts, 17, 32)) ->c : Symbol(c, Decl(objectSpread.ts, 17, 43)) - - { b: 'ok', ...o, ...o2 } ->b : Symbol(b, Decl(objectSpread.ts, 18, 5)) ->o : Symbol(o, Decl(objectSpread.ts, 0, 3)) ->o2 : Symbol(o2, Decl(objectSpread.ts, 1, 3)) - -let combinedMid: { a: number, b: string, c: boolean } = ->combinedMid : Symbol(combinedMid, Decl(objectSpread.ts, 19, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 19, 18)) ->b : Symbol(b, Decl(objectSpread.ts, 19, 29)) ->c : Symbol(c, Decl(objectSpread.ts, 19, 40)) - - { ...o, b: 'ok', ...o2 } ->o : Symbol(o, Decl(objectSpread.ts, 0, 3)) ->b : Symbol(b, Decl(objectSpread.ts, 20, 11)) ->o2 : Symbol(o2, Decl(objectSpread.ts, 1, 3)) - let combinedAfter: { a: number, b: string, c: boolean } = ->combinedAfter : Symbol(combinedAfter, Decl(objectSpread.ts, 21, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 21, 20)) ->b : Symbol(b, Decl(objectSpread.ts, 21, 31)) ->c : Symbol(c, Decl(objectSpread.ts, 21, 42)) +>combinedAfter : Symbol(combinedAfter, Decl(objectSpread.ts, 14, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 14, 20)) +>b : Symbol(b, Decl(objectSpread.ts, 14, 31)) +>c : Symbol(c, Decl(objectSpread.ts, 14, 42)) { ...o, ...o2, b: 'ok' } >o : Symbol(o, Decl(objectSpread.ts, 0, 3)) >o2 : Symbol(o2, Decl(objectSpread.ts, 1, 3)) ->b : Symbol(b, Decl(objectSpread.ts, 22, 18)) - -let combinedNested: { a: number, b: boolean, c: string, d: string } = ->combinedNested : Symbol(combinedNested, Decl(objectSpread.ts, 23, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 23, 21)) ->b : Symbol(b, Decl(objectSpread.ts, 23, 32)) ->c : Symbol(c, Decl(objectSpread.ts, 23, 44)) ->d : Symbol(d, Decl(objectSpread.ts, 23, 55)) - - { ...{ a: 4, ...{ b: false, c: 'overriden' } }, d: 'actually new', ...{ a: 5, d: 'maybe new' } } ->a : Symbol(a, Decl(objectSpread.ts, 24, 10)) ->b : Symbol(b, Decl(objectSpread.ts, 24, 21)) ->c : Symbol(c, Decl(objectSpread.ts, 24, 31)) ->d : Symbol(d, Decl(objectSpread.ts, 24, 51)) ->a : Symbol(a, Decl(objectSpread.ts, 24, 75)) ->d : Symbol(d, Decl(objectSpread.ts, 24, 81)) +>b : Symbol(b, Decl(objectSpread.ts, 15, 18)) let combinedNestedChangeType: { a: number, b: boolean, c: number } = ->combinedNestedChangeType : Symbol(combinedNestedChangeType, Decl(objectSpread.ts, 25, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 25, 31)) ->b : Symbol(b, Decl(objectSpread.ts, 25, 42)) ->c : Symbol(c, Decl(objectSpread.ts, 25, 54)) +>combinedNestedChangeType : Symbol(combinedNestedChangeType, Decl(objectSpread.ts, 16, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 16, 31)) +>b : Symbol(b, Decl(objectSpread.ts, 16, 42)) +>c : Symbol(c, Decl(objectSpread.ts, 16, 54)) { ...{ a: 1, ...{ b: false, c: 'overriden' } }, c: -1 } ->a : Symbol(a, Decl(objectSpread.ts, 26, 10)) ->b : Symbol(b, Decl(objectSpread.ts, 26, 21)) ->c : Symbol(c, Decl(objectSpread.ts, 26, 31)) ->c : Symbol(c, Decl(objectSpread.ts, 26, 51)) +>a : Symbol(a, Decl(objectSpread.ts, 17, 10)) +>b : Symbol(b, Decl(objectSpread.ts, 17, 21)) +>c : Symbol(c, Decl(objectSpread.ts, 17, 31)) +>c : Symbol(c, Decl(objectSpread.ts, 17, 51)) let propertyNested: { a: { a: number, b: string } } = ->propertyNested : Symbol(propertyNested, Decl(objectSpread.ts, 27, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 27, 21)) ->a : Symbol(a, Decl(objectSpread.ts, 27, 26)) ->b : Symbol(b, Decl(objectSpread.ts, 27, 37)) +>propertyNested : Symbol(propertyNested, Decl(objectSpread.ts, 18, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 18, 21)) +>a : Symbol(a, Decl(objectSpread.ts, 18, 26)) +>b : Symbol(b, Decl(objectSpread.ts, 18, 37)) { a: { ... o } } ->a : Symbol(a, Decl(objectSpread.ts, 28, 5)) +>a : Symbol(a, Decl(objectSpread.ts, 19, 5)) >o : Symbol(o, Decl(objectSpread.ts, 0, 3)) // accessors don't copy the descriptor // (which means that readonly getters become read/write properties) let op = { get a () { return 6 } }; ->op : Symbol(op, Decl(objectSpread.ts, 31, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 31, 10)) +>op : Symbol(op, Decl(objectSpread.ts, 22, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 22, 10)) let getter: { a: number, c: number } = ->getter : Symbol(getter, Decl(objectSpread.ts, 32, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 32, 13)) ->c : Symbol(c, Decl(objectSpread.ts, 32, 24)) +>getter : Symbol(getter, Decl(objectSpread.ts, 23, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 23, 13)) +>c : Symbol(c, Decl(objectSpread.ts, 23, 24)) { ...op, c: 7 } ->op : Symbol(op, Decl(objectSpread.ts, 31, 3)) ->c : Symbol(c, Decl(objectSpread.ts, 33, 12)) +>op : Symbol(op, Decl(objectSpread.ts, 22, 3)) +>c : Symbol(c, Decl(objectSpread.ts, 24, 12)) getter.a = 12; ->getter.a : Symbol(a, Decl(objectSpread.ts, 32, 13)) ->getter : Symbol(getter, Decl(objectSpread.ts, 32, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 32, 13)) +>getter.a : Symbol(a, Decl(objectSpread.ts, 23, 13)) +>getter : Symbol(getter, Decl(objectSpread.ts, 23, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 23, 13)) // functions result in { } let spreadFunc = { ...(function () { }) }; ->spreadFunc : Symbol(spreadFunc, Decl(objectSpread.ts, 37, 3)) +>spreadFunc : Symbol(spreadFunc, Decl(objectSpread.ts, 28, 3)) type Header = { head: string, body: string, authToken: string } ->Header : Symbol(Header, Decl(objectSpread.ts, 37, 42)) ->head : Symbol(head, Decl(objectSpread.ts, 39, 15)) ->body : Symbol(body, Decl(objectSpread.ts, 39, 29)) ->authToken : Symbol(authToken, Decl(objectSpread.ts, 39, 43)) +>Header : Symbol(Header, Decl(objectSpread.ts, 28, 42)) +>head : Symbol(head, Decl(objectSpread.ts, 30, 15)) +>body : Symbol(body, Decl(objectSpread.ts, 30, 29)) +>authToken : Symbol(authToken, Decl(objectSpread.ts, 30, 43)) function from16326(this: { header: Header }, header: Header, authToken: string): Header { ->from16326 : Symbol(from16326, Decl(objectSpread.ts, 39, 63)) ->this : Symbol(this, Decl(objectSpread.ts, 40, 19)) ->header : Symbol(header, Decl(objectSpread.ts, 40, 26)) ->Header : Symbol(Header, Decl(objectSpread.ts, 37, 42)) ->header : Symbol(header, Decl(objectSpread.ts, 40, 44)) ->Header : Symbol(Header, Decl(objectSpread.ts, 37, 42)) ->authToken : Symbol(authToken, Decl(objectSpread.ts, 40, 60)) ->Header : Symbol(Header, Decl(objectSpread.ts, 37, 42)) +>from16326 : Symbol(from16326, Decl(objectSpread.ts, 30, 63)) +>this : Symbol(this, Decl(objectSpread.ts, 31, 19)) +>header : Symbol(header, Decl(objectSpread.ts, 31, 26)) +>Header : Symbol(Header, Decl(objectSpread.ts, 28, 42)) +>header : Symbol(header, Decl(objectSpread.ts, 31, 44)) +>Header : Symbol(Header, Decl(objectSpread.ts, 28, 42)) +>authToken : Symbol(authToken, Decl(objectSpread.ts, 31, 60)) +>Header : Symbol(Header, Decl(objectSpread.ts, 28, 42)) return { ...this.header, ->this.header : Symbol(header, Decl(objectSpread.ts, 40, 26)) ->this : Symbol(this, Decl(objectSpread.ts, 40, 19)) ->header : Symbol(header, Decl(objectSpread.ts, 40, 26)) +>this.header : Symbol(header, Decl(objectSpread.ts, 31, 26)) +>this : Symbol(this, Decl(objectSpread.ts, 31, 19)) +>header : Symbol(header, Decl(objectSpread.ts, 31, 26)) ...header, ->header : Symbol(header, Decl(objectSpread.ts, 40, 44)) +>header : Symbol(header, Decl(objectSpread.ts, 31, 44)) ...authToken && { authToken } ->authToken : Symbol(authToken, Decl(objectSpread.ts, 40, 60)) ->authToken : Symbol(authToken, Decl(objectSpread.ts, 44, 25)) +>authToken : Symbol(authToken, Decl(objectSpread.ts, 31, 60)) +>authToken : Symbol(authToken, Decl(objectSpread.ts, 35, 25)) } } // boolean && T results in Partial function conditionalSpreadBoolean(b: boolean) : { x: number, y: number } { ->conditionalSpreadBoolean : Symbol(conditionalSpreadBoolean, Decl(objectSpread.ts, 46, 1)) ->b : Symbol(b, Decl(objectSpread.ts, 48, 34)) ->x : Symbol(x, Decl(objectSpread.ts, 48, 49)) ->y : Symbol(y, Decl(objectSpread.ts, 48, 60)) +>conditionalSpreadBoolean : Symbol(conditionalSpreadBoolean, Decl(objectSpread.ts, 37, 1)) +>b : Symbol(b, Decl(objectSpread.ts, 39, 34)) +>x : Symbol(x, Decl(objectSpread.ts, 39, 49)) +>y : Symbol(y, Decl(objectSpread.ts, 39, 60)) let o = { x: 12, y: 13 } ->o : Symbol(o, Decl(objectSpread.ts, 49, 7)) ->x : Symbol(x, Decl(objectSpread.ts, 49, 13)) ->y : Symbol(y, Decl(objectSpread.ts, 49, 20)) +>o : Symbol(o, Decl(objectSpread.ts, 40, 7)) +>x : Symbol(x, Decl(objectSpread.ts, 40, 13)) +>y : Symbol(y, Decl(objectSpread.ts, 40, 20)) o = { ->o : Symbol(o, Decl(objectSpread.ts, 49, 7)) +>o : Symbol(o, Decl(objectSpread.ts, 40, 7)) ...o, ->o : Symbol(o, Decl(objectSpread.ts, 49, 7)) +>o : Symbol(o, Decl(objectSpread.ts, 40, 7)) ...b && { x: 14 } ->b : Symbol(b, Decl(objectSpread.ts, 48, 34)) ->x : Symbol(x, Decl(objectSpread.ts, 52, 17)) +>b : Symbol(b, Decl(objectSpread.ts, 39, 34)) +>x : Symbol(x, Decl(objectSpread.ts, 43, 17)) } let o2 = { ...b && { x: 21 }} ->o2 : Symbol(o2, Decl(objectSpread.ts, 54, 7)) ->b : Symbol(b, Decl(objectSpread.ts, 48, 34)) ->x : Symbol(x, Decl(objectSpread.ts, 54, 24)) +>o2 : Symbol(o2, Decl(objectSpread.ts, 45, 7)) +>b : Symbol(b, Decl(objectSpread.ts, 39, 34)) +>x : Symbol(x, Decl(objectSpread.ts, 45, 24)) return o; ->o : Symbol(o, Decl(objectSpread.ts, 49, 7)) +>o : Symbol(o, Decl(objectSpread.ts, 40, 7)) } function conditionalSpreadNumber(nt: number): { x: number, y: number } { ->conditionalSpreadNumber : Symbol(conditionalSpreadNumber, Decl(objectSpread.ts, 56, 1)) ->nt : Symbol(nt, Decl(objectSpread.ts, 57, 33)) ->x : Symbol(x, Decl(objectSpread.ts, 57, 47)) ->y : Symbol(y, Decl(objectSpread.ts, 57, 58)) +>conditionalSpreadNumber : Symbol(conditionalSpreadNumber, Decl(objectSpread.ts, 47, 1)) +>nt : Symbol(nt, Decl(objectSpread.ts, 48, 33)) +>x : Symbol(x, Decl(objectSpread.ts, 48, 47)) +>y : Symbol(y, Decl(objectSpread.ts, 48, 58)) let o = { x: 15, y: 16 } ->o : Symbol(o, Decl(objectSpread.ts, 58, 7)) ->x : Symbol(x, Decl(objectSpread.ts, 58, 13)) ->y : Symbol(y, Decl(objectSpread.ts, 58, 20)) +>o : Symbol(o, Decl(objectSpread.ts, 49, 7)) +>x : Symbol(x, Decl(objectSpread.ts, 49, 13)) +>y : Symbol(y, Decl(objectSpread.ts, 49, 20)) o = { ->o : Symbol(o, Decl(objectSpread.ts, 58, 7)) +>o : Symbol(o, Decl(objectSpread.ts, 49, 7)) ...o, ->o : Symbol(o, Decl(objectSpread.ts, 58, 7)) +>o : Symbol(o, Decl(objectSpread.ts, 49, 7)) ...nt && { x: nt } ->nt : Symbol(nt, Decl(objectSpread.ts, 57, 33)) ->x : Symbol(x, Decl(objectSpread.ts, 61, 18)) ->nt : Symbol(nt, Decl(objectSpread.ts, 57, 33)) +>nt : Symbol(nt, Decl(objectSpread.ts, 48, 33)) +>x : Symbol(x, Decl(objectSpread.ts, 52, 18)) +>nt : Symbol(nt, Decl(objectSpread.ts, 48, 33)) } let o2 = { ...nt && { x: nt }} ->o2 : Symbol(o2, Decl(objectSpread.ts, 63, 7)) ->nt : Symbol(nt, Decl(objectSpread.ts, 57, 33)) ->x : Symbol(x, Decl(objectSpread.ts, 63, 25)) ->nt : Symbol(nt, Decl(objectSpread.ts, 57, 33)) +>o2 : Symbol(o2, Decl(objectSpread.ts, 54, 7)) +>nt : Symbol(nt, Decl(objectSpread.ts, 48, 33)) +>x : Symbol(x, Decl(objectSpread.ts, 54, 25)) +>nt : Symbol(nt, Decl(objectSpread.ts, 48, 33)) return o; ->o : Symbol(o, Decl(objectSpread.ts, 58, 7)) +>o : Symbol(o, Decl(objectSpread.ts, 49, 7)) } function conditionalSpreadString(st: string): { x: string, y: number } { ->conditionalSpreadString : Symbol(conditionalSpreadString, Decl(objectSpread.ts, 65, 1)) ->st : Symbol(st, Decl(objectSpread.ts, 66, 33)) ->x : Symbol(x, Decl(objectSpread.ts, 66, 47)) ->y : Symbol(y, Decl(objectSpread.ts, 66, 58)) +>conditionalSpreadString : Symbol(conditionalSpreadString, Decl(objectSpread.ts, 56, 1)) +>st : Symbol(st, Decl(objectSpread.ts, 57, 33)) +>x : Symbol(x, Decl(objectSpread.ts, 57, 47)) +>y : Symbol(y, Decl(objectSpread.ts, 57, 58)) let o = { x: 'hi', y: 17 } ->o : Symbol(o, Decl(objectSpread.ts, 67, 7)) ->x : Symbol(x, Decl(objectSpread.ts, 67, 13)) ->y : Symbol(y, Decl(objectSpread.ts, 67, 22)) +>o : Symbol(o, Decl(objectSpread.ts, 58, 7)) +>x : Symbol(x, Decl(objectSpread.ts, 58, 13)) +>y : Symbol(y, Decl(objectSpread.ts, 58, 22)) o = { ->o : Symbol(o, Decl(objectSpread.ts, 67, 7)) +>o : Symbol(o, Decl(objectSpread.ts, 58, 7)) ...o, ->o : Symbol(o, Decl(objectSpread.ts, 67, 7)) +>o : Symbol(o, Decl(objectSpread.ts, 58, 7)) ...st && { x: st } ->st : Symbol(st, Decl(objectSpread.ts, 66, 33)) ->x : Symbol(x, Decl(objectSpread.ts, 70, 18)) ->st : Symbol(st, Decl(objectSpread.ts, 66, 33)) +>st : Symbol(st, Decl(objectSpread.ts, 57, 33)) +>x : Symbol(x, Decl(objectSpread.ts, 61, 18)) +>st : Symbol(st, Decl(objectSpread.ts, 57, 33)) } let o2 = { ...st && { x: st }} ->o2 : Symbol(o2, Decl(objectSpread.ts, 72, 7)) ->st : Symbol(st, Decl(objectSpread.ts, 66, 33)) ->x : Symbol(x, Decl(objectSpread.ts, 72, 25)) ->st : Symbol(st, Decl(objectSpread.ts, 66, 33)) +>o2 : Symbol(o2, Decl(objectSpread.ts, 63, 7)) +>st : Symbol(st, Decl(objectSpread.ts, 57, 33)) +>x : Symbol(x, Decl(objectSpread.ts, 63, 25)) +>st : Symbol(st, Decl(objectSpread.ts, 57, 33)) return o; ->o : Symbol(o, Decl(objectSpread.ts, 67, 7)) +>o : Symbol(o, Decl(objectSpread.ts, 58, 7)) } // any results in any let anything: any; ->anything : Symbol(anything, Decl(objectSpread.ts, 77, 3)) +>anything : Symbol(anything, Decl(objectSpread.ts, 68, 3)) let spreadAny = { ...anything }; ->spreadAny : Symbol(spreadAny, Decl(objectSpread.ts, 78, 3)) ->anything : Symbol(anything, Decl(objectSpread.ts, 77, 3)) +>spreadAny : Symbol(spreadAny, Decl(objectSpread.ts, 69, 3)) +>anything : Symbol(anything, Decl(objectSpread.ts, 68, 3)) // methods are not enumerable class C { p = 1; m() { } } ->C : Symbol(C, Decl(objectSpread.ts, 78, 32)) ->p : Symbol(C.p, Decl(objectSpread.ts, 81, 9)) ->m : Symbol(C.m, Decl(objectSpread.ts, 81, 16)) +>C : Symbol(C, Decl(objectSpread.ts, 69, 32)) +>p : Symbol(C.p, Decl(objectSpread.ts, 72, 9)) +>m : Symbol(C.m, Decl(objectSpread.ts, 72, 16)) let c: C = new C() ->c : Symbol(c, Decl(objectSpread.ts, 82, 3)) ->C : Symbol(C, Decl(objectSpread.ts, 78, 32)) ->C : Symbol(C, Decl(objectSpread.ts, 78, 32)) +>c : Symbol(c, Decl(objectSpread.ts, 73, 3)) +>C : Symbol(C, Decl(objectSpread.ts, 69, 32)) +>C : Symbol(C, Decl(objectSpread.ts, 69, 32)) let spreadC: { p: number } = { ...c } ->spreadC : Symbol(spreadC, Decl(objectSpread.ts, 83, 3)) ->p : Symbol(p, Decl(objectSpread.ts, 83, 14)) ->c : Symbol(c, Decl(objectSpread.ts, 82, 3)) +>spreadC : Symbol(spreadC, Decl(objectSpread.ts, 74, 3)) +>p : Symbol(p, Decl(objectSpread.ts, 74, 14)) +>c : Symbol(c, Decl(objectSpread.ts, 73, 3)) // own methods are enumerable let cplus: { p: number, plus(): void } = { ...c, plus() { return this.p + 1; } }; ->cplus : Symbol(cplus, Decl(objectSpread.ts, 86, 3)) ->p : Symbol(p, Decl(objectSpread.ts, 86, 12)) ->plus : Symbol(plus, Decl(objectSpread.ts, 86, 23)) ->c : Symbol(c, Decl(objectSpread.ts, 82, 3)) ->plus : Symbol(plus, Decl(objectSpread.ts, 86, 48)) +>cplus : Symbol(cplus, Decl(objectSpread.ts, 77, 3)) +>p : Symbol(p, Decl(objectSpread.ts, 77, 12)) +>plus : Symbol(plus, Decl(objectSpread.ts, 77, 23)) +>c : Symbol(c, Decl(objectSpread.ts, 73, 3)) +>plus : Symbol(plus, Decl(objectSpread.ts, 77, 48)) cplus.plus(); ->cplus.plus : Symbol(plus, Decl(objectSpread.ts, 86, 23)) ->cplus : Symbol(cplus, Decl(objectSpread.ts, 86, 3)) ->plus : Symbol(plus, Decl(objectSpread.ts, 86, 23)) +>cplus.plus : Symbol(plus, Decl(objectSpread.ts, 77, 23)) +>cplus : Symbol(cplus, Decl(objectSpread.ts, 77, 3)) +>plus : Symbol(plus, Decl(objectSpread.ts, 77, 23)) // new field's type conflicting with existing field is OK let changeTypeAfter: { a: string, b: string } = ->changeTypeAfter : Symbol(changeTypeAfter, Decl(objectSpread.ts, 90, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 90, 22)) ->b : Symbol(b, Decl(objectSpread.ts, 90, 33)) +>changeTypeAfter : Symbol(changeTypeAfter, Decl(objectSpread.ts, 81, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 81, 22)) +>b : Symbol(b, Decl(objectSpread.ts, 81, 33)) { ...o, a: 'wrong type?' } >o : Symbol(o, Decl(objectSpread.ts, 0, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 91, 11)) - -let changeTypeBefore: { a: number, b: string } = ->changeTypeBefore : Symbol(changeTypeBefore, Decl(objectSpread.ts, 92, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 92, 23)) ->b : Symbol(b, Decl(objectSpread.ts, 92, 34)) - - { a: 'wrong type?', ...o }; ->a : Symbol(a, Decl(objectSpread.ts, 93, 5)) ->o : Symbol(o, Decl(objectSpread.ts, 0, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 82, 11)) let changeTypeBoth: { a: string, b: number } = ->changeTypeBoth : Symbol(changeTypeBoth, Decl(objectSpread.ts, 94, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 94, 21)) ->b : Symbol(b, Decl(objectSpread.ts, 94, 32)) +>changeTypeBoth : Symbol(changeTypeBoth, Decl(objectSpread.ts, 83, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 83, 21)) +>b : Symbol(b, Decl(objectSpread.ts, 83, 32)) { ...o, ...swap }; >o : Symbol(o, Decl(objectSpread.ts, 0, 3)) @@ -359,277 +303,263 @@ let changeTypeBoth: { a: string, b: number } = // optional function container( ->container : Symbol(container, Decl(objectSpread.ts, 95, 22)) +>container : Symbol(container, Decl(objectSpread.ts, 84, 22)) definiteBoolean: { sn: boolean }, ->definiteBoolean : Symbol(definiteBoolean, Decl(objectSpread.ts, 98, 19)) ->sn : Symbol(sn, Decl(objectSpread.ts, 99, 22)) +>definiteBoolean : Symbol(definiteBoolean, Decl(objectSpread.ts, 87, 19)) +>sn : Symbol(sn, Decl(objectSpread.ts, 88, 22)) definiteString: { sn: string }, ->definiteString : Symbol(definiteString, Decl(objectSpread.ts, 99, 37)) ->sn : Symbol(sn, Decl(objectSpread.ts, 100, 21)) +>definiteString : Symbol(definiteString, Decl(objectSpread.ts, 88, 37)) +>sn : Symbol(sn, Decl(objectSpread.ts, 89, 21)) optionalString: { sn?: string }, ->optionalString : Symbol(optionalString, Decl(objectSpread.ts, 100, 35)) ->sn : Symbol(sn, Decl(objectSpread.ts, 101, 21)) +>optionalString : Symbol(optionalString, Decl(objectSpread.ts, 89, 35)) +>sn : Symbol(sn, Decl(objectSpread.ts, 90, 21)) optionalNumber: { sn?: number }) { ->optionalNumber : Symbol(optionalNumber, Decl(objectSpread.ts, 101, 36)) ->sn : Symbol(sn, Decl(objectSpread.ts, 102, 21)) +>optionalNumber : Symbol(optionalNumber, Decl(objectSpread.ts, 90, 36)) +>sn : Symbol(sn, Decl(objectSpread.ts, 91, 21)) let optionalUnionStops: { sn: string | number | boolean } = { ...definiteBoolean, ...definiteString, ...optionalNumber }; ->optionalUnionStops : Symbol(optionalUnionStops, Decl(objectSpread.ts, 103, 7)) ->sn : Symbol(sn, Decl(objectSpread.ts, 103, 29)) ->definiteBoolean : Symbol(definiteBoolean, Decl(objectSpread.ts, 98, 19)) ->definiteString : Symbol(definiteString, Decl(objectSpread.ts, 99, 37)) ->optionalNumber : Symbol(optionalNumber, Decl(objectSpread.ts, 101, 36)) +>optionalUnionStops : Symbol(optionalUnionStops, Decl(objectSpread.ts, 92, 7)) +>sn : Symbol(sn, Decl(objectSpread.ts, 92, 29)) +>definiteBoolean : Symbol(definiteBoolean, Decl(objectSpread.ts, 87, 19)) +>definiteString : Symbol(definiteString, Decl(objectSpread.ts, 88, 37)) +>optionalNumber : Symbol(optionalNumber, Decl(objectSpread.ts, 90, 36)) let optionalUnionDuplicates: { sn: string | number } = { ...definiteBoolean, ...definiteString, ...optionalString, ...optionalNumber }; ->optionalUnionDuplicates : Symbol(optionalUnionDuplicates, Decl(objectSpread.ts, 104, 7)) ->sn : Symbol(sn, Decl(objectSpread.ts, 104, 34)) ->definiteBoolean : Symbol(definiteBoolean, Decl(objectSpread.ts, 98, 19)) ->definiteString : Symbol(definiteString, Decl(objectSpread.ts, 99, 37)) ->optionalString : Symbol(optionalString, Decl(objectSpread.ts, 100, 35)) ->optionalNumber : Symbol(optionalNumber, Decl(objectSpread.ts, 101, 36)) +>optionalUnionDuplicates : Symbol(optionalUnionDuplicates, Decl(objectSpread.ts, 93, 7)) +>sn : Symbol(sn, Decl(objectSpread.ts, 93, 34)) +>definiteBoolean : Symbol(definiteBoolean, Decl(objectSpread.ts, 87, 19)) +>definiteString : Symbol(definiteString, Decl(objectSpread.ts, 88, 37)) +>optionalString : Symbol(optionalString, Decl(objectSpread.ts, 89, 35)) +>optionalNumber : Symbol(optionalNumber, Decl(objectSpread.ts, 90, 36)) let allOptional: { sn?: string | number } = { ...optionalString, ...optionalNumber }; ->allOptional : Symbol(allOptional, Decl(objectSpread.ts, 105, 7)) ->sn : Symbol(sn, Decl(objectSpread.ts, 105, 22)) ->optionalString : Symbol(optionalString, Decl(objectSpread.ts, 100, 35)) ->optionalNumber : Symbol(optionalNumber, Decl(objectSpread.ts, 101, 36)) +>allOptional : Symbol(allOptional, Decl(objectSpread.ts, 94, 7)) +>sn : Symbol(sn, Decl(objectSpread.ts, 94, 22)) +>optionalString : Symbol(optionalString, Decl(objectSpread.ts, 89, 35)) +>optionalNumber : Symbol(optionalNumber, Decl(objectSpread.ts, 90, 36)) // computed property let computedFirst: { a: number, b: string, "before everything": number } = ->computedFirst : Symbol(computedFirst, Decl(objectSpread.ts, 108, 7)) ->a : Symbol(a, Decl(objectSpread.ts, 108, 24)) ->b : Symbol(b, Decl(objectSpread.ts, 108, 35)) ->"before everything" : Symbol("before everything", Decl(objectSpread.ts, 108, 46)) +>computedFirst : Symbol(computedFirst, Decl(objectSpread.ts, 97, 7)) +>a : Symbol(a, Decl(objectSpread.ts, 97, 24)) +>b : Symbol(b, Decl(objectSpread.ts, 97, 35)) +>"before everything" : Symbol("before everything", Decl(objectSpread.ts, 97, 46)) { ['before everything']: 12, ...o, b: 'yes' } ->['before everything'] : Symbol(['before everything'], Decl(objectSpread.ts, 109, 9)) ->'before everything' : Symbol(['before everything'], Decl(objectSpread.ts, 109, 9)) ->o : Symbol(o, Decl(objectSpread.ts, 0, 3)) ->b : Symbol(b, Decl(objectSpread.ts, 109, 42)) - - let computedMiddle: { a: number, b: string, c: boolean, "in the middle": number } = ->computedMiddle : Symbol(computedMiddle, Decl(objectSpread.ts, 110, 7)) ->a : Symbol(a, Decl(objectSpread.ts, 110, 25)) ->b : Symbol(b, Decl(objectSpread.ts, 110, 36)) ->c : Symbol(c, Decl(objectSpread.ts, 110, 47)) ->"in the middle" : Symbol("in the middle", Decl(objectSpread.ts, 110, 59)) - - { ...o, ['in the middle']: 13, b: 'maybe?', ...o2 } +>['before everything'] : Symbol(['before everything'], Decl(objectSpread.ts, 98, 9)) +>'before everything' : Symbol(['before everything'], Decl(objectSpread.ts, 98, 9)) >o : Symbol(o, Decl(objectSpread.ts, 0, 3)) ->['in the middle'] : Symbol(['in the middle'], Decl(objectSpread.ts, 111, 15)) ->'in the middle' : Symbol(['in the middle'], Decl(objectSpread.ts, 111, 15)) ->b : Symbol(b, Decl(objectSpread.ts, 111, 38)) ->o2 : Symbol(o2, Decl(objectSpread.ts, 1, 3)) +>b : Symbol(b, Decl(objectSpread.ts, 98, 42)) let computedAfter: { a: number, b: string, "at the end": number } = ->computedAfter : Symbol(computedAfter, Decl(objectSpread.ts, 112, 7)) ->a : Symbol(a, Decl(objectSpread.ts, 112, 24)) ->b : Symbol(b, Decl(objectSpread.ts, 112, 35)) ->"at the end" : Symbol("at the end", Decl(objectSpread.ts, 112, 46)) +>computedAfter : Symbol(computedAfter, Decl(objectSpread.ts, 99, 7)) +>a : Symbol(a, Decl(objectSpread.ts, 99, 24)) +>b : Symbol(b, Decl(objectSpread.ts, 99, 35)) +>"at the end" : Symbol("at the end", Decl(objectSpread.ts, 99, 46)) { ...o, b: 'yeah', ['at the end']: 14 } >o : Symbol(o, Decl(objectSpread.ts, 0, 3)) ->b : Symbol(b, Decl(objectSpread.ts, 113, 15)) ->['at the end'] : Symbol(['at the end'], Decl(objectSpread.ts, 113, 26)) ->'at the end' : Symbol(['at the end'], Decl(objectSpread.ts, 113, 26)) +>b : Symbol(b, Decl(objectSpread.ts, 100, 15)) +>['at the end'] : Symbol(['at the end'], Decl(objectSpread.ts, 100, 26)) +>'at the end' : Symbol(['at the end'], Decl(objectSpread.ts, 100, 26)) } // shortcut syntax let a = 12; ->a : Symbol(a, Decl(objectSpread.ts, 116, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 103, 3)) let shortCutted: { a: number, b: string } = { ...o, a } ->shortCutted : Symbol(shortCutted, Decl(objectSpread.ts, 117, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 117, 18)) ->b : Symbol(b, Decl(objectSpread.ts, 117, 29)) +>shortCutted : Symbol(shortCutted, Decl(objectSpread.ts, 104, 3)) +>a : Symbol(a, Decl(objectSpread.ts, 104, 18)) +>b : Symbol(b, Decl(objectSpread.ts, 104, 29)) >o : Symbol(o, Decl(objectSpread.ts, 0, 3)) ->a : Symbol(a, Decl(objectSpread.ts, 117, 51)) +>a : Symbol(a, Decl(objectSpread.ts, 104, 51)) // non primitive let spreadNonPrimitive = { ...{}}; ->spreadNonPrimitive : Symbol(spreadNonPrimitive, Decl(objectSpread.ts, 119, 3)) +>spreadNonPrimitive : Symbol(spreadNonPrimitive, Decl(objectSpread.ts, 106, 3)) // generic spreads function f(t: T, u: U) { ->f : Symbol(f, Decl(objectSpread.ts, 119, 42)) ->T : Symbol(T, Decl(objectSpread.ts, 123, 11)) ->U : Symbol(U, Decl(objectSpread.ts, 123, 13)) ->t : Symbol(t, Decl(objectSpread.ts, 123, 17)) ->T : Symbol(T, Decl(objectSpread.ts, 123, 11)) ->u : Symbol(u, Decl(objectSpread.ts, 123, 22)) ->U : Symbol(U, Decl(objectSpread.ts, 123, 13)) +>f : Symbol(f, Decl(objectSpread.ts, 106, 42)) +>T : Symbol(T, Decl(objectSpread.ts, 110, 11)) +>U : Symbol(U, Decl(objectSpread.ts, 110, 13)) +>t : Symbol(t, Decl(objectSpread.ts, 110, 17)) +>T : Symbol(T, Decl(objectSpread.ts, 110, 11)) +>u : Symbol(u, Decl(objectSpread.ts, 110, 22)) +>U : Symbol(U, Decl(objectSpread.ts, 110, 13)) return { ...t, ...u, id: 'id' }; ->t : Symbol(t, Decl(objectSpread.ts, 123, 17)) ->u : Symbol(u, Decl(objectSpread.ts, 123, 22)) ->id : Symbol(id, Decl(objectSpread.ts, 124, 24)) +>t : Symbol(t, Decl(objectSpread.ts, 110, 17)) +>u : Symbol(u, Decl(objectSpread.ts, 110, 22)) +>id : Symbol(id, Decl(objectSpread.ts, 111, 24)) } let exclusive: { id: string, a: number, b: string, c: string, d: boolean } = ->exclusive : Symbol(exclusive, Decl(objectSpread.ts, 127, 3)) ->id : Symbol(id, Decl(objectSpread.ts, 127, 16)) ->a : Symbol(a, Decl(objectSpread.ts, 127, 28)) ->b : Symbol(b, Decl(objectSpread.ts, 127, 39)) ->c : Symbol(c, Decl(objectSpread.ts, 127, 50)) ->d : Symbol(d, Decl(objectSpread.ts, 127, 61)) +>exclusive : Symbol(exclusive, Decl(objectSpread.ts, 114, 3)) +>id : Symbol(id, Decl(objectSpread.ts, 114, 16)) +>a : Symbol(a, Decl(objectSpread.ts, 114, 28)) +>b : Symbol(b, Decl(objectSpread.ts, 114, 39)) +>c : Symbol(c, Decl(objectSpread.ts, 114, 50)) +>d : Symbol(d, Decl(objectSpread.ts, 114, 61)) f({ a: 1, b: 'yes' }, { c: 'no', d: false }) ->f : Symbol(f, Decl(objectSpread.ts, 119, 42)) ->a : Symbol(a, Decl(objectSpread.ts, 128, 7)) ->b : Symbol(b, Decl(objectSpread.ts, 128, 13)) ->c : Symbol(c, Decl(objectSpread.ts, 128, 27)) ->d : Symbol(d, Decl(objectSpread.ts, 128, 36)) +>f : Symbol(f, Decl(objectSpread.ts, 106, 42)) +>a : Symbol(a, Decl(objectSpread.ts, 115, 7)) +>b : Symbol(b, Decl(objectSpread.ts, 115, 13)) +>c : Symbol(c, Decl(objectSpread.ts, 115, 27)) +>d : Symbol(d, Decl(objectSpread.ts, 115, 36)) let overlap: { id: string, a: number, b: string } = ->overlap : Symbol(overlap, Decl(objectSpread.ts, 129, 3)) ->id : Symbol(id, Decl(objectSpread.ts, 129, 14)) ->a : Symbol(a, Decl(objectSpread.ts, 129, 26)) ->b : Symbol(b, Decl(objectSpread.ts, 129, 37)) +>overlap : Symbol(overlap, Decl(objectSpread.ts, 116, 3)) +>id : Symbol(id, Decl(objectSpread.ts, 116, 14)) +>a : Symbol(a, Decl(objectSpread.ts, 116, 26)) +>b : Symbol(b, Decl(objectSpread.ts, 116, 37)) f({ a: 1 }, { a: 2, b: 'extra' }) ->f : Symbol(f, Decl(objectSpread.ts, 119, 42)) ->a : Symbol(a, Decl(objectSpread.ts, 130, 7)) ->a : Symbol(a, Decl(objectSpread.ts, 130, 17)) ->b : Symbol(b, Decl(objectSpread.ts, 130, 23)) +>f : Symbol(f, Decl(objectSpread.ts, 106, 42)) +>a : Symbol(a, Decl(objectSpread.ts, 117, 7)) +>a : Symbol(a, Decl(objectSpread.ts, 117, 17)) +>b : Symbol(b, Decl(objectSpread.ts, 117, 23)) let overlapConflict: { id:string, a: string } = ->overlapConflict : Symbol(overlapConflict, Decl(objectSpread.ts, 131, 3)) ->id : Symbol(id, Decl(objectSpread.ts, 131, 22)) ->a : Symbol(a, Decl(objectSpread.ts, 131, 33)) +>overlapConflict : Symbol(overlapConflict, Decl(objectSpread.ts, 118, 3)) +>id : Symbol(id, Decl(objectSpread.ts, 118, 22)) +>a : Symbol(a, Decl(objectSpread.ts, 118, 33)) f({ a: 1 }, { a: 'mismatch' }) ->f : Symbol(f, Decl(objectSpread.ts, 119, 42)) ->a : Symbol(a, Decl(objectSpread.ts, 132, 7)) ->a : Symbol(a, Decl(objectSpread.ts, 132, 17)) +>f : Symbol(f, Decl(objectSpread.ts, 106, 42)) +>a : Symbol(a, Decl(objectSpread.ts, 119, 7)) +>a : Symbol(a, Decl(objectSpread.ts, 119, 17)) let overwriteId: { id: string, a: number, c: number, d: string } = ->overwriteId : Symbol(overwriteId, Decl(objectSpread.ts, 133, 3)) ->id : Symbol(id, Decl(objectSpread.ts, 133, 18)) ->a : Symbol(a, Decl(objectSpread.ts, 133, 30)) ->c : Symbol(c, Decl(objectSpread.ts, 133, 41)) ->d : Symbol(d, Decl(objectSpread.ts, 133, 52)) +>overwriteId : Symbol(overwriteId, Decl(objectSpread.ts, 120, 3)) +>id : Symbol(id, Decl(objectSpread.ts, 120, 18)) +>a : Symbol(a, Decl(objectSpread.ts, 120, 30)) +>c : Symbol(c, Decl(objectSpread.ts, 120, 41)) +>d : Symbol(d, Decl(objectSpread.ts, 120, 52)) f({ a: 1, id: true }, { c: 1, d: 'no' }) ->f : Symbol(f, Decl(objectSpread.ts, 119, 42)) ->a : Symbol(a, Decl(objectSpread.ts, 134, 7)) ->id : Symbol(id, Decl(objectSpread.ts, 134, 13)) ->c : Symbol(c, Decl(objectSpread.ts, 134, 27)) ->d : Symbol(d, Decl(objectSpread.ts, 134, 33)) +>f : Symbol(f, Decl(objectSpread.ts, 106, 42)) +>a : Symbol(a, Decl(objectSpread.ts, 121, 7)) +>id : Symbol(id, Decl(objectSpread.ts, 121, 13)) +>c : Symbol(c, Decl(objectSpread.ts, 121, 27)) +>d : Symbol(d, Decl(objectSpread.ts, 121, 33)) function genericSpread(t: T, u: U, v: T | U, w: T | { s: string }, obj: { x: number }) { ->genericSpread : Symbol(genericSpread, Decl(objectSpread.ts, 134, 44)) ->T : Symbol(T, Decl(objectSpread.ts, 136, 23)) ->U : Symbol(U, Decl(objectSpread.ts, 136, 25)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) ->T : Symbol(T, Decl(objectSpread.ts, 136, 23)) ->u : Symbol(u, Decl(objectSpread.ts, 136, 34)) ->U : Symbol(U, Decl(objectSpread.ts, 136, 25)) ->v : Symbol(v, Decl(objectSpread.ts, 136, 40)) ->T : Symbol(T, Decl(objectSpread.ts, 136, 23)) ->U : Symbol(U, Decl(objectSpread.ts, 136, 25)) ->w : Symbol(w, Decl(objectSpread.ts, 136, 50)) ->T : Symbol(T, Decl(objectSpread.ts, 136, 23)) ->s : Symbol(s, Decl(objectSpread.ts, 136, 59)) ->obj : Symbol(obj, Decl(objectSpread.ts, 136, 72)) ->x : Symbol(x, Decl(objectSpread.ts, 136, 79)) +>genericSpread : Symbol(genericSpread, Decl(objectSpread.ts, 121, 44)) +>T : Symbol(T, Decl(objectSpread.ts, 123, 23)) +>U : Symbol(U, Decl(objectSpread.ts, 123, 25)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) +>T : Symbol(T, Decl(objectSpread.ts, 123, 23)) +>u : Symbol(u, Decl(objectSpread.ts, 123, 34)) +>U : Symbol(U, Decl(objectSpread.ts, 123, 25)) +>v : Symbol(v, Decl(objectSpread.ts, 123, 40)) +>T : Symbol(T, Decl(objectSpread.ts, 123, 23)) +>U : Symbol(U, Decl(objectSpread.ts, 123, 25)) +>w : Symbol(w, Decl(objectSpread.ts, 123, 50)) +>T : Symbol(T, Decl(objectSpread.ts, 123, 23)) +>s : Symbol(s, Decl(objectSpread.ts, 123, 59)) +>obj : Symbol(obj, Decl(objectSpread.ts, 123, 72)) +>x : Symbol(x, Decl(objectSpread.ts, 123, 79)) let x01 = { ...t }; ->x01 : Symbol(x01, Decl(objectSpread.ts, 137, 7)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) +>x01 : Symbol(x01, Decl(objectSpread.ts, 124, 7)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) let x02 = { ...t, ...t }; ->x02 : Symbol(x02, Decl(objectSpread.ts, 138, 7)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) +>x02 : Symbol(x02, Decl(objectSpread.ts, 125, 7)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) let x03 = { ...t, ...u }; ->x03 : Symbol(x03, Decl(objectSpread.ts, 139, 7)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) ->u : Symbol(u, Decl(objectSpread.ts, 136, 34)) +>x03 : Symbol(x03, Decl(objectSpread.ts, 126, 7)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) +>u : Symbol(u, Decl(objectSpread.ts, 123, 34)) let x04 = { ...u, ...t }; ->x04 : Symbol(x04, Decl(objectSpread.ts, 140, 7)) ->u : Symbol(u, Decl(objectSpread.ts, 136, 34)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) +>x04 : Symbol(x04, Decl(objectSpread.ts, 127, 7)) +>u : Symbol(u, Decl(objectSpread.ts, 123, 34)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) let x05 = { a: 5, b: 'hi', ...t }; ->x05 : Symbol(x05, Decl(objectSpread.ts, 141, 7)) ->a : Symbol(a, Decl(objectSpread.ts, 141, 15)) ->b : Symbol(b, Decl(objectSpread.ts, 141, 21)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) +>x05 : Symbol(x05, Decl(objectSpread.ts, 128, 7)) +>a : Symbol(a, Decl(objectSpread.ts, 128, 15)) +>b : Symbol(b, Decl(objectSpread.ts, 128, 21)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) let x06 = { ...t, a: 5, b: 'hi' }; ->x06 : Symbol(x06, Decl(objectSpread.ts, 142, 7)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) ->a : Symbol(a, Decl(objectSpread.ts, 142, 21)) ->b : Symbol(b, Decl(objectSpread.ts, 142, 27)) +>x06 : Symbol(x06, Decl(objectSpread.ts, 129, 7)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) +>a : Symbol(a, Decl(objectSpread.ts, 129, 21)) +>b : Symbol(b, Decl(objectSpread.ts, 129, 27)) let x07 = { a: 5, b: 'hi', ...t, c: true, ...obj }; ->x07 : Symbol(x07, Decl(objectSpread.ts, 143, 7)) ->a : Symbol(a, Decl(objectSpread.ts, 143, 15)) ->b : Symbol(b, Decl(objectSpread.ts, 143, 21)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) ->c : Symbol(c, Decl(objectSpread.ts, 143, 36)) ->obj : Symbol(obj, Decl(objectSpread.ts, 136, 72)) +>x07 : Symbol(x07, Decl(objectSpread.ts, 130, 7)) +>a : Symbol(a, Decl(objectSpread.ts, 130, 15)) +>b : Symbol(b, Decl(objectSpread.ts, 130, 21)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) +>c : Symbol(c, Decl(objectSpread.ts, 130, 36)) +>obj : Symbol(obj, Decl(objectSpread.ts, 123, 72)) let x09 = { a: 5, ...t, b: 'hi', c: true, ...obj }; ->x09 : Symbol(x09, Decl(objectSpread.ts, 144, 7)) ->a : Symbol(a, Decl(objectSpread.ts, 144, 15)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) ->b : Symbol(b, Decl(objectSpread.ts, 144, 27)) ->c : Symbol(c, Decl(objectSpread.ts, 144, 36)) ->obj : Symbol(obj, Decl(objectSpread.ts, 136, 72)) +>x09 : Symbol(x09, Decl(objectSpread.ts, 131, 7)) +>a : Symbol(a, Decl(objectSpread.ts, 131, 15)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) +>b : Symbol(b, Decl(objectSpread.ts, 131, 27)) +>c : Symbol(c, Decl(objectSpread.ts, 131, 36)) +>obj : Symbol(obj, Decl(objectSpread.ts, 123, 72)) let x10 = { a: 5, ...t, b: 'hi', ...u, ...obj }; ->x10 : Symbol(x10, Decl(objectSpread.ts, 145, 7)) ->a : Symbol(a, Decl(objectSpread.ts, 145, 15)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) ->b : Symbol(b, Decl(objectSpread.ts, 145, 27)) ->u : Symbol(u, Decl(objectSpread.ts, 136, 34)) ->obj : Symbol(obj, Decl(objectSpread.ts, 136, 72)) +>x10 : Symbol(x10, Decl(objectSpread.ts, 132, 7)) +>a : Symbol(a, Decl(objectSpread.ts, 132, 15)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) +>b : Symbol(b, Decl(objectSpread.ts, 132, 27)) +>u : Symbol(u, Decl(objectSpread.ts, 123, 34)) +>obj : Symbol(obj, Decl(objectSpread.ts, 123, 72)) let x11 = { ...v }; ->x11 : Symbol(x11, Decl(objectSpread.ts, 146, 7)) ->v : Symbol(v, Decl(objectSpread.ts, 136, 40)) +>x11 : Symbol(x11, Decl(objectSpread.ts, 133, 7)) +>v : Symbol(v, Decl(objectSpread.ts, 123, 40)) let x12 = { ...v, ...obj }; ->x12 : Symbol(x12, Decl(objectSpread.ts, 147, 7)) ->v : Symbol(v, Decl(objectSpread.ts, 136, 40)) ->obj : Symbol(obj, Decl(objectSpread.ts, 136, 72)) +>x12 : Symbol(x12, Decl(objectSpread.ts, 134, 7)) +>v : Symbol(v, Decl(objectSpread.ts, 123, 40)) +>obj : Symbol(obj, Decl(objectSpread.ts, 123, 72)) let x13 = { ...w }; ->x13 : Symbol(x13, Decl(objectSpread.ts, 148, 7)) ->w : Symbol(w, Decl(objectSpread.ts, 136, 50)) +>x13 : Symbol(x13, Decl(objectSpread.ts, 135, 7)) +>w : Symbol(w, Decl(objectSpread.ts, 123, 50)) let x14 = { ...w, ...obj }; ->x14 : Symbol(x14, Decl(objectSpread.ts, 149, 7)) ->w : Symbol(w, Decl(objectSpread.ts, 136, 50)) ->obj : Symbol(obj, Decl(objectSpread.ts, 136, 72)) +>x14 : Symbol(x14, Decl(objectSpread.ts, 136, 7)) +>w : Symbol(w, Decl(objectSpread.ts, 123, 50)) +>obj : Symbol(obj, Decl(objectSpread.ts, 123, 72)) let x15 = { ...t, ...v }; ->x15 : Symbol(x15, Decl(objectSpread.ts, 150, 7)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) ->v : Symbol(v, Decl(objectSpread.ts, 136, 40)) +>x15 : Symbol(x15, Decl(objectSpread.ts, 137, 7)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) +>v : Symbol(v, Decl(objectSpread.ts, 123, 40)) let x16 = { ...t, ...w }; ->x16 : Symbol(x16, Decl(objectSpread.ts, 151, 7)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) ->w : Symbol(w, Decl(objectSpread.ts, 136, 50)) +>x16 : Symbol(x16, Decl(objectSpread.ts, 138, 7)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) +>w : Symbol(w, Decl(objectSpread.ts, 123, 50)) let x17 = { ...t, ...w, ...obj }; ->x17 : Symbol(x17, Decl(objectSpread.ts, 152, 7)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) ->w : Symbol(w, Decl(objectSpread.ts, 136, 50)) ->obj : Symbol(obj, Decl(objectSpread.ts, 136, 72)) +>x17 : Symbol(x17, Decl(objectSpread.ts, 139, 7)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) +>w : Symbol(w, Decl(objectSpread.ts, 123, 50)) +>obj : Symbol(obj, Decl(objectSpread.ts, 123, 72)) let x18 = { ...t, ...v, ...w }; ->x18 : Symbol(x18, Decl(objectSpread.ts, 153, 7)) ->t : Symbol(t, Decl(objectSpread.ts, 136, 29)) ->v : Symbol(v, Decl(objectSpread.ts, 136, 40)) ->w : Symbol(w, Decl(objectSpread.ts, 136, 50)) +>x18 : Symbol(x18, Decl(objectSpread.ts, 140, 7)) +>t : Symbol(t, Decl(objectSpread.ts, 123, 29)) +>v : Symbol(v, Decl(objectSpread.ts, 123, 40)) +>w : Symbol(w, Decl(objectSpread.ts, 123, 50)) } diff --git a/tests/baselines/reference/objectSpread.types b/tests/baselines/reference/objectSpread.types index 2154a8ca75e71..5b0da12ed906a 100644 --- a/tests/baselines/reference/objectSpread.types +++ b/tests/baselines/reference/objectSpread.types @@ -48,18 +48,6 @@ let addBefore: { a: number, b: string, c: boolean } = >false : false >o : { a: number; b: string; } -// Note: ignore still changes the order that properties are printed -let ignore: { a: number, b: string } = ->ignore : { a: number; b: string; } ->a : number ->b : string - - { b: 'ignored', ...o } ->{ b: 'ignored', ...o } : { a: number; b: string; } ->b : string ->'ignored' : "ignored" ->o : { a: number; b: string; } - let override: { a: number, b: string } = >override : { a: number; b: string; } >a : number @@ -101,32 +89,6 @@ let combined: { a: number, b: string, c: boolean } = >o : { a: number; b: string; } >o2 : { b: string; c: boolean; } -let combinedBefore: { a: number, b: string, c: boolean } = ->combinedBefore : { a: number; b: string; c: boolean; } ->a : number ->b : string ->c : boolean - - { b: 'ok', ...o, ...o2 } ->{ b: 'ok', ...o, ...o2 } : { b: string; c: boolean; a: number; } ->b : string ->'ok' : "ok" ->o : { a: number; b: string; } ->o2 : { b: string; c: boolean; } - -let combinedMid: { a: number, b: string, c: boolean } = ->combinedMid : { a: number; b: string; c: boolean; } ->a : number ->b : string ->c : boolean - - { ...o, b: 'ok', ...o2 } ->{ ...o, b: 'ok', ...o2 } : { b: string; c: boolean; a: number; } ->o : { a: number; b: string; } ->b : string ->'ok' : "ok" ->o2 : { b: string; c: boolean; } - let combinedAfter: { a: number, b: string, c: boolean } = >combinedAfter : { a: number; b: string; c: boolean; } >a : number @@ -140,31 +102,6 @@ let combinedAfter: { a: number, b: string, c: boolean } = >b : string >'ok' : "ok" -let combinedNested: { a: number, b: boolean, c: string, d: string } = ->combinedNested : { a: number; b: boolean; c: string; d: string; } ->a : number ->b : boolean ->c : string ->d : string - - { ...{ a: 4, ...{ b: false, c: 'overriden' } }, d: 'actually new', ...{ a: 5, d: 'maybe new' } } ->{ ...{ a: 4, ...{ b: false, c: 'overriden' } }, d: 'actually new', ...{ a: 5, d: 'maybe new' } } : { a: number; d: string; b: false; c: string; } ->{ a: 4, ...{ b: false, c: 'overriden' } } : { b: false; c: string; a: number; } ->a : number ->4 : 4 ->{ b: false, c: 'overriden' } : { b: false; c: string; } ->b : false ->false : false ->c : string ->'overriden' : "overriden" ->d : string ->'actually new' : "actually new" ->{ a: 5, d: 'maybe new' } : { a: number; d: string; } ->a : number ->5 : 5 ->d : string ->'maybe new' : "maybe new" - let combinedNestedChangeType: { a: number, b: boolean, c: number } = >combinedNestedChangeType : { a: number; b: boolean; c: number; } >a : number @@ -445,17 +382,6 @@ let changeTypeAfter: { a: string, b: string } = >a : string >'wrong type?' : "wrong type?" -let changeTypeBefore: { a: number, b: string } = ->changeTypeBefore : { a: number; b: string; } ->a : number ->b : string - - { a: 'wrong type?', ...o }; ->{ a: 'wrong type?', ...o } : { a: number; b: string; } ->a : string ->'wrong type?' : "wrong type?" ->o : { a: number; b: string; } - let changeTypeBoth: { a: string, b: number } = >changeTypeBoth : { a: string; b: number; } >a : string @@ -526,23 +452,6 @@ function container( >b : string >'yes' : "yes" - let computedMiddle: { a: number, b: string, c: boolean, "in the middle": number } = ->computedMiddle : { a: number; b: string; c: boolean; "in the middle": number; } ->a : number ->b : string ->c : boolean ->"in the middle" : number - - { ...o, ['in the middle']: 13, b: 'maybe?', ...o2 } ->{ ...o, ['in the middle']: 13, b: 'maybe?', ...o2 } : { b: string; c: boolean; "in the middle": number; a: number; } ->o : { a: number; b: string; } ->['in the middle'] : number ->'in the middle' : "in the middle" ->13 : 13 ->b : string ->'maybe?' : "maybe?" ->o2 : { b: string; c: boolean; } - let computedAfter: { a: number, b: string, "at the end": number } = >computedAfter : { a: number; b: string; "at the end": number; } >a : number diff --git a/tests/baselines/reference/objectSpreadNegative.errors.txt b/tests/baselines/reference/objectSpreadNegative.errors.txt index 914df6d78d883..8b0ae9abbc515 100644 --- a/tests/baselines/reference/objectSpreadNegative.errors.txt +++ b/tests/baselines/reference/objectSpreadNegative.errors.txt @@ -1,23 +1,32 @@ tests/cases/conformance/types/spread/objectSpreadNegative.ts(13,21): error TS2339: Property 'x' does not exist on type '{}'. -tests/cases/conformance/types/spread/objectSpreadNegative.ts(16,5): error TS2322: Type '{ sn?: string | number; }' is not assignable to type '{ sn: string | number; }'. - Property 'sn' is optional in type '{ sn?: string | number; }' but required in type '{ sn: string | number; }'. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(16,5): error TS2322: Type '{ sn?: string | number | undefined; }' is not assignable to type '{ sn: string | number; }'. + Types of property 'sn' are incompatible. + Type 'string | number | undefined' is not assignable to type 'string | number'. + Type 'undefined' is not assignable to type 'string | number'. tests/cases/conformance/types/spread/objectSpreadNegative.ts(23,1): error TS2741: Property 'b' is missing in type '{ s: string; }' but required in type '{ s: string; b: boolean; }'. tests/cases/conformance/types/spread/objectSpreadNegative.ts(25,1): error TS2741: Property 's' is missing in type '{ b: boolean; }' but required in type '{ s: string; b: boolean; }'. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(28,20): error TS2783: 'b' is specified more than once, so this usage will be overwritten. tests/cases/conformance/types/spread/objectSpreadNegative.ts(28,36): error TS2300: Duplicate identifier 'b'. tests/cases/conformance/types/spread/objectSpreadNegative.ts(28,53): error TS2300: Duplicate identifier 'b'. -tests/cases/conformance/types/spread/objectSpreadNegative.ts(32,19): error TS2698: Spread types may only be created from object types. -tests/cases/conformance/types/spread/objectSpreadNegative.ts(33,19): error TS2698: Spread types may only be created from object types. -tests/cases/conformance/types/spread/objectSpreadNegative.ts(34,20): error TS2698: Spread types may only be created from object types. -tests/cases/conformance/types/spread/objectSpreadNegative.ts(36,20): error TS2698: Spread types may only be created from object types. -tests/cases/conformance/types/spread/objectSpreadNegative.ts(38,19): error TS2698: Spread types may only be created from object types. -tests/cases/conformance/types/spread/objectSpreadNegative.ts(43,1): error TS2349: This expression is not callable. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(32,7): error TS2783: 'b' is specified more than once, so this usage will be overwritten. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(37,7): error TS2783: 'b' is specified more than once, so this usage will be overwritten. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(39,14): error TS2783: 'b' is specified more than once, so this usage will be overwritten. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(41,53): error TS2783: 'd' is specified more than once, so this usage will be overwritten. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(43,7): error TS2783: 'a' is specified more than once, so this usage will be overwritten. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(45,37): error TS2783: 'b' is specified more than once, so this usage will be overwritten. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(48,19): error TS2698: Spread types may only be created from object types. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(49,19): error TS2698: Spread types may only be created from object types. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(50,20): error TS2698: Spread types may only be created from object types. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(52,20): error TS2698: Spread types may only be created from object types. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(54,19): error TS2698: Spread types may only be created from object types. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(59,1): error TS2349: This expression is not callable. Type '{}' has no call signatures. -tests/cases/conformance/types/spread/objectSpreadNegative.ts(47,1): error TS2322: Type '12' is not assignable to type 'undefined'. -tests/cases/conformance/types/spread/objectSpreadNegative.ts(53,9): error TS2339: Property 'm' does not exist on type '{ p: number; }'. -tests/cases/conformance/types/spread/objectSpreadNegative.ts(58,11): error TS2339: Property 'a' does not exist on type '{}'. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(63,1): error TS2322: Type '12' is not assignable to type 'undefined'. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(69,9): error TS2339: Property 'm' does not exist on type '{ p: number; }'. +tests/cases/conformance/types/spread/objectSpreadNegative.ts(74,11): error TS2339: Property 'a' does not exist on type '{}'. -==== tests/cases/conformance/types/spread/objectSpreadNegative.ts (15 errors) ==== +==== tests/cases/conformance/types/spread/objectSpreadNegative.ts (22 errors) ==== let o = { a: 1, b: 'no' } /// private propagates @@ -27,18 +36,20 @@ tests/cases/conformance/types/spread/objectSpreadNegative.ts(58,11): error TS233 class PublicX { public x: number; } - let publicX: PublicX; - let privateOptionalX: PrivateOptionalX; + declare let publicX: PublicX; + declare let privateOptionalX: PrivateOptionalX; let o2 = { ...publicX, ...privateOptionalX }; let sn: number = o2.x; // error, x is private ~ !!! error TS2339: Property 'x' does not exist on type '{}'. - let optionalString: { sn?: string }; - let optionalNumber: { sn?: number }; + declare let optionalString: { sn?: string }; + declare let optionalNumber: { sn?: number }; let allOptional: { sn: string | number } = { ...optionalString, ...optionalNumber }; ~~~~~~~~~~~ -!!! error TS2322: Type '{ sn?: string | number; }' is not assignable to type '{ sn: string | number; }'. -!!! error TS2322: Property 'sn' is optional in type '{ sn?: string | number; }' but required in type '{ sn: string | number; }'. +!!! error TS2322: Type '{ sn?: string | number | undefined; }' is not assignable to type '{ sn: string | number; }'. +!!! error TS2322: Types of property 'sn' are incompatible. +!!! error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string | number'. // error, 'sn' is optional in source, required in target // assignability as target @@ -57,11 +68,41 @@ tests/cases/conformance/types/spread/objectSpreadNegative.ts(58,11): error TS233 // literal repeats are not allowed, but spread repeats are fine let duplicated = { b: 'bad', ...o, b: 'bad', ...o2, b: 'bad' } + ~~~~~~~~ +!!! error TS2783: 'b' is specified more than once, so this usage will be overwritten. ~ !!! error TS2300: Duplicate identifier 'b'. ~ !!! error TS2300: Duplicate identifier 'b'. let duplicatedSpread = { ...o, ...o } + // Note: ignore changes the order that properties are printed + let ignore: { a: number, b: string } = + { b: 'ignored', ...o } + ~~~~~~~~~~~~ +!!! error TS2783: 'b' is specified more than once, so this usage will be overwritten. + + let o3 = { a: 1, b: 'no' } + let o4 = { b: 'yes', c: true } + let combinedBefore: { a: number, b: string, c: boolean } = + { b: 'ok', ...o3, ...o4 } + ~~~~~~~ +!!! error TS2783: 'b' is specified more than once, so this usage will be overwritten. + let combinedMid: { a: number, b: string, c: boolean } = + { ...o3, b: 'ok', ...o4 } + ~~~~~~~ +!!! error TS2783: 'b' is specified more than once, so this usage will be overwritten. + let combinedNested: { a: number, b: boolean, c: string, d: string } = + { ...{ a: 4, ...{ b: false, c: 'overriden' } }, d: 'actually new', ...{ a: 5, d: 'maybe new' } } + ~~~~~~~~~~~~~~~~~ +!!! error TS2783: 'd' is specified more than once, so this usage will be overwritten. + let changeTypeBefore: { a: number, b: string } = + { a: 'wrong type?', ...o3 }; + ~~~~~~~~~~~~~~~~ +!!! error TS2783: 'a' is specified more than once, so this usage will be overwritten. + let computedMiddle: { a: number, b: string, c: boolean, "in the middle": number } = + { ...o3, ['in the middle']: 13, b: 'maybe?', ...o4 } + ~~~~~~~~~~~ +!!! error TS2783: 'b' is specified more than once, so this usage will be overwritten. // primitives are not allowed, except for falsy ones let spreadNum = { ...12 }; diff --git a/tests/baselines/reference/objectSpreadNegative.js b/tests/baselines/reference/objectSpreadNegative.js index 6151f2d30b7c4..444f979a89541 100644 --- a/tests/baselines/reference/objectSpreadNegative.js +++ b/tests/baselines/reference/objectSpreadNegative.js @@ -8,12 +8,12 @@ class PrivateOptionalX { class PublicX { public x: number; } -let publicX: PublicX; -let privateOptionalX: PrivateOptionalX; +declare let publicX: PublicX; +declare let privateOptionalX: PrivateOptionalX; let o2 = { ...publicX, ...privateOptionalX }; let sn: number = o2.x; // error, x is private -let optionalString: { sn?: string }; -let optionalNumber: { sn?: number }; +declare let optionalString: { sn?: string }; +declare let optionalNumber: { sn?: number }; let allOptional: { sn: string | number } = { ...optionalString, ...optionalNumber }; // error, 'sn' is optional in source, required in target @@ -28,6 +28,22 @@ spread = b; // error, missing 's' // literal repeats are not allowed, but spread repeats are fine let duplicated = { b: 'bad', ...o, b: 'bad', ...o2, b: 'bad' } let duplicatedSpread = { ...o, ...o } +// Note: ignore changes the order that properties are printed +let ignore: { a: number, b: string } = + { b: 'ignored', ...o } + +let o3 = { a: 1, b: 'no' } +let o4 = { b: 'yes', c: true } +let combinedBefore: { a: number, b: string, c: boolean } = + { b: 'ok', ...o3, ...o4 } +let combinedMid: { a: number, b: string, c: boolean } = + { ...o3, b: 'ok', ...o4 } +let combinedNested: { a: number, b: boolean, c: string, d: string } = + { ...{ a: 4, ...{ b: false, c: 'overriden' } }, d: 'actually new', ...{ a: 5, d: 'maybe new' } } +let changeTypeBefore: { a: number, b: string } = + { a: 'wrong type?', ...o3 }; +let computedMiddle: { a: number, b: string, c: boolean, "in the middle": number } = + { ...o3, ['in the middle']: 13, b: 'maybe?', ...o4 } // primitives are not allowed, except for falsy ones let spreadNum = { ...12 }; @@ -71,6 +87,7 @@ var __assign = (this && this.__assign) || function () { }; return __assign.apply(this, arguments); }; +var _a; var o = { a: 1, b: 'no' }; /// private propagates var PrivateOptionalX = /** @class */ (function () { @@ -83,12 +100,8 @@ var PublicX = /** @class */ (function () { } return PublicX; }()); -var publicX; -var privateOptionalX; var o2 = __assign(__assign({}, publicX), privateOptionalX); var sn = o2.x; // error, x is private -var optionalString; -var optionalNumber; var allOptional = __assign(__assign({}, optionalString), optionalNumber); ; ; @@ -99,6 +112,15 @@ spread = b; // error, missing 's' // literal repeats are not allowed, but spread repeats are fine var duplicated = __assign(__assign(__assign(__assign({ b: 'bad' }, o), { b: 'bad' }), o2), { b: 'bad' }); var duplicatedSpread = __assign(__assign({}, o), o); +// Note: ignore changes the order that properties are printed +var ignore = __assign({ b: 'ignored' }, o); +var o3 = { a: 1, b: 'no' }; +var o4 = { b: 'yes', c: true }; +var combinedBefore = __assign(__assign({ b: 'ok' }, o3), o4); +var combinedMid = __assign(__assign(__assign({}, o3), { b: 'ok' }), o4); +var combinedNested = __assign(__assign(__assign({}, __assign({ a: 4 }, { b: false, c: 'overriden' })), { d: 'actually new' }), { a: 5, d: 'maybe new' }); +var changeTypeBefore = __assign({ a: 'wrong type?' }, o3); +var computedMiddle = __assign(__assign(__assign({}, o3), (_a = {}, _a['in the middle'] = 13, _a.b = 'maybe?', _a)), o4); // primitives are not allowed, except for falsy ones var spreadNum = __assign({}, 12); var spreadSum = __assign({}, 1 + 1); diff --git a/tests/baselines/reference/objectSpreadNegative.symbols b/tests/baselines/reference/objectSpreadNegative.symbols index 4962630cebdd7..3ce3dff9b2fe9 100644 --- a/tests/baselines/reference/objectSpreadNegative.symbols +++ b/tests/baselines/reference/objectSpreadNegative.symbols @@ -17,36 +17,36 @@ class PublicX { public x: number; >x : Symbol(PublicX.x, Decl(objectSpreadNegative.ts, 6, 15)) } -let publicX: PublicX; ->publicX : Symbol(publicX, Decl(objectSpreadNegative.ts, 9, 3)) +declare let publicX: PublicX; +>publicX : Symbol(publicX, Decl(objectSpreadNegative.ts, 9, 11)) >PublicX : Symbol(PublicX, Decl(objectSpreadNegative.ts, 5, 1)) -let privateOptionalX: PrivateOptionalX; ->privateOptionalX : Symbol(privateOptionalX, Decl(objectSpreadNegative.ts, 10, 3)) +declare let privateOptionalX: PrivateOptionalX; +>privateOptionalX : Symbol(privateOptionalX, Decl(objectSpreadNegative.ts, 10, 11)) >PrivateOptionalX : Symbol(PrivateOptionalX, Decl(objectSpreadNegative.ts, 0, 25)) let o2 = { ...publicX, ...privateOptionalX }; >o2 : Symbol(o2, Decl(objectSpreadNegative.ts, 11, 3)) ->publicX : Symbol(publicX, Decl(objectSpreadNegative.ts, 9, 3)) ->privateOptionalX : Symbol(privateOptionalX, Decl(objectSpreadNegative.ts, 10, 3)) +>publicX : Symbol(publicX, Decl(objectSpreadNegative.ts, 9, 11)) +>privateOptionalX : Symbol(privateOptionalX, Decl(objectSpreadNegative.ts, 10, 11)) let sn: number = o2.x; // error, x is private >sn : Symbol(sn, Decl(objectSpreadNegative.ts, 12, 3)) >o2 : Symbol(o2, Decl(objectSpreadNegative.ts, 11, 3)) -let optionalString: { sn?: string }; ->optionalString : Symbol(optionalString, Decl(objectSpreadNegative.ts, 13, 3)) ->sn : Symbol(sn, Decl(objectSpreadNegative.ts, 13, 21)) +declare let optionalString: { sn?: string }; +>optionalString : Symbol(optionalString, Decl(objectSpreadNegative.ts, 13, 11)) +>sn : Symbol(sn, Decl(objectSpreadNegative.ts, 13, 29)) -let optionalNumber: { sn?: number }; ->optionalNumber : Symbol(optionalNumber, Decl(objectSpreadNegative.ts, 14, 3)) ->sn : Symbol(sn, Decl(objectSpreadNegative.ts, 14, 21)) +declare let optionalNumber: { sn?: number }; +>optionalNumber : Symbol(optionalNumber, Decl(objectSpreadNegative.ts, 14, 11)) +>sn : Symbol(sn, Decl(objectSpreadNegative.ts, 14, 29)) let allOptional: { sn: string | number } = { ...optionalString, ...optionalNumber }; >allOptional : Symbol(allOptional, Decl(objectSpreadNegative.ts, 15, 3)) >sn : Symbol(sn, Decl(objectSpreadNegative.ts, 15, 18)) ->optionalString : Symbol(optionalString, Decl(objectSpreadNegative.ts, 13, 3)) ->optionalNumber : Symbol(optionalNumber, Decl(objectSpreadNegative.ts, 14, 3)) +>optionalString : Symbol(optionalString, Decl(objectSpreadNegative.ts, 13, 11)) +>optionalNumber : Symbol(optionalNumber, Decl(objectSpreadNegative.ts, 14, 11)) // error, 'sn' is optional in source, required in target @@ -90,79 +90,159 @@ let duplicatedSpread = { ...o, ...o } >o : Symbol(o, Decl(objectSpreadNegative.ts, 0, 3)) >o : Symbol(o, Decl(objectSpreadNegative.ts, 0, 3)) +// Note: ignore changes the order that properties are printed +let ignore: { a: number, b: string } = +>ignore : Symbol(ignore, Decl(objectSpreadNegative.ts, 30, 3)) +>a : Symbol(a, Decl(objectSpreadNegative.ts, 30, 13)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 30, 24)) + + { b: 'ignored', ...o } +>b : Symbol(b, Decl(objectSpreadNegative.ts, 31, 5)) +>o : Symbol(o, Decl(objectSpreadNegative.ts, 0, 3)) + +let o3 = { a: 1, b: 'no' } +>o3 : Symbol(o3, Decl(objectSpreadNegative.ts, 33, 3)) +>a : Symbol(a, Decl(objectSpreadNegative.ts, 33, 10)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 33, 16)) + +let o4 = { b: 'yes', c: true } +>o4 : Symbol(o4, Decl(objectSpreadNegative.ts, 34, 3)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 34, 10)) +>c : Symbol(c, Decl(objectSpreadNegative.ts, 34, 20)) + +let combinedBefore: { a: number, b: string, c: boolean } = +>combinedBefore : Symbol(combinedBefore, Decl(objectSpreadNegative.ts, 35, 3)) +>a : Symbol(a, Decl(objectSpreadNegative.ts, 35, 21)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 35, 32)) +>c : Symbol(c, Decl(objectSpreadNegative.ts, 35, 43)) + + { b: 'ok', ...o3, ...o4 } +>b : Symbol(b, Decl(objectSpreadNegative.ts, 36, 5)) +>o3 : Symbol(o3, Decl(objectSpreadNegative.ts, 33, 3)) +>o4 : Symbol(o4, Decl(objectSpreadNegative.ts, 34, 3)) + +let combinedMid: { a: number, b: string, c: boolean } = +>combinedMid : Symbol(combinedMid, Decl(objectSpreadNegative.ts, 37, 3)) +>a : Symbol(a, Decl(objectSpreadNegative.ts, 37, 18)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 37, 29)) +>c : Symbol(c, Decl(objectSpreadNegative.ts, 37, 40)) + + { ...o3, b: 'ok', ...o4 } +>o3 : Symbol(o3, Decl(objectSpreadNegative.ts, 33, 3)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 38, 12)) +>o4 : Symbol(o4, Decl(objectSpreadNegative.ts, 34, 3)) + +let combinedNested: { a: number, b: boolean, c: string, d: string } = +>combinedNested : Symbol(combinedNested, Decl(objectSpreadNegative.ts, 39, 3)) +>a : Symbol(a, Decl(objectSpreadNegative.ts, 39, 21)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 39, 32)) +>c : Symbol(c, Decl(objectSpreadNegative.ts, 39, 44)) +>d : Symbol(d, Decl(objectSpreadNegative.ts, 39, 55)) + + { ...{ a: 4, ...{ b: false, c: 'overriden' } }, d: 'actually new', ...{ a: 5, d: 'maybe new' } } +>a : Symbol(a, Decl(objectSpreadNegative.ts, 40, 10)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 40, 21)) +>c : Symbol(c, Decl(objectSpreadNegative.ts, 40, 31)) +>d : Symbol(d, Decl(objectSpreadNegative.ts, 40, 51)) +>a : Symbol(a, Decl(objectSpreadNegative.ts, 40, 75)) +>d : Symbol(d, Decl(objectSpreadNegative.ts, 40, 81)) + +let changeTypeBefore: { a: number, b: string } = +>changeTypeBefore : Symbol(changeTypeBefore, Decl(objectSpreadNegative.ts, 41, 3)) +>a : Symbol(a, Decl(objectSpreadNegative.ts, 41, 23)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 41, 34)) + + { a: 'wrong type?', ...o3 }; +>a : Symbol(a, Decl(objectSpreadNegative.ts, 42, 5)) +>o3 : Symbol(o3, Decl(objectSpreadNegative.ts, 33, 3)) + +let computedMiddle: { a: number, b: string, c: boolean, "in the middle": number } = +>computedMiddle : Symbol(computedMiddle, Decl(objectSpreadNegative.ts, 43, 3)) +>a : Symbol(a, Decl(objectSpreadNegative.ts, 43, 21)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 43, 32)) +>c : Symbol(c, Decl(objectSpreadNegative.ts, 43, 43)) +>"in the middle" : Symbol("in the middle", Decl(objectSpreadNegative.ts, 43, 55)) + + { ...o3, ['in the middle']: 13, b: 'maybe?', ...o4 } +>o3 : Symbol(o3, Decl(objectSpreadNegative.ts, 33, 3)) +>['in the middle'] : Symbol(['in the middle'], Decl(objectSpreadNegative.ts, 44, 12)) +>'in the middle' : Symbol(['in the middle'], Decl(objectSpreadNegative.ts, 44, 12)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 44, 35)) +>o4 : Symbol(o4, Decl(objectSpreadNegative.ts, 34, 3)) + // primitives are not allowed, except for falsy ones let spreadNum = { ...12 }; ->spreadNum : Symbol(spreadNum, Decl(objectSpreadNegative.ts, 31, 3)) +>spreadNum : Symbol(spreadNum, Decl(objectSpreadNegative.ts, 47, 3)) let spreadSum = { ...1 + 1 }; ->spreadSum : Symbol(spreadSum, Decl(objectSpreadNegative.ts, 32, 3)) +>spreadSum : Symbol(spreadSum, Decl(objectSpreadNegative.ts, 48, 3)) let spreadZero = { ...0 }; ->spreadZero : Symbol(spreadZero, Decl(objectSpreadNegative.ts, 33, 3)) +>spreadZero : Symbol(spreadZero, Decl(objectSpreadNegative.ts, 49, 3)) spreadZero.toFixed(); // error, no methods even from a falsy number ->spreadZero : Symbol(spreadZero, Decl(objectSpreadNegative.ts, 33, 3)) +>spreadZero : Symbol(spreadZero, Decl(objectSpreadNegative.ts, 49, 3)) let spreadBool = { ...true }; ->spreadBool : Symbol(spreadBool, Decl(objectSpreadNegative.ts, 35, 3)) +>spreadBool : Symbol(spreadBool, Decl(objectSpreadNegative.ts, 51, 3)) spreadBool.valueOf(); ->spreadBool : Symbol(spreadBool, Decl(objectSpreadNegative.ts, 35, 3)) +>spreadBool : Symbol(spreadBool, Decl(objectSpreadNegative.ts, 51, 3)) let spreadStr = { ...'foo' }; ->spreadStr : Symbol(spreadStr, Decl(objectSpreadNegative.ts, 37, 3)) +>spreadStr : Symbol(spreadStr, Decl(objectSpreadNegative.ts, 53, 3)) spreadStr.length; // error, no 'length' ->spreadStr : Symbol(spreadStr, Decl(objectSpreadNegative.ts, 37, 3)) +>spreadStr : Symbol(spreadStr, Decl(objectSpreadNegative.ts, 53, 3)) spreadStr.charAt(1); // error, no methods either ->spreadStr : Symbol(spreadStr, Decl(objectSpreadNegative.ts, 37, 3)) +>spreadStr : Symbol(spreadStr, Decl(objectSpreadNegative.ts, 53, 3)) // functions are skipped let spreadFunc = { ...function () { } } ->spreadFunc : Symbol(spreadFunc, Decl(objectSpreadNegative.ts, 41, 3)) +>spreadFunc : Symbol(spreadFunc, Decl(objectSpreadNegative.ts, 57, 3)) spreadFunc(); // error, no call signature ->spreadFunc : Symbol(spreadFunc, Decl(objectSpreadNegative.ts, 41, 3)) +>spreadFunc : Symbol(spreadFunc, Decl(objectSpreadNegative.ts, 57, 3)) // write-only properties get skipped let setterOnly = { ...{ set b (bad: number) { } } }; ->setterOnly : Symbol(setterOnly, Decl(objectSpreadNegative.ts, 45, 3)) ->b : Symbol(b, Decl(objectSpreadNegative.ts, 45, 23)) ->bad : Symbol(bad, Decl(objectSpreadNegative.ts, 45, 31)) +>setterOnly : Symbol(setterOnly, Decl(objectSpreadNegative.ts, 61, 3)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 61, 23)) +>bad : Symbol(bad, Decl(objectSpreadNegative.ts, 61, 31)) setterOnly.b = 12; // error, 'b' does not exist ->setterOnly.b : Symbol(b, Decl(objectSpreadNegative.ts, 45, 23)) ->setterOnly : Symbol(setterOnly, Decl(objectSpreadNegative.ts, 45, 3)) ->b : Symbol(b, Decl(objectSpreadNegative.ts, 45, 23)) +>setterOnly.b : Symbol(b, Decl(objectSpreadNegative.ts, 61, 23)) +>setterOnly : Symbol(setterOnly, Decl(objectSpreadNegative.ts, 61, 3)) +>b : Symbol(b, Decl(objectSpreadNegative.ts, 61, 23)) // methods are skipped because they aren't enumerable class C { p = 1; m() { } } ->C : Symbol(C, Decl(objectSpreadNegative.ts, 46, 18)) ->p : Symbol(C.p, Decl(objectSpreadNegative.ts, 49, 9)) ->m : Symbol(C.m, Decl(objectSpreadNegative.ts, 49, 16)) +>C : Symbol(C, Decl(objectSpreadNegative.ts, 62, 18)) +>p : Symbol(C.p, Decl(objectSpreadNegative.ts, 65, 9)) +>m : Symbol(C.m, Decl(objectSpreadNegative.ts, 65, 16)) let c: C = new C() ->c : Symbol(c, Decl(objectSpreadNegative.ts, 50, 3)) ->C : Symbol(C, Decl(objectSpreadNegative.ts, 46, 18)) ->C : Symbol(C, Decl(objectSpreadNegative.ts, 46, 18)) +>c : Symbol(c, Decl(objectSpreadNegative.ts, 66, 3)) +>C : Symbol(C, Decl(objectSpreadNegative.ts, 62, 18)) +>C : Symbol(C, Decl(objectSpreadNegative.ts, 62, 18)) let spreadC = { ...c } ->spreadC : Symbol(spreadC, Decl(objectSpreadNegative.ts, 51, 3)) ->c : Symbol(c, Decl(objectSpreadNegative.ts, 50, 3)) +>spreadC : Symbol(spreadC, Decl(objectSpreadNegative.ts, 67, 3)) +>c : Symbol(c, Decl(objectSpreadNegative.ts, 66, 3)) spreadC.m(); // error 'm' is not in '{ ... c }' ->spreadC : Symbol(spreadC, Decl(objectSpreadNegative.ts, 51, 3)) +>spreadC : Symbol(spreadC, Decl(objectSpreadNegative.ts, 67, 3)) // non primitive let obj: object = { a: 123 }; ->obj : Symbol(obj, Decl(objectSpreadNegative.ts, 55, 3)) ->a : Symbol(a, Decl(objectSpreadNegative.ts, 55, 19)) +>obj : Symbol(obj, Decl(objectSpreadNegative.ts, 71, 3)) +>a : Symbol(a, Decl(objectSpreadNegative.ts, 71, 19)) let spreadObj = { ...obj }; ->spreadObj : Symbol(spreadObj, Decl(objectSpreadNegative.ts, 56, 3)) ->obj : Symbol(obj, Decl(objectSpreadNegative.ts, 55, 3)) +>spreadObj : Symbol(spreadObj, Decl(objectSpreadNegative.ts, 72, 3)) +>obj : Symbol(obj, Decl(objectSpreadNegative.ts, 71, 3)) spreadObj.a; // error 'a' is not in {} ->spreadObj : Symbol(spreadObj, Decl(objectSpreadNegative.ts, 56, 3)) +>spreadObj : Symbol(spreadObj, Decl(objectSpreadNegative.ts, 72, 3)) diff --git a/tests/baselines/reference/objectSpreadNegative.types b/tests/baselines/reference/objectSpreadNegative.types index 351522d896121..a9f0a0f0774f7 100644 --- a/tests/baselines/reference/objectSpreadNegative.types +++ b/tests/baselines/reference/objectSpreadNegative.types @@ -12,7 +12,7 @@ class PrivateOptionalX { >PrivateOptionalX : PrivateOptionalX private x?: number; ->x : number +>x : number | undefined } class PublicX { >PublicX : PublicX @@ -20,10 +20,10 @@ class PublicX { public x: number; >x : number } -let publicX: PublicX; +declare let publicX: PublicX; >publicX : PublicX -let privateOptionalX: PrivateOptionalX; +declare let privateOptionalX: PrivateOptionalX; >privateOptionalX : PrivateOptionalX let o2 = { ...publicX, ...privateOptionalX }; @@ -38,20 +38,20 @@ let sn: number = o2.x; // error, x is private >o2 : {} >x : any -let optionalString: { sn?: string }; ->optionalString : { sn?: string; } ->sn : string +declare let optionalString: { sn?: string }; +>optionalString : { sn?: string | undefined; } +>sn : string | undefined -let optionalNumber: { sn?: number }; ->optionalNumber : { sn?: number; } ->sn : number +declare let optionalNumber: { sn?: number }; +>optionalNumber : { sn?: number | undefined; } +>sn : number | undefined let allOptional: { sn: string | number } = { ...optionalString, ...optionalNumber }; >allOptional : { sn: string | number; } >sn : string | number ->{ ...optionalString, ...optionalNumber } : { sn?: string | number; } ->optionalString : { sn?: string; } ->optionalNumber : { sn?: number; } +>{ ...optionalString, ...optionalNumber } : { sn?: string | number | undefined; } +>optionalString : { sn?: string | undefined; } +>optionalNumber : { sn?: number | undefined; } // error, 'sn' is optional in source, required in target @@ -109,6 +109,113 @@ let duplicatedSpread = { ...o, ...o } >o : { a: number; b: string; } >o : { a: number; b: string; } +// Note: ignore changes the order that properties are printed +let ignore: { a: number, b: string } = +>ignore : { a: number; b: string; } +>a : number +>b : string + + { b: 'ignored', ...o } +>{ b: 'ignored', ...o } : { a: number; b: string; } +>b : string +>'ignored' : "ignored" +>o : { a: number; b: string; } + +let o3 = { a: 1, b: 'no' } +>o3 : { a: number; b: string; } +>{ a: 1, b: 'no' } : { a: number; b: string; } +>a : number +>1 : 1 +>b : string +>'no' : "no" + +let o4 = { b: 'yes', c: true } +>o4 : { b: string; c: boolean; } +>{ b: 'yes', c: true } : { b: string; c: boolean; } +>b : string +>'yes' : "yes" +>c : boolean +>true : true + +let combinedBefore: { a: number, b: string, c: boolean } = +>combinedBefore : { a: number; b: string; c: boolean; } +>a : number +>b : string +>c : boolean + + { b: 'ok', ...o3, ...o4 } +>{ b: 'ok', ...o3, ...o4 } : { b: string; c: boolean; a: number; } +>b : string +>'ok' : "ok" +>o3 : { a: number; b: string; } +>o4 : { b: string; c: boolean; } + +let combinedMid: { a: number, b: string, c: boolean } = +>combinedMid : { a: number; b: string; c: boolean; } +>a : number +>b : string +>c : boolean + + { ...o3, b: 'ok', ...o4 } +>{ ...o3, b: 'ok', ...o4 } : { b: string; c: boolean; a: number; } +>o3 : { a: number; b: string; } +>b : string +>'ok' : "ok" +>o4 : { b: string; c: boolean; } + +let combinedNested: { a: number, b: boolean, c: string, d: string } = +>combinedNested : { a: number; b: boolean; c: string; d: string; } +>a : number +>b : boolean +>c : string +>d : string + + { ...{ a: 4, ...{ b: false, c: 'overriden' } }, d: 'actually new', ...{ a: 5, d: 'maybe new' } } +>{ ...{ a: 4, ...{ b: false, c: 'overriden' } }, d: 'actually new', ...{ a: 5, d: 'maybe new' } } : { a: number; d: string; b: false; c: string; } +>{ a: 4, ...{ b: false, c: 'overriden' } } : { b: false; c: string; a: number; } +>a : number +>4 : 4 +>{ b: false, c: 'overriden' } : { b: false; c: string; } +>b : false +>false : false +>c : string +>'overriden' : "overriden" +>d : string +>'actually new' : "actually new" +>{ a: 5, d: 'maybe new' } : { a: number; d: string; } +>a : number +>5 : 5 +>d : string +>'maybe new' : "maybe new" + +let changeTypeBefore: { a: number, b: string } = +>changeTypeBefore : { a: number; b: string; } +>a : number +>b : string + + { a: 'wrong type?', ...o3 }; +>{ a: 'wrong type?', ...o3 } : { a: number; b: string; } +>a : string +>'wrong type?' : "wrong type?" +>o3 : { a: number; b: string; } + +let computedMiddle: { a: number, b: string, c: boolean, "in the middle": number } = +>computedMiddle : { a: number; b: string; c: boolean; "in the middle": number; } +>a : number +>b : string +>c : boolean +>"in the middle" : number + + { ...o3, ['in the middle']: 13, b: 'maybe?', ...o4 } +>{ ...o3, ['in the middle']: 13, b: 'maybe?', ...o4 } : { b: string; c: boolean; "in the middle": number; a: number; } +>o3 : { a: number; b: string; } +>['in the middle'] : number +>'in the middle' : "in the middle" +>13 : 13 +>b : string +>'maybe?' : "maybe?" +>o4 : { b: string; c: boolean; } + // primitives are not allowed, except for falsy ones let spreadNum = { ...12 }; >spreadNum : any diff --git a/tests/baselines/reference/operationsAvailableOnPromisedType.errors.txt b/tests/baselines/reference/operationsAvailableOnPromisedType.errors.txt index ffa16497ad2eb..f2cc460643d4a 100644 --- a/tests/baselines/reference/operationsAvailableOnPromisedType.errors.txt +++ b/tests/baselines/reference/operationsAvailableOnPromisedType.errors.txt @@ -1,3 +1,5 @@ +error TS2468: Cannot find global value 'Promise'. +tests/cases/compiler/operationsAvailableOnPromisedType.ts(1,16): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option. tests/cases/compiler/operationsAvailableOnPromisedType.ts(11,9): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/compiler/operationsAvailableOnPromisedType.ts(12,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/compiler/operationsAvailableOnPromisedType.ts(13,5): error TS2365: Operator '+' cannot be applied to types 'number' and 'Promise'. @@ -21,8 +23,11 @@ tests/cases/compiler/operationsAvailableOnPromisedType.ts(27,5): error TS2349: T Type 'Promise' has no call signatures. -==== tests/cases/compiler/operationsAvailableOnPromisedType.ts (16 errors) ==== +!!! error TS2468: Cannot find global value 'Promise'. +==== tests/cases/compiler/operationsAvailableOnPromisedType.ts (17 errors) ==== async function fn( + ~~ +!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option. a: number, b: Promise, c: Promise, diff --git a/tests/baselines/reference/optionalBindingParameters1.types b/tests/baselines/reference/optionalBindingParameters1.types index 74b255325132e..6bbd8669a32db 100644 --- a/tests/baselines/reference/optionalBindingParameters1.types +++ b/tests/baselines/reference/optionalBindingParameters1.types @@ -18,7 +18,7 @@ foo(["", 0, false]); foo([false, 0, ""]); >foo([false, 0, ""]) : void >foo : ([x, y, z]?: [string, number, boolean]) => void ->[false, 0, ""] : (string | number | boolean)[] +>[false, 0, ""] : [boolean, number, string] >false : false >0 : 0 >"" : "" diff --git a/tests/baselines/reference/optionalBindingParametersInOverloads1.types b/tests/baselines/reference/optionalBindingParametersInOverloads1.types index 01d1756a6ac7e..04905ae8ca820 100644 --- a/tests/baselines/reference/optionalBindingParametersInOverloads1.types +++ b/tests/baselines/reference/optionalBindingParametersInOverloads1.types @@ -22,7 +22,7 @@ foo(["", 0, false]); foo([false, 0, ""]); >foo([false, 0, ""]) : any >foo : ([x, y, z]?: [string, number, boolean]) => any ->[false, 0, ""] : (string | number | boolean)[] +>[false, 0, ""] : [boolean, number, string] >false : false >0 : 0 >"" : "" diff --git a/tests/baselines/reference/optionalSetterParam.js b/tests/baselines/reference/optionalSetterParam.js index 8162c7be151b6..c5d1cc46b894d 100644 --- a/tests/baselines/reference/optionalSetterParam.js +++ b/tests/baselines/reference/optionalSetterParam.js @@ -11,7 +11,7 @@ var foo = /** @class */ (function () { } Object.defineProperty(foo.prototype, "bar", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return foo; diff --git a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt index d158266a62814..061dc9ea7f245 100644 --- a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt +++ b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt @@ -5,6 +5,7 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(19,1): error TS276 Overload 2 of 2, '(x: { n: number; }): number', gave the following error. Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. +tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(19,20): error TS2339: Property 'toLowerCase' does not exist on type 'never'. tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(22,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'. tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,1): error TS2769: No overload matches this call. Overload 1 of 2, '(x: { s: string; }): string', gave the following error. @@ -13,9 +14,10 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,1): error TS276 Overload 2 of 2, '(x: { n: number; }): number', gave the following error. Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. +tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,20): error TS2339: Property 'toLowerCase' does not exist on type 'never'. -==== tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts (3 errors) ==== +==== tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts (5 errors) ==== interface A { (x: { s: string }): string (x: { n: number }): number @@ -43,6 +45,8 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,1): error TS276 !!! error TS2769: Overload 2 of 2, '(x: { n: number; }): number', gave the following error. !!! error TS2769: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. !!! error TS2769: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. + ~~~~~~~~~~~ +!!! error TS2339: Property 'toLowerCase' does not exist on type 'never'. var w: A; var w: C; @@ -58,4 +62,6 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,1): error TS276 !!! error TS2769: Object literal may only specify known properties, and 'n' does not exist in type '{ s: string; }'. !!! error TS2769: Overload 2 of 2, '(x: { n: number; }): number', gave the following error. !!! error TS2769: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. -!!! error TS2769: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. \ No newline at end of file +!!! error TS2769: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. + ~~~~~~~~~~~ +!!! error TS2339: Property 'toLowerCase' does not exist on type 'never'. \ No newline at end of file diff --git a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.types b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.types index 0ab7ac3eab284..5696ff6e61cd5 100644 --- a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.types +++ b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.types @@ -38,7 +38,7 @@ var v: B; v({ s: "", n: 0 }).toLowerCase(); >v({ s: "", n: 0 }).toLowerCase() : any >v({ s: "", n: 0 }).toLowerCase : any ->v({ s: "", n: 0 }) : any +>v({ s: "", n: 0 }) : never >v : A >{ s: "", n: 0 } : { s: string; n: number; } >s : string @@ -56,7 +56,7 @@ var w: C; w({ s: "", n: 0 }).toLowerCase(); >w({ s: "", n: 0 }).toLowerCase() : any >w({ s: "", n: 0 }).toLowerCase : any ->w({ s: "", n: 0 }) : any +>w({ s: "", n: 0 }) : never >w : A >{ s: "", n: 0 } : { s: string; n: number; } >s : string diff --git a/tests/baselines/reference/organizeImports/TypeOnly.ts b/tests/baselines/reference/organizeImports/TypeOnly.ts new file mode 100644 index 0000000000000..dcd18e7ef86a4 --- /dev/null +++ b/tests/baselines/reference/organizeImports/TypeOnly.ts @@ -0,0 +1,15 @@ +// ==ORIGINAL== + +import { X } from "lib"; +import type Y from "lib"; +import { Z } from "lib"; +import type { A, B } from "lib"; + +export { A, B, X, Y, Z }; +// ==ORGANIZED== + +import { X, Z } from "lib"; +import type Y from "lib"; +import type { A, B } from "lib"; + +export { A, B, X, Y, Z }; diff --git a/tests/baselines/reference/overload1.types b/tests/baselines/reference/overload1.types index 0641529e632d0..8302eb08b3c1f 100644 --- a/tests/baselines/reference/overload1.types +++ b/tests/baselines/reference/overload1.types @@ -102,9 +102,9 @@ var z:string=x.g(x.g(3,3)); // good >3 : 3 z=x.g(2,2,2); // no match ->z=x.g(2,2,2) : any +>z=x.g(2,2,2) : never >z : string ->x.g(2,2,2) : any +>x.g(2,2,2) : never >x.g : { (n1: number, n2: number): number; (n: number): string; (a: O.A): O.C; (c: O.C): string; } >x : O.I >g : { (n1: number, n2: number): number; (n: number): string; (a: O.A): O.C; (c: O.C): string; } @@ -113,9 +113,9 @@ z=x.g(2,2,2); // no match >2 : 2 z=x.g(); // no match ->z=x.g() : any +>z=x.g() : never >z : string ->x.g() : any +>x.g() : never >x.g : { (n1: number, n2: number): number; (n: number): string; (a: O.A): O.C; (c: O.C): string; } >x : O.I >g : { (n1: number, n2: number): number; (n: number): string; (a: O.A): O.C; (c: O.C): string; } @@ -133,9 +133,9 @@ z=x.g(new O.B()); // ambiguous (up and down conversion) >B : typeof O.B z=x.h(2,2); // no match ->z=x.h(2,2) : any +>z=x.h(2,2) : never >z : string ->x.h(2,2) : any +>x.h(2,2) : never >x.h : { (s1: string, s2: number): string; (s1: number, s2: string): number; } >x : O.I >h : { (s1: string, s2: number): string; (s1: number, s2: string): number; } diff --git a/tests/baselines/reference/overloadResolution.types b/tests/baselines/reference/overloadResolution.types index 3461a4d56d079..259bc428c446c 100644 --- a/tests/baselines/reference/overloadResolution.types +++ b/tests/baselines/reference/overloadResolution.types @@ -56,7 +56,7 @@ var s: string; // No candidate overloads found fn1({}); // Error ->fn1({}) : any +>fn1({}) : never >fn1 : { (s: string): string; (s: number): number; } >{} : {} @@ -95,7 +95,7 @@ var s = fn2(0, ''); // Generic and non - generic overload where non - generic overload is the only candidate when called with type arguments fn2('', 0); // Error ->fn2('', 0) : any +>fn2('', 0) : number >fn2 : { (s: string, n: number): number; (n: number, t: T): T; } >'' : "" >0 : 0 @@ -178,7 +178,7 @@ var n = fn3('', '', 3); // Generic overloads with differing arity called with type argument count that doesn't match any overload fn3(); // Error ->fn3() : any +>fn3() : string >fn3 : { (n: T): string; (s: string, t: T, u: U): U; (v: V, u: U, t: T): number; } // Generic overloads with constraints called with type arguments that satisfy the constraints diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.types b/tests/baselines/reference/overloadResolutionClassConstructors.types index a1f86b9a97285..509f106768a6e 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.types +++ b/tests/baselines/reference/overloadResolutionClassConstructors.types @@ -51,7 +51,7 @@ new fn1(undefined); // No candidate overloads found new fn1({}); // Error ->new fn1({}) : any +>new fn1({}) : fn1 >fn1 : typeof fn1 >{} : {} @@ -140,12 +140,12 @@ new fn3(5, 5, 5); // Generic overloads with differing arity called with type arguments matching each overload type parameter count new fn3(4); // Error ->new fn3(4) : any +>new fn3(4) : fn3 >fn3 : typeof fn3 >4 : 4 new fn3('', '', ''); // Error ->new fn3('', '', '') : any +>new fn3('', '', '') : fn3 >fn3 : typeof fn3 >'' : "" >'' : "" @@ -160,7 +160,7 @@ new fn3('', '', 3); // Generic overloads with differing arity called with type argument count that doesn't match any overload new fn3(); // Error ->new fn3() : any +>new fn3() : fn3 >fn3 : typeof fn3 // Generic overloads with constraints called with type arguments that satisfy the constraints @@ -180,19 +180,19 @@ new fn4('', 3); >3 : 3 new fn4(3, ''); // Error ->new fn4(3, '') : any +>new fn4(3, '') : fn4 >fn4 : typeof fn4 >3 : 3 >'' : "" new fn4('', 3); // Error ->new fn4('', 3) : any +>new fn4('', 3) : fn4 >fn4 : typeof fn4 >'' : "" >3 : 3 new fn4(3, ''); // Error ->new fn4(3, '') : any +>new fn4(3, '') : fn4 >fn4 : typeof fn4 >3 : 3 >'' : "" @@ -205,13 +205,13 @@ new fn4('', 3); >3 : 3 new fn4(3, ''); // Error ->new fn4(3, '') : any +>new fn4(3, '') : fn4 >fn4 : typeof fn4 >3 : 3 >'' : "" new fn4(3, undefined); // Error ->new fn4(3, undefined) : any +>new fn4(3, undefined) : fn4 >fn4 : typeof fn4 >3 : 3 >undefined : undefined @@ -224,20 +224,20 @@ new fn4('', null); // Generic overloads with constraints called with type arguments that do not satisfy the constraints new fn4(null, null); // Error ->new fn4(null, null) : any +>new fn4(null, null) : fn4 >fn4 : typeof fn4 >null : null >null : null // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints new fn4(true, null); // Error ->new fn4(true, null) : any +>new fn4(true, null) : fn4 >fn4 : typeof fn4 >true : true >null : null new fn4(null, true); // Error ->new fn4(null, true) : any +>new fn4(null, true) : fn4 >fn4 : typeof fn4 >null : null >true : true diff --git a/tests/baselines/reference/overloadResolutionConstructors.types b/tests/baselines/reference/overloadResolutionConstructors.types index fd7c426b714ea..4d9d9c95512a8 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.types +++ b/tests/baselines/reference/overloadResolutionConstructors.types @@ -52,7 +52,7 @@ var s: string; // No candidate overloads found new fn1({}); // Error ->new fn1({}) : any +>new fn1({}) : never >fn1 : fn1 >{} : {} @@ -89,7 +89,7 @@ var s = new fn2(0, ''); // Generic and non - generic overload where non - generic overload is the only candidate when called with type arguments new fn2('', 0); // Error ->new fn2('', 0) : any +>new fn2('', 0) : number >fn2 : fn2 >'' : "" >0 : 0 @@ -169,7 +169,7 @@ var n = new fn3('', '', 3); // Generic overloads with differing arity called with type argument count that doesn't match any overload new fn3(); // Error ->new fn3() : any +>new fn3() : string >fn3 : fn3 // Generic overloads with constraints called with type arguments that satisfy the constraints diff --git a/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.types b/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.types index ef2d9d90b3303..a51ba0429ef61 100644 --- a/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.types +++ b/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.types @@ -3,10 +3,10 @@ class Bar { >Bar : Bar public clone() { ->clone : () => any +>clone : () => Bar return new Bar(0); ->new Bar(0) : any +>new Bar(0) : Bar >Bar : typeof Bar >0 : 0 } diff --git a/tests/baselines/reference/overloadResolutionTest1.types b/tests/baselines/reference/overloadResolutionTest1.types index 0268a4d17f6c0..f1814b5fecfb0 100644 --- a/tests/baselines/reference/overloadResolutionTest1.types +++ b/tests/baselines/reference/overloadResolutionTest1.types @@ -34,8 +34,8 @@ var x11 = foo([{a:0}]); // works >0 : 0 var x111 = foo([{a:"s"}]); // error - does not match any signature ->x111 : any ->foo([{a:"s"}]) : any +>x111 : never +>foo([{a:"s"}]) : never >foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >[{a:"s"}] : { a: string; }[] >{a:"s"} : { a: string; } @@ -86,8 +86,8 @@ var x3 = foo2({a:true}); // works >true : true var x4 = foo2({a:"s"}); // error ->x4 : any ->foo2({a:"s"}) : any +>x4 : never +>foo2({a:"s"}) : never >foo2 : { (bar: { a: number; }): string; (bar: { a: boolean; }): number; } >{a:"s"} : { a: string; } >a : string @@ -111,8 +111,8 @@ function foo4(bar:{a:any;}):any{ return bar }; >bar : { a: any; } var x = foo4({a:true}); // error ->x : any ->foo4({a:true}) : any +>x : never +>foo4({a:true}) : never >foo4 : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >{a:true} : { a: boolean; } >a : boolean diff --git a/tests/baselines/reference/overloadingOnConstants2.types b/tests/baselines/reference/overloadingOnConstants2.types index a8d3254a4c37e..4c2dfe0204562 100644 --- a/tests/baselines/reference/overloadingOnConstants2.types +++ b/tests/baselines/reference/overloadingOnConstants2.types @@ -50,8 +50,8 @@ var b: E = foo("bye", []); // E >[] : undefined[] var c = foo("um", []); // error ->c : any ->foo("um", []) : any +>c : D & E +>foo("um", []) : D & E >foo : { (x: "hi", items: string[]): D; (x: "bye", items: string[]): E; } >"um" : "um" >[] : undefined[] diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt index 987ac30daca6b..cee59a5a07dcb 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt @@ -1,7 +1,27 @@ -tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(14,5): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(14,22): error TS2769: No overload matches this call. + Overload 1 of 3, '(arg: (x: D) => number): string', gave the following error. + Type 'G' is not assignable to type 'number'. + Overload 2 of 3, '(arg: (x: C) => any): string', gave the following error. + Argument of type '(x: D) => G' is not assignable to parameter of type '(x: C) => any'. + Types of parameters 'x' and 'x' are incompatible. + Property 'q' is missing in type 'C' but required in type 'D'. + Overload 3 of 3, '(arg: (x: B) => any): number', gave the following error. + Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. + Types of parameters 'x' and 'x' are incompatible. + Property 'q' is missing in type 'B' but required in type 'D'. tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(14,37): error TS2345: Argument of type 'D' is not assignable to parameter of type 'A'. Property 'x' is missing in type 'D' but required in type 'A'. -tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,5): error TS2322: Type 'string' is not assignable to type 'number'. +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,23): error TS2769: No overload matches this call. + Overload 1 of 3, '(arg: (x: D) => number): string', gave the following error. + Type 'G' is not assignable to type 'number'. + Overload 2 of 3, '(arg: (x: C) => any): string', gave the following error. + Argument of type '(x: D) => G' is not assignable to parameter of type '(x: C) => any'. + Types of parameters 'x' and 'x' are incompatible. + Type 'C' is not assignable to type 'D'. + Overload 3 of 3, '(arg: (x: B) => any): number', gave the following error. + Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. + Types of parameters 'x' and 'x' are incompatible. + Type 'B' is not assignable to type 'D'. tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,38): error TS2344: Type 'D' does not satisfy the constraint 'A'. tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(18,27): error TS2769: No overload matches this call. Overload 1 of 3, '(arg: (x: D) => number): string', gave the following error. @@ -10,11 +30,11 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(18,27): Overload 2 of 3, '(arg: (x: C) => any): string', gave the following error. Argument of type '(x: D) => G' is not assignable to parameter of type '(x: C) => any'. Types of parameters 'x' and 'x' are incompatible. - Property 'q' is missing in type 'C' but required in type 'D'. + Type 'C' is not assignable to type 'D'. Overload 3 of 3, '(arg: (x: B) => any): number', gave the following error. Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. Types of parameters 'x' and 'x' are incompatible. - Property 'q' is missing in type 'B' but required in type 'D'. + Type 'B' is not assignable to type 'D'. tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,14): error TS2344: Type 'D' does not satisfy the constraint 'A'. @@ -33,16 +53,40 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,14): declare function foo(arg: (x: B) => any): number; var result: number = foo(x => new G(x)); // x has type D, new G(x) fails, so first overload is picked. - ~~~~~~ -!!! error TS2322: Type 'string' is not assignable to type 'number'. + ~~~~~~~~~~~~~~~~~~ +!!! error TS2769: No overload matches this call. +!!! error TS2769: Overload 1 of 3, '(arg: (x: D) => number): string', gave the following error. +!!! error TS2769: Type 'G' is not assignable to type 'number'. +!!! error TS2769: Overload 2 of 3, '(arg: (x: C) => any): string', gave the following error. +!!! error TS2769: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: C) => any'. +!!! error TS2769: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2769: Property 'q' is missing in type 'C' but required in type 'D'. +!!! error TS2769: Overload 3 of 3, '(arg: (x: B) => any): number', gave the following error. +!!! error TS2769: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. +!!! error TS2769: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2769: Property 'q' is missing in type 'B' but required in type 'D'. +!!! related TS6502 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:10:27: The expected type comes from the return type of this signature. +!!! related TS2728 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:15: 'q' is declared here. +!!! related TS2728 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:15: 'q' is declared here. ~ !!! error TS2345: Argument of type 'D' is not assignable to parameter of type 'A'. !!! error TS2345: Property 'x' is missing in type 'D' but required in type 'A'. !!! related TS2728 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:1:15: 'x' is declared here. var result2: number = foo(x => new G(x)); // x has type D, new G(x) fails, so first overload is picked. - ~~~~~~~ -!!! error TS2322: Type 'string' is not assignable to type 'number'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2769: No overload matches this call. +!!! error TS2769: Overload 1 of 3, '(arg: (x: D) => number): string', gave the following error. +!!! error TS2769: Type 'G' is not assignable to type 'number'. +!!! error TS2769: Overload 2 of 3, '(arg: (x: C) => any): string', gave the following error. +!!! error TS2769: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: C) => any'. +!!! error TS2769: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2769: Type 'C' is not assignable to type 'D'. +!!! error TS2769: Overload 3 of 3, '(arg: (x: B) => any): number', gave the following error. +!!! error TS2769: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. +!!! error TS2769: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2769: Type 'B' is not assignable to type 'D'. +!!! related TS6502 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:10:27: The expected type comes from the return type of this signature. ~~~~~~~~ !!! error TS2344: Type 'D' does not satisfy the constraint 'A'. @@ -55,13 +99,11 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,14): !!! error TS2769: Overload 2 of 3, '(arg: (x: C) => any): string', gave the following error. !!! error TS2769: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: C) => any'. !!! error TS2769: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2769: Property 'q' is missing in type 'C' but required in type 'D'. +!!! error TS2769: Type 'C' is not assignable to type 'D'. !!! error TS2769: Overload 3 of 3, '(arg: (x: B) => any): number', gave the following error. !!! error TS2769: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. !!! error TS2769: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2769: Property 'q' is missing in type 'B' but required in type 'D'. -!!! related TS2728 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:15: 'q' is declared here. -!!! related TS2728 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:15: 'q' is declared here. +!!! error TS2769: Type 'B' is not assignable to type 'D'. var y: G; // error that D does not satisfy constraint, y is of type G, entire call to foo is an error ~~~~~~~~ !!! error TS2344: Type 'D' does not satisfy the constraint 'A'. diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.types b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.types index 751032d5abaf5..3ba6211a990de 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.types +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.types @@ -36,28 +36,28 @@ declare function foo(arg: (x: B) => any): number; var result: number = foo(x => new G(x)); // x has type D, new G(x) fails, so first overload is picked. >result : number ->foo(x => new G(x)) : string +>foo(x => new G(x)) : never >foo : { (arg: (x: D) => number): string; (arg: (x: C) => any): string; (arg: (x: B) => any): number; } ->x => new G(x) : (x: D) => any +>x => new G(x) : (x: D) => G >x : D ->new G(x) : any +>new G(x) : G >G : typeof G >x : D var result2: number = foo(x => new G(x)); // x has type D, new G(x) fails, so first overload is picked. >result2 : number ->foo(x => new G(x)) : string +>foo(x => new G(x)) : never >foo : { (arg: (x: D) => number): string; (arg: (x: C) => any): string; (arg: (x: B) => any): number; } ->x => new G(x) : (x: D) => any +>x => new G(x) : (x: D) => G >x : D ->new G(x) : any +>new G(x) : G >G : typeof G >x : D >x : D var result3: string = foo(x => { // x has type D >result3 : string ->foo(x => { // x has type D var y: G; // error that D does not satisfy constraint, y is of type G, entire call to foo is an error return y;}) : any +>foo(x => { // x has type D var y: G; // error that D does not satisfy constraint, y is of type G, entire call to foo is an error return y;}) : never >foo : { (arg: (x: D) => number): string; (arg: (x: C) => any): string; (arg: (x: B) => any): number; } >x => { // x has type D var y: G; // error that D does not satisfy constraint, y is of type G, entire call to foo is an error return y;} : (x: D) => G >x : D diff --git a/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.types b/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.types index d438d4356680b..1c20591475373 100644 --- a/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.types +++ b/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.types @@ -12,7 +12,7 @@ declare function Callbacks(flags?: string): void; >flags : string Callbacks('s'); // wrong number of type arguments ->Callbacks('s') : any +>Callbacks('s') : void >Callbacks : { (flags?: string): void; (flags?: string): void; (flags?: string): void; } >'s' : "s" @@ -26,6 +26,6 @@ declare function f(arg: number): void; >arg : number f(); // wrong number of arguments (#25683) ->f() : any +>f() : void >f : (arg: number) => void diff --git a/tests/baselines/reference/overloadsWithProvisionalErrors.types b/tests/baselines/reference/overloadsWithProvisionalErrors.types index c655f22c05070..1dbc5e486d0fe 100644 --- a/tests/baselines/reference/overloadsWithProvisionalErrors.types +++ b/tests/baselines/reference/overloadsWithProvisionalErrors.types @@ -14,7 +14,7 @@ var func: { }; func(s => ({})); // Error for no applicable overload (object type is missing a and b) ->func(s => ({})) : any +>func(s => ({})) : never >func : { (s: string): number; (lambda: (s: string) => { a: number; b: number; }): string; } >s => ({}) : (s: string) => {} >s : string @@ -34,7 +34,7 @@ func(s => ({ a: blah, b: 3 })); // Only error inside the function, but not outsi >3 : 3 func(s => ({ a: blah })); // Two errors here, one for blah not being defined, and one for the overload since it would not be applicable anyway ->func(s => ({ a: blah })) : any +>func(s => ({ a: blah })) : never >func : { (s: string): number; (lambda: (s: string) => { a: number; b: number; }): string; } >s => ({ a: blah }) : (s: string) => { a: any; } >s : string diff --git a/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.types b/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.types index a6554284225b0..4e4f667b549c9 100644 --- a/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.types +++ b/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.types @@ -71,14 +71,14 @@ appendToOptionalArray(foo, 'y', 'bar'); // ok >'bar' : "bar" appendToOptionalArray(foo, 'y', 12); // should fail ->appendToOptionalArray(foo, 'y', 12) : any +>appendToOptionalArray(foo, 'y', 12) : void >appendToOptionalArray : (object: { [x in K]?: Lower[] | undefined; }, key: K, value: T) => void >foo : { x?: number[] | undefined; y?: string[] | undefined; } >'y' : "y" >12 : 12 appendToOptionalArray(foo, 'x', "no"); // should fail ->appendToOptionalArray(foo, 'x', "no") : any +>appendToOptionalArray(foo, 'x', "no") : void >appendToOptionalArray : (object: { [x in K]?: Lower[] | undefined; }, key: K, value: T) => void >foo : { x?: number[] | undefined; y?: string[] | undefined; } >'x' : "x" diff --git a/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt b/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt index 925bb07d9f9bc..db526dd3e1522 100644 --- a/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt +++ b/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt @@ -1,8 +1,12 @@ tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(16,42): error TS2345: Argument of type '"0"' is not assignable to parameter of type 'boolean'. +tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(17,17): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. +tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(18,17): error TS2345: Argument of type '0' is not assignable to parameter of type 'boolean'. +tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(19,17): error TS2345: Argument of type '0' is not assignable to parameter of type 'boolean'. +tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(20,17): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(25,1): error TS2304: Cannot find name 'runTestCase'. -==== tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts (6 errors) ==== /// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the @@ -22,9 +26,17 @@ tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(25,1): error T ~~~ !!! error TS2345: Argument of type '"0"' is not assignable to parameter of type 'boolean'. if (a.indexOf(-(4/3)) === 14 && // a[14]=_float===-(4/3) + ~~~~~~ +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. a.indexOf(0) === 7 && // a[7] = +0, 0===+0 + ~ +!!! error TS2345: Argument of type '0' is not assignable to parameter of type 'boolean'. a.indexOf(-0) === 7 && // a[7] = +0, -0===+0 + ~~ +!!! error TS2345: Argument of type '0' is not assignable to parameter of type 'boolean'. a.indexOf(1) === 10 ) // a[10] =one=== 1 + ~ +!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. { return true; } diff --git a/tests/baselines/reference/parser15.4.4.14-9-2.symbols b/tests/baselines/reference/parser15.4.4.14-9-2.symbols index ecad25d79596a..dde1f273812ae 100644 --- a/tests/baselines/reference/parser15.4.4.14-9-2.symbols +++ b/tests/baselines/reference/parser15.4.4.14-9-2.symbols @@ -32,16 +32,24 @@ function testcase() { >_float : Symbol(_float, Decl(parser15.4.4.14-9-2.ts, 14, 5)) if (a.indexOf(-(4/3)) === 14 && // a[14]=_float===-(4/3) +>a.indexOf : Symbol(Array.indexOf, Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(parser15.4.4.14-9-2.ts, 15, 5)) +>indexOf : Symbol(Array.indexOf, Decl(lib.es5.d.ts, --, --)) a.indexOf(0) === 7 && // a[7] = +0, 0===+0 +>a.indexOf : Symbol(Array.indexOf, Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(parser15.4.4.14-9-2.ts, 15, 5)) +>indexOf : Symbol(Array.indexOf, Decl(lib.es5.d.ts, --, --)) a.indexOf(-0) === 7 && // a[7] = +0, -0===+0 +>a.indexOf : Symbol(Array.indexOf, Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(parser15.4.4.14-9-2.ts, 15, 5)) +>indexOf : Symbol(Array.indexOf, Decl(lib.es5.d.ts, --, --)) a.indexOf(1) === 10 ) // a[10] =one=== 1 +>a.indexOf : Symbol(Array.indexOf, Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(parser15.4.4.14-9-2.ts, 15, 5)) +>indexOf : Symbol(Array.indexOf, Decl(lib.es5.d.ts, --, --)) { return true; } diff --git a/tests/baselines/reference/parser15.4.4.14-9-2.types b/tests/baselines/reference/parser15.4.4.14-9-2.types index f69a61989e309..13f2bcf533bbd 100644 --- a/tests/baselines/reference/parser15.4.4.14-9-2.types +++ b/tests/baselines/reference/parser15.4.4.14-9-2.types @@ -33,8 +33,8 @@ function testcase() { >3 : 3 var a = new Array(false,undefined,null,"0",obj,-1.3333333333333, "str",-0,true,+0, one, 1,0, false, _float, -(4/3)); ->a : any ->new Array(false,undefined,null,"0",obj,-1.3333333333333, "str",-0,true,+0, one, 1,0, false, _float, -(4/3)) : any +>a : boolean[] +>new Array(false,undefined,null,"0",obj,-1.3333333333333, "str",-0,true,+0, one, 1,0, false, _float, -(4/3)) : boolean[] >Array : ArrayConstructor >false : false >undefined : undefined @@ -65,10 +65,10 @@ function testcase() { >a.indexOf(-(4/3)) === 14 && // a[14]=_float===-(4/3) a.indexOf(0) === 7 && // a[7] = +0, 0===+0 a.indexOf(-0) === 7 : boolean >a.indexOf(-(4/3)) === 14 && // a[14]=_float===-(4/3) a.indexOf(0) === 7 : boolean >a.indexOf(-(4/3)) === 14 : boolean ->a.indexOf(-(4/3)) : any ->a.indexOf : any ->a : any ->indexOf : any +>a.indexOf(-(4/3)) : number +>a.indexOf : (searchElement: boolean, fromIndex?: number) => number +>a : boolean[] +>indexOf : (searchElement: boolean, fromIndex?: number) => number >-(4/3) : number >(4/3) : number >4/3 : number @@ -78,29 +78,29 @@ function testcase() { a.indexOf(0) === 7 && // a[7] = +0, 0===+0 >a.indexOf(0) === 7 : boolean ->a.indexOf(0) : any ->a.indexOf : any ->a : any ->indexOf : any +>a.indexOf(0) : number +>a.indexOf : (searchElement: boolean, fromIndex?: number) => number +>a : boolean[] +>indexOf : (searchElement: boolean, fromIndex?: number) => number >0 : 0 >7 : 7 a.indexOf(-0) === 7 && // a[7] = +0, -0===+0 >a.indexOf(-0) === 7 : boolean ->a.indexOf(-0) : any ->a.indexOf : any ->a : any ->indexOf : any +>a.indexOf(-0) : number +>a.indexOf : (searchElement: boolean, fromIndex?: number) => number +>a : boolean[] +>indexOf : (searchElement: boolean, fromIndex?: number) => number >-0 : 0 >0 : 0 >7 : 7 a.indexOf(1) === 10 ) // a[10] =one=== 1 >a.indexOf(1) === 10 : boolean ->a.indexOf(1) : any ->a.indexOf : any ->a : any ->indexOf : any +>a.indexOf(1) : number +>a.indexOf : (searchElement: boolean, fromIndex?: number) => number +>a : boolean[] +>indexOf : (searchElement: boolean, fromIndex?: number) => number >1 : 1 >10 : 10 { diff --git a/tests/baselines/reference/parserAccessors1.js b/tests/baselines/reference/parserAccessors1.js index b0e0981bd6ab8..389c6f609bf81 100644 --- a/tests/baselines/reference/parserAccessors1.js +++ b/tests/baselines/reference/parserAccessors1.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserAccessors2.js b/tests/baselines/reference/parserAccessors2.js index 9dced88ea816b..012ae8493b613 100644 --- a/tests/baselines/reference/parserAccessors2.js +++ b/tests/baselines/reference/parserAccessors2.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index fa0cf4fa60079..0cf04e89a30ef 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -289,7 +289,7 @@ var c2 = /** @class */ (function () { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); c2.prototype.c2_nc_f1 = function () { @@ -298,7 +298,7 @@ var c2 = /** @class */ (function () { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); /** c2 f1*/ @@ -309,7 +309,7 @@ var c2 = /** @class */ (function () { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); c2.prototype.nc_f1 = function () { @@ -318,7 +318,7 @@ var c2 = /** @class */ (function () { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); return c2; @@ -338,7 +338,7 @@ var c3 = /** @class */ (function (_super) { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); c3.prototype.nc_f1 = function () { @@ -347,7 +347,7 @@ var c3 = /** @class */ (function (_super) { get: function () { return 10; }, - enumerable: true, + enumerable: false, configurable: true }); return c3; diff --git a/tests/baselines/reference/parserConstructorAmbiguity3.types b/tests/baselines/reference/parserConstructorAmbiguity3.types index bdd4972ce19e1..0fa91785da0ad 100644 --- a/tests/baselines/reference/parserConstructorAmbiguity3.types +++ b/tests/baselines/reference/parserConstructorAmbiguity3.types @@ -1,5 +1,5 @@ === tests/cases/conformance/parser/ecmascript5/Generics/parserConstructorAmbiguity3.ts === new Date ->new Date : any +>new Date : Date >Date : DateConstructor diff --git a/tests/baselines/reference/parserES3Accessors1.js b/tests/baselines/reference/parserES3Accessors1.js index e27d2bfd8ac9d..956df6a3117f5 100644 --- a/tests/baselines/reference/parserES3Accessors1.js +++ b/tests/baselines/reference/parserES3Accessors1.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserES3Accessors2.js b/tests/baselines/reference/parserES3Accessors2.js index 2c6d06aeef6b2..aca80ced5c8be 100644 --- a/tests/baselines/reference/parserES3Accessors2.js +++ b/tests/baselines/reference/parserES3Accessors2.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserES5ComputedPropertyName4.js b/tests/baselines/reference/parserES5ComputedPropertyName4.js index 9b22e1847192c..496b84fd70d06 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName4.js +++ b/tests/baselines/reference/parserES5ComputedPropertyName4.js @@ -5,6 +5,6 @@ var v = { get [e]() { } }; var _a; var v = (_a = {}, Object.defineProperty(_a, e, { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }), _a); diff --git a/tests/baselines/reference/parserErrantSemicolonInClass1.js b/tests/baselines/reference/parserErrantSemicolonInClass1.js index d2c223d53bebd..46a89db8a9a9e 100644 --- a/tests/baselines/reference/parserErrantSemicolonInClass1.js +++ b/tests/baselines/reference/parserErrantSemicolonInClass1.js @@ -47,14 +47,14 @@ var a = /** @class */ (function () { }, set: function () { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(a, "p2", { get: function () { return { x: 30, y: 40 }; }, - enumerable: true, + enumerable: false, configurable: true }); a.d2 = function () { @@ -63,7 +63,7 @@ var a = /** @class */ (function () { get: function () { return "string"; }, - enumerable: true, + enumerable: false, configurable: true }); a.prototype.foo = function (ns) { diff --git a/tests/baselines/reference/parserGetAccessorWithTypeParameters1.js b/tests/baselines/reference/parserGetAccessorWithTypeParameters1.js index b5525fb4ca98e..860a8b230a105 100644 --- a/tests/baselines/reference/parserGetAccessorWithTypeParameters1.js +++ b/tests/baselines/reference/parserGetAccessorWithTypeParameters1.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "foo", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessor1.js b/tests/baselines/reference/parserMemberAccessor1.js index b7caa9737e034..cb8833789224e 100644 --- a/tests/baselines/reference/parserMemberAccessor1.js +++ b/tests/baselines/reference/parserMemberAccessor1.js @@ -11,7 +11,7 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "foo", { get: function () { }, set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration1.js b/tests/baselines/reference/parserMemberAccessorDeclaration1.js index 4b5110cbc7d04..10e92a14f2f6f 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration1.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration1.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "a", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration10.js b/tests/baselines/reference/parserMemberAccessorDeclaration10.js index 927767ba844d9..1e6f5190d03ce 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration10.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration10.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration11.js b/tests/baselines/reference/parserMemberAccessorDeclaration11.js index eaeb8b576ab34..3a3e984389ad4 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration11.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration11.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration12.js b/tests/baselines/reference/parserMemberAccessorDeclaration12.js index a0c402703b420..b92ba95c9981e 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration12.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration12.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { get: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration13.js b/tests/baselines/reference/parserMemberAccessorDeclaration13.js index c057d77476ffc..1dce419e65cc1 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration13.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration13.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { set: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration14.js b/tests/baselines/reference/parserMemberAccessorDeclaration14.js index 7e88d64d85af2..399801d8498c6 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration14.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration14.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { set: function (a, b) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration15.js b/tests/baselines/reference/parserMemberAccessorDeclaration15.js index 48815f0fa6626..268fcea5e23e8 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration15.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration15.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration16.js b/tests/baselines/reference/parserMemberAccessorDeclaration16.js index 7967a2accacb3..062dea9a51431 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration16.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration16.js @@ -11,7 +11,7 @@ var C = /** @class */ (function () { set: function (a) { if (a === void 0) { a = 1; } }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration17.js b/tests/baselines/reference/parserMemberAccessorDeclaration17.js index 820570460652a..15b674cd2d668 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration17.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration17.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { set: function (a) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration18.js b/tests/baselines/reference/parserMemberAccessorDeclaration18.js index 84f24ac79be12..5699251facb91 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration18.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration18.js @@ -14,7 +14,7 @@ var C = /** @class */ (function () { a[_i] = arguments[_i]; } }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration2.js b/tests/baselines/reference/parserMemberAccessorDeclaration2.js index 83be7996a0654..ae1b752d3b3e2 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration2.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration2.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "b", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration3.js b/tests/baselines/reference/parserMemberAccessorDeclaration3.js index edd6d9d7bab1a..d6c32d3ea7de3 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration3.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration3.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, 0, { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration4.js b/tests/baselines/reference/parserMemberAccessorDeclaration4.js index ec12dde504200..b596cbc987333 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration4.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration4.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "a", { set: function (i) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration5.js b/tests/baselines/reference/parserMemberAccessorDeclaration5.js index 3b63703ef97d0..aa35b3dc74e27 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration5.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration5.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "a", { set: function (i) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration6.js b/tests/baselines/reference/parserMemberAccessorDeclaration6.js index dd7a05fa8c0b8..4eeda3923e148 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration6.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration6.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, 0, { set: function (i) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration7.js b/tests/baselines/reference/parserMemberAccessorDeclaration7.js index 9344cf07ee6aa..aad88b4da69d9 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration7.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration7.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "Foo", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration8.js b/tests/baselines/reference/parserMemberAccessorDeclaration8.js index 0fe2d749ab04a..455c3b4dae372 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration8.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration8.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C, "Foo", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration9.js b/tests/baselines/reference/parserMemberAccessorDeclaration9.js index 22c4cb0100636..bba31517e8eb3 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration9.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration9.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C, "Foo", { get: function () { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.errors.txt b/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.errors.txt index 8a4a62233d9c0..16d2122ff747c 100644 --- a/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.errors.txt +++ b/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/parserNoASIOnCallAfterFunctionExpression1.ts(2,2): error TS2554: Expected 0 arguments, but got 1. +tests/cases/conformance/parser/ecmascript5/parserNoASIOnCallAfterFunctionExpression1.ts(2,15): error TS2339: Property 'foo' does not exist on type 'void'. -==== tests/cases/conformance/parser/ecmascript5/parserNoASIOnCallAfterFunctionExpression1.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/parserNoASIOnCallAfterFunctionExpression1.ts (2 errors) ==== var x = function () { } (window).foo; ~~~~~~~~~~~ !!! error TS2554: Expected 0 arguments, but got 1. + ~~~ +!!! error TS2339: Property 'foo' does not exist on type 'void'. \ No newline at end of file diff --git a/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1.js b/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1.js index 76af2100e3f54..bd1450773baae 100644 --- a/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1.js +++ b/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1.js @@ -11,7 +11,7 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "foo", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js b/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js index 2b6716fba2aaf..1e7c4bc22a87d 100644 --- a/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js +++ b/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "foo", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.types b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.types index 87932ff9ae1bb..c7143d2c049ad 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.types +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.types @@ -22,7 +22,7 @@ declare function testError(a: (t: T, t1: T) => void): T // more args testError((t1: D, t2, t3) => {}) ->testError((t1: D, t2, t3) => {}) : any +>testError((t1: D, t2, t3) => {}) : C >testError : (a: (t: T, t1: T) => void) => T >(t1: D, t2, t3) => {} : (t1: D, t2: any, t3: any) => void >t1 : D @@ -30,7 +30,7 @@ testError((t1: D, t2, t3) => {}) >t3 : any testError((t1, t2: D, t3) => {}) ->testError((t1, t2: D, t3) => {}) : any +>testError((t1, t2: D, t3) => {}) : C >testError : (a: (t: T, t1: T) => void) => T >(t1, t2: D, t3) => {} : (t1: any, t2: D, t3: any) => void >t1 : any @@ -38,7 +38,7 @@ testError((t1, t2: D, t3) => {}) >t3 : any testError((t1, t2, t3: D) => {}) ->testError((t1, t2, t3: D) => {}) : any +>testError((t1, t2, t3: D) => {}) : C >testError : (a: (t: T, t1: T) => void) => T >(t1, t2, t3: D) => {} : (t1: any, t2: any, t3: D) => void >t1 : any diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js index 3289efd02095f..a784acac5c0a2 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js @@ -12,10 +12,17 @@ export let x: number; export {x} from "../file2"; //// [file3.js] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); define(["require", "exports", "../file2"], function (require, exports, file2_1) { "use strict"; exports.__esModule = true; - exports.x = file2_1.x; + __createBinding(exports, file2_1, "x"); }); //// [file1.js] define(["require", "exports", "./project/file3"], function (require, exports, file3_1) { diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.js index 74c0f40758abc..947ba91531594 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.js @@ -13,9 +13,16 @@ export {x} from "../file2"; //// [file3.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var file2_1 = require("../file2"); -exports.x = file2_1.x; +__createBinding(exports, file2_1, "x"); //// [file1.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js index 55aca054e8249..aa9d4d7db9eb6 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js @@ -32,6 +32,7 @@ export let y: number; define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.b = void 0; }); //// [file2.js] define(["require", "exports", "module1", "templates/module2", "../file3"], function (require, exports, module1_1, module2_1, file3_1) { diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.js index 303b98f4d83de..94c1c1820076a 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.js @@ -31,6 +31,7 @@ export let y: number; //// [module2.js] "use strict"; exports.__esModule = true; +exports.b = void 0; //// [file2.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/potentiallyUncalledDecorators.js b/tests/baselines/reference/potentiallyUncalledDecorators.js index b69f848a8c933..3e9c0e8d61016 100644 --- a/tests/baselines/reference/potentiallyUncalledDecorators.js +++ b/tests/baselines/reference/potentiallyUncalledDecorators.js @@ -85,105 +85,135 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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; +const FooComponent = /** @class */ (() => { + class FooComponent { } -} -__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); + __decorate([ + Input + ], FooComponent.prototype, "foo", void 0); + return FooComponent; +})(); +const Person = /** @class */ (() => { + class Person { + } + __decorate([ + tracked + ], Person.prototype, "person", void 0); + return Person; +})(); +const MultiplyByTwo = /** @class */ (() => { + class MultiplyByTwo { + get multiplied() { + return this.args.number * 2; + } + } + __decorate([ + tracked('args') + ], MultiplyByTwo.prototype, "multiplied", null); + return MultiplyByTwo; +})(); +const A = /** @class */ (() => { + let A = class A { + bar() { } + }; + __decorate([ + noArgs + ], A.prototype, "foo", void 0); + __decorate([ + noArgs + ], A.prototype, "bar", null); + A = __decorate([ + noArgs + ], A); + return A; +})(); +const B = /** @class */ (() => { + let B = class B { + bar() { } + }; + __decorate([ + allRest + ], B.prototype, "foo", void 0); + __decorate([ + allRest + ], B.prototype, "bar", null); + B = __decorate([ + allRest + ], B); + return B; +})(); +const C = /** @class */ (() => { + let C = class C { + bar() { } + }; + __decorate([ + oneOptional + ], C.prototype, "foo", void 0); + __decorate([ + oneOptional + ], C.prototype, "bar", null); + C = __decorate([ + oneOptional + ], C); + return C; +})(); +const D = /** @class */ (() => { + let D = class D { + bar() { } + }; + __decorate([ + twoOptional + ], D.prototype, "foo", void 0); + __decorate([ + twoOptional + ], D.prototype, "bar", null); + D = __decorate([ + twoOptional + ], D); + return D; +})(); +const E = /** @class */ (() => { + let E = class E { + bar() { } + }; + __decorate([ + threeOptional + ], E.prototype, "foo", void 0); + __decorate([ + threeOptional + ], E.prototype, "bar", null); + E = __decorate([ + threeOptional + ], E); + return E; +})(); +const F = /** @class */ (() => { + let F = class F { + bar() { } + }; + __decorate([ + oneOptionalWithRest + ], F.prototype, "foo", void 0); + __decorate([ + oneOptionalWithRest + ], F.prototype, "bar", null); + F = __decorate([ + oneOptionalWithRest + ], F); + return F; +})(); +const G = /** @class */ (() => { + let G = class G { + bar() { } + }; + __decorate([ + anyDec + ], G.prototype, "foo", void 0); + __decorate([ + anyDec + ], G.prototype, "bar", null); + G = __decorate([ + anyDec + ], G); + return G; +})(); diff --git a/tests/baselines/reference/primitiveConstraints1.types b/tests/baselines/reference/primitiveConstraints1.types index 9ca17bb9ef245..1edc2597ec178 100644 --- a/tests/baselines/reference/primitiveConstraints1.types +++ b/tests/baselines/reference/primitiveConstraints1.types @@ -5,7 +5,7 @@ function foo1(t: T, u: U) { } >u : U foo1('hm', 1); // no error ->foo1('hm', 1) : any +>foo1('hm', 1) : void >foo1 : (t: T, u: U) => void >'hm' : "hm" >1 : 1 @@ -16,7 +16,7 @@ function foo2(t: T, u: U) { } >u : U foo2(1, 'hm'); // error ->foo2(1, 'hm') : any +>foo2(1, 'hm') : void >foo2 : (t: T, u: U) => void >1 : 1 >'hm' : "hm" diff --git a/tests/baselines/reference/primitiveConstraints2.types b/tests/baselines/reference/primitiveConstraints2.types index 81b867c8a93d6..6e8e7b725d48f 100644 --- a/tests/baselines/reference/primitiveConstraints2.types +++ b/tests/baselines/reference/primitiveConstraints2.types @@ -18,7 +18,7 @@ var x = new C(); >C : typeof C x.bar2(2, ""); // should error ->x.bar2(2, "") : any +>x.bar2(2, "") : number >x.bar2 : (x: number, y: U) => number >x : C >bar2 : (x: number, y: U) => number @@ -26,7 +26,7 @@ x.bar2(2, ""); // should error >"" : "" x.bar2(2, ""); // should error ->x.bar2(2, "") : any +>x.bar2(2, "") : number >x.bar2 : (x: number, y: U) => number >x : C >bar2 : (x: number, y: U) => number diff --git a/tests/baselines/reference/privacyAccessorDeclFile.js b/tests/baselines/reference/privacyAccessorDeclFile.js index 1c84bd63749d6..9c2ef229275f7 100644 --- a/tests/baselines/reference/privacyAccessorDeclFile.js +++ b/tests/baselines/reference/privacyAccessorDeclFile.js @@ -1079,56 +1079,56 @@ var publicClassWithWithPrivateGetAccessorTypes = /** @class */ (function () { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPrivateGetAccessorTypes; @@ -1141,56 +1141,56 @@ var publicClassWithWithPublicGetAccessorTypes = /** @class */ (function () { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPublicGetAccessorTypes; @@ -1203,56 +1203,56 @@ var privateClassWithWithPrivateGetAccessorTypes = /** @class */ (function () { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPrivateGetAccessorTypes; @@ -1264,56 +1264,56 @@ var privateClassWithWithPublicGetAccessorTypes = /** @class */ (function () { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPublicGetAccessorTypes; @@ -1324,25 +1324,25 @@ var publicClassWithWithPrivateSetAccessorTypes = /** @class */ (function () { Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPrivateSetAccessorTypes; @@ -1354,25 +1354,25 @@ var publicClassWithWithPublicSetAccessorTypes = /** @class */ (function () { Object.defineProperty(publicClassWithWithPublicSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPublicSetAccessorTypes; @@ -1384,25 +1384,25 @@ var privateClassWithWithPrivateSetAccessorTypes = /** @class */ (function () { Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPrivateSetAccessorTypes; @@ -1413,25 +1413,25 @@ var privateClassWithWithPublicSetAccessorTypes = /** @class */ (function () { Object.defineProperty(privateClassWithWithPublicSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPublicSetAccessorTypes; @@ -1443,28 +1443,28 @@ var publicClassWithPrivateModuleGetAccessorTypes = /** @class */ (function () { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithPrivateModuleGetAccessorTypes; @@ -1476,13 +1476,13 @@ var publicClassWithPrivateModuleSetAccessorTypes = /** @class */ (function () { Object.defineProperty(publicClassWithPrivateModuleSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithPrivateModuleSetAccessorTypes; @@ -1495,28 +1495,28 @@ var privateClassWithPrivateModuleGetAccessorTypes = /** @class */ (function () { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithPrivateModuleGetAccessorTypes; @@ -1527,13 +1527,13 @@ var privateClassWithPrivateModuleSetAccessorTypes = /** @class */ (function () { Object.defineProperty(privateClassWithPrivateModuleSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithPrivateModuleSetAccessorTypes; @@ -1558,56 +1558,56 @@ var publicModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPrivateGetAccessorTypes; @@ -1620,56 +1620,56 @@ var publicModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPublicGetAccessorTypes; @@ -1682,56 +1682,56 @@ var publicModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPrivateGetAccessorTypes; @@ -1743,56 +1743,56 @@ var publicModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPublicGetAccessorTypes; @@ -1803,25 +1803,25 @@ var publicModule; Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPrivateSetAccessorTypes; @@ -1833,25 +1833,25 @@ var publicModule; Object.defineProperty(publicClassWithWithPublicSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPublicSetAccessorTypes; @@ -1863,25 +1863,25 @@ var publicModule; Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPrivateSetAccessorTypes; @@ -1892,25 +1892,25 @@ var publicModule; Object.defineProperty(privateClassWithWithPublicSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPublicSetAccessorTypes; @@ -1922,28 +1922,28 @@ var publicModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithPrivateModuleGetAccessorTypes; @@ -1955,13 +1955,13 @@ var publicModule; Object.defineProperty(publicClassWithPrivateModuleSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithPrivateModuleSetAccessorTypes; @@ -1974,28 +1974,28 @@ var publicModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithPrivateModuleGetAccessorTypes; @@ -2006,13 +2006,13 @@ var publicModule; Object.defineProperty(privateClassWithPrivateModuleSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithPrivateModuleSetAccessorTypes; @@ -2038,56 +2038,56 @@ var privateModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPrivateGetAccessorTypes; @@ -2100,56 +2100,56 @@ var privateModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPublicGetAccessorTypes; @@ -2162,56 +2162,56 @@ var privateModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPrivateGetAccessorTypes; @@ -2223,56 +2223,56 @@ var privateModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPublicGetAccessorTypes; @@ -2283,25 +2283,25 @@ var privateModule; Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPrivateSetAccessorTypes; @@ -2313,25 +2313,25 @@ var privateModule; Object.defineProperty(publicClassWithWithPublicSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPublicSetAccessorTypes; @@ -2343,25 +2343,25 @@ var privateModule; Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPrivateSetAccessorTypes; @@ -2372,25 +2372,25 @@ var privateModule; Object.defineProperty(privateClassWithWithPublicSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPublicSetAccessorTypes; @@ -2402,28 +2402,28 @@ var privateModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithPrivateModuleGetAccessorTypes; @@ -2435,13 +2435,13 @@ var privateModule; Object.defineProperty(publicClassWithPrivateModuleSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithPrivateModuleSetAccessorTypes; @@ -2454,28 +2454,28 @@ var privateModule; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithPrivateModuleGetAccessorTypes; @@ -2486,13 +2486,13 @@ var privateModule; Object.defineProperty(privateClassWithPrivateModuleSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithPrivateModuleSetAccessorTypes; @@ -2511,56 +2511,56 @@ var publicClassInGlobalWithPublicGetAccessorTypes = /** @class */ (function () { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassInGlobalWithPublicGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassInGlobalWithPublicGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassInGlobalWithPublicGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassInGlobalWithPublicGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new publicClassInGlobal(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassInGlobalWithPublicGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new publicClassInGlobal(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassInGlobalWithPublicGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new publicClassInGlobal(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassInGlobalWithPublicGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new publicClassInGlobal(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassInGlobalWithPublicGetAccessorTypes; @@ -2571,25 +2571,25 @@ var publicClassInGlobalWithWithPublicSetAccessorTypes = /** @class */ (function Object.defineProperty(publicClassInGlobalWithWithPublicSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassInGlobalWithWithPublicSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassInGlobalWithWithPublicSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassInGlobalWithWithPublicSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassInGlobalWithWithPublicSetAccessorTypes; @@ -2627,56 +2627,56 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPrivateGetAccessorTypes; @@ -2689,56 +2689,56 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPublicGetAccessorTypes; @@ -2751,56 +2751,56 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPrivateGetAccessorTypes; @@ -2812,56 +2812,56 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPublicGetAccessorTypes; @@ -2872,25 +2872,25 @@ var publicModuleInGlobal; Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPrivateSetAccessorTypes; @@ -2902,25 +2902,25 @@ var publicModuleInGlobal; Object.defineProperty(publicClassWithWithPublicSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPublicSetAccessorTypes; @@ -2932,25 +2932,25 @@ var publicModuleInGlobal; Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPrivateSetAccessorTypes; @@ -2961,25 +2961,25 @@ var publicModuleInGlobal; Object.defineProperty(privateClassWithWithPublicSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPublicSetAccessorTypes; @@ -2991,28 +2991,28 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithPrivateModuleGetAccessorTypes; @@ -3024,13 +3024,13 @@ var publicModuleInGlobal; Object.defineProperty(publicClassWithPrivateModuleSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithPrivateModuleSetAccessorTypes; @@ -3043,28 +3043,28 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithPrivateModuleGetAccessorTypes; @@ -3075,13 +3075,13 @@ var publicModuleInGlobal; Object.defineProperty(privateClassWithPrivateModuleSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithPrivateModuleSetAccessorTypes; @@ -3094,56 +3094,56 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPrivateGetAccessorTypes; @@ -3156,56 +3156,56 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPublicGetAccessorTypes; @@ -3218,56 +3218,56 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new privateClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPrivateGetAccessorTypes; @@ -3279,56 +3279,56 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return new publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPublicGetAccessorTypes; @@ -3339,25 +3339,25 @@ var publicModuleInGlobal; Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPrivateSetAccessorTypes; @@ -3369,25 +3369,25 @@ var publicModuleInGlobal; Object.defineProperty(publicClassWithWithPublicSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPublicSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPublicSetAccessorTypes; @@ -3399,25 +3399,25 @@ var publicModuleInGlobal; Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPrivateSetAccessorTypes; @@ -3428,25 +3428,25 @@ var publicModuleInGlobal; Object.defineProperty(privateClassWithWithPublicSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes, "myPrivateStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPublicSetAccessorTypes.prototype, "myPrivateMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPublicSetAccessorTypes; @@ -3458,28 +3458,28 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithPrivateModuleGetAccessorTypes; @@ -3491,13 +3491,13 @@ var publicModuleInGlobal; Object.defineProperty(publicClassWithPrivateModuleSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithPrivateModuleSetAccessorTypes; @@ -3510,28 +3510,28 @@ var publicModuleInGlobal; get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return new privateModule.publicClass(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithPrivateModuleGetAccessorTypes; @@ -3542,13 +3542,13 @@ var publicModuleInGlobal; Object.defineProperty(privateClassWithPrivateModuleSetAccessorTypes, "myPublicStaticMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleSetAccessorTypes.prototype, "myPublicMethod", { set: function (param) { }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithPrivateModuleSetAccessorTypes; diff --git a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js index e0dc38bcfcd58..540d41f837af2 100644 --- a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js @@ -197,56 +197,56 @@ var publicClassWithWithPrivateGetAccessorTypes = /** @class */ (function () { get: function () { return exporter.createExportedWidget1(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return exporter.createExportedWidget1(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return exporter.createExportedWidget1(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return exporter.createExportedWidget1(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return exporter.createExportedWidget3(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return exporter.createExportedWidget3(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return exporter.createExportedWidget3(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return exporter.createExportedWidget3(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithWithPrivateGetAccessorTypes; @@ -259,56 +259,56 @@ var privateClassWithWithPrivateGetAccessorTypes = /** @class */ (function () { get: function () { return exporter.createExportedWidget1(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod", { get: function () { return exporter.createExportedWidget1(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return exporter.createExportedWidget1(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod", { get: function () { return exporter.createExportedWidget1(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return exporter.createExportedWidget3(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes, "myPrivateStaticMethod1", { get: function () { return exporter.createExportedWidget3(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return exporter.createExportedWidget3(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithWithPrivateGetAccessorTypes.prototype, "myPrivateMethod1", { get: function () { return exporter.createExportedWidget3(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithWithPrivateGetAccessorTypes; @@ -320,28 +320,28 @@ var publicClassWithPrivateModuleGetAccessorTypes = /** @class */ (function () { get: function () { return exporter.createExportedWidget2(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return exporter.createExportedWidget2(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return exporter.createExportedWidget4(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(publicClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return exporter.createExportedWidget4(); }, - enumerable: true, + enumerable: false, configurable: true }); return publicClassWithPrivateModuleGetAccessorTypes; @@ -354,28 +354,28 @@ var privateClassWithPrivateModuleGetAccessorTypes = /** @class */ (function () { get: function () { return exporter.createExportedWidget2(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod", { get: function () { return exporter.createExportedWidget2(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes, "myPublicStaticMethod1", { get: function () { return exporter.createExportedWidget4(); }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(privateClassWithPrivateModuleGetAccessorTypes.prototype, "myPublicMethod1", { get: function () { return exporter.createExportedWidget4(); }, - enumerable: true, + enumerable: false, configurable: true }); return privateClassWithPrivateModuleGetAccessorTypes; diff --git a/tests/baselines/reference/privacyCheckTypeOfFunction.js b/tests/baselines/reference/privacyCheckTypeOfFunction.js index ca9878c67276a..ce86f7bca3538 100644 --- a/tests/baselines/reference/privacyCheckTypeOfFunction.js +++ b/tests/baselines/reference/privacyCheckTypeOfFunction.js @@ -10,6 +10,7 @@ export var b = foo; exports.__esModule = true; function foo() { } +exports.x = void 0; exports.b = foo; diff --git a/tests/baselines/reference/privacyGetter.js b/tests/baselines/reference/privacyGetter.js index 92fd5e82bec8c..ca72cafc43b83 100644 --- a/tests/baselines/reference/privacyGetter.js +++ b/tests/baselines/reference/privacyGetter.js @@ -235,7 +235,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p1_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C3_public.prototype, "p2_private", { @@ -244,7 +244,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p2_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C3_public.prototype, "p3_private", { @@ -253,7 +253,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p3_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C3_public.prototype, "p4_public", { @@ -262,7 +262,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p4_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); return C3_public; @@ -277,7 +277,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p1_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C4_private.prototype, "p2_private", { @@ -286,7 +286,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p2_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C4_private.prototype, "p3_private", { @@ -295,7 +295,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p3_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C4_private.prototype, "p4_public", { @@ -304,7 +304,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p4_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); return C4_private; @@ -334,7 +334,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m2_c3_p1_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(m2_C3_public.prototype, "p2_private", { @@ -343,7 +343,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m2_c3_p2_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(m2_C3_public.prototype, "p3_private", { @@ -352,7 +352,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m2_c3_p3_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(m2_C3_public.prototype, "p4_public", { @@ -361,7 +361,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m2_c3_p4_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); return m2_C3_public; @@ -376,7 +376,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m2_c3_p1_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(m2_C4_private.prototype, "p2_private", { @@ -385,7 +385,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m2_c3_p2_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(m2_C4_private.prototype, "p3_private", { @@ -394,7 +394,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m2_c3_p3_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(m2_C4_private.prototype, "p4_public", { @@ -403,7 +403,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m2_c3_p4_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); return m2_C4_private; @@ -431,7 +431,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p1_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C7_public.prototype, "p2_private", { @@ -440,7 +440,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p2_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C7_public.prototype, "p3_private", { @@ -449,7 +449,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p3_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C7_public.prototype, "p4_public", { @@ -458,7 +458,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p4_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); return C7_public; @@ -473,7 +473,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p1_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C8_private.prototype, "p2_private", { @@ -482,7 +482,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p2_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C8_private.prototype, "p3_private", { @@ -491,7 +491,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p3_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C8_private.prototype, "p4_public", { @@ -500,7 +500,7 @@ define(["require", "exports"], function (require, exports) { }, set: function (m1_c3_p4_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); return C8_private; diff --git a/tests/baselines/reference/privacyGloGetter.js b/tests/baselines/reference/privacyGloGetter.js index 392272b4d0248..a3047863a693f 100644 --- a/tests/baselines/reference/privacyGloGetter.js +++ b/tests/baselines/reference/privacyGloGetter.js @@ -113,7 +113,7 @@ var m1; }, set: function (m1_c3_p1_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C3_public.prototype, "p2_private", { @@ -122,7 +122,7 @@ var m1; }, set: function (m1_c3_p2_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C3_public.prototype, "p3_private", { @@ -131,7 +131,7 @@ var m1; }, set: function (m1_c3_p3_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C3_public.prototype, "p4_public", { @@ -140,7 +140,7 @@ var m1; }, set: function (m1_c3_p4_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); return C3_public; @@ -155,7 +155,7 @@ var m1; }, set: function (m1_c3_p1_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C4_private.prototype, "p2_private", { @@ -164,7 +164,7 @@ var m1; }, set: function (m1_c3_p2_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C4_private.prototype, "p3_private", { @@ -173,7 +173,7 @@ var m1; }, set: function (m1_c3_p3_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C4_private.prototype, "p4_public", { @@ -182,7 +182,7 @@ var m1; }, set: function (m1_c3_p4_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); return C4_private; @@ -202,7 +202,7 @@ var C7_public = /** @class */ (function () { }, set: function (m1_c3_p1_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C7_public.prototype, "p2_private", { @@ -211,7 +211,7 @@ var C7_public = /** @class */ (function () { }, set: function (m1_c3_p2_arg) { }, - enumerable: true, + enumerable: false, configurable: true }); return C7_public; diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js index b2da49d083ea7..60dcb9dfaa5f7 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js @@ -177,9 +177,11 @@ define(["require", "exports"], function (require, exports) { var privateUse_im_public_v_private = exports.im_public_v_private; exports.publicUse_im_public_v_private = exports.im_public_v_private; var privateUse_im_public_i_private; + exports.publicUse_im_public_i_private = void 0; var privateUse_im_public_mi_private = new exports.im_public_mi_private.c(); exports.publicUse_im_public_mi_private = new exports.im_public_mi_private.c(); var privateUse_im_public_mu_private; + exports.publicUse_im_public_mu_private = void 0; // No Privacy errors - importing public elements exports.im_public_c_public = m_public.c_public; exports.im_public_e_public = m_public.e_public; @@ -196,9 +198,11 @@ define(["require", "exports"], function (require, exports) { var privateUse_im_public_v_public = exports.im_public_v_public; exports.publicUse_im_public_v_public = exports.im_public_v_public; var privateUse_im_public_i_public; + exports.publicUse_im_public_i_public = void 0; var privateUse_im_public_mi_public = new exports.im_public_mi_public.c(); exports.publicUse_im_public_mi_public = new exports.im_public_mi_public.c(); var privateUse_im_public_mu_public; + exports.publicUse_im_public_mu_public = void 0; }); diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js index eefb1a7627fc5..e2cd1e4bb7990 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js @@ -177,9 +177,11 @@ define(["require", "exports"], function (require, exports) { var privateUse_im_private_v_private = im_private_v_private; exports.publicUse_im_private_v_private = im_private_v_private; var privateUse_im_private_i_private; + exports.publicUse_im_private_i_private = void 0; var privateUse_im_private_mi_private = new im_private_mi_private.c(); exports.publicUse_im_private_mi_private = new im_private_mi_private.c(); var privateUse_im_private_mu_private; + exports.publicUse_im_private_mu_private = void 0; // No Privacy errors - importing public elements var im_private_c_public = m_public.c_public; var im_private_e_public = m_public.e_public; @@ -196,9 +198,11 @@ define(["require", "exports"], function (require, exports) { var privateUse_im_private_v_public = im_private_v_public; exports.publicUse_im_private_v_public = im_private_v_public; var privateUse_im_private_i_public; + exports.publicUse_im_private_i_public = void 0; var privateUse_im_private_mi_public = new im_private_mi_public.c(); exports.publicUse_im_private_mi_public = new im_private_mi_public.c(); var privateUse_im_private_mu_public; + exports.publicUse_im_private_mu_public = void 0; }); diff --git a/tests/baselines/reference/privacyVar.js b/tests/baselines/reference/privacyVar.js index ccaf7e1f1b70b..9a08894cefc4d 100644 --- a/tests/baselines/reference/privacyVar.js +++ b/tests/baselines/reference/privacyVar.js @@ -324,7 +324,9 @@ var glo_C4_public = /** @class */ (function () { return glo_C4_public; }()); var glo_v1_private; +exports.glo_v2_public = void 0; var glo_v3_private; +exports.glo_v4_public = void 0; // error var glo_v11_private = new glo_C1_public(); exports.glo_v12_public = new glo_C1_public(); var glo_v13_private = new glo_C2_private(); diff --git a/tests/baselines/reference/privacyVarDeclFile.js b/tests/baselines/reference/privacyVarDeclFile.js index 76d69b2a2eff7..6899d04f2a7e9 100644 --- a/tests/baselines/reference/privacyVarDeclFile.js +++ b/tests/baselines/reference/privacyVarDeclFile.js @@ -460,6 +460,8 @@ var privateClassWithWithPublicPropertyTypes = /** @class */ (function () { } return privateClassWithWithPublicPropertyTypes; }()); +exports.publicVarWithPrivatePropertyTypes = void 0; // Error +exports.publicVarWithPublicPropertyTypes = void 0; var privateVarWithPrivatePropertyTypes; var privateVarWithPublicPropertyTypes; var publicClassWithPrivateModulePropertyTypes = /** @class */ (function () { @@ -468,6 +470,7 @@ var publicClassWithPrivateModulePropertyTypes = /** @class */ (function () { return publicClassWithPrivateModulePropertyTypes; }()); exports.publicClassWithPrivateModulePropertyTypes = publicClassWithPrivateModulePropertyTypes; +exports.publicVarWithPrivateModulePropertyTypes = void 0; // Error var privateClassWithPrivateModulePropertyTypes = /** @class */ (function () { function privateClassWithPrivateModulePropertyTypes() { } diff --git a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js index 9a1e95c2f52c7..fcbc18ae1453d 100644 --- a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js +++ b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js @@ -39,14 +39,14 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { return this.foo; }; Object.defineProperty(C, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.foo = function () { return this.foo; }; @@ -67,7 +67,7 @@ var C2 = /** @class */ (function () { var _this = this; (function () { _this.y = _this.x; }); }, - enumerable: true, + enumerable: false, configurable: true }); C2.prototype.foo = function () { @@ -84,7 +84,7 @@ var C2 = /** @class */ (function () { var _this = this; (function () { _this.y = _this.x; }); }, - enumerable: true, + enumerable: false, configurable: true }); C2.foo = function () { diff --git a/tests/baselines/reference/privateClassPropertyAccessibleWithinNestedClass.js b/tests/baselines/reference/privateClassPropertyAccessibleWithinNestedClass.js index b915d541049c9..52ed810cca5f1 100644 --- a/tests/baselines/reference/privateClassPropertyAccessibleWithinNestedClass.js +++ b/tests/baselines/reference/privateClassPropertyAccessibleWithinNestedClass.js @@ -45,14 +45,14 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { return this.foo; }; Object.defineProperty(C, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.foo = function () { return this.foo; }; diff --git a/tests/baselines/reference/privateFieldAssignabilityFromUnknown.errors.txt b/tests/baselines/reference/privateFieldAssignabilityFromUnknown.errors.txt new file mode 100644 index 0000000000000..22f50eec6ff01 --- /dev/null +++ b/tests/baselines/reference/privateFieldAssignabilityFromUnknown.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/privateFieldAssignabilityFromUnknown.ts(2,3): error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher. +tests/cases/compiler/privateFieldAssignabilityFromUnknown.ts(5,7): error TS2741: Property '#field' is missing in type '{}' but required in type 'Class'. + + +==== tests/cases/compiler/privateFieldAssignabilityFromUnknown.ts (2 errors) ==== + export class Class { + #field: any + ~~~~~~ +!!! error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher. + } + + const task: Class = {} as unknown; + ~~~~ +!!! error TS2741: Property '#field' is missing in type '{}' but required in type 'Class'. +!!! related TS2728 tests/cases/compiler/privateFieldAssignabilityFromUnknown.ts:2:3: '#field' is declared here. + \ No newline at end of file diff --git a/tests/baselines/reference/privateFieldAssignabilityFromUnknown.js b/tests/baselines/reference/privateFieldAssignabilityFromUnknown.js new file mode 100644 index 0000000000000..78e0988d8cfb7 --- /dev/null +++ b/tests/baselines/reference/privateFieldAssignabilityFromUnknown.js @@ -0,0 +1,21 @@ +//// [privateFieldAssignabilityFromUnknown.ts] +export class Class { + #field: any +} + +const task: Class = {} as unknown; + + +//// [privateFieldAssignabilityFromUnknown.js] +"use strict"; +var _field; +exports.__esModule = true; +var Class = /** @class */ (function () { + function Class() { + _field.set(this, void 0); + } + return Class; +}()); +exports.Class = Class; +_field = new WeakMap(); +var task = {}; diff --git a/tests/baselines/reference/privateFieldAssignabilityFromUnknown.symbols b/tests/baselines/reference/privateFieldAssignabilityFromUnknown.symbols new file mode 100644 index 0000000000000..0e1be5720e28f --- /dev/null +++ b/tests/baselines/reference/privateFieldAssignabilityFromUnknown.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/privateFieldAssignabilityFromUnknown.ts === +export class Class { +>Class : Symbol(Class, Decl(privateFieldAssignabilityFromUnknown.ts, 0, 0)) + + #field: any +>#field : Symbol(Class.#field, Decl(privateFieldAssignabilityFromUnknown.ts, 0, 20)) +} + +const task: Class = {} as unknown; +>task : Symbol(task, Decl(privateFieldAssignabilityFromUnknown.ts, 4, 5)) +>Class : Symbol(Class, Decl(privateFieldAssignabilityFromUnknown.ts, 0, 0)) + diff --git a/tests/baselines/reference/privateFieldAssignabilityFromUnknown.types b/tests/baselines/reference/privateFieldAssignabilityFromUnknown.types new file mode 100644 index 0000000000000..90aed258dbcd8 --- /dev/null +++ b/tests/baselines/reference/privateFieldAssignabilityFromUnknown.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/privateFieldAssignabilityFromUnknown.ts === +export class Class { +>Class : Class + + #field: any +>#field : any +} + +const task: Class = {} as unknown; +>task : Class +>{} as unknown : unknown +>{} : {} + diff --git a/tests/baselines/reference/privateNameAmbientNoImplicitAny.errors.txt b/tests/baselines/reference/privateNameAmbientNoImplicitAny.errors.txt new file mode 100644 index 0000000000000..c7558fbd81899 --- /dev/null +++ b/tests/baselines/reference/privateNameAmbientNoImplicitAny.errors.txt @@ -0,0 +1,12 @@ +tests/cases/conformance/classes/members/privateNames/privateNameAmbientNoImplicitAny.ts(5,5): error TS7008: Member '#prop' implicitly has an 'any' type. + + +==== tests/cases/conformance/classes/members/privateNames/privateNameAmbientNoImplicitAny.ts (1 errors) ==== + declare class A { + #prop; + } + class B { + #prop; + ~~~~~ +!!! error TS7008: Member '#prop' implicitly has an 'any' type. + } \ No newline at end of file diff --git a/tests/baselines/reference/privateNameAmbientNoImplicitAny.js b/tests/baselines/reference/privateNameAmbientNoImplicitAny.js new file mode 100644 index 0000000000000..8d08826cdb49c --- /dev/null +++ b/tests/baselines/reference/privateNameAmbientNoImplicitAny.js @@ -0,0 +1,12 @@ +//// [privateNameAmbientNoImplicitAny.ts] +declare class A { + #prop; +} +class B { + #prop; +} + +//// [privateNameAmbientNoImplicitAny.js] +class B { + #prop; +} diff --git a/tests/baselines/reference/privateNameAmbientNoImplicitAny.symbols b/tests/baselines/reference/privateNameAmbientNoImplicitAny.symbols new file mode 100644 index 0000000000000..4aa4a67eff02c --- /dev/null +++ b/tests/baselines/reference/privateNameAmbientNoImplicitAny.symbols @@ -0,0 +1,13 @@ +=== tests/cases/conformance/classes/members/privateNames/privateNameAmbientNoImplicitAny.ts === +declare class A { +>A : Symbol(A, Decl(privateNameAmbientNoImplicitAny.ts, 0, 0)) + + #prop; +>#prop : Symbol(A.#prop, Decl(privateNameAmbientNoImplicitAny.ts, 0, 17)) +} +class B { +>B : Symbol(B, Decl(privateNameAmbientNoImplicitAny.ts, 2, 1)) + + #prop; +>#prop : Symbol(B.#prop, Decl(privateNameAmbientNoImplicitAny.ts, 3, 9)) +} diff --git a/tests/baselines/reference/privateNameAmbientNoImplicitAny.types b/tests/baselines/reference/privateNameAmbientNoImplicitAny.types new file mode 100644 index 0000000000000..5a1152579a264 --- /dev/null +++ b/tests/baselines/reference/privateNameAmbientNoImplicitAny.types @@ -0,0 +1,13 @@ +=== tests/cases/conformance/classes/members/privateNames/privateNameAmbientNoImplicitAny.ts === +declare class A { +>A : A + + #prop; +>#prop : any +} +class B { +>B : B + + #prop; +>#prop : any +} diff --git a/tests/baselines/reference/privateNameAndStaticInitializer(target=es2015).js b/tests/baselines/reference/privateNameAndStaticInitializer(target=es2015).js index caeb43d15a3e9..ad0e8cbd0af97 100644 --- a/tests/baselines/reference/privateNameAndStaticInitializer(target=es2015).js +++ b/tests/baselines/reference/privateNameAndStaticInitializer(target=es2015).js @@ -8,12 +8,15 @@ class A { //// [privateNameAndStaticInitializer.js] -var _foo, _prop; -class A { - constructor() { - _foo.set(this, 1); - _prop.set(this, 2); +const A = /** @class */ (() => { + var _foo, _prop; + class A { + constructor() { + _foo.set(this, 1); + _prop.set(this, 2); + } } -} -_foo = new WeakMap(), _prop = new WeakMap(); -A.inst = new A(); + _foo = new WeakMap(), _prop = new WeakMap(); + A.inst = new A(); + return A; +})(); diff --git a/tests/baselines/reference/privateNameAndStaticInitializer(target=esnext).js b/tests/baselines/reference/privateNameAndStaticInitializer(target=esnext).js index 3387d0b4d1a52..2b0ec4012088e 100644 --- a/tests/baselines/reference/privateNameAndStaticInitializer(target=esnext).js +++ b/tests/baselines/reference/privateNameAndStaticInitializer(target=esnext).js @@ -8,12 +8,15 @@ class A { //// [privateNameAndStaticInitializer.js] -class A { - constructor() { - this.#foo = 1; - this.#prop = 2; +const A = /** @class */ (() => { + class A { + constructor() { + this.#foo = 1; + this.#prop = 2; + } + #foo; + #prop; } - #foo; - #prop; -} -A.inst = new A(); + A.inst = new A(); + return A; +})(); diff --git a/tests/baselines/reference/privateNameES5Ban(target=es3).js b/tests/baselines/reference/privateNameES5Ban(target=es3).js index 0f273d9e7fc45..b17b950cbf530 100644 --- a/tests/baselines/reference/privateNameES5Ban(target=es3).js +++ b/tests/baselines/reference/privateNameES5Ban(target=es3).js @@ -23,13 +23,13 @@ var A = /** @class */ (function () { Object.defineProperty(A.prototype, "", { get: function () { return ""; }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(A, "", { get: function () { return 0; }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); var _field, _sField; diff --git a/tests/baselines/reference/privateNameES5Ban(target=es5).js b/tests/baselines/reference/privateNameES5Ban(target=es5).js index 0f273d9e7fc45..b17b950cbf530 100644 --- a/tests/baselines/reference/privateNameES5Ban(target=es5).js +++ b/tests/baselines/reference/privateNameES5Ban(target=es5).js @@ -23,13 +23,13 @@ var A = /** @class */ (function () { Object.defineProperty(A.prototype, "", { get: function () { return ""; }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(A, "", { get: function () { return 0; }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); var _field, _sField; diff --git a/tests/baselines/reference/privateNameFieldsESNext.js b/tests/baselines/reference/privateNameFieldsESNext.js index acc37caa3cc8f..cdace16aa7e8e 100644 --- a/tests/baselines/reference/privateNameFieldsESNext.js +++ b/tests/baselines/reference/privateNameFieldsESNext.js @@ -21,26 +21,29 @@ class C { //// [privateNameFieldsESNext.js] -class C { - constructor() { - this.a = 123; - this.#a = 10; - this.c = "hello"; - this.#something = () => 1234; +const C = /** @class */ (() => { + class C { + constructor() { + this.a = 123; + this.#a = 10; + this.c = "hello"; + this.#something = () => 1234; + } + #a; + #b; + method() { + console.log(this.#a); + this.#a = "hello"; + console.log(this.#b); + } + static #m; + static #x; + static test() { + console.log(this.#m); + console.log(this.#x = "test"); + } + #something; } - #a; - #b; - method() { - console.log(this.#a); - this.#a = "hello"; - console.log(this.#b); - } - static #m; - static #x; - static test() { - console.log(this.#m); - console.log(this.#x = "test"); - } - #something; -} -C.#m = "test"; + C.#m = "test"; + return C; +})(); diff --git a/tests/baselines/reference/privateNamesConstructorChain-1.js b/tests/baselines/reference/privateNamesConstructorChain-1.js index dfba142f9aa53..83c1b42709126 100644 --- a/tests/baselines/reference/privateNamesConstructorChain-1.js +++ b/tests/baselines/reference/privateNamesConstructorChain-1.js @@ -21,23 +21,27 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function ( } return privateMap.get(receiver); }; -var _foo, _bar, _foo_1, _bar_1; -class Parent { - constructor() { - _foo.set(this, 3); - } - accessChildProps() { - __classPrivateFieldGet(new Child(), _foo); // OK (`#foo` was added when `Parent`'s constructor was called on `child`) - __classPrivateFieldGet(Child, _bar); // Error: not found +var _foo, _bar; +const Parent = /** @class */ (() => { + var _foo_1, _bar; + class Parent { + constructor() { + _foo_1.set(this, 3); + } + accessChildProps() { + __classPrivateFieldGet(new Child(), _foo_1); // OK (`#foo` was added when `Parent`'s constructor was called on `child`) + __classPrivateFieldGet(Child, _bar); // Error: not found + } } -} -_foo = new WeakMap(), _bar = new WeakMap(); -_bar.set(Parent, 5); + _foo_1 = new WeakMap(), _bar = new WeakMap(); + _bar.set(Parent, 5); + return Parent; +})(); class Child extends Parent { constructor() { super(...arguments); - _foo_1.set(this, "foo"); // OK (Child's #foo does not conflict, as `Parent`'s `#foo` is not accessible) - _bar_1.set(this, "bar"); // OK + _foo.set(this, "foo"); // OK (Child's #foo does not conflict, as `Parent`'s `#foo` is not accessible) + _bar.set(this, "bar"); // OK } } -_foo_1 = new WeakMap(), _bar_1 = new WeakMap(); +_foo = new WeakMap(), _bar = new WeakMap(); diff --git a/tests/baselines/reference/privateNamesConstructorChain-2.js b/tests/baselines/reference/privateNamesConstructorChain-2.js index 0d0069a47a9ad..8698eeda31169 100644 --- a/tests/baselines/reference/privateNamesConstructorChain-2.js +++ b/tests/baselines/reference/privateNamesConstructorChain-2.js @@ -23,24 +23,28 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function ( } return privateMap.get(receiver); }; -var _foo, _bar, _foo_1, _bar_1; -class Parent { - constructor() { - _foo.set(this, 3); - } - accessChildProps() { - __classPrivateFieldGet(new Child(), _foo); // OK (`#foo` was added when `Parent`'s constructor was called on `child`) - __classPrivateFieldGet(Child, _bar); // Error: not found +var _foo, _bar; +const Parent = /** @class */ (() => { + var _foo_1, _bar; + class Parent { + constructor() { + _foo_1.set(this, 3); + } + accessChildProps() { + __classPrivateFieldGet(new Child(), _foo_1); // OK (`#foo` was added when `Parent`'s constructor was called on `child`) + __classPrivateFieldGet(Child, _bar); // Error: not found + } } -} -_foo = new WeakMap(), _bar = new WeakMap(); -_bar.set(Parent, 5); + _foo_1 = new WeakMap(), _bar = new WeakMap(); + _bar.set(Parent, 5); + return Parent; +})(); class Child extends Parent { constructor() { super(...arguments); - _foo_1.set(this, "foo"); // OK (Child's #foo does not conflict, as `Parent`'s `#foo` is not accessible) - _bar_1.set(this, "bar"); // OK + _foo.set(this, "foo"); // OK (Child's #foo does not conflict, as `Parent`'s `#foo` is not accessible) + _bar.set(this, "bar"); // OK } } -_foo_1 = new WeakMap(), _bar_1 = new WeakMap(); +_foo = new WeakMap(), _bar = new WeakMap(); new Parent().accessChildProps(); diff --git a/tests/baselines/reference/privateNamesInNestedClasses-2.js b/tests/baselines/reference/privateNamesInNestedClasses-2.js index 896beb6308339..79930b2a5329c 100644 --- a/tests/baselines/reference/privateNamesInNestedClasses-2.js +++ b/tests/baselines/reference/privateNamesInNestedClasses-2.js @@ -24,22 +24,25 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function ( } return privateMap.get(receiver); }; -var _x; -class A { - constructor() { - var _x_1; - class B { - constructor() { - _x_1.set(this, 5); - class C { - constructor() { - __classPrivateFieldGet(A, _x_1); // error +const A = /** @class */ (() => { + var _x; + class A { + constructor() { + var _x_1; + class B { + constructor() { + _x_1.set(this, 5); + class C { + constructor() { + __classPrivateFieldGet(A, _x_1); // error + } } } } + _x_1 = new WeakMap(); } - _x_1 = new WeakMap(); } -} -_x = new WeakMap(); -_x.set(A, 5); + _x = new WeakMap(); + _x.set(A, 5); + return A; +})(); diff --git a/tests/baselines/reference/privateNamesUnique-3.js b/tests/baselines/reference/privateNamesUnique-3.js index 9575d6d89c57d..cb8628fe20ba4 100644 --- a/tests/baselines/reference/privateNamesUnique-3.js +++ b/tests/baselines/reference/privateNamesUnique-3.js @@ -21,21 +21,28 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function ( } return privateMap.get(receiver); }; -var _foo, _foo_1, _foo_2; -class A { - constructor() { - _foo_1.set(this, 1); - // because static and instance private names - // share the same lexical scope - // https://tc39.es/proposal-class-fields/#prod-ClassBody +const A = /** @class */ (() => { + var _foo, _foo_1; + class A { + constructor() { + _foo_1.set(this, 1); + // because static and instance private names + // share the same lexical scope + // https://tc39.es/proposal-class-fields/#prod-ClassBody + } } -} -_foo = new WeakMap(), _foo_1 = new WeakMap(); -_foo_1.set(A, true); // error (duplicate) -class B { - test(x) { - __classPrivateFieldGet(x, _foo_2); // error (#foo is a static property on B, not an instance property) + _foo = new WeakMap(), _foo_1 = new WeakMap(); + _foo_1.set(A, true); // error (duplicate) + return A; +})(); +const B = /** @class */ (() => { + var _foo; + class B { + test(x) { + __classPrivateFieldGet(x, _foo); // error (#foo is a static property on B, not an instance property) + } } -} -_foo_2 = new WeakMap(); -_foo_2.set(B, true); + _foo = new WeakMap(); + _foo.set(B, true); + return B; +})(); diff --git a/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js b/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js index 24e2e443bfe57..eaaad1d5f7c0e 100644 --- a/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js +++ b/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js @@ -8,6 +8,7 @@ define(["require", "exports"], function (require, exports) { }()); exports.d = d; ; + exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js b/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js index 7a8d072b08d20..fb8354c309bb6 100644 --- a/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js +++ b/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js @@ -7,6 +7,7 @@ var d = /** @class */ (function () { }()); exports.d = d; ; +exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js b/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js index 24e2e443bfe57..eaaad1d5f7c0e 100644 --- a/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js +++ b/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js @@ -8,6 +8,7 @@ define(["require", "exports"], function (require, exports) { }()); exports.d = d; ; + exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js b/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js index 7a8d072b08d20..fb8354c309bb6 100644 --- a/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js +++ b/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js @@ -7,6 +7,7 @@ var d = /** @class */ (function () { }()); exports.d = d; ; +exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js index 24e2e443bfe57..eaaad1d5f7c0e 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js @@ -8,6 +8,7 @@ define(["require", "exports"], function (require, exports) { }()); exports.d = d; ; + exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js b/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js index 7a8d072b08d20..fb8354c309bb6 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js @@ -7,6 +7,7 @@ var d = /** @class */ (function () { }()); exports.d = d; ; +exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js b/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js index 24e2e443bfe57..eaaad1d5f7c0e 100644 --- a/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js +++ b/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js @@ -8,6 +8,7 @@ define(["require", "exports"], function (require, exports) { }()); exports.d = d; ; + exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js b/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js index 7a8d072b08d20..fb8354c309bb6 100644 --- a/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js +++ b/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js @@ -7,6 +7,7 @@ var d = /** @class */ (function () { }()); exports.d = d; ; +exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js index 24e2e443bfe57..eaaad1d5f7c0e 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js @@ -8,6 +8,7 @@ define(["require", "exports"], function (require, exports) { }()); exports.d = d; ; + exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js index 7a8d072b08d20..fb8354c309bb6 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js @@ -7,6 +7,7 @@ var d = /** @class */ (function () { }()); exports.d = d; ; +exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js index 24e2e443bfe57..eaaad1d5f7c0e 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js @@ -8,6 +8,7 @@ define(["require", "exports"], function (require, exports) { }()); exports.d = d; ; + exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js index 7a8d072b08d20..fb8354c309bb6 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js @@ -7,6 +7,7 @@ var d = /** @class */ (function () { }()); exports.d = d; ; +exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js index 24e2e443bfe57..eaaad1d5f7c0e 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js @@ -8,6 +8,7 @@ define(["require", "exports"], function (require, exports) { }()); exports.d = d; ; + exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js index 7a8d072b08d20..fb8354c309bb6 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js @@ -7,6 +7,7 @@ var d = /** @class */ (function () { }()); exports.d = d; ; +exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js b/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js index 24e2e443bfe57..eaaad1d5f7c0e 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js @@ -8,6 +8,7 @@ define(["require", "exports"], function (require, exports) { }()); exports.d = d; ; + exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js b/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js index 7a8d072b08d20..fb8354c309bb6 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js @@ -7,6 +7,7 @@ var d = /** @class */ (function () { }()); exports.d = d; ; +exports.x = void 0; function foo() { return new d(); } diff --git a/tests/baselines/reference/promiseChaining1.errors.txt b/tests/baselines/reference/promiseChaining1.errors.txt index 95f421b36f02b..9ce81ee4d5d34 100644 --- a/tests/baselines/reference/promiseChaining1.errors.txt +++ b/tests/baselines/reference/promiseChaining1.errors.txt @@ -1,7 +1,8 @@ tests/cases/compiler/promiseChaining1.ts(7,55): error TS2322: Type 'string' is not assignable to type 'Function'. +tests/cases/compiler/promiseChaining1.ts(7,84): error TS2322: Type 'number' is not assignable to type 'Function'. -==== tests/cases/compiler/promiseChaining1.ts (1 errors) ==== +==== tests/cases/compiler/promiseChaining1.ts (2 errors) ==== // same example but with constraints on each type parameter class Chain2 { constructor(public value: T) { } @@ -11,6 +12,9 @@ tests/cases/compiler/promiseChaining1.ts(7,55): error TS2322: Type 'string' is n var z = this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then(x => x.length)/*number*/; // Should error on "abc" because it is not a Function ~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Function'. +!!! related TS6502 tests/cases/compiler/promiseChaining1.ts:4:34: The expected type comes from the return type of this signature. + ~~~~~~~~ +!!! error TS2322: Type 'number' is not assignable to type 'Function'. !!! related TS6502 tests/cases/compiler/promiseChaining1.ts:4:34: The expected type comes from the return type of this signature. return new Chain2(result); } diff --git a/tests/baselines/reference/promiseChaining1.symbols b/tests/baselines/reference/promiseChaining1.symbols index 17213839f0a0a..c19ce3afb03c8 100644 --- a/tests/baselines/reference/promiseChaining1.symbols +++ b/tests/baselines/reference/promiseChaining1.symbols @@ -30,6 +30,7 @@ class Chain2 { // should get a fresh type parameter which each then call var z = this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then(x => x.length)/*number*/; // Should error on "abc" because it is not a Function >z : Symbol(z, Decl(promiseChaining1.ts, 6, 11)) +>this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then : Symbol(Chain2.then, Decl(promiseChaining1.ts, 2, 36)) >this.then(x => result)/*S*/.then : Symbol(Chain2.then, Decl(promiseChaining1.ts, 2, 36)) >this.then : Symbol(Chain2.then, Decl(promiseChaining1.ts, 2, 36)) >this : Symbol(Chain2, Decl(promiseChaining1.ts, 0, 0)) @@ -38,8 +39,11 @@ class Chain2 { >result : Symbol(result, Decl(promiseChaining1.ts, 4, 11)) >then : Symbol(Chain2.then, Decl(promiseChaining1.ts, 2, 36)) >x : Symbol(x, Decl(promiseChaining1.ts, 6, 49)) +>then : Symbol(Chain2.then, Decl(promiseChaining1.ts, 2, 36)) >x : Symbol(x, Decl(promiseChaining1.ts, 6, 78)) +>x.length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(promiseChaining1.ts, 6, 78)) +>length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) return new Chain2(result); >Chain2 : Symbol(Chain2, Decl(promiseChaining1.ts, 0, 0)) diff --git a/tests/baselines/reference/promiseChaining1.types b/tests/baselines/reference/promiseChaining1.types index 6ef34ff7e784b..48c16cd64a1dd 100644 --- a/tests/baselines/reference/promiseChaining1.types +++ b/tests/baselines/reference/promiseChaining1.types @@ -22,10 +22,10 @@ class Chain2 { // should get a fresh type parameter which each then call var z = this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then(x => x.length)/*number*/; // Should error on "abc" because it is not a Function ->z : any ->this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then(x => x.length) : any ->this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then : any ->this.then(x => result)/*S*/.then(x => "abc") : any +>z : Chain2 +>this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then(x => x.length) : Chain2 +>this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then : (cb: (x: Function) => S) => Chain2 +>this.then(x => result)/*S*/.then(x => "abc") : Chain2 >this.then(x => result)/*S*/.then : (cb: (x: S) => S) => Chain2 >this.then(x => result) : Chain2 >this.then : (cb: (x: T) => S) => Chain2 @@ -38,12 +38,12 @@ class Chain2 { >x => "abc" : (x: S) => string >x : S >"abc" : "abc" ->then : any ->x => x.length : (x: any) => any ->x : any ->x.length : any ->x : any ->length : any +>then : (cb: (x: Function) => S) => Chain2 +>x => x.length : (x: Function) => number +>x : Function +>x.length : number +>x : Function +>length : number return new Chain2(result); >new Chain2(result) : Chain2 diff --git a/tests/baselines/reference/promiseChaining2.errors.txt b/tests/baselines/reference/promiseChaining2.errors.txt index f7326ec8cbd9d..98dee5cfe9384 100644 --- a/tests/baselines/reference/promiseChaining2.errors.txt +++ b/tests/baselines/reference/promiseChaining2.errors.txt @@ -1,7 +1,8 @@ tests/cases/compiler/promiseChaining2.ts(7,50): error TS2322: Type 'string' is not assignable to type 'Function'. +tests/cases/compiler/promiseChaining2.ts(7,67): error TS2322: Type 'number' is not assignable to type 'Function'. -==== tests/cases/compiler/promiseChaining2.ts (1 errors) ==== +==== tests/cases/compiler/promiseChaining2.ts (2 errors) ==== // same example but with constraints on each type parameter class Chain2 { constructor(public value: T) { } @@ -11,6 +12,9 @@ tests/cases/compiler/promiseChaining2.ts(7,50): error TS2322: Type 'string' is n var z = this.then(x => result).then(x => "abc").then(x => x.length); ~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'Function'. +!!! related TS6502 tests/cases/compiler/promiseChaining2.ts:4:34: The expected type comes from the return type of this signature. + ~~~~~~~~ +!!! error TS2322: Type 'number' is not assignable to type 'Function'. !!! related TS6502 tests/cases/compiler/promiseChaining2.ts:4:34: The expected type comes from the return type of this signature. return new Chain2(result); } diff --git a/tests/baselines/reference/promiseChaining2.symbols b/tests/baselines/reference/promiseChaining2.symbols index ae1f85581e2d2..d63694ad77608 100644 --- a/tests/baselines/reference/promiseChaining2.symbols +++ b/tests/baselines/reference/promiseChaining2.symbols @@ -30,6 +30,7 @@ class Chain2 { // should get a fresh type parameter which each then call var z = this.then(x => result).then(x => "abc").then(x => x.length); >z : Symbol(z, Decl(promiseChaining2.ts, 6, 11)) +>this.then(x => result).then(x => "abc").then : Symbol(Chain2.then, Decl(promiseChaining2.ts, 2, 36)) >this.then(x => result).then : Symbol(Chain2.then, Decl(promiseChaining2.ts, 2, 36)) >this.then : Symbol(Chain2.then, Decl(promiseChaining2.ts, 2, 36)) >this : Symbol(Chain2, Decl(promiseChaining2.ts, 0, 0)) @@ -38,8 +39,11 @@ class Chain2 { >result : Symbol(result, Decl(promiseChaining2.ts, 4, 11)) >then : Symbol(Chain2.then, Decl(promiseChaining2.ts, 2, 36)) >x : Symbol(x, Decl(promiseChaining2.ts, 6, 44)) +>then : Symbol(Chain2.then, Decl(promiseChaining2.ts, 2, 36)) >x : Symbol(x, Decl(promiseChaining2.ts, 6, 61)) +>x.length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(promiseChaining2.ts, 6, 61)) +>length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) return new Chain2(result); >Chain2 : Symbol(Chain2, Decl(promiseChaining2.ts, 0, 0)) diff --git a/tests/baselines/reference/promiseChaining2.types b/tests/baselines/reference/promiseChaining2.types index 7088244ee0146..c980627c5b2e9 100644 --- a/tests/baselines/reference/promiseChaining2.types +++ b/tests/baselines/reference/promiseChaining2.types @@ -22,10 +22,10 @@ class Chain2 { // should get a fresh type parameter which each then call var z = this.then(x => result).then(x => "abc").then(x => x.length); ->z : any ->this.then(x => result).then(x => "abc").then(x => x.length) : any ->this.then(x => result).then(x => "abc").then : any ->this.then(x => result).then(x => "abc") : any +>z : Chain2 +>this.then(x => result).then(x => "abc").then(x => x.length) : Chain2 +>this.then(x => result).then(x => "abc").then : (cb: (x: Function) => S) => Chain2 +>this.then(x => result).then(x => "abc") : Chain2 >this.then(x => result).then : (cb: (x: S) => S) => Chain2 >this.then(x => result) : Chain2 >this.then : (cb: (x: T) => S) => Chain2 @@ -38,12 +38,12 @@ class Chain2 { >x => "abc" : (x: S) => string >x : S >"abc" : "abc" ->then : any ->x => x.length : (x: any) => any ->x : any ->x.length : any ->x : any ->length : any +>then : (cb: (x: Function) => S) => Chain2 +>x => x.length : (x: Function) => number +>x : Function +>x.length : number +>x : Function +>length : number return new Chain2(result); >new Chain2(result) : Chain2 diff --git a/tests/baselines/reference/promisePermutations.types b/tests/baselines/reference/promisePermutations.types index 0dbe5f7ec0eb0..9a4607fb75d61 100644 --- a/tests/baselines/reference/promisePermutations.types +++ b/tests/baselines/reference/promisePermutations.types @@ -458,8 +458,8 @@ var s3c = s3.then(testFunction3P, testFunction3, testFunction3); >testFunction3 : (x: number) => IPromise var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); // error ->s3d : any ->s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3) : any +>s3d : Promise +>s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3) : Promise >s3.then(testFunction3P, testFunction3, testFunction3).then : { , TResult2 = never>(onfulfilled?: (value: IPromise) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: IPromise) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: IPromise) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: IPromise) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: IPromise) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s3.then(testFunction3P, testFunction3, testFunction3) : Promise> >s3.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -485,8 +485,8 @@ var sPromise: (x: any) => Promise; >x : any var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error ->r4a : any ->r4.then(testFunction4, testFunction4, testFunction4) : any +>r4a : IPromise +>r4.then(testFunction4, testFunction4, testFunction4) : IPromise >r4.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r4 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -514,8 +514,8 @@ var s4: Promise; >s4 : Promise var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error ->s4a : any ->s4.then(testFunction4, testFunction4, testFunction4) : any +>s4a : Promise +>s4.then(testFunction4, testFunction4, testFunction4) : Promise >s4.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s4 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -524,8 +524,8 @@ var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error >testFunction4 : (x: number, y?: string) => IPromise var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error ->s4b : any ->s4.then(testFunction4P, testFunction4P, testFunction4P) : any +>s4b : Promise +>s4.then(testFunction4P, testFunction4P, testFunction4P) : Promise >s4.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s4 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -534,8 +534,8 @@ var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error >testFunction4P : (x: number, y?: string) => Promise var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error ->s4c : any ->s4.then(testFunction4P, testFunction4, testFunction4) : any +>s4c : Promise +>s4.then(testFunction4P, testFunction4, testFunction4) : Promise >s4.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s4 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -563,8 +563,8 @@ var r5: IPromise; >r5 : IPromise var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error ->r5a : any ->r5.then(testFunction5, testFunction5, testFunction5) : any +>r5a : IPromise +>r5.then(testFunction5, testFunction5, testFunction5) : IPromise >r5.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r5 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -592,8 +592,8 @@ var s5: Promise; >s5 : Promise var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error ->s5a : any ->s5.then(testFunction5, testFunction5, testFunction5) : any +>s5a : Promise +>s5.then(testFunction5, testFunction5, testFunction5) : Promise >s5.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s5 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -602,8 +602,8 @@ var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error >testFunction5 : (x: number, cb: (a: string) => string) => IPromise var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error ->s5b : any ->s5.then(testFunction5P, testFunction5P, testFunction5P) : any +>s5b : Promise +>s5.then(testFunction5P, testFunction5P, testFunction5P) : Promise >s5.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s5 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -612,8 +612,8 @@ var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error >testFunction5P : (x: number, cb: (a: string) => string) => Promise var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error ->s5c : any ->s5.then(testFunction5P, testFunction5, testFunction5) : any +>s5c : Promise +>s5.then(testFunction5P, testFunction5, testFunction5) : Promise >s5.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s5 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -641,8 +641,8 @@ var r6: IPromise; >r6 : IPromise var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error ->r6a : any ->r6.then(testFunction6, testFunction6, testFunction6) : any +>r6a : IPromise +>r6.then(testFunction6, testFunction6, testFunction6) : IPromise >r6.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r6 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -670,8 +670,8 @@ var s6: Promise; >s6 : Promise var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error ->s6a : any ->s6.then(testFunction6, testFunction6, testFunction6) : any +>s6a : Promise +>s6.then(testFunction6, testFunction6, testFunction6) : Promise >s6.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s6 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -680,8 +680,8 @@ var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error >testFunction6 : (x: number, cb: (a: T) => T) => IPromise var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error ->s6b : any ->s6.then(testFunction6P, testFunction6P, testFunction6P) : any +>s6b : Promise +>s6.then(testFunction6P, testFunction6P, testFunction6P) : Promise >s6.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s6 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -690,8 +690,8 @@ var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error >testFunction6P : (x: number, cb: (a: T) => T) => Promise var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error ->s6c : any ->s6.then(testFunction6P, testFunction6, testFunction6) : any +>s6c : Promise +>s6.then(testFunction6P, testFunction6, testFunction6) : Promise >s6.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s6 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -719,8 +719,8 @@ var r7: IPromise; >r7 : IPromise var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error ->r7a : any ->r7.then(testFunction7, testFunction7, testFunction7) : any +>r7a : IPromise +>r7.then(testFunction7, testFunction7, testFunction7) : IPromise >r7.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r7 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -748,8 +748,8 @@ var s7: Promise; >s7 : Promise var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error ->s7a : any ->r7.then(testFunction7, testFunction7, testFunction7) : any +>s7a : IPromise +>r7.then(testFunction7, testFunction7, testFunction7) : IPromise >r7.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r7 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -758,8 +758,8 @@ var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error >testFunction7 : (cb: (a: T) => T) => IPromise var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error ->s7b : any ->r7.then(testFunction7P, testFunction7P, testFunction7P) : any +>s7b : IPromise +>r7.then(testFunction7P, testFunction7P, testFunction7P) : IPromise >r7.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r7 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -768,8 +768,8 @@ var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error >testFunction7P : (cb: (a: T) => T) => Promise var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error ->s7c : any ->r7.then(testFunction7P, testFunction7, testFunction7) : any +>s7c : IPromise +>r7.then(testFunction7P, testFunction7, testFunction7) : IPromise >r7.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r7 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -805,8 +805,8 @@ var nPromise: (x: any) => Promise; >x : any var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error ->r8a : any ->r8.then(testFunction8, testFunction8, testFunction8) : any +>r8a : IPromise +>r8.then(testFunction8, testFunction8, testFunction8) : IPromise >r8.then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r8 : IPromise >then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -834,8 +834,8 @@ var s8: Promise; >s8 : Promise var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error ->s8a : any ->s8.then(testFunction8, testFunction8, testFunction8) : any +>s8a : Promise +>s8.then(testFunction8, testFunction8, testFunction8) : Promise >s8.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s8 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -844,8 +844,8 @@ var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error >testFunction8 : (x: T, cb: (a: T) => T) => IPromise var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error ->s8b : any ->s8.then(testFunction8P, testFunction8P, testFunction8P) : any +>s8b : Promise +>s8.then(testFunction8P, testFunction8P, testFunction8P) : Promise >s8.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s8 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -854,8 +854,8 @@ var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error >testFunction8P : (x: T, cb: (a: T) => T) => Promise var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error ->s8c : any ->s8.then(testFunction8P, testFunction8, testFunction8) : any +>s8c : Promise +>s8.then(testFunction8P, testFunction8, testFunction8) : Promise >s8.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s8 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -883,8 +883,8 @@ var r9: IPromise; >r9 : IPromise var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error ->r9a : any ->r9.then(testFunction9, testFunction9, testFunction9) : any +>r9a : IPromise +>r9.then(testFunction9, testFunction9, testFunction9) : IPromise >r9.then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r9 : IPromise >then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -913,8 +913,8 @@ var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok >nIPromise : (x: any) => IPromise var r9d = r9.then(testFunction, sIPromise, nIPromise); // ok ->r9d : any ->r9.then(testFunction, sIPromise, nIPromise) : any +>r9d : IPromise +>r9.then(testFunction, sIPromise, nIPromise) : IPromise >r9.then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r9 : IPromise >then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -942,8 +942,8 @@ var s9: Promise; >s9 : Promise var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error ->s9a : any ->s9.then(testFunction9, testFunction9, testFunction9) : any +>s9a : Promise +>s9.then(testFunction9, testFunction9, testFunction9) : Promise >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -952,8 +952,8 @@ var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error >testFunction9 : (x: T, cb: (a: U) => U) => IPromise var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error ->s9b : any ->s9.then(testFunction9P, testFunction9P, testFunction9P) : any +>s9b : Promise +>s9.then(testFunction9P, testFunction9P, testFunction9P) : Promise >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -962,8 +962,8 @@ var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error >testFunction9P : (x: T, cb: (a: U) => U) => Promise var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error ->s9c : any ->s9.then(testFunction9P, testFunction9, testFunction9) : any +>s9c : Promise +>s9.then(testFunction9P, testFunction9, testFunction9) : Promise >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -992,8 +992,8 @@ var s9e = s9.then(nPromise, nPromise, nPromise); // ok >nPromise : (x: any) => Promise var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ->s9f : any ->s9.then(testFunction, sIPromise, nIPromise) : any +>s9f : Promise +>s9.then(testFunction, sIPromise, nIPromise) : Promise >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1056,8 +1056,8 @@ var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok >nIPromise : (x: any) => IPromise var r10d = r10.then(testFunction, sIPromise, nIPromise); // ok ->r10d : any ->r10.then(testFunction, sIPromise, nIPromise) : any +>r10d : IPromise +>r10.then(testFunction, sIPromise, nIPromise) : IPromise >r10.then : { (success?: (value: unknown) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r10 : IPromise >then : { (success?: (value: unknown) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -1140,8 +1140,8 @@ var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok >nIPromise : (x: any) => IPromise var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ->s10f : any ->s10.then(testFunctionP, sIPromise, nIPromise) : any +>s10f : Promise +>s10.then(testFunctionP, sIPromise, nIPromise) : Promise >s10.then : { (onfulfilled?: (value: unknown) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: unknown) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s10 : Promise >then : { (onfulfilled?: (value: unknown) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: unknown) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1169,8 +1169,8 @@ var r11: IPromise; >r11 : IPromise var r11a = r11.then(testFunction11, testFunction11, testFunction11); // error ->r11a : any ->r11.then(testFunction11, testFunction11, testFunction11) : any +>r11a : IPromise +>r11.then(testFunction11, testFunction11, testFunction11) : IPromise >r11.then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r11 : IPromise >then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -1182,8 +1182,8 @@ var s11: Promise; >s11 : Promise var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ->s11a : any ->s11.then(testFunction11, testFunction11, testFunction11) : any +>s11a : Promise +>s11.then(testFunction11, testFunction11, testFunction11) : Promise >s11.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s11 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1192,8 +1192,8 @@ var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok >testFunction11 : { (x: number): IPromise; (x: string): IPromise; } var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error ->s11b : any ->s11.then(testFunction11P, testFunction11P, testFunction11P) : any +>s11b : Promise +>s11.then(testFunction11P, testFunction11P, testFunction11P) : Promise >s11.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s11 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1202,8 +1202,8 @@ var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error >testFunction11P : { (x: number): Promise; (x: string): Promise; } var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error ->s11c : any ->s11.then(testFunction11P, testFunction11, testFunction11) : any +>s11c : Promise +>s11.then(testFunction11P, testFunction11, testFunction11) : Promise >s11.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s11 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } diff --git a/tests/baselines/reference/promisePermutations2.types b/tests/baselines/reference/promisePermutations2.types index 957b548a284b8..49a704375bac0 100644 --- a/tests/baselines/reference/promisePermutations2.types +++ b/tests/baselines/reference/promisePermutations2.types @@ -433,8 +433,8 @@ var s3c = s3.then(testFunction3P, testFunction3, testFunction3); >testFunction3 : (x: number) => IPromise var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); // Should error ->s3d : any ->s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3) : any +>s3d : Promise> +>s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3) : Promise> >s3.then(testFunction3P, testFunction3, testFunction3).then : { , TResult2 = never>(onfulfilled?: (value: IPromise) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: IPromise) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s3.then(testFunction3P, testFunction3, testFunction3) : Promise> >s3.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -460,8 +460,8 @@ var sPromise: (x: any) => Promise; >x : any var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error ->r4a : any ->r4.then(testFunction4, testFunction4, testFunction4) : any +>r4a : IPromise +>r4.then(testFunction4, testFunction4, testFunction4) : IPromise >r4.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r4 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -489,8 +489,8 @@ var s4: Promise; >s4 : Promise var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error ->s4a : any ->s4.then(testFunction4, testFunction4, testFunction4) : any +>s4a : Promise> +>s4.then(testFunction4, testFunction4, testFunction4) : Promise> >s4.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s4 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -499,8 +499,8 @@ var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error >testFunction4 : (x: number, y?: string) => IPromise var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error ->s4b : any ->s4.then(testFunction4P, testFunction4P, testFunction4P) : any +>s4b : Promise> +>s4.then(testFunction4P, testFunction4P, testFunction4P) : Promise> >s4.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s4 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -509,8 +509,8 @@ var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error >testFunction4P : (x: number, y?: string) => Promise var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error ->s4c : any ->s4.then(testFunction4P, testFunction4, testFunction4) : any +>s4c : Promise> +>s4.then(testFunction4P, testFunction4, testFunction4) : Promise> >s4.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s4 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -538,8 +538,8 @@ var r5: IPromise; >r5 : IPromise var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error ->r5a : any ->r5.then(testFunction5, testFunction5, testFunction5) : any +>r5a : IPromise +>r5.then(testFunction5, testFunction5, testFunction5) : IPromise >r5.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r5 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -567,8 +567,8 @@ var s5: Promise; >s5 : Promise var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error ->s5a : any ->s5.then(testFunction5, testFunction5, testFunction5) : any +>s5a : Promise> +>s5.then(testFunction5, testFunction5, testFunction5) : Promise> >s5.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s5 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -577,8 +577,8 @@ var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error >testFunction5 : (x: number, cb: (a: string) => string) => IPromise var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error ->s5b : any ->s5.then(testFunction5P, testFunction5P, testFunction5P) : any +>s5b : Promise> +>s5.then(testFunction5P, testFunction5P, testFunction5P) : Promise> >s5.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s5 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -587,8 +587,8 @@ var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error >testFunction5P : (x: number, cb: (a: string) => string) => Promise var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error ->s5c : any ->s5.then(testFunction5P, testFunction5, testFunction5) : any +>s5c : Promise> +>s5.then(testFunction5P, testFunction5, testFunction5) : Promise> >s5.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s5 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -616,8 +616,8 @@ var r6: IPromise; >r6 : IPromise var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error ->r6a : any ->r6.then(testFunction6, testFunction6, testFunction6) : any +>r6a : IPromise +>r6.then(testFunction6, testFunction6, testFunction6) : IPromise >r6.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r6 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -645,8 +645,8 @@ var s6: Promise; >s6 : Promise var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error ->s6a : any ->s6.then(testFunction6, testFunction6, testFunction6) : any +>s6a : Promise> +>s6.then(testFunction6, testFunction6, testFunction6) : Promise> >s6.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s6 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -655,8 +655,8 @@ var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error >testFunction6 : (x: number, cb: (a: T) => T) => IPromise var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error ->s6b : any ->s6.then(testFunction6P, testFunction6P, testFunction6P) : any +>s6b : Promise> +>s6.then(testFunction6P, testFunction6P, testFunction6P) : Promise> >s6.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s6 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -665,8 +665,8 @@ var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error >testFunction6P : (x: number, cb: (a: T) => T) => Promise var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error ->s6c : any ->s6.then(testFunction6P, testFunction6, testFunction6) : any +>s6c : Promise> +>s6.then(testFunction6P, testFunction6, testFunction6) : Promise> >s6.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s6 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -694,8 +694,8 @@ var r7: IPromise; >r7 : IPromise var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error ->r7a : any ->r7.then(testFunction7, testFunction7, testFunction7) : any +>r7a : IPromise +>r7.then(testFunction7, testFunction7, testFunction7) : IPromise >r7.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r7 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -723,8 +723,8 @@ var s7: Promise; >s7 : Promise var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error ->s7a : any ->r7.then(testFunction7, testFunction7, testFunction7) : any +>s7a : IPromise +>r7.then(testFunction7, testFunction7, testFunction7) : IPromise >r7.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r7 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -733,8 +733,8 @@ var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error >testFunction7 : (cb: (a: T) => T) => IPromise var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error ->s7b : any ->r7.then(testFunction7P, testFunction7P, testFunction7P) : any +>s7b : IPromise +>r7.then(testFunction7P, testFunction7P, testFunction7P) : IPromise >r7.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r7 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -743,8 +743,8 @@ var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error >testFunction7P : (cb: (a: T) => T) => Promise var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error ->s7c : any ->r7.then(testFunction7P, testFunction7, testFunction7) : any +>s7c : IPromise +>r7.then(testFunction7P, testFunction7, testFunction7) : IPromise >r7.then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r7 : IPromise >then : { (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -780,8 +780,8 @@ var nPromise: (x: any) => Promise; >x : any var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error ->r8a : any ->r8.then(testFunction8, testFunction8, testFunction8) : any +>r8a : IPromise +>r8.then(testFunction8, testFunction8, testFunction8) : IPromise >r8.then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r8 : IPromise >then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -809,8 +809,8 @@ var s8: Promise; >s8 : Promise var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error ->s8a : any ->s8.then(testFunction8, testFunction8, testFunction8) : any +>s8a : Promise +>s8.then(testFunction8, testFunction8, testFunction8) : Promise >s8.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s8 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -819,8 +819,8 @@ var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error >testFunction8 : (x: T, cb: (a: T) => T) => IPromise var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error ->s8b : any ->s8.then(testFunction8P, testFunction8P, testFunction8P) : any +>s8b : Promise +>s8.then(testFunction8P, testFunction8P, testFunction8P) : Promise >s8.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s8 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -829,8 +829,8 @@ var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error >testFunction8P : (x: T, cb: (a: T) => T) => Promise var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error ->s8c : any ->s8.then(testFunction8P, testFunction8, testFunction8) : any +>s8c : Promise +>s8.then(testFunction8P, testFunction8, testFunction8) : Promise >s8.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s8 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -858,8 +858,8 @@ var r9: IPromise; >r9 : IPromise var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error ->r9a : any ->r9.then(testFunction9, testFunction9, testFunction9) : any +>r9a : IPromise +>r9.then(testFunction9, testFunction9, testFunction9) : IPromise >r9.then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r9 : IPromise >then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -888,8 +888,8 @@ var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok >nIPromise : (x: any) => IPromise var r9d = r9.then(testFunction, sIPromise, nIPromise); // error ->r9d : any ->r9.then(testFunction, sIPromise, nIPromise) : any +>r9d : IPromise +>r9.then(testFunction, sIPromise, nIPromise) : IPromise >r9.then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r9 : IPromise >then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -917,8 +917,8 @@ var s9: Promise; >s9 : Promise var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error ->s9a : any ->s9.then(testFunction9, testFunction9, testFunction9) : any +>s9a : Promise +>s9.then(testFunction9, testFunction9, testFunction9) : Promise >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -927,8 +927,8 @@ var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error >testFunction9 : (x: T, cb: (a: U) => U) => IPromise var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error ->s9b : any ->s9.then(testFunction9P, testFunction9P, testFunction9P) : any +>s9b : Promise +>s9.then(testFunction9P, testFunction9P, testFunction9P) : Promise >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -937,8 +937,8 @@ var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error >testFunction9P : (x: T, cb: (a: U) => U) => Promise var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error ->s9c : any ->s9.then(testFunction9P, testFunction9, testFunction9) : any +>s9c : Promise +>s9.then(testFunction9P, testFunction9, testFunction9) : Promise >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -967,8 +967,8 @@ var s9e = s9.then(nPromise, nPromise, nPromise); // ok >nPromise : (x: any) => Promise var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ->s9f : any ->s9.then(testFunction, sIPromise, nIPromise) : any +>s9f : Promise> +>s9.then(testFunction, sIPromise, nIPromise) : Promise> >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1031,8 +1031,8 @@ var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok >nIPromise : (x: any) => IPromise var r10d = r10.then(testFunction, sIPromise, nIPromise); // error ->r10d : any ->r10.then(testFunction, sIPromise, nIPromise) : any +>r10d : IPromise +>r10.then(testFunction, sIPromise, nIPromise) : IPromise >r10.then : { (success?: (value: unknown) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r10 : IPromise >then : { (success?: (value: unknown) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -1115,8 +1115,8 @@ var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok >nIPromise : (x: any) => IPromise var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ->s10f : any ->s10.then(testFunctionP, sIPromise, nIPromise) : any +>s10f : Promise> +>s10.then(testFunctionP, sIPromise, nIPromise) : Promise> >s10.then : { (onfulfilled?: (value: unknown) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s10 : Promise >then : { (onfulfilled?: (value: unknown) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1144,8 +1144,8 @@ var r11: IPromise; >r11 : IPromise var r11a = r11.then(testFunction11, testFunction11, testFunction11); // error ->r11a : any ->r11.then(testFunction11, testFunction11, testFunction11) : any +>r11a : IPromise +>r11.then(testFunction11, testFunction11, testFunction11) : IPromise >r11.then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >r11 : IPromise >then : { (success?: (value: number) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } @@ -1157,8 +1157,8 @@ var s11: Promise; >s11 : Promise var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ->s11a : any ->s11.then(testFunction11, testFunction11, testFunction11) : any +>s11a : Promise> +>s11.then(testFunction11, testFunction11, testFunction11) : Promise> >s11.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s11 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1167,8 +1167,8 @@ var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok >testFunction11 : { (x: number): IPromise; (x: string): IPromise; } var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // ok ->s11b : any ->s11.then(testFunction11P, testFunction11P, testFunction11P) : any +>s11b : Promise> +>s11.then(testFunction11P, testFunction11P, testFunction11P) : Promise> >s11.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s11 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1177,8 +1177,8 @@ var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // ok >testFunction11P : { (x: number): Promise; (x: string): Promise; } var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // ok ->s11c : any ->s11.then(testFunction11P, testFunction11, testFunction11) : any +>s11c : Promise> +>s11.then(testFunction11P, testFunction11, testFunction11) : Promise> >s11.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s11 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } diff --git a/tests/baselines/reference/promisePermutations3.types b/tests/baselines/reference/promisePermutations3.types index a643b89b23ba9..9ce0662c27a19 100644 --- a/tests/baselines/reference/promisePermutations3.types +++ b/tests/baselines/reference/promisePermutations3.types @@ -384,8 +384,8 @@ var r3a = r3.then(testFunction3, testFunction3, testFunction3); >testFunction3 : (x: number) => IPromise var r3b = r3.then(testFunction3, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); ->r3b : any ->r3.then(testFunction3, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3) : any +>r3b : IPromise> +>r3.then(testFunction3, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3) : IPromise> >r3.then(testFunction3, testFunction3, testFunction3).then : (success?: (value: IPromise) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r3.then(testFunction3, testFunction3, testFunction3) : IPromise> >r3.then : (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -433,8 +433,8 @@ var s3c = s3.then(testFunction3P, testFunction3, testFunction3); >testFunction3 : (x: number) => IPromise var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); ->s3d : any ->s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3) : any +>s3d : Promise +>s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3) : Promise >s3.then(testFunction3P, testFunction3, testFunction3).then : { , TResult2 = never>(onfulfilled?: (value: IPromise) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: IPromise) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: IPromise) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: IPromise) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: IPromise) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s3.then(testFunction3P, testFunction3, testFunction3) : Promise> >s3.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -460,8 +460,8 @@ var sPromise: (x: any) => Promise; >x : any var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error ->r4a : any ->r4.then(testFunction4, testFunction4, testFunction4) : any +>r4a : IPromise> +>r4.then(testFunction4, testFunction4, testFunction4) : IPromise> >r4.then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r4 : IPromise >then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -489,8 +489,8 @@ var s4: Promise; >s4 : Promise var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error ->s4a : any ->s4.then(testFunction4, testFunction4, testFunction4) : any +>s4a : Promise +>s4.then(testFunction4, testFunction4, testFunction4) : Promise >s4.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s4 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -499,8 +499,8 @@ var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error >testFunction4 : (x: number, y?: string) => IPromise var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error ->s4b : any ->s4.then(testFunction4P, testFunction4P, testFunction4P) : any +>s4b : Promise +>s4.then(testFunction4P, testFunction4P, testFunction4P) : Promise >s4.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s4 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -509,8 +509,8 @@ var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error >testFunction4P : (x: number, y?: string) => Promise var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error ->s4c : any ->s4.then(testFunction4P, testFunction4, testFunction4) : any +>s4c : Promise +>s4.then(testFunction4P, testFunction4, testFunction4) : Promise >s4.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s4 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -538,8 +538,8 @@ var r5: IPromise; >r5 : IPromise var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error ->r5a : any ->r5.then(testFunction5, testFunction5, testFunction5) : any +>r5a : IPromise> +>r5.then(testFunction5, testFunction5, testFunction5) : IPromise> >r5.then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r5 : IPromise >then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -567,8 +567,8 @@ var s5: Promise; >s5 : Promise var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error ->s5a : any ->s5.then(testFunction5, testFunction5, testFunction5) : any +>s5a : Promise +>s5.then(testFunction5, testFunction5, testFunction5) : Promise >s5.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s5 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -577,8 +577,8 @@ var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error >testFunction5 : (x: number, cb: (a: string) => string) => IPromise var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error ->s5b : any ->s5.then(testFunction5P, testFunction5P, testFunction5P) : any +>s5b : Promise +>s5.then(testFunction5P, testFunction5P, testFunction5P) : Promise >s5.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s5 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -587,8 +587,8 @@ var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error >testFunction5P : (x: number, cb: (a: string) => string) => Promise var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error ->s5c : any ->s5.then(testFunction5P, testFunction5, testFunction5) : any +>s5c : Promise +>s5.then(testFunction5P, testFunction5, testFunction5) : Promise >s5.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s5 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -616,8 +616,8 @@ var r6: IPromise; >r6 : IPromise var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error ->r6a : any ->r6.then(testFunction6, testFunction6, testFunction6) : any +>r6a : IPromise> +>r6.then(testFunction6, testFunction6, testFunction6) : IPromise> >r6.then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r6 : IPromise >then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -645,8 +645,8 @@ var s6: Promise; >s6 : Promise var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error ->s6a : any ->s6.then(testFunction6, testFunction6, testFunction6) : any +>s6a : Promise +>s6.then(testFunction6, testFunction6, testFunction6) : Promise >s6.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s6 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -655,8 +655,8 @@ var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error >testFunction6 : (x: number, cb: (a: T) => T) => IPromise var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error ->s6b : any ->s6.then(testFunction6P, testFunction6P, testFunction6P) : any +>s6b : Promise +>s6.then(testFunction6P, testFunction6P, testFunction6P) : Promise >s6.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s6 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -665,8 +665,8 @@ var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error >testFunction6P : (x: number, cb: (a: T) => T) => Promise var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error ->s6c : any ->s6.then(testFunction6P, testFunction6, testFunction6) : any +>s6c : Promise +>s6.then(testFunction6P, testFunction6, testFunction6) : Promise >s6.then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s6 : Promise >then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -694,8 +694,8 @@ var r7: IPromise; >r7 : IPromise var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error ->r7a : any ->r7.then(testFunction7, testFunction7, testFunction7) : any +>r7a : IPromise> +>r7.then(testFunction7, testFunction7, testFunction7) : IPromise> >r7.then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r7 : IPromise >then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -723,8 +723,8 @@ var s7: Promise; >s7 : Promise var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error ->s7a : any ->r7.then(testFunction7, testFunction7, testFunction7) : any +>s7a : IPromise> +>r7.then(testFunction7, testFunction7, testFunction7) : IPromise> >r7.then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r7 : IPromise >then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -733,8 +733,8 @@ var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error >testFunction7 : (cb: (a: T) => T) => IPromise var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error ->s7b : any ->r7.then(testFunction7P, testFunction7P, testFunction7P) : any +>s7b : IPromise> +>r7.then(testFunction7P, testFunction7P, testFunction7P) : IPromise> >r7.then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r7 : IPromise >then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -743,8 +743,8 @@ var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error >testFunction7P : (cb: (a: T) => T) => Promise var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error ->s7c : any ->r7.then(testFunction7P, testFunction7, testFunction7) : any +>s7c : IPromise> +>r7.then(testFunction7P, testFunction7, testFunction7) : IPromise> >r7.then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r7 : IPromise >then : (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -780,8 +780,8 @@ var nPromise: (x: any) => Promise; >x : any var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error ->r8a : any ->r8.then(testFunction8, testFunction8, testFunction8) : any +>r8a : IPromise +>r8.then(testFunction8, testFunction8, testFunction8) : IPromise >r8.then : (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r8 : IPromise >then : (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -809,8 +809,8 @@ var s8: Promise; >s8 : Promise var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error ->s8a : any ->s8.then(testFunction8, testFunction8, testFunction8) : any +>s8a : Promise +>s8.then(testFunction8, testFunction8, testFunction8) : Promise >s8.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s8 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -819,8 +819,8 @@ var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error >testFunction8 : (x: T, cb: (a: T) => T) => IPromise var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error ->s8b : any ->s8.then(testFunction8P, testFunction8P, testFunction8P) : any +>s8b : Promise +>s8.then(testFunction8P, testFunction8P, testFunction8P) : Promise >s8.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s8 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -829,8 +829,8 @@ var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error >testFunction8P : (x: T, cb: (a: T) => T) => Promise var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error ->s8c : any ->s8.then(testFunction8P, testFunction8, testFunction8) : any +>s8c : Promise +>s8.then(testFunction8P, testFunction8, testFunction8) : Promise >s8.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s8 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -858,8 +858,8 @@ var r9: IPromise; >r9 : IPromise var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error ->r9a : any ->r9.then(testFunction9, testFunction9, testFunction9) : any +>r9a : IPromise +>r9.then(testFunction9, testFunction9, testFunction9) : IPromise >r9.then : (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r9 : IPromise >then : (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -888,8 +888,8 @@ var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok >nIPromise : (x: any) => IPromise var r9d = r9.then(testFunction, sIPromise, nIPromise); // error ->r9d : any ->r9.then(testFunction, sIPromise, nIPromise) : any +>r9d : IPromise> +>r9.then(testFunction, sIPromise, nIPromise) : IPromise> >r9.then : (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r9 : IPromise >then : (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -917,8 +917,8 @@ var s9: Promise; >s9 : Promise var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error ->s9a : any ->s9.then(testFunction9, testFunction9, testFunction9) : any +>s9a : Promise +>s9.then(testFunction9, testFunction9, testFunction9) : Promise >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -927,8 +927,8 @@ var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error >testFunction9 : (x: T, cb: (a: U) => U) => IPromise var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error ->s9b : any ->s9.then(testFunction9P, testFunction9P, testFunction9P) : any +>s9b : Promise +>s9.then(testFunction9P, testFunction9P, testFunction9P) : Promise >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -937,8 +937,8 @@ var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error >testFunction9P : (x: T, cb: (a: U) => U) => Promise var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error ->s9c : any ->s9.then(testFunction9P, testFunction9, testFunction9) : any +>s9c : Promise +>s9.then(testFunction9P, testFunction9, testFunction9) : Promise >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -967,8 +967,8 @@ var s9e = s9.then(nPromise, nPromise, nPromise); // ok >nPromise : (x: any) => Promise var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ->s9f : any ->s9.then(testFunction, sIPromise, nIPromise) : any +>s9f : Promise +>s9.then(testFunction, sIPromise, nIPromise) : Promise >s9.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s9 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1031,8 +1031,8 @@ var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok >nIPromise : (x: any) => IPromise var r10d = r10.then(testFunction, sIPromise, nIPromise); // error ->r10d : any ->r10.then(testFunction, sIPromise, nIPromise) : any +>r10d : IPromise> +>r10.then(testFunction, sIPromise, nIPromise) : IPromise> >r10.then : (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r10 : IPromise >then : (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -1115,8 +1115,8 @@ var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok >nIPromise : (x: any) => IPromise var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ->s10f : any ->s10.then(testFunctionP, sIPromise, nIPromise) : any +>s10f : Promise +>s10.then(testFunctionP, sIPromise, nIPromise) : Promise >s10.then : { (onfulfilled?: (value: unknown) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: unknown) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s10 : Promise >then : { (onfulfilled?: (value: unknown) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: unknown) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1144,8 +1144,8 @@ var r11: IPromise; >r11 : IPromise var r11a = r11.then(testFunction11, testFunction11, testFunction11); // ok ->r11a : any ->r11.then(testFunction11, testFunction11, testFunction11) : any +>r11a : IPromise> +>r11.then(testFunction11, testFunction11, testFunction11) : IPromise> >r11.then : (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >r11 : IPromise >then : (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise @@ -1157,8 +1157,8 @@ var s11: Promise; >s11 : Promise var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ->s11a : any ->s11.then(testFunction11, testFunction11, testFunction11) : any +>s11a : Promise +>s11.then(testFunction11, testFunction11, testFunction11) : Promise >s11.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s11 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1167,8 +1167,8 @@ var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok >testFunction11 : { (x: number): IPromise; (x: string): IPromise; } var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error ->s11b : any ->s11.then(testFunction11P, testFunction11P, testFunction11P) : any +>s11b : Promise +>s11.then(testFunction11P, testFunction11P, testFunction11P) : Promise >s11.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s11 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1177,8 +1177,8 @@ var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error >testFunction11P : { (x: number): Promise; (x: string): Promise; } var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error ->s11c : any ->s11.then(testFunction11P, testFunction11, testFunction11) : any +>s11c : Promise +>s11.then(testFunction11P, testFunction11, testFunction11) : Promise >s11.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } >s11 : Promise >then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; } @@ -1223,8 +1223,8 @@ var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok >testFunction12 : { (x: T): IPromise; (x: T, y: T): IPromise; } var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok ->s12b : any ->s12.then(testFunction12P, testFunction12P, testFunction12P) : any +>s12b : IPromise> +>s12.then(testFunction12P, testFunction12P, testFunction12P) : IPromise> >s12.then : (success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise >s12 : IPromise<(x: any) => any> >then : (success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise diff --git a/tests/baselines/reference/promiseTypeInference.types b/tests/baselines/reference/promiseTypeInference.types index 36b3bdadd28ce..72c7001f52554 100644 --- a/tests/baselines/reference/promiseTypeInference.types +++ b/tests/baselines/reference/promiseTypeInference.types @@ -22,8 +22,8 @@ declare function convert(s: string): IPromise; >s : string var $$x = load("something").then(s => convert(s)); ->$$x : any ->load("something").then(s => convert(s)) : any +>$$x : Promise +>load("something").then(s => convert(s)) : Promise >load("something").then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise): Promise; } >load("something") : Promise >load : (name: string) => Promise diff --git a/tests/baselines/reference/properties.js b/tests/baselines/reference/properties.js index 27688f5837578..cebb56ef2f37d 100644 --- a/tests/baselines/reference/properties.js +++ b/tests/baselines/reference/properties.js @@ -23,7 +23,7 @@ var MyClass = /** @class */ (function () { set: function (value) { // }, - enumerable: true, + enumerable: false, configurable: true }); return MyClass; diff --git a/tests/baselines/reference/properties.sourcemap.txt b/tests/baselines/reference/properties.sourcemap.txt index dcb2822b46b41..8fc35e4500a44 100644 --- a/tests/baselines/reference/properties.sourcemap.txt +++ b/tests/baselines/reference/properties.sourcemap.txt @@ -109,14 +109,14 @@ sourceFile:properties.ts >>> }, 1 >^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^-> 1 > > 2 > } 1 >Emitted(10, 9) Source(11, 5) + SourceIndex(0) 2 >Emitted(10, 10) Source(11, 6) + SourceIndex(0) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1->^^^^^^^ diff --git a/tests/baselines/reference/propertyAndAccessorWithSameName.js b/tests/baselines/reference/propertyAndAccessorWithSameName.js index 14c08ed2d6571..1d599e500fd29 100644 --- a/tests/baselines/reference/propertyAndAccessorWithSameName.js +++ b/tests/baselines/reference/propertyAndAccessorWithSameName.js @@ -27,7 +27,7 @@ var C = /** @class */ (function () { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -38,7 +38,7 @@ var D = /** @class */ (function () { Object.defineProperty(D.prototype, "x", { set: function (v) { } // error , - enumerable: true, + enumerable: false, configurable: true }); return D; @@ -51,7 +51,7 @@ var E = /** @class */ (function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return E; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js index cd663ccc009f3..580e7f74997f9 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js @@ -39,14 +39,14 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { return this.foo; }; Object.defineProperty(C, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.foo = function () { return this.foo; }; @@ -67,7 +67,7 @@ var C2 = /** @class */ (function () { var _this = this; (function () { _this.y = _this.x; }); }, - enumerable: true, + enumerable: false, configurable: true }); C2.prototype.foo = function () { @@ -84,7 +84,7 @@ var C2 = /** @class */ (function () { var _this = this; (function () { _this.y = _this.x; }); }, - enumerable: true, + enumerable: false, configurable: true }); C2.foo = function () { diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedClass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedClass.js index aa3fc8961856f..8fac2fa795c65 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedClass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedClass.js @@ -45,14 +45,14 @@ var C = /** @class */ (function () { Object.defineProperty(C.prototype, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { return this.foo; }; Object.defineProperty(C, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.foo = function () { return this.foo; }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index 78ebbbd00fba0..9cc42fa96f125 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -64,14 +64,14 @@ var C = /** @class */ (function (_super) { Object.defineProperty(C.prototype, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { return this.x; }; Object.defineProperty(C, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.foo = function () { return this.x; }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index 5809d01266dc8..18e6100afe1ab 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -47,7 +47,7 @@ var C = /** @class */ (function (_super) { Object.defineProperty(C.prototype, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { return this.x; }; @@ -55,7 +55,7 @@ var C = /** @class */ (function (_super) { Object.defineProperty(C, "y", { get: function () { return this.x; }, set: function (x) { this.y = this.x; }, - enumerable: true, + enumerable: false, configurable: true }); C.foo = function () { return this.x; }; diff --git a/tests/baselines/reference/protoAsIndexInIndexExpression.js b/tests/baselines/reference/protoAsIndexInIndexExpression.js index d0d2eb52f7804..502033c42bb52 100644 --- a/tests/baselines/reference/protoAsIndexInIndexExpression.js +++ b/tests/baselines/reference/protoAsIndexInIndexExpression.js @@ -22,6 +22,7 @@ class C { //// [protoAsIndexInIndexExpression_0.js] "use strict"; exports.__esModule = true; +exports.x = void 0; //// [protoAsIndexInIndexExpression_1.js] /// var EntityPrototype = undefined; diff --git a/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline b/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline index 45f6128c2b117..c9bb71314dee3 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline @@ -2,13 +2,13 @@ { "marker": { "fileName": "/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts", - "position": 9 + "position": 33 }, "quickInfo": { "kind": "function", "kindModifiers": "", "textSpan": { - "start": 9, + "start": 33, "length": 3 }, "displayParts": [ @@ -153,19 +153,25 @@ "kind": "keyword" } ], - "documentation": [] + "documentation": [], + "tags": [ + { + "name": "return", + "text": "*crunch*" + } + ] } }, { "marker": { "fileName": "/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts", - "position": 13 + "position": 37 }, "quickInfo": { "kind": "parameter", "kindModifiers": "", "textSpan": { - "start": 13, + "start": 37, "length": 5 }, "displayParts": [ @@ -208,13 +214,13 @@ { "marker": { "fileName": "/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts", - "position": 28 + "position": 52 }, "quickInfo": { "kind": "parameter", "kindModifiers": "", "textSpan": { - "start": 28, + "start": 52, "length": 13 }, "displayParts": [ @@ -257,13 +263,13 @@ { "marker": { "fileName": "/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts", - "position": 52 + "position": 76 }, "quickInfo": { "kind": "parameter", "kindModifiers": "", "textSpan": { - "start": 52, + "start": 76, "length": 20 }, "displayParts": [ @@ -306,13 +312,13 @@ { "marker": { "fileName": "/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts", - "position": 87 + "position": 111 }, "quickInfo": { "kind": "parameter", "kindModifiers": "", "textSpan": { - "start": 87, + "start": 111, "length": 9 }, "displayParts": [ @@ -363,13 +369,13 @@ { "marker": { "fileName": "/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts", - "position": 114 + "position": 138 }, "quickInfo": { "kind": "parameter", "kindModifiers": "", "textSpan": { - "start": 114, + "start": 138, "length": 5 }, "displayParts": [ @@ -412,13 +418,13 @@ { "marker": { "fileName": "/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts", - "position": 135 + "position": 159 }, "quickInfo": { "kind": "parameter", "kindModifiers": "", "textSpan": { - "start": 135, + "start": 159, "length": 13 }, "displayParts": [ @@ -461,13 +467,13 @@ { "marker": { "fileName": "/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts", - "position": 164 + "position": 188 }, "quickInfo": { "kind": "parameter", "kindModifiers": "", "textSpan": { - "start": 164, + "start": 188, "length": 20 }, "displayParts": [ @@ -510,13 +516,13 @@ { "marker": { "fileName": "/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts", - "position": 200 + "position": 224 }, "quickInfo": { "kind": "parameter", "kindModifiers": "", "textSpan": { - "start": 200, + "start": 224, "length": 9 }, "displayParts": [ diff --git a/tests/baselines/reference/quotedAccessorName1.js b/tests/baselines/reference/quotedAccessorName1.js index 2a55f13e0de24..c5f0c34c935f5 100644 --- a/tests/baselines/reference/quotedAccessorName1.js +++ b/tests/baselines/reference/quotedAccessorName1.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "foo", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/quotedAccessorName2.js b/tests/baselines/reference/quotedAccessorName2.js index c8f9a6024d811..64816e11cd7f4 100644 --- a/tests/baselines/reference/quotedAccessorName2.js +++ b/tests/baselines/reference/quotedAccessorName2.js @@ -9,7 +9,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C, "foo", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/readonlyInDeclarationFile.js b/tests/baselines/reference/readonlyInDeclarationFile.js index 7419e27c013b5..e401d300aee2a 100644 --- a/tests/baselines/reference/readonlyInDeclarationFile.js +++ b/tests/baselines/reference/readonlyInDeclarationFile.js @@ -59,68 +59,68 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "b1", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "b2", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "b3", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "c1", { get: function () { return 1; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "c2", { get: function () { return 1; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "c3", { get: function () { return 1; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "t1", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "t2", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "t3", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "u1", { get: function () { return 1; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "u2", { get: function () { return 1; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "u3", { get: function () { return 1; }, set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/readonlyInNonPropertyParameters.js b/tests/baselines/reference/readonlyInNonPropertyParameters.js index d4cffa3281e7e..fb45e3d4fa20e 100644 --- a/tests/baselines/reference/readonlyInNonPropertyParameters.js +++ b/tests/baselines/reference/readonlyInNonPropertyParameters.js @@ -16,7 +16,7 @@ var X = /** @class */ (function () { X.prototype.method = function (x) { }; Object.defineProperty(X.prototype, "x", { set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); return X; diff --git a/tests/baselines/reference/readonlyMembers.js b/tests/baselines/reference/readonlyMembers.js index 07345379e6f80..ceb0f3b18e236 100644 --- a/tests/baselines/reference/readonlyMembers.js +++ b/tests/baselines/reference/readonlyMembers.js @@ -84,7 +84,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "c", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { diff --git a/tests/baselines/reference/recursiveClassReferenceTest.types b/tests/baselines/reference/recursiveClassReferenceTest.types index 6b617a0a2f59a..bd79dc181f3a3 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.types +++ b/tests/baselines/reference/recursiveClassReferenceTest.types @@ -192,7 +192,7 @@ module Sample.Thing.Languages.PlainText { >getInitialState : () => IState return new State(self); ->new State(self) : any +>new State(self) : State >State : typeof State >self : Window } diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js index 151c719e0bd11..2beadbb593313 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js @@ -30,4 +30,5 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.b = void 0; // This should result in type ClassB }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js index 3ef3cc597f5fe..b64dca267e9ee 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js @@ -34,4 +34,5 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.b = void 0; // This should result in type ClassB }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js index 53ad4b5346468..a74c6c04ba061 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js @@ -38,4 +38,5 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.b = void 0; // This should result in type ClassB }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js index 2ab16bea5ba88..bf4e487253a77 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js @@ -32,4 +32,5 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.b = void 0; // This should result in type ClassB }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js index 2fd8490563264..376ed58b5884a 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js @@ -41,4 +41,5 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.b = void 0; // This should result in type ClassB }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js index 6d5cc60f5e4fd..6c28ccc9cb4b6 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js @@ -50,4 +50,5 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.b = void 0; // This should result in type ClassB }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js index c4bc8804f60e5..36dd00cc36f75 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js @@ -52,4 +52,5 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; + exports.b = void 0; // This should result in type ClassB }); diff --git a/tests/baselines/reference/recursiveFunctionTypes.types b/tests/baselines/reference/recursiveFunctionTypes.types index 72ba77b48f6f9..09a9116391328 100644 --- a/tests/baselines/reference/recursiveFunctionTypes.types +++ b/tests/baselines/reference/recursiveFunctionTypes.types @@ -88,13 +88,13 @@ function f6(a?: any) { return f6; } >f6 : { (): typeof f6; (a: typeof f6): () => number; } f6("", 3); // error (arity mismatch) ->f6("", 3) : any +>f6("", 3) : { (): typeof f6; (a: typeof f6): () => number; } & (() => number) >f6 : { (): typeof f6; (a: typeof f6): () => number; } >"" : "" >3 : 3 f6(""); // ok (function takes an any param) ->f6("") : any +>f6("") : { (): typeof f6; (a: typeof f6): () => number; } & (() => number) >f6 : { (): typeof f6; (a: typeof f6): () => number; } >"" : "" @@ -122,13 +122,13 @@ declare function f7(a?: typeof f7): typeof f7; >f7 : { (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; } f7("", 3); // error (arity mismatch) ->f7("", 3) : any +>f7("", 3) : { (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; } & (() => number) & number >f7 : { (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; } >"" : "" >3 : 3 f7(""); // ok (function takes an any param) ->f7("") : any +>f7("") : { (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; } & (() => number) & number >f7 : { (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; } >"" : "" diff --git a/tests/baselines/reference/recursiveGetterAccess.js b/tests/baselines/reference/recursiveGetterAccess.js index 2563e0323547a..567e210621602 100644 --- a/tests/baselines/reference/recursiveGetterAccess.js +++ b/tests/baselines/reference/recursiveGetterAccess.js @@ -11,7 +11,7 @@ var MyClass = /** @class */ (function () { } Object.defineProperty(MyClass.prototype, "testProp", { get: function () { return this.testProp; }, - enumerable: true, + enumerable: false, configurable: true }); return MyClass; diff --git a/tests/baselines/reference/recursiveProperties.js b/tests/baselines/reference/recursiveProperties.js index 45ba1c169d848..5920b667b76cb 100644 --- a/tests/baselines/reference/recursiveProperties.js +++ b/tests/baselines/reference/recursiveProperties.js @@ -13,7 +13,7 @@ var A = /** @class */ (function () { } Object.defineProperty(A.prototype, "testProp", { get: function () { return this.testProp; }, - enumerable: true, + enumerable: false, configurable: true }); return A; @@ -23,7 +23,7 @@ var B = /** @class */ (function () { } Object.defineProperty(B.prototype, "testProp", { set: function (value) { this.testProp = value; }, - enumerable: true, + enumerable: false, configurable: true }); return B; diff --git a/tests/baselines/reference/recursiveSpecializationOfSignatures.js b/tests/baselines/reference/recursiveSpecializationOfSignatures.js index cc425af5891ac..76048a32f1766 100644 --- a/tests/baselines/reference/recursiveSpecializationOfSignatures.js +++ b/tests/baselines/reference/recursiveSpecializationOfSignatures.js @@ -14,7 +14,7 @@ var S0 = /** @class */ (function () { Object.defineProperty(S0.prototype, "S1", { set: function (S2) { }, - enumerable: true, + enumerable: false, configurable: true }); return S0; diff --git a/tests/baselines/reference/recursiveTypeReferences1.types b/tests/baselines/reference/recursiveTypeReferences1.types index f402c9f7ef651..14f4180b6dd93 100644 --- a/tests/baselines/reference/recursiveTypeReferences1.types +++ b/tests/baselines/reference/recursiveTypeReferences1.types @@ -248,7 +248,7 @@ flat([1, [2, 'a']]); // (string | number)[] >'a' : "a" flat([1, ['a']]); // Error ->flat([1, ['a']]) : any +>flat([1, ['a']]) : string[] >flat : (a: RecArray) => T[] >[1, ['a']] : (number | string[])[] >1 : 1 @@ -292,7 +292,7 @@ flat1([1, [2, 'a']]); // (string | number)[] >'a' : "a" flat1([1, ['a']]); // Error ->flat1([1, ['a']]) : any +>flat1([1, ['a']]) : string[] >flat1 : (a: (T | T[])[]) => T[] >[1, ['a']] : (number | string[])[] >1 : 1 @@ -336,7 +336,7 @@ flat2([1, [2, 'a']]); // (string | number)[] >'a' : "a" flat2([1, ['a']]); // Error ->flat2([1, ['a']]) : any +>flat2([1, ['a']]) : string[] >flat2 : (a: (T | (T | T[])[])[]) => T[] >[1, ['a']] : (number | string[])[] >1 : 1 diff --git a/tests/baselines/reference/recursiveTypeRelations.types b/tests/baselines/reference/recursiveTypeRelations.types index 669ab3879c4fc..df02f2668f492 100644 --- a/tests/baselines/reference/recursiveTypeRelations.types +++ b/tests/baselines/reference/recursiveTypeRelations.types @@ -35,12 +35,12 @@ export function css(styles: S, ...classNam >classNames : ClassNameArg[] const args = classNames.map(arg => { ->args : any[] ->classNames.map(arg => { if (arg == null) { return null; } if (typeof arg == "string") { return styles[arg]; } if (typeof arg == "object") { return Object.keys(arg).reduce((obj: ClassNameObject, key: keyof S) => { const exportedClassName = styles[key]; obj[exportedClassName] = (arg as ClassNameMap)[key]; return obj; }, {}); } }) : any[] +>args : string[] +>classNames.map(arg => { if (arg == null) { return null; } if (typeof arg == "string") { return styles[arg]; } if (typeof arg == "object") { return Object.keys(arg).reduce((obj: ClassNameObject, key: keyof S) => { const exportedClassName = styles[key]; obj[exportedClassName] = (arg as ClassNameMap)[key]; return obj; }, {}); } }) : string[] >classNames.map : (callbackfn: (value: ClassNameArg, index: number, array: ClassNameArg[]) => U, thisArg?: any) => U[] >classNames : ClassNameArg[] >map : (callbackfn: (value: ClassNameArg, index: number, array: ClassNameArg[]) => U, thisArg?: any) => U[] ->arg => { if (arg == null) { return null; } if (typeof arg == "string") { return styles[arg]; } if (typeof arg == "object") { return Object.keys(arg).reduce((obj: ClassNameObject, key: keyof S) => { const exportedClassName = styles[key]; obj[exportedClassName] = (arg as ClassNameMap)[key]; return obj; }, {}); } } : (arg: ClassNameArg) => any +>arg => { if (arg == null) { return null; } if (typeof arg == "string") { return styles[arg]; } if (typeof arg == "object") { return Object.keys(arg).reduce((obj: ClassNameObject, key: keyof S) => { const exportedClassName = styles[key]; obj[exportedClassName] = (arg as ClassNameMap)[key]; return obj; }, {}); } } : (arg: ClassNameArg) => string >arg : ClassNameArg if (arg == null) { @@ -69,7 +69,7 @@ export function css(styles: S, ...classNam >"object" : "object" 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((obj: ClassNameObject, key: keyof S) => { const exportedClassName = styles[key]; obj[exportedClassName] = (arg as ClassNameMap)[key]; return obj; }, {}) : string >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: object) => string[] diff --git a/tests/baselines/reference/reexportMissingDefault.js b/tests/baselines/reference/reexportMissingDefault.js index 7f2136946be5c..d674bbf084faa 100644 --- a/tests/baselines/reference/reexportMissingDefault.js +++ b/tests/baselines/reference/reexportMissingDefault.js @@ -13,8 +13,15 @@ exports.__esModule = true; exports.b = null; //// [a.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var b_1 = require("./b"); -exports.b = b_1.b; +__createBinding(exports, b_1, "b"); var b_2 = require("./b"); -exports["default"] = b_2["default"]; +__createBinding(exports, b_2, "default"); diff --git a/tests/baselines/reference/reexportMissingDefault1.js b/tests/baselines/reference/reexportMissingDefault1.js index 9bde4148f0780..fa13ec2426319 100644 --- a/tests/baselines/reference/reexportMissingDefault1.js +++ b/tests/baselines/reference/reexportMissingDefault1.js @@ -14,8 +14,15 @@ exports.__esModule = true; exports.b = null; //// [a.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var b_1 = require("./b"); -exports.b = b_1.b; +__createBinding(exports, b_1, "b"); var b_2 = require("./b"); -exports["default"] = b_2["default"]; +__createBinding(exports, b_2, "default"); diff --git a/tests/baselines/reference/reexportMissingDefault2.js b/tests/baselines/reference/reexportMissingDefault2.js index bdc362e39a3b5..953f4e21fcbbe 100644 --- a/tests/baselines/reference/reexportMissingDefault2.js +++ b/tests/baselines/reference/reexportMissingDefault2.js @@ -13,8 +13,15 @@ exports.__esModule = true; exports.b = null; //// [a.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var b_1 = require("./b"); -exports.b = b_1.b; +__createBinding(exports, b_1, "b"); var b_2 = require("./b"); -exports["default"] = b_2["default"]; +__createBinding(exports, b_2, "default"); diff --git a/tests/baselines/reference/reexportMissingDefault3.js b/tests/baselines/reference/reexportMissingDefault3.js index 546dabf24191b..3d52ff41a6b92 100644 --- a/tests/baselines/reference/reexportMissingDefault3.js +++ b/tests/baselines/reference/reexportMissingDefault3.js @@ -13,8 +13,15 @@ exports.__esModule = true; exports.b = null; //// [a.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var b_1 = require("./b"); -exports.b = b_1.b; +__createBinding(exports, b_1, "b"); var b_2 = require("./b"); -exports.a = b_2["default"]; +__createBinding(exports, b_2, "default", "a"); diff --git a/tests/baselines/reference/reexportMissingDefault4.js b/tests/baselines/reference/reexportMissingDefault4.js index d0c83b804d0f7..c69377d374104 100644 --- a/tests/baselines/reference/reexportMissingDefault4.js +++ b/tests/baselines/reference/reexportMissingDefault4.js @@ -10,8 +10,15 @@ export { default } from "./b"; //// [a.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var b_1 = require("./b"); -exports.b = b_1.b; +__createBinding(exports, b_1, "b"); var b_2 = require("./b"); -exports["default"] = b_2["default"]; +__createBinding(exports, b_2, "default"); diff --git a/tests/baselines/reference/reexportMissingDefault6.js b/tests/baselines/reference/reexportMissingDefault6.js index 44a5ae7766b00..b49e29ec995f0 100644 --- a/tests/baselines/reference/reexportMissingDefault6.js +++ b/tests/baselines/reference/reexportMissingDefault6.js @@ -13,8 +13,15 @@ exports.__esModule = true; exports.b = null; //// [a.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var b_1 = require("./b"); -exports.b = b_1.b; +__createBinding(exports, b_1, "b"); var b_2 = require("./b"); -exports["default"] = b_2["default"]; +__createBinding(exports, b_2, "default"); diff --git a/tests/baselines/reference/reexportMissingDefault8.js b/tests/baselines/reference/reexportMissingDefault8.js index 95d2c04c01867..55703f24b30cb 100644 --- a/tests/baselines/reference/reexportMissingDefault8.js +++ b/tests/baselines/reference/reexportMissingDefault8.js @@ -13,6 +13,13 @@ var b = null; module.exports = b; //// [a.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var b_1 = require("./b"); -exports["default"] = b_1["default"]; +__createBinding(exports, b_1, "default"); diff --git a/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.js b/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.js index ae3ce21ff4924..1e4bc7126c8ca 100644 --- a/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.js +++ b/tests/baselines/reference/reexportWrittenCorrectlyInDeclaration.js @@ -39,11 +39,18 @@ var ThingB = /** @class */ (function () { exports.ThingB = ThingB; //// [Things.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var ThingA_1 = require("./ThingA"); -exports.ThingA = ThingA_1.ThingA; +__createBinding(exports, ThingA_1, "ThingA"); var ThingB_1 = require("./ThingB"); -exports.ThingB = ThingB_1.ThingB; +__createBinding(exports, ThingB_1, "ThingB"); //// [Test.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/renameExportCrash.baseline b/tests/baselines/reference/renameExportCrash.baseline new file mode 100644 index 0000000000000..6760dfe1a8ff0 --- /dev/null +++ b/tests/baselines/reference/renameExportCrash.baseline @@ -0,0 +1,5 @@ +/*====== /tests/cases/fourslash/Foo.js ======*/ + +let RENAME; +module.exports = [|RENAME|]; +exports["foo"] = RENAME; diff --git a/tests/baselines/reference/renameExportSpecifier.baseline b/tests/baselines/reference/renameExportSpecifier.baseline new file mode 100644 index 0000000000000..f0a3a28f3c94a --- /dev/null +++ b/tests/baselines/reference/renameExportSpecifier.baseline @@ -0,0 +1,9 @@ +/*====== /tests/cases/fourslash/a.ts ======*/ + +const name = {}; +export { name as [|RENAME|] }; + +/*====== /tests/cases/fourslash/b.ts ======*/ + +import { RENAME } from './a'; +const x = RENAME.toString(); diff --git a/tests/baselines/reference/renameExportSpecifier2.baseline b/tests/baselines/reference/renameExportSpecifier2.baseline new file mode 100644 index 0000000000000..9f20320696f35 --- /dev/null +++ b/tests/baselines/reference/renameExportSpecifier2.baseline @@ -0,0 +1,9 @@ +/*====== /tests/cases/fourslash/a.ts ======*/ + +const RENAME = {}; +export { [|RENAME|] }; + +/*====== /tests/cases/fourslash/b.ts ======*/ + +import { RENAME } from './a'; +const x = RENAME.toString(); diff --git a/tests/baselines/reference/renameJSDocNamepath.baseline b/tests/baselines/reference/renameJSDocNamepath.baseline new file mode 100644 index 0000000000000..2902827a9d598 --- /dev/null +++ b/tests/baselines/reference/renameJSDocNamepath.baseline @@ -0,0 +1,7 @@ +/*====== /tests/cases/fourslash/renameJSDocNamepath.ts ======*/ + +/** + * @type {module:foo/A} x + */ +var x = 1 +var [|RENAME|] = 0; diff --git a/tests/baselines/reference/restElementMustBeLast.types b/tests/baselines/reference/restElementMustBeLast.types index 68276c7ef3d29..50b7fa5b4f1ea 100644 --- a/tests/baselines/reference/restElementMustBeLast.types +++ b/tests/baselines/reference/restElementMustBeLast.types @@ -8,12 +8,12 @@ var [...a, x] = [1, 2, 3]; // Error, rest must be last element >3 : 3 [...a, x] = [1, 2, 3]; // Error, rest must be last element ->[...a, x] = [1, 2, 3] : number[] ->[...a, x] : number[] +>[...a, x] = [1, 2, 3] : [number, number, number] +>[...a, x] : [number, number, number, number] >...a : number >a : [number, number, number] >x : number ->[1, 2, 3] : number[] +>[1, 2, 3] : [number, number, number] >1 : 1 >2 : 2 >3 : 3 diff --git a/tests/baselines/reference/restElementWithAssignmentPattern1.errors.txt b/tests/baselines/reference/restElementWithAssignmentPattern1.errors.txt deleted file mode 100644 index 2e1046c9317f5..0000000000000 --- a/tests/baselines/reference/restElementWithAssignmentPattern1.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -tests/cases/conformance/es6/destructuring/restElementWithAssignmentPattern1.ts(2,6): error TS2322: Type 'string | number' is not assignable to type 'string'. - Type 'number' is not assignable to type 'string'. -tests/cases/conformance/es6/destructuring/restElementWithAssignmentPattern1.ts(2,9): error TS2322: Type 'string | number' is not assignable to type 'number'. - Type 'string' is not assignable to type 'number'. - - -==== tests/cases/conformance/es6/destructuring/restElementWithAssignmentPattern1.ts (2 errors) ==== - var a: string, b: number; - [...[a, b = 0]] = ["", 1]; - ~ -!!! error TS2322: Type 'string | number' is not assignable to type 'string'. -!!! error TS2322: Type 'number' is not assignable to type 'string'. - ~ -!!! error TS2322: Type 'string | number' is not assignable to type 'number'. -!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/restElementWithAssignmentPattern1.types b/tests/baselines/reference/restElementWithAssignmentPattern1.types index 3740fc66343d0..c78541b88d07f 100644 --- a/tests/baselines/reference/restElementWithAssignmentPattern1.types +++ b/tests/baselines/reference/restElementWithAssignmentPattern1.types @@ -4,15 +4,15 @@ var a: string, b: number; >b : number [...[a, b = 0]] = ["", 1]; ->[...[a, b = 0]] = ["", 1] : (string | number)[] ->[...[a, b = 0]] : (string | number)[] +>[...[a, b = 0]] = ["", 1] : [string, number] +>[...[a, b = 0]] : [string, number] >...[a, b = 0] : string | number >[a, b = 0] : [string, number] >a : string >b = 0 : 0 >b : number >0 : 0 ->["", 1] : (string | number)[] +>["", 1] : [string, number] >"" : "" >1 : 1 diff --git a/tests/baselines/reference/restElementWithAssignmentPattern3.types b/tests/baselines/reference/restElementWithAssignmentPattern3.types index c2e01bc441455..dc5a378b440a2 100644 --- a/tests/baselines/reference/restElementWithAssignmentPattern3.types +++ b/tests/baselines/reference/restElementWithAssignmentPattern3.types @@ -11,7 +11,7 @@ var tuple: [string, number] = ["", 1]; [...[a, b = 0]] = tuple; >[...[a, b = 0]] = tuple : [string, number] ->[...[a, b = 0]] : (string | number)[] +>[...[a, b = 0]] : [string, number] >...[a, b = 0] : string | number >[a, b = 0] : [string, number] >a : string diff --git a/tests/baselines/reference/restElementWithAssignmentPattern5.types b/tests/baselines/reference/restElementWithAssignmentPattern5.types index 298bc2e4363f6..ea3cc010dcc9c 100644 --- a/tests/baselines/reference/restElementWithAssignmentPattern5.types +++ b/tests/baselines/reference/restElementWithAssignmentPattern5.types @@ -4,13 +4,13 @@ var s: string, s2: string; >s2 : string [...[s, s2]] = ["", ""]; ->[...[s, s2]] = ["", ""] : string[] ->[...[s, s2]] : string[] +>[...[s, s2]] = ["", ""] : [string, string] +>[...[s, s2]] : [string, string] >...[s, s2] : string >[s, s2] : [string, string] >s : string >s2 : string ->["", ""] : string[] +>["", ""] : [string, string] >"" : "" >"" : "" diff --git a/tests/baselines/reference/restTupleElements1.types b/tests/baselines/reference/restTupleElements1.types index 88c98395f21c3..bc2bc2511a608 100644 --- a/tests/baselines/reference/restTupleElements1.types +++ b/tests/baselines/reference/restTupleElements1.types @@ -57,11 +57,11 @@ assign<[...number[]], number[]>(); >assign : () => void assign<[number, ...number[]], number[]>(); // Error ->assign<[number, ...number[]], number[]>() : any +>assign<[number, ...number[]], number[]>() : void >assign : () => void assign<[number, ...number[]], []>(); // Error ->assign<[number, ...number[]], []>() : any +>assign<[number, ...number[]], []>() : void >assign : () => void assign<[number, ...number[]], [number]>(); @@ -77,27 +77,27 @@ assign<[number, ...number[]], [number, number, ...number[]]>(); >assign : () => void assign<[number], [...number[]]>(); // Error ->assign<[number], [...number[]]>() : any +>assign<[number], [...number[]]>() : void >assign : () => void assign<[number], [number, ...number[]]>(); // Error ->assign<[number], [number, ...number[]]>() : any +>assign<[number], [number, ...number[]]>() : void >assign : () => void assign<[number, ...number[]], [number, ...string[]]>(); // Error ->assign<[number, ...number[]], [number, ...string[]]>() : any +>assign<[number, ...number[]], [number, ...string[]]>() : void >assign : () => void assign<[number, ...number[]], [string, ...number[]]>(); // Error ->assign<[number, ...number[]], [string, ...number[]]>() : any +>assign<[number, ...number[]], [string, ...number[]]>() : void >assign : () => void assign<[number, ...number[]], [number, number, string]>(); // Error ->assign<[number, ...number[]], [number, number, string]>() : any +>assign<[number, ...number[]], [number, number, string]>() : void >assign : () => void assign<[number, ...number[]], [number, number, number, string]>(); // Error ->assign<[number, ...number[]], [number, number, number, string]>() : any +>assign<[number, ...number[]], [number, number, number, string]>() : void >assign : () => void type T20 = [number, string, ...boolean[]]; @@ -168,9 +168,9 @@ declare function f0(x: [T, ...U[]]): [T, U]; >x : [T, ...U[]] f0([]); // Error ->f0([]) : any +>f0([]) : [unknown, unknown] >f0 : (x: [T, ...U[]]) => [T, U] ->[] : never[] +>[] : [] f0([1]); >f0([1]) : [number, number] diff --git a/tests/baselines/reference/returnValueInSetter.js b/tests/baselines/reference/returnValueInSetter.js index 2fe980308b599..61ada5bcf980b 100644 --- a/tests/baselines/reference/returnValueInSetter.js +++ b/tests/baselines/reference/returnValueInSetter.js @@ -15,7 +15,7 @@ var f = /** @class */ (function () { set: function (value) { return null; // Should be an error }, - enumerable: true, + enumerable: false, configurable: true }); return f; diff --git a/tests/baselines/reference/setterBeforeGetter.js b/tests/baselines/reference/setterBeforeGetter.js index 743ad9da03977..1d406be2f102b 100644 --- a/tests/baselines/reference/setterBeforeGetter.js +++ b/tests/baselines/reference/setterBeforeGetter.js @@ -24,7 +24,7 @@ var Foo = /** @class */ (function () { set: function (thing) { this._bar = thing; }, - enumerable: true, + enumerable: false, configurable: true }); return Foo; diff --git a/tests/baselines/reference/setterWithReturn.js b/tests/baselines/reference/setterWithReturn.js index d4b6b92e85892..ae9f7ff6fecd7 100644 --- a/tests/baselines/reference/setterWithReturn.js +++ b/tests/baselines/reference/setterWithReturn.js @@ -23,7 +23,7 @@ var C234 = /** @class */ (function () { return 0; } }, - enumerable: true, + enumerable: false, configurable: true }); return C234; diff --git a/tests/baselines/reference/sourceMapValidationClass.js b/tests/baselines/reference/sourceMapValidationClass.js index 803a266311422..fe5a714acdc40 100644 --- a/tests/baselines/reference/sourceMapValidationClass.js +++ b/tests/baselines/reference/sourceMapValidationClass.js @@ -41,7 +41,7 @@ var Greeter = /** @class */ (function () { set: function (greetings) { this.greeting = greetings; }, - enumerable: true, + enumerable: false, configurable: true }); return Greeter; diff --git a/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt index be1665313a183..00e9a0da75dde 100644 --- a/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt @@ -304,14 +304,14 @@ sourceFile:sourceMapValidationClass.ts >>> }, 1 >^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^-> 1 > > 2 > } 1 >Emitted(22, 9) Source(17, 5) + SourceIndex(0) 2 >Emitted(22, 10) Source(17, 6) + SourceIndex(0) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1->^^^^^^^ diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js b/tests/baselines/reference/sourceMapValidationDecorators.js index cc7129a7f4dae..86a843f7f82c3 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js +++ b/tests/baselines/reference/sourceMapValidationDecorators.js @@ -85,7 +85,7 @@ var Greeter = /** @class */ (function () { set: function (greetings) { this.greeting = greetings; }, - enumerable: true, + enumerable: false, configurable: true }); Greeter.x1 = 10; diff --git a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt index 257fbcd7831b0..de57be0e9fa38 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt @@ -336,14 +336,14 @@ sourceFile:sourceMapValidationDecorators.ts >>> }, 1 >^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^-> 1 > > 2 > } 1 >Emitted(30, 9) Source(53, 5) + SourceIndex(0) 2 >Emitted(30, 10) Source(53, 6) + SourceIndex(0) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1->^^^^^^^ diff --git a/tests/baselines/reference/spellingSuggestionLeadingUnderscores01.js b/tests/baselines/reference/spellingSuggestionLeadingUnderscores01.js index 6a84749b1539d..1abb0b71ea1ff 100644 --- a/tests/baselines/reference/spellingSuggestionLeadingUnderscores01.js +++ b/tests/baselines/reference/spellingSuggestionLeadingUnderscores01.js @@ -21,6 +21,8 @@ b = { "use strict"; exports.__esModule = true; exports.a.___foo; +// @filename def.ts +exports.b = void 0; exports.b = { ___foo: 100 }; diff --git a/tests/baselines/reference/spliceTuples.errors.txt b/tests/baselines/reference/spliceTuples.errors.txt new file mode 100644 index 0000000000000..879f0659b3f94 --- /dev/null +++ b/tests/baselines/reference/spliceTuples.errors.txt @@ -0,0 +1,30 @@ +tests/cases/compiler/spliceTuples.ts(23,1): error TS2741: Property '3' is missing in type '[number, string, boolean, ...boolean[]]' but required in type '[number, string, boolean, boolean, ...boolean[]]'. + + +==== tests/cases/compiler/spliceTuples.ts (1 errors) ==== + declare const sb: [string, boolean]; + + let k1: [number, string, boolean]; + k1 = [1, ...sb]; + + let k2: [number, string, boolean, number]; + k2 = [1, ...sb, 1]; + + declare const sb_: [string, ...boolean[]]; + + let k3: [number, string, ...boolean[]]; + k3 = [1, ...sb_]; + + declare const sbb_: [string, boolean, ...boolean[]]; + + let k4: [number, string, ...boolean[]]; + k4 = [1, ...sbb_]; + + let k5: [number, string, boolean, ...boolean[]]; + k5 = [1, ...sbb_]; + + let k6: [number, string, boolean, boolean, ...boolean[]]; + k6 = [1, ...sbb_]; + ~~ +!!! error TS2741: Property '3' is missing in type '[number, string, boolean, ...boolean[]]' but required in type '[number, string, boolean, boolean, ...boolean[]]'. + \ No newline at end of file diff --git a/tests/baselines/reference/spliceTuples.js b/tests/baselines/reference/spliceTuples.js new file mode 100644 index 0000000000000..93deb0f614db9 --- /dev/null +++ b/tests/baselines/reference/spliceTuples.js @@ -0,0 +1,46 @@ +//// [spliceTuples.ts] +declare const sb: [string, boolean]; + +let k1: [number, string, boolean]; +k1 = [1, ...sb]; + +let k2: [number, string, boolean, number]; +k2 = [1, ...sb, 1]; + +declare const sb_: [string, ...boolean[]]; + +let k3: [number, string, ...boolean[]]; +k3 = [1, ...sb_]; + +declare const sbb_: [string, boolean, ...boolean[]]; + +let k4: [number, string, ...boolean[]]; +k4 = [1, ...sbb_]; + +let k5: [number, string, boolean, ...boolean[]]; +k5 = [1, ...sbb_]; + +let k6: [number, string, boolean, boolean, ...boolean[]]; +k6 = [1, ...sbb_]; + + +//// [spliceTuples.js] +var __spreadArrays = (this && this.__spreadArrays) || function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; +var k1; +k1 = __spreadArrays([1], sb); +var k2; +k2 = __spreadArrays([1], sb, [1]); +var k3; +k3 = __spreadArrays([1], sb_); +var k4; +k4 = __spreadArrays([1], sbb_); +var k5; +k5 = __spreadArrays([1], sbb_); +var k6; +k6 = __spreadArrays([1], sbb_); diff --git a/tests/baselines/reference/spliceTuples.symbols b/tests/baselines/reference/spliceTuples.symbols new file mode 100644 index 0000000000000..f2df37e7c2e15 --- /dev/null +++ b/tests/baselines/reference/spliceTuples.symbols @@ -0,0 +1,52 @@ +=== tests/cases/compiler/spliceTuples.ts === +declare const sb: [string, boolean]; +>sb : Symbol(sb, Decl(spliceTuples.ts, 0, 13)) + +let k1: [number, string, boolean]; +>k1 : Symbol(k1, Decl(spliceTuples.ts, 2, 3)) + +k1 = [1, ...sb]; +>k1 : Symbol(k1, Decl(spliceTuples.ts, 2, 3)) +>sb : Symbol(sb, Decl(spliceTuples.ts, 0, 13)) + +let k2: [number, string, boolean, number]; +>k2 : Symbol(k2, Decl(spliceTuples.ts, 5, 3)) + +k2 = [1, ...sb, 1]; +>k2 : Symbol(k2, Decl(spliceTuples.ts, 5, 3)) +>sb : Symbol(sb, Decl(spliceTuples.ts, 0, 13)) + +declare const sb_: [string, ...boolean[]]; +>sb_ : Symbol(sb_, Decl(spliceTuples.ts, 8, 13)) + +let k3: [number, string, ...boolean[]]; +>k3 : Symbol(k3, Decl(spliceTuples.ts, 10, 3)) + +k3 = [1, ...sb_]; +>k3 : Symbol(k3, Decl(spliceTuples.ts, 10, 3)) +>sb_ : Symbol(sb_, Decl(spliceTuples.ts, 8, 13)) + +declare const sbb_: [string, boolean, ...boolean[]]; +>sbb_ : Symbol(sbb_, Decl(spliceTuples.ts, 13, 13)) + +let k4: [number, string, ...boolean[]]; +>k4 : Symbol(k4, Decl(spliceTuples.ts, 15, 3)) + +k4 = [1, ...sbb_]; +>k4 : Symbol(k4, Decl(spliceTuples.ts, 15, 3)) +>sbb_ : Symbol(sbb_, Decl(spliceTuples.ts, 13, 13)) + +let k5: [number, string, boolean, ...boolean[]]; +>k5 : Symbol(k5, Decl(spliceTuples.ts, 18, 3)) + +k5 = [1, ...sbb_]; +>k5 : Symbol(k5, Decl(spliceTuples.ts, 18, 3)) +>sbb_ : Symbol(sbb_, Decl(spliceTuples.ts, 13, 13)) + +let k6: [number, string, boolean, boolean, ...boolean[]]; +>k6 : Symbol(k6, Decl(spliceTuples.ts, 21, 3)) + +k6 = [1, ...sbb_]; +>k6 : Symbol(k6, Decl(spliceTuples.ts, 21, 3)) +>sbb_ : Symbol(sbb_, Decl(spliceTuples.ts, 13, 13)) + diff --git a/tests/baselines/reference/spliceTuples.types b/tests/baselines/reference/spliceTuples.types new file mode 100644 index 0000000000000..fa9342f774f0d --- /dev/null +++ b/tests/baselines/reference/spliceTuples.types @@ -0,0 +1,77 @@ +=== tests/cases/compiler/spliceTuples.ts === +declare const sb: [string, boolean]; +>sb : [string, boolean] + +let k1: [number, string, boolean]; +>k1 : [number, string, boolean] + +k1 = [1, ...sb]; +>k1 = [1, ...sb] : [number, string, boolean] +>k1 : [number, string, boolean] +>[1, ...sb] : [number, string, boolean] +>1 : 1 +>...sb : string | boolean +>sb : [string, boolean] + +let k2: [number, string, boolean, number]; +>k2 : [number, string, boolean, number] + +k2 = [1, ...sb, 1]; +>k2 = [1, ...sb, 1] : [number, string, boolean, number] +>k2 : [number, string, boolean, number] +>[1, ...sb, 1] : [number, string, boolean, number] +>1 : 1 +>...sb : string | boolean +>sb : [string, boolean] +>1 : 1 + +declare const sb_: [string, ...boolean[]]; +>sb_ : [string, ...boolean[]] + +let k3: [number, string, ...boolean[]]; +>k3 : [number, string, ...boolean[]] + +k3 = [1, ...sb_]; +>k3 = [1, ...sb_] : [number, string, ...boolean[]] +>k3 : [number, string, ...boolean[]] +>[1, ...sb_] : [number, string, ...boolean[]] +>1 : 1 +>...sb_ : string | boolean +>sb_ : [string, ...boolean[]] + +declare const sbb_: [string, boolean, ...boolean[]]; +>sbb_ : [string, boolean, ...boolean[]] + +let k4: [number, string, ...boolean[]]; +>k4 : [number, string, ...boolean[]] + +k4 = [1, ...sbb_]; +>k4 = [1, ...sbb_] : [number, string, boolean, ...boolean[]] +>k4 : [number, string, ...boolean[]] +>[1, ...sbb_] : [number, string, boolean, ...boolean[]] +>1 : 1 +>...sbb_ : string | boolean +>sbb_ : [string, boolean, ...boolean[]] + +let k5: [number, string, boolean, ...boolean[]]; +>k5 : [number, string, boolean, ...boolean[]] + +k5 = [1, ...sbb_]; +>k5 = [1, ...sbb_] : [number, string, boolean, ...boolean[]] +>k5 : [number, string, boolean, ...boolean[]] +>[1, ...sbb_] : [number, string, boolean, ...boolean[]] +>1 : 1 +>...sbb_ : string | boolean +>sbb_ : [string, boolean, ...boolean[]] + +let k6: [number, string, boolean, boolean, ...boolean[]]; +>k6 : [number, string, boolean, boolean, ...boolean[]] + +k6 = [1, ...sbb_]; +>k6 = [1, ...sbb_] : [number, string, boolean, ...boolean[]] +>k6 : [number, string, boolean, boolean, ...boolean[]] +>[1, ...sbb_] : [number, string, boolean, ...boolean[]] +>1 : 1 +>...sbb_ : string | boolean +>sbb_ : [string, boolean, ...boolean[]] + diff --git a/tests/baselines/reference/spreadOverwritesProperty.js b/tests/baselines/reference/spreadOverwritesProperty.js new file mode 100644 index 0000000000000..bf8d28ae73249 --- /dev/null +++ b/tests/baselines/reference/spreadOverwritesProperty.js @@ -0,0 +1,37 @@ +//// [spreadOverwritesProperty.ts] +// without strict null checks, none of these should be an error +declare var ab: { a: number, b: number }; +declare var abq: { a: number, b?: number }; +var unused1 = { b: 1, ...ab } +var unused2 = { ...ab, ...ab } +var unused3 = { b: 1, ...abq } + +function g(obj: { x: number | undefined }) { + return { x: 1, ...obj }; +} +function h(obj: { x: number }) { + return { x: 1, ...obj }; +} + + +//// [spreadOverwritesProperty.js] +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var unused1 = __assign({ b: 1 }, ab); +var unused2 = __assign(__assign({}, ab), ab); +var unused3 = __assign({ b: 1 }, abq); +function g(obj) { + return __assign({ x: 1 }, obj); +} +function h(obj) { + return __assign({ x: 1 }, obj); +} diff --git a/tests/baselines/reference/spreadOverwritesProperty.symbols b/tests/baselines/reference/spreadOverwritesProperty.symbols new file mode 100644 index 0000000000000..414d8c07371bd --- /dev/null +++ b/tests/baselines/reference/spreadOverwritesProperty.symbols @@ -0,0 +1,46 @@ +=== tests/cases/conformance/types/spread/spreadOverwritesProperty.ts === +// without strict null checks, none of these should be an error +declare var ab: { a: number, b: number }; +>ab : Symbol(ab, Decl(spreadOverwritesProperty.ts, 1, 11)) +>a : Symbol(a, Decl(spreadOverwritesProperty.ts, 1, 17)) +>b : Symbol(b, Decl(spreadOverwritesProperty.ts, 1, 28)) + +declare var abq: { a: number, b?: number }; +>abq : Symbol(abq, Decl(spreadOverwritesProperty.ts, 2, 11)) +>a : Symbol(a, Decl(spreadOverwritesProperty.ts, 2, 18)) +>b : Symbol(b, Decl(spreadOverwritesProperty.ts, 2, 29)) + +var unused1 = { b: 1, ...ab } +>unused1 : Symbol(unused1, Decl(spreadOverwritesProperty.ts, 3, 3)) +>b : Symbol(b, Decl(spreadOverwritesProperty.ts, 3, 15)) +>ab : Symbol(ab, Decl(spreadOverwritesProperty.ts, 1, 11)) + +var unused2 = { ...ab, ...ab } +>unused2 : Symbol(unused2, Decl(spreadOverwritesProperty.ts, 4, 3)) +>ab : Symbol(ab, Decl(spreadOverwritesProperty.ts, 1, 11)) +>ab : Symbol(ab, Decl(spreadOverwritesProperty.ts, 1, 11)) + +var unused3 = { b: 1, ...abq } +>unused3 : Symbol(unused3, Decl(spreadOverwritesProperty.ts, 5, 3)) +>b : Symbol(b, Decl(spreadOverwritesProperty.ts, 5, 15)) +>abq : Symbol(abq, Decl(spreadOverwritesProperty.ts, 2, 11)) + +function g(obj: { x: number | undefined }) { +>g : Symbol(g, Decl(spreadOverwritesProperty.ts, 5, 30)) +>obj : Symbol(obj, Decl(spreadOverwritesProperty.ts, 7, 11)) +>x : Symbol(x, Decl(spreadOverwritesProperty.ts, 7, 17)) + + return { x: 1, ...obj }; +>x : Symbol(x, Decl(spreadOverwritesProperty.ts, 8, 12)) +>obj : Symbol(obj, Decl(spreadOverwritesProperty.ts, 7, 11)) +} +function h(obj: { x: number }) { +>h : Symbol(h, Decl(spreadOverwritesProperty.ts, 9, 1)) +>obj : Symbol(obj, Decl(spreadOverwritesProperty.ts, 10, 11)) +>x : Symbol(x, Decl(spreadOverwritesProperty.ts, 10, 17)) + + return { x: 1, ...obj }; +>x : Symbol(x, Decl(spreadOverwritesProperty.ts, 11, 12)) +>obj : Symbol(obj, Decl(spreadOverwritesProperty.ts, 10, 11)) +} + diff --git a/tests/baselines/reference/spreadOverwritesProperty.types b/tests/baselines/reference/spreadOverwritesProperty.types new file mode 100644 index 0000000000000..3118919a5f7ff --- /dev/null +++ b/tests/baselines/reference/spreadOverwritesProperty.types @@ -0,0 +1,55 @@ +=== tests/cases/conformance/types/spread/spreadOverwritesProperty.ts === +// without strict null checks, none of these should be an error +declare var ab: { a: number, b: number }; +>ab : { a: number; b: number; } +>a : number +>b : number + +declare var abq: { a: number, b?: number }; +>abq : { a: number; b?: number; } +>a : number +>b : number + +var unused1 = { b: 1, ...ab } +>unused1 : { a: number; b: number; } +>{ b: 1, ...ab } : { a: number; b: number; } +>b : number +>1 : 1 +>ab : { a: number; b: number; } + +var unused2 = { ...ab, ...ab } +>unused2 : { a: number; b: number; } +>{ ...ab, ...ab } : { a: number; b: number; } +>ab : { a: number; b: number; } +>ab : { a: number; b: number; } + +var unused3 = { b: 1, ...abq } +>unused3 : { a: number; b: number; } +>{ b: 1, ...abq } : { a: number; b: number; } +>b : number +>1 : 1 +>abq : { a: number; b?: number; } + +function g(obj: { x: number | undefined }) { +>g : (obj: { x: number; }) => { x: number; } +>obj : { x: number; } +>x : number + + return { x: 1, ...obj }; +>{ x: 1, ...obj } : { x: number; } +>x : number +>1 : 1 +>obj : { x: number; } +} +function h(obj: { x: number }) { +>h : (obj: { x: number; }) => { x: number; } +>obj : { x: number; } +>x : number + + return { x: 1, ...obj }; +>{ x: 1, ...obj } : { x: number; } +>x : number +>1 : 1 +>obj : { x: number; } +} + diff --git a/tests/baselines/reference/spreadOverwritesPropertyStrict.errors.txt b/tests/baselines/reference/spreadOverwritesPropertyStrict.errors.txt new file mode 100644 index 0000000000000..4abf968184b6f --- /dev/null +++ b/tests/baselines/reference/spreadOverwritesPropertyStrict.errors.txt @@ -0,0 +1,26 @@ +tests/cases/conformance/types/spread/spreadOverwritesPropertyStrict.ts(3,17): error TS2783: 'b' is specified more than once, so this usage will be overwritten. +tests/cases/conformance/types/spread/spreadOverwritesPropertyStrict.ts(15,14): error TS2783: 'x' is specified more than once, so this usage will be overwritten. + + +==== tests/cases/conformance/types/spread/spreadOverwritesPropertyStrict.ts (2 errors) ==== + declare var ab: { a: number, b: number }; + declare var abq: { a: number, b?: number }; + var unused1 = { b: 1, ...ab } // error + ~~~~ +!!! error TS2783: 'b' is specified more than once, so this usage will be overwritten. + var unused2 = { ...ab, ...ab } // ok, overwritten error doesn't apply to spreads + var unused3 = { b: 1, ...abq } // ok, abq might have b: undefined + var unused4 = { ...ab, b: 1 } // ok, we don't care that b in ab is overwritten + var unused5 = { ...abq, b: 1 } // ok + function g(obj: { x: number | undefined }) { + return { x: 1, ...obj }; // ok, obj might have x: undefined + } + function f(obj: { x: number } | undefined) { + return { x: 1, ...obj }; // ok, obj might be undefined + } + function h(obj: { x: number } | { x: string }) { + return { x: 1, ...obj } // error + ~~~~ +!!! error TS2783: 'x' is specified more than once, so this usage will be overwritten. + } + \ No newline at end of file diff --git a/tests/baselines/reference/spreadOverwritesPropertyStrict.js b/tests/baselines/reference/spreadOverwritesPropertyStrict.js new file mode 100644 index 0000000000000..001f134098404 --- /dev/null +++ b/tests/baselines/reference/spreadOverwritesPropertyStrict.js @@ -0,0 +1,46 @@ +//// [spreadOverwritesPropertyStrict.ts] +declare var ab: { a: number, b: number }; +declare var abq: { a: number, b?: number }; +var unused1 = { b: 1, ...ab } // error +var unused2 = { ...ab, ...ab } // ok, overwritten error doesn't apply to spreads +var unused3 = { b: 1, ...abq } // ok, abq might have b: undefined +var unused4 = { ...ab, b: 1 } // ok, we don't care that b in ab is overwritten +var unused5 = { ...abq, b: 1 } // ok +function g(obj: { x: number | undefined }) { + return { x: 1, ...obj }; // ok, obj might have x: undefined +} +function f(obj: { x: number } | undefined) { + return { x: 1, ...obj }; // ok, obj might be undefined +} +function h(obj: { x: number } | { x: string }) { + return { x: 1, ...obj } // error +} + + +//// [spreadOverwritesPropertyStrict.js] +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var unused1 = __assign({ b: 1 }, ab); // error +var unused2 = __assign(__assign({}, ab), ab); // ok, overwritten error doesn't apply to spreads +var unused3 = __assign({ b: 1 }, abq); // ok, abq might have b: undefined +var unused4 = __assign(__assign({}, ab), { b: 1 }); // ok, we don't care that b in ab is overwritten +var unused5 = __assign(__assign({}, abq), { b: 1 }); // ok +function g(obj) { + return __assign({ x: 1 }, obj); // ok, obj might have x: undefined +} +function f(obj) { + return __assign({ x: 1 }, obj); // ok, obj might be undefined +} +function h(obj) { + return __assign({ x: 1 }, obj); // error +} diff --git a/tests/baselines/reference/spreadOverwritesPropertyStrict.symbols b/tests/baselines/reference/spreadOverwritesPropertyStrict.symbols new file mode 100644 index 0000000000000..02e1e4037519d --- /dev/null +++ b/tests/baselines/reference/spreadOverwritesPropertyStrict.symbols @@ -0,0 +1,65 @@ +=== tests/cases/conformance/types/spread/spreadOverwritesPropertyStrict.ts === +declare var ab: { a: number, b: number }; +>ab : Symbol(ab, Decl(spreadOverwritesPropertyStrict.ts, 0, 11)) +>a : Symbol(a, Decl(spreadOverwritesPropertyStrict.ts, 0, 17)) +>b : Symbol(b, Decl(spreadOverwritesPropertyStrict.ts, 0, 28)) + +declare var abq: { a: number, b?: number }; +>abq : Symbol(abq, Decl(spreadOverwritesPropertyStrict.ts, 1, 11)) +>a : Symbol(a, Decl(spreadOverwritesPropertyStrict.ts, 1, 18)) +>b : Symbol(b, Decl(spreadOverwritesPropertyStrict.ts, 1, 29)) + +var unused1 = { b: 1, ...ab } // error +>unused1 : Symbol(unused1, Decl(spreadOverwritesPropertyStrict.ts, 2, 3)) +>b : Symbol(b, Decl(spreadOverwritesPropertyStrict.ts, 2, 15)) +>ab : Symbol(ab, Decl(spreadOverwritesPropertyStrict.ts, 0, 11)) + +var unused2 = { ...ab, ...ab } // ok, overwritten error doesn't apply to spreads +>unused2 : Symbol(unused2, Decl(spreadOverwritesPropertyStrict.ts, 3, 3)) +>ab : Symbol(ab, Decl(spreadOverwritesPropertyStrict.ts, 0, 11)) +>ab : Symbol(ab, Decl(spreadOverwritesPropertyStrict.ts, 0, 11)) + +var unused3 = { b: 1, ...abq } // ok, abq might have b: undefined +>unused3 : Symbol(unused3, Decl(spreadOverwritesPropertyStrict.ts, 4, 3)) +>b : Symbol(b, Decl(spreadOverwritesPropertyStrict.ts, 4, 15)) +>abq : Symbol(abq, Decl(spreadOverwritesPropertyStrict.ts, 1, 11)) + +var unused4 = { ...ab, b: 1 } // ok, we don't care that b in ab is overwritten +>unused4 : Symbol(unused4, Decl(spreadOverwritesPropertyStrict.ts, 5, 3)) +>ab : Symbol(ab, Decl(spreadOverwritesPropertyStrict.ts, 0, 11)) +>b : Symbol(b, Decl(spreadOverwritesPropertyStrict.ts, 5, 22)) + +var unused5 = { ...abq, b: 1 } // ok +>unused5 : Symbol(unused5, Decl(spreadOverwritesPropertyStrict.ts, 6, 3)) +>abq : Symbol(abq, Decl(spreadOverwritesPropertyStrict.ts, 1, 11)) +>b : Symbol(b, Decl(spreadOverwritesPropertyStrict.ts, 6, 23)) + +function g(obj: { x: number | undefined }) { +>g : Symbol(g, Decl(spreadOverwritesPropertyStrict.ts, 6, 30)) +>obj : Symbol(obj, Decl(spreadOverwritesPropertyStrict.ts, 7, 11)) +>x : Symbol(x, Decl(spreadOverwritesPropertyStrict.ts, 7, 17)) + + return { x: 1, ...obj }; // ok, obj might have x: undefined +>x : Symbol(x, Decl(spreadOverwritesPropertyStrict.ts, 8, 12)) +>obj : Symbol(obj, Decl(spreadOverwritesPropertyStrict.ts, 7, 11)) +} +function f(obj: { x: number } | undefined) { +>f : Symbol(f, Decl(spreadOverwritesPropertyStrict.ts, 9, 1)) +>obj : Symbol(obj, Decl(spreadOverwritesPropertyStrict.ts, 10, 11)) +>x : Symbol(x, Decl(spreadOverwritesPropertyStrict.ts, 10, 17)) + + return { x: 1, ...obj }; // ok, obj might be undefined +>x : Symbol(x, Decl(spreadOverwritesPropertyStrict.ts, 11, 12)) +>obj : Symbol(obj, Decl(spreadOverwritesPropertyStrict.ts, 10, 11)) +} +function h(obj: { x: number } | { x: string }) { +>h : Symbol(h, Decl(spreadOverwritesPropertyStrict.ts, 12, 1)) +>obj : Symbol(obj, Decl(spreadOverwritesPropertyStrict.ts, 13, 11)) +>x : Symbol(x, Decl(spreadOverwritesPropertyStrict.ts, 13, 17)) +>x : Symbol(x, Decl(spreadOverwritesPropertyStrict.ts, 13, 33)) + + return { x: 1, ...obj } // error +>x : Symbol(x, Decl(spreadOverwritesPropertyStrict.ts, 14, 12)) +>obj : Symbol(obj, Decl(spreadOverwritesPropertyStrict.ts, 13, 11)) +} + diff --git a/tests/baselines/reference/spreadOverwritesPropertyStrict.types b/tests/baselines/reference/spreadOverwritesPropertyStrict.types new file mode 100644 index 0000000000000..55c142da247f5 --- /dev/null +++ b/tests/baselines/reference/spreadOverwritesPropertyStrict.types @@ -0,0 +1,80 @@ +=== tests/cases/conformance/types/spread/spreadOverwritesPropertyStrict.ts === +declare var ab: { a: number, b: number }; +>ab : { a: number; b: number; } +>a : number +>b : number + +declare var abq: { a: number, b?: number }; +>abq : { a: number; b?: number | undefined; } +>a : number +>b : number | undefined + +var unused1 = { b: 1, ...ab } // error +>unused1 : { a: number; b: number; } +>{ b: 1, ...ab } : { a: number; b: number; } +>b : number +>1 : 1 +>ab : { a: number; b: number; } + +var unused2 = { ...ab, ...ab } // ok, overwritten error doesn't apply to spreads +>unused2 : { a: number; b: number; } +>{ ...ab, ...ab } : { a: number; b: number; } +>ab : { a: number; b: number; } +>ab : { a: number; b: number; } + +var unused3 = { b: 1, ...abq } // ok, abq might have b: undefined +>unused3 : { a: number; b: number; } +>{ b: 1, ...abq } : { a: number; b: number; } +>b : number +>1 : 1 +>abq : { a: number; b?: number | undefined; } + +var unused4 = { ...ab, b: 1 } // ok, we don't care that b in ab is overwritten +>unused4 : { b: number; a: number; } +>{ ...ab, b: 1 } : { b: number; a: number; } +>ab : { a: number; b: number; } +>b : number +>1 : 1 + +var unused5 = { ...abq, b: 1 } // ok +>unused5 : { b: number; a: number; } +>{ ...abq, b: 1 } : { b: number; a: number; } +>abq : { a: number; b?: number | undefined; } +>b : number +>1 : 1 + +function g(obj: { x: number | undefined }) { +>g : (obj: { x: number | undefined; }) => { x: number | undefined; } +>obj : { x: number | undefined; } +>x : number | undefined + + return { x: 1, ...obj }; // ok, obj might have x: undefined +>{ x: 1, ...obj } : { x: number | undefined; } +>x : number +>1 : 1 +>obj : { x: number | undefined; } +} +function f(obj: { x: number } | undefined) { +>f : (obj: { x: number; } | undefined) => { x: number; } +>obj : { x: number; } | undefined +>x : number + + return { x: 1, ...obj }; // ok, obj might be undefined +>{ x: 1, ...obj } : { x: number; } +>x : number +>1 : 1 +>obj : { x: number; } | undefined +} +function h(obj: { x: number } | { x: string }) { +>h : (obj: { x: number; } | { x: string; }) => { x: number; } | { x: string; } +>obj : { x: number; } | { x: string; } +>x : number +>x : string + + return { x: 1, ...obj } // error +>{ x: 1, ...obj } : { x: number; } | { x: string; } +>x : number +>1 : 1 +>obj : { x: number; } | { x: string; } +} + diff --git a/tests/baselines/reference/staticGetter1.js b/tests/baselines/reference/staticGetter1.js index f3911c1ab332d..e93abc051ef38 100644 --- a/tests/baselines/reference/staticGetter1.js +++ b/tests/baselines/reference/staticGetter1.js @@ -16,7 +16,7 @@ var C = /** @class */ (function () { get: function () { return this; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/staticGetterAndSetter.js b/tests/baselines/reference/staticGetterAndSetter.js index 5019b52856a3a..55bbf5c88055f 100644 --- a/tests/baselines/reference/staticGetterAndSetter.js +++ b/tests/baselines/reference/staticGetterAndSetter.js @@ -12,7 +12,7 @@ var Foo = /** @class */ (function () { Object.defineProperty(Foo, "Foo", { get: function () { return 0; }, set: function (n) { }, - enumerable: true, + enumerable: false, configurable: true }); return Foo; diff --git a/tests/baselines/reference/staticPropertyNotInClassType.js b/tests/baselines/reference/staticPropertyNotInClassType.js index d6bbdc75accbc..b23ed5ea5ecc3 100644 --- a/tests/baselines/reference/staticPropertyNotInClassType.js +++ b/tests/baselines/reference/staticPropertyNotInClassType.js @@ -51,7 +51,7 @@ var NonGeneric; Object.defineProperty(C, "x", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -76,7 +76,7 @@ var Generic; Object.defineProperty(C, "x", { get: function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/staticVisibility.js b/tests/baselines/reference/staticVisibility.js index 78f1dd1902453..363d68639137a 100644 --- a/tests/baselines/reference/staticVisibility.js +++ b/tests/baselines/reference/staticVisibility.js @@ -61,7 +61,7 @@ var C2 = /** @class */ (function () { , set: function (bar) { barback = bar; } // not ok , - enumerable: true, + enumerable: false, configurable: true }); return C2; diff --git a/tests/baselines/reference/strictBindCallApply1.types b/tests/baselines/reference/strictBindCallApply1.types index 7237c1d3142f4..80db68c3af4da 100644 --- a/tests/baselines/reference/strictBindCallApply1.types +++ b/tests/baselines/reference/strictBindCallApply1.types @@ -44,8 +44,8 @@ let f02 = foo.bind(undefined, 10, "hello"); >"hello" : "hello" let f03 = foo.bind(undefined, 10, 20); // Error ->f03 : any ->foo.bind(undefined, 10, 20) : any +>f03 : () => string +>foo.bind(undefined, 10, 20) : () => string >foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } >foo : (a: number, b: string) => string >bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } @@ -80,8 +80,8 @@ let c00 = foo.call(undefined, 10, "hello"); >"hello" : "hello" let c01 = foo.call(undefined, 10); // Error ->c01 : any ->foo.call(undefined, 10) : any +>c01 : string +>foo.call(undefined, 10) : string >foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R >foo : (a: number, b: string) => string >call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R @@ -89,8 +89,8 @@ let c01 = foo.call(undefined, 10); // Error >10 : 10 let c02 = foo.call(undefined, 10, 20); // Error ->c02 : any ->foo.call(undefined, 10, 20) : any +>c02 : string +>foo.call(undefined, 10, 20) : string >foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R >foo : (a: number, b: string) => string >call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R @@ -99,8 +99,8 @@ let c02 = foo.call(undefined, 10, 20); // Error >20 : 20 let c03 = foo.call(undefined, 10, "hello", 30); // Error ->c03 : any ->foo.call(undefined, 10, "hello", 30) : any +>c03 : string +>foo.call(undefined, 10, "hello", 30) : string >foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R >foo : (a: number, b: string) => string >call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R @@ -121,34 +121,34 @@ let a00 = foo.apply(undefined, [10, "hello"]); >"hello" : "hello" let a01 = foo.apply(undefined, [10]); // Error ->a01 : any ->foo.apply(undefined, [10]) : any +>a01 : string +>foo.apply(undefined, [10]) : string >foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >foo : (a: number, b: string) => string >apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >undefined : undefined ->[10] : number[] +>[10] : [number] >10 : 10 let a02 = foo.apply(undefined, [10, 20]); // Error ->a02 : any ->foo.apply(undefined, [10, 20]) : any +>a02 : string +>foo.apply(undefined, [10, 20]) : string >foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >foo : (a: number, b: string) => string >apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >undefined : undefined ->[10, 20] : number[] +>[10, 20] : [number, number] >10 : 10 >20 : 20 let a03 = foo.apply(undefined, [10, "hello", 30]); // Error ->a03 : any ->foo.apply(undefined, [10, "hello", 30]) : any +>a03 : string +>foo.apply(undefined, [10, "hello", 30]) : string >foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >foo : (a: number, b: string) => string >apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >undefined : undefined ->[10, "hello", 30] : (string | number)[] +>[10, "hello", 30] : [number, string, number] >10 : 10 >"hello" : "hello" >30 : 30 @@ -227,8 +227,8 @@ let f12 = c.foo.bind(c, 10, "hello"); >"hello" : "hello" let f13 = c.foo.bind(c, 10, 20); // Error ->f13 : any ->c.foo.bind(c, 10, 20) : any +>f13 : () => string +>c.foo.bind(c, 10, 20) : () => string >c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } >c.foo : (this: C, a: number, b: string) => string >c : C @@ -239,8 +239,8 @@ let f13 = c.foo.bind(c, 10, 20); // Error >20 : 20 let f14 = c.foo.bind(undefined); // Error ->f14 : any ->c.foo.bind(undefined) : any +>f14 : (a: number, b: string) => string +>c.foo.bind(undefined) : (a: number, b: string) => string >c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } >c.foo : (this: C, a: number, b: string) => string >c : C @@ -281,8 +281,8 @@ let c10 = c.foo.call(c, 10, "hello"); >"hello" : "hello" let c11 = c.foo.call(c, 10); // Error ->c11 : any ->c.foo.call(c, 10) : any +>c11 : string +>c.foo.call(c, 10) : string >c.foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R >c.foo : (this: C, a: number, b: string) => string >c : C @@ -292,8 +292,8 @@ let c11 = c.foo.call(c, 10); // Error >10 : 10 let c12 = c.foo.call(c, 10, 20); // Error ->c12 : any ->c.foo.call(c, 10, 20) : any +>c12 : string +>c.foo.call(c, 10, 20) : string >c.foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R >c.foo : (this: C, a: number, b: string) => string >c : C @@ -304,8 +304,8 @@ let c12 = c.foo.call(c, 10, 20); // Error >20 : 20 let c13 = c.foo.call(c, 10, "hello", 30); // Error ->c13 : any ->c.foo.call(c, 10, "hello", 30) : any +>c13 : string +>c.foo.call(c, 10, "hello", 30) : string >c.foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R >c.foo : (this: C, a: number, b: string) => string >c : C @@ -317,8 +317,8 @@ let c13 = c.foo.call(c, 10, "hello", 30); // Error >30 : 30 let c14 = c.foo.call(undefined, 10, "hello"); // Error ->c14 : any ->c.foo.call(undefined, 10, "hello") : any +>c14 : string +>c.foo.call(undefined, 10, "hello") : string >c.foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R >c.foo : (this: C, a: number, b: string) => string >c : C @@ -342,54 +342,54 @@ let a10 = c.foo.apply(c, [10, "hello"]); >"hello" : "hello" let a11 = c.foo.apply(c, [10]); // Error ->a11 : any ->c.foo.apply(c, [10]) : any +>a11 : string +>c.foo.apply(c, [10]) : string >c.foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >c.foo : (this: C, a: number, b: string) => string >c : C >foo : (this: C, a: number, b: string) => string >apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >c : C ->[10] : number[] +>[10] : [number] >10 : 10 let a12 = c.foo.apply(c, [10, 20]); // Error ->a12 : any ->c.foo.apply(c, [10, 20]) : any +>a12 : string +>c.foo.apply(c, [10, 20]) : string >c.foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >c.foo : (this: C, a: number, b: string) => string >c : C >foo : (this: C, a: number, b: string) => string >apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >c : C ->[10, 20] : number[] +>[10, 20] : [number, number] >10 : 10 >20 : 20 let a13 = c.foo.apply(c, [10, "hello", 30]); // Error ->a13 : any ->c.foo.apply(c, [10, "hello", 30]) : any +>a13 : string +>c.foo.apply(c, [10, "hello", 30]) : string >c.foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >c.foo : (this: C, a: number, b: string) => string >c : C >foo : (this: C, a: number, b: string) => string >apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >c : C ->[10, "hello", 30] : (string | number)[] +>[10, "hello", 30] : [number, string, number] >10 : 10 >"hello" : "hello" >30 : 30 let a14 = c.foo.apply(undefined, [10, "hello"]); // Error ->a14 : any ->c.foo.apply(undefined, [10, "hello"]) : any +>a14 : string +>c.foo.apply(undefined, [10, "hello"]) : string >c.foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >c.foo : (this: C, a: number, b: string) => string >c : C >foo : (this: C, a: number, b: string) => string >apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } >undefined : undefined ->[10, "hello"] : (string | number)[] +>[10, "hello"] : [number, string] >10 : 10 >"hello" : "hello" @@ -421,8 +421,8 @@ let f22 = C.bind(undefined, 10, "hello"); >"hello" : "hello" let f23 = C.bind(undefined, 10, 20); // Error ->f23 : any ->C.bind(undefined, 10, 20) : any +>f23 : new () => C +>C.bind(undefined, 10, 20) : new () => C >C.bind : { (this: T, thisArg: any): T; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } >C : typeof C >bind : { (this: T, thisArg: any): T; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } @@ -440,7 +440,7 @@ C.call(c, 10, "hello"); >"hello" : "hello" C.call(c, 10); // Error ->C.call(c, 10) : any +>C.call(c, 10) : void >C.call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void >C : typeof C >call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void @@ -448,7 +448,7 @@ C.call(c, 10); // Error >10 : 10 C.call(c, 10, 20); // Error ->C.call(c, 10, 20) : any +>C.call(c, 10, 20) : void >C.call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void >C : typeof C >call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void @@ -457,7 +457,7 @@ C.call(c, 10, 20); // Error >20 : 20 C.call(c, 10, "hello", 30); // Error ->C.call(c, 10, "hello", 30) : any +>C.call(c, 10, "hello", 30) : void >C.call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void >C : typeof C >call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void @@ -477,31 +477,31 @@ C.apply(c, [10, "hello"]); >"hello" : "hello" C.apply(c, [10]); // Error ->C.apply(c, [10]) : any +>C.apply(c, [10]) : void >C.apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } >C : typeof C >apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } >c : C ->[10] : number[] +>[10] : [number] >10 : 10 C.apply(c, [10, 20]); // Error ->C.apply(c, [10, 20]) : any +>C.apply(c, [10, 20]) : void >C.apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } >C : typeof C >apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } >c : C ->[10, 20] : number[] +>[10, 20] : [number, number] >10 : 10 >20 : 20 C.apply(c, [10, "hello", 30]); // Error ->C.apply(c, [10, "hello", 30]) : any +>C.apply(c, [10, "hello", 30]) : void >C.apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } >C : typeof C >apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } >c : C ->[10, "hello", 30] : (string | number)[] +>[10, "hello", 30] : [number, string, number] >10 : 10 >"hello" : "hello" >30 : 30 diff --git a/tests/baselines/reference/strictNullNotNullIndexTypeNoLib.types b/tests/baselines/reference/strictNullNotNullIndexTypeNoLib.types index 295ffad96bdac..773b37039db03 100644 --- a/tests/baselines/reference/strictNullNotNullIndexTypeNoLib.types +++ b/tests/baselines/reference/strictNullNotNullIndexTypeNoLib.types @@ -20,11 +20,11 @@ class Test { this.attrs.params!.name; >this.attrs.params!.name : any >this.attrs.params! : T["params"] ->this.attrs.params : T["params"] +>this.attrs.params : T["params"] | undefined >this.attrs : Readonly >this : this >attrs : Readonly ->params : T["params"] +>params : T["params"] | undefined >name : any } } @@ -66,10 +66,10 @@ class Test2 { return this.attrs.params!; // Return type should maintain relationship with `T` after being not-null-asserted, ideally >this.attrs.params! : T["params"] ->this.attrs.params : T["params"] +>this.attrs.params : T["params"] | undefined >this.attrs : Readonly >this : this >attrs : Readonly ->params : T["params"] +>params : T["params"] | undefined } } diff --git a/tests/baselines/reference/strictNullNotNullIndexTypeShouldWork.types b/tests/baselines/reference/strictNullNotNullIndexTypeShouldWork.types index 2bfd1c7c5f3f4..102b345109c26 100644 --- a/tests/baselines/reference/strictNullNotNullIndexTypeShouldWork.types +++ b/tests/baselines/reference/strictNullNotNullIndexTypeShouldWork.types @@ -17,11 +17,11 @@ class Test { this.attrs.params!.name; >this.attrs.params!.name : string >this.attrs.params! : NonNullable ->this.attrs.params : T["params"] +>this.attrs.params : T["params"] | undefined >this.attrs : Readonly >this : this >attrs : Readonly ->params : T["params"] +>params : T["params"] | undefined >name : string } } @@ -63,10 +63,10 @@ class Test2 { return this.attrs.params!; // Return type should maintain relationship with `T` after being not-null-asserted, ideally >this.attrs.params! : NonNullable ->this.attrs.params : T["params"] +>this.attrs.params : T["params"] | undefined >this.attrs : Readonly >this : this >attrs : Readonly ->params : T["params"] +>params : T["params"] | undefined } } diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js index d405014bc6804..33eee0a943605 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js @@ -108,7 +108,7 @@ var C = /** @class */ (function () { }, set: function (v) { } // ok , - enumerable: true, + enumerable: false, configurable: true }); C.prototype.foo = function () { @@ -119,7 +119,7 @@ var C = /** @class */ (function () { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 30a3381bfec03..fd1bb59b59b19 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -111,7 +111,7 @@ var Other = /** @class */ (function (_super) { set: function (value) { _super.prototype.instanceMethod.call(this); }, - enumerable: true, + enumerable: false, configurable: true }); return Other; diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index 17d768460ca36..c43746ee34c0c 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -103,7 +103,7 @@ var Other = /** @class */ (function (_super) { set: function (value) { _super.staticMethod.call(this); }, - enumerable: true, + enumerable: false, configurable: true }); // in static method diff --git a/tests/baselines/reference/superElementAccess.js b/tests/baselines/reference/superElementAccess.js index e7b390e0d0589..e8b9c86b844e4 100644 --- a/tests/baselines/reference/superElementAccess.js +++ b/tests/baselines/reference/superElementAccess.js @@ -60,7 +60,7 @@ var MyBase = /** @class */ (function () { Object.defineProperty(MyBase.prototype, "value", { get: function () { return 0; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return MyBase; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index 76a574695852a..3410f4d49f974 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -60,7 +60,7 @@ var MyBase = /** @class */ (function () { Object.defineProperty(MyBase.prototype, "value", { get: function () { return 0; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return MyBase; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index a3590965d0880..950b0471de33e 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -49,7 +49,7 @@ var C = /** @class */ (function () { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.bar = function () { }; @@ -73,7 +73,7 @@ var D = /** @class */ (function (_super) { _super.prototype.x; // error return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return D; diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index 602ed09311542..a04769c9d0ff6 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -49,7 +49,7 @@ var C = /** @class */ (function () { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); C.bar = function () { }; @@ -73,7 +73,7 @@ var D = /** @class */ (function (_super) { _super.x; // error return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return D; diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index faa486ef7c020..b3473eb1fc79c 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -128,7 +128,7 @@ var SomeDerivedClass = /** @class */ (function (_super) { var x = _super.prototype.func.call(this); var x; }, - enumerable: true, + enumerable: false, configurable: true }); SomeDerivedClass.fn = function () { @@ -145,7 +145,7 @@ var SomeDerivedClass = /** @class */ (function (_super) { var x = _super.func.call(this); var x; }, - enumerable: true, + enumerable: false, configurable: true }); SomeDerivedClass.prototype.returnThis = function () { diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index a6607a13b56de..be1bbf89e0dde 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -48,7 +48,7 @@ var MyBase = /** @class */ (function () { MyBase.prototype.getValue = function () { return 1; }; Object.defineProperty(MyBase.prototype, "value", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return MyBase; @@ -71,7 +71,7 @@ var A = /** @class */ (function () { Object.defineProperty(A.prototype, "property", { get: function () { return this._property; }, set: function (value) { this._property = value; }, - enumerable: true, + enumerable: false, configurable: true }); return A; @@ -85,7 +85,7 @@ var B = /** @class */ (function (_super) { set: function (value) { _super.prototype.property = value + " addition"; }, - enumerable: true, + enumerable: false, configurable: true }); return B; diff --git a/tests/baselines/reference/symbolDeclarationEmit11.js b/tests/baselines/reference/symbolDeclarationEmit11.js index b0cd9cfddbd5b..a418788de2999 100644 --- a/tests/baselines/reference/symbolDeclarationEmit11.js +++ b/tests/baselines/reference/symbolDeclarationEmit11.js @@ -7,12 +7,15 @@ class C { } //// [symbolDeclarationEmit11.js] -class C { - static [Symbol.isConcatSpreadable]() { } - static get [Symbol.toPrimitive]() { return ""; } - static set [Symbol.toPrimitive](x) { } -} -C[Symbol.iterator] = 0; +const C = /** @class */ (() => { + class C { + static [Symbol.isConcatSpreadable]() { } + static get [Symbol.toPrimitive]() { return ""; } + static set [Symbol.toPrimitive](x) { } + } + C[Symbol.iterator] = 0; + return C; +})(); //// [symbolDeclarationEmit11.d.ts] diff --git a/tests/baselines/reference/symbolLinkDeclarationEmitModuleNames.js b/tests/baselines/reference/symbolLinkDeclarationEmitModuleNames.js index 8cf2fab6fb4b5..314a8f2a9f585 100644 --- a/tests/baselines/reference/symbolLinkDeclarationEmitModuleNames.js +++ b/tests/baselines/reference/symbolLinkDeclarationEmitModuleNames.js @@ -41,11 +41,18 @@ var BindingKey = /** @class */ (function () { exports.BindingKey = BindingKey; //// [index.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./src/bindingkey")); +__exportStar(require("./src/bindingkey"), exports); //// [application.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/symbolProperty21.types b/tests/baselines/reference/symbolProperty21.types index 7791191833385..5906f52453514 100644 --- a/tests/baselines/reference/symbolProperty21.types +++ b/tests/baselines/reference/symbolProperty21.types @@ -20,9 +20,9 @@ declare function foo(p: I): { t: T; u: U }; >u : U foo({ ->foo({ [Symbol.isConcatSpreadable]: "", [Symbol.toPrimitive]: 0, [Symbol.unscopables]: true}) : any +>foo({ [Symbol.isConcatSpreadable]: "", [Symbol.toPrimitive]: 0, [Symbol.unscopables]: true}) : { t: boolean; u: string; } >foo : (p: I) => { t: T; u: U; } ->{ [Symbol.isConcatSpreadable]: "", [Symbol.toPrimitive]: 0, [Symbol.unscopables]: true} : { [Symbol.isConcatSpreadable]: string; [Symbol.toPrimitive]: number; [Symbol.unscopables]: boolean; } +>{ [Symbol.isConcatSpreadable]: "", [Symbol.toPrimitive]: 0, [Symbol.unscopables]: true} : { [Symbol.isConcatSpreadable]: string; [Symbol.toPrimitive]: number; [Symbol.unscopables]: true; } [Symbol.isConcatSpreadable]: "", >[Symbol.isConcatSpreadable] : string @@ -39,7 +39,7 @@ foo({ >0 : 0 [Symbol.unscopables]: true ->[Symbol.unscopables] : boolean +>[Symbol.unscopables] : true >Symbol.unscopables : symbol >Symbol : SymbolConstructor >unscopables : symbol diff --git a/tests/baselines/reference/systemModuleTargetES6.js b/tests/baselines/reference/systemModuleTargetES6.js index 0df2835683e82..b3231e22752ad 100644 --- a/tests/baselines/reference/systemModuleTargetES6.js +++ b/tests/baselines/reference/systemModuleTargetES6.js @@ -32,11 +32,14 @@ System.register([], function (exports_1, context_1) { MyClass = class MyClass { }; exports_1("MyClass", MyClass); - MyClass2 = class MyClass2 { - static getInstance() { return MyClass2.value; } - }; + MyClass2 = /** @class */ (() => { + class MyClass2 { + static getInstance() { return MyClass2.value; } + } + MyClass2.value = 42; + return MyClass2; + })(); exports_1("MyClass2", MyClass2); - MyClass2.value = 42; } }; }); diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt index c678337cfc9f1..efbee889ffb59 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts(62,36): error TS2345: Argument of type '0' is not assignable to parameter of type '""'. +tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts(63,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts(76,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'. -==== tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts (2 errors) ==== +==== tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts (3 errors) ==== // Generic tag with one parameter function noParams(n: T) { } noParams ``; @@ -68,6 +69,9 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference ~ !!! error TS2345: Argument of type '0' is not assignable to parameter of type '""'. var a9a: {}; + ~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. +!!! related TS6203 tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts:62:5: 'a9a' was also declared here. // Generic tag with multiple parameters of generic type passed arguments with multiple best common types interface A91 { diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.types b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.types index d538da4402cf1..114b37d1cf2e2 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.types +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.types @@ -302,8 +302,8 @@ function someGenerics9(strs: TemplateStringsArray, a: T, b: T, c: T): T { >null : null } var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; ->a9a : any ->someGenerics9 `${ '' }${ 0 }${ [] }` : any +>a9a : string +>someGenerics9 `${ '' }${ 0 }${ [] }` : "" >someGenerics9 : (strs: TemplateStringsArray, a: T, b: T, c: T) => T >`${ '' }${ 0 }${ [] }` : string >'' : "" @@ -311,7 +311,7 @@ var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; >[] : undefined[] var a9a: {}; ->a9a : any +>a9a : string // Generic tag with multiple parameters of generic type passed arguments with multiple best common types interface A91 { diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt index e03b06d72e027..a8976788ef8ba 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts(62,36): error TS2345: Argument of type '0' is not assignable to parameter of type '""'. +tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts(63,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts(76,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'. -==== tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts (2 errors) ==== +==== tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts (3 errors) ==== // Generic tag with one parameter function noParams(n: T) { } noParams ``; @@ -68,6 +69,9 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference ~ !!! error TS2345: Argument of type '0' is not assignable to parameter of type '""'. var a9a: {}; + ~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. +!!! related TS6203 tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts:62:5: 'a9a' was also declared here. // Generic tag with multiple parameters of generic type passed arguments with multiple best common types interface A91 { diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.types b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.types index 0cb787ec4c12d..1953bde609932 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.types +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.types @@ -302,8 +302,8 @@ function someGenerics9(strs: TemplateStringsArray, a: T, b: T, c: T): T { >null : null } var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; ->a9a : any ->someGenerics9 `${ '' }${ 0 }${ [] }` : any +>a9a : string +>someGenerics9 `${ '' }${ 0 }${ [] }` : "" >someGenerics9 : (strs: TemplateStringsArray, a: T, b: T, c: T) => T >`${ '' }${ 0 }${ [] }` : string >'' : "" @@ -311,7 +311,7 @@ var a9a = someGenerics9 `${ '' }${ 0 }${ [] }`; >[] : undefined[] var a9a: {}; ->a9a : any +>a9a : string // Generic tag with multiple parameters of generic type passed arguments with multiple best common types interface A91 { diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt index 0634338986850..215e5998a399f 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt @@ -3,10 +3,11 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTyped tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(22,9): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(24,25): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(26,9): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(26,46): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(28,57): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. -==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts (6 errors) ==== +==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts (7 errors) ==== interface I { (stringParts: TemplateStringsArray, ...rest: boolean[]): I; g: I; @@ -43,6 +44,8 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTyped f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; ~ !!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. + ~ +!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi`; ~ diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.symbols b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.symbols index e207a8971bb81..fb7117dc6dadb 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.symbols +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.symbols @@ -45,7 +45,9 @@ f `abc`.member >member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 3, 9)) f `abc${1}def${2}ghi`.member; +>f `abc${1}def${2}ghi`.member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 3, 9)) >f : Symbol(f, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 9, 3)) +>member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 3, 9)) f `abc`["member"]; >f : Symbol(f, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 9, 3)) @@ -53,6 +55,7 @@ f `abc`["member"]; f `abc${1}def${2}ghi`["member"]; >f : Symbol(f, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 9, 3)) +>"member" : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 3, 9)) f `abc`[0].member `abc${1}def${2}ghi`; >f `abc`[0].member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 3, 9)) @@ -60,7 +63,10 @@ f `abc`[0].member `abc${1}def${2}ghi`; >member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 3, 9)) f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; +>f `abc${1}def${2}ghi`["member"].member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 3, 9)) >f : Symbol(f, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 9, 3)) +>"member" : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 3, 9)) +>member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 3, 9)) f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi`; >f `abc${ true }def${ true }ghi`["member"].member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTags.ts, 3, 9)) diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.types b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.types index ef1cb731a2e60..1e0acac274aec 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.types +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.types @@ -30,7 +30,7 @@ f `abc` >`abc` : "abc" f `abc${1}def${2}ghi`; ->f `abc${1}def${2}ghi` : any +>f `abc${1}def${2}ghi` : I >f : I >`abc${1}def${2}ghi` : string >1 : 1 @@ -44,13 +44,13 @@ f `abc`.member >member : I f `abc${1}def${2}ghi`.member; ->f `abc${1}def${2}ghi`.member : any ->f `abc${1}def${2}ghi` : any +>f `abc${1}def${2}ghi`.member : I +>f `abc${1}def${2}ghi` : I >f : I >`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 ->member : any +>member : I f `abc`["member"]; >f `abc`["member"] : I @@ -60,8 +60,8 @@ f `abc`["member"]; >"member" : "member" f `abc${1}def${2}ghi`["member"]; ->f `abc${1}def${2}ghi`["member"] : any ->f `abc${1}def${2}ghi` : any +>f `abc${1}def${2}ghi`["member"] : I +>f `abc${1}def${2}ghi` : I >f : I >`abc${1}def${2}ghi` : string >1 : 1 @@ -69,7 +69,7 @@ f `abc${1}def${2}ghi`["member"]; >"member" : "member" f `abc`[0].member `abc${1}def${2}ghi`; ->f `abc`[0].member `abc${1}def${2}ghi` : any +>f `abc`[0].member `abc${1}def${2}ghi` : I >f `abc`[0].member : I >f `abc`[0] : I >f `abc` : I @@ -82,22 +82,22 @@ f `abc`[0].member `abc${1}def${2}ghi`; >2 : 2 f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; ->f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi` : any ->f `abc${1}def${2}ghi`["member"].member : any ->f `abc${1}def${2}ghi`["member"] : any ->f `abc${1}def${2}ghi` : any +>f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi` : I +>f `abc${1}def${2}ghi`["member"].member : I +>f `abc${1}def${2}ghi`["member"] : I +>f `abc${1}def${2}ghi` : I >f : I >`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" ->member : any +>member : I >`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi`; ->f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi` : any +>f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi` : I >f `abc${ true }def${ true }ghi`["member"].member : I >f `abc${ true }def${ true }ghi`["member"] : I >f `abc${ true }def${ true }ghi` : I diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.errors.txt index 9d1ee541e4f2b..00d0f276dc9e0 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.errors.txt @@ -3,10 +3,11 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTyped tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts(22,9): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts(24,25): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts(26,9): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts(26,46): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts(28,57): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. -==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts (6 errors) ==== +==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts (7 errors) ==== interface I { (stringParts: TemplateStringsArray, ...rest: boolean[]): I; g: I; @@ -43,6 +44,8 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTyped f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; ~ !!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. + ~ +!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi`; ~ diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.symbols b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.symbols index 5ec23bae79a3a..bc03851173c03 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.symbols +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.symbols @@ -45,7 +45,9 @@ f `abc`.member >member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 3, 9)) f `abc${1}def${2}ghi`.member; +>f `abc${1}def${2}ghi`.member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 3, 9)) >f : Symbol(f, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 9, 3)) +>member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 3, 9)) f `abc`["member"]; >f : Symbol(f, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 9, 3)) @@ -53,6 +55,7 @@ f `abc`["member"]; f `abc${1}def${2}ghi`["member"]; >f : Symbol(f, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 9, 3)) +>"member" : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 3, 9)) f `abc`[0].member `abc${1}def${2}ghi`; >f `abc`[0].member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 3, 9)) @@ -60,7 +63,10 @@ f `abc`[0].member `abc${1}def${2}ghi`; >member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 3, 9)) f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; +>f `abc${1}def${2}ghi`["member"].member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 3, 9)) >f : Symbol(f, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 9, 3)) +>"member" : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 3, 9)) +>member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 3, 9)) f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi`; >f `abc${ true }def${ true }ghi`["member"].member : Symbol(I.member, Decl(taggedTemplateStringsWithIncompatibleTypedTagsES6.ts, 3, 9)) diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.types b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.types index 7eca6e57845d0..39993e1367b6f 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTagsES6.types @@ -30,7 +30,7 @@ f `abc` >`abc` : "abc" f `abc${1}def${2}ghi`; ->f `abc${1}def${2}ghi` : any +>f `abc${1}def${2}ghi` : I >f : I >`abc${1}def${2}ghi` : string >1 : 1 @@ -44,13 +44,13 @@ f `abc`.member >member : I f `abc${1}def${2}ghi`.member; ->f `abc${1}def${2}ghi`.member : any ->f `abc${1}def${2}ghi` : any +>f `abc${1}def${2}ghi`.member : I +>f `abc${1}def${2}ghi` : I >f : I >`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 ->member : any +>member : I f `abc`["member"]; >f `abc`["member"] : I @@ -60,8 +60,8 @@ f `abc`["member"]; >"member" : "member" f `abc${1}def${2}ghi`["member"]; ->f `abc${1}def${2}ghi`["member"] : any ->f `abc${1}def${2}ghi` : any +>f `abc${1}def${2}ghi`["member"] : I +>f `abc${1}def${2}ghi` : I >f : I >`abc${1}def${2}ghi` : string >1 : 1 @@ -69,7 +69,7 @@ f `abc${1}def${2}ghi`["member"]; >"member" : "member" f `abc`[0].member `abc${1}def${2}ghi`; ->f `abc`[0].member `abc${1}def${2}ghi` : any +>f `abc`[0].member `abc${1}def${2}ghi` : I >f `abc`[0].member : I >f `abc`[0] : I >f `abc` : I @@ -82,22 +82,22 @@ f `abc`[0].member `abc${1}def${2}ghi`; >2 : 2 f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; ->f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi` : any ->f `abc${1}def${2}ghi`["member"].member : any ->f `abc${1}def${2}ghi`["member"] : any ->f `abc${1}def${2}ghi` : any +>f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi` : I +>f `abc${1}def${2}ghi`["member"].member : I +>f `abc${1}def${2}ghi`["member"] : I +>f `abc${1}def${2}ghi` : I >f : I >`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 >"member" : "member" ->member : any +>member : I >`abc${1}def${2}ghi` : string >1 : 1 >2 : 2 f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi`; ->f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi` : any +>f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi` : I >f `abc${ true }def${ true }ghi`["member"].member : I >f `abc${ true }def${ true }ghi`["member"] : I >f `abc${ true }def${ true }ghi` : I diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.types index d37fc6e81d5c5..e809c1c274578 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.types @@ -29,45 +29,45 @@ function foo(...stuff: any[]): any { } var a = foo([]); // number ->a : any ->foo([]) : any +>a : never +>foo([]) : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] var b = foo([], 1); // string ->b : any ->foo([], 1) : any +>b : never +>foo([], 1) : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] >1 : 1 var c = foo([], 1, 2); // boolean ->c : any ->foo([], 1, 2) : any +>c : never +>foo([], 1, 2) : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] >1 : 1 >2 : 2 var d = foo([], 1, true); // boolean (with error) ->d : any ->foo([], 1, true) : any +>d : never +>foo([], 1, true) : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] >1 : 1 >true : true var e = foo([], 1, "2"); // {} ->e : any ->foo([], 1, "2") : any +>e : never +>foo([], 1, "2") : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] >1 : 1 >"2" : "2" var f = foo([], 1, 2, 3); // any (with error) ->f : any ->foo([], 1, 2, 3) : any +>f : never +>foo([], 1, 2, 3) : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] >1 : 1 @@ -96,8 +96,8 @@ var w = foo `${1}${2}`; // boolean >2 : 2 var x = foo `${1}${true}`; // boolean (with error) ->x : any ->foo `${1}${true}` : any +>x : never +>foo `${1}${true}` : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >`${1}${true}` : string >1 : 1 @@ -112,8 +112,8 @@ var y = foo `${1}${"2"}`; // {} >"2" : "2" var z = foo `${1}${2}${3}`; // any (with error) ->z : any ->foo `${1}${2}${3}` : any +>z : never +>foo `${1}${2}${3}` : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >`${1}${2}${3}` : string >1 : 1 diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.types index b3b0d9d2aecf5..d9cb80eb05c80 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.types @@ -29,45 +29,45 @@ function foo(...stuff: any[]): any { } var a = foo([]); // number ->a : any ->foo([]) : any +>a : never +>foo([]) : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] var b = foo([], 1); // string ->b : any ->foo([], 1) : any +>b : never +>foo([], 1) : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] >1 : 1 var c = foo([], 1, 2); // boolean ->c : any ->foo([], 1, 2) : any +>c : never +>foo([], 1, 2) : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] >1 : 1 >2 : 2 var d = foo([], 1, true); // boolean (with error) ->d : any ->foo([], 1, true) : any +>d : never +>foo([], 1, true) : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] >1 : 1 >true : true var e = foo([], 1, "2"); // {} ->e : any ->foo([], 1, "2") : any +>e : never +>foo([], 1, "2") : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] >1 : 1 >"2" : "2" var f = foo([], 1, 2, 3); // any (with error) ->f : any ->foo([], 1, 2, 3) : any +>f : never +>foo([], 1, 2, 3) : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >[] : undefined[] >1 : 1 @@ -96,8 +96,8 @@ var w = foo `${1}${2}`; // boolean >2 : 2 var x = foo `${1}${true}`; // boolean (with error) ->x : any ->foo `${1}${true}` : any +>x : never +>foo `${1}${true}` : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >`${1}${true}` : string >1 : 1 @@ -112,8 +112,8 @@ var y = foo `${1}${"2"}`; // {} >"2" : "2" var z = foo `${1}${2}${3}`; // any (with error) ->z : any ->foo `${1}${2}${3}` : any +>z : never +>foo `${1}${2}${3}` : never >foo : { (strs: TemplateStringsArray): number; (strs: TemplateStringsArray, x: number): string; (strs: TemplateStringsArray, x: number, y: number): boolean; (strs: TemplateStringsArray, x: number, y: string): {}; } >`${1}${2}${3}` : string >1 : 1 diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.types index d4e86cfee6174..138b2a162da61 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.types @@ -23,7 +23,7 @@ var s: string = fn1 `${ undefined }`; // No candidate overloads found fn1 `${ {} }`; // Error ->fn1 `${ {} }` : any +>fn1 `${ {} }` : never >fn1 : { (strs: TemplateStringsArray, s: string): string; (strs: TemplateStringsArray, n: number): number; } >`${ {} }` : string >{} : {} @@ -166,7 +166,7 @@ var n = fn3 `${ '' }${ '' }${ 3 }`; // Generic overloads with differing arity tagging with argument count that doesn't match any overload fn3 ``; // Error ->fn3 `` : any +>fn3 `` : string >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } >`` : "" diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.types b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.types index ced51d0eb3039..57d82e034ae04 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.types @@ -23,7 +23,7 @@ var s: string = fn1 `${ undefined }`; // No candidate overloads found fn1 `${ {} }`; // Error ->fn1 `${ {} }` : any +>fn1 `${ {} }` : never >fn1 : { (strs: TemplateStringsArray, s: string): string; (strs: TemplateStringsArray, n: number): number; } >`${ {} }` : string >{} : {} @@ -166,7 +166,7 @@ var n = fn3 `${ '' }${ '' }${ 3 }`; // Generic overloads with differing arity tagging with argument count that doesn't match any overload fn3 ``; // Error ->fn3 `` : any +>fn3 `` : string >fn3 : { (strs: TemplateStringsArray, n: T): string; (strs: TemplateStringsArray, s: string, t: T, u: U): U; (strs: TemplateStringsArray, v: V, u: U, t: T): number; } >`` : "" diff --git a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions3.types b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions3.types index 459c6a48777e0..dd512edab241f 100644 --- a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions3.types +++ b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions3.types @@ -8,7 +8,7 @@ function f(x: TemplateStringsArray, y: string, z: string) { // Incomplete call, not enough parameters. f `123qdawdrqw${ 1 }${ ->f `123qdawdrqw${ 1 }${ : any +>f `123qdawdrqw${ 1 }${ : void >f : (x: TemplateStringsArray, y: string, z: string) => void >`123qdawdrqw${ 1 }${ : string >1 : 1 diff --git a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions4.types b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions4.types index 748280c6b6f6b..8fb37587be28d 100644 --- a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions4.types +++ b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions4.types @@ -8,7 +8,7 @@ function f(x: TemplateStringsArray, y: string, z: string) { // Incomplete call, but too many parameters. f `123qdawdrqw${ 1 }${ }${ ->f `123qdawdrqw${ 1 }${ }${ : any +>f `123qdawdrqw${ 1 }${ }${ : void >f : (x: TemplateStringsArray, y: string, z: string) => void >`123qdawdrqw${ 1 }${ }${ : string >1 : 1 diff --git a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions5.types b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions5.types index db4ebe00d376c..b83f6fd5770ed 100644 --- a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions5.types +++ b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions5.types @@ -8,7 +8,7 @@ function f(x: TemplateStringsArray, y: string, z: string) { // Incomplete call, but too many parameters. f `123qdawdrqw${ 1 }${ 2 }${ ->f `123qdawdrqw${ 1 }${ 2 }${ : any +>f `123qdawdrqw${ 1 }${ 2 }${ : void >f : (x: TemplateStringsArray, y: string, z: string) => void >`123qdawdrqw${ 1 }${ 2 }${ : string >1 : 1 diff --git a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions6.types b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions6.types index 3f2c09341c7bf..6c73c0e59a093 100644 --- a/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions6.types +++ b/tests/baselines/reference/taggedTemplatesWithIncompleteTemplateExpressions6.types @@ -8,7 +8,7 @@ function f(x: TemplateStringsArray, y: string, z: string) { // Incomplete call, not enough parameters, at EOF. f `123qdawdrqw${ 1 }${ ->f `123qdawdrqw${ 1 }${ : any +>f `123qdawdrqw${ 1 }${ : void >f : (x: TemplateStringsArray, y: string, z: string) => void >`123qdawdrqw${ 1 }${ : string >1 : 1 diff --git a/tests/baselines/reference/taggedTemplatesWithTypeArguments2.errors.txt b/tests/baselines/reference/taggedTemplatesWithTypeArguments2.errors.txt index 3e451b0b3d7cb..1c64f402c48cc 100644 --- a/tests/baselines/reference/taggedTemplatesWithTypeArguments2.errors.txt +++ b/tests/baselines/reference/taggedTemplatesWithTypeArguments2.errors.txt @@ -1,5 +1,6 @@ tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,30): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'. tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,11): error TS2347: Untyped function calls may not accept type arguments. +tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,11): error TS2347: Untyped function calls may not accept type arguments. tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,30): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'. tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(35,5): error TS2377: Constructors for derived classes must contain a 'super' call. tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(36,9): error TS17011: 'super' must be called before accessing a property of 'super' in the constructor of a derived class. @@ -7,7 +8,7 @@ tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(36,14 tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(36,34): error TS1034: 'super' must be followed by an argument list or member access. -==== tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts (7 errors) ==== +==== tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts (8 errors) ==== export interface SomethingTaggable { (t: TemplateStringsArray, ...args: T[]): SomethingNewable; } @@ -29,6 +30,8 @@ tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(36,34 !!! error TS2347: Untyped function calls may not accept type arguments. const d = new tag `${"hello"} ${"world"}`(100, 200); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2347: Untyped function calls may not accept type arguments. ~~~~~~~ !!! error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'. diff --git a/tests/baselines/reference/taggedTemplatesWithTypeArguments2.types b/tests/baselines/reference/taggedTemplatesWithTypeArguments2.types index bcb1a3c1e269c..c78719846cf72 100644 --- a/tests/baselines/reference/taggedTemplatesWithTypeArguments2.types +++ b/tests/baselines/reference/taggedTemplatesWithTypeArguments2.types @@ -27,7 +27,7 @@ const a = new tag `${100} ${200}`("hello", "world"); const b = new tag `${"hello"} ${"world"}`(100, 200); >b : any >new tag `${"hello"} ${"world"}`(100, 200) : any ->tag `${"hello"} ${"world"}` : any +>tag `${"hello"} ${"world"}` : SomethingNewable >tag : SomethingTaggable >`${"hello"} ${"world"}` : string >"hello" : "hello" @@ -51,7 +51,7 @@ const d = new tag `${"hello"} ${"world"}`(100, 200); >d : any >new tag `${"hello"} ${"world"}`(100, 200) : any >new tag `${"hello"} ${"world"}` : any ->tag `${"hello"} ${"world"}` : any +>tag `${"hello"} ${"world"}` : SomethingNewable >tag : SomethingTaggable >`${"hello"} ${"world"}` : string >"hello" : "hello" diff --git a/tests/baselines/reference/targetEs6DecoratorMetadataImportNotElided.js b/tests/baselines/reference/targetEs6DecoratorMetadataImportNotElided.js index b2126326793a2..d4781b57b5ca5 100644 --- a/tests/baselines/reference/targetEs6DecoratorMetadataImportNotElided.js +++ b/tests/baselines/reference/targetEs6DecoratorMetadataImportNotElided.js @@ -41,7 +41,7 @@ var MyComponent = /** @class */ (function () { Object.defineProperty(MyComponent.prototype, "ref", { get: function () { return this._ref; }, set: function (value) { this._ref = value; }, - enumerable: true, + enumerable: false, configurable: true }); __decorate([ diff --git a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types index 0ec0230668dac..2d807f4ec7d33 100644 --- a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types +++ b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types @@ -4,15 +4,15 @@ class C { public foo() { [1,2,3].map((x) => { return this; })} >foo : () => void ->[1,2,3].map((x) => { return this; }) : any +>[1,2,3].map((x) => { return this; }) : any[] >[1,2,3].map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >[1,2,3] : number[] >1 : 1 >2 : 2 >3 : 3 >map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] ->(x) => { return this; } : (x: any) => this ->x : any +>(x) => { return this; } : (x: number) => this +>x : number >this : this } diff --git a/tests/baselines/reference/thisInAccessors.js b/tests/baselines/reference/thisInAccessors.js index 739cc183affc7..5419586004302 100644 --- a/tests/baselines/reference/thisInAccessors.js +++ b/tests/baselines/reference/thisInAccessors.js @@ -43,7 +43,7 @@ var GetterOnly = /** @class */ (function () { }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return GetterOnly; @@ -60,7 +60,7 @@ var SetterOnly = /** @class */ (function () { var _this = this; var fn = function () { return _this; }; }, - enumerable: true, + enumerable: false, configurable: true }); return SetterOnly; @@ -79,7 +79,7 @@ var GetterAndSetter = /** @class */ (function () { var _this = this; var fn = function () { return _this; }; }, - enumerable: true, + enumerable: false, configurable: true }); return GetterAndSetter; diff --git a/tests/baselines/reference/thisInClassBodyStaticESNext.js b/tests/baselines/reference/thisInClassBodyStaticESNext.js new file mode 100644 index 0000000000000..915ae5e67d0a8 --- /dev/null +++ b/tests/baselines/reference/thisInClassBodyStaticESNext.js @@ -0,0 +1,23 @@ +//// [thisInClassBodyStaticESNext.ts] +// all are allowed with es-compliant class field emit +class Foo { + x = this + static t = this + static at = () => this + static ft = function () { return this } + static mt() { return this } +} + + +//// [thisInClassBodyStaticESNext.js] +// all are allowed with es-compliant class field emit +const Foo = /** @class */ (() => { + class Foo { + x = this; + static t = this; + static at = () => this; + static ft = function () { return this; }; + static mt() { return this; } + } + return Foo; +})(); diff --git a/tests/baselines/reference/thisInClassBodyStaticESNext.symbols b/tests/baselines/reference/thisInClassBodyStaticESNext.symbols new file mode 100644 index 0000000000000..7dc9767ccdff8 --- /dev/null +++ b/tests/baselines/reference/thisInClassBodyStaticESNext.symbols @@ -0,0 +1,25 @@ +=== tests/cases/compiler/thisInClassBodyStaticESNext.ts === +// all are allowed with es-compliant class field emit +class Foo { +>Foo : Symbol(Foo, Decl(thisInClassBodyStaticESNext.ts, 0, 0)) + + x = this +>x : Symbol(Foo.x, Decl(thisInClassBodyStaticESNext.ts, 1, 11)) +>this : Symbol(Foo, Decl(thisInClassBodyStaticESNext.ts, 0, 0)) + + static t = this +>t : Symbol(Foo.t, Decl(thisInClassBodyStaticESNext.ts, 2, 12)) +>this : Symbol(Foo, Decl(thisInClassBodyStaticESNext.ts, 0, 0)) + + static at = () => this +>at : Symbol(Foo.at, Decl(thisInClassBodyStaticESNext.ts, 3, 19)) +>this : Symbol(Foo, Decl(thisInClassBodyStaticESNext.ts, 0, 0)) + + static ft = function () { return this } +>ft : Symbol(Foo.ft, Decl(thisInClassBodyStaticESNext.ts, 4, 26)) + + static mt() { return this } +>mt : Symbol(Foo.mt, Decl(thisInClassBodyStaticESNext.ts, 5, 43)) +>this : Symbol(Foo, Decl(thisInClassBodyStaticESNext.ts, 0, 0)) +} + diff --git a/tests/baselines/reference/thisInClassBodyStaticESNext.types b/tests/baselines/reference/thisInClassBodyStaticESNext.types new file mode 100644 index 0000000000000..152e3a0748a48 --- /dev/null +++ b/tests/baselines/reference/thisInClassBodyStaticESNext.types @@ -0,0 +1,28 @@ +=== tests/cases/compiler/thisInClassBodyStaticESNext.ts === +// all are allowed with es-compliant class field emit +class Foo { +>Foo : Foo + + x = this +>x : this +>this : this + + static t = this +>t : typeof Foo +>this : typeof Foo + + static at = () => this +>at : () => typeof Foo +>() => this : () => typeof Foo +>this : typeof Foo + + static ft = function () { return this } +>ft : () => any +>function () { return this } : () => any +>this : any + + static mt() { return this } +>mt : () => typeof Foo +>this : typeof Foo +} + diff --git a/tests/baselines/reference/thisInStatics.js b/tests/baselines/reference/thisInStatics.js index dfb0dc19f877c..9e3f7a468ae55 100644 --- a/tests/baselines/reference/thisInStatics.js +++ b/tests/baselines/reference/thisInStatics.js @@ -22,7 +22,7 @@ var C = /** @class */ (function () { var y /*2*/ = this; return y; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/thisTypeAccessibility.errors.txt b/tests/baselines/reference/thisTypeAccessibility.errors.txt index 915d6f20b8230..63859d003d27d 100644 --- a/tests/baselines/reference/thisTypeAccessibility.errors.txt +++ b/tests/baselines/reference/thisTypeAccessibility.errors.txt @@ -1,15 +1,18 @@ -tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(17,10): error TS2341: Property 'p' is private and only accessible within class 'MyClass'. -tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(20,13): error TS2341: Property 'sp' is private and only accessible within class 'MyClass'. -tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(21,13): error TS2445: Property 'spp' is protected and only accessible within class 'MyClass' and its subclasses. tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(26,10): error TS2341: Property 'p' is private and only accessible within class 'MyClass'. tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(29,13): error TS2341: Property 'sp' is private and only accessible within class 'MyClass'. tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(30,13): error TS2445: Property 'spp' is protected and only accessible within class 'MyClass' and its subclasses. tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(35,10): error TS2341: Property 'p' is private and only accessible within class 'MyClass'. tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(38,13): error TS2341: Property 'sp' is private and only accessible within class 'MyClass'. tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(39,13): error TS2445: Property 'spp' is protected and only accessible within class 'MyClass' and its subclasses. +tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(44,10): error TS2341: Property 'p' is private and only accessible within class 'MyClass'. +tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(47,13): error TS2341: Property 'sp' is private and only accessible within class 'MyClass'. +tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(48,13): error TS2445: Property 'spp' is protected and only accessible within class 'MyClass' and its subclasses. +tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(55,10): error TS2341: Property 'p' is private and only accessible within class 'MyGenericClass'. +tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(58,20): error TS2341: Property 'sp' is private and only accessible within class 'MyGenericClass'. +tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(59,20): error TS2445: Property 'spp' is protected and only accessible within class 'MyGenericClass' and its subclasses. -==== tests/cases/conformance/types/thisType/thisTypeAccessibility.ts (9 errors) ==== +==== tests/cases/conformance/types/thisType/thisTypeAccessibility.ts (12 errors) ==== class MyClass { private p: number = 123; protected pp: number = 123; @@ -25,6 +28,15 @@ tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(39,13): error TS extension3(p: number): void; } + class MyGenericClass { + private p: T; + protected pp: T; + public ppp: T; + private static sp: number; + protected static spp: number; + public static sppp: number; + } + MyClass.prototype.extension1 = function (this: MyClass, p: number) { this.p = p; ~ @@ -71,4 +83,19 @@ tests/cases/conformance/types/thisType/thisTypeAccessibility.ts(39,13): error TS } MyClass.prototype.extension3 = extension3; + + function extension4(this: MyGenericClass, p: T) { + this.p = p; + ~ +!!! error TS2341: Property 'p' is private and only accessible within class 'MyGenericClass'. + this.pp = p; + this.ppp = p; + MyGenericClass.sp = p; + ~~ +!!! error TS2341: Property 'sp' is private and only accessible within class 'MyGenericClass'. + MyGenericClass.spp = p; + ~~~ +!!! error TS2445: Property 'spp' is protected and only accessible within class 'MyGenericClass' and its subclasses. + MyGenericClass.sppp = p; + } \ No newline at end of file diff --git a/tests/baselines/reference/thisTypeAccessibility.js b/tests/baselines/reference/thisTypeAccessibility.js index 04340cebcd3ca..0f39317460ac0 100644 --- a/tests/baselines/reference/thisTypeAccessibility.js +++ b/tests/baselines/reference/thisTypeAccessibility.js @@ -14,6 +14,15 @@ interface MyClass { extension3(p: number): void; } +class MyGenericClass { + private p: T; + protected pp: T; + public ppp: T; + private static sp: number; + protected static spp: number; + public static sppp: number; +} + MyClass.prototype.extension1 = function (this: MyClass, p: number) { this.p = p; this.pp = p; @@ -42,6 +51,15 @@ function extension3 (this: T, p: number) { } MyClass.prototype.extension3 = extension3; + +function extension4(this: MyGenericClass, p: T) { + this.p = p; + this.pp = p; + this.ppp = p; + MyGenericClass.sp = p; + MyGenericClass.spp = p; + MyGenericClass.sppp = p; +} //// [thisTypeAccessibility.js] @@ -56,6 +74,11 @@ var MyClass = /** @class */ (function () { MyClass.sppp = 123; return MyClass; }()); +var MyGenericClass = /** @class */ (function () { + function MyGenericClass() { + } + return MyGenericClass; +}()); MyClass.prototype.extension1 = function (p) { this.p = p; this.pp = p; @@ -81,3 +104,11 @@ function extension3(p) { MyClass.sppp = p; } MyClass.prototype.extension3 = extension3; +function extension4(p) { + this.p = p; + this.pp = p; + this.ppp = p; + MyGenericClass.sp = p; + MyGenericClass.spp = p; + MyGenericClass.sppp = p; +} diff --git a/tests/baselines/reference/thisTypeAccessibility.symbols b/tests/baselines/reference/thisTypeAccessibility.symbols index bbb62fa57bc2e..eeb86117b3d64 100644 --- a/tests/baselines/reference/thisTypeAccessibility.symbols +++ b/tests/baselines/reference/thisTypeAccessibility.symbols @@ -37,51 +37,77 @@ interface MyClass { >p : Symbol(p, Decl(thisTypeAccessibility.ts, 12, 15)) } +class MyGenericClass { +>MyGenericClass : Symbol(MyGenericClass, Decl(thisTypeAccessibility.ts, 13, 1)) +>T : Symbol(T, Decl(thisTypeAccessibility.ts, 15, 21)) + + private p: T; +>p : Symbol(MyGenericClass.p, Decl(thisTypeAccessibility.ts, 15, 25)) +>T : Symbol(T, Decl(thisTypeAccessibility.ts, 15, 21)) + + protected pp: T; +>pp : Symbol(MyGenericClass.pp, Decl(thisTypeAccessibility.ts, 16, 17)) +>T : Symbol(T, Decl(thisTypeAccessibility.ts, 15, 21)) + + public ppp: T; +>ppp : Symbol(MyGenericClass.ppp, Decl(thisTypeAccessibility.ts, 17, 20)) +>T : Symbol(T, Decl(thisTypeAccessibility.ts, 15, 21)) + + private static sp: number; +>sp : Symbol(MyGenericClass.sp, Decl(thisTypeAccessibility.ts, 18, 18)) + + protected static spp: number; +>spp : Symbol(MyGenericClass.spp, Decl(thisTypeAccessibility.ts, 19, 30)) + + public static sppp: number; +>sppp : Symbol(MyGenericClass.sppp, Decl(thisTypeAccessibility.ts, 20, 33)) +} + MyClass.prototype.extension1 = function (this: MyClass, p: number) { >MyClass.prototype.extension1 : Symbol(MyClass.extension1, Decl(thisTypeAccessibility.ts, 9, 19)) >MyClass.prototype : Symbol(MyClass.prototype) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >prototype : Symbol(MyClass.prototype) >extension1 : Symbol(MyClass.extension1, Decl(thisTypeAccessibility.ts, 9, 19)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 15, 41)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 24, 41)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 15, 55)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 55)) this.p = p; >this.p : Symbol(MyClass.p, Decl(thisTypeAccessibility.ts, 0, 15)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 15, 41)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 24, 41)) >p : Symbol(MyClass.p, Decl(thisTypeAccessibility.ts, 0, 15)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 15, 55)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 55)) this.pp = p; >this.pp : Symbol(MyClass.pp, Decl(thisTypeAccessibility.ts, 1, 28)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 15, 41)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 24, 41)) >pp : Symbol(MyClass.pp, Decl(thisTypeAccessibility.ts, 1, 28)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 15, 55)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 55)) this.ppp = p; >this.ppp : Symbol(MyClass.ppp, Decl(thisTypeAccessibility.ts, 2, 31)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 15, 41)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 24, 41)) >ppp : Symbol(MyClass.ppp, Decl(thisTypeAccessibility.ts, 2, 31)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 15, 55)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 55)) MyClass.sp = p; >MyClass.sp : Symbol(MyClass.sp, Decl(thisTypeAccessibility.ts, 3, 29)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >sp : Symbol(MyClass.sp, Decl(thisTypeAccessibility.ts, 3, 29)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 15, 55)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 55)) MyClass.spp = p; >MyClass.spp : Symbol(MyClass.spp, Decl(thisTypeAccessibility.ts, 4, 36)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >spp : Symbol(MyClass.spp, Decl(thisTypeAccessibility.ts, 4, 36)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 15, 55)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 55)) MyClass.sppp = p; >MyClass.sppp : Symbol(MyClass.sppp, Decl(thisTypeAccessibility.ts, 5, 39)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >sppp : Symbol(MyClass.sppp, Decl(thisTypeAccessibility.ts, 5, 39)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 15, 55)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 55)) } MyClass.prototype.extension2 = function (this: T, p: number) { @@ -90,92 +116,92 @@ MyClass.prototype.extension2 = function (this: T, p: number) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >prototype : Symbol(MyClass.prototype) >extension2 : Symbol(MyClass.extension2, Decl(thisTypeAccessibility.ts, 10, 32)) ->T : Symbol(T, Decl(thisTypeAccessibility.ts, 24, 40)) +>T : Symbol(T, Decl(thisTypeAccessibility.ts, 33, 40)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 24, 60)) ->T : Symbol(T, Decl(thisTypeAccessibility.ts, 24, 40)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 68)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 33, 60)) +>T : Symbol(T, Decl(thisTypeAccessibility.ts, 33, 40)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 68)) this.p = p; >this.p : Symbol(MyClass.p, Decl(thisTypeAccessibility.ts, 0, 15)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 24, 60)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 33, 60)) >p : Symbol(MyClass.p, Decl(thisTypeAccessibility.ts, 0, 15)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 68)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 68)) this.pp = p; >this.pp : Symbol(MyClass.pp, Decl(thisTypeAccessibility.ts, 1, 28)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 24, 60)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 33, 60)) >pp : Symbol(MyClass.pp, Decl(thisTypeAccessibility.ts, 1, 28)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 68)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 68)) this.ppp = p; >this.ppp : Symbol(MyClass.ppp, Decl(thisTypeAccessibility.ts, 2, 31)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 24, 60)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 33, 60)) >ppp : Symbol(MyClass.ppp, Decl(thisTypeAccessibility.ts, 2, 31)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 68)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 68)) MyClass.sp = p; >MyClass.sp : Symbol(MyClass.sp, Decl(thisTypeAccessibility.ts, 3, 29)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >sp : Symbol(MyClass.sp, Decl(thisTypeAccessibility.ts, 3, 29)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 68)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 68)) MyClass.spp = p; >MyClass.spp : Symbol(MyClass.spp, Decl(thisTypeAccessibility.ts, 4, 36)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >spp : Symbol(MyClass.spp, Decl(thisTypeAccessibility.ts, 4, 36)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 68)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 68)) MyClass.sppp = p; >MyClass.sppp : Symbol(MyClass.sppp, Decl(thisTypeAccessibility.ts, 5, 39)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >sppp : Symbol(MyClass.sppp, Decl(thisTypeAccessibility.ts, 5, 39)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 24, 68)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 68)) } function extension3 (this: T, p: number) { ->extension3 : Symbol(extension3, Decl(thisTypeAccessibility.ts, 31, 1)) ->T : Symbol(T, Decl(thisTypeAccessibility.ts, 33, 20)) +>extension3 : Symbol(extension3, Decl(thisTypeAccessibility.ts, 40, 1)) +>T : Symbol(T, Decl(thisTypeAccessibility.ts, 42, 20)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 33, 40)) ->T : Symbol(T, Decl(thisTypeAccessibility.ts, 33, 20)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 48)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 42, 40)) +>T : Symbol(T, Decl(thisTypeAccessibility.ts, 42, 20)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 42, 48)) this.p = p; >this.p : Symbol(MyClass.p, Decl(thisTypeAccessibility.ts, 0, 15)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 33, 40)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 42, 40)) >p : Symbol(MyClass.p, Decl(thisTypeAccessibility.ts, 0, 15)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 48)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 42, 48)) this.pp = p; >this.pp : Symbol(MyClass.pp, Decl(thisTypeAccessibility.ts, 1, 28)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 33, 40)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 42, 40)) >pp : Symbol(MyClass.pp, Decl(thisTypeAccessibility.ts, 1, 28)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 48)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 42, 48)) this.ppp = p; >this.ppp : Symbol(MyClass.ppp, Decl(thisTypeAccessibility.ts, 2, 31)) ->this : Symbol(this, Decl(thisTypeAccessibility.ts, 33, 40)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 42, 40)) >ppp : Symbol(MyClass.ppp, Decl(thisTypeAccessibility.ts, 2, 31)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 48)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 42, 48)) MyClass.sp = p; >MyClass.sp : Symbol(MyClass.sp, Decl(thisTypeAccessibility.ts, 3, 29)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >sp : Symbol(MyClass.sp, Decl(thisTypeAccessibility.ts, 3, 29)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 48)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 42, 48)) MyClass.spp = p; >MyClass.spp : Symbol(MyClass.spp, Decl(thisTypeAccessibility.ts, 4, 36)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >spp : Symbol(MyClass.spp, Decl(thisTypeAccessibility.ts, 4, 36)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 48)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 42, 48)) MyClass.sppp = p; >MyClass.sppp : Symbol(MyClass.sppp, Decl(thisTypeAccessibility.ts, 5, 39)) >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >sppp : Symbol(MyClass.sppp, Decl(thisTypeAccessibility.ts, 5, 39)) ->p : Symbol(p, Decl(thisTypeAccessibility.ts, 33, 48)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 42, 48)) } MyClass.prototype.extension3 = extension3; @@ -184,5 +210,51 @@ MyClass.prototype.extension3 = extension3; >MyClass : Symbol(MyClass, Decl(thisTypeAccessibility.ts, 0, 0), Decl(thisTypeAccessibility.ts, 7, 1)) >prototype : Symbol(MyClass.prototype) >extension3 : Symbol(MyClass.extension3, Decl(thisTypeAccessibility.ts, 11, 32)) ->extension3 : Symbol(extension3, Decl(thisTypeAccessibility.ts, 31, 1)) +>extension3 : Symbol(extension3, Decl(thisTypeAccessibility.ts, 40, 1)) + +function extension4(this: MyGenericClass, p: T) { +>extension4 : Symbol(extension4, Decl(thisTypeAccessibility.ts, 51, 42)) +>T : Symbol(T, Decl(thisTypeAccessibility.ts, 53, 20)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 53, 38)) +>MyGenericClass : Symbol(MyGenericClass, Decl(thisTypeAccessibility.ts, 13, 1)) +>T : Symbol(T, Decl(thisTypeAccessibility.ts, 53, 20)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 53, 62)) +>T : Symbol(T, Decl(thisTypeAccessibility.ts, 53, 20)) + + this.p = p; +>this.p : Symbol(MyGenericClass.p, Decl(thisTypeAccessibility.ts, 15, 25)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 53, 38)) +>p : Symbol(MyGenericClass.p, Decl(thisTypeAccessibility.ts, 15, 25)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 53, 62)) + + this.pp = p; +>this.pp : Symbol(MyGenericClass.pp, Decl(thisTypeAccessibility.ts, 16, 17)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 53, 38)) +>pp : Symbol(MyGenericClass.pp, Decl(thisTypeAccessibility.ts, 16, 17)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 53, 62)) + + this.ppp = p; +>this.ppp : Symbol(MyGenericClass.ppp, Decl(thisTypeAccessibility.ts, 17, 20)) +>this : Symbol(this, Decl(thisTypeAccessibility.ts, 53, 38)) +>ppp : Symbol(MyGenericClass.ppp, Decl(thisTypeAccessibility.ts, 17, 20)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 53, 62)) + + MyGenericClass.sp = p; +>MyGenericClass.sp : Symbol(MyGenericClass.sp, Decl(thisTypeAccessibility.ts, 18, 18)) +>MyGenericClass : Symbol(MyGenericClass, Decl(thisTypeAccessibility.ts, 13, 1)) +>sp : Symbol(MyGenericClass.sp, Decl(thisTypeAccessibility.ts, 18, 18)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 53, 62)) + + MyGenericClass.spp = p; +>MyGenericClass.spp : Symbol(MyGenericClass.spp, Decl(thisTypeAccessibility.ts, 19, 30)) +>MyGenericClass : Symbol(MyGenericClass, Decl(thisTypeAccessibility.ts, 13, 1)) +>spp : Symbol(MyGenericClass.spp, Decl(thisTypeAccessibility.ts, 19, 30)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 53, 62)) + + MyGenericClass.sppp = p; +>MyGenericClass.sppp : Symbol(MyGenericClass.sppp, Decl(thisTypeAccessibility.ts, 20, 33)) +>MyGenericClass : Symbol(MyGenericClass, Decl(thisTypeAccessibility.ts, 13, 1)) +>sppp : Symbol(MyGenericClass.sppp, Decl(thisTypeAccessibility.ts, 20, 33)) +>p : Symbol(p, Decl(thisTypeAccessibility.ts, 53, 62)) +} diff --git a/tests/baselines/reference/thisTypeAccessibility.types b/tests/baselines/reference/thisTypeAccessibility.types index d1cef769eb1b2..819150bf350a1 100644 --- a/tests/baselines/reference/thisTypeAccessibility.types +++ b/tests/baselines/reference/thisTypeAccessibility.types @@ -41,6 +41,28 @@ interface MyClass { >p : number } +class MyGenericClass { +>MyGenericClass : MyGenericClass + + private p: T; +>p : T + + protected pp: T; +>pp : T + + public ppp: T; +>ppp : T + + private static sp: number; +>sp : number + + protected static spp: number; +>spp : number + + public static sppp: number; +>sppp : number +} + MyClass.prototype.extension1 = function (this: MyClass, p: number) { >MyClass.prototype.extension1 = function (this: MyClass, p: number) { this.p = p; this.pp = p; this.ppp = p; MyClass.sp = p; MyClass.spp = p; MyClass.sppp = p;} : (this: MyClass, p: number) => void >MyClass.prototype.extension1 : (p: number) => void @@ -206,3 +228,51 @@ MyClass.prototype.extension3 = extension3; >extension3 : (p: number) => void >extension3 : (this: T, p: number) => void +function extension4(this: MyGenericClass, p: T) { +>extension4 : (this: MyGenericClass, p: T) => void +>this : MyGenericClass +>p : T + + this.p = p; +>this.p = p : T +>this.p : T +>this : MyGenericClass +>p : T +>p : T + + this.pp = p; +>this.pp = p : T +>this.pp : T +>this : MyGenericClass +>pp : T +>p : T + + this.ppp = p; +>this.ppp = p : T +>this.ppp : T +>this : MyGenericClass +>ppp : T +>p : T + + MyGenericClass.sp = p; +>MyGenericClass.sp = p : T +>MyGenericClass.sp : number +>MyGenericClass : typeof MyGenericClass +>sp : number +>p : T + + MyGenericClass.spp = p; +>MyGenericClass.spp = p : T +>MyGenericClass.spp : number +>MyGenericClass : typeof MyGenericClass +>spp : number +>p : T + + MyGenericClass.sppp = p; +>MyGenericClass.sppp = p : T +>MyGenericClass.sppp : number +>MyGenericClass : typeof MyGenericClass +>sppp : number +>p : T +} + diff --git a/tests/baselines/reference/thisTypeInAccessors.js b/tests/baselines/reference/thisTypeInAccessors.js index bae75af559977..121d548bd16d1 100644 --- a/tests/baselines/reference/thisTypeInAccessors.js +++ b/tests/baselines/reference/thisTypeInAccessors.js @@ -64,7 +64,7 @@ var Explicit = /** @class */ (function () { Object.defineProperty(Explicit.prototype, "x", { get: function () { return this.n; }, set: function (n) { this.n = n; }, - enumerable: true, + enumerable: false, configurable: true }); return Explicit; @@ -76,7 +76,7 @@ var Contextual = /** @class */ (function () { Object.defineProperty(Contextual.prototype, "x", { get: function () { return this.n; } // inside a class, so already correct , - enumerable: true, + enumerable: false, configurable: true }); return Contextual; diff --git a/tests/baselines/reference/tooManyTypeParameters1.types b/tests/baselines/reference/tooManyTypeParameters1.types index c14b3c2158c8a..4b2f743e4eb70 100644 --- a/tests/baselines/reference/tooManyTypeParameters1.types +++ b/tests/baselines/reference/tooManyTypeParameters1.types @@ -3,7 +3,7 @@ function f() { } >f : () => void f(); ->f() : any +>f() : void >f : () => void var x = () => {}; @@ -11,15 +11,15 @@ var x = () => {}; >() => {} : () => void x(); ->x() : any +>x() : void >x : () => void class C {} >C : C var c = new C(); ->c : any ->new C() : any +>c : C +>new C() : C >C : typeof C interface I {} diff --git a/tests/baselines/reference/topLevelFileModule.js b/tests/baselines/reference/topLevelFileModule.js index 8ff74cc89f48e..83b1a338af05f 100644 --- a/tests/baselines/reference/topLevelFileModule.js +++ b/tests/baselines/reference/topLevelFileModule.js @@ -15,6 +15,7 @@ var z = foo.x + fum.y; //// [foo_0.js] "use strict"; exports.__esModule = true; +exports.x = void 0; //// [foo_1.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments.js b/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments.js index 3f803038ec937..0484c062321a7 100644 --- a/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments.js +++ b/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments.js @@ -50,7 +50,7 @@ var X = /** @class */ (function () { Object.defineProperty(X.prototype, "x", { // See trailingCommasInGetter.ts set: function (value) { }, - enumerable: true, + enumerable: false, configurable: true }); return X; diff --git a/tests/baselines/reference/trailingCommasInGetter.js b/tests/baselines/reference/trailingCommasInGetter.js index 3151729a66ad4..4d24414720e7c 100644 --- a/tests/baselines/reference/trailingCommasInGetter.js +++ b/tests/baselines/reference/trailingCommasInGetter.js @@ -10,7 +10,7 @@ var X = /** @class */ (function () { } Object.defineProperty(X.prototype, "x", { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); return X; diff --git a/tests/baselines/reference/transformApi/transformsCorrectly.rewrittenNamespaceFollowingClass.js b/tests/baselines/reference/transformApi/transformsCorrectly.rewrittenNamespaceFollowingClass.js index 3f2dd6cdb56fb..26c058477ea1e 100644 --- a/tests/baselines/reference/transformApi/transformsCorrectly.rewrittenNamespaceFollowingClass.js +++ b/tests/baselines/reference/transformApi/transformsCorrectly.rewrittenNamespaceFollowingClass.js @@ -1,9 +1,12 @@ -class C { - constructor() { - this.foo = 10; +const C = /** @class */ (() => { + class C { + constructor() { + this.foo = 10; + } } -} -C.bar = 20; + C.bar = 20; + return C; +})(); (function (C) { C.x = 10; })(C || (C = {})); diff --git a/tests/baselines/reference/transformApi/transformsCorrectly.transformAddCommentToImport.js b/tests/baselines/reference/transformApi/transformsCorrectly.transformAddCommentToImport.js index de19b854d20a7..22bf3831e269d 100644 --- a/tests/baselines/reference/transformApi/transformsCorrectly.transformAddCommentToImport.js +++ b/tests/baselines/reference/transformApi/transformsCorrectly.transformAddCommentToImport.js @@ -1,16 +1,23 @@ "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } Object.defineProperty(exports, "__esModule", { value: true }); /*comment*/ var somewhere_1 = require("somewhere"); -exports.Value = somewhere_1.Value; +Object.defineProperty(exports, "Value", { enumerable: true, get: function () { return somewhere_1.Value; } }); /*comment*/ var somewhere_2 = require("somewhere"); /*comment*/ -exports.X = somewhere_2.X; +Object.defineProperty(exports, "X", { enumerable: true, get: function () { return somewhere_2.X; } }); /*comment*/ -exports.Y = somewhere_2.Y; +Object.defineProperty(exports, "Y", { enumerable: true, get: function () { return somewhere_2.Y; } }); /*comment*/ -__export(require("somewhere")); +__exportStar(require("somewhere"), exports); diff --git a/tests/baselines/reference/transformApi/transformsCorrectly.transformAddCommentToProperties.js b/tests/baselines/reference/transformApi/transformsCorrectly.transformAddCommentToProperties.js index d5f27d7148c6e..efe8b5346e2e8 100644 --- a/tests/baselines/reference/transformApi/transformsCorrectly.transformAddCommentToProperties.js +++ b/tests/baselines/reference/transformApi/transformsCorrectly.transformAddCommentToProperties.js @@ -1,12 +1,16 @@ /*comment*/ -class Clazz { +const Clazz = /** @class */ (() => { /*comment*/ - constructor(/*comment*/ - field = 1) { - this.field = field; + class Clazz { /*comment*/ - this.instanceProp = 2; + constructor(/*comment*/ + field = 1) { + this.field = field; + /*comment*/ + this.instanceProp = 2; + } } -} -/*comment*/ -Clazz.staticProp = 1; + /*comment*/ + Clazz.staticProp = 1; + return Clazz; +})(); diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion1.errors.txt b/tests/baselines/reference/truthinessCallExpressionCoercion1.errors.txt new file mode 100644 index 0000000000000..6a32d1f050aa2 --- /dev/null +++ b/tests/baselines/reference/truthinessCallExpressionCoercion1.errors.txt @@ -0,0 +1,85 @@ +tests/cases/compiler/truthinessCallExpressionCoercion1.ts(3,5): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion1.ts(19,5): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion1.ts(33,5): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion1.ts(46,5): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion1.ts(61,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + + +==== tests/cases/compiler/truthinessCallExpressionCoercion1.ts (5 errors) ==== + function onlyErrorsWhenTestingNonNullableFunctionType(required: () => boolean, optional?: () => boolean) { + // error + required ? console.log('required') : undefined; + ~~~~~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + + // ok + optional ? console.log('optional') : undefined; + + // ok + !!required ? console.log('not required') : undefined; + + // ok + required() ? console.log('required call') : undefined; + } + + function onlyErrorsWhenUnusedInBody() { + function test() { return Math.random() > 0.5; } + + // error + test ? console.log('test') : undefined; + ~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + + // ok + test ? console.log(test) : undefined; + + // ok + test ? test() : undefined; + + // ok + test + ? [() => null].forEach(() => { test(); }) + : undefined; + + // error + test + ~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + ? [() => null].forEach(test => { test() }) + : undefined; + } + + function checksPropertyAccess() { + const x = { + foo: { + bar() { return true; } + } + } + + // error + x.foo.bar ? console.log('x.foo.bar') : undefined; + ~~~~~~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + + // ok + x.foo.bar ? x.foo.bar : undefined; + } + + class Foo { + maybeIsUser?: () => boolean; + + isUser() { + return true; + } + + test() { + // error + this.isUser ? console.log('this.isUser') : undefined; + ~~~~~~~~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + + // ok + this.maybeIsUser ? console.log('this.maybeIsUser') : undefined; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion1.js b/tests/baselines/reference/truthinessCallExpressionCoercion1.js new file mode 100644 index 0000000000000..4415cedf59601 --- /dev/null +++ b/tests/baselines/reference/truthinessCallExpressionCoercion1.js @@ -0,0 +1,122 @@ +//// [truthinessCallExpressionCoercion1.ts] +function onlyErrorsWhenTestingNonNullableFunctionType(required: () => boolean, optional?: () => boolean) { + // error + required ? console.log('required') : undefined; + + // ok + optional ? console.log('optional') : undefined; + + // ok + !!required ? console.log('not required') : undefined; + + // ok + required() ? console.log('required call') : undefined; +} + +function onlyErrorsWhenUnusedInBody() { + function test() { return Math.random() > 0.5; } + + // error + test ? console.log('test') : undefined; + + // ok + test ? console.log(test) : undefined; + + // ok + test ? test() : undefined; + + // ok + test + ? [() => null].forEach(() => { test(); }) + : undefined; + + // error + test + ? [() => null].forEach(test => { test() }) + : undefined; +} + +function checksPropertyAccess() { + const x = { + foo: { + bar() { return true; } + } + } + + // error + x.foo.bar ? console.log('x.foo.bar') : undefined; + + // ok + x.foo.bar ? x.foo.bar : undefined; +} + +class Foo { + maybeIsUser?: () => boolean; + + isUser() { + return true; + } + + test() { + // error + this.isUser ? console.log('this.isUser') : undefined; + + // ok + this.maybeIsUser ? console.log('this.maybeIsUser') : undefined; + } +} + + +//// [truthinessCallExpressionCoercion1.js] +function onlyErrorsWhenTestingNonNullableFunctionType(required, optional) { + // error + required ? console.log('required') : undefined; + // ok + optional ? console.log('optional') : undefined; + // ok + !!required ? console.log('not required') : undefined; + // ok + required() ? console.log('required call') : undefined; +} +function onlyErrorsWhenUnusedInBody() { + function test() { return Math.random() > 0.5; } + // error + test ? console.log('test') : undefined; + // ok + test ? console.log(test) : undefined; + // ok + test ? test() : undefined; + // ok + test + ? [function () { return null; }].forEach(function () { test(); }) + : undefined; + // error + test + ? [function () { return null; }].forEach(function (test) { test(); }) + : undefined; +} +function checksPropertyAccess() { + var x = { + foo: { + bar: function () { return true; } + } + }; + // error + x.foo.bar ? console.log('x.foo.bar') : undefined; + // ok + x.foo.bar ? x.foo.bar : undefined; +} +var Foo = /** @class */ (function () { + function Foo() { + } + Foo.prototype.isUser = function () { + return true; + }; + Foo.prototype.test = function () { + // error + this.isUser ? console.log('this.isUser') : undefined; + // ok + this.maybeIsUser ? console.log('this.maybeIsUser') : undefined; + }; + return Foo; +}()); diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion1.symbols b/tests/baselines/reference/truthinessCallExpressionCoercion1.symbols new file mode 100644 index 0000000000000..1f729481ac6b4 --- /dev/null +++ b/tests/baselines/reference/truthinessCallExpressionCoercion1.symbols @@ -0,0 +1,175 @@ +=== tests/cases/compiler/truthinessCallExpressionCoercion1.ts === +function onlyErrorsWhenTestingNonNullableFunctionType(required: () => boolean, optional?: () => boolean) { +>onlyErrorsWhenTestingNonNullableFunctionType : Symbol(onlyErrorsWhenTestingNonNullableFunctionType, Decl(truthinessCallExpressionCoercion1.ts, 0, 0)) +>required : Symbol(required, Decl(truthinessCallExpressionCoercion1.ts, 0, 54)) +>optional : Symbol(optional, Decl(truthinessCallExpressionCoercion1.ts, 0, 78)) + + // error + required ? console.log('required') : undefined; +>required : Symbol(required, Decl(truthinessCallExpressionCoercion1.ts, 0, 54)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>undefined : Symbol(undefined) + + // ok + optional ? console.log('optional') : undefined; +>optional : Symbol(optional, Decl(truthinessCallExpressionCoercion1.ts, 0, 78)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>undefined : Symbol(undefined) + + // ok + !!required ? console.log('not required') : undefined; +>required : Symbol(required, Decl(truthinessCallExpressionCoercion1.ts, 0, 54)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>undefined : Symbol(undefined) + + // ok + required() ? console.log('required call') : undefined; +>required : Symbol(required, Decl(truthinessCallExpressionCoercion1.ts, 0, 54)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>undefined : Symbol(undefined) +} + +function onlyErrorsWhenUnusedInBody() { +>onlyErrorsWhenUnusedInBody : Symbol(onlyErrorsWhenUnusedInBody, Decl(truthinessCallExpressionCoercion1.ts, 12, 1)) + + function test() { return Math.random() > 0.5; } +>test : Symbol(test, Decl(truthinessCallExpressionCoercion1.ts, 14, 39)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + // error + test ? console.log('test') : undefined; +>test : Symbol(test, Decl(truthinessCallExpressionCoercion1.ts, 14, 39)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>undefined : Symbol(undefined) + + // ok + test ? console.log(test) : undefined; +>test : Symbol(test, Decl(truthinessCallExpressionCoercion1.ts, 14, 39)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>test : Symbol(test, Decl(truthinessCallExpressionCoercion1.ts, 14, 39)) +>undefined : Symbol(undefined) + + // ok + test ? test() : undefined; +>test : Symbol(test, Decl(truthinessCallExpressionCoercion1.ts, 14, 39)) +>test : Symbol(test, Decl(truthinessCallExpressionCoercion1.ts, 14, 39)) +>undefined : Symbol(undefined) + + // ok + test +>test : Symbol(test, Decl(truthinessCallExpressionCoercion1.ts, 14, 39)) + + ? [() => null].forEach(() => { test(); }) +>[() => null].forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) +>test : Symbol(test, Decl(truthinessCallExpressionCoercion1.ts, 14, 39)) + + : undefined; +>undefined : Symbol(undefined) + + // error + test +>test : Symbol(test, Decl(truthinessCallExpressionCoercion1.ts, 14, 39)) + + ? [() => null].forEach(test => { test() }) +>[() => null].forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) +>test : Symbol(test, Decl(truthinessCallExpressionCoercion1.ts, 33, 31)) +>test : Symbol(test, Decl(truthinessCallExpressionCoercion1.ts, 33, 31)) + + : undefined; +>undefined : Symbol(undefined) +} + +function checksPropertyAccess() { +>checksPropertyAccess : Symbol(checksPropertyAccess, Decl(truthinessCallExpressionCoercion1.ts, 35, 1)) + + const x = { +>x : Symbol(x, Decl(truthinessCallExpressionCoercion1.ts, 38, 9)) + + foo: { +>foo : Symbol(foo, Decl(truthinessCallExpressionCoercion1.ts, 38, 15)) + + bar() { return true; } +>bar : Symbol(bar, Decl(truthinessCallExpressionCoercion1.ts, 39, 14)) + } + } + + // error + x.foo.bar ? console.log('x.foo.bar') : undefined; +>x.foo.bar : Symbol(bar, Decl(truthinessCallExpressionCoercion1.ts, 39, 14)) +>x.foo : Symbol(foo, Decl(truthinessCallExpressionCoercion1.ts, 38, 15)) +>x : Symbol(x, Decl(truthinessCallExpressionCoercion1.ts, 38, 9)) +>foo : Symbol(foo, Decl(truthinessCallExpressionCoercion1.ts, 38, 15)) +>bar : Symbol(bar, Decl(truthinessCallExpressionCoercion1.ts, 39, 14)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>undefined : Symbol(undefined) + + // ok + x.foo.bar ? x.foo.bar : undefined; +>x.foo.bar : Symbol(bar, Decl(truthinessCallExpressionCoercion1.ts, 39, 14)) +>x.foo : Symbol(foo, Decl(truthinessCallExpressionCoercion1.ts, 38, 15)) +>x : Symbol(x, Decl(truthinessCallExpressionCoercion1.ts, 38, 9)) +>foo : Symbol(foo, Decl(truthinessCallExpressionCoercion1.ts, 38, 15)) +>bar : Symbol(bar, Decl(truthinessCallExpressionCoercion1.ts, 39, 14)) +>x.foo.bar : Symbol(bar, Decl(truthinessCallExpressionCoercion1.ts, 39, 14)) +>x.foo : Symbol(foo, Decl(truthinessCallExpressionCoercion1.ts, 38, 15)) +>x : Symbol(x, Decl(truthinessCallExpressionCoercion1.ts, 38, 9)) +>foo : Symbol(foo, Decl(truthinessCallExpressionCoercion1.ts, 38, 15)) +>bar : Symbol(bar, Decl(truthinessCallExpressionCoercion1.ts, 39, 14)) +>undefined : Symbol(undefined) +} + +class Foo { +>Foo : Symbol(Foo, Decl(truthinessCallExpressionCoercion1.ts, 49, 1)) + + maybeIsUser?: () => boolean; +>maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion1.ts, 51, 11)) + + isUser() { +>isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion1.ts, 52, 32)) + + return true; + } + + test() { +>test : Symbol(Foo.test, Decl(truthinessCallExpressionCoercion1.ts, 56, 5)) + + // error + this.isUser ? console.log('this.isUser') : undefined; +>this.isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion1.ts, 52, 32)) +>this : Symbol(Foo, Decl(truthinessCallExpressionCoercion1.ts, 49, 1)) +>isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion1.ts, 52, 32)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>undefined : Symbol(undefined) + + // ok + this.maybeIsUser ? console.log('this.maybeIsUser') : undefined; +>this.maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion1.ts, 51, 11)) +>this : Symbol(Foo, Decl(truthinessCallExpressionCoercion1.ts, 49, 1)) +>maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion1.ts, 51, 11)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>undefined : Symbol(undefined) + } +} + diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion1.types b/tests/baselines/reference/truthinessCallExpressionCoercion1.types new file mode 100644 index 0000000000000..37667c169741e --- /dev/null +++ b/tests/baselines/reference/truthinessCallExpressionCoercion1.types @@ -0,0 +1,228 @@ +=== tests/cases/compiler/truthinessCallExpressionCoercion1.ts === +function onlyErrorsWhenTestingNonNullableFunctionType(required: () => boolean, optional?: () => boolean) { +>onlyErrorsWhenTestingNonNullableFunctionType : (required: () => boolean, optional?: (() => boolean) | undefined) => void +>required : () => boolean +>optional : (() => boolean) | undefined + + // error + required ? console.log('required') : undefined; +>required ? console.log('required') : undefined : void +>required : () => boolean +>console.log('required') : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>'required' : "required" +>undefined : undefined + + // ok + optional ? console.log('optional') : undefined; +>optional ? console.log('optional') : undefined : void +>optional : (() => boolean) | undefined +>console.log('optional') : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>'optional' : "optional" +>undefined : undefined + + // ok + !!required ? console.log('not required') : undefined; +>!!required ? console.log('not required') : undefined : void +>!!required : true +>!required : false +>required : () => boolean +>console.log('not required') : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>'not required' : "not required" +>undefined : undefined + + // ok + required() ? console.log('required call') : undefined; +>required() ? console.log('required call') : undefined : void +>required() : boolean +>required : () => boolean +>console.log('required call') : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>'required call' : "required call" +>undefined : undefined +} + +function onlyErrorsWhenUnusedInBody() { +>onlyErrorsWhenUnusedInBody : () => void + + function test() { return Math.random() > 0.5; } +>test : () => boolean +>Math.random() > 0.5 : boolean +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number +>0.5 : 0.5 + + // error + test ? console.log('test') : undefined; +>test ? console.log('test') : undefined : void +>test : () => boolean +>console.log('test') : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>'test' : "test" +>undefined : undefined + + // ok + test ? console.log(test) : undefined; +>test ? console.log(test) : undefined : void +>test : () => boolean +>console.log(test) : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>test : () => boolean +>undefined : undefined + + // ok + test ? test() : undefined; +>test ? test() : undefined : boolean | undefined +>test : () => boolean +>test() : boolean +>test : () => boolean +>undefined : undefined + + // ok + test +>test ? [() => null].forEach(() => { test(); }) : undefined : void +>test : () => boolean + + ? [() => null].forEach(() => { test(); }) +>[() => null].forEach(() => { test(); }) : void +>[() => null].forEach : (callbackfn: (value: () => null, index: number, array: (() => null)[]) => void, thisArg?: any) => void +>[() => null] : (() => null)[] +>() => null : () => null +>null : null +>forEach : (callbackfn: (value: () => null, index: number, array: (() => null)[]) => void, thisArg?: any) => void +>() => { test(); } : () => void +>test() : boolean +>test : () => boolean + + : undefined; +>undefined : undefined + + // error + test +>test ? [() => null].forEach(test => { test() }) : undefined : void +>test : () => boolean + + ? [() => null].forEach(test => { test() }) +>[() => null].forEach(test => { test() }) : void +>[() => null].forEach : (callbackfn: (value: () => null, index: number, array: (() => null)[]) => void, thisArg?: any) => void +>[() => null] : (() => null)[] +>() => null : () => null +>null : null +>forEach : (callbackfn: (value: () => null, index: number, array: (() => null)[]) => void, thisArg?: any) => void +>test => { test() } : (test: () => null) => void +>test : () => null +>test() : null +>test : () => null + + : undefined; +>undefined : undefined +} + +function checksPropertyAccess() { +>checksPropertyAccess : () => void + + const x = { +>x : { foo: { bar(): boolean; }; } +>{ foo: { bar() { return true; } } } : { foo: { bar(): boolean; }; } + + foo: { +>foo : { bar(): boolean; } +>{ bar() { return true; } } : { bar(): boolean; } + + bar() { return true; } +>bar : () => boolean +>true : true + } + } + + // error + x.foo.bar ? console.log('x.foo.bar') : undefined; +>x.foo.bar ? console.log('x.foo.bar') : undefined : void +>x.foo.bar : () => boolean +>x.foo : { bar(): boolean; } +>x : { foo: { bar(): boolean; }; } +>foo : { bar(): boolean; } +>bar : () => boolean +>console.log('x.foo.bar') : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>'x.foo.bar' : "x.foo.bar" +>undefined : undefined + + // ok + x.foo.bar ? x.foo.bar : undefined; +>x.foo.bar ? x.foo.bar : undefined : (() => boolean) | undefined +>x.foo.bar : () => boolean +>x.foo : { bar(): boolean; } +>x : { foo: { bar(): boolean; }; } +>foo : { bar(): boolean; } +>bar : () => boolean +>x.foo.bar : () => boolean +>x.foo : { bar(): boolean; } +>x : { foo: { bar(): boolean; }; } +>foo : { bar(): boolean; } +>bar : () => boolean +>undefined : undefined +} + +class Foo { +>Foo : Foo + + maybeIsUser?: () => boolean; +>maybeIsUser : (() => boolean) | undefined + + isUser() { +>isUser : () => boolean + + return true; +>true : true + } + + test() { +>test : () => void + + // error + this.isUser ? console.log('this.isUser') : undefined; +>this.isUser ? console.log('this.isUser') : undefined : void +>this.isUser : () => boolean +>this : this +>isUser : () => boolean +>console.log('this.isUser') : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>'this.isUser' : "this.isUser" +>undefined : undefined + + // ok + this.maybeIsUser ? console.log('this.maybeIsUser') : undefined; +>this.maybeIsUser ? console.log('this.maybeIsUser') : undefined : void +>this.maybeIsUser : (() => boolean) | undefined +>this : this +>maybeIsUser : (() => boolean) | undefined +>console.log('this.maybeIsUser') : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>'this.maybeIsUser' : "this.maybeIsUser" +>undefined : undefined + } +} + diff --git a/tests/baselines/reference/tryCatchFinallyControlFlow.errors.txt b/tests/baselines/reference/tryCatchFinallyControlFlow.errors.txt index 11ec1515acadb..b9be03058276f 100644 --- a/tests/baselines/reference/tryCatchFinallyControlFlow.errors.txt +++ b/tests/baselines/reference/tryCatchFinallyControlFlow.errors.txt @@ -1,7 +1,11 @@ tests/cases/compiler/tryCatchFinallyControlFlow.ts(105,5): error TS7027: Unreachable code detected. +tests/cases/compiler/tryCatchFinallyControlFlow.ts(118,9): error TS7027: Unreachable code detected. +tests/cases/compiler/tryCatchFinallyControlFlow.ts(218,13): error TS7027: Unreachable code detected. +tests/cases/compiler/tryCatchFinallyControlFlow.ts(220,9): error TS7027: Unreachable code detected. +tests/cases/compiler/tryCatchFinallyControlFlow.ts(255,9): error TS7027: Unreachable code detected. -==== tests/cases/compiler/tryCatchFinallyControlFlow.ts (1 errors) ==== +==== tests/cases/compiler/tryCatchFinallyControlFlow.ts (5 errors) ==== // Repro from #34797 function f1() { @@ -111,6 +115,131 @@ tests/cases/compiler/tryCatchFinallyControlFlow.ts(105,5): error TS7027: Unreach !!! error TS7027: Unreachable code detected. } + function f8() { + let x: 0 | 1 = 0; + (() => { + try { + x = 1; + return; + } + finally { + x; // 0 | 1 + } + x; // Unreachable + ~~ +!!! error TS7027: Unreachable code detected. + })(); + x; // 1 + } + + function f9() { + let x: 0 | 1 | 2 = 0; + (() => { + try { + if (!!true) { + x = 1; + return; + } + } + finally { + x; // 0 | 1 + } + x; // 0 + x = 2; + })(); + x; // 1 | 2 + } + + function f10() { + let x: 0 | 1 | 2 | 3 = 0; + (() => { + try { + x = 1; + return; + } + catch (e) { + x = 2; + } + finally { + x; // 0 | 1 | 2 + } + x; // 2 + x = 3; + })(); + x; // 1 | 3 + } + + function f11() { + let x: 0 | 1 | 2 | 3 | 4 | 5 = 0; + (() => { + try { + if (!!true) { + x = 1; + return; + } + if (!!true) { + x = 2; + throw 0; + } + } + catch (e) { + x; // 0 | 1 | 2 + x = 3; + } + finally { + x; // 0 | 1 | 2 | 3 + if (!!true) { + x = 4; + } + } + x; // 0 | 3 | 4 + x = 5; + })(); + x; // 1 | 4 | 5 + } + + function f12() { + let x: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 = 0; + (() => { + try { + if (!!true) { + x = 1; + return; + } + if (!!true) { + x = 2; + throw 0; + } + } + catch (e) { + x; // 0 | 1 | 2 + x = 3; + } + finally { + x; // 0 | 1 | 2 | 3 + if (!!true) { + x = 4; + return; + } + if (!!true) { + x = 5; + return; + } + x = 6; + return; + x; // unreachable + ~~ +!!! error TS7027: Unreachable code detected. + } + x; // unreachable + ~~~~~~~~~~~~~~~~~ + x = 7; // no effect + ~~~~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + })(); + x; // 4 | 5 | 6 + } + // Repro from #35644 const main = () => { @@ -129,4 +258,21 @@ tests/cases/compiler/tryCatchFinallyControlFlow.ts(105,5): error TS7027: Unreach return; } } + + // Repro from #36828 + + function t1() { + const x = (() => { + try { + return 'x'; + } + catch (e) { + return null; + } + x; // Unreachable + ~~ +!!! error TS7027: Unreachable code detected. + })(); + x; // Reachable + } \ No newline at end of file diff --git a/tests/baselines/reference/tryCatchFinallyControlFlow.js b/tests/baselines/reference/tryCatchFinallyControlFlow.js index 79d9a3d597275..2ccecd0cf20f7 100644 --- a/tests/baselines/reference/tryCatchFinallyControlFlow.js +++ b/tests/baselines/reference/tryCatchFinallyControlFlow.js @@ -106,6 +106,124 @@ function f7() { x; // Unreachable } +function f8() { + let x: 0 | 1 = 0; + (() => { + try { + x = 1; + return; + } + finally { + x; // 0 | 1 + } + x; // Unreachable + })(); + x; // 1 +} + +function f9() { + let x: 0 | 1 | 2 = 0; + (() => { + try { + if (!!true) { + x = 1; + return; + } + } + finally { + x; // 0 | 1 + } + x; // 0 + x = 2; + })(); + x; // 1 | 2 +} + +function f10() { + let x: 0 | 1 | 2 | 3 = 0; + (() => { + try { + x = 1; + return; + } + catch (e) { + x = 2; + } + finally { + x; // 0 | 1 | 2 + } + x; // 2 + x = 3; + })(); + x; // 1 | 3 +} + +function f11() { + let x: 0 | 1 | 2 | 3 | 4 | 5 = 0; + (() => { + try { + if (!!true) { + x = 1; + return; + } + if (!!true) { + x = 2; + throw 0; + } + } + catch (e) { + x; // 0 | 1 | 2 + x = 3; + } + finally { + x; // 0 | 1 | 2 | 3 + if (!!true) { + x = 4; + } + } + x; // 0 | 3 | 4 + x = 5; + })(); + x; // 1 | 4 | 5 +} + +function f12() { + let x: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 = 0; + (() => { + try { + if (!!true) { + x = 1; + return; + } + if (!!true) { + x = 2; + throw 0; + } + } + catch (e) { + x; // 0 | 1 | 2 + x = 3; + } + finally { + x; // 0 | 1 | 2 | 3 + if (!!true) { + x = 4; + return; + } + if (!!true) { + x = 5; + return; + } + x = 6; + return; + x; // unreachable + } + x; // unreachable + x = 7; // no effect + })(); + x; // 4 | 5 | 6 +} + // Repro from #35644 const main = () => { @@ -124,6 +242,21 @@ const main = () => { return; } } + +// Repro from #36828 + +function t1() { + const x = (() => { + try { + return 'x'; + } + catch (e) { + return null; + } + x; // Unreachable + })(); + x; // Reachable +} //// [tryCatchFinallyControlFlow.js] @@ -227,6 +360,119 @@ function f7() { } x; // Unreachable } +function f8() { + var x = 0; + (function () { + try { + x = 1; + return; + } + finally { + x; // 0 | 1 + } + x; // Unreachable + })(); + x; // 1 +} +function f9() { + var x = 0; + (function () { + try { + if (!!true) { + x = 1; + return; + } + } + finally { + x; // 0 | 1 + } + x; // 0 + x = 2; + })(); + x; // 1 | 2 +} +function f10() { + var x = 0; + (function () { + try { + x = 1; + return; + } + catch (e) { + x = 2; + } + finally { + x; // 0 | 1 | 2 + } + x; // 2 + x = 3; + })(); + x; // 1 | 3 +} +function f11() { + var x = 0; + (function () { + try { + if (!!true) { + x = 1; + return; + } + if (!!true) { + x = 2; + throw 0; + } + } + catch (e) { + x; // 0 | 1 | 2 + x = 3; + } + finally { + x; // 0 | 1 | 2 | 3 + if (!!true) { + x = 4; + } + } + x; // 0 | 3 | 4 + x = 5; + })(); + x; // 1 | 4 | 5 +} +function f12() { + var x = 0; + (function () { + try { + if (!!true) { + x = 1; + return; + } + if (!!true) { + x = 2; + throw 0; + } + } + catch (e) { + x; // 0 | 1 | 2 + x = 3; + } + finally { + x; // 0 | 1 | 2 | 3 + if (!!true) { + x = 4; + return; + } + if (!!true) { + x = 5; + return; + } + x = 6; + return; + x; // unreachable + } + x; // unreachable + x = 7; // no effect + })(); + x; // 4 | 5 | 6 +} // Repro from #35644 var main = function () { var hoge = undefined; @@ -244,3 +490,16 @@ var main = function () { return; } }; +// Repro from #36828 +function t1() { + var x = (function () { + try { + return 'x'; + } + catch (e) { + return null; + } + x; // Unreachable + })(); + x; // Reachable +} diff --git a/tests/baselines/reference/tryCatchFinallyControlFlow.symbols b/tests/baselines/reference/tryCatchFinallyControlFlow.symbols index 054151d6328d5..30e6ea3da352b 100644 --- a/tests/baselines/reference/tryCatchFinallyControlFlow.symbols +++ b/tests/baselines/reference/tryCatchFinallyControlFlow.symbols @@ -187,18 +187,221 @@ function f7() { >x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 92, 7)) } +function f8() { +>f8 : Symbol(f8, Decl(tryCatchFinallyControlFlow.ts, 105, 1)) + + let x: 0 | 1 = 0; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 108, 7)) + + (() => { + try { + x = 1; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 108, 7)) + + return; + } + finally { + x; // 0 | 1 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 108, 7)) + } + x; // Unreachable +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 108, 7)) + + })(); + x; // 1 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 108, 7)) +} + +function f9() { +>f9 : Symbol(f9, Decl(tryCatchFinallyControlFlow.ts, 120, 1)) + + let x: 0 | 1 | 2 = 0; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 123, 7)) + + (() => { + try { + if (!!true) { + x = 1; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 123, 7)) + + return; + } + } + finally { + x; // 0 | 1 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 123, 7)) + } + x; // 0 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 123, 7)) + + x = 2; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 123, 7)) + + })(); + x; // 1 | 2 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 123, 7)) +} + +function f10() { +>f10 : Symbol(f10, Decl(tryCatchFinallyControlFlow.ts, 138, 1)) + + let x: 0 | 1 | 2 | 3 = 0; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 141, 7)) + + (() => { + try { + x = 1; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 141, 7)) + + return; + } + catch (e) { +>e : Symbol(e, Decl(tryCatchFinallyControlFlow.ts, 147, 15)) + + x = 2; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 141, 7)) + } + finally { + x; // 0 | 1 | 2 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 141, 7)) + } + x; // 2 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 141, 7)) + + x = 3; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 141, 7)) + + })(); + x; // 1 | 3 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 141, 7)) +} + +function f11() { +>f11 : Symbol(f11, Decl(tryCatchFinallyControlFlow.ts, 157, 1)) + + let x: 0 | 1 | 2 | 3 | 4 | 5 = 0; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 160, 7)) + + (() => { + try { + if (!!true) { + x = 1; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 160, 7)) + + return; + } + if (!!true) { + x = 2; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 160, 7)) + + throw 0; + } + } + catch (e) { +>e : Symbol(e, Decl(tryCatchFinallyControlFlow.ts, 172, 15)) + + x; // 0 | 1 | 2 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 160, 7)) + + x = 3; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 160, 7)) + } + finally { + x; // 0 | 1 | 2 | 3 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 160, 7)) + + if (!!true) { + x = 4; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 160, 7)) + } + } + x; // 0 | 3 | 4 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 160, 7)) + + x = 5; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 160, 7)) + + })(); + x; // 1 | 4 | 5 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 160, 7)) +} + +function f12() { +>f12 : Symbol(f12, Decl(tryCatchFinallyControlFlow.ts, 186, 1)) + + let x: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 = 0; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + + (() => { + try { + if (!!true) { + x = 1; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + + return; + } + if (!!true) { + x = 2; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + + throw 0; + } + } + catch (e) { +>e : Symbol(e, Decl(tryCatchFinallyControlFlow.ts, 201, 15)) + + x; // 0 | 1 | 2 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + + x = 3; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + } + finally { + x; // 0 | 1 | 2 | 3 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + + if (!!true) { + x = 4; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + + return; + } + if (!!true) { + x = 5; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + + return; + } + x = 6; +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + + return; + x; // unreachable +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + } + x; // unreachable +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + + x = 7; // no effect +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) + + })(); + x; // 4 | 5 | 6 +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 189, 7)) +} + // Repro from #35644 const main = () => { ->main : Symbol(main, Decl(tryCatchFinallyControlFlow.ts, 109, 5)) +>main : Symbol(main, Decl(tryCatchFinallyControlFlow.ts, 227, 5)) let hoge: string | undefined = undefined; ->hoge : Symbol(hoge, Decl(tryCatchFinallyControlFlow.ts, 110, 7)) +>hoge : Symbol(hoge, Decl(tryCatchFinallyControlFlow.ts, 228, 7)) >undefined : Symbol(undefined) try { hoge = 'hoge!'; ->hoge : Symbol(hoge, Decl(tryCatchFinallyControlFlow.ts, 110, 7)) +>hoge : Symbol(hoge, Decl(tryCatchFinallyControlFlow.ts, 228, 7)) return; } @@ -207,14 +410,38 @@ const main = () => { } finally { if (hoge) { ->hoge : Symbol(hoge, Decl(tryCatchFinallyControlFlow.ts, 110, 7)) +>hoge : Symbol(hoge, Decl(tryCatchFinallyControlFlow.ts, 228, 7)) hoge.length; >hoge.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) ->hoge : Symbol(hoge, Decl(tryCatchFinallyControlFlow.ts, 110, 7)) +>hoge : Symbol(hoge, Decl(tryCatchFinallyControlFlow.ts, 228, 7)) >length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) } return; } } +// Repro from #36828 + +function t1() { +>t1 : Symbol(t1, Decl(tryCatchFinallyControlFlow.ts, 242, 1)) + + const x = (() => { +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 247, 9)) + + try { + return 'x'; + } + catch (e) { +>e : Symbol(e, Decl(tryCatchFinallyControlFlow.ts, 251, 15)) + + return null; + } + x; // Unreachable +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 247, 9)) + + })(); + x; // Reachable +>x : Symbol(x, Decl(tryCatchFinallyControlFlow.ts, 247, 9)) +} + diff --git a/tests/baselines/reference/tryCatchFinallyControlFlow.types b/tests/baselines/reference/tryCatchFinallyControlFlow.types index d29a00750d787..70c11b87dca59 100644 --- a/tests/baselines/reference/tryCatchFinallyControlFlow.types +++ b/tests/baselines/reference/tryCatchFinallyControlFlow.types @@ -228,6 +228,304 @@ function f7() { >x : 0 | 1 | 2 | 3 } +function f8() { +>f8 : () => void + + let x: 0 | 1 = 0; +>x : 0 | 1 +>0 : 0 + + (() => { +>(() => { try { x = 1; return; } finally { x; // 0 | 1 } x; // Unreachable })() : void +>(() => { try { x = 1; return; } finally { x; // 0 | 1 } x; // Unreachable }) : () => void +>() => { try { x = 1; return; } finally { x; // 0 | 1 } x; // Unreachable } : () => void + + try { + x = 1; +>x = 1 : 1 +>x : 0 | 1 +>1 : 1 + + return; + } + finally { + x; // 0 | 1 +>x : 0 | 1 + } + x; // Unreachable +>x : 0 | 1 + + })(); + x; // 1 +>x : 1 +} + +function f9() { +>f9 : () => void + + let x: 0 | 1 | 2 = 0; +>x : 0 | 1 | 2 +>0 : 0 + + (() => { +>(() => { try { if (!!true) { x = 1; return; } } finally { x; // 0 | 1 } x; // 0 x = 2; })() : void +>(() => { try { if (!!true) { x = 1; return; } } finally { x; // 0 | 1 } x; // 0 x = 2; }) : () => void +>() => { try { if (!!true) { x = 1; return; } } finally { x; // 0 | 1 } x; // 0 x = 2; } : () => void + + try { + if (!!true) { +>!!true : true +>!true : false +>true : true + + x = 1; +>x = 1 : 1 +>x : 0 | 1 | 2 +>1 : 1 + + return; + } + } + finally { + x; // 0 | 1 +>x : 0 | 1 + } + x; // 0 +>x : 0 + + x = 2; +>x = 2 : 2 +>x : 0 | 1 | 2 +>2 : 2 + + })(); + x; // 1 | 2 +>x : 1 | 2 +} + +function f10() { +>f10 : () => void + + let x: 0 | 1 | 2 | 3 = 0; +>x : 0 | 1 | 2 | 3 +>0 : 0 + + (() => { +>(() => { try { x = 1; return; } catch (e) { x = 2; } finally { x; // 0 | 1 | 2 } x; // 2 x = 3; })() : void +>(() => { try { x = 1; return; } catch (e) { x = 2; } finally { x; // 0 | 1 | 2 } x; // 2 x = 3; }) : () => void +>() => { try { x = 1; return; } catch (e) { x = 2; } finally { x; // 0 | 1 | 2 } x; // 2 x = 3; } : () => void + + try { + x = 1; +>x = 1 : 1 +>x : 0 | 1 | 2 | 3 +>1 : 1 + + return; + } + catch (e) { +>e : any + + x = 2; +>x = 2 : 2 +>x : 0 | 1 | 2 | 3 +>2 : 2 + } + finally { + x; // 0 | 1 | 2 +>x : 0 | 1 | 2 + } + x; // 2 +>x : 2 + + x = 3; +>x = 3 : 3 +>x : 0 | 1 | 2 | 3 +>3 : 3 + + })(); + x; // 1 | 3 +>x : 1 | 3 +} + +function f11() { +>f11 : () => void + + let x: 0 | 1 | 2 | 3 | 4 | 5 = 0; +>x : 0 | 1 | 2 | 3 | 4 | 5 +>0 : 0 + + (() => { +>(() => { try { if (!!true) { x = 1; return; } if (!!true) { x = 2; throw 0; } } catch (e) { x; // 0 | 1 | 2 x = 3; } finally { x; // 0 | 1 | 2 | 3 if (!!true) { x = 4; } } x; // 0 | 3 | 4 x = 5; })() : void +>(() => { try { if (!!true) { x = 1; return; } if (!!true) { x = 2; throw 0; } } catch (e) { x; // 0 | 1 | 2 x = 3; } finally { x; // 0 | 1 | 2 | 3 if (!!true) { x = 4; } } x; // 0 | 3 | 4 x = 5; }) : () => void +>() => { try { if (!!true) { x = 1; return; } if (!!true) { x = 2; throw 0; } } catch (e) { x; // 0 | 1 | 2 x = 3; } finally { x; // 0 | 1 | 2 | 3 if (!!true) { x = 4; } } x; // 0 | 3 | 4 x = 5; } : () => void + + try { + if (!!true) { +>!!true : true +>!true : false +>true : true + + x = 1; +>x = 1 : 1 +>x : 0 | 1 | 2 | 3 | 4 | 5 +>1 : 1 + + return; + } + if (!!true) { +>!!true : true +>!true : false +>true : true + + x = 2; +>x = 2 : 2 +>x : 0 | 1 | 2 | 3 | 4 | 5 +>2 : 2 + + throw 0; +>0 : 0 + } + } + catch (e) { +>e : any + + x; // 0 | 1 | 2 +>x : 0 | 1 | 2 + + x = 3; +>x = 3 : 3 +>x : 0 | 1 | 2 | 3 | 4 | 5 +>3 : 3 + } + finally { + x; // 0 | 1 | 2 | 3 +>x : 0 | 1 | 2 | 3 + + if (!!true) { +>!!true : true +>!true : false +>true : true + + x = 4; +>x = 4 : 4 +>x : 0 | 1 | 2 | 3 | 4 | 5 +>4 : 4 + } + } + x; // 0 | 3 | 4 +>x : 0 | 3 | 4 + + x = 5; +>x = 5 : 5 +>x : 0 | 1 | 2 | 3 | 4 | 5 +>5 : 5 + + })(); + x; // 1 | 4 | 5 +>x : 1 | 4 | 5 +} + +function f12() { +>f12 : () => void + + let x: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 = 0; +>x : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 +>0 : 0 + + (() => { +>(() => { try { if (!!true) { x = 1; return; } if (!!true) { x = 2; throw 0; } } catch (e) { x; // 0 | 1 | 2 x = 3; } finally { x; // 0 | 1 | 2 | 3 if (!!true) { x = 4; return; } if (!!true) { x = 5; return; } x = 6; return; x; // unreachable } x; // unreachable x = 7; // no effect })() : void +>(() => { try { if (!!true) { x = 1; return; } if (!!true) { x = 2; throw 0; } } catch (e) { x; // 0 | 1 | 2 x = 3; } finally { x; // 0 | 1 | 2 | 3 if (!!true) { x = 4; return; } if (!!true) { x = 5; return; } x = 6; return; x; // unreachable } x; // unreachable x = 7; // no effect }) : () => void +>() => { try { if (!!true) { x = 1; return; } if (!!true) { x = 2; throw 0; } } catch (e) { x; // 0 | 1 | 2 x = 3; } finally { x; // 0 | 1 | 2 | 3 if (!!true) { x = 4; return; } if (!!true) { x = 5; return; } x = 6; return; x; // unreachable } x; // unreachable x = 7; // no effect } : () => void + + try { + if (!!true) { +>!!true : true +>!true : false +>true : true + + x = 1; +>x = 1 : 1 +>x : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 +>1 : 1 + + return; + } + if (!!true) { +>!!true : true +>!true : false +>true : true + + x = 2; +>x = 2 : 2 +>x : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 +>2 : 2 + + throw 0; +>0 : 0 + } + } + catch (e) { +>e : any + + x; // 0 | 1 | 2 +>x : 0 | 1 | 2 + + x = 3; +>x = 3 : 3 +>x : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 +>3 : 3 + } + finally { + x; // 0 | 1 | 2 | 3 +>x : 0 | 1 | 2 | 3 + + if (!!true) { +>!!true : true +>!true : false +>true : true + + x = 4; +>x = 4 : 4 +>x : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 +>4 : 4 + + return; + } + if (!!true) { +>!!true : true +>!true : false +>true : true + + x = 5; +>x = 5 : 5 +>x : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 +>5 : 5 + + return; + } + x = 6; +>x = 6 : 6 +>x : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 +>6 : 6 + + return; + x; // unreachable +>x : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 + } + x; // unreachable +>x : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 + + x = 7; // no effect +>x = 7 : 7 +>x : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 +>7 : 7 + + })(); + x; // 4 | 5 | 6 +>x : 4 | 5 | 6 +} + // Repro from #35644 const main = () => { @@ -262,3 +560,32 @@ const main = () => { } } +// Repro from #36828 + +function t1() { +>t1 : () => void + + const x = (() => { +>x : "x" | null +>(() => { try { return 'x'; } catch (e) { return null; } x; // Unreachable })() : "x" | null +>(() => { try { return 'x'; } catch (e) { return null; } x; // Unreachable }) : () => "x" | null +>() => { try { return 'x'; } catch (e) { return null; } x; // Unreachable } : () => "x" | null + + try { + return 'x'; +>'x' : "x" + } + catch (e) { +>e : any + + return null; +>null : null + } + x; // Unreachable +>x : "x" | null + + })(); + x; // Reachable +>x : "x" | null +} + diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js index 36435d0421c7a..bc28b7ce5c606 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js @@ -30,7 +30,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -317,7 +317,7 @@ sourceFile:../lib/file1.ts 6 >Emitted(12, 49) Source(7, 40) + SourceIndex(1) 7 >Emitted(12, 50) Source(7, 41) + SourceIndex(1) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^^^^^ @@ -1692,20 +1692,20 @@ sourceFile:file4.ts "sections": [ { "pos": 0, - "end": 4158, + "end": 4159, "kind": "prepend", "data": "../lib/module.js", "texts": [ { "pos": 0, - "end": 4158, + "end": 4159, "kind": "text" } ] }, { - "pos": 4158, - "end": 4359, + "pos": 4159, + "end": 4360, "kind": "text" } ] @@ -1740,9 +1740,9 @@ sourceFile:file4.ts ====================================================================== File:: /src/app/module.js ---------------------------------------------------------------------- -prepend: (0-4158):: ../lib/module.js texts:: 1 +prepend: (0-4159):: ../lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-4158) +text: (0-4159) /*@internal*/ var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -1755,7 +1755,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1848,7 +1848,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (4158-4359) +text: (4159-4360) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -1928,7 +1928,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2209,7 +2209,7 @@ sourceFile:file1.ts 6 >Emitted(12, 49) Source(7, 40) + SourceIndex(1) 7 >Emitted(12, 50) Source(7, 41) + SourceIndex(1) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^^^^^ @@ -3533,7 +3533,7 @@ sourceFile:global.ts "sections": [ { "pos": 0, - "end": 4158, + "end": 4159, "kind": "text" } ] @@ -3590,7 +3590,7 @@ sourceFile:global.ts ====================================================================== File:: /src/lib/module.js ---------------------------------------------------------------------- -text: (0-4158) +text: (0-4159) /*@internal*/ var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -3603,7 +3603,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js index 455d2e781741c..ef05e119c2fb2 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js @@ -229,7 +229,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -521,7 +521,7 @@ sourceFile:../lib/file1.ts 6 >Emitted(12, 49) Source(7, 40) + SourceIndex(1) 7 >Emitted(12, 50) Source(7, 41) + SourceIndex(1) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^^^^^ @@ -1870,20 +1870,20 @@ sourceFile:file4.ts "sections": [ { "pos": 0, - "end": 4143, + "end": 4144, "kind": "prepend", "data": "../lib/module.js", "texts": [ { "pos": 0, - "end": 4143, + "end": 4144, "kind": "text" } ] }, { - "pos": 4143, - "end": 4344, + "pos": 4144, + "end": 4345, "kind": "text" } ] @@ -1918,9 +1918,9 @@ sourceFile:file4.ts ====================================================================== File:: /src/app/module.js ---------------------------------------------------------------------- -prepend: (0-4143):: ../lib/module.js texts:: 1 +prepend: (0-4144):: ../lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-4143) +text: (0-4144) /*@internal*/ var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -1933,7 +1933,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2025,7 +2025,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (4143-4344) +text: (4144-4345) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -2841,7 +2841,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3127,7 +3127,7 @@ sourceFile:file1.ts 6 >Emitted(12, 49) Source(7, 40) + SourceIndex(1) 7 >Emitted(12, 50) Source(7, 41) + SourceIndex(1) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^^^^^ @@ -4425,7 +4425,7 @@ sourceFile:global.ts "sections": [ { "pos": 0, - "end": 4143, + "end": 4144, "kind": "text" } ] @@ -4492,7 +4492,7 @@ sourceFile:global.ts ====================================================================== File:: /src/lib/module.js ---------------------------------------------------------------------- -text: (0-4143) +text: (0-4144) /*@internal*/ var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -4505,7 +4505,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/stripInternal.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/stripInternal.js index f3692954f939a..09ad750784053 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/stripInternal.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/stripInternal.js @@ -254,7 +254,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -540,7 +540,7 @@ sourceFile:../lib/file1.ts 6 >Emitted(12, 49) Source(7, 40) + SourceIndex(1) 7 >Emitted(12, 50) Source(7, 41) + SourceIndex(1) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^^^^^ @@ -1889,20 +1889,20 @@ sourceFile:file4.ts "sections": [ { "pos": 0, - "end": 4129, + "end": 4130, "kind": "prepend", "data": "../lib/module.js", "texts": [ { "pos": 0, - "end": 4129, + "end": 4130, "kind": "text" } ] }, { - "pos": 4129, - "end": 4330, + "pos": 4130, + "end": 4331, "kind": "text" } ] @@ -1937,9 +1937,9 @@ sourceFile:file4.ts ====================================================================== File:: /src/app/module.js ---------------------------------------------------------------------- -prepend: (0-4129):: ../lib/module.js texts:: 1 +prepend: (0-4130):: ../lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-4129) +text: (0-4130) /*@internal*/ var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -1952,7 +1952,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2044,7 +2044,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (4129-4330) +text: (4130-4331) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -2939,7 +2939,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3219,7 +3219,7 @@ sourceFile:file1.ts 6 >Emitted(12, 49) Source(7, 40) + SourceIndex(1) 7 >Emitted(12, 50) Source(7, 41) + SourceIndex(1) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^^^^^ @@ -4517,7 +4517,7 @@ sourceFile:global.ts "sections": [ { "pos": 0, - "end": 4129, + "end": 4130, "kind": "text" } ] @@ -4574,7 +4574,7 @@ sourceFile:global.ts ====================================================================== File:: /src/lib/module.js ---------------------------------------------------------------------- -text: (0-4129) +text: (0-4130) /*@internal*/ var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -4587,7 +4587,7 @@ define("file1", ["require", "exports"], function (require, exports) { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; diff --git a/tests/baselines/reference/tsbuild/demo/initial-build/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js b/tests/baselines/reference/tsbuild/demo/initial-build/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js index 922ca8d3b1c01..c2d580bd82d0c 100644 --- a/tests/baselines/reference/tsbuild/demo/initial-build/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js +++ b/tests/baselines/reference/tsbuild/demo/initial-build/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js @@ -70,7 +70,7 @@ export { createDog, Dog }; Object.defineProperty(exports, "__esModule", { value: true }); var animal_1 = require("./animal"); var dog_1 = require("./dog"); -exports.createDog = dog_1.createDog; +Object.defineProperty(exports, "createDog", { enumerable: true, get: function () { return dog_1.createDog; } }); //// [/src/lib/animals/tsconfig.tsbuildinfo] diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module-with-isolatedModules.js index 4d98599a17f7e..f820a3fc9ad8d 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module-with-isolatedModules.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module-with-isolatedModules.js @@ -73,7 +73,7 @@ export { default as bar } from './bar'; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var bar_1 = require("./bar"); -exports.bar = bar_1.default; +Object.defineProperty(exports, "bar", { enumerable: true, get: function () { return bar_1.default; } }); //// [/src/obj/tsconfig.tsbuildinfo] diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module.js index 584c54a32c996..83a3bac22ba2d 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module.js @@ -73,7 +73,7 @@ export { default as bar } from './bar'; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var bar_1 = require("./bar"); -exports.bar = bar_1.default; +Object.defineProperty(exports, "bar", { enumerable: true, get: function () { return bar_1.default; } }); //// [/src/obj/tsconfig.tsbuildinfo] diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js index 4835be06a9e44..e8b646c7a14c9 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js @@ -79,7 +79,7 @@ export { default as bar } from './bar'; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var bar_1 = require("./bar"); -exports.bar = bar_1.default; +Object.defineProperty(exports, "bar", { enumerable: true, get: function () { return bar_1.default; } }); var bar_2 = require("./bar"); bar_2.default("hello"); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js index 2c15d3a563a5b..330f9247847b0 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -938,7 +938,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1409,7 +1409,7 @@ sourceFile:../second/second_part1.ts 4 >Emitted(20, 31) Source(18, 40) + SourceIndex(3) 5 >Emitted(20, 32) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2637,7 +2637,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 109, - "end": 3161, + "end": 3162, "kind": "text" } ] @@ -2718,7 +2718,7 @@ function f() { } ---------------------------------------------------------------------- -text: (109-3161) +text: (109-3162) var N; (function (N) { function f() { @@ -2733,7 +2733,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3601,7 +3601,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -4074,7 +4074,7 @@ sourceFile:../../../second/second_part1.ts 4 >Emitted(20, 31) Source(18, 40) + SourceIndex(3) 5 >Emitted(20, 32) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -5341,20 +5341,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3161, + "end": 3162, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3161, + "end": 3162, "kind": "text" } ] }, { - "pos": 3161, - "end": 3197, + "pos": 3162, + "end": 3198, "kind": "text" } ] @@ -5389,9 +5389,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3161):: ../../../2/second-output.js texts:: 1 +prepend: (0-3162):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3161) +text: (0-3162) var s = "Hola, world"; console.log(s); console.log(f()); @@ -5412,7 +5412,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -5502,7 +5502,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3161-3197) +text: (3162-3198) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal.js index a40c29ef70cce..cbef4e79c26f2 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal.js @@ -724,7 +724,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1197,7 +1197,7 @@ sourceFile:../../../second/second_part1.ts 4 >Emitted(20, 31) Source(18, 40) + SourceIndex(3) 5 >Emitted(20, 32) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2477,20 +2477,20 @@ sourceFile:../../third_part1.ts }, { "pos": 109, - "end": 3161, + "end": 3162, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 109, - "end": 3161, + "end": 3162, "kind": "text" } ] }, { - "pos": 3161, - "end": 3197, + "pos": 3162, + "end": 3198, "kind": "text" } ] @@ -2549,9 +2549,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (109-3161):: ../../../2/second-output.js texts:: 1 +prepend: (109-3162):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (109-3161) +text: (109-3162) var N; (function (N) { function f() { @@ -2566,7 +2566,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2656,7 +2656,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3161-3197) +text: (3162-3198) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js index 18b93f1463dda..fc01bc4a23c4a 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js @@ -46,7 +46,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -545,7 +545,7 @@ sourceFile:../second/second_part1.ts 4 >Emitted(21, 31) Source(18, 41) + SourceIndex(3) 5 >Emitted(21, 32) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -1773,7 +1773,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 127, - "end": 3179, + "end": 3180, "kind": "text" } ] @@ -1855,7 +1855,7 @@ function f() { } ---------------------------------------------------------------------- -text: (127-3179) +text: (127-3180) var N; (function (N) { function f() { @@ -1870,7 +1870,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2342,7 +2342,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2843,7 +2843,7 @@ sourceFile:../../../second/second_part1.ts 4 >Emitted(21, 31) Source(18, 41) + SourceIndex(3) 5 >Emitted(21, 32) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -4110,20 +4110,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3179, + "end": 3180, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3179, + "end": 3180, "kind": "text" } ] }, { - "pos": 3179, - "end": 3215, + "pos": 3180, + "end": 3216, "kind": "text" } ] @@ -4158,9 +4158,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3179):: ../../../2/second-output.js texts:: 1 +prepend: (0-3180):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3179) +text: (0-3180) var s = "Hello, world"; console.log(s); console.log(s); @@ -4182,7 +4182,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -4272,7 +4272,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3179-3215) +text: (3180-3216) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment.js index 23b7fc027cab5..4acef29ac79ee 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment.js @@ -311,7 +311,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -812,7 +812,7 @@ sourceFile:../../../second/second_part1.ts 4 >Emitted(21, 31) Source(18, 41) + SourceIndex(3) 5 >Emitted(21, 32) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2092,20 +2092,20 @@ sourceFile:../../third_part1.ts }, { "pos": 127, - "end": 3179, + "end": 3180, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 127, - "end": 3179, + "end": 3180, "kind": "text" } ] }, { - "pos": 3179, - "end": 3215, + "pos": 3180, + "end": 3216, "kind": "text" } ] @@ -2165,9 +2165,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (127-3179):: ../../../2/second-output.js texts:: 1 +prepend: (127-3180):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (127-3179) +text: (127-3180) var N; (function (N) { function f() { @@ -2182,7 +2182,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2272,7 +2272,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3179-3215) +text: (3180-3216) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index 3f048c5515baf..ca8fbac858e7e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -46,7 +46,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -568,7 +568,7 @@ sourceFile:../second/second_part1.ts 6 >Emitted(21, 46) Source(18, 41) + SourceIndex(3) 7 >Emitted(21, 47) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -1873,7 +1873,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 127, - "end": 3561, + "end": 3562, "kind": "text" } ] @@ -1955,7 +1955,7 @@ function f() { } ---------------------------------------------------------------------- -text: (127-3561) +text: (127-3562) var N; (function (N) { function f() { @@ -1970,7 +1970,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2442,7 +2442,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2966,7 +2966,7 @@ sourceFile:../../../second/second_part1.ts 6 >Emitted(21, 46) Source(18, 41) + SourceIndex(3) 7 >Emitted(21, 47) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -4310,20 +4310,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3561, + "end": 3562, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3561, + "end": 3562, "kind": "text" } ] }, { - "pos": 3561, - "end": 3597, + "pos": 3562, + "end": 3598, "kind": "text" } ] @@ -4358,9 +4358,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3561):: ../../../2/second-output.js texts:: 1 +prepend: (0-3562):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3561) +text: (0-3562) var s = "Hello, world"; console.log(s); console.log(s); @@ -4382,7 +4382,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -4472,7 +4472,7 @@ var C = /** @class */ (function () { }()); ---------------------------------------------------------------------- -text: (3561-3597) +text: (3562-3598) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled.js index c68c0d44e9356..0268f265a20af 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled.js @@ -311,7 +311,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -835,7 +835,7 @@ sourceFile:../../../second/second_part1.ts 6 >Emitted(21, 46) Source(18, 41) + SourceIndex(3) 7 >Emitted(21, 47) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2192,20 +2192,20 @@ sourceFile:../../third_part1.ts }, { "pos": 127, - "end": 3561, + "end": 3562, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 127, - "end": 3561, + "end": 3562, "kind": "text" } ] }, { - "pos": 3561, - "end": 3597, + "pos": 3562, + "end": 3598, "kind": "text" } ] @@ -2265,9 +2265,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (127-3561):: ../../../2/second-output.js texts:: 1 +prepend: (127-3562):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (127-3561) +text: (127-3562) var N; (function (N) { function f() { @@ -2282,7 +2282,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2372,7 +2372,7 @@ var C = /** @class */ (function () { }()); ---------------------------------------------------------------------- -text: (3561-3597) +text: (3562-3598) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js index a5c99ef2c312b..49f9b33b92f77 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -68,7 +68,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -567,7 +567,7 @@ sourceFile:../second/second_part1.ts 4 >Emitted(21, 31) Source(18, 40) + SourceIndex(3) 5 >Emitted(21, 32) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -1795,7 +1795,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 127, - "end": 3179, + "end": 3180, "kind": "text" } ] @@ -1877,7 +1877,7 @@ function f() { } ---------------------------------------------------------------------- -text: (127-3179) +text: (127-3180) var N; (function (N) { function f() { @@ -1892,7 +1892,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2364,7 +2364,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2865,7 +2865,7 @@ sourceFile:../../../second/second_part1.ts 4 >Emitted(21, 31) Source(18, 40) + SourceIndex(3) 5 >Emitted(21, 32) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -4132,20 +4132,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3179, + "end": 3180, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3179, + "end": 3180, "kind": "text" } ] }, { - "pos": 3179, - "end": 3215, + "pos": 3180, + "end": 3216, "kind": "text" } ] @@ -4180,9 +4180,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3179):: ../../../2/second-output.js texts:: 1 +prepend: (0-3180):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3179) +text: (0-3180) var s = "Hello, world"; console.log(s); console.log(s); @@ -4204,7 +4204,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -4294,7 +4294,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3179-3215) +text: (3180-3216) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index 590b1a33f1a0f..b099862a1711f 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -46,7 +46,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -568,7 +568,7 @@ sourceFile:../second/second_part1.ts 6 >Emitted(21, 45) Source(18, 40) + SourceIndex(3) 7 >Emitted(21, 46) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -1873,7 +1873,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 127, - "end": 3543, + "end": 3544, "kind": "text" } ] @@ -1955,7 +1955,7 @@ function f() { } ---------------------------------------------------------------------- -text: (127-3543) +text: (127-3544) var N; (function (N) { function f() { @@ -1970,7 +1970,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2442,7 +2442,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2966,7 +2966,7 @@ sourceFile:../../../second/second_part1.ts 6 >Emitted(21, 45) Source(18, 40) + SourceIndex(3) 7 >Emitted(21, 46) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -4310,20 +4310,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3543, + "end": 3544, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3543, + "end": 3544, "kind": "text" } ] }, { - "pos": 3543, - "end": 3579, + "pos": 3544, + "end": 3580, "kind": "text" } ] @@ -4358,9 +4358,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3543):: ../../../2/second-output.js texts:: 1 +prepend: (0-3544):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3543) +text: (0-3544) var s = "Hello, world"; console.log(s); console.log(s); @@ -4382,7 +4382,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -4472,7 +4472,7 @@ var C = /** @class */ (function () { }()); ---------------------------------------------------------------------- -text: (3543-3579) +text: (3544-3580) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled.js index 7e73dc4308f73..93278768516d4 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled.js @@ -311,7 +311,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -835,7 +835,7 @@ sourceFile:../../../second/second_part1.ts 6 >Emitted(21, 45) Source(18, 40) + SourceIndex(3) 7 >Emitted(21, 46) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2192,20 +2192,20 @@ sourceFile:../../third_part1.ts }, { "pos": 127, - "end": 3543, + "end": 3544, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 127, - "end": 3543, + "end": 3544, "kind": "text" } ] }, { - "pos": 3543, - "end": 3579, + "pos": 3544, + "end": 3580, "kind": "text" } ] @@ -2265,9 +2265,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (127-3543):: ../../../2/second-output.js texts:: 1 +prepend: (127-3544):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (127-3543) +text: (127-3544) var N; (function (N) { function f() { @@ -2282,7 +2282,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2372,7 +2372,7 @@ var C = /** @class */ (function () { }()); ---------------------------------------------------------------------- -text: (3543-3579) +text: (3544-3580) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal.js index e8947998db3ca..b08266853f142 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal.js @@ -333,7 +333,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -834,7 +834,7 @@ sourceFile:../../../second/second_part1.ts 4 >Emitted(21, 31) Source(18, 40) + SourceIndex(3) 5 >Emitted(21, 32) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2114,20 +2114,20 @@ sourceFile:../../third_part1.ts }, { "pos": 127, - "end": 3179, + "end": 3180, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 127, - "end": 3179, + "end": 3180, "kind": "text" } ] }, { - "pos": 3179, - "end": 3215, + "pos": 3180, + "end": 3216, "kind": "text" } ] @@ -2187,9 +2187,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (127-3179):: ../../../2/second-output.js texts:: 1 +prepend: (127-3180):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (127-3179) +text: (127-3180) var N; (function (N) { function f() { @@ -2204,7 +2204,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2294,7 +2294,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3179-3215) +text: (3180-3216) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js index 87742bb7bdfdb..518f8cfd04673 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js @@ -860,7 +860,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 110, - "end": 3162, + "end": 3163, "kind": "text" } ] @@ -936,7 +936,7 @@ function f() { } ---------------------------------------------------------------------- -text: (110-3162) +text: (110-3163) var N; (function (N) { function f() { @@ -951,7 +951,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1817,20 +1817,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3162, + "end": 3163, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3162, + "end": 3163, "kind": "text" } ] }, { - "pos": 3162, - "end": 3198, + "pos": 3163, + "end": 3199, "kind": "text" } ] @@ -1865,9 +1865,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3162):: ../../../2/second-output.js texts:: 1 +prepend: (0-3163):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3162) +text: (0-3163) var s = "Hello, world"; console.log(s); console.log(f()); @@ -1888,7 +1888,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1978,7 +1978,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3162-3198) +text: (3163-3199) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment.js index dc7b21b3deab5..da905e9ce342b 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment.js @@ -720,20 +720,20 @@ sourceFile:../../third_part1.ts }, { "pos": 110, - "end": 3162, + "end": 3163, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 110, - "end": 3162, + "end": 3163, "kind": "text" } ] }, { - "pos": 3162, - "end": 3198, + "pos": 3163, + "end": 3199, "kind": "text" } ] @@ -792,9 +792,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (110-3162):: ../../../2/second-output.js texts:: 1 +prepend: (110-3163):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (110-3162) +text: (110-3163) var N; (function (N) { function f() { @@ -809,7 +809,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -899,7 +899,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3162-3198) +text: (3163-3199) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js index 2862e36ee866f..0659dc0455e0c 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -882,7 +882,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 110, - "end": 3162, + "end": 3163, "kind": "text" } ] @@ -958,7 +958,7 @@ function f() { } ---------------------------------------------------------------------- -text: (110-3162) +text: (110-3163) var N; (function (N) { function f() { @@ -973,7 +973,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1839,20 +1839,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3162, + "end": 3163, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3162, + "end": 3163, "kind": "text" } ] }, { - "pos": 3162, - "end": 3198, + "pos": 3163, + "end": 3199, "kind": "text" } ] @@ -1887,9 +1887,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3162):: ../../../2/second-output.js texts:: 1 +prepend: (0-3163):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3162) +text: (0-3163) var s = "Hello, world"; console.log(s); console.log(f()); @@ -1910,7 +1910,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -2000,7 +2000,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3162-3198) +text: (3163-3199) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index 972fd46db7df3..7d2160952036f 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -860,7 +860,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 110, - "end": 3526, + "end": 3527, "kind": "text" } ] @@ -936,7 +936,7 @@ function f() { } ---------------------------------------------------------------------- -text: (110-3526) +text: (110-3527) var N; (function (N) { function f() { @@ -951,7 +951,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1817,20 +1817,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3526, + "end": 3527, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3526, + "end": 3527, "kind": "text" } ] }, { - "pos": 3526, - "end": 3562, + "pos": 3527, + "end": 3563, "kind": "text" } ] @@ -1865,9 +1865,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3526):: ../../../2/second-output.js texts:: 1 +prepend: (0-3527):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3526) +text: (0-3527) var s = "Hello, world"; console.log(s); console.log(f()); @@ -1888,7 +1888,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1978,7 +1978,7 @@ var C = /** @class */ (function () { }()); ---------------------------------------------------------------------- -text: (3526-3562) +text: (3527-3563) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled.js index 99486e27c0a7a..e49a98cb9eb8b 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled.js @@ -720,20 +720,20 @@ sourceFile:../../third_part1.ts }, { "pos": 110, - "end": 3526, + "end": 3527, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 110, - "end": 3526, + "end": 3527, "kind": "text" } ] }, { - "pos": 3526, - "end": 3562, + "pos": 3527, + "end": 3563, "kind": "text" } ] @@ -792,9 +792,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (110-3526):: ../../../2/second-output.js texts:: 1 +prepend: (110-3527):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (110-3526) +text: (110-3527) var N; (function (N) { function f() { @@ -809,7 +809,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -899,7 +899,7 @@ var C = /** @class */ (function () { }()); ---------------------------------------------------------------------- -text: (3526-3562) +text: (3527-3563) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal.js index 280f291e8add2..b52dbc7d68606 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal.js @@ -742,20 +742,20 @@ sourceFile:../../third_part1.ts }, { "pos": 110, - "end": 3162, + "end": 3163, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 110, - "end": 3162, + "end": 3163, "kind": "text" } ] }, { - "pos": 3162, - "end": 3198, + "pos": 3163, + "end": 3199, "kind": "text" } ] @@ -814,9 +814,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (110-3162):: ../../../2/second-output.js texts:: 1 +prepend: (110-3163):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (110-3162) +text: (110-3163) var N; (function (N) { function f() { @@ -831,7 +831,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -921,7 +921,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3162-3198) +text: (3163-3199) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js index 00ff72bcf895f..d255a9c7dea05 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js @@ -917,7 +917,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1388,7 +1388,7 @@ sourceFile:../second/second_part1.ts 4 >Emitted(20, 31) Source(18, 41) + SourceIndex(3) 5 >Emitted(20, 32) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2616,7 +2616,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 110, - "end": 3162, + "end": 3163, "kind": "text" } ] @@ -2697,7 +2697,7 @@ function f() { } ---------------------------------------------------------------------- -text: (110-3162) +text: (110-3163) var N; (function (N) { function f() { @@ -2712,7 +2712,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3638,7 +3638,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -4111,7 +4111,7 @@ sourceFile:../../../second/second_part1.ts 4 >Emitted(20, 31) Source(18, 41) + SourceIndex(3) 5 >Emitted(20, 32) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -5378,20 +5378,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3162, + "end": 3163, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3162, + "end": 3163, "kind": "text" } ] }, { - "pos": 3162, - "end": 3198, + "pos": 3163, + "end": 3199, "kind": "text" } ] @@ -5426,9 +5426,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3162):: ../../../2/second-output.js texts:: 1 +prepend: (0-3163):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3162) +text: (0-3163) var s = "Hello, world"; console.log(s); console.log(f()); @@ -5449,7 +5449,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -5539,7 +5539,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3162-3198) +text: (3163-3199) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment.js index a14e55563e276..26dbbe8d2717c 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment.js @@ -783,7 +783,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1119,7 +1119,7 @@ sourceFile:../second/second_part1.ts 4 >Emitted(14, 31) Source(18, 41) + SourceIndex(0) 5 >Emitted(14, 32) Source(18, 42) + SourceIndex(0) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2334,7 +2334,7 @@ sourceFile:../second/second_part2.ts "sections": [ { "pos": 0, - "end": 3052, + "end": 3053, "kind": "text" } ] @@ -2386,7 +2386,7 @@ sourceFile:../second/second_part2.ts ====================================================================== File:: /src/2/second-output.js ---------------------------------------------------------------------- -text: (0-3052) +text: (0-3053) var N; (function (N) { function f() { @@ -2401,7 +2401,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3293,7 +3293,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3766,7 +3766,7 @@ sourceFile:../../../second/second_part1.ts 4 >Emitted(20, 31) Source(18, 41) + SourceIndex(3) 5 >Emitted(20, 32) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -5046,20 +5046,20 @@ sourceFile:../../third_part1.ts }, { "pos": 110, - "end": 3162, + "end": 3163, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 110, - "end": 3162, + "end": 3163, "kind": "text" } ] }, { - "pos": 3162, - "end": 3198, + "pos": 3163, + "end": 3199, "kind": "text" } ] @@ -5118,9 +5118,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (110-3162):: ../../../2/second-output.js texts:: 1 +prepend: (110-3163):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (110-3162) +text: (110-3163) var N; (function (N) { function f() { @@ -5135,7 +5135,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -5225,7 +5225,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3162-3198) +text: (3163-3199) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index 8161491dfa12b..487782c0efbeb 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -1053,7 +1053,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1547,7 +1547,7 @@ sourceFile:../second/second_part1.ts 6 >Emitted(20, 46) Source(18, 41) + SourceIndex(3) 7 >Emitted(20, 47) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2852,7 +2852,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 110, - "end": 3544, + "end": 3545, "kind": "text" } ] @@ -2933,7 +2933,7 @@ function f() { } ---------------------------------------------------------------------- -text: (110-3544) +text: (110-3545) var N; (function (N) { function f() { @@ -2948,7 +2948,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3902,7 +3902,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -4398,7 +4398,7 @@ sourceFile:../../../second/second_part1.ts 6 >Emitted(20, 46) Source(18, 41) + SourceIndex(3) 7 >Emitted(20, 47) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -5742,20 +5742,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3544, + "end": 3545, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3544, + "end": 3545, "kind": "text" } ] }, { - "pos": 3544, - "end": 3580, + "pos": 3545, + "end": 3581, "kind": "text" } ] @@ -5790,9 +5790,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3544):: ../../../2/second-output.js texts:: 1 +prepend: (0-3545):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3544) +text: (0-3545) var s = "Hello, world"; console.log(s); console.log(f()); @@ -5813,7 +5813,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -5903,7 +5903,7 @@ var C = /** @class */ (function () { }()); ---------------------------------------------------------------------- -text: (3544-3580) +text: (3545-3581) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled.js index e204773e7310f..e68da69f5286e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled.js @@ -913,7 +913,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1272,7 +1272,7 @@ sourceFile:../second/second_part1.ts 6 >Emitted(14, 46) Source(18, 41) + SourceIndex(0) 7 >Emitted(14, 47) Source(18, 42) + SourceIndex(0) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2564,7 +2564,7 @@ sourceFile:../second/second_part2.ts "sections": [ { "pos": 0, - "end": 3434, + "end": 3435, "kind": "text" } ] @@ -2616,7 +2616,7 @@ sourceFile:../second/second_part2.ts ====================================================================== File:: /src/2/second-output.js ---------------------------------------------------------------------- -text: (0-3434) +text: (0-3435) var N; (function (N) { function f() { @@ -2631,7 +2631,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3569,7 +3569,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -4065,7 +4065,7 @@ sourceFile:../../../second/second_part1.ts 6 >Emitted(20, 46) Source(18, 41) + SourceIndex(3) 7 >Emitted(20, 47) Source(18, 42) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -5422,20 +5422,20 @@ sourceFile:../../third_part1.ts }, { "pos": 110, - "end": 3544, + "end": 3545, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 110, - "end": 3544, + "end": 3545, "kind": "text" } ] }, { - "pos": 3544, - "end": 3580, + "pos": 3545, + "end": 3581, "kind": "text" } ] @@ -5494,9 +5494,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (110-3544):: ../../../2/second-output.js texts:: 1 +prepend: (110-3545):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (110-3544) +text: (110-3545) var N; (function (N) { function f() { @@ -5511,7 +5511,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /**@internal*/ get: function () { return 10; }, /**@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -5601,7 +5601,7 @@ var C = /** @class */ (function () { }()); ---------------------------------------------------------------------- -text: (3544-3580) +text: (3545-3581) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-one-two-three-are-prepended-in-order.js index 73d35c2cde738..90150a8cfaff2 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -937,7 +937,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1408,7 +1408,7 @@ sourceFile:../second/second_part1.ts 4 >Emitted(20, 31) Source(18, 40) + SourceIndex(3) 5 >Emitted(20, 32) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2636,7 +2636,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 110, - "end": 3162, + "end": 3163, "kind": "text" } ] @@ -2717,7 +2717,7 @@ function f() { } ---------------------------------------------------------------------- -text: (110-3162) +text: (110-3163) var N; (function (N) { function f() { @@ -2732,7 +2732,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3658,7 +3658,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -4131,7 +4131,7 @@ sourceFile:../../../second/second_part1.ts 4 >Emitted(20, 31) Source(18, 40) + SourceIndex(3) 5 >Emitted(20, 32) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -5398,20 +5398,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3162, + "end": 3163, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3162, + "end": 3163, "kind": "text" } ] }, { - "pos": 3162, - "end": 3198, + "pos": 3163, + "end": 3199, "kind": "text" } ] @@ -5446,9 +5446,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3162):: ../../../2/second-output.js texts:: 1 +prepend: (0-3163):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3162) +text: (0-3163) var s = "Hello, world"; console.log(s); console.log(f()); @@ -5469,7 +5469,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -5559,7 +5559,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3162-3198) +text: (3163-3199) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index 4dea6e9474e95..daa46ca4b4e20 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -917,7 +917,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1411,7 +1411,7 @@ sourceFile:../second/second_part1.ts 6 >Emitted(20, 45) Source(18, 40) + SourceIndex(3) 7 >Emitted(20, 46) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2716,7 +2716,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 110, - "end": 3526, + "end": 3527, "kind": "text" } ] @@ -2797,7 +2797,7 @@ function f() { } ---------------------------------------------------------------------- -text: (110-3526) +text: (110-3527) var N; (function (N) { function f() { @@ -2812,7 +2812,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3760,7 +3760,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -4256,7 +4256,7 @@ sourceFile:../../../second/second_part1.ts 6 >Emitted(20, 45) Source(18, 40) + SourceIndex(3) 7 >Emitted(20, 46) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -5600,20 +5600,20 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 3526, + "end": 3527, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 0, - "end": 3526, + "end": 3527, "kind": "text" } ] }, { - "pos": 3526, - "end": 3562, + "pos": 3527, + "end": 3563, "kind": "text" } ] @@ -5648,9 +5648,9 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -prepend: (0-3526):: ../../../2/second-output.js texts:: 1 +prepend: (0-3527):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (0-3526) +text: (0-3527) var s = "Hello, world"; console.log(s); console.log(f()); @@ -5671,7 +5671,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -5761,7 +5761,7 @@ var C = /** @class */ (function () { }()); ---------------------------------------------------------------------- -text: (3526-3562) +text: (3527-3563) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled.js index 37ffe232878f4..959647f7fcb67 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled.js @@ -783,7 +783,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1142,7 +1142,7 @@ sourceFile:../second/second_part1.ts 6 >Emitted(14, 45) Source(18, 40) + SourceIndex(0) 7 >Emitted(14, 46) Source(18, 41) + SourceIndex(0) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2434,7 +2434,7 @@ sourceFile:../second/second_part2.ts "sections": [ { "pos": 0, - "end": 3416, + "end": 3417, "kind": "text" } ] @@ -2486,7 +2486,7 @@ sourceFile:../second/second_part2.ts ====================================================================== File:: /src/2/second-output.js ---------------------------------------------------------------------- -text: (0-3416) +text: (0-3417) var N; (function (N) { function f() { @@ -2501,7 +2501,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3433,7 +3433,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3929,7 +3929,7 @@ sourceFile:../../../second/second_part1.ts 6 >Emitted(20, 45) Source(18, 40) + SourceIndex(3) 7 >Emitted(20, 46) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -5286,20 +5286,20 @@ sourceFile:../../third_part1.ts }, { "pos": 110, - "end": 3526, + "end": 3527, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 110, - "end": 3526, + "end": 3527, "kind": "text" } ] }, { - "pos": 3526, - "end": 3562, + "pos": 3527, + "end": 3563, "kind": "text" } ] @@ -5358,9 +5358,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (110-3526):: ../../../2/second-output.js texts:: 1 +prepend: (110-3527):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (110-3526) +text: (110-3527) var N; (function (N) { function f() { @@ -5375,7 +5375,7 @@ var normalC = /** @class */ (function () { Object.defineProperty(normalC.prototype, "c", { /*@internal*/ get: function () { return 10; }, /*@internal*/ set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -5465,7 +5465,7 @@ var C = /** @class */ (function () { }()); ---------------------------------------------------------------------- -text: (3526-3562) +text: (3527-3563) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal.js index 17dd04d9da044..df6b517cc065a 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal.js @@ -803,7 +803,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -1139,7 +1139,7 @@ sourceFile:../second/second_part1.ts 4 >Emitted(14, 31) Source(18, 40) + SourceIndex(0) 5 >Emitted(14, 32) Source(18, 41) + SourceIndex(0) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -2354,7 +2354,7 @@ sourceFile:../second/second_part2.ts "sections": [ { "pos": 0, - "end": 3052, + "end": 3053, "kind": "text" } ] @@ -2406,7 +2406,7 @@ sourceFile:../second/second_part2.ts ====================================================================== File:: /src/2/second-output.js ---------------------------------------------------------------------- -text: (0-3052) +text: (0-3053) var N; (function (N) { function f() { @@ -2421,7 +2421,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3313,7 +3313,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -3786,7 +3786,7 @@ sourceFile:../../../second/second_part1.ts 4 >Emitted(20, 31) Source(18, 40) + SourceIndex(3) 5 >Emitted(20, 32) Source(18, 41) + SourceIndex(3) --- ->>> enumerable: true, +>>> enumerable: false, >>> configurable: true >>> }); 1 >^^^^^^^ @@ -5066,20 +5066,20 @@ sourceFile:../../third_part1.ts }, { "pos": 110, - "end": 3162, + "end": 3163, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 110, - "end": 3162, + "end": 3163, "kind": "text" } ] }, { - "pos": 3162, - "end": 3198, + "pos": 3163, + "end": 3199, "kind": "text" } ] @@ -5138,9 +5138,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (110-3162):: ../../../2/second-output.js texts:: 1 +prepend: (110-3163):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (110-3162) +text: (110-3163) var N; (function (N) { function f() { @@ -5155,7 +5155,7 @@ var normalC = (function () { Object.defineProperty(normalC.prototype, "c", { get: function () { return 10; }, set: function (val) { }, - enumerable: true, + enumerable: false, configurable: true }); return normalC; @@ -5245,7 +5245,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (3162-3198) +text: (3163-3199) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js index cc1685c53b94f..54342b3877044 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js @@ -19,11 +19,23 @@ exitCode:: ExitStatus.Success //// [/src/tests/index.d.ts] file written with same contents //// [/src/tests/index.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; exports.__esModule = true; diff --git a/tests/baselines/reference/tsbuild/watchMode/configFileErrors/reports-syntax-errors-in-config-file.js b/tests/baselines/reference/tsbuild/watchMode/configFileErrors/reports-syntax-errors-in-config-file.js index 2e28c1a91a572..3ee5dcad19000 100644 --- a/tests/baselines/reference/tsbuild/watchMode/configFileErrors/reports-syntax-errors-in-config-file.js +++ b/tests/baselines/reference/tsbuild/watchMode/configFileErrors/reports-syntax-errors-in-config-file.js @@ -52,11 +52,11 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} FsWatches:: @@ -101,11 +101,11 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} FsWatches:: @@ -141,11 +141,11 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} FsWatches:: @@ -179,11 +179,11 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} FsWatches:: @@ -276,11 +276,11 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tsbuild/watchMode/demo/updates-with-bad-reference.js b/tests/baselines/reference/tsbuild/watchMode/demo/updates-with-bad-reference.js index 488265e249a45..c3f7ba4bde981 100644 --- a/tests/baselines/reference/tsbuild/watchMode/demo/updates-with-bad-reference.js +++ b/tests/baselines/reference/tsbuild/watchMode/demo/updates-with-bad-reference.js @@ -209,33 +209,33 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/demo/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/core/tsconfig.json","pollingInterval":250} /user/username/projects/demo/core/utilities.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/core/utilities.ts","pollingInterval":250} /user/username/projects/demo/animals/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/tsconfig.json","pollingInterval":250} /user/username/projects/demo/animals/animal.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/animal.ts","pollingInterval":250} /user/username/projects/demo/animals/dog.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/dog.ts","pollingInterval":250} /user/username/projects/demo/animals/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/index.ts","pollingInterval":250} /user/username/projects/demo/zoo/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/zoo/tsconfig.json","pollingInterval":250} /user/username/projects/demo/zoo/zoo.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/zoo/zoo.ts","pollingInterval":250} /user/username/projects/demo/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/tsconfig.json","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/demo/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/demo/animals: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/animals","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/demo/zoo: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/zoo","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -300,32 +300,32 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/demo/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/core/tsconfig.json","pollingInterval":250} /user/username/projects/demo/core/utilities.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/core/utilities.ts","pollingInterval":250} /user/username/projects/demo/animals/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/tsconfig.json","pollingInterval":250} /user/username/projects/demo/animals/animal.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/animal.ts","pollingInterval":250} /user/username/projects/demo/animals/dog.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/dog.ts","pollingInterval":250} /user/username/projects/demo/animals/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/index.ts","pollingInterval":250} /user/username/projects/demo/zoo/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/zoo/tsconfig.json","pollingInterval":250} /user/username/projects/demo/zoo/zoo.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/zoo/zoo.ts","pollingInterval":250} /user/username/projects/demo/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/tsconfig.json","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/demo/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/demo/animals: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/animals","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/demo/zoo: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/zoo","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/demo/updates-with-circular-reference.js b/tests/baselines/reference/tsbuild/watchMode/demo/updates-with-circular-reference.js index 9848df887ee2e..5ba90a8e60876 100644 --- a/tests/baselines/reference/tsbuild/watchMode/demo/updates-with-circular-reference.js +++ b/tests/baselines/reference/tsbuild/watchMode/demo/updates-with-circular-reference.js @@ -170,33 +170,33 @@ error TS6202: Project references may not form a circular graph. Cycle detected: WatchedFiles:: /user/username/projects/demo/animals/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/tsconfig.json","pollingInterval":250} /user/username/projects/demo/animals/animal.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/animal.ts","pollingInterval":250} /user/username/projects/demo/animals/dog.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/dog.ts","pollingInterval":250} /user/username/projects/demo/animals/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/index.ts","pollingInterval":250} /user/username/projects/demo/zoo/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/zoo/tsconfig.json","pollingInterval":250} /user/username/projects/demo/zoo/zoo.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/zoo/zoo.ts","pollingInterval":250} /user/username/projects/demo/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/core/tsconfig.json","pollingInterval":250} /user/username/projects/demo/core/utilities.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/core/utilities.ts","pollingInterval":250} /user/username/projects/demo/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/tsconfig.json","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/demo/animals: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/animals","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/demo/zoo: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/zoo","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/demo/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -286,7 +286,7 @@ export default interface Animal { Object.defineProperty(exports, "__esModule", { value: true }); var animal_1 = require("./animal"); var dog_1 = require("./dog"); -exports.createDog = dog_1.createDog; +Object.defineProperty(exports, "createDog", { enumerable: true, get: function () { return dog_1.createDog; } }); //// [/user/username/projects/demo/lib/animals/index.d.ts] @@ -555,32 +555,32 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/demo/animals/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/tsconfig.json","pollingInterval":250} /user/username/projects/demo/animals/animal.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/animal.ts","pollingInterval":250} /user/username/projects/demo/animals/dog.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/dog.ts","pollingInterval":250} /user/username/projects/demo/animals/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/animals/index.ts","pollingInterval":250} /user/username/projects/demo/zoo/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/zoo/tsconfig.json","pollingInterval":250} /user/username/projects/demo/zoo/zoo.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/zoo/zoo.ts","pollingInterval":250} /user/username/projects/demo/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/core/tsconfig.json","pollingInterval":250} /user/username/projects/demo/core/utilities.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/core/utilities.ts","pollingInterval":250} /user/username/projects/demo/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/demo/tsconfig.json","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/demo/animals: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/animals","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/demo/zoo: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/zoo","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/demo/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/demo/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error.js b/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error.js index f6ab27a5f59ee..933cf3b1e89fb 100644 --- a/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error.js +++ b/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error.js @@ -72,19 +72,19 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -147,18 +147,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/creates-solution-in-watch-mode.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/creates-solution-in-watch-mode.js index b7098c6896a97..d1e3bf598fb33 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/creates-solution-in-watch-mode.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/creates-solution-in-watch-mode.js @@ -373,26 +373,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/incremental-updates-in-verbose-mode.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/incremental-updates-in-verbose-mode.js index 261066b7267f9..6e5b8a92b0a0d 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/incremental-updates-in-verbose-mode.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/incremental-updates-in-verbose-mode.js @@ -397,27 +397,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -539,27 +539,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -762,26 +762,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js index 5e0372b652d8f..a4f3ed223a24c 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js @@ -116,17 +116,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/tsconfig.json","pollingInterval":250} /user/username/projects/solution/app/filewitherror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithError.ts","pollingInterval":250} /user/username/projects/solution/app/filewithouterror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithoutError.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/solution/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/solution/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -162,17 +162,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/tsconfig.json","pollingInterval":250} /user/username/projects/solution/app/filewitherror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithError.ts","pollingInterval":250} /user/username/projects/solution/app/filewithouterror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithoutError.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/solution/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/solution/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -205,16 +205,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/tsconfig.json","pollingInterval":250} /user/username/projects/solution/app/filewitherror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithError.ts","pollingInterval":250} /user/username/projects/solution/app/filewithouterror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithoutError.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/solution/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/solution/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js index ca1701e11a86b..2f3ed9a7f03d7 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js @@ -116,17 +116,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/tsconfig.json","pollingInterval":250} /user/username/projects/solution/app/filewitherror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithError.ts","pollingInterval":250} /user/username/projects/solution/app/filewithouterror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithoutError.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/solution/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/solution/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -162,17 +162,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/tsconfig.json","pollingInterval":250} /user/username/projects/solution/app/filewitherror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithError.ts","pollingInterval":250} /user/username/projects/solution/app/filewithouterror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithoutError.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/solution/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/solution/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -211,16 +211,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/tsconfig.json","pollingInterval":250} /user/username/projects/solution/app/filewitherror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithError.ts","pollingInterval":250} /user/username/projects/solution/app/filewithouterror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithoutError.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/solution/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/solution/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js index 8b920fe4def28..a683edc78c199 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js @@ -50,17 +50,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/tsconfig.json","pollingInterval":250} /user/username/projects/solution/app/filewitherror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithError.ts","pollingInterval":250} /user/username/projects/solution/app/filewithouterror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithoutError.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/solution/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/solution/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -93,16 +93,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/tsconfig.json","pollingInterval":250} /user/username/projects/solution/app/filewitherror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithError.ts","pollingInterval":250} /user/username/projects/solution/app/filewithouterror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithoutError.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/solution/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/solution/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js index 811a6a0a7f1e6..4df484618f247 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js @@ -50,17 +50,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/tsconfig.json","pollingInterval":250} /user/username/projects/solution/app/filewitherror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithError.ts","pollingInterval":250} /user/username/projects/solution/app/filewithouterror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithoutError.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/solution/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/solution/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -162,16 +162,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/tsconfig.json","pollingInterval":250} /user/username/projects/solution/app/filewitherror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithError.ts","pollingInterval":250} /user/username/projects/solution/app/filewithouterror.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/solution/app/fileWithoutError.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/solution/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/solution/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js index 893ee48684eb1..3ca90a0c91f37 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js @@ -373,27 +373,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -434,27 +434,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -493,26 +493,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js index d151c47e240e9..7b02c508aa761 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js @@ -376,27 +376,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -437,27 +437,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -496,26 +496,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/watches-config-files-that-are-not-present.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/watches-config-files-that-are-not-present.js index e5f01747893fe..4f96d58dba959 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/watches-config-files-that-are-not-present.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/watches-config-files-that-are-not-present.js @@ -161,23 +161,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -293,27 +293,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -421,26 +421,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js index 88dcb6efe8d46..f8d454a6896cb 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js @@ -124,21 +124,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/library/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/Library/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/library/library.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/Library/library.ts","pollingInterval":250} /user/username/projects/sample1/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/App/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/app/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/App/app.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/library: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/library","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -239,21 +239,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/library/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/Library/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/library/library.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/Library/library.ts","pollingInterval":250} /user/username/projects/sample1/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/App/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/app/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/App/app.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/library: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/library","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -353,20 +353,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/library/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/Library/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/library/library.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/Library/library.ts","pollingInterval":250} /user/username/projects/sample1/app/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/App/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/app/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/App/app.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/library: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/library","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-using-prepend-builds-referencing-project-even-for-non-local-change.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-using-prepend-builds-referencing-project-even-for-non-local-change.js index df9dd7ebde715..103e5f39eb775 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-using-prepend-builds-referencing-project-even-for-non-local-change.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-using-prepend-builds-referencing-project-even-for-non-local-change.js @@ -201,21 +201,21 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -299,21 +299,21 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -435,21 +435,21 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -529,21 +529,21 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -651,20 +651,20 @@ Output:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/builds-when-new-file-is-added,-and-its-subsequent-updates.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/builds-when-new-file-is-added,-and-its-subsequent-updates.js index 8616c482c2ac3..2c6615143442f 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/builds-when-new-file-is-added,-and-its-subsequent-updates.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/builds-when-new-file-is-added,-and-its-subsequent-updates.js @@ -339,27 +339,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -441,29 +441,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -488,29 +488,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -538,29 +538,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -651,29 +651,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -698,29 +698,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -748,28 +748,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/change-builds-changes-and-reports-found-errors-message.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/change-builds-changes-and-reports-found-errors-message.js index 8c998e5be7a5d..1102138fc6b8e 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/change-builds-changes-and-reports-found-errors-message.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/change-builds-changes-and-reports-found-errors-message.js @@ -339,27 +339,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -451,27 +451,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -548,27 +548,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -659,27 +659,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -762,27 +762,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -859,27 +859,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -970,27 +970,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -1091,27 +1091,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -1188,27 +1188,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -1299,26 +1299,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/non-local-change-does-not-start-build-of-referencing-projects.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/non-local-change-does-not-start-build-of-referencing-projects.js index ac811ecc22091..a580223d9f570 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/non-local-change-does-not-start-build-of-referencing-projects.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-circular-project-reference/non-local-change-does-not-start-build-of-referencing-projects.js @@ -339,27 +339,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -439,27 +439,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -474,27 +474,27 @@ Output:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -511,26 +511,26 @@ Output:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js index 2bf809cb0050c..3dd44cc6fa73f 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js @@ -373,27 +373,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -482,29 +482,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -529,29 +529,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -579,29 +579,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -699,29 +699,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -746,29 +746,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -796,28 +796,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} /user/username/projects/sample1/core/newfile.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/newfile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js index de3bdf3bd5073..792e69a192c66 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js @@ -373,27 +373,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -491,27 +491,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -588,27 +588,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -699,27 +699,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -808,27 +808,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -905,27 +905,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -1016,27 +1016,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -1143,27 +1143,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -1240,27 +1240,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -1351,26 +1351,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js index 249c469c90cf2..fdc8fd171df98 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js @@ -373,27 +373,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -477,27 +477,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -512,27 +512,27 @@ Output:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -549,26 +549,26 @@ Output:: WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/core/anothermodule.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/anotherModule.ts","pollingInterval":250} /user/username/projects/sample1/core/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/core/index.ts","pollingInterval":250} /user/username/projects/sample1/logic/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/logic/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/logic/index.ts","pollingInterval":250} /user/username/projects/sample1/tests/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/tsconfig.json","pollingInterval":250} /user/username/projects/sample1/tests/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/sample1/tests/index.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/sample1/core: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/core","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/sample1/logic: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/sample1/logic","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuild/watchMode/reexport/Reports-errors-correctly.js b/tests/baselines/reference/tsbuild/watchMode/reexport/Reports-errors-correctly.js index 739e1f745a633..d31d0664c1fd4 100644 --- a/tests/baselines/reference/tsbuild/watchMode/reexport/Reports-errors-correctly.js +++ b/tests/baselines/reference/tsbuild/watchMode/reexport/Reports-errors-correctly.js @@ -190,25 +190,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/reexport/src/pure/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/pure/tsconfig.json","pollingInterval":250} /user/username/projects/reexport/src/pure/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/pure/index.ts","pollingInterval":250} /user/username/projects/reexport/src/pure/session.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/pure/session.ts","pollingInterval":250} /user/username/projects/reexport/src/main/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/main/tsconfig.json","pollingInterval":250} /user/username/projects/reexport/src/main/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/main/index.ts","pollingInterval":250} /user/username/projects/reexport/src/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/tsconfig.json","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/reexport/src/pure: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/reexport/src/pure","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/reexport/src/main: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/reexport/src/main","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -324,25 +324,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/reexport/src/pure/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/pure/tsconfig.json","pollingInterval":250} /user/username/projects/reexport/src/pure/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/pure/index.ts","pollingInterval":250} /user/username/projects/reexport/src/pure/session.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/pure/session.ts","pollingInterval":250} /user/username/projects/reexport/src/main/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/main/tsconfig.json","pollingInterval":250} /user/username/projects/reexport/src/main/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/main/index.ts","pollingInterval":250} /user/username/projects/reexport/src/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/tsconfig.json","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/reexport/src/pure: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/reexport/src/pure","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/reexport/src/main: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/reexport/src/main","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -459,24 +459,24 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/reexport/src/pure/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/pure/tsconfig.json","pollingInterval":250} /user/username/projects/reexport/src/pure/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/pure/index.ts","pollingInterval":250} /user/username/projects/reexport/src/pure/session.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/pure/session.ts","pollingInterval":250} /user/username/projects/reexport/src/main/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/main/tsconfig.json","pollingInterval":250} /user/username/projects/reexport/src/main/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/main/index.ts","pollingInterval":250} /user/username/projects/reexport/src/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/reexport/src/tsconfig.json","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/reexport/src/pure: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/reexport/src/pure","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/reexport/src/main: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/reexport/src/main","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-false-and-tsbuildinfo-as-null-on-command-line-but-has-tsbuild-info-in-config.js b/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-false-and-tsbuildinfo-as-null-on-command-line-but-has-tsbuild-info-in-config.js new file mode 100644 index 0000000000000..8b1e90d965bb3 --- /dev/null +++ b/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-false-and-tsbuildinfo-as-null-on-command-line-but-has-tsbuild-info-in-config.js @@ -0,0 +1,11 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --composite false --p src/project --tsBuildInfoFile null +exitCode:: ExitStatus.Success + + +//// [/src/project/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = 10; + + diff --git a/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-false-on-command-line-but-has-tsbuild-info-in-config.js b/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-false-on-command-line-but-has-tsbuild-info-in-config.js new file mode 100644 index 0000000000000..dc7ed0590b7ac --- /dev/null +++ b/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-false-on-command-line-but-has-tsbuild-info-in-config.js @@ -0,0 +1,12 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --composite false --p src/project +src/project/tsconfig.json(6,9): error TS5069: Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or option 'composite'. +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = 10; + + diff --git a/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-false-on-command-line.js b/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-false-on-command-line.js new file mode 100644 index 0000000000000..878fe45b3ff01 --- /dev/null +++ b/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-false-on-command-line.js @@ -0,0 +1,11 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --composite false --p src/project +exitCode:: ExitStatus.Success + + +//// [/src/project/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = 10; + + diff --git a/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-null-on-command-line.js b/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-null-on-command-line.js new file mode 100644 index 0000000000000..c30cd727af7f7 --- /dev/null +++ b/tests/baselines/reference/tsc/composite/initial-build/when-setting-composite-null-on-command-line.js @@ -0,0 +1,11 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --composite null --p src/project +exitCode:: ExitStatus.Success + + +//// [/src/project/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = 10; + + diff --git a/tests/baselines/reference/tsc/declarationEmit/initial-build/when-pkg-references-sibling-package-through-indirect-symlink.js b/tests/baselines/reference/tsc/declarationEmit/initial-build/when-pkg-references-sibling-package-through-indirect-symlink.js index 4e98729a388bb..772a0eb96641d 100644 --- a/tests/baselines/reference/tsc/declarationEmit/initial-build/when-pkg-references-sibling-package-through-indirect-symlink.js +++ b/tests/baselines/reference/tsc/declarationEmit/initial-build/when-pkg-references-sibling-package-through-indirect-symlink.js @@ -17,11 +17,18 @@ export * from './keys'; //// [/src/pkg3/dist/index.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./keys")); +__exportStar(require("./keys"), exports); //// [/src/pkg3/dist/keys.js] diff --git a/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/createWatchOfConfigFile.js b/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/createWatchOfConfigFile.js index a8c84a0cb9e9d..257725597b612 100644 --- a/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/createWatchOfConfigFile.js +++ b/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/createWatchOfConfigFile.js @@ -43,17 +43,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -87,16 +87,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/when-createWatchProgram-is-invoked-with-configFileParseResult-on-WatchCompilerHostOfConfigFile.js b/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/when-createWatchProgram-is-invoked-with-configFileParseResult-on-WatchCompilerHostOfConfigFile.js index 63a11b26ec46c..b18febcdf7683 100644 --- a/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/when-createWatchProgram-is-invoked-with-configFileParseResult-on-WatchCompilerHostOfConfigFile.js +++ b/tests/baselines/reference/tscWatch/consoleClearing/when-preserveWatchOutput-is-true-in-config-file/when-createWatchProgram-is-invoked-with-configFileParseResult-on-WatchCompilerHostOfConfigFile.js @@ -43,17 +43,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -87,16 +87,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/consoleClearing/with---diagnostics.js b/tests/baselines/reference/tscWatch/consoleClearing/with---diagnostics.js index dd386d6acea02..148f6800314e1 100644 --- a/tests/baselines/reference/tscWatch/consoleClearing/with---diagnostics.js +++ b/tests/baselines/reference/tscWatch/consoleClearing/with---diagnostics.js @@ -50,9 +50,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -104,9 +104,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/consoleClearing/with---extendedDiagnostics.js b/tests/baselines/reference/tscWatch/consoleClearing/with---extendedDiagnostics.js index 578a9b7fffcf3..7a59eb5aae9b4 100644 --- a/tests/baselines/reference/tscWatch/consoleClearing/with---extendedDiagnostics.js +++ b/tests/baselines/reference/tscWatch/consoleClearing/with---extendedDiagnostics.js @@ -54,9 +54,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -108,9 +108,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/consoleClearing/with---preserveWatchOutput.js b/tests/baselines/reference/tscWatch/consoleClearing/with---preserveWatchOutput.js index bf7bdc4f777cd..a70d6ad899038 100644 --- a/tests/baselines/reference/tscWatch/consoleClearing/with---preserveWatchOutput.js +++ b/tests/baselines/reference/tscWatch/consoleClearing/with---preserveWatchOutput.js @@ -40,9 +40,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -80,9 +80,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/consoleClearing/without---diagnostics-or---extendedDiagnostics.js b/tests/baselines/reference/tscWatch/consoleClearing/without---diagnostics-or---extendedDiagnostics.js index 4cb8232c5d269..64759bd2845a7 100644 --- a/tests/baselines/reference/tscWatch/consoleClearing/without---diagnostics-or---extendedDiagnostics.js +++ b/tests/baselines/reference/tscWatch/consoleClearing/without---diagnostics-or---extendedDiagnostics.js @@ -40,9 +40,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -80,9 +80,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /f.ts: - {"pollingInterval":250} + {"fileName":"/f.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/emit/emit-file-content/elides-const-enums-correctly-in-incremental-compilation.js b/tests/baselines/reference/tscWatch/emit/emit-file-content/elides-const-enums-correctly-in-incremental-compilation.js index 2258e83fa4d6b..0acfda9910a2a 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-file-content/elides-const-enums-correctly-in-incremental-compilation.js +++ b/tests/baselines/reference/tscWatch/emit/emit-file-content/elides-const-enums-correctly-in-incremental-compilation.js @@ -63,13 +63,13 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/someone/projects/myproject/file3.ts: - {"pollingInterval":250} + {"fileName":"/user/someone/projects/myproject/file3.ts","pollingInterval":250} /user/someone/projects/myproject/file2.ts: - {"pollingInterval":250} + {"fileName":"/user/someone/projects/myproject/file2.ts","pollingInterval":250} /user/someone/projects/myproject/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/someone/projects/myproject/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -112,13 +112,13 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/someone/projects/myproject/file3.ts: - {"pollingInterval":250} + {"fileName":"/user/someone/projects/myproject/file3.ts","pollingInterval":250} /user/someone/projects/myproject/file2.ts: - {"pollingInterval":250} + {"fileName":"/user/someone/projects/myproject/file2.ts","pollingInterval":250} /user/someone/projects/myproject/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/someone/projects/myproject/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/emit/emit-file-content/file-is-deleted-and-created-as-part-of-change.js b/tests/baselines/reference/tscWatch/emit/emit-file-content/file-is-deleted-and-created-as-part-of-change.js index 9d9197b1bdc59..3fbc10a01c9e6 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-file-content/file-is-deleted-and-created-as-part-of-change.js +++ b/tests/baselines/reference/tscWatch/emit/emit-file-content/file-is-deleted-and-created-as-part-of-change.js @@ -44,19 +44,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /home/username/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/home/username/project/tsconfig.json","pollingInterval":250} /home/username/project/app/file.ts: - {"pollingInterval":250} + {"fileName":"/home/username/project/app/file.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /home/username/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/username/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /home/username/project/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/username/project/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -93,18 +93,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /home/username/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/home/username/project/tsconfig.json","pollingInterval":250} /home/username/project/app/file.ts: - {"pollingInterval":250} + {"fileName":"/home/username/project/app/file.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /home/username/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/username/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /home/username/project/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/username/project/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-file-content/handles-new-lines-carriageReturn-lineFeed.js b/tests/baselines/reference/tscWatch/emit/emit-file-content/handles-new-lines-carriageReturn-lineFeed.js index fc5884aafe4a6..c3b483701e730 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-file-content/handles-new-lines-carriageReturn-lineFeed.js +++ b/tests/baselines/reference/tscWatch/emit/emit-file-content/handles-new-lines-carriageReturn-lineFeed.js @@ -43,9 +43,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/app.ts: - {"pollingInterval":250} + {"fileName":"/a/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -88,9 +88,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/app.ts: - {"pollingInterval":250} + {"fileName":"/a/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/emit/emit-file-content/handles-new-lines-lineFeed.js b/tests/baselines/reference/tscWatch/emit/emit-file-content/handles-new-lines-lineFeed.js index 6e984554dc9bf..c95747eb75965 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-file-content/handles-new-lines-lineFeed.js +++ b/tests/baselines/reference/tscWatch/emit/emit-file-content/handles-new-lines-lineFeed.js @@ -43,9 +43,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/app.ts: - {"pollingInterval":250} + {"fileName":"/a/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -88,9 +88,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/app.ts: - {"pollingInterval":250} + {"fileName":"/a/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/emit/emit-file-content/should-emit-specified-file.js b/tests/baselines/reference/tscWatch/emit/emit-file-content/should-emit-specified-file.js index 056b8838a97a7..976435d24f530 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-file-content/should-emit-specified-file.js +++ b/tests/baselines/reference/tscWatch/emit/emit-file-content/should-emit-specified-file.js @@ -71,23 +71,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} /a/b/f3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f3.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -130,22 +130,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} /a/b/f3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f3.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-always-return-the-file-itself-if-'--isolatedModules'-is-specified.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-always-return-the-file-itself-if-'--isolatedModules'-is-specified.js index 5ac4cfe21d070..3b53157eaf8b4 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-always-return-the-file-itself-if-'--isolatedModules'-is-specified.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-always-return-the-file-itself-if-'--isolatedModules'-is-specified.js @@ -91,27 +91,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -120,7 +120,15 @@ Change:: Change the content of moduleFile1 to `export var T: number;export funct //// [/a/b/moduleFile1.ts] export var T: number;export function Foo() { }; -//// [/a/b/moduleFile1.js] file written with same contents +//// [/a/b/moduleFile1.js] +"use strict"; +exports.__esModule = true; +exports.T = void 0; +function Foo() { } +exports.Foo = Foo; +; + + Output:: >> Screen clear @@ -150,26 +158,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-always-return-the-file-itself-if-'--out'-or-'--outFile'-is-specified.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-always-return-the-file-itself-if-'--out'-or-'--outFile'-is-specified.js index 06f539bd12c07..8bae3db2fa68a 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-always-return-the-file-itself-if-'--out'-or-'--outFile'-is-specified.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-always-return-the-file-itself-if-'--out'-or-'--outFile'-is-specified.js @@ -102,27 +102,27 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -204,26 +204,26 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-deleted-files.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-deleted-files.js index b80e9c8335277..beca4999867d3 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-deleted-files.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-deleted-files.js @@ -89,27 +89,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -118,7 +118,15 @@ Change:: change moduleFile1 shape and delete file1Consumer2 //// [/a/b/moduleFile1.ts] export var T: number;export function Foo() { }; -//// [/a/b/moduleFile1.js] file written with same contents +//// [/a/b/moduleFile1.js] +"use strict"; +exports.__esModule = true; +exports.T = void 0; +function Foo() { } +exports.Foo = Foo; +; + + //// [/a/b/file1Consumer1.js] file written with same contents //// [/a/b/file1Consumer2.ts] deleted @@ -146,24 +154,24 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-newly-created-files.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-newly-created-files.js index 4927b7ae7b496..0cbc827fd18e0 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-newly-created-files.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-newly-created-files.js @@ -89,27 +89,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -118,7 +118,15 @@ Change:: change moduleFile1 shape and create file1Consumer3 //// [/a/b/moduleFile1.ts] export var T: number;export function Foo() { }; -//// [/a/b/moduleFile1.js] file written with same contents +//// [/a/b/moduleFile1.js] +"use strict"; +exports.__esModule = true; +exports.T = void 0; +function Foo() { } +exports.Foo = Foo; +; + + //// [/a/b/file1Consumer1.js] file written with same contents //// [/a/b/file1Consumer2.js] file written with same contents //// [/a/b/file1Consumer3.ts] @@ -160,28 +168,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/file1consumer3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer3.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-the-reference-map-changes.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-the-reference-map-changes.js index 4eaacd069d829..c45888616d316 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-the-reference-map-changes.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-be-up-to-date-with-the-reference-map-changes.js @@ -89,27 +89,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -151,27 +151,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -180,7 +180,15 @@ Change:: Change the content of moduleFile1 to `export var T: number;export funct //// [/a/b/moduleFile1.ts] export var T: number;export function Foo() { }; -//// [/a/b/moduleFile1.js] file written with same contents +//// [/a/b/moduleFile1.js] +"use strict"; +exports.__esModule = true; +exports.T = void 0; +function Foo() { } +exports.Foo = Foo; +; + + //// [/a/b/file1Consumer2.js] file written with same contents Output:: @@ -210,27 +218,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -271,27 +279,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -341,27 +349,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -374,6 +382,7 @@ export var T: number;export function Foo() { }; //// [/a/b/moduleFile1.js] "use strict"; exports.__esModule = true; +exports.T = void 0; function Foo() { } exports.Foo = Foo; ; @@ -408,26 +417,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-contains-only-itself-if-a-module-file's-shape-didn't-change,-and-all-files-referencing-it-if-its-shape-changed.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-contains-only-itself-if-a-module-file's-shape-didn't-change,-and-all-files-referencing-it-if-its-shape-changed.js index 6a2d6f3b00347..77e20bfec1bc8 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-contains-only-itself-if-a-module-file's-shape-didn't-change,-and-all-files-referencing-it-if-its-shape-changed.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-contains-only-itself-if-a-module-file's-shape-didn't-change,-and-all-files-referencing-it-if-its-shape-changed.js @@ -89,27 +89,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -118,7 +118,15 @@ Change:: Change the content of moduleFile1 to `export var T: number;export funct //// [/a/b/moduleFile1.ts] export var T: number;export function Foo() { }; -//// [/a/b/moduleFile1.js] file written with same contents +//// [/a/b/moduleFile1.js] +"use strict"; +exports.__esModule = true; +exports.T = void 0; +function Foo() { } +exports.Foo = Foo; +; + + //// [/a/b/file1Consumer1.js] file written with same contents //// [/a/b/file1Consumer2.js] file written with same contents @@ -148,27 +156,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -180,6 +188,7 @@ export var T: number;export function Foo() { console.log('hi'); }; //// [/a/b/moduleFile1.js] "use strict"; exports.__esModule = true; +exports.T = void 0; function Foo() { console.log('hi'); } exports.Foo = Foo; ; @@ -212,26 +221,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-changes-in-non-root-files.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-changes-in-non-root-files.js index e5ca481d15a92..2606b0f2579ed 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-changes-in-non-root-files.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-changes-in-non-root-files.js @@ -68,19 +68,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -89,7 +89,15 @@ Change:: Change the content of moduleFile1 to `export var T: number;export funct //// [/a/b/moduleFile1.ts] export var T: number;export function Foo() { }; -//// [/a/b/moduleFile1.js] file written with same contents +//// [/a/b/moduleFile1.js] +"use strict"; +exports.__esModule = true; +exports.T = void 0; +function Foo() { } +exports.Foo = Foo; +; + + //// [/a/b/file1Consumer1.js] file written with same contents Output:: @@ -114,19 +122,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -138,6 +146,7 @@ export var T: number;export function Foo() { };var T1: number; //// [/a/b/moduleFile1.js] "use strict"; exports.__esModule = true; +exports.T = void 0; function Foo() { } exports.Foo = Foo; ; @@ -166,18 +175,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-non-existing-code-file.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-non-existing-code-file.js index a68bde1d5dc39..e4de08133acff 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-non-existing-code-file.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-non-existing-code-file.js @@ -52,21 +52,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/referencefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/referenceFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/modulefile2.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -111,21 +111,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/referencefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/referenceFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/modulefile2.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -168,20 +168,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/referencefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/referenceFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-removed-code-file.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-removed-code-file.js index ed62ca87d5709..0c375726c4e65 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-removed-code-file.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-detect-removed-code-file.js @@ -63,21 +63,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/referencefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/referenceFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -110,20 +110,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/referencefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/referenceFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/modulefile1.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-return-all-files-if-a-global-file-changed-shape.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-return-all-files-if-a-global-file-changed-shape.js index 501a9a3e6f28a..6eaa7b608eed1 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-return-all-files-if-a-global-file-changed-shape.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-return-all-files-if-a-global-file-changed-shape.js @@ -89,27 +89,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -156,26 +156,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-return-cascaded-affected-file-list.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-return-cascaded-affected-file-list.js index 3903ddc256386..0142035e9165a 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-return-cascaded-affected-file-list.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-return-cascaded-affected-file-list.js @@ -99,29 +99,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1Consumer1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -130,7 +130,13 @@ Change:: change file1Consumer1 //// [/a/b/file1Consumer1.ts] import {Foo} from "./moduleFile1"; export var y = 10;export var T: number; -//// [/a/b/file1Consumer1.js] file written with same contents +//// [/a/b/file1Consumer1.js] +"use strict"; +exports.__esModule = true; +exports.y = 10; +exports.T = void 0; + + //// [/a/b/file1Consumer1Consumer1.js] file written with same contents Output:: @@ -159,29 +165,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1Consumer1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -190,7 +196,15 @@ Change:: Change the content of moduleFile1 to `export var T: number;export funct //// [/a/b/moduleFile1.ts] export var T: number;export function Foo() { }; -//// [/a/b/moduleFile1.js] file written with same contents +//// [/a/b/moduleFile1.js] +"use strict"; +exports.__esModule = true; +exports.T = void 0; +function Foo() { } +exports.Foo = Foo; +; + + //// [/a/b/file1Consumer1.js] file written with same contents //// [/a/b/file1Consumer2.js] file written with same contents @@ -221,29 +235,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1Consumer1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -255,8 +269,23 @@ export var T2: number;export function Foo() { }; //// [/a/b/file1Consumer1.ts] import {Foo} from "./moduleFile1"; export var y = 10;export var T: number;export var T2: number; -//// [/a/b/moduleFile1.js] file written with same contents -//// [/a/b/file1Consumer1.js] file written with same contents +//// [/a/b/moduleFile1.js] +"use strict"; +exports.__esModule = true; +exports.T2 = void 0; +function Foo() { } +exports.Foo = Foo; +; + + +//// [/a/b/file1Consumer1.js] +"use strict"; +exports.__esModule = true; +exports.y = 10; +exports.T = void 0; +exports.T2 = void 0; + + //// [/a/b/file1Consumer1Consumer1.js] file written with same contents //// [/a/b/file1Consumer2.js] file written with same contents @@ -288,28 +317,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} /a/b/file1consumer1consumer1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer1Consumer1.ts","pollingInterval":250} /a/b/file1consumer2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1Consumer2.ts","pollingInterval":250} /a/b/globalfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/globalFile3.ts","pollingInterval":250} /a/b/modulefile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-work-fine-for-files-with-circular-references.js b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-work-fine-for-files-with-circular-references.js index 62dde04c3fc2e..cf5c68a6a6057 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-work-fine-for-files-with-circular-references.js +++ b/tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-work-fine-for-files-with-circular-references.js @@ -61,21 +61,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/b/file2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -117,20 +117,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/b/file2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-does-not-have-out-or-outFile.js b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-does-not-have-out-or-outFile.js index 7a712467b9948..c6d2a7cfaa5f1 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-does-not-have-out-or-outFile.js +++ b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-does-not-have-out-or-outFile.js @@ -53,21 +53,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/tsconfig.json","pollingInterval":250} /a/a.ts: - {"pollingInterval":250} + {"fileName":"/a/a.ts","pollingInterval":250} /a/b.ts: - {"pollingInterval":250} + {"fileName":"/a/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -102,20 +102,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/tsconfig.json","pollingInterval":250} /a/a.ts: - {"pollingInterval":250} + {"fileName":"/a/a.ts","pollingInterval":250} /a/b.ts: - {"pollingInterval":250} + {"fileName":"/a/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-out.js b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-out.js index 552b7c197e40f..4d098fc80e864 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-out.js +++ b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-out.js @@ -47,21 +47,21 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/tsconfig.json","pollingInterval":250} /a/a.ts: - {"pollingInterval":250} + {"fileName":"/a/a.ts","pollingInterval":250} /a/b.ts: - {"pollingInterval":250} + {"fileName":"/a/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -96,20 +96,20 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/tsconfig.json","pollingInterval":250} /a/a.ts: - {"pollingInterval":250} + {"fileName":"/a/a.ts","pollingInterval":250} /a/b.ts: - {"pollingInterval":250} + {"fileName":"/a/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-outFile.js b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-outFile.js index 3f9c8189e4647..ea3bdad6edc3c 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-outFile.js +++ b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/config-has-outFile.js @@ -47,21 +47,21 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/tsconfig.json","pollingInterval":250} /a/a.ts: - {"pollingInterval":250} + {"fileName":"/a/a.ts","pollingInterval":250} /a/b.ts: - {"pollingInterval":250} + {"fileName":"/a/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -96,20 +96,20 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/tsconfig.json","pollingInterval":250} /a/a.ts: - {"pollingInterval":250} + {"fileName":"/a/a.ts","pollingInterval":250} /a/b.ts: - {"pollingInterval":250} + {"fileName":"/a/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/with---outFile-and-multiple-declaration-files-in-the-program.js b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/with---outFile-and-multiple-declaration-files-in-the-program.js index b3d73ed09c8a1..47f9fb9ffe996 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/with---outFile-and-multiple-declaration-files-in-the-program.js +++ b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/with---outFile-and-multiple-declaration-files-in-the-program.js @@ -68,22 +68,22 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/b/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/project/tsconfig.json","pollingInterval":250} /a/b/output/anotherdependency/file1.d.ts: - {"pollingInterval":250} + {"fileName":"/a/b/output/AnotherDependency/file1.d.ts","pollingInterval":250} /a/b/dependencies/file2.d.ts: - {"pollingInterval":250} + {"fileName":"/a/b/dependencies/file2.d.ts","pollingInterval":250} /a/b/project/src/main.ts: - {"pollingInterval":250} + {"fileName":"/a/b/project/src/main.ts","pollingInterval":250} /a/b/project/src/main2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/project/src/main2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/without---outFile-and-multiple-declaration-files-in-the-program.js b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/without---outFile-and-multiple-declaration-files-in-the-program.js index f1c7bd64bcb1a..69b778e8233ed 100644 --- a/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/without---outFile-and-multiple-declaration-files-in-the-program.js +++ b/tests/baselines/reference/tscWatch/emit/emit-with-outFile-or-out-setting/without---outFile-and-multiple-declaration-files-in-the-program.js @@ -76,22 +76,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/project/tsconfig.json","pollingInterval":250} /a/b/output/anotherdependency/file1.d.ts: - {"pollingInterval":250} + {"fileName":"/a/b/output/AnotherDependency/file1.d.ts","pollingInterval":250} /a/b/dependencies/file2.d.ts: - {"pollingInterval":250} + {"fileName":"/a/b/dependencies/file2.d.ts","pollingInterval":250} /a/b/project/src/main.ts: - {"pollingInterval":250} + {"fileName":"/a/b/project/src/main.ts","pollingInterval":250} /a/b/project/src/main2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/project/src/main2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emit/when-module-emit-is-specified-as-node/when-instead-of-filechanged-recursive-directory-watcher-is-invoked.js b/tests/baselines/reference/tscWatch/emit/when-module-emit-is-specified-as-node/when-instead-of-filechanged-recursive-directory-watcher-is-invoked.js index c5a3ce67c6824..b87da9485dd40 100644 --- a/tests/baselines/reference/tscWatch/emit/when-module-emit-is-specified-as-node/when-instead-of-filechanged-recursive-directory-watcher-is-invoked.js +++ b/tests/baselines/reference/tscWatch/emit/when-module-emit-is-specified-as-node/when-instead-of-filechanged-recursive-directory-watcher-is-invoked.js @@ -53,21 +53,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/rootfolder/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/rootFolder/project/tsconfig.json","pollingInterval":250} /a/rootfolder/project/scripts/javascript.js: - {"pollingInterval":250} + {"fileName":"/a/rootFolder/project/Scripts/Javascript.js","pollingInterval":250} /a/rootfolder/project/scripts/typescript.ts: - {"pollingInterval":250} + {"fileName":"/a/rootFolder/project/Scripts/TypeScript.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/rootfolder/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/rootFolder/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/rootfolder/project/scripts: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/rootfolder/project/scripts","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -105,20 +105,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/rootfolder/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/rootFolder/project/tsconfig.json","pollingInterval":250} /a/rootfolder/project/scripts/javascript.js: - {"pollingInterval":250} + {"fileName":"/a/rootFolder/project/Scripts/Javascript.js","pollingInterval":250} /a/rootfolder/project/scripts/typescript.ts: - {"pollingInterval":250} + {"fileName":"/a/rootFolder/project/Scripts/TypeScript.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/rootfolder/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/rootFolder/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/rootfolder/project/scripts: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/rootfolder/project/scripts","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/deepImportChanges/updates-errors-when-deep-import-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/deepImportChanges/updates-errors-when-deep-import-file-changes.js index 3c4b536c87422..d2cb1d33ac146 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/deepImportChanges/updates-errors-when-deep-import-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/deepImportChanges/updates-errors-when-deep-import-file-changes.js @@ -93,23 +93,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -158,22 +158,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js index bce8664eae658..92d068ab3451e 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js @@ -68,25 +68,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -122,24 +122,24 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/file-not-exporting-a-deep-multilevel-import-that-changes.js index b8c39b6484a9d..6f49add6d7dcf 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -123,27 +123,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -192,26 +192,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js index 19a4fe780eb01..6a340137c85b3 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js @@ -99,11 +99,18 @@ exports.Data = Data; //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/app.js] @@ -153,29 +160,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -216,28 +223,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js index b0d915d80867c..eb746ee2216a3 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js @@ -82,11 +82,18 @@ exports.Data = Data; //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/app.js] @@ -134,27 +141,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -194,26 +201,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js index f2aa1e833bf1a..5e134d6c8241c 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js @@ -60,23 +60,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -130,22 +130,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js index 9f46249791d48..af55a3ba5da8b 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js @@ -110,23 +110,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -182,22 +182,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js index 64f5a555675a4..4dc63d36598a2 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js @@ -72,25 +72,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -126,24 +126,24 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js index 8dddd3fff925b..ccf75a2ad4835 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -153,27 +153,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -234,26 +234,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js index b554a69a372c6..7a5b239483719 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js @@ -129,11 +129,18 @@ export declare class Data { //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/lib2/public.d.ts] @@ -193,29 +200,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -263,28 +270,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js index a9b7299030e55..d4e444bc03621 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js @@ -103,11 +103,18 @@ export declare class Data { //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/lib2/public.d.ts] @@ -165,27 +172,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -232,26 +239,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js index 0d8f7659fcaa9..89b280cad34ce 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js @@ -60,23 +60,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -144,22 +144,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/deepImportChanges/updates-errors-when-deep-import-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/deepImportChanges/updates-errors-when-deep-import-file-changes.js index 2f0957c1688e8..ce127747a2d27 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/deepImportChanges/updates-errors-when-deep-import-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/deepImportChanges/updates-errors-when-deep-import-file-changes.js @@ -93,23 +93,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -161,22 +161,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js index b25db78b7bee6..c6331d80532c8 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js @@ -68,25 +68,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -125,24 +125,24 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/file-not-exporting-a-deep-multilevel-import-that-changes.js index 321ea493c6364..8cdff6cdaa5d0 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -123,27 +123,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -189,26 +189,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js index 914e3c4e6d5f6..99e8ce8517c56 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js @@ -99,11 +99,18 @@ exports.Data = Data; //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/app.js] @@ -153,29 +160,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -224,28 +231,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js index 2560229ebe163..e7ad49e6e7666 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js @@ -82,11 +82,18 @@ exports.Data = Data; //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/app.js] @@ -134,27 +141,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -201,26 +208,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError.js index 2f9453a80d4be..cca8aaccdbe92 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError.js @@ -66,23 +66,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -136,22 +136,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js index dee07ade221ef..50de044d39b2d 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js @@ -110,23 +110,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -186,22 +186,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js index 42cce174695d7..0641b783122bf 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js @@ -72,25 +72,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -130,24 +130,24 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js index 0f5a270c4d2bf..e9eb86bb2ac71 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -153,27 +153,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -233,26 +233,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js index 6f6c17dcd8465..5ee82dfb58bd1 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js @@ -129,11 +129,18 @@ export declare class Data { //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/lib2/public.d.ts] @@ -193,29 +200,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -276,28 +283,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js index 64e72a39a7306..68940266979ec 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js @@ -103,11 +103,18 @@ export declare class Data { //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/lib2/public.d.ts] @@ -165,27 +172,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -243,26 +250,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError.js index 3494626c5d27a..5280905f11128 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError.js @@ -60,23 +60,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -144,22 +144,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/deepImportChanges/updates-errors-when-deep-import-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/deepImportChanges/updates-errors-when-deep-import-file-changes.js index cb95ec6df3b84..c592669059153 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/deepImportChanges/updates-errors-when-deep-import-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/deepImportChanges/updates-errors-when-deep-import-file-changes.js @@ -93,23 +93,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -160,22 +160,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js index f5efcb6a554b4..b9d1e0f737cc8 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js @@ -68,25 +68,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -125,24 +125,24 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/file-not-exporting-a-deep-multilevel-import-that-changes.js index 02df1af92eaa5..5d0970e0f2c7f 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -123,27 +123,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -188,26 +188,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js index 3afafdf7b60d5..35900c38da7f0 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js @@ -61,20 +61,34 @@ exports.__esModule = true; //// [/user/username/projects/myproject/lib1/tools/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./tools.interface")); +__exportStar(require("./tools.interface"), exports); //// [/user/username/projects/myproject/lib1/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./tools/public")); +__exportStar(require("./tools/public"), exports); //// [/user/username/projects/myproject/lib2/data2.js] @@ -107,11 +121,18 @@ exports.Data = Data; //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/app.js] @@ -161,29 +182,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -231,28 +252,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js index 273b2ec39d5f2..0797a5fba7654 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js @@ -55,20 +55,34 @@ exports.__esModule = true; //// [/user/username/projects/myproject/lib1/tools/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./tools.interface")); +__exportStar(require("./tools.interface"), exports); //// [/user/username/projects/myproject/lib1/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./tools/public")); +__exportStar(require("./tools/public"), exports); //// [/user/username/projects/myproject/lib2/data.js] @@ -90,11 +104,18 @@ exports.Data = Data; //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/app.js] @@ -142,27 +163,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -208,26 +229,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError.js index 7ef63242fc5fe..82e1fd63fd34d 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError.js @@ -60,23 +60,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -130,22 +130,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js index de49e62d1ec0f..bcc6d1287a80c 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/updates-errors-when-deep-import-file-changes.js @@ -110,23 +110,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -185,22 +185,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js index bd094e89cbcfe..4c77bc671e7c5 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/updates-errors-when-deep-import-through-declaration-file-changes.js @@ -72,25 +72,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -130,24 +130,24 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /user/username/projects/myproject/c.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js index a507c5e46b8be..c9b720a71eed0 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -153,27 +153,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -232,26 +232,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /user/username/projects/myproject/c.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} /user/username/projects/myproject/d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} /user/username/projects/myproject/e.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js index 55c2e9a201a57..6baae59de3688 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-circular-import-and-exports.js @@ -67,11 +67,18 @@ export interface ITest { //// [/user/username/projects/myproject/lib1/tools/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./tools.interface")); +__exportStar(require("./tools.interface"), exports); //// [/user/username/projects/myproject/lib1/tools/public.d.ts] @@ -80,11 +87,18 @@ export * from "./tools.interface"; //// [/user/username/projects/myproject/lib1/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./tools/public")); +__exportStar(require("./tools/public"), exports); //// [/user/username/projects/myproject/lib1/public.d.ts] @@ -137,11 +151,18 @@ export declare class Data { //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/lib2/public.d.ts] @@ -201,29 +222,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -283,28 +304,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js index b40aaf14401a9..46e2e1890c947 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/updates-errors-when-file-transitively-exported-file-changes/when-there-are-no-circular-import-and-exports.js @@ -61,11 +61,18 @@ export interface ITest { //// [/user/username/projects/myproject/lib1/tools/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./tools.interface")); +__exportStar(require("./tools.interface"), exports); //// [/user/username/projects/myproject/lib1/tools/public.d.ts] @@ -74,11 +81,18 @@ export * from "./tools.interface"; //// [/user/username/projects/myproject/lib1/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./tools/public")); +__exportStar(require("./tools/public"), exports); //// [/user/username/projects/myproject/lib1/public.d.ts] @@ -111,11 +125,18 @@ export declare class Data { //// [/user/username/projects/myproject/lib2/public.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./data")); +__exportStar(require("./data"), exports); //// [/user/username/projects/myproject/lib2/public.d.ts] @@ -173,27 +194,27 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -250,26 +271,26 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} /user/username/projects/myproject/lib2/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} /user/username/projects/myproject/lib2/data.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} /user/username/projects/myproject/lib1/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/public.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} /user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError.js index f969e10b19ab5..eeb5ac1a1f6a9 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError.js @@ -60,23 +60,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -144,22 +144,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/noemitonerror/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/tsconfig.json","pollingInterval":250} /user/username/projects/noemitonerror/shared/types/db.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/shared/types/db.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/main.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/main.ts","pollingInterval":250} /user/username/projects/noemitonerror/src/other.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/noEmitOnError/src/other.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/noemitonerror/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noEmitOnError/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/noemitonerror: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/noemitonerror","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/when-changing-module-name-with-different-casing.js b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/when-changing-module-name-with-different-casing.js index 0699a327607da..d7d241a048d9c 100644 --- a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/when-changing-module-name-with-different-casing.js +++ b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/when-changing-module-name-with-different-casing.js @@ -63,21 +63,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/another.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/another.ts","pollingInterval":250} /user/username/projects/myproject/logger.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/logger.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -117,20 +117,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/another.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/another.ts","pollingInterval":250} /user/username/projects/myproject/logger.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/logger.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/when-renaming-file-with-different-casing.js b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/when-renaming-file-with-different-casing.js index 2ae4f94e04592..84c0226a0fdb7 100644 --- a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/when-renaming-file-with-different-casing.js +++ b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/when-renaming-file-with-different-casing.js @@ -63,21 +63,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/another.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/another.ts","pollingInterval":250} /user/username/projects/myproject/logger.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/logger.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -107,20 +107,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/another.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/another.ts","pollingInterval":250} /user/username/projects/myproject/logger.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/logger.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/incremental/incremental-with-circular-references-watch.js b/tests/baselines/reference/tscWatch/incremental/incremental-with-circular-references-watch.js index 160f65078ec0d..85048aa03f765 100644 --- a/tests/baselines/reference/tscWatch/incremental/incremental-with-circular-references-watch.js +++ b/tests/baselines/reference/tscWatch/incremental/incremental-with-circular-references-watch.js @@ -174,25 +174,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/a.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/a.ts","pollingInterval":250} /users/username/projects/project/b.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/b.ts","pollingInterval":250} /users/username/projects/project/c.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/c.ts","pollingInterval":250} /users/username/projects/project/index.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/index.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -321,24 +321,24 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/a.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/a.ts","pollingInterval":250} /users/username/projects/project/b.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/b.ts","pollingInterval":250} /users/username/projects/project/c.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/c.ts","pollingInterval":250} /users/username/projects/project/index.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/index.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/incremental/module-compilation/own-file-emit-with-errors-watch.js b/tests/baselines/reference/tscWatch/incremental/module-compilation/own-file-emit-with-errors-watch.js index 25ada6b429049..b5ffed1930279 100644 --- a/tests/baselines/reference/tscWatch/incremental/module-compilation/own-file-emit-with-errors-watch.js +++ b/tests/baselines/reference/tscWatch/incremental/module-compilation/own-file-emit-with-errors-watch.js @@ -109,21 +109,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -210,20 +210,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/incremental/module-compilation/own-file-emit-without-errors-watch.js b/tests/baselines/reference/tscWatch/incremental/module-compilation/own-file-emit-without-errors-watch.js index 26693fe859355..8feae78f251b7 100644 --- a/tests/baselines/reference/tscWatch/incremental/module-compilation/own-file-emit-without-errors-watch.js +++ b/tests/baselines/reference/tscWatch/incremental/module-compilation/own-file-emit-without-errors-watch.js @@ -95,21 +95,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -182,20 +182,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/incremental/module-compilation/with---out-watch.js b/tests/baselines/reference/tscWatch/incremental/module-compilation/with---out-watch.js index ced0310c4b1d5..dda24b73d6ac6 100644 --- a/tests/baselines/reference/tscWatch/incremental/module-compilation/with---out-watch.js +++ b/tests/baselines/reference/tscWatch/incremental/module-compilation/with---out-watch.js @@ -94,20 +94,20 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/incremental/own-file-emit-with-errors-watch.js b/tests/baselines/reference/tscWatch/incremental/own-file-emit-with-errors-watch.js index cf0459033c338..6ca8381958ff6 100644 --- a/tests/baselines/reference/tscWatch/incremental/own-file-emit-with-errors-watch.js +++ b/tests/baselines/reference/tscWatch/incremental/own-file-emit-with-errors-watch.js @@ -100,21 +100,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -199,20 +199,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/incremental/own-file-emit-without-errors/with-commandline-parameters-that-are-not-relative-watch.js b/tests/baselines/reference/tscWatch/incremental/own-file-emit-without-errors/with-commandline-parameters-that-are-not-relative-watch.js index 459e728604f77..2aa001e348969 100644 --- a/tests/baselines/reference/tscWatch/incremental/own-file-emit-without-errors/with-commandline-parameters-that-are-not-relative-watch.js +++ b/tests/baselines/reference/tscWatch/incremental/own-file-emit-without-errors/with-commandline-parameters-that-are-not-relative-watch.js @@ -87,21 +87,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -173,20 +173,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/incremental/own-file-emit-without-errors/without-commandline-options-watch.js b/tests/baselines/reference/tscWatch/incremental/own-file-emit-without-errors/without-commandline-options-watch.js index 2790f2404c950..8ab92c6cf7c5f 100644 --- a/tests/baselines/reference/tscWatch/incremental/own-file-emit-without-errors/without-commandline-options-watch.js +++ b/tests/baselines/reference/tscWatch/incremental/own-file-emit-without-errors/without-commandline-options-watch.js @@ -86,21 +86,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -171,20 +171,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/incremental/with---out-watch.js b/tests/baselines/reference/tscWatch/incremental/with---out-watch.js index 9b619cb7ae950..2ff28e31c740b 100644 --- a/tests/baselines/reference/tscWatch/incremental/with---out-watch.js +++ b/tests/baselines/reference/tscWatch/incremental/with---out-watch.js @@ -78,20 +78,20 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /users/username/projects/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} /users/username/projects/project/file1.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file1.ts","pollingInterval":250} /users/username/projects/project/file2.ts: - {"pollingInterval":250} + {"fileName":"/users/username/projects/project/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /users/username/projects/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /users/username/projects/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/Configure-file-diagnostics-events-are-generated-when-the-config-file-has-errors.js b/tests/baselines/reference/tscWatch/programUpdates/Configure-file-diagnostics-events-are-generated-when-the-config-file-has-errors.js index 62c9e6baf2761..894bcbc8ae466 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/Configure-file-diagnostics-events-are-generated-when-the-config-file-has-errors.js +++ b/tests/baselines/reference/tscWatch/programUpdates/Configure-file-diagnostics-events-are-generated-when-the-config-file-has-errors.js @@ -53,18 +53,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/app.ts: - {"pollingInterval":250} + {"fileName":"/a/b/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/Options-Diagnostic-locations-reported-correctly-with-changes-in-configFile-contents-when-options-change.js b/tests/baselines/reference/tscWatch/programUpdates/Options-Diagnostic-locations-reported-correctly-with-changes-in-configFile-contents-when-options-change.js index 4ee038e905ada..8d6be9a2204ff 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/Options-Diagnostic-locations-reported-correctly-with-changes-in-configFile-contents-when-options-change.js +++ b/tests/baselines/reference/tscWatch/programUpdates/Options-Diagnostic-locations-reported-correctly-with-changes-in-configFile-contents-when-options-change.js @@ -56,19 +56,19 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/app.ts: - {"pollingInterval":250} + {"fileName":"/a/b/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -109,18 +109,18 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/app.ts: - {"pollingInterval":250} + {"fileName":"/a/b/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/Proper-errors-document-is-not-contained-in-project.js b/tests/baselines/reference/tscWatch/programUpdates/Proper-errors-document-is-not-contained-in-project.js index a65d275d7a0e0..fa3d3aacca36d 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/Proper-errors-document-is-not-contained-in-project.js +++ b/tests/baselines/reference/tscWatch/programUpdates/Proper-errors-document-is-not-contained-in-project.js @@ -45,18 +45,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/app.ts: - {"pollingInterval":250} + {"fileName":"/a/b/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/Reports-errors-when-the-config-file-changes.js b/tests/baselines/reference/tscWatch/programUpdates/Reports-errors-when-the-config-file-changes.js index dd5db842864b5..c2e658db95745 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/Reports-errors-when-the-config-file-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/Reports-errors-when-the-config-file-changes.js @@ -44,19 +44,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/app.ts: - {"pollingInterval":250} + {"fileName":"/a/b/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -91,19 +91,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/app.ts: - {"pollingInterval":250} + {"fileName":"/a/b/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -135,18 +135,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/app.ts: - {"pollingInterval":250} + {"fileName":"/a/b/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/Updates-diagnostics-when-'--noUnusedLabels'-changes.js b/tests/baselines/reference/tscWatch/programUpdates/Updates-diagnostics-when-'--noUnusedLabels'-changes.js index 1a09339bd8a24..7163e5119e5e8 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/Updates-diagnostics-when-'--noUnusedLabels'-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/Updates-diagnostics-when-'--noUnusedLabels'-changes.js @@ -44,17 +44,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /a.ts: - {"pollingInterval":250} + {"fileName":"/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -87,17 +87,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /a.ts: - {"pollingInterval":250} + {"fileName":"/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -128,16 +128,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /a.ts: - {"pollingInterval":250} + {"fileName":"/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/add-new-files-to-a-configured-program-without-file-list.js b/tests/baselines/reference/tscWatch/programUpdates/add-new-files-to-a-configured-program-without-file-list.js index 66ac1ade73cf3..4726c1a008006 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/add-new-files-to-a-configured-program-without-file-list.js +++ b/tests/baselines/reference/tscWatch/programUpdates/add-new-files-to-a-configured-program-without-file-list.js @@ -44,19 +44,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -94,20 +94,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile2.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/add-the-missing-module-file-for-inferred-project-should-remove-the-module-not-found-error.js b/tests/baselines/reference/tscWatch/programUpdates/add-the-missing-module-file-for-inferred-project-should-remove-the-module-not-found-error.js index d41af8a57a3c5..fbfe2e37e7cf5 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/add-the-missing-module-file-for-inferred-project-should-remove-the-module-not-found-error.js +++ b/tests/baselines/reference/tscWatch/programUpdates/add-the-missing-module-file-for-inferred-project-should-remove-the-module-not-found-error.js @@ -46,15 +46,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -94,11 +94,11 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/modulefile.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/programUpdates/can-correctly-update-configured-project-when-set-of-root-files-has-changed-(new-file-in-list-of-files).js b/tests/baselines/reference/tscWatch/programUpdates/can-correctly-update-configured-project-when-set-of-root-files-has-changed-(new-file-in-list-of-files).js index 8bc3bde15d4d5..4f4263fa0eb9e 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/can-correctly-update-configured-project-when-set-of-root-files-has-changed-(new-file-in-list-of-files).js +++ b/tests/baselines/reference/tscWatch/programUpdates/can-correctly-update-configured-project-when-set-of-root-files-has-changed-(new-file-in-list-of-files).js @@ -47,17 +47,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -95,18 +95,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/can-correctly-update-configured-project-when-set-of-root-files-has-changed-(new-file-on-disk).js b/tests/baselines/reference/tscWatch/programUpdates/can-correctly-update-configured-project-when-set-of-root-files-has-changed-(new-file-on-disk).js index a2702d90ae3a3..a57944f9dc477 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/can-correctly-update-configured-project-when-set-of-root-files-has-changed-(new-file-on-disk).js +++ b/tests/baselines/reference/tscWatch/programUpdates/can-correctly-update-configured-project-when-set-of-root-files-has-changed-(new-file-on-disk).js @@ -44,19 +44,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -94,20 +94,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/can-handle-tsconfig-file-name-with-difference-casing.js b/tests/baselines/reference/tscWatch/programUpdates/can-handle-tsconfig-file-name-with-difference-casing.js index e9fb267e5228d..0bec2a80dc975 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/can-handle-tsconfig-file-name-with-difference-casing.js +++ b/tests/baselines/reference/tscWatch/programUpdates/can-handle-tsconfig-file-name-with-difference-casing.js @@ -44,16 +44,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/A/B/tsconfig.json","pollingInterval":250} /a/b/app.ts: - {"pollingInterval":250} + {"fileName":"/A/B/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/A/B/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/can-update-configured-project-when-set-of-root-files-was-not-changed.js b/tests/baselines/reference/tscWatch/programUpdates/can-update-configured-project-when-set-of-root-files-was-not-changed.js index fbebff82b701b..fa109ce2a0263 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/can-update-configured-project-when-set-of-root-files-was-not-changed.js +++ b/tests/baselines/reference/tscWatch/programUpdates/can-update-configured-project-when-set-of-root-files-was-not-changed.js @@ -53,19 +53,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -100,18 +100,18 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/changes-in-files-are-reflected-in-project-structure.js b/tests/baselines/reference/tscWatch/programUpdates/changes-in-files-are-reflected-in-project-structure.js index eb4697ee36e7c..c2fc6e99053ff 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/changes-in-files-are-reflected-in-project-structure.js +++ b/tests/baselines/reference/tscWatch/programUpdates/changes-in-files-are-reflected-in-project-structure.js @@ -29,11 +29,18 @@ exports.x = 1; //// [/a/b/f1.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./f2")); +__exportStar(require("./f2"), exports); @@ -60,11 +67,11 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -79,11 +86,18 @@ export * from "../c/f3" //// [/a/b/f2.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("../c/f3")); +__exportStar(require("../c/f3"), exports); //// [/a/b/f1.js] file written with same contents @@ -118,13 +132,13 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/c/f3.ts: - {"pollingInterval":250} + {"fileName":"/a/c/f3.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/programUpdates/config-file-includes-the-file.js b/tests/baselines/reference/tscWatch/programUpdates/config-file-includes-the-file.js index cb101af249dce..fbc6b8366e569 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/config-file-includes-the-file.js +++ b/tests/baselines/reference/tscWatch/programUpdates/config-file-includes-the-file.js @@ -67,20 +67,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/c/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/c/tsconfig.json","pollingInterval":250} /a/c/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/c/f2.ts","pollingInterval":250} /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/c/f3.ts: - {"pollingInterval":250} + {"fileName":"/a/c/f3.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/c/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/c/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/config-file-is-deleted.js b/tests/baselines/reference/tscWatch/programUpdates/config-file-is-deleted.js index 1503851f86279..46e913247dc70 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/config-file-is-deleted.js +++ b/tests/baselines/reference/tscWatch/programUpdates/config-file-is-deleted.js @@ -53,21 +53,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -85,20 +85,20 @@ error TS6053: File '/a/b/tsconfig.json' not found. WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped diff --git a/tests/baselines/reference/tscWatch/programUpdates/correctly-handles-changes-in-lib-section-of-config-file.js b/tests/baselines/reference/tscWatch/programUpdates/correctly-handles-changes-in-lib-section-of-config-file.js index fa88b66c87863..164918dbdb41c 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/correctly-handles-changes-in-lib-section-of-config-file.js +++ b/tests/baselines/reference/tscWatch/programUpdates/correctly-handles-changes-in-lib-section-of-config-file.js @@ -50,19 +50,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /src/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/src/tsconfig.json","pollingInterval":250} /src/app.ts: - {"pollingInterval":250} + {"fileName":"/src/app.ts","pollingInterval":250} /compiler/lib.es5.d.ts: - {"pollingInterval":250} + {"fileName":"/compiler/lib.es5.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /src/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/src/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -96,20 +96,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /src/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/src/tsconfig.json","pollingInterval":250} /src/app.ts: - {"pollingInterval":250} + {"fileName":"/src/app.ts","pollingInterval":250} /compiler/lib.es5.d.ts: - {"pollingInterval":250} + {"fileName":"/compiler/lib.es5.d.ts","pollingInterval":250} /compiler/lib.es2015.promise.d.ts: - {"pollingInterval":250} + {"fileName":"/compiler/lib.es2015.promise.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /src/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/src/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/create-configured-project-without-file-list.js b/tests/baselines/reference/tscWatch/programUpdates/create-configured-project-without-file-list.js index 77ab66d898bdc..c1383cefcade5 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/create-configured-project-without-file-list.js +++ b/tests/baselines/reference/tscWatch/programUpdates/create-configured-project-without-file-list.js @@ -62,20 +62,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/c/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/c/f1.ts","pollingInterval":250} /a/b/d/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/d/f2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/create-watch-without-config-file.js b/tests/baselines/reference/tscWatch/programUpdates/create-watch-without-config-file.js index 913feaff5bed9..c649e7c26ed75 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/create-watch-without-config-file.js +++ b/tests/baselines/reference/tscWatch/programUpdates/create-watch-without-config-file.js @@ -56,16 +56,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/c/app.ts: - {"pollingInterval":250} + {"fileName":"/a/b/c/app.ts","pollingInterval":250} /a/b/c/module.d.ts: - {"pollingInterval":250} + {"fileName":"/a/b/c/module.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/deleted-files-affect-project-structure-2.js b/tests/baselines/reference/tscWatch/programUpdates/deleted-files-affect-project-structure-2.js index d6cd96e9b5926..a0ec467ba8e53 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/deleted-files-affect-project-structure-2.js +++ b/tests/baselines/reference/tscWatch/programUpdates/deleted-files-affect-project-structure-2.js @@ -29,20 +29,34 @@ exports.y = 1; //// [/a/b/f2.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("../c/f3")); +__exportStar(require("../c/f3"), exports); //// [/a/b/f1.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./f2")); +__exportStar(require("./f2"), exports); @@ -71,13 +85,13 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} /a/c/f3.ts: - {"pollingInterval":250} + {"fileName":"/a/c/f3.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -113,13 +127,13 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/c/f3.ts: - {"pollingInterval":250} + {"fileName":"/a/c/f3.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/programUpdates/deleted-files-affect-project-structure.js b/tests/baselines/reference/tscWatch/programUpdates/deleted-files-affect-project-structure.js index a841b0bc0df58..d1c2cae10ed32 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/deleted-files-affect-project-structure.js +++ b/tests/baselines/reference/tscWatch/programUpdates/deleted-files-affect-project-structure.js @@ -29,20 +29,34 @@ exports.y = 1; //// [/a/b/f2.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("../c/f3")); +__exportStar(require("../c/f3"), exports); //// [/a/b/f1.js] "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); } exports.__esModule = true; -__export(require("./f2")); +__exportStar(require("./f2"), exports); @@ -71,13 +85,13 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} /a/c/f3.ts: - {"pollingInterval":250} + {"fileName":"/a/c/f3.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -112,11 +126,11 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/f1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/f2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/f2.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/programUpdates/files-explicitly-excluded-in-config-file.js b/tests/baselines/reference/tscWatch/programUpdates/files-explicitly-excluded-in-config-file.js index 1c9dcc0954340..89b9a0892734f 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/files-explicitly-excluded-in-config-file.js +++ b/tests/baselines/reference/tscWatch/programUpdates/files-explicitly-excluded-in-config-file.js @@ -59,20 +59,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/handle-recreated-files-correctly.js b/tests/baselines/reference/tscWatch/programUpdates/handle-recreated-files-correctly.js index f547bf7d6c707..70d8db96ed3f8 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/handle-recreated-files-correctly.js +++ b/tests/baselines/reference/tscWatch/programUpdates/handle-recreated-files-correctly.js @@ -53,21 +53,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -94,19 +94,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -141,20 +141,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile2.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/handles-the-missing-files---that-were-added-to-program-because-they-were-added-with-tripleSlashRefs.js b/tests/baselines/reference/tscWatch/programUpdates/handles-the-missing-files---that-were-added-to-program-because-they-were-added-with-tripleSlashRefs.js index 9859ede4b9294..56073bf7dc0e1 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/handles-the-missing-files---that-were-added-to-program-because-they-were-added-with-tripleSlashRefs.js +++ b/tests/baselines/reference/tscWatch/programUpdates/handles-the-missing-files---that-were-added-to-program-because-they-were-added-with-tripleSlashRefs.js @@ -47,11 +47,11 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonfile2.ts","pollingInterval":250} FsWatches:: @@ -93,11 +93,11 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile2.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/programUpdates/if-config-file-doesnt-have-errors,-they-are-not-reported.js b/tests/baselines/reference/tscWatch/programUpdates/if-config-file-doesnt-have-errors,-they-are-not-reported.js index 2bae0d9afc6a5..bbaee444dd71b 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/if-config-file-doesnt-have-errors,-they-are-not-reported.js +++ b/tests/baselines/reference/tscWatch/programUpdates/if-config-file-doesnt-have-errors,-they-are-not-reported.js @@ -46,18 +46,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/app.ts: - {"pollingInterval":250} + {"fileName":"/a/b/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/non-existing-directories-listed-in-config-file-input-array-should-be-able-to-handle-@types-if-input-file-list-is-empty.js b/tests/baselines/reference/tscWatch/programUpdates/non-existing-directories-listed-in-config-file-input-array-should-be-able-to-handle-@types-if-input-file-list-is-empty.js index b342c0248e221..c10efcbb90114 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/non-existing-directories-listed-in-config-file-input-array-should-be-able-to-handle-@types-if-input-file-list-is-empty.js +++ b/tests/baselines/reference/tscWatch/programUpdates/non-existing-directories-listed-in-config-file-input-array-should-be-able-to-handle-@types-if-input-file-list-is-empty.js @@ -44,12 +44,12 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/tsconfig.json","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/non-existing-directories-listed-in-config-file-input-array-should-be-tolerated-without-crashing-the-server.js b/tests/baselines/reference/tscWatch/programUpdates/non-existing-directories-listed-in-config-file-input-array-should-be-tolerated-without-crashing-the-server.js index 4f6e68732df56..e9cdec404a756 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/non-existing-directories-listed-in-config-file-input-array-should-be-tolerated-without-crashing-the-server.js +++ b/tests/baselines/reference/tscWatch/programUpdates/non-existing-directories-listed-in-config-file-input-array-should-be-tolerated-without-crashing-the-server.js @@ -41,18 +41,18 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} FsWatches:: /a/b/app: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/app","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/test: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/test","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/something: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/something","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-configured-projects.js b/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-configured-projects.js index b6830cfbfd5e0..20f5137f8ed94 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-configured-projects.js +++ b/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-configured-projects.js @@ -60,21 +60,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/b/modulefile.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -119,25 +119,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/modulefile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile1.ts","pollingInterval":250} FsWatches:: /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/modulefile: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/moduleFile","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -179,20 +179,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/modulefile.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-inferred-projects.js b/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-inferred-projects.js index e3acfd60e2c0a..eeec6da0087f5 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-inferred-projects.js +++ b/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-inferred-projects.js @@ -57,11 +57,11 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/b/modulefile.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -100,11 +100,11 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/modulefile.ts: - {"pollingInterval":250} + {"fileName":"/a/b/modulefile.ts","pollingInterval":250} FsWatches:: @@ -150,11 +150,11 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/modulefile.ts: - {"pollingInterval":250} + {"fileName":"/a/b/moduleFile.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/programUpdates/reports-errors-correctly-with-file-not-in-rootDir.js b/tests/baselines/reference/tscWatch/programUpdates/reports-errors-correctly-with-file-not-in-rootDir.js index df304098daf75..518ad3f6975f1 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/reports-errors-correctly-with-file-not-in-rootDir.js +++ b/tests/baselines/reference/tscWatch/programUpdates/reports-errors-correctly-with-file-not-in-rootDir.js @@ -58,21 +58,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -108,20 +108,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/reports-errors-correctly-with-isolatedModules.js b/tests/baselines/reference/tscWatch/programUpdates/reports-errors-correctly-with-isolatedModules.js index b645604c671aa..7a5cf1e18294e 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/reports-errors-correctly-with-isolatedModules.js +++ b/tests/baselines/reference/tscWatch/programUpdates/reports-errors-correctly-with-isolatedModules.js @@ -59,21 +59,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -113,20 +113,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-handle-non-existing-directories-in-config-file.js b/tests/baselines/reference/tscWatch/programUpdates/should-handle-non-existing-directories-in-config-file.js index c7eb6a8dffb2b..4d997cf87d375 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-handle-non-existing-directories-in-config-file.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-handle-non-existing-directories-in-config-file.js @@ -44,20 +44,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/tsconfig.json","pollingInterval":250} /a/src/app.ts: - {"pollingInterval":250} + {"fileName":"/a/src/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /a/notexistingfolder: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/notexistingfolder","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /a/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-ignore-non-existing-files-specified-in-the-config-file.js b/tests/baselines/reference/tscWatch/programUpdates/should-ignore-non-existing-files-specified-in-the-config-file.js index 67c4f8501f127..74e5e282817ea 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-ignore-non-existing-files-specified-in-the-config-file.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-ignore-non-existing-files-specified-in-the-config-file.js @@ -53,18 +53,18 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/commonfile3.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonfile3.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js index dd62ebd97bb03..65429e4feeed6 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js @@ -136,22 +136,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js index 6f0399c263349..0bbea7daf48e8 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js @@ -136,22 +136,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js index 74fdc0784ca56..e5b53e01d33da 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js @@ -127,22 +127,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js index f920088ebd306..94e6d2ff6b12d 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js @@ -121,22 +121,22 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js index a591d273ee26b..12dd5d38736f7 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js @@ -127,22 +127,22 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-properly-handle-module-resolution-changes-in-config-file.js b/tests/baselines/reference/tscWatch/programUpdates/should-properly-handle-module-resolution-changes-in-config-file.js index 45ecb2296b02a..19f4c7ca16812 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-properly-handle-module-resolution-changes-in-config-file.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-properly-handle-module-resolution-changes-in-config-file.js @@ -58,21 +58,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/b/node_modules/module1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/node_modules/module1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -115,20 +115,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/module1.ts: - {"pollingInterval":250} + {"fileName":"/a/module1.ts","pollingInterval":250} FsWatches:: /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-reflect-change-in-config-file.js b/tests/baselines/reference/tscWatch/programUpdates/should-reflect-change-in-config-file.js index 3986c85627363..bdd20a09cf4ce 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-reflect-change-in-config-file.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-reflect-change-in-config-file.js @@ -56,19 +56,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -100,16 +100,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-tolerate-config-file-errors-and-still-try-to-build-a-project.js b/tests/baselines/reference/tscWatch/programUpdates/should-tolerate-config-file-errors-and-still-try-to-build-a-project.js index c9485bc0d24e2..f5df0897b8614 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-tolerate-config-file-errors-and-still-try-to-build-a-project.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-tolerate-config-file-errors-and-still-try-to-build-a-project.js @@ -61,20 +61,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/shouldnt-report-error-about-unused-function-incorrectly-when-file-changes-from-global-to-module.js b/tests/baselines/reference/tscWatch/programUpdates/shouldnt-report-error-about-unused-function-incorrectly-when-file-changes-from-global-to-module.js index b8a0b45499938..30e9449f5f220 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/shouldnt-report-error-about-unused-function-incorrectly-when-file-changes-from-global-to-module.js +++ b/tests/baselines/reference/tscWatch/programUpdates/shouldnt-report-error-about-unused-function-incorrectly-when-file-changes-from-global-to-module.js @@ -51,9 +51,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/file.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -104,9 +104,9 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/file.ts: - {"pollingInterval":250} + {"fileName":"/a/b/file.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/programUpdates/types-should-load-from-config-file-path-if-config-exists.js b/tests/baselines/reference/tscWatch/programUpdates/types-should-load-from-config-file-path-if-config-exists.js index 9ce3b945af0b7..756326be47ae9 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/types-should-load-from-config-file-path-if-config-exists.js +++ b/tests/baselines/reference/tscWatch/programUpdates/types-should-load-from-config-file-path-if-config-exists.js @@ -49,20 +49,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/app.ts: - {"pollingInterval":250} + {"fileName":"/a/b/app.ts","pollingInterval":250} /a/b/node_modules/@types/node/index.d.ts: - {"pollingInterval":250} + {"fileName":"/a/b/node_modules/@types/node/index.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js index 19025658a70c6..fc90c243a6ff2 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js @@ -38,12 +38,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, return c > 3 && r && Object.defineProperty(target, key, r), r; }; import './b'; -let A = class A { - constructor(p) { } -}; -A = __decorate([ - ((_) => { }) -], A); +const A = /** @class */ (() => { + let A = class A { + constructor(p) { } + }; + A = __decorate([ + ((_) => { }) + ], A); + return A; +})(); export { A }; @@ -75,19 +78,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /a.ts: - {"pollingInterval":250} + {"fileName":"/a.ts","pollingInterval":250} /b.ts: - {"pollingInterval":250} + {"fileName":"/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -122,19 +125,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /a.ts: - {"pollingInterval":250} + {"fileName":"/a.ts","pollingInterval":250} /b.ts: - {"pollingInterval":250} + {"fileName":"/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -155,13 +158,16 @@ var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import { B } from './b'; -let A = class A { - constructor(p) { } -}; -A = __decorate([ - ((_) => { }), - __metadata("design:paramtypes", [B]) -], A); +const A = /** @class */ (() => { + let A = class A { + constructor(p) { } + }; + A = __decorate([ + ((_) => { }), + __metadata("design:paramtypes", [B]) + ], A); + return A; +})(); export { A }; @@ -189,18 +195,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /a.ts: - {"pollingInterval":250} + {"fileName":"/a.ts","pollingInterval":250} /b.ts: - {"pollingInterval":250} + {"fileName":"/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-when-useDefineForClassFields-changes.js b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-when-useDefineForClassFields-changes.js index f5c4d978b177d..9e10ed0448b7f 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-when-useDefineForClassFields-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-when-useDefineForClassFields-changes.js @@ -53,17 +53,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /a.ts: - {"pollingInterval":250} + {"fileName":"/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -113,16 +113,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /a.ts: - {"pollingInterval":250} + {"fileName":"/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-and-emit-when-importsNotUsedAsValues-changes.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-and-emit-when-importsNotUsedAsValues-changes.js index f4d689a0a5ba6..7a9dbc540af73 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-and-emit-when-importsNotUsedAsValues-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-and-emit-when-importsNotUsedAsValues-changes.js @@ -64,21 +64,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -113,21 +113,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -171,21 +171,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -220,20 +220,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-correctly-when-declaration-emit-is-disabled-in-compiler-options.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-correctly-when-declaration-emit-is-disabled-in-compiler-options.js index b818f62280c16..4ac03a8f56105 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-correctly-when-declaration-emit-is-disabled-in-compiler-options.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-correctly-when-declaration-emit-is-disabled-in-compiler-options.js @@ -49,21 +49,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -100,21 +100,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -149,21 +149,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -202,21 +202,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -251,20 +251,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-default-options.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-default-options.js index 2207b02abf560..79dc63c4b28f0 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-default-options.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-default-options.js @@ -55,15 +55,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -99,15 +99,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -149,14 +149,14 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-skipDefaultLibCheck.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-skipDefaultLibCheck.js index 1ccb60c790ca3..332223ef496b9 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-skipDefaultLibCheck.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-skipDefaultLibCheck.js @@ -53,15 +53,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -96,15 +96,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -143,14 +143,14 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-skipLibCheck.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-skipLibCheck.js index 56df1558af3e9..e82d552cc36d4 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-skipLibCheck.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-module-file-with-global-definitions-changes/with-skipLibCheck.js @@ -53,15 +53,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -96,15 +96,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -143,14 +143,14 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-default-options.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-default-options.js index 3ad150772e17f..932acfaacae67 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-default-options.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-default-options.js @@ -51,15 +51,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -96,15 +96,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -146,14 +146,14 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-skipDefaultLibCheck.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-skipDefaultLibCheck.js index e2c69174598a8..083837d43b4a2 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-skipDefaultLibCheck.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-skipDefaultLibCheck.js @@ -49,15 +49,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -93,15 +93,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -140,14 +140,14 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-skipLibCheck.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-skipLibCheck.js index 6e0dc94052e80..4cdca3b41eb73 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-skipLibCheck.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-in-lib-file/when-non-module-file-changes/with-skipLibCheck.js @@ -49,15 +49,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -93,15 +93,15 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -140,14 +140,14 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-ambient-modules-of-program-changes.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-ambient-modules-of-program-changes.js index 10c14d872e1b8..b8933cf220de1 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-ambient-modules-of-program-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-ambient-modules-of-program-changes.js @@ -45,19 +45,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -100,21 +100,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /user/username/projects/myproject/b.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -144,18 +144,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-forceConsistentCasingInFileNames-changes.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-forceConsistentCasingInFileNames-changes.js index f29845f27a0cd..07f2465a69bc6 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-forceConsistentCasingInFileNames-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-forceConsistentCasingInFileNames-changes.js @@ -61,19 +61,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /a.ts: - {"pollingInterval":250} + {"fileName":"/a.ts","pollingInterval":250} /b.ts: - {"pollingInterval":250} + {"fileName":"/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -105,18 +105,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /tsconfig.json: - {"pollingInterval":250} + {"fileName":"/tsconfig.json","pollingInterval":250} /a.ts: - {"pollingInterval":250} + {"fileName":"/a.ts","pollingInterval":250} /b.ts: - {"pollingInterval":250} + {"fileName":"/b.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-noErrorTruncation-changes.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-noErrorTruncation-changes.js index 04d87a1e59ef1..52dbf686cf8b2 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-noErrorTruncation-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-noErrorTruncation-changes.js @@ -55,19 +55,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -100,18 +100,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js index d5754b3899e17..c5e20b3a24504 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js @@ -45,19 +45,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -90,19 +90,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -135,19 +135,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -178,18 +178,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-moduleResolution-when-resolveJsonModule-changes.js b/tests/baselines/reference/tscWatch/programUpdates/updates-moduleResolution-when-resolveJsonModule-changes.js index 5db992857c311..cdb44ab716233 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-moduleResolution-when-resolveJsonModule-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-moduleResolution-when-resolveJsonModule-changes.js @@ -50,23 +50,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject/data.json: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/data.json","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -100,24 +100,24 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /user/username/projects/myproject/data.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/data.json","pollingInterval":250} FsWatches:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/data.json: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/data.json","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/watched-files-when-file-is-deleted-and-new-file-is-added-as-part-of-change.js b/tests/baselines/reference/tscWatch/programUpdates/watched-files-when-file-is-deleted-and-new-file-is-added-as-part-of-change.js index 08a989b780031..eb5e29ab81f20 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/watched-files-when-file-is-deleted-and-new-file-is-added-as-part-of-change.js +++ b/tests/baselines/reference/tscWatch/programUpdates/watched-files-when-file-is-deleted-and-new-file-is-added-as-part-of-change.js @@ -44,19 +44,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /home/username/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/home/username/project/tsconfig.json","pollingInterval":250} /home/username/project/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/home/username/project/src/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /home/username/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/username/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /home/username/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/username/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -92,18 +92,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /home/username/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/home/username/project/tsconfig.json","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /home/username/project/src/file2.ts: - {"pollingInterval":250} + {"fileName":"/home/username/project/src/file2.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /home/username/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/username/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /home/username/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/username/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/when-skipLibCheck-and-skipDefaultLibCheck-changes.js b/tests/baselines/reference/tscWatch/programUpdates/when-skipLibCheck-and-skipDefaultLibCheck-changes.js index 6c8194a30849f..7f1dfdf0e826c 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/when-skipLibCheck-and-skipDefaultLibCheck-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/when-skipLibCheck-and-skipDefaultLibCheck-changes.js @@ -61,21 +61,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -109,21 +109,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -159,21 +159,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -210,21 +210,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -259,21 +259,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -307,21 +307,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -359,20 +359,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /user/username/projects/myproject/b.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/b.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/programUpdates/works-correctly-when-config-file-is-changed-but-its-content-havent.js b/tests/baselines/reference/tscWatch/programUpdates/works-correctly-when-config-file-is-changed-but-its-content-havent.js index e251cf09b1753..5dbb032309387 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/works-correctly-when-config-file-is-changed-but-its-content-havent.js +++ b/tests/baselines/reference/tscWatch/programUpdates/works-correctly-when-config-file-is-changed-but-its-content-havent.js @@ -56,19 +56,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -96,18 +96,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/resolutionCache/ignores-changes-in-node_modules-that-start-with-dot/watch-with-configFile.js b/tests/baselines/reference/tscWatch/resolutionCache/ignores-changes-in-node_modules-that-start-with-dot/watch-with-configFile.js index 37b3565a8e2fb..623aff0dbe6cf 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/ignores-changes-in-node_modules-that-start-with-dot/watch-with-configFile.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/ignores-changes-in-node_modules-that-start-with-dot/watch-with-configFile.js @@ -50,23 +50,23 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/test.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/test.ts","pollingInterval":250} /user/username/projects/myproject/node_modules/somemodule/index.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/node_modules/somemodule/index.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -80,22 +80,22 @@ Output:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/test.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/test.ts","pollingInterval":250} /user/username/projects/myproject/node_modules/somemodule/index.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/node_modules/somemodule/index.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/resolutionCache/ignores-changes-in-node_modules-that-start-with-dot/watch-without-configFile.js b/tests/baselines/reference/tscWatch/resolutionCache/ignores-changes-in-node_modules-that-start-with-dot/watch-without-configFile.js index a9b304a95af2d..881cded07eb6d 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/ignores-changes-in-node_modules-that-start-with-dot/watch-without-configFile.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/ignores-changes-in-node_modules-that-start-with-dot/watch-without-configFile.js @@ -50,17 +50,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/test.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/test.ts","pollingInterval":250} /user/username/projects/myproject/node_modules/somemodule/index.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/node_modules/somemodule/index.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -74,16 +74,16 @@ Output:: WatchedFiles:: /user/username/projects/myproject/test.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/test.ts","pollingInterval":250} /user/username/projects/myproject/node_modules/somemodule/index.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/node_modules/somemodule/index.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/resolutionCache/when-types-in-compiler-option-are-global-and-installed-at-later-point.js b/tests/baselines/reference/tscWatch/resolutionCache/when-types-in-compiler-option-are-global-and-installed-at-later-point.js index ec64fa379d0ca..b7a7e19b45b37 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/when-types-in-compiler-option-are-global-and-installed-at-later-point.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/when-types-in-compiler-option-are-global-and-installed-at-later-point.js @@ -44,19 +44,19 @@ No cached semantic diagnostics in the builder:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/lib/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -96,20 +96,20 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/lib/app.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/lib/app.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /user/username/projects/myproject/node_modules/@myapp/ts-types/types/somefile.define.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/node_modules/@myapp/ts-types/types/somefile.define.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/resolutionCache/with-modules-linked-to-sibling-folder.js b/tests/baselines/reference/tscWatch/resolutionCache/with-modules-linked-to-sibling-folder.js index 57cb1fca9fdfb..6bb057a3efe4c 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/with-modules-linked-to-sibling-folder.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/with-modules-linked-to-sibling-folder.js @@ -59,28 +59,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/main/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/main/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/main/index.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/main/index.ts","pollingInterval":250} /user/username/projects/myproject/linked-package/dist/index.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/linked-package/dist/index.d.ts","pollingInterval":250} /user/username/projects/myproject/linked-package/dist/other.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/linked-package/dist/other.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/linked-package: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/linked-package","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/main/@scoped: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/main/@scoped","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/main/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/main/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/main/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/main/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js index 2a5db1a5b6bd4..a0d2d739058e5 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js @@ -58,19 +58,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/foo.ts: - {"pollingInterval":250} + {"fileName":"/a/b/foo.ts","pollingInterval":250} /a/b/bar.d.ts: - {"pollingInterval":250} + {"fileName":"/a/b/bar.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -115,18 +115,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/foo.ts: - {"pollingInterval":250} + {"fileName":"/a/b/foo.ts","pollingInterval":250} /a/b/bar.d.ts: - {"pollingInterval":250} + {"fileName":"/a/b/bar.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js index 0eda4b706cc5e..e93bcb946e16f 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js @@ -44,17 +44,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/foo.ts: - {"pollingInterval":250} + {"fileName":"/a/b/foo.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -99,16 +99,16 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/foo.ts: - {"pollingInterval":250} + {"fileName":"/a/b/foo.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/node_modules/@types/node/index.d.ts: - {"pollingInterval":250} + {"fileName":"/a/b/node_modules/@types/node/index.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js index 8d91441427fce..cfdc90ebda858 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js @@ -47,17 +47,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -91,18 +91,18 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/a.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /user/username/projects/myproject/node_modules/@types/qqq/index.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/node_modules/@types/qqq/index.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-reusing-program-with-files-from-external-library.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-reusing-program-with-files-from-external-library.js index 39e49c5305715..b201e329fdae0 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-reusing-program-with-files-from-external-library.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-reusing-program-with-files-from-external-library.js @@ -66,29 +66,29 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/projects/myproject/src/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/projects/myProject/src/tsconfig.json","pollingInterval":250} /a/b/projects/myproject/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/projects/myProject/src/file1.ts","pollingInterval":250} /a/b/projects/myproject/node_modules/module1/index.js: - {"pollingInterval":250} + {"fileName":"/a/b/projects/myProject/node_modules/module1/index.js","pollingInterval":250} /a/b/projects/myproject/src/file2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/projects/myProject/src/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/projects/myproject/src/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/projects/myProject/src/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/projects/myProject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/projects/myproject/src/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/projects/myProject/src/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/projects/myProject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined @@ -130,28 +130,28 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/projects/myproject/src/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/projects/myProject/src/tsconfig.json","pollingInterval":250} /a/b/projects/myproject/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/projects/myProject/src/file1.ts","pollingInterval":250} /a/b/projects/myproject/node_modules/module1/index.js: - {"pollingInterval":250} + {"fileName":"/a/b/projects/myProject/node_modules/module1/index.js","pollingInterval":250} /a/b/projects/myproject/src/file2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/projects/myProject/src/file2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: FsWatchesRecursive:: /a/b/projects/myproject/src/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/projects/myProject/src/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/projects/myProject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/projects/myproject/src/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/projects/myProject/src/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/projects/myProject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js index 095c5adccf89c..3cc85be95ae1d 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js @@ -43,11 +43,11 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/username/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/username/project/tsconfig.json","pollingInterval":250} /a/username/project/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/username/project/src/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: @@ -85,11 +85,11 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/username/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/username/project/tsconfig.json","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/username/project/src/file2.ts: - {"pollingInterval":250} + {"fileName":"/a/username/project/src/file2.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js index 76ae5a5d2e681..9f5bec3a09f61 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js @@ -43,19 +43,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/username/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/username/project/tsconfig.json","pollingInterval":250} /a/username/project/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/username/project/src/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /a/username/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/username/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/username/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/username/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/username/project/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/username/project/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: @@ -91,19 +91,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/username/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/username/project/tsconfig.json","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/username/project/src/file2.ts: - {"pollingInterval":250} + {"fileName":"/a/username/project/src/file2.ts","pollingInterval":250} FsWatches:: /a/username/project/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/username/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/username/project: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/username/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/username/project/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/username/project/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js index e786008be326c..6f1f34fed8651 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js @@ -43,17 +43,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/username/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/username/project/tsconfig.json","pollingInterval":250} /a/username/project/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/a/username/project/src/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/username/project/node_modules/@types: - {"pollingInterval":500} + {"fileName":"/a/username/project/node_modules/@types","pollingInterval":500} /a/username/project: - {"pollingInterval":500} + {"fileName":"/a/username/project","pollingInterval":500} /a/username/project/src: - {"pollingInterval":500} + {"fileName":"/a/username/project/src","pollingInterval":500} FsWatches:: @@ -91,17 +91,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/username/project/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/username/project/tsconfig.json","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/username/project/node_modules/@types: - {"pollingInterval":500} + {"fileName":"/a/username/project/node_modules/@types","pollingInterval":500} /a/username/project: - {"pollingInterval":500} + {"fileName":"/a/username/project","pollingInterval":500} /a/username/project/src: - {"pollingInterval":500} + {"fileName":"/a/username/project/src","pollingInterval":500} /a/username/project/src/file2.ts: - {"pollingInterval":250} + {"fileName":"/a/username/project/src/file2.ts","pollingInterval":250} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js index 9708b683a1847..14febdc58fb6f 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js @@ -117,31 +117,31 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /home/user/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/home/user/projects/myproject/tsconfig.json","pollingInterval":250} /home/user/projects/myproject/src/file.ts: - {"pollingInterval":250} + {"fileName":"/home/user/projects/myproject/src/file.ts","pollingInterval":250} /home/user/projects/myproject/node_modules/reala/index.d.ts: - {"pollingInterval":250} + {"fileName":"/home/user/projects/myproject/node_modules/reala/index.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /home/user/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/user/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /home/user/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/user/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /home/user/projects/myproject/node_modules/reala: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/user/projects/myproject/node_modules/reala","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /home/user/projects/myproject/node_modules/reala/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/user/projects/myproject/node_modules/reala/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /home/user/projects/myproject/node_modules/realb: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/user/projects/myproject/node_modules/realb","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /home/user/projects/myproject/node_modules/realb/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/user/projects/myproject/node_modules/realb/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /home/user/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/user/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /home/user/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/home/user/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js index 04430feb625c6..ee522c1f8acd2 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js @@ -50,25 +50,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file1.ts","pollingInterval":250} /user/username/projects/myproject/node_modules/file2/index.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/node_modules/file2/index.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/file2: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/file2","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: @@ -97,25 +97,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file1.ts","pollingInterval":250} /user/username/projects/myproject/node_modules/file2/index.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/node_modules/file2/index.d.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/file2: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/file2","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: @@ -148,21 +148,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: @@ -192,21 +192,21 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: @@ -219,21 +219,21 @@ Output:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: @@ -246,21 +246,21 @@ Output:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: @@ -276,21 +276,21 @@ Output:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: @@ -303,23 +303,23 @@ Output:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/file2: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/file2","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: @@ -351,25 +351,25 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /user/username/projects/myproject/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} /user/username/projects/myproject/src/file1.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/src/file1.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /user/username/projects/myproject/node_modules/file2/index.d.ts: - {"pollingInterval":250} + {"fileName":"/user/username/projects/myproject/node_modules/file2/index.d.ts","pollingInterval":250} FsWatches:: /user/username/projects/myproject/src: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/src","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject/node_modules/file2: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/user/username/projects/myproject/node_modules/file2","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js index a31bba01f8953..d664d22736859 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js @@ -53,17 +53,17 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} /a/b/node_modules/@types: - {"pollingInterval":500} + {"fileName":"/a/b/node_modules/@types","pollingInterval":500} /a/b: - {"pollingInterval":500} + {"fileName":"/a/b","pollingInterval":500} FsWatches:: diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js index 0b8356b99de9b..85c1826fd104e 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js @@ -53,19 +53,19 @@ Semantic diagnostics in builder refreshed for:: WatchedFiles:: /a/b/tsconfig.json: - {"pollingInterval":250} + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} /a/b/commonfile1.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile1.ts","pollingInterval":250} /a/b/commonfile2.ts: - {"pollingInterval":250} + {"fileName":"/a/b/commonFile2.ts","pollingInterval":250} /a/lib/lib.d.ts: - {"pollingInterval":250} + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} FsWatches:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchFile-as-watch-options-to-extend.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchFile-as-watch-options-to-extend.js index e3bece821f353..532fbdd357ebf 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchFile-as-watch-options-to-extend.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchFile-as-watch-options-to-extend.js @@ -55,18 +55,18 @@ WatchedFiles:: FsWatches:: /a/b/tsconfig.json: - {"fallbackPollingInterval":2000,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/tsconfig.json","fallbackPollingInterval":2000,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/commonfile1.ts: - {"fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/commonFile1.ts","fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/commonfile2.ts: - {"fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/commonFile2.ts","fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/lib/lib.d.ts: - {"fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/lib/lib.d.ts","fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchFile-option.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchFile-option.js index 3abde2f8e2fff..fc7edb0e53902 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchFile-option.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchFile-option.js @@ -55,18 +55,18 @@ WatchedFiles:: FsWatches:: /a/b/tsconfig.json: - {"fallbackPollingInterval":2000,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/tsconfig.json","fallbackPollingInterval":2000,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/commonfile1.ts: - {"fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/commonFile1.ts","fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b/commonfile2.ts: - {"fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/commonFile2.ts","fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/lib/lib.d.ts: - {"fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/lib/lib.d.ts","fallbackPollingInterval":250,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} FsWatchesRecursive:: /a/b/node_modules/@types: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /a/b: - {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + {"directoryName":"/a/b","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsxElementResolution10.errors.txt b/tests/baselines/reference/tsxElementResolution10.errors.txt index edb0f30d51ea0..3a2802c2ac053 100644 --- a/tests/baselines/reference/tsxElementResolution10.errors.txt +++ b/tests/baselines/reference/tsxElementResolution10.errors.txt @@ -1,8 +1,10 @@ +tests/cases/conformance/jsx/file.tsx(13,1): error TS2605: JSX element type '{ x: number; }' is not a constructor function for JSX elements. + Property 'render' is missing in type '{ x: number; }' but required in type 'ElementClass'. tests/cases/conformance/jsx/file.tsx(13,2): error TS2322: Type '{ x: number; }' is not assignable to type 'string'. tests/cases/conformance/jsx/file.tsx(19,2): error TS2322: Type '{ x: number; render: number; }' is not assignable to type 'string'. -==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== declare module JSX { interface Element { } interface ElementClass { @@ -16,6 +18,10 @@ tests/cases/conformance/jsx/file.tsx(19,2): error TS2322: Type '{ x: number; ren } var Obj1: Obj1type; ; // Error, no render member + ~~~~~~~~~~~~~~~ +!!! error TS2605: JSX element type '{ x: number; }' is not a constructor function for JSX elements. +!!! error TS2605: Property 'render' is missing in type '{ x: number; }' but required in type 'ElementClass'. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:4:3: 'render' is declared here. ~~~~ !!! error TS2322: Type '{ x: number; }' is not assignable to type 'string'. diff --git a/tests/baselines/reference/tsxElementResolution9.errors.txt b/tests/baselines/reference/tsxElementResolution9.errors.txt index b332e60e4e6dd..38d4c941335f6 100644 --- a/tests/baselines/reference/tsxElementResolution9.errors.txt +++ b/tests/baselines/reference/tsxElementResolution9.errors.txt @@ -3,11 +3,15 @@ tests/cases/conformance/jsx/file.tsx(11,2): error TS2769: No overload matches th Type '{}' is not assignable to type 'string'. Overload 2 of 2, '(n: number): { y: string; }', gave the following error. Type '{}' is not assignable to type 'number'. +tests/cases/conformance/jsx/file.tsx(18,1): error TS2605: JSX element type '{ x: number; } & { y: string; }' is not a constructor function for JSX elements. + Property 'something' is missing in type '{ x: number; } & { y: string; }' but required in type 'Element'. tests/cases/conformance/jsx/file.tsx(18,2): error TS2769: No overload matches this call. Overload 1 of 2, '(n: string): { x: number; }', gave the following error. Type '{}' is not assignable to type 'string'. Overload 2 of 2, '(n: number): { y: string; }', gave the following error. Type '{}' is not assignable to type 'number'. +tests/cases/conformance/jsx/file.tsx(25,1): error TS2605: JSX element type '{ x: number; } & { x: number; y: string; }' is not a constructor function for JSX elements. + Property 'something' is missing in type '{ x: number; } & { x: number; y: string; }' but required in type 'Element'. tests/cases/conformance/jsx/file.tsx(25,2): error TS2769: No overload matches this call. Overload 1 of 2, '(n: string): { x: number; }', gave the following error. Type '{ x: number; }' is not assignable to type 'string'. @@ -15,7 +19,7 @@ tests/cases/conformance/jsx/file.tsx(25,2): error TS2769: No overload matches th Type '{ x: number; }' is not assignable to type 'number'. -==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== +==== tests/cases/conformance/jsx/file.tsx (5 errors) ==== declare module JSX { interface Element { something; } interface IntrinsicElements { } @@ -40,6 +44,10 @@ tests/cases/conformance/jsx/file.tsx(25,2): error TS2769: No overload matches th } var Obj2: Obj2; ; // Error, return type is not an object type + ~~~~~~~~ +!!! error TS2605: JSX element type '{ x: number; } & { y: string; }' is not a constructor function for JSX elements. +!!! error TS2605: Property 'something' is missing in type '{ x: number; } & { y: string; }' but required in type 'Element'. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:2:22: 'something' is declared here. ~~~~ !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. @@ -53,6 +61,10 @@ tests/cases/conformance/jsx/file.tsx(25,2): error TS2769: No overload matches th } var Obj3: Obj3; ; // OK + ~~~~~~~~~~~~~~~ +!!! error TS2605: JSX element type '{ x: number; } & { x: number; y: string; }' is not a constructor function for JSX elements. +!!! error TS2605: Property 'something' is missing in type '{ x: number; } & { x: number; y: string; }' but required in type 'Element'. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:2:22: 'something' is declared here. ~~~~ !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. diff --git a/tests/baselines/reference/tsxGenericArrowFunctionParsing.errors.txt b/tests/baselines/reference/tsxGenericArrowFunctionParsing.errors.txt new file mode 100644 index 0000000000000..9fa3091643322 --- /dev/null +++ b/tests/baselines/reference/tsxGenericArrowFunctionParsing.errors.txt @@ -0,0 +1,39 @@ +tests/cases/conformance/jsx/file.tsx(8,17): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? +tests/cases/conformance/jsx/file.tsx(20,32): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? +tests/cases/conformance/jsx/file.tsx(24,25): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? + + +==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== + declare module JSX { + interface Element { isElement; } + } + + var T: any, T1: any, T2: any; + + // This is an element + var x1 = () => {}; + ~ +!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? + x1.isElement; + + // This is a generic function + var x2 = () => {}; + x2(); + + // This is a generic function + var x3 = () => {}; + x3(); + + // This is an element + var x4 = () => {}; + ~ +!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? + x4.isElement; + + // This is an element + var x5 = () => {}; + ~ +!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `>`? + x5.isElement; + + \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution10.types b/tests/baselines/reference/tsxSpreadAttributesResolution10.types index cf202fd6588ef..9341e9674d5d3 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution10.types +++ b/tests/baselines/reference/tsxSpreadAttributesResolution10.types @@ -42,7 +42,7 @@ let y = ; > : JSX.Element >Opt : typeof Opt >obj : OptionProp ->x : number +>x : 3 >3 : 3 let y1 = ; @@ -57,7 +57,7 @@ let y2 = ; > : JSX.Element >Opt : typeof Opt >obj1 : OptionProp ->x : number +>x : 3 >3 : 3 let y3 = ; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution12.types b/tests/baselines/reference/tsxSpreadAttributesResolution12.types index e973dbc3dff99..a6197e7d3db69 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution12.types +++ b/tests/baselines/reference/tsxSpreadAttributesResolution12.types @@ -78,10 +78,10 @@ let x1 = >OverWriteAttr : typeof OverWriteAttr >overwrite : string >obj1 : { x: 2; } ->x : number +>x : 3 >3 : 3 ->{y: true} : { y: boolean; } ->y : boolean +>{y: true} : { y: true; } +>y : true >true : true let x2 = @@ -98,8 +98,8 @@ let x3 = >OverWriteAttr : typeof OverWriteAttr >overwrite : string >obj1 : { x: 2; } ->{y: true} : { y: boolean; } ->y : boolean +>{y: true} : { y: true; } +>y : true >true : true diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution2.types b/tests/baselines/reference/tsxSpreadAttributesResolution2.types index bccbbcdc7fc73..bd9a3e17c38a3 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution2.types +++ b/tests/baselines/reference/tsxSpreadAttributesResolution2.types @@ -63,20 +63,20 @@ let w = ; >w : JSX.Element > : JSX.Element >Poisoned : typeof Poisoned ->{x: 5, y: "2"} : { x: number; y: string; } +>{x: 5, y: "2"} : { x: number; y: "2"; } >x : number >5 : 5 ->y : string +>y : "2" >"2" : "2" let w1 = ; >w1 : JSX.Element > : JSX.Element >Poisoned : typeof Poisoned ->{x: 5, y: "2"} : { x: number; y: string; } +>{x: 5, y: "2"} : { x: number; y: "2"; } >x : number >5 : 5 ->y : string +>y : "2" >"2" : "2" >X : string diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.types b/tests/baselines/reference/tsxSpreadAttributesResolution6.types index dc6364b6306da..f8abfc34b2301 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution6.types +++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.types @@ -34,7 +34,7 @@ let x = >x : JSX.Element > : JSX.Element >TextComponent : typeof TextComponent ->editable : boolean +>editable : true >true : true const textProps: TextProps = { diff --git a/tests/baselines/reference/tsxTypeArgumentPartialDefinitionStillErrors.errors.txt b/tests/baselines/reference/tsxTypeArgumentPartialDefinitionStillErrors.errors.txt index 565485f03b70b..25d62a07fa514 100644 --- a/tests/baselines/reference/tsxTypeArgumentPartialDefinitionStillErrors.errors.txt +++ b/tests/baselines/reference/tsxTypeArgumentPartialDefinitionStillErrors.errors.txt @@ -1,7 +1,8 @@ +tests/cases/compiler/file.tsx(11,1): error TS2605: JSX element type 'string' is not a constructor function for JSX elements. tests/cases/compiler/file.tsx(11,14): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/compiler/file.tsx (1 errors) ==== +==== tests/cases/compiler/file.tsx (2 errors) ==== declare namespace JSX { interface Element { render(): Element | string | false; @@ -13,6 +14,8 @@ tests/cases/compiler/file.tsx(11,14): error TS2322: Type 'number' is not assigna } prop={1}>; // should error + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2605: JSX element type 'string' is not a constructor function for JSX elements. ~~~~ !!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.js b/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.js new file mode 100644 index 0000000000000..3bc4d40c31662 --- /dev/null +++ b/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.js @@ -0,0 +1,21 @@ +//// [tsxUnionMemberChecksFilterDataProps.tsx] +/// +import React, { ReactElement } from "react"; + +declare function NotHappy(props: ({ fixed?: boolean } | { value?: number })): ReactElement; +declare function Happy(props: { fixed?: boolean, value?: number }): ReactElement; + +const RootNotHappy = () => (); +const RootHappy = () => (); + + +//// [tsxUnionMemberChecksFilterDataProps.js] +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +/// +var react_1 = __importDefault(require("react")); +var RootNotHappy = function () { return (react_1["default"].createElement(NotHappy, { "data-testid": "my-test-id" })); }; +var RootHappy = function () { return (react_1["default"].createElement(Happy, { "data-testid": "my-test-id" })); }; diff --git a/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.symbols b/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.symbols new file mode 100644 index 0000000000000..77f47363b4ccf --- /dev/null +++ b/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.symbols @@ -0,0 +1,30 @@ +=== tests/cases/compiler/tsxUnionMemberChecksFilterDataProps.tsx === +/// +import React, { ReactElement } from "react"; +>React : Symbol(React, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 1, 6)) +>ReactElement : Symbol(ReactElement, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 1, 15)) + +declare function NotHappy(props: ({ fixed?: boolean } | { value?: number })): ReactElement; +>NotHappy : Symbol(NotHappy, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 1, 44)) +>props : Symbol(props, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 3, 26)) +>fixed : Symbol(fixed, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 3, 35)) +>value : Symbol(value, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 3, 57)) +>ReactElement : Symbol(ReactElement, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 1, 15)) + +declare function Happy(props: { fixed?: boolean, value?: number }): ReactElement; +>Happy : Symbol(Happy, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 3, 96)) +>props : Symbol(props, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 4, 23)) +>fixed : Symbol(fixed, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 4, 31)) +>value : Symbol(value, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 4, 48)) +>ReactElement : Symbol(ReactElement, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 1, 15)) + +const RootNotHappy = () => (); +>RootNotHappy : Symbol(RootNotHappy, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 6, 5)) +>NotHappy : Symbol(NotHappy, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 1, 44)) +>data-testid : Symbol(data-testid, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 6, 37)) + +const RootHappy = () => (); +>RootHappy : Symbol(RootHappy, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 7, 5)) +>Happy : Symbol(Happy, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 3, 96)) +>data-testid : Symbol(data-testid, Decl(tsxUnionMemberChecksFilterDataProps.tsx, 7, 31)) + diff --git a/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.types b/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.types new file mode 100644 index 0000000000000..d0be74dae84d4 --- /dev/null +++ b/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.types @@ -0,0 +1,34 @@ +=== tests/cases/compiler/tsxUnionMemberChecksFilterDataProps.tsx === +/// +import React, { ReactElement } from "react"; +>React : typeof React +>ReactElement : any + +declare function NotHappy(props: ({ fixed?: boolean } | { value?: number })): ReactElement; +>NotHappy : (props: { fixed?: boolean; } | { value?: number; }) => React.ReactElement +>props : { fixed?: boolean; } | { value?: number; } +>fixed : boolean +>value : number + +declare function Happy(props: { fixed?: boolean, value?: number }): ReactElement; +>Happy : (props: { fixed?: boolean; value?: number; }) => React.ReactElement +>props : { fixed?: boolean; value?: number; } +>fixed : boolean +>value : number + +const RootNotHappy = () => (); +>RootNotHappy : () => JSX.Element +>() => () : () => JSX.Element +>() : JSX.Element +> : JSX.Element +>NotHappy : (props: { fixed?: boolean; } | { value?: number; }) => React.ReactElement +>data-testid : string + +const RootHappy = () => (); +>RootHappy : () => JSX.Element +>() => () : () => JSX.Element +>() : JSX.Element +> : JSX.Element +>Happy : (props: { fixed?: boolean; value?: number; }) => React.ReactElement +>data-testid : string + diff --git a/tests/baselines/reference/twoAccessorsWithSameName.js b/tests/baselines/reference/twoAccessorsWithSameName.js index 4bc385652c47e..23386d9aeaeff 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName.js +++ b/tests/baselines/reference/twoAccessorsWithSameName.js @@ -40,7 +40,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C.prototype, "x", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -50,7 +50,7 @@ var D = /** @class */ (function () { } Object.defineProperty(D.prototype, "x", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return D; @@ -63,7 +63,7 @@ var E = /** @class */ (function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return E; diff --git a/tests/baselines/reference/twoAccessorsWithSameName2.js b/tests/baselines/reference/twoAccessorsWithSameName2.js index 449adca8bf2b8..3c2b050adb8a0 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName2.js +++ b/tests/baselines/reference/twoAccessorsWithSameName2.js @@ -22,7 +22,7 @@ var C = /** @class */ (function () { } Object.defineProperty(C, "x", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -32,7 +32,7 @@ var D = /** @class */ (function () { } Object.defineProperty(D, "x", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return D; @@ -45,7 +45,7 @@ var E = /** @class */ (function () { return 1; }, set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return E; diff --git a/tests/baselines/reference/typeArgInference2WithError.types b/tests/baselines/reference/typeArgInference2WithError.types index 66e2800f7ffb0..e7b3ad5e20d2f 100644 --- a/tests/baselines/reference/typeArgInference2WithError.types +++ b/tests/baselines/reference/typeArgInference2WithError.types @@ -10,8 +10,8 @@ declare function foo(x?: T, y?: T): T; >y : T var z7 = foo("abc", 5); // Error ->z7 : any ->foo("abc", 5) : any +>z7 : Item +>foo("abc", 5) : Item >foo : (x?: T, y?: T) => T >"abc" : "abc" >5 : 5 diff --git a/tests/baselines/reference/typeArgumentConstraintResolution1.types b/tests/baselines/reference/typeArgumentConstraintResolution1.types index f23ae0179b77a..78dae7cbb6dbf 100644 --- a/tests/baselines/reference/typeArgumentConstraintResolution1.types +++ b/tests/baselines/reference/typeArgumentConstraintResolution1.types @@ -32,7 +32,7 @@ function foo2(test: any): any { return null; } >null : null foo2(""); // Type Date does not satisfy the constraint 'Number' for type parameter 'T extends Number' ->foo2("") : any +>foo2("") : Date >foo2 : { (test: T): T; (test: string): T; } >"" : "" diff --git a/tests/baselines/reference/typeArgumentInference.errors.txt b/tests/baselines/reference/typeArgumentInference.errors.txt index fd4bd90771e80..0bd3e2bba4b7d 100644 --- a/tests/baselines/reference/typeArgumentInference.errors.txt +++ b/tests/baselines/reference/typeArgumentInference.errors.txt @@ -1,10 +1,11 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(68,29): error TS2345: Argument of type '0' is not assignable to parameter of type '""'. +tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(69,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(83,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'. tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,74): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. Object literal may only specify known properties, and 'y' does not exist in type 'A92'. -==== tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts (3 errors) ==== +==== tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts (4 errors) ==== // Generic call with no parameters function noParams() { } noParams(); @@ -76,6 +77,9 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,74 ~ !!! error TS2345: Argument of type '0' is not assignable to parameter of type '""'. var a9a: {}; + ~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. +!!! related TS6203 tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts:68:5: 'a9a' was also declared here. var a9b = someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); var a9b: { a?: number; b?: string; }; diff --git a/tests/baselines/reference/typeArgumentInference.types b/tests/baselines/reference/typeArgumentInference.types index 866e413403c61..12fa09f616e21 100644 --- a/tests/baselines/reference/typeArgumentInference.types +++ b/tests/baselines/reference/typeArgumentInference.types @@ -325,15 +325,15 @@ function someGenerics9(a: T, b: T, c: T): T { >null : null } var a9a = someGenerics9('', 0, []); ->a9a : any ->someGenerics9('', 0, []) : any +>a9a : string +>someGenerics9('', 0, []) : "" >someGenerics9 : (a: T, b: T, c: T) => T >'' : "" >0 : 0 >[] : undefined[] var a9a: {}; ->a9a : any +>a9a : string var a9b = someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); >a9b : { a?: number; b?: string; } @@ -390,8 +390,8 @@ var a9e: {}; >a9e : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; } var a9f = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); ->a9f : any ->someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }) : any +>a9f : A92 +>someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }) : A92 >someGenerics9 : (a: T, b: T, c: T) => T >undefined : undefined >{ x: 6, z: new Date() } : { x: number; z: Date; } @@ -407,7 +407,7 @@ var a9f = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' } >'' : "" var a9f: A92; ->a9f : any +>a9f : A92 // Generic call with multiple parameters of generic type passed arguments with a single best common type var a9d = someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt index 4e13f96325e4f..c94caf60d7556 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt @@ -9,12 +9,13 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct Types of parameters 'n' and 'b' are incompatible. Type 'number' is not assignable to type 'string'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(106,33): error TS2345: Argument of type '0' is not assignable to parameter of type '""'. +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(107,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(121,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,74): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. Object literal may only specify known properties, and 'y' does not exist in type 'A92'. -==== tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts (7 errors) ==== +==== tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts (8 errors) ==== // Generic call with no parameters interface NoParams { new (); @@ -138,6 +139,9 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct ~ !!! error TS2345: Argument of type '0' is not assignable to parameter of type '""'. var a9a: {}; + ~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. +!!! related TS6203 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts:106:5: 'a9a' was also declared here. var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); var a9b: { a?: number; b?: string; }; diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.types b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.types index 4192fac513ce5..70ee543c1f772 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.types +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.types @@ -392,15 +392,15 @@ var someGenerics9: someGenerics9; >someGenerics9 : someGenerics9 var a9a = new someGenerics9('', 0, []); ->a9a : any ->new someGenerics9('', 0, []) : any +>a9a : string +>new someGenerics9('', 0, []) : "" >someGenerics9 : someGenerics9 >'' : "" >0 : 0 >[] : undefined[] var a9a: {}; ->a9a : any +>a9a : string var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); >a9b : { a?: number; b?: string; } @@ -456,8 +456,8 @@ var a9e: {}; >a9e : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; } var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ->a9f : any ->new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : any +>a9f : A92 +>new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : A92 >someGenerics9 : someGenerics9 >undefined : undefined >{ x: 6, z: window } : { x: number; z: Window & typeof globalThis; } @@ -472,7 +472,7 @@ var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' } >'' : "" var a9f: A92; ->a9f : any +>a9f : A92 // Generic call with multiple parameters of generic type passed arguments with a single best common type var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); diff --git a/tests/baselines/reference/typeArgumentInferenceErrors.types b/tests/baselines/reference/typeArgumentInferenceErrors.types index a334cbbe66f83..8e90b86a5c920 100644 --- a/tests/baselines/reference/typeArgumentInferenceErrors.types +++ b/tests/baselines/reference/typeArgumentInferenceErrors.types @@ -6,7 +6,7 @@ function someGenerics1(n: T, m: number) { } >m : number someGenerics1(3, 4); // Error ->someGenerics1(3, 4) : any +>someGenerics1(3, 4) : void >someGenerics1 : (n: T, m: number) => void >3 : 3 >4 : 4 @@ -19,7 +19,7 @@ function someGenerics4(n: T, f: (x: U) => void) { } >x : U someGenerics4('', (x: string) => ''); // Error ->someGenerics4('', (x: string) => '') : any +>someGenerics4('', (x: string) => '') : void >someGenerics4 : (n: T, f: (x: U) => void) => void >'' : "" >(x: string) => '' : (x: string) => string @@ -34,7 +34,7 @@ function someGenerics5(n: T, f: (x: U) => void) { } >x : U someGenerics5('', (x: string) => ''); // Error ->someGenerics5('', (x: string) => '') : any +>someGenerics5('', (x: string) => '') : void >someGenerics5 : (n: T, f: (x: U) => void) => void >'' : "" >(x: string) => '' : (x: string) => string @@ -52,7 +52,7 @@ function someGenerics6(a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } >c : A someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); // Error ->someGenerics6((n: number) => n, (n: string) => n, (n: number) => n) : any +>someGenerics6((n: number) => n, (n: string) => n, (n: number) => n) : void >someGenerics6 : (a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) => void >(n: number) => n : (n: number) => number >n : number diff --git a/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.errors.txt index 33e2f2e38c115..6e3097ec51d68 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts(6,5): error TS2345: Argument of type 'typeof (Anonymous class)' is not assignable to parameter of type 'typeof (Anonymous class)'. Property 'prop' is missing in type '(Anonymous class)' but required in type 'foo.(Anonymous class)'. +tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts(6,38): error TS2339: Property 'length' does not exist on type 'unknown'. -==== tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts (1 errors) ==== +==== tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts (2 errors) ==== function foo(x = class { prop: T }): T { return undefined; } @@ -12,4 +13,6 @@ tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpre ~~~~~ !!! error TS2345: Argument of type 'typeof (Anonymous class)' is not assignable to parameter of type 'typeof (Anonymous class)'. !!! error TS2345: Property 'prop' is missing in type '(Anonymous class)' but required in type 'foo.(Anonymous class)'. -!!! related TS2728 tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts:1:29: 'prop' is declared here. \ No newline at end of file +!!! related TS2728 tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts:1:29: 'prop' is declared here. + ~~~~~~ +!!! error TS2339: Property 'length' does not exist on type 'unknown'. \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.types b/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.types index 413cc6462333e..a30d02f2801a1 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.types +++ b/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.types @@ -12,7 +12,7 @@ function foo(x = class { prop: T }): T { // Should not infer string because it is a static property foo(class { static prop = "hello" }).length; >foo(class { static prop = "hello" }).length : any ->foo(class { static prop = "hello" }) : any +>foo(class { static prop = "hello" }) : unknown >foo : (x?: typeof (Anonymous class)) => T >class { static prop = "hello" } : typeof (Anonymous class) >prop : string diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types index 4eb209cd1c090..e22a0566c0733 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types @@ -21,7 +21,7 @@ var e: Elephant; >e : Elephant f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal ->f(g, e) : any +>f(g, e) : Giraffe >f : (x: T, y: T) => T >g : Giraffe >e : Elephant diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt index 6884dc6638b52..331940dbcf4a3 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt @@ -14,13 +14,16 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst Types of parameters 'n' and 'b' are incompatible. Type 'number' is not assignable to type 'string'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(66,31): error TS2345: Argument of type '(a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void' is not assignable to parameter of type 'string'. +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(67,1): error TS2349: This expression is not callable. + Type 'String' has no call signatures. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(73,29): error TS2345: Argument of type '0' is not assignable to parameter of type '""'. +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(74,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(88,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,70): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. Object literal may only specify known properties, and 'y' does not exist in type 'A92'. -==== tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts (13 errors) ==== +==== tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts (15 errors) ==== // Generic call with no parameters function noParams() { } noParams(); @@ -115,6 +118,9 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst ~~~~~~~~~~~~~ !!! error TS2345: Argument of type '(a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void' is not assignable to parameter of type 'string'. x(null, null, null); // Error + ~ +!!! error TS2349: This expression is not callable. +!!! error TS2349: Type 'String' has no call signatures. // Generic call with multiple parameters of generic type passed arguments with no best common type function someGenerics9(a: T, b: T, c: T): T { @@ -124,6 +130,9 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst ~ !!! error TS2345: Argument of type '0' is not assignable to parameter of type '""'. var a9a: {}; + ~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'. +!!! related TS6203 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:73:5: 'a9a' was also declared here. var a9b = someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); var a9b: { a?: number; b?: string; }; diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.types b/tests/baselines/reference/typeArgumentInferenceWithConstraints.types index 6549f3ba3d85f..acc4bca0a2712 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.types +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.types @@ -31,7 +31,7 @@ noGenericParams(''); >'' : "" noGenericParams<{}>(''); // Error ->noGenericParams<{}>('') : any +>noGenericParams<{}>('') : void >noGenericParams : (n: string) => void >'' : "" @@ -48,13 +48,13 @@ someGenerics1(3, 4); // Valid >4 : 4 someGenerics1(3, 4); // Error ->someGenerics1(3, 4) : any +>someGenerics1(3, 4) : void >someGenerics1 : (n: T, m: number) => void >3 : 3 >4 : 4 someGenerics1(3, 4); // Error ->someGenerics1(3, 4) : any +>someGenerics1(3, 4) : void >someGenerics1 : (n: T, m: number) => void >3 : 3 >4 : 4 @@ -138,7 +138,7 @@ function someGenerics3(producer: () => T) { } >producer : () => T someGenerics3(() => ''); // Error ->someGenerics3(() => '') : any +>someGenerics3(() => '') : void >someGenerics3 : (producer: () => T) => void >() => '' : () => string >'' : "" @@ -150,7 +150,7 @@ someGenerics3(() => undefined); >undefined : undefined someGenerics3(() => 3); // Error ->someGenerics3(() => 3) : any +>someGenerics3(() => 3) : void >someGenerics3 : (producer: () => T) => void >() => 3 : () => number >3 : 3 @@ -177,7 +177,7 @@ someGenerics4('', () => 3); >3 : 3 someGenerics4('', (x: string) => ''); // Error ->someGenerics4('', (x: string) => '') : any +>someGenerics4('', (x: string) => '') : void >someGenerics4 : (n: T, f: (x: U) => void) => void >'' : "" >(x: string) => '' : (x: string) => string @@ -212,7 +212,7 @@ someGenerics5('', () => 3); >3 : 3 someGenerics5('', (x: string) => ''); // Error ->someGenerics5('', (x: string) => '') : any +>someGenerics5('', (x: string) => '') : void >someGenerics5 : (n: T, f: (x: U) => void) => void >'' : "" >(x: string) => '' : (x: string) => string @@ -220,7 +220,7 @@ someGenerics5('', (x: string) => ''); // Error >'' : "" someGenerics5(null, null); // Error ->someGenerics5(null, null) : any +>someGenerics5(null, null) : void >someGenerics5 : (n: T, f: (x: U) => void) => void >null : null >null : null @@ -262,7 +262,7 @@ someGenerics6(n => n, n => n, n => n); >n : number someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); // Error ->someGenerics6((n: number) => n, (n: string) => n, (n: number) => n) : any +>someGenerics6((n: number) => n, (n: string) => n, (n: number) => n) : void >someGenerics6 : (a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) => void >(n: number) => n : (n: number) => number >n : number @@ -343,14 +343,14 @@ function someGenerics8(n: T): T { return n; } >n : T var x = someGenerics8(someGenerics7); // Error ->x : any ->someGenerics8(someGenerics7) : any +>x : string +>someGenerics8(someGenerics7) : string >someGenerics8 : (n: T) => T >someGenerics7 : (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void x(null, null, null); // Error >x(null, null, null) : any ->x : any +>x : string >null : null >null : null >null : null @@ -366,15 +366,15 @@ function someGenerics9(a: T, b: T, c: T): T { >null : null } var a9a = someGenerics9('', 0, []); ->a9a : any ->someGenerics9('', 0, []) : any +>a9a : string +>someGenerics9('', 0, []) : "" >someGenerics9 : (a: T, b: T, c: T) => T >'' : "" >0 : 0 >[] : undefined[] var a9a: {}; ->a9a : any +>a9a : string var a9b = someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); >a9b : { a?: number; b?: string; } @@ -430,8 +430,8 @@ var a9e: {}; >a9e : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; } var a9f = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ->a9f : any ->someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : any +>a9f : A92 +>someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : A92 >someGenerics9 : (a: T, b: T, c: T) => T >undefined : undefined >{ x: 6, z: window } : { x: number; z: Window & typeof globalThis; } @@ -446,7 +446,7 @@ var a9f = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); >'' : "" var a9f: A92; ->a9f : any +>a9f : A92 // Generic call with multiple parameters of generic type passed arguments with a single best common type var a9d = someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); diff --git a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types index 380e1eb686b18..468a9d2182f15 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types +++ b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types @@ -144,8 +144,8 @@ var v2 = f1({ w: x => x, r: () => E1.X }, E1.X); >X : E1 var v3 = f1({ w: x => x, r: () => E1.X }, E2.X); // Error ->v3 : any ->f1({ w: x => x, r: () => E1.X }, E2.X) : any +>v3 : unknown +>f1({ w: x => x, r: () => E1.X }, E2.X) : unknown >f1 : (a: { w: (x: T) => U; r: () => T; }, b: T) => U >{ w: x => x, r: () => E1.X } : { w: (x: E1) => E1; r: () => E1; } >w : (x: E1) => E1 diff --git a/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.errors.txt b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.errors.txt index fa9231635e435..ccef9264b10d2 100644 --- a/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.errors.txt +++ b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.errors.txt @@ -12,23 +12,41 @@ tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes0 tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(56,52): error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(57,43): error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(60,5): error TS2322: Type 'string' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(61,5): error TS2322: Type 'string' is not assignable to type '"Hello"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(62,5): error TS2322: Type 'string' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(63,5): error TS2322: Type 'string' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(64,5): error TS2322: Type 'string' is not assignable to type '"Hello"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(74,5): error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. Type '"World"' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(75,5): error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. + Type '"World"' is not assignable to type '"Hello"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(76,5): error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. Type '"World"' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(77,5): error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. + Type '"World"' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(78,5): error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. + Type '"World"' is not assignable to type '"Hello"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(86,43): error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(87,43): error TS2345: Argument of type '"Hello"' is not assignable to parameter of type '"World"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(88,52): error TS2345: Argument of type '"World"' is not assignable to parameter of type '"Hello"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(92,5): error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(93,5): error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(94,5): error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(95,5): error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(96,5): error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(99,25): error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. Type '"World"' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(100,25): error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. + Type '"World"' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(101,25): error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. + Type '"World"' is not assignable to type '"Hello"'. +tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(102,25): error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. + Type '"World"' is not assignable to type '"Hello"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(103,25): error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. Type '"World"' is not assignable to type '"Hello"'. -==== tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts (24 errors) ==== +==== tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts (36 errors) ==== declare function randBool(): boolean; declare function takeReturnString(str: string): string; declare function takeReturnHello(str: "Hello"): "Hello"; @@ -118,11 +136,17 @@ tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes0 ~ !!! error TS2322: Type 'string' is not assignable to type '"Hello"'. b = takeReturnString(b); + ~ +!!! error TS2322: Type 'string' is not assignable to type '"Hello"'. c = takeReturnString(c); ~ !!! error TS2322: Type 'string' is not assignable to type '"Hello"'. d = takeReturnString(d); + ~ +!!! error TS2322: Type 'string' is not assignable to type '"Hello"'. e = takeReturnString(e); + ~ +!!! error TS2322: Type 'string' is not assignable to type '"Hello"'. // Should be valid a = takeReturnHello(a); @@ -137,12 +161,21 @@ tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes0 !!! error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. !!! error TS2322: Type '"World"' is not assignable to type '"Hello"'. b = takeReturnHelloWorld(b); + ~ +!!! error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. +!!! error TS2322: Type '"World"' is not assignable to type '"Hello"'. c = takeReturnHelloWorld(c); ~ !!! error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. !!! error TS2322: Type '"World"' is not assignable to type '"Hello"'. d = takeReturnHelloWorld(d); + ~ +!!! error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. +!!! error TS2322: Type '"World"' is not assignable to type '"Hello"'. e = takeReturnHelloWorld(e); + ~ +!!! error TS2322: Type '"Hello" | "World"' is not assignable to type '"Hello"'. +!!! error TS2322: Type '"World"' is not assignable to type '"Hello"'. } @@ -166,8 +199,14 @@ tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes0 ~ !!! error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. b = takeReturnString(b); + ~ +!!! error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. c = takeReturnString(c); + ~ +!!! error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. d = takeReturnString(d); + ~ +!!! error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. e = takeReturnString(e); ~ !!! error TS2322: Type 'string' is not assignable to type '"Hello" | "World"'. @@ -178,8 +217,17 @@ tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes0 !!! error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. !!! error TS2345: Type '"World"' is not assignable to type '"Hello"'. b = takeReturnHello(b); + ~ +!!! error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. +!!! error TS2345: Type '"World"' is not assignable to type '"Hello"'. c = takeReturnHello(c); + ~ +!!! error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. +!!! error TS2345: Type '"World"' is not assignable to type '"Hello"'. d = takeReturnHello(d); + ~ +!!! error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. +!!! error TS2345: Type '"World"' is not assignable to type '"Hello"'. e = takeReturnHello(e); ~ !!! error TS2345: Argument of type '"Hello" | "World"' is not assignable to parameter of type '"Hello"'. diff --git a/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.js b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.js index 0e59e208b810f..d011a9db44237 100644 --- a/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.js +++ b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.js @@ -229,15 +229,15 @@ declare namespace n1 { } declare namespace n2 { let a: "Hello"; - let b: any; + let b: "Hello"; let c: "Hello"; - let d: any; - let e: any; + let d: "Hello"; + let e: "Hello"; } declare namespace n3 { let a: "Hello" | "World"; - let b: any; - let c: any; - let d: any; + let b: "Hello" | "World"; + let c: "Hello" | "World"; + let d: "Hello" | "World"; let e: "Hello" | "World"; } diff --git a/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.types b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.types index 7812e98aa16f9..f97d6c3abd2b8 100644 --- a/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.types +++ b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.types @@ -133,35 +133,35 @@ namespace n1 { // Passing these as arguments should cause an error. a = takeReturnHello(a); ->a = takeReturnHello(a) : any +>a = takeReturnHello(a) : "Hello" >a : string >takeReturnHello(a) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" >a : string b = takeReturnHello(b); ->b = takeReturnHello(b) : any +>b = takeReturnHello(b) : "Hello" >b : string >takeReturnHello(b) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" >b : string c = takeReturnHello(c); ->c = takeReturnHello(c) : any +>c = takeReturnHello(c) : "Hello" >c : string >takeReturnHello(c) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" >c : string d = takeReturnHello(d); ->d = takeReturnHello(d) : any +>d = takeReturnHello(d) : "Hello" >d : string >takeReturnHello(d) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" >d : string e = takeReturnHello(e); ->e = takeReturnHello(e) : any +>e = takeReturnHello(e) : "Hello" >e : string >takeReturnHello(e) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" @@ -169,35 +169,35 @@ namespace n1 { // Passing these as arguments should cause an error. a = takeReturnHelloWorld(a); ->a = takeReturnHelloWorld(a) : any +>a = takeReturnHelloWorld(a) : "Hello" | "World" >a : string >takeReturnHelloWorld(a) : "Hello" | "World" >takeReturnHelloWorld : (str: "Hello" | "World") => "Hello" | "World" >a : string b = takeReturnHelloWorld(b); ->b = takeReturnHelloWorld(b) : any +>b = takeReturnHelloWorld(b) : "Hello" | "World" >b : string >takeReturnHelloWorld(b) : "Hello" | "World" >takeReturnHelloWorld : (str: "Hello" | "World") => "Hello" | "World" >b : string c = takeReturnHelloWorld(c); ->c = takeReturnHelloWorld(c) : any +>c = takeReturnHelloWorld(c) : "Hello" | "World" >c : string >takeReturnHelloWorld(c) : "Hello" | "World" >takeReturnHelloWorld : (str: "Hello" | "World") => "Hello" | "World" >c : string d = takeReturnHelloWorld(d); ->d = takeReturnHelloWorld(d) : any +>d = takeReturnHelloWorld(d) : "Hello" | "World" >d : string >takeReturnHelloWorld(d) : "Hello" | "World" >takeReturnHelloWorld : (str: "Hello" | "World") => "Hello" | "World" >d : string e = takeReturnHelloWorld(e); ->e = takeReturnHelloWorld(e) : any +>e = takeReturnHelloWorld(e) : "Hello" | "World" >e : string >takeReturnHelloWorld(e) : "Hello" | "World" >takeReturnHelloWorld : (str: "Hello" | "World") => "Hello" | "World" @@ -217,8 +217,8 @@ namespace n2 { >"Hello" : "Hello" export let b = fun1<"Hello">("Hello", "World"); ->b : any ->fun1<"Hello">("Hello", "World") : any +>b : "Hello" +>fun1<"Hello">("Hello", "World") : "Hello" >fun1 : (x: T, y: T) => T >"Hello" : "Hello" >"World" : "World" @@ -231,15 +231,15 @@ namespace n2 { >"Hello" : "Hello" export let d = fun2<"Hello", "Hello">("Hello", "World"); ->d : any ->fun2<"Hello", "Hello">("Hello", "World") : any +>d : "Hello" +>fun2<"Hello", "Hello">("Hello", "World") : "Hello" >fun2 : (x: T, y: U) => T | U >"Hello" : "Hello" >"World" : "World" export let e = fun3<"Hello">("Hello", "World"); ->e : any ->fun3<"Hello">("Hello", "World") : any +>e : "Hello" +>fun3<"Hello">("Hello", "World") : "Hello" >fun3 : (...args: T[]) => T >"Hello" : "Hello" >"World" : "World" @@ -254,10 +254,10 @@ namespace n2 { b = takeReturnString(b); >b = takeReturnString(b) : string ->b : any +>b : "Hello" >takeReturnString(b) : string >takeReturnString : (str: string) => string ->b : any +>b : "Hello" c = takeReturnString(c); >c = takeReturnString(c) : string @@ -268,17 +268,17 @@ namespace n2 { d = takeReturnString(d); >d = takeReturnString(d) : string ->d : any +>d : "Hello" >takeReturnString(d) : string >takeReturnString : (str: string) => string ->d : any +>d : "Hello" e = takeReturnString(e); >e = takeReturnString(e) : string ->e : any +>e : "Hello" >takeReturnString(e) : string >takeReturnString : (str: string) => string ->e : any +>e : "Hello" // Should be valid a = takeReturnHello(a); @@ -290,10 +290,10 @@ namespace n2 { b = takeReturnHello(b); >b = takeReturnHello(b) : "Hello" ->b : any +>b : "Hello" >takeReturnHello(b) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" ->b : any +>b : "Hello" c = takeReturnHello(c); >c = takeReturnHello(c) : "Hello" @@ -304,17 +304,17 @@ namespace n2 { d = takeReturnHello(d); >d = takeReturnHello(d) : "Hello" ->d : any +>d : "Hello" >takeReturnHello(d) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" ->d : any +>d : "Hello" e = takeReturnHello(e); >e = takeReturnHello(e) : "Hello" ->e : any +>e : "Hello" >takeReturnHello(e) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" ->e : any +>e : "Hello" // Assignment from the returned value should cause an error. a = takeReturnHelloWorld(a); @@ -326,10 +326,10 @@ namespace n2 { b = takeReturnHelloWorld(b); >b = takeReturnHelloWorld(b) : "Hello" | "World" ->b : any +>b : "Hello" >takeReturnHelloWorld(b) : "Hello" | "World" >takeReturnHelloWorld : (str: "Hello" | "World") => "Hello" | "World" ->b : any +>b : "Hello" c = takeReturnHelloWorld(c); >c = takeReturnHelloWorld(c) : "Hello" | "World" @@ -340,17 +340,17 @@ namespace n2 { d = takeReturnHelloWorld(d); >d = takeReturnHelloWorld(d) : "Hello" | "World" ->d : any +>d : "Hello" >takeReturnHelloWorld(d) : "Hello" | "World" >takeReturnHelloWorld : (str: "Hello" | "World") => "Hello" | "World" ->d : any +>d : "Hello" e = takeReturnHelloWorld(e); >e = takeReturnHelloWorld(e) : "Hello" | "World" ->e : any +>e : "Hello" >takeReturnHelloWorld(e) : "Hello" | "World" >takeReturnHelloWorld : (str: "Hello" | "World") => "Hello" | "World" ->e : any +>e : "Hello" } @@ -367,22 +367,22 @@ namespace n3 { >"World" : "World" export let b = fun2<"Hello", "World">("World", "Hello"); ->b : any ->fun2<"Hello", "World">("World", "Hello") : any +>b : "Hello" | "World" +>fun2<"Hello", "World">("World", "Hello") : "Hello" | "World" >fun2 : (x: T, y: U) => T | U >"World" : "World" >"Hello" : "Hello" export let c = fun2<"World", "Hello">("Hello", "Hello"); ->c : any ->fun2<"World", "Hello">("Hello", "Hello") : any +>c : "Hello" | "World" +>fun2<"World", "Hello">("Hello", "Hello") : "Hello" | "World" >fun2 : (x: T, y: U) => T | U >"Hello" : "Hello" >"Hello" : "Hello" export let d = fun2<"World", "Hello">("World", "World"); ->d : any ->fun2<"World", "Hello">("World", "World") : any +>d : "Hello" | "World" +>fun2<"World", "Hello">("World", "World") : "Hello" | "World" >fun2 : (x: T, y: U) => T | U >"World" : "World" >"World" : "World" @@ -404,24 +404,24 @@ namespace n3 { b = takeReturnString(b); >b = takeReturnString(b) : string ->b : any +>b : "Hello" | "World" >takeReturnString(b) : string >takeReturnString : (str: string) => string ->b : any +>b : "Hello" | "World" c = takeReturnString(c); >c = takeReturnString(c) : string ->c : any +>c : "Hello" | "World" >takeReturnString(c) : string >takeReturnString : (str: string) => string ->c : any +>c : "Hello" | "World" d = takeReturnString(d); >d = takeReturnString(d) : string ->d : any +>d : "Hello" | "World" >takeReturnString(d) : string >takeReturnString : (str: string) => string ->d : any +>d : "Hello" | "World" e = takeReturnString(e); >e = takeReturnString(e) : string @@ -432,7 +432,7 @@ namespace n3 { // Passing these as arguments should cause an error. a = takeReturnHello(a); ->a = takeReturnHello(a) : any +>a = takeReturnHello(a) : "Hello" >a : "Hello" | "World" >takeReturnHello(a) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" @@ -440,27 +440,27 @@ namespace n3 { b = takeReturnHello(b); >b = takeReturnHello(b) : "Hello" ->b : any +>b : "Hello" | "World" >takeReturnHello(b) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" ->b : any +>b : "Hello" | "World" c = takeReturnHello(c); >c = takeReturnHello(c) : "Hello" ->c : any +>c : "Hello" | "World" >takeReturnHello(c) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" ->c : any +>c : "Hello" | "World" d = takeReturnHello(d); >d = takeReturnHello(d) : "Hello" ->d : any +>d : "Hello" | "World" >takeReturnHello(d) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" ->d : any +>d : "Hello" | "World" e = takeReturnHello(e); ->e = takeReturnHello(e) : any +>e = takeReturnHello(e) : "Hello" >e : "Hello" | "World" >takeReturnHello(e) : "Hello" >takeReturnHello : (str: "Hello") => "Hello" @@ -476,24 +476,24 @@ namespace n3 { b = takeReturnHelloWorld(b); >b = takeReturnHelloWorld(b) : "Hello" | "World" ->b : any +>b : "Hello" | "World" >takeReturnHelloWorld(b) : "Hello" | "World" >takeReturnHelloWorld : (str: "Hello" | "World") => "Hello" | "World" ->b : any +>b : "Hello" c = takeReturnHelloWorld(c); >c = takeReturnHelloWorld(c) : "Hello" | "World" ->c : any +>c : "Hello" | "World" >takeReturnHelloWorld(c) : "Hello" | "World" >takeReturnHelloWorld : (str: "Hello" | "World") => "Hello" | "World" ->c : any +>c : "Hello" d = takeReturnHelloWorld(d); >d = takeReturnHelloWorld(d) : "Hello" | "World" ->d : any +>d : "Hello" | "World" >takeReturnHelloWorld(d) : "Hello" | "World" >takeReturnHelloWorld : (str: "Hello" | "World") => "Hello" | "World" ->d : any +>d : "Hello" e = takeReturnHelloWorld(e); >e = takeReturnHelloWorld(e) : "Hello" | "World" diff --git a/tests/baselines/reference/typeAssertionToGenericFunctionType.types b/tests/baselines/reference/typeAssertionToGenericFunctionType.types index 6bf02c87e9aab..718660a59301a 100644 --- a/tests/baselines/reference/typeAssertionToGenericFunctionType.types +++ b/tests/baselines/reference/typeAssertionToGenericFunctionType.types @@ -19,14 +19,14 @@ var x = { >x : T } x.a(1); // bug was that this caused 'Could not find symbol T' on return type T in the type assertion on x.a's definition ->x.a(1) : any +>x.a(1) : string >x.a : (x: T) => T >x : { a: (x: T) => T; b: (x: T) => void; } >a : (x: T) => T >1 : 1 x.b(); // error ->x.b() : any +>x.b() : void >x.b : (x: T) => void >x : { a: (x: T) => T; b: (x: T) => void; } >b : (x: T) => void diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 69eb02229b96b..7e640fea6d7db 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -274,14 +274,14 @@ var D = /** @class */ (function () { get: function (p1) { return true; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(D.prototype, "m2", { set: function (p1) { return true; }, - enumerable: true, + enumerable: false, configurable: true }); return D; diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 50c8ff0f7890a..037a0fe238594 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -110,14 +110,14 @@ var Test; set: function (param) { // noop }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(FileSystemObject.prototype, "isDirectory", { get: function () { return this instanceof Directory; }, - enumerable: true, + enumerable: false, configurable: true }); return FileSystemObject; diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index 8456dc1797ee8..87864e50e3b96 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -60,14 +60,14 @@ var Test; set: function (param) { // noop }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(FileSystemObject.prototype, "isDirectory", { get: function () { return this instanceof Directory; }, - enumerable: true, + enumerable: false, configurable: true }); return FileSystemObject; diff --git a/tests/baselines/reference/typeGuardsInClassAccessors.js b/tests/baselines/reference/typeGuardsInClassAccessors.js index fe053e72b9afc..9ed4288805fc5 100644 --- a/tests/baselines/reference/typeGuardsInClassAccessors.js +++ b/tests/baselines/reference/typeGuardsInClassAccessors.js @@ -132,7 +132,7 @@ var ClassWithAccessors = /** @class */ (function () { var var2; num = typeof var2 === "string" && var2.length; // string }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(ClassWithAccessors.prototype, "pp1", { @@ -155,7 +155,7 @@ var ClassWithAccessors = /** @class */ (function () { var var2; num = typeof var2 === "string" && var2.length; // string }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(ClassWithAccessors, "s1", { @@ -178,7 +178,7 @@ var ClassWithAccessors = /** @class */ (function () { var var2; num = typeof var2 === "string" && var2.length; // string }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(ClassWithAccessors, "ss1", { @@ -201,7 +201,7 @@ var ClassWithAccessors = /** @class */ (function () { var var2; num = typeof var2 === "string" && var2.length; // string }, - enumerable: true, + enumerable: false, configurable: true }); return ClassWithAccessors; diff --git a/tests/baselines/reference/typeGuardsInExternalModule.js b/tests/baselines/reference/typeGuardsInExternalModule.js index 03f2d2cee8d51..c4eae3d6bf4a0 100644 --- a/tests/baselines/reference/typeGuardsInExternalModule.js +++ b/tests/baselines/reference/typeGuardsInExternalModule.js @@ -39,6 +39,7 @@ else { } // exported variable in external module var strOrNum; +exports.var2 = void 0; if (typeof exports.var2 === "string") { // export makes the var property and not variable strOrNum = exports.var2; // string | number diff --git a/tests/baselines/reference/typeGuardsInProperties.js b/tests/baselines/reference/typeGuardsInProperties.js index 43828573aa9d8..b1f9f57da5ebf 100644 --- a/tests/baselines/reference/typeGuardsInProperties.js +++ b/tests/baselines/reference/typeGuardsInProperties.js @@ -38,7 +38,7 @@ var C1 = /** @class */ (function () { get: function () { return strOrNum; }, - enumerable: true, + enumerable: false, configurable: true }); C1.prototype.method = function () { diff --git a/tests/baselines/reference/typeInferenceConflictingCandidates.types b/tests/baselines/reference/typeInferenceConflictingCandidates.types index dea7c49732042..27044d6e1d8b1 100644 --- a/tests/baselines/reference/typeInferenceConflictingCandidates.types +++ b/tests/baselines/reference/typeInferenceConflictingCandidates.types @@ -7,11 +7,11 @@ declare function g(a: T, b: T, c: (t: T) => T): T; >t : T g("", 3, a => a); ->g("", 3, a => a) : any +>g("", 3, a => a) : "" >g : (a: T, b: T, c: (t: T) => T) => T >"" : "" >3 : 3 ->a => a : (a: any) => any ->a : any ->a : any +>a => a : (a: "") => "" +>a : "" +>a : "" diff --git a/tests/baselines/reference/typeOfOnTypeArg.types b/tests/baselines/reference/typeOfOnTypeArg.types index de3202e49724c..d2575b3164a96 100644 --- a/tests/baselines/reference/typeOfOnTypeArg.types +++ b/tests/baselines/reference/typeOfOnTypeArg.types @@ -13,7 +13,7 @@ function fill(f: B) { } fill(32); ->fill(32) : any +>fill(32) : void >fill : (f: B) => void >32 : 32 diff --git a/tests/baselines/reference/typeOfThisInAccessor.js b/tests/baselines/reference/typeOfThisInAccessor.js index 2fdde586ceaaa..7d7b856a815a8 100644 --- a/tests/baselines/reference/typeOfThisInAccessor.js +++ b/tests/baselines/reference/typeOfThisInAccessor.js @@ -40,7 +40,7 @@ var C = /** @class */ (function () { var r = this; // C return 1; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "y", { @@ -48,7 +48,7 @@ var C = /** @class */ (function () { var r2 = this; // typeof C return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -61,7 +61,7 @@ var D = /** @class */ (function () { var r = this; // D return 1; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(D, "y", { @@ -69,7 +69,7 @@ var D = /** @class */ (function () { var r2 = this; // typeof D return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return D; diff --git a/tests/baselines/reference/typeOfThisInInstanceMember.js b/tests/baselines/reference/typeOfThisInInstanceMember.js index 7987c1aaabdd7..7e7f13c03310a 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember.js +++ b/tests/baselines/reference/typeOfThisInInstanceMember.js @@ -48,7 +48,7 @@ var C = /** @class */ (function () { get: function () { return this; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/typeOfThisInInstanceMember2.js b/tests/baselines/reference/typeOfThisInInstanceMember2.js index 4e07609c0f290..c168319b979b4 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember2.js +++ b/tests/baselines/reference/typeOfThisInInstanceMember2.js @@ -52,7 +52,7 @@ var C = /** @class */ (function () { get: function () { return this; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/typeOfThisInStatics.js b/tests/baselines/reference/typeOfThisInStatics.js index e8de4e56a87ca..ba8a5833481f0 100644 --- a/tests/baselines/reference/typeOfThisInStatics.js +++ b/tests/baselines/reference/typeOfThisInStatics.js @@ -22,7 +22,7 @@ var C = /** @class */ (function () { var r = this; return 1; }, - enumerable: true, + enumerable: false, configurable: true }); return C; diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.types b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.types index b93b43c454eb2..9dafa8925f0b1 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.types +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.types @@ -9,13 +9,13 @@ function foo(x: T, y: U): U { return y; } // this is now an erro >y : U foo(1, ''); ->foo(1, '') : any +>foo(1, '') : number >foo : (x: T, y: U) => U >1 : 1 >'' : "" foo(1, {}); ->foo(1, {}) : any +>foo(1, {}) : number >foo : (x: T, y: U) => U >1 : 1 >{} : {} @@ -28,8 +28,8 @@ var n: NumberVariant; >n : NumberVariant var r3 = foo(1, n); ->r3 : any ->foo(1, n) : any +>r3 : number +>foo(1, n) : number >foo : (x: T, y: U) => U >1 : 1 >n : NumberVariant @@ -42,7 +42,7 @@ function foo2(x: T, y: U) { return y; } // this is n >y : U foo2(1, { length: '' }); ->foo2(1, { length: '' }) : any +>foo2(1, { length: '' }) : { length: number; } >foo2 : (x: T, y: U) => U >1 : 1 >{ length: '' } : { length: string; } @@ -50,7 +50,7 @@ foo2(1, { length: '' }); >'' : "" foo2(1, { length: {} }); ->foo2(1, { length: {} }) : any +>foo2(1, { length: {} }) : { length: number; } >foo2 : (x: T, y: U) => U >1 : 1 >{ length: {} } : { length: {}; } @@ -58,7 +58,7 @@ foo2(1, { length: {} }); >{} : {} foo2([], ['']); ->foo2([], ['']) : any +>foo2([], ['']) : { length: any[]; } >foo2 : (x: T, y: U) => U >[] : undefined[] >[''] : string[] diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.types b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.types index 84269305da341..9e255a470574e 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.types +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.types @@ -24,8 +24,8 @@ var a: A, b: B; >b : B var d = f(a, b, x => x, x => x); // A => A not assignable to A => B ->d : any ->f(a, b, x => x, x => x) : any +>d : [A, B] +>f(a, b, x => x, x => x) : [A, B] >f : (y: T, y1: U, p: (z: U) => T, p1: (x: T) => U) => [T, U] >a : A >b : B diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.types b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.types index 9b71839c4fcc8..1eaee8388807f 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.types +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.types @@ -24,8 +24,8 @@ var a: A, b: B; >b : B var d = f(a, b, u2 => u2.b, t2 => t2); ->d : any ->f(a, b, u2 => u2.b, t2 => t2) : any +>d : [A, B] +>f(a, b, u2 => u2.b, t2 => t2) : [A, B] >f : (t1: T, u1: U, pf1: (u2: U) => T, pf2: (t2: T) => U) => [T, U] >a : A >b : B diff --git a/tests/baselines/reference/typeParametersInStaticAccessors.js b/tests/baselines/reference/typeParametersInStaticAccessors.js index ec58167ac083b..c1366042dc6f0 100644 --- a/tests/baselines/reference/typeParametersInStaticAccessors.js +++ b/tests/baselines/reference/typeParametersInStaticAccessors.js @@ -10,12 +10,12 @@ var foo = /** @class */ (function () { } Object.defineProperty(foo, "Foo", { get: function () { return null; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(foo, "Bar", { set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return foo; diff --git a/tests/baselines/reference/typeQueryOnClass.js b/tests/baselines/reference/typeQueryOnClass.js index 85ae02c0d6c5c..2e99e21a1f26f 100644 --- a/tests/baselines/reference/typeQueryOnClass.js +++ b/tests/baselines/reference/typeQueryOnClass.js @@ -72,14 +72,14 @@ var C = /** @class */ (function () { }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C, "sd", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); C.prototype.baz = function (x) { return ''; }; @@ -89,14 +89,14 @@ var C = /** @class */ (function () { }, set: function (x) { }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(C.prototype, "id", { get: function () { return 1; }, - enumerable: true, + enumerable: false, configurable: true }); C.sa = 1; diff --git a/tests/baselines/reference/typeReferenceDirectives7.js b/tests/baselines/reference/typeReferenceDirectives7.js index 7be0651a58137..7170fef98b66d 100644 --- a/tests/baselines/reference/typeReferenceDirectives7.js +++ b/tests/baselines/reference/typeReferenceDirectives7.js @@ -19,6 +19,7 @@ export let y = () => x /// exports.__esModule = true; exports.$ = 1; +exports.x = void 0; exports.y = function () { return exports.x; }; diff --git a/tests/baselines/reference/typeVariableTypeGuards.types b/tests/baselines/reference/typeVariableTypeGuards.types index 0bc2f4a838971..063f6bbc96d55 100644 --- a/tests/baselines/reference/typeVariableTypeGuards.types +++ b/tests/baselines/reference/typeVariableTypeGuards.types @@ -16,12 +16,12 @@ class A

> { >doSomething : () => void this.props.foo && this.props.foo() ->this.props.foo && this.props.foo() : void ->this.props.foo : P["foo"] +>this.props.foo && this.props.foo() : void | undefined +>this.props.foo : P["foo"] | undefined >this.props : Readonly

>this : this >props : Readonly

->foo : P["foo"] +>foo : P["foo"] | undefined >this.props.foo() : void >this.props.foo : () => void >this.props : Readonly

diff --git a/tests/baselines/reference/typeofANonExportedType.js b/tests/baselines/reference/typeofANonExportedType.js index 97edc2d0922ba..e51c2f490d2bb 100644 --- a/tests/baselines/reference/typeofANonExportedType.js +++ b/tests/baselines/reference/typeofANonExportedType.js @@ -55,14 +55,23 @@ export var r13: typeof foo; "use strict"; exports.__esModule = true; var x = 1; +exports.r1 = void 0; var y = { foo: '' }; +exports.r2 = void 0; var C = /** @class */ (function () { function C() { } return C; }()); +exports.c = void 0; var c2; +exports.r3 = void 0; +exports.r4 = void 0; +exports.r4b = void 0; +exports.i = void 0; var i2; +exports.r5 = void 0; +exports.r5 = void 0; var M; (function (M) { M.foo = ''; @@ -73,10 +82,17 @@ var M; }()); M.C = C; })(M || (M = {})); +exports.r6 = void 0; +exports.r7 = void 0; +exports.r8 = void 0; +exports.r9 = void 0; var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); +exports.r10 = void 0; +exports.r11 = void 0; +exports.r12 = void 0; function foo() { } (function (foo) { foo.y = 1; @@ -87,3 +103,4 @@ function foo() { } }()); foo.C = C; })(foo || (foo = {})); +exports.r13 = void 0; diff --git a/tests/baselines/reference/typeofAnExportedType.js b/tests/baselines/reference/typeofAnExportedType.js index 54d1e85c32ceb..ac4dc20edb3aa 100644 --- a/tests/baselines/reference/typeofAnExportedType.js +++ b/tests/baselines/reference/typeofAnExportedType.js @@ -55,15 +55,24 @@ export var r13: typeof foo; "use strict"; exports.__esModule = true; exports.x = 1; +exports.r1 = void 0; exports.y = { foo: '' }; +exports.r2 = void 0; var C = /** @class */ (function () { function C() { } return C; }()); exports.C = C; +exports.c = void 0; var c2; +exports.r3 = void 0; +exports.r4 = void 0; +exports.r4b = void 0; +exports.i = void 0; var i2; +exports.r5 = void 0; +exports.r5 = void 0; var M; (function (M) { M.foo = ''; @@ -74,11 +83,18 @@ var M; }()); M.C = C; })(M = exports.M || (exports.M = {})); +exports.r6 = void 0; +exports.r7 = void 0; exports.Z = M; +exports.r8 = void 0; +exports.r9 = void 0; var E; (function (E) { E[E["A"] = 0] = "A"; })(E = exports.E || (exports.E = {})); +exports.r10 = void 0; +exports.r11 = void 0; +exports.r12 = void 0; function foo() { } exports.foo = foo; (function (foo) { @@ -90,3 +106,4 @@ exports.foo = foo; }()); foo.C = C; })(foo = exports.foo || (exports.foo = {})); +exports.r13 = void 0; diff --git a/tests/baselines/reference/typesWithPublicConstructor.errors.txt b/tests/baselines/reference/typesWithPublicConstructor.errors.txt index 9aa44dea89da5..b62ccf63b9d45 100644 --- a/tests/baselines/reference/typesWithPublicConstructor.errors.txt +++ b/tests/baselines/reference/typesWithPublicConstructor.errors.txt @@ -1,9 +1,11 @@ tests/cases/conformance/types/members/typesWithPublicConstructor.ts(8,5): error TS2322: Type 'Function' is not assignable to type '() => void'. Type 'Function' provides no match for the signature '(): void'. tests/cases/conformance/types/members/typesWithPublicConstructor.ts(15,10): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/types/members/typesWithPublicConstructor.ts(16,5): error TS2322: Type 'Function' is not assignable to type '(x: number) => void'. + Type 'Function' provides no match for the signature '(x: number): void'. -==== tests/cases/conformance/types/members/typesWithPublicConstructor.ts (2 errors) ==== +==== tests/cases/conformance/types/members/typesWithPublicConstructor.ts (3 errors) ==== // public is allowed on a constructor but is not meaningful class C { @@ -25,4 +27,7 @@ tests/cases/conformance/types/members/typesWithPublicConstructor.ts(15,10): erro ~~~~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. !!! related TS6210 tests/cases/conformance/types/members/typesWithPublicConstructor.ts:11:24: An argument for 'x' was not provided. - var r2: (x: number) => void = c2.constructor; \ No newline at end of file + var r2: (x: number) => void = c2.constructor; + ~~ +!!! error TS2322: Type 'Function' is not assignable to type '(x: number) => void'. +!!! error TS2322: Type 'Function' provides no match for the signature '(x: number): void'. \ No newline at end of file diff --git a/tests/baselines/reference/typesWithPublicConstructor.symbols b/tests/baselines/reference/typesWithPublicConstructor.symbols index eb284064f7b07..b429e86d1732a 100644 --- a/tests/baselines/reference/typesWithPublicConstructor.symbols +++ b/tests/baselines/reference/typesWithPublicConstructor.symbols @@ -34,5 +34,7 @@ var c2 = new C2(); var r2: (x: number) => void = c2.constructor; >r2 : Symbol(r2, Decl(typesWithPublicConstructor.ts, 15, 3)) >x : Symbol(x, Decl(typesWithPublicConstructor.ts, 15, 9)) +>c2.constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) >c2 : Symbol(c2, Decl(typesWithPublicConstructor.ts, 14, 3)) +>constructor : Symbol(Object.constructor, Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/typesWithPublicConstructor.types b/tests/baselines/reference/typesWithPublicConstructor.types index 74a8e5065ad71..bb08dbdabace1 100644 --- a/tests/baselines/reference/typesWithPublicConstructor.types +++ b/tests/baselines/reference/typesWithPublicConstructor.types @@ -29,14 +29,14 @@ class C2 { } var c2 = new C2(); ->c2 : any ->new C2() : any +>c2 : C2 +>new C2() : C2 >C2 : typeof C2 var r2: (x: number) => void = c2.constructor; >r2 : (x: number) => void >x : number ->c2.constructor : any ->c2 : any ->constructor : any +>c2.constructor : Function +>c2 : C2 +>constructor : Function diff --git a/tests/baselines/reference/umd-errors.js b/tests/baselines/reference/umd-errors.js index 2c9fbd809e175..87f44fea79171 100644 --- a/tests/baselines/reference/umd-errors.js +++ b/tests/baselines/reference/umd-errors.js @@ -34,3 +34,5 @@ export as namespace C2; //// [err5.js] "use strict"; exports.__esModule = true; +// Illegal, may not appear in implementation files +exports.v = void 0; diff --git a/tests/baselines/reference/unclosedExportClause01.js b/tests/baselines/reference/unclosedExportClause01.js index e391068997de1..3c4d349f59697 100644 --- a/tests/baselines/reference/unclosedExportClause01.js +++ b/tests/baselines/reference/unclosedExportClause01.js @@ -21,24 +21,52 @@ exports.__esModule = true; exports.x = "x"; //// [t2.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var t1_1 = require("./t1"); -exports.x = t1_1.x; -exports.from = t1_1.from; +__createBinding(exports, t1_1, "x"); +__createBinding(exports, t1_1, "from"); //// [t3.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var t1_1 = require("./t1"); -exports.from = t1_1.from; +__createBinding(exports, t1_1, "from"); //// [t4.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var t1_1 = require("./t1"); -exports.a = t1_1.x; -exports.from = t1_1.from; +__createBinding(exports, t1_1, "x", "a"); +__createBinding(exports, t1_1, "from"); //// [t5.js] "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); exports.__esModule = true; var t1_1 = require("./t1"); -exports.a = t1_1.x; -exports.from = t1_1.from; +__createBinding(exports, t1_1, "x", "a"); +__createBinding(exports, t1_1, "from"); diff --git a/tests/baselines/reference/underscoreTest1.types b/tests/baselines/reference/underscoreTest1.types index 5a210c8b2140b..27b7ed5cc19d3 100644 --- a/tests/baselines/reference/underscoreTest1.types +++ b/tests/baselines/reference/underscoreTest1.types @@ -231,11 +231,11 @@ var odds = _.reject([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0); >0 : 0 _.all([true, 1, null, 'yes'], _.identity); ->_.all([true, 1, null, 'yes'], _.identity) : any +>_.all([true, 1, null, 'yes'], _.identity) : boolean >_.all : { (list: T[], iterator?: Iterator_, context?: any): boolean; (list: Dictionary, iterator?: Iterator_, context?: any): boolean; } >_ : Underscore.Static >all : { (list: T[], iterator?: Iterator_, context?: any): boolean; (list: Dictionary, iterator?: Iterator_, context?: any): boolean; } ->[true, 1, null, 'yes'] : (string | number | boolean)[] +>[true, 1, null, 'yes'] : (string | number | true)[] >true : true >1 : 1 >null : null diff --git a/tests/baselines/reference/unionThisTypeInFunctions.types b/tests/baselines/reference/unionThisTypeInFunctions.types index af987759a55e9..04667259c2c0a 100644 --- a/tests/baselines/reference/unionThisTypeInFunctions.types +++ b/tests/baselines/reference/unionThisTypeInFunctions.types @@ -22,7 +22,7 @@ function test(r: Real | Fake) { >r : Real | Fake r.method(12); // error ->r.method(12) : any +>r.method(12) : void >r.method : ((this: Real, n: number) => void) | ((this: Fake, n: number) => void) >r : Real | Fake >method : ((this: Real, n: number) => void) | ((this: Fake, n: number) => void) diff --git a/tests/baselines/reference/unionTypeCallSignatures.errors.txt b/tests/baselines/reference/unionTypeCallSignatures.errors.txt index f9be92375c546..77ff1ae61ad2e 100644 --- a/tests/baselines/reference/unionTypeCallSignatures.errors.txt +++ b/tests/baselines/reference/unionTypeCallSignatures.errors.txt @@ -1,3 +1,5 @@ +tests/cases/conformance/types/union/unionTypeCallSignatures.ts(9,1): error TS2322: Type 'number | Date' is not assignable to type 'string | boolean'. + Type 'number' is not assignable to type 'string | boolean'. tests/cases/conformance/types/union/unionTypeCallSignatures.ts(9,43): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'. tests/cases/conformance/types/union/unionTypeCallSignatures.ts(10,29): error TS2769: No overload matches this call. Overload 1 of 2, '(a: number): number | Date', gave the following error. @@ -35,7 +37,7 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(70,12): error TS2 tests/cases/conformance/types/union/unionTypeCallSignatures.ts(73,12): error TS2554: Expected 2 arguments, but got 1. -==== tests/cases/conformance/types/union/unionTypeCallSignatures.ts (27 errors) ==== +==== tests/cases/conformance/types/union/unionTypeCallSignatures.ts (28 errors) ==== var numOrDate: number | Date; var strOrBoolean: string | boolean; var strOrNum: string | number; @@ -45,6 +47,9 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(73,12): error TS2 var unionOfDifferentReturnType: { (a: number): number; } | { (a: number): Date; }; numOrDate = unionOfDifferentReturnType(10); strOrBoolean = unionOfDifferentReturnType("hello"); // error + ~~~~~~~~~~~~ +!!! error TS2322: Type 'number | Date' is not assignable to type 'string | boolean'. +!!! error TS2322: Type 'number' is not assignable to type 'string | boolean'. ~~~~~~~ !!! error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'. unionOfDifferentReturnType1(true); // error in type of parameter diff --git a/tests/baselines/reference/unionTypeCallSignatures.types b/tests/baselines/reference/unionTypeCallSignatures.types index ef38b524afdc4..4e192bdf9bf30 100644 --- a/tests/baselines/reference/unionTypeCallSignatures.types +++ b/tests/baselines/reference/unionTypeCallSignatures.types @@ -23,14 +23,14 @@ numOrDate = unionOfDifferentReturnType(10); >10 : 10 strOrBoolean = unionOfDifferentReturnType("hello"); // error ->strOrBoolean = unionOfDifferentReturnType("hello") : any +>strOrBoolean = unionOfDifferentReturnType("hello") : number | Date >strOrBoolean : string | boolean ->unionOfDifferentReturnType("hello") : any +>unionOfDifferentReturnType("hello") : number | Date >unionOfDifferentReturnType : ((a: number) => number) | ((a: number) => Date) >"hello" : "hello" unionOfDifferentReturnType1(true); // error in type of parameter ->unionOfDifferentReturnType1(true) : any +>unionOfDifferentReturnType1(true) : (Date & string) | (Date & false) | (Date & true) >unionOfDifferentReturnType1 : { (a: number): number; (a: string): string; } | { (a: number): Date; (a: string): boolean; } >true : true @@ -56,12 +56,12 @@ strOrBoolean = unionOfDifferentReturnType1("hello"); >"hello" : "hello" unionOfDifferentReturnType1(true); // error in type of parameter ->unionOfDifferentReturnType1(true) : any +>unionOfDifferentReturnType1(true) : (Date & string) | (Date & false) | (Date & true) >unionOfDifferentReturnType1 : { (a: number): number; (a: string): string; } | { (a: number): Date; (a: string): boolean; } >true : true unionOfDifferentReturnType1(); // error missing parameter ->unionOfDifferentReturnType1() : any +>unionOfDifferentReturnType1() : (Date & string) | (Date & false) | (Date & true) >unionOfDifferentReturnType1 : { (a: number): number; (a: string): string; } | { (a: number): Date; (a: string): boolean; } var unionOfDifferentParameterTypes: { (a: number): number; } | { (a: string): Date; }; @@ -70,17 +70,17 @@ var unionOfDifferentParameterTypes: { (a: number): number; } | { (a: string): Da >a : string unionOfDifferentParameterTypes(10);// error - no call signatures ->unionOfDifferentParameterTypes(10) : any +>unionOfDifferentParameterTypes(10) : number | Date >unionOfDifferentParameterTypes : ((a: number) => number) | ((a: string) => Date) >10 : 10 unionOfDifferentParameterTypes("hello");// error - no call signatures ->unionOfDifferentParameterTypes("hello") : any +>unionOfDifferentParameterTypes("hello") : number | Date >unionOfDifferentParameterTypes : ((a: number) => number) | ((a: string) => Date) >"hello" : "hello" unionOfDifferentParameterTypes();// error - no call signatures ->unionOfDifferentParameterTypes() : any +>unionOfDifferentParameterTypes() : number | Date >unionOfDifferentParameterTypes : ((a: number) => number) | ((a: string) => Date) var unionOfDifferentNumberOfSignatures: { (a: number): number; } | { (a: number): Date; (a: string): boolean; }; @@ -90,7 +90,7 @@ var unionOfDifferentNumberOfSignatures: { (a: number): number; } | { (a: number) >a : string unionOfDifferentNumberOfSignatures(); // error - no call signatures ->unionOfDifferentNumberOfSignatures() : any +>unionOfDifferentNumberOfSignatures() : number | Date >unionOfDifferentNumberOfSignatures : ((a: number) => number) | { (a: number): Date; (a: string): boolean; } unionOfDifferentNumberOfSignatures(10); // error - no call signatures @@ -99,7 +99,7 @@ unionOfDifferentNumberOfSignatures(10); // error - no call signatures >10 : 10 unionOfDifferentNumberOfSignatures("hello"); // error - no call signatures ->unionOfDifferentNumberOfSignatures("hello") : any +>unionOfDifferentNumberOfSignatures("hello") : number | Date >unionOfDifferentNumberOfSignatures : ((a: number) => number) | { (a: number): Date; (a: string): boolean; } >"hello" : "hello" @@ -110,11 +110,11 @@ var unionWithDifferentParameterCount: { (a: string): string; } | { (a: string, b >b : number unionWithDifferentParameterCount();// needs more args ->unionWithDifferentParameterCount() : any +>unionWithDifferentParameterCount() : string | number >unionWithDifferentParameterCount : ((a: string) => string) | ((a: string, b: number) => number) unionWithDifferentParameterCount("hello");// needs more args ->unionWithDifferentParameterCount("hello") : any +>unionWithDifferentParameterCount("hello") : string | number >unionWithDifferentParameterCount : ((a: string) => string) | ((a: string, b: number) => number) >"hello" : "hello" @@ -147,17 +147,17 @@ strOrNum = unionWithOptionalParameter1('hello', 10); >10 : 10 strOrNum = unionWithOptionalParameter1('hello', "hello"); // error in parameter type ->strOrNum = unionWithOptionalParameter1('hello', "hello") : any +>strOrNum = unionWithOptionalParameter1('hello', "hello") : string | number >strOrNum : string | number ->unionWithOptionalParameter1('hello', "hello") : any +>unionWithOptionalParameter1('hello', "hello") : string | number >unionWithOptionalParameter1 : ((a: string, b?: number) => string) | ((a: string, b?: number) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = unionWithOptionalParameter1(); // error ->strOrNum = unionWithOptionalParameter1() : any +>strOrNum = unionWithOptionalParameter1() : string | number >strOrNum : string | number ->unionWithOptionalParameter1() : any +>unionWithOptionalParameter1() : string | number >unionWithOptionalParameter1 : ((a: string, b?: number) => string) | ((a: string, b?: number) => number) var unionWithOptionalParameter2: { (a: string, b?: number): string; } | { (a: string, b: number): number }; @@ -168,9 +168,9 @@ var unionWithOptionalParameter2: { (a: string, b?: number): string; } | { (a: st >b : number strOrNum = unionWithOptionalParameter2('hello'); // error no call signature ->strOrNum = unionWithOptionalParameter2('hello') : any +>strOrNum = unionWithOptionalParameter2('hello') : string | number >strOrNum : string | number ->unionWithOptionalParameter2('hello') : any +>unionWithOptionalParameter2('hello') : string | number >unionWithOptionalParameter2 : ((a: string, b?: number) => string) | ((a: string, b: number) => number) >'hello' : "hello" @@ -183,17 +183,17 @@ strOrNum = unionWithOptionalParameter2('hello', 10); // error no call signature >10 : 10 strOrNum = unionWithOptionalParameter2('hello', "hello"); // error no call signature ->strOrNum = unionWithOptionalParameter2('hello', "hello") : any +>strOrNum = unionWithOptionalParameter2('hello', "hello") : string | number >strOrNum : string | number ->unionWithOptionalParameter2('hello', "hello") : any +>unionWithOptionalParameter2('hello', "hello") : string | number >unionWithOptionalParameter2 : ((a: string, b?: number) => string) | ((a: string, b: number) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = unionWithOptionalParameter2(); // error no call signature ->strOrNum = unionWithOptionalParameter2() : any +>strOrNum = unionWithOptionalParameter2() : string | number >strOrNum : string | number ->unionWithOptionalParameter2() : any +>unionWithOptionalParameter2() : string | number >unionWithOptionalParameter2 : ((a: string, b?: number) => string) | ((a: string, b: number) => number) var unionWithOptionalParameter3: { (a: string, b?: number): string; } | { (a: string): number; }; @@ -218,17 +218,17 @@ strOrNum = unionWithOptionalParameter3('hello', 10); // ok >10 : 10 strOrNum = unionWithOptionalParameter3('hello', "hello"); // wrong argument type ->strOrNum = unionWithOptionalParameter3('hello', "hello") : any +>strOrNum = unionWithOptionalParameter3('hello', "hello") : string | number >strOrNum : string | number ->unionWithOptionalParameter3('hello', "hello") : any +>unionWithOptionalParameter3('hello', "hello") : string | number >unionWithOptionalParameter3 : ((a: string, b?: number) => string) | ((a: string) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = unionWithOptionalParameter3(); // needs more args ->strOrNum = unionWithOptionalParameter3() : any +>strOrNum = unionWithOptionalParameter3() : string | number >strOrNum : string | number ->unionWithOptionalParameter3() : any +>unionWithOptionalParameter3() : string | number >unionWithOptionalParameter3 : ((a: string, b?: number) => string) | ((a: string) => number) var unionWithRestParameter1: { (a: string, ...b: number[]): string; } | { (a: string, ...b: number[]): number }; @@ -263,17 +263,17 @@ strOrNum = unionWithRestParameter1('hello', 10, 11); >11 : 11 strOrNum = unionWithRestParameter1('hello', "hello"); // error in parameter type ->strOrNum = unionWithRestParameter1('hello', "hello") : any +>strOrNum = unionWithRestParameter1('hello', "hello") : string | number >strOrNum : string | number ->unionWithRestParameter1('hello', "hello") : any +>unionWithRestParameter1('hello', "hello") : string | number >unionWithRestParameter1 : ((a: string, ...b: number[]) => string) | ((a: string, ...b: number[]) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = unionWithRestParameter1(); // error ->strOrNum = unionWithRestParameter1() : any +>strOrNum = unionWithRestParameter1() : string | number >strOrNum : string | number ->unionWithRestParameter1() : any +>unionWithRestParameter1() : string | number >unionWithRestParameter1 : ((a: string, ...b: number[]) => string) | ((a: string, ...b: number[]) => number) var unionWithRestParameter2: { (a: string, ...b: number[]): string; } | { (a: string, b: number): number }; @@ -284,9 +284,9 @@ var unionWithRestParameter2: { (a: string, ...b: number[]): string; } | { (a: st >b : number strOrNum = unionWithRestParameter2('hello'); // error no call signature ->strOrNum = unionWithRestParameter2('hello') : any +>strOrNum = unionWithRestParameter2('hello') : string | number >strOrNum : string | number ->unionWithRestParameter2('hello') : any +>unionWithRestParameter2('hello') : string | number >unionWithRestParameter2 : ((a: string, ...b: number[]) => string) | ((a: string, b: number) => number) >'hello' : "hello" @@ -299,26 +299,26 @@ strOrNum = unionWithRestParameter2('hello', 10); // error no call signature >10 : 10 strOrNum = unionWithRestParameter2('hello', 10, 11); // error no call signature ->strOrNum = unionWithRestParameter2('hello', 10, 11) : any +>strOrNum = unionWithRestParameter2('hello', 10, 11) : string | number >strOrNum : string | number ->unionWithRestParameter2('hello', 10, 11) : any +>unionWithRestParameter2('hello', 10, 11) : string | number >unionWithRestParameter2 : ((a: string, ...b: number[]) => string) | ((a: string, b: number) => number) >'hello' : "hello" >10 : 10 >11 : 11 strOrNum = unionWithRestParameter2('hello', "hello"); // error no call signature ->strOrNum = unionWithRestParameter2('hello', "hello") : any +>strOrNum = unionWithRestParameter2('hello', "hello") : string | number >strOrNum : string | number ->unionWithRestParameter2('hello', "hello") : any +>unionWithRestParameter2('hello', "hello") : string | number >unionWithRestParameter2 : ((a: string, ...b: number[]) => string) | ((a: string, b: number) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = unionWithRestParameter2(); // error no call signature ->strOrNum = unionWithRestParameter2() : any +>strOrNum = unionWithRestParameter2() : string | number >strOrNum : string | number ->unionWithRestParameter2() : any +>unionWithRestParameter2() : string | number >unionWithRestParameter2 : ((a: string, ...b: number[]) => string) | ((a: string, b: number) => number) var unionWithRestParameter3: { (a: string, ...b: number[]): string; } | { (a: string): number }; @@ -352,17 +352,17 @@ strOrNum = unionWithRestParameter3('hello', 10, 11); // error no call signature >11 : 11 strOrNum = unionWithRestParameter3('hello', "hello"); // wrong argument type ->strOrNum = unionWithRestParameter3('hello', "hello") : any +>strOrNum = unionWithRestParameter3('hello', "hello") : string | number >strOrNum : string | number ->unionWithRestParameter3('hello', "hello") : any +>unionWithRestParameter3('hello', "hello") : string | number >unionWithRestParameter3 : ((a: string, ...b: number[]) => string) | ((a: string) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = unionWithRestParameter3(); // error no call signature ->strOrNum = unionWithRestParameter3() : any +>strOrNum = unionWithRestParameter3() : string | number >strOrNum : string | number ->unionWithRestParameter3() : any +>unionWithRestParameter3() : string | number >unionWithRestParameter3 : ((a: string, ...b: number[]) => string) | ((a: string) => number) var unionWithRestParameter4: { (...a: string[]): string; } | { (a: string, b: string): number; }; @@ -372,9 +372,9 @@ var unionWithRestParameter4: { (...a: string[]): string; } | { (a: string, b: st >b : string strOrNum = unionWithRestParameter4("hello"); // error supplied parameters do not match any call signature ->strOrNum = unionWithRestParameter4("hello") : any +>strOrNum = unionWithRestParameter4("hello") : string | number >strOrNum : string | number ->unionWithRestParameter4("hello") : any +>unionWithRestParameter4("hello") : string | number >unionWithRestParameter4 : ((...a: string[]) => string) | ((a: string, b: string) => number) >"hello" : "hello" diff --git a/tests/baselines/reference/unionTypeCallSignatures4.types b/tests/baselines/reference/unionTypeCallSignatures4.types index a02ef1e8bfabe..a5628129dbe5c 100644 --- a/tests/baselines/reference/unionTypeCallSignatures4.types +++ b/tests/baselines/reference/unionTypeCallSignatures4.types @@ -93,7 +93,7 @@ var f12345: F1 | F2 | F3 | F4 | F5; >f12345 : F1 | F2 | F3 | F4 | F5 f12345("a"); // error ->f12345("a") : any +>f12345("a") : void >f12345 : F1 | F2 | F3 | F4 | F5 >"a" : "a" @@ -104,7 +104,7 @@ f12345("a", "b"); >"b" : "b" f12345("a", "b", "c"); // error ->f12345("a", "b", "c") : any +>f12345("a", "b", "c") : void >f12345 : F1 | F2 | F3 | F4 | F5 >"a" : "a" >"b" : "b" diff --git a/tests/baselines/reference/unionTypeCallSignatures5.types b/tests/baselines/reference/unionTypeCallSignatures5.types index b9b5a6fbc0db6..53ce4ea655086 100644 --- a/tests/baselines/reference/unionTypeCallSignatures5.types +++ b/tests/baselines/reference/unionTypeCallSignatures5.types @@ -18,7 +18,7 @@ declare const fn: A | B | C; >fn : A | B | C fn(0); ->fn(0) : any +>fn(0) : void >fn : A | B | C >0 : 0 diff --git a/tests/baselines/reference/unionTypeCallSignatures6.types b/tests/baselines/reference/unionTypeCallSignatures6.types index 930c91b110987..fbb6dda54fb9c 100644 --- a/tests/baselines/reference/unionTypeCallSignatures6.types +++ b/tests/baselines/reference/unionTypeCallSignatures6.types @@ -31,14 +31,14 @@ declare var f1: F1 | F2; >f1 : F1 | F2 f1(); // error ->f1() : any +>f1() : void >f1 : F1 | F2 declare var f2: F0 | F1; >f2 : F1 | F0 f2(); // error ->f2() : any +>f2() : void >f2 : F1 | F0 interface F3 { @@ -106,7 +106,7 @@ x1.f3(); // error >f3 : F3 | F4 x1.f4(); // error ->x1.f4() : any +>x1.f4() : void >x1.f4 : F3 | F5 >x1 : A & C & { f0: F0 | F3; f1: F1 | F3; f2: F1 | F4; f3: F3 | F4; f4: F3 | F5; } >f4 : F3 | F5 @@ -131,7 +131,7 @@ declare var f3: F1 | F6; >f3 : F1 | F6 f3(); // error ->f3() : any +>f3() : void >f3 : F1 | F6 interface F7 { @@ -145,6 +145,6 @@ declare var f4: F6 | F7; >f4 : F6 | F7 f4(); // error ->f4() : any +>f4() : void >f4 : F6 | F7 diff --git a/tests/baselines/reference/unionTypeConstructSignatures.errors.txt b/tests/baselines/reference/unionTypeConstructSignatures.errors.txt index 49e280f0312ad..686f95e9fd4d8 100644 --- a/tests/baselines/reference/unionTypeConstructSignatures.errors.txt +++ b/tests/baselines/reference/unionTypeConstructSignatures.errors.txt @@ -1,3 +1,5 @@ +tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(9,1): error TS2322: Type 'number | Date' is not assignable to type 'string | boolean'. + Type 'number' is not assignable to type 'string | boolean'. tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(9,47): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'. tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(10,33): error TS2769: No overload matches this call. Overload 1 of 2, '(a: number): number | Date', gave the following error. @@ -34,7 +36,7 @@ tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(69,49): erro tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(70,12): error TS2555: Expected at least 1 arguments, but got 0. -==== tests/cases/conformance/types/union/unionTypeConstructSignatures.ts (26 errors) ==== +==== tests/cases/conformance/types/union/unionTypeConstructSignatures.ts (27 errors) ==== var numOrDate: number | Date; var strOrBoolean: string | boolean; var strOrNum: string | number; @@ -44,6 +46,9 @@ tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(70,12): erro var unionOfDifferentReturnType: { new (a: number): number; } | { new (a: number): Date; }; numOrDate = new unionOfDifferentReturnType(10); strOrBoolean = new unionOfDifferentReturnType("hello"); // error + ~~~~~~~~~~~~ +!!! error TS2322: Type 'number | Date' is not assignable to type 'string | boolean'. +!!! error TS2322: Type 'number' is not assignable to type 'string | boolean'. ~~~~~~~ !!! error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'. new unionOfDifferentReturnType1(true); // error in type of parameter diff --git a/tests/baselines/reference/unionTypeConstructSignatures.types b/tests/baselines/reference/unionTypeConstructSignatures.types index ca378be3cc3d4..27e1797588783 100644 --- a/tests/baselines/reference/unionTypeConstructSignatures.types +++ b/tests/baselines/reference/unionTypeConstructSignatures.types @@ -23,14 +23,14 @@ numOrDate = new unionOfDifferentReturnType(10); >10 : 10 strOrBoolean = new unionOfDifferentReturnType("hello"); // error ->strOrBoolean = new unionOfDifferentReturnType("hello") : any +>strOrBoolean = new unionOfDifferentReturnType("hello") : number | Date >strOrBoolean : string | boolean ->new unionOfDifferentReturnType("hello") : any +>new unionOfDifferentReturnType("hello") : number | Date >unionOfDifferentReturnType : (new (a: number) => number) | (new (a: number) => Date) >"hello" : "hello" new unionOfDifferentReturnType1(true); // error in type of parameter ->new unionOfDifferentReturnType1(true) : any +>new unionOfDifferentReturnType1(true) : (Date & string) | (Date & false) | (Date & true) >unionOfDifferentReturnType1 : { new (a: number): number; new (a: string): string; } | { new (a: number): Date; new (a: string): boolean; } >true : true @@ -56,12 +56,12 @@ strOrBoolean = new unionOfDifferentReturnType1("hello"); >"hello" : "hello" new unionOfDifferentReturnType1(true); // error in type of parameter ->new unionOfDifferentReturnType1(true) : any +>new unionOfDifferentReturnType1(true) : (Date & string) | (Date & false) | (Date & true) >unionOfDifferentReturnType1 : { new (a: number): number; new (a: string): string; } | { new (a: number): Date; new (a: string): boolean; } >true : true new unionOfDifferentReturnType1(); // error missing parameter ->new unionOfDifferentReturnType1() : any +>new unionOfDifferentReturnType1() : (Date & string) | (Date & false) | (Date & true) >unionOfDifferentReturnType1 : { new (a: number): number; new (a: string): string; } | { new (a: number): Date; new (a: string): boolean; } var unionOfDifferentParameterTypes: { new (a: number): number; } | { new (a: string): Date; }; @@ -70,17 +70,17 @@ var unionOfDifferentParameterTypes: { new (a: number): number; } | { new (a: str >a : string new unionOfDifferentParameterTypes(10);// error - no call signatures ->new unionOfDifferentParameterTypes(10) : any +>new unionOfDifferentParameterTypes(10) : number | Date >unionOfDifferentParameterTypes : (new (a: number) => number) | (new (a: string) => Date) >10 : 10 new unionOfDifferentParameterTypes("hello");// error - no call signatures ->new unionOfDifferentParameterTypes("hello") : any +>new unionOfDifferentParameterTypes("hello") : number | Date >unionOfDifferentParameterTypes : (new (a: number) => number) | (new (a: string) => Date) >"hello" : "hello" new unionOfDifferentParameterTypes();// error - no call signatures ->new unionOfDifferentParameterTypes() : any +>new unionOfDifferentParameterTypes() : number | Date >unionOfDifferentParameterTypes : (new (a: number) => number) | (new (a: string) => Date) var unionOfDifferentNumberOfSignatures: { new (a: number): number; } | { new (a: number): Date; new (a: string): boolean; }; @@ -90,7 +90,7 @@ var unionOfDifferentNumberOfSignatures: { new (a: number): number; } | { new (a: >a : string new unionOfDifferentNumberOfSignatures(); // error - no call signatures ->new unionOfDifferentNumberOfSignatures() : any +>new unionOfDifferentNumberOfSignatures() : number | Date >unionOfDifferentNumberOfSignatures : (new (a: number) => number) | { new (a: number): Date; new (a: string): boolean; } new unionOfDifferentNumberOfSignatures(10); // error - no call signatures @@ -99,7 +99,7 @@ new unionOfDifferentNumberOfSignatures(10); // error - no call signatures >10 : 10 new unionOfDifferentNumberOfSignatures("hello"); // error - no call signatures ->new unionOfDifferentNumberOfSignatures("hello") : any +>new unionOfDifferentNumberOfSignatures("hello") : number | Date >unionOfDifferentNumberOfSignatures : (new (a: number) => number) | { new (a: number): Date; new (a: string): boolean; } >"hello" : "hello" @@ -110,11 +110,11 @@ var unionWithDifferentParameterCount: { new (a: string): string; } | { new (a: s >b : number new unionWithDifferentParameterCount();// needs more args ->new unionWithDifferentParameterCount() : any +>new unionWithDifferentParameterCount() : string | number >unionWithDifferentParameterCount : (new (a: string) => string) | (new (a: string, b: number) => number) new unionWithDifferentParameterCount("hello");// needs more args ->new unionWithDifferentParameterCount("hello") : any +>new unionWithDifferentParameterCount("hello") : string | number >unionWithDifferentParameterCount : (new (a: string) => string) | (new (a: string, b: number) => number) >"hello" : "hello" @@ -147,17 +147,17 @@ strOrNum = new unionWithOptionalParameter1('hello', 10); >10 : 10 strOrNum = new unionWithOptionalParameter1('hello', "hello"); // error in parameter type ->strOrNum = new unionWithOptionalParameter1('hello', "hello") : any +>strOrNum = new unionWithOptionalParameter1('hello', "hello") : string | number >strOrNum : string | number ->new unionWithOptionalParameter1('hello', "hello") : any +>new unionWithOptionalParameter1('hello', "hello") : string | number >unionWithOptionalParameter1 : (new (a: string, b?: number) => string) | (new (a: string, b?: number) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = new unionWithOptionalParameter1(); // error ->strOrNum = new unionWithOptionalParameter1() : any +>strOrNum = new unionWithOptionalParameter1() : string | number >strOrNum : string | number ->new unionWithOptionalParameter1() : any +>new unionWithOptionalParameter1() : string | number >unionWithOptionalParameter1 : (new (a: string, b?: number) => string) | (new (a: string, b?: number) => number) var unionWithOptionalParameter2: { new (a: string, b?: number): string; } | { new (a: string, b: number): number }; @@ -168,9 +168,9 @@ var unionWithOptionalParameter2: { new (a: string, b?: number): string; } | { ne >b : number strOrNum = new unionWithOptionalParameter2('hello'); // error no call signature ->strOrNum = new unionWithOptionalParameter2('hello') : any +>strOrNum = new unionWithOptionalParameter2('hello') : string | number >strOrNum : string | number ->new unionWithOptionalParameter2('hello') : any +>new unionWithOptionalParameter2('hello') : string | number >unionWithOptionalParameter2 : (new (a: string, b?: number) => string) | (new (a: string, b: number) => number) >'hello' : "hello" @@ -183,17 +183,17 @@ strOrNum = new unionWithOptionalParameter2('hello', 10); // error no call signat >10 : 10 strOrNum = new unionWithOptionalParameter2('hello', "hello"); // error no call signature ->strOrNum = new unionWithOptionalParameter2('hello', "hello") : any +>strOrNum = new unionWithOptionalParameter2('hello', "hello") : string | number >strOrNum : string | number ->new unionWithOptionalParameter2('hello', "hello") : any +>new unionWithOptionalParameter2('hello', "hello") : string | number >unionWithOptionalParameter2 : (new (a: string, b?: number) => string) | (new (a: string, b: number) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = new unionWithOptionalParameter2(); // error no call signature ->strOrNum = new unionWithOptionalParameter2() : any +>strOrNum = new unionWithOptionalParameter2() : string | number >strOrNum : string | number ->new unionWithOptionalParameter2() : any +>new unionWithOptionalParameter2() : string | number >unionWithOptionalParameter2 : (new (a: string, b?: number) => string) | (new (a: string, b: number) => number) var unionWithOptionalParameter3: { new (a: string, b?: number): string; } | { new (a: string): number; }; @@ -218,17 +218,17 @@ strOrNum = new unionWithOptionalParameter3('hello', 10); // ok >10 : 10 strOrNum = new unionWithOptionalParameter3('hello', "hello"); // wrong type ->strOrNum = new unionWithOptionalParameter3('hello', "hello") : any +>strOrNum = new unionWithOptionalParameter3('hello', "hello") : string | number >strOrNum : string | number ->new unionWithOptionalParameter3('hello', "hello") : any +>new unionWithOptionalParameter3('hello', "hello") : string | number >unionWithOptionalParameter3 : (new (a: string, b?: number) => string) | (new (a: string) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = new unionWithOptionalParameter3(); // error no call signature ->strOrNum = new unionWithOptionalParameter3() : any +>strOrNum = new unionWithOptionalParameter3() : string | number >strOrNum : string | number ->new unionWithOptionalParameter3() : any +>new unionWithOptionalParameter3() : string | number >unionWithOptionalParameter3 : (new (a: string, b?: number) => string) | (new (a: string) => number) var unionWithRestParameter1: { new (a: string, ...b: number[]): string; } | { new (a: string, ...b: number[]): number }; @@ -263,17 +263,17 @@ strOrNum = new unionWithRestParameter1('hello', 10, 11); >11 : 11 strOrNum = new unionWithRestParameter1('hello', "hello"); // error in parameter type ->strOrNum = new unionWithRestParameter1('hello', "hello") : any +>strOrNum = new unionWithRestParameter1('hello', "hello") : string | number >strOrNum : string | number ->new unionWithRestParameter1('hello', "hello") : any +>new unionWithRestParameter1('hello', "hello") : string | number >unionWithRestParameter1 : (new (a: string, ...b: number[]) => string) | (new (a: string, ...b: number[]) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = new unionWithRestParameter1(); // error ->strOrNum = new unionWithRestParameter1() : any +>strOrNum = new unionWithRestParameter1() : string | number >strOrNum : string | number ->new unionWithRestParameter1() : any +>new unionWithRestParameter1() : string | number >unionWithRestParameter1 : (new (a: string, ...b: number[]) => string) | (new (a: string, ...b: number[]) => number) var unionWithRestParameter2: { new (a: string, ...b: number[]): string; } | { new (a: string, b: number): number }; @@ -284,9 +284,9 @@ var unionWithRestParameter2: { new (a: string, ...b: number[]): string; } | { ne >b : number strOrNum = new unionWithRestParameter2('hello'); // error no call signature ->strOrNum = new unionWithRestParameter2('hello') : any +>strOrNum = new unionWithRestParameter2('hello') : string | number >strOrNum : string | number ->new unionWithRestParameter2('hello') : any +>new unionWithRestParameter2('hello') : string | number >unionWithRestParameter2 : (new (a: string, ...b: number[]) => string) | (new (a: string, b: number) => number) >'hello' : "hello" @@ -299,26 +299,26 @@ strOrNum = new unionWithRestParameter2('hello', 10); // error no call signature >10 : 10 strOrNum = new unionWithRestParameter2('hello', 10, 11); // error no call signature ->strOrNum = new unionWithRestParameter2('hello', 10, 11) : any +>strOrNum = new unionWithRestParameter2('hello', 10, 11) : string | number >strOrNum : string | number ->new unionWithRestParameter2('hello', 10, 11) : any +>new unionWithRestParameter2('hello', 10, 11) : string | number >unionWithRestParameter2 : (new (a: string, ...b: number[]) => string) | (new (a: string, b: number) => number) >'hello' : "hello" >10 : 10 >11 : 11 strOrNum = new unionWithRestParameter2('hello', "hello"); // error no call signature ->strOrNum = new unionWithRestParameter2('hello', "hello") : any +>strOrNum = new unionWithRestParameter2('hello', "hello") : string | number >strOrNum : string | number ->new unionWithRestParameter2('hello', "hello") : any +>new unionWithRestParameter2('hello', "hello") : string | number >unionWithRestParameter2 : (new (a: string, ...b: number[]) => string) | (new (a: string, b: number) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = new unionWithRestParameter2(); // error no call signature ->strOrNum = new unionWithRestParameter2() : any +>strOrNum = new unionWithRestParameter2() : string | number >strOrNum : string | number ->new unionWithRestParameter2() : any +>new unionWithRestParameter2() : string | number >unionWithRestParameter2 : (new (a: string, ...b: number[]) => string) | (new (a: string, b: number) => number) var unionWithRestParameter3: { new (a: string, ...b: number[]): string; } | { new (a: string): number }; @@ -352,16 +352,16 @@ strOrNum = new unionWithRestParameter3('hello', 10, 11); // ok >11 : 11 strOrNum = new unionWithRestParameter3('hello', "hello"); // wrong type ->strOrNum = new unionWithRestParameter3('hello', "hello") : any +>strOrNum = new unionWithRestParameter3('hello', "hello") : string | number >strOrNum : string | number ->new unionWithRestParameter3('hello', "hello") : any +>new unionWithRestParameter3('hello', "hello") : string | number >unionWithRestParameter3 : (new (a: string, ...b: number[]) => string) | (new (a: string) => number) >'hello' : "hello" >"hello" : "hello" strOrNum = new unionWithRestParameter3(); // error no call signature ->strOrNum = new unionWithRestParameter3() : any +>strOrNum = new unionWithRestParameter3() : string | number >strOrNum : string | number ->new unionWithRestParameter3() : any +>new unionWithRestParameter3() : string | number >unionWithRestParameter3 : (new (a: string, ...b: number[]) => string) | (new (a: string) => number) diff --git a/tests/baselines/reference/unionTypeInference.types b/tests/baselines/reference/unionTypeInference.types index b8107f3c04d0a..268d4ed86ebfb 100644 --- a/tests/baselines/reference/unionTypeInference.types +++ b/tests/baselines/reference/unionTypeInference.types @@ -56,8 +56,8 @@ const a6 = f1(true, false); // boolean >false : false const a7 = f1("hello", 1); // Error ->a7 : any ->f1("hello", 1) : any +>a7 : "hello" +>f1("hello", 1) : "hello" >f1 : (x: T, y: string | T) => T >"hello" : "hello" >1 : 1 @@ -126,8 +126,8 @@ const d2 = f4(s); >s : string const d3 = f4(42); // Error ->d3 : any ->f4(42) : any +>d3 : 42 +>f4(42) : 42 >f4 : (x: string & T) => T >42 : 42 diff --git a/tests/baselines/reference/unionTypeMembers.types b/tests/baselines/reference/unionTypeMembers.types index e26d00c45f96a..56bab568db988 100644 --- a/tests/baselines/reference/unionTypeMembers.types +++ b/tests/baselines/reference/unionTypeMembers.types @@ -122,7 +122,7 @@ x.commonMethodDifferentParameterType; // No error - property exists >commonMethodDifferentParameterType : ((a: string) => string) | ((a: number) => number) x.commonMethodDifferentParameterType(strOrNum); // error - no call signatures because the type of this property is ((a: string) => string) | (a: number) => number ->x.commonMethodDifferentParameterType(strOrNum) : any +>x.commonMethodDifferentParameterType(strOrNum) : string | number >x.commonMethodDifferentParameterType : ((a: string) => string) | ((a: number) => number) >x : I1 | I2 >commonMethodDifferentParameterType : ((a: string) => string) | ((a: number) => number) diff --git a/tests/baselines/reference/uniqueSymbols.js b/tests/baselines/reference/uniqueSymbols.js index 54f59e8e217b6..800b8c85bcaee 100644 --- a/tests/baselines/reference/uniqueSymbols.js +++ b/tests/baselines/reference/uniqueSymbols.js @@ -314,15 +314,18 @@ async function* asyncGenFuncYieldConstCall() { yield constCall; } async function* asyncGenFuncYieldLetCall() { yield letCall; } async function* asyncGenFuncYieldVarCall() { yield varCall; } // classes -class C { - constructor() { - this.readonlyCall = Symbol(); - this.readwriteCall = Symbol(); +const C = /** @class */ (() => { + class C { + constructor() { + this.readonlyCall = Symbol(); + this.readwriteCall = Symbol(); + } } -} -C.readonlyStaticCall = Symbol(); -C.readonlyStaticTypeAndCall = Symbol(); -C.readwriteStaticCall = Symbol(); + C.readonlyStaticCall = Symbol(); + C.readonlyStaticTypeAndCall = Symbol(); + C.readwriteStaticCall = Symbol(); + return C; +})(); const constInitToCReadonlyStaticCall = C.readonlyStaticCall; const constInitToCReadonlyStaticType = C.readonlyStaticType; const constInitToCReadonlyStaticTypeAndCall = C.readonlyStaticTypeAndCall; @@ -370,27 +373,30 @@ const o2 = { method5(p = s) { return p; }, }; // property initializers -class C0 { - constructor() { - this.a = s; - this.b = N.s; - this.c = N["s"]; - this.d = s; - this.e = N.s; - this.f = N["s"]; +const C0 = /** @class */ (() => { + class C0 { + constructor() { + this.a = s; + this.b = N.s; + this.c = N["s"]; + this.d = s; + this.e = N.s; + this.f = N["s"]; + } + method1() { return s; } + async method2() { return s; } + async *method3() { yield s; } + *method4() { yield s; } + method5(p = s) { return p; } } - method1() { return s; } - async method2() { return s; } - async *method3() { yield s; } - *method4() { yield s; } - method5(p = s) { return p; } -} -C0.a = s; -C0.b = N.s; -C0.c = N["s"]; -C0.d = s; -C0.e = N.s; -C0.f = N["s"]; + C0.a = s; + C0.b = N.s; + C0.c = N["s"]; + C0.d = s; + C0.e = N.s; + C0.f = N["s"]; + return C0; +})(); // non-widening positions // element access o[s]; diff --git a/tests/baselines/reference/uniqueSymbolsDeclarations.js b/tests/baselines/reference/uniqueSymbolsDeclarations.js index 15342a0bd97fc..5d86b14c723a7 100644 --- a/tests/baselines/reference/uniqueSymbolsDeclarations.js +++ b/tests/baselines/reference/uniqueSymbolsDeclarations.js @@ -282,15 +282,18 @@ async function* asyncGenFuncYieldConstCall() { yield constCall; } async function* asyncGenFuncYieldLetCall() { yield letCall; } async function* asyncGenFuncYieldVarCall() { yield varCall; } // classes -class C { - constructor() { - this.readonlyCall = Symbol(); - this.readwriteCall = Symbol(); +const C = /** @class */ (() => { + class C { + constructor() { + this.readonlyCall = Symbol(); + this.readwriteCall = Symbol(); + } } -} -C.readonlyStaticCall = Symbol(); -C.readonlyStaticTypeAndCall = Symbol(); -C.readwriteStaticCall = Symbol(); + C.readonlyStaticCall = Symbol(); + C.readonlyStaticTypeAndCall = Symbol(); + C.readwriteStaticCall = Symbol(); + return C; +})(); const constInitToCReadonlyStaticCall = C.readonlyStaticCall; const constInitToCReadonlyStaticType = C.readonlyStaticType; const constInitToCReadonlyStaticTypeAndCall = C.readonlyStaticTypeAndCall; @@ -338,27 +341,30 @@ const o2 = { method5(p = s) { return p; } }; // property initializers -class C0 { - constructor() { - this.a = s; - this.b = N.s; - this.c = N["s"]; - this.d = s; - this.e = N.s; - this.f = N["s"]; +const C0 = /** @class */ (() => { + class C0 { + constructor() { + this.a = s; + this.b = N.s; + this.c = N["s"]; + this.d = s; + this.e = N.s; + this.f = N["s"]; + } + method1() { return s; } + async method2() { return s; } + async *method3() { yield s; } + *method4() { yield s; } + method5(p = s) { return p; } } - method1() { return s; } - async method2() { return s; } - async *method3() { yield s; } - *method4() { yield s; } - method5(p = s) { return p; } -} -C0.a = s; -C0.b = N.s; -C0.c = N["s"]; -C0.d = s; -C0.e = N.s; -C0.f = N["s"]; + C0.a = s; + C0.b = N.s; + C0.c = N["s"]; + C0.d = s; + C0.e = N.s; + C0.f = N["s"]; + return C0; +})(); // non-widening positions // element access o[s]; diff --git a/tests/baselines/reference/unusedGetterInClass.js b/tests/baselines/reference/unusedGetterInClass.js index 3cdac7b63df58..c0413e6c34f7c 100644 --- a/tests/baselines/reference/unusedGetterInClass.js +++ b/tests/baselines/reference/unusedGetterInClass.js @@ -19,7 +19,7 @@ var Employee = /** @class */ (function () { }, // Will not also error on the setter set: function (_) { }, - enumerable: true, + enumerable: false, configurable: true }); return Employee; diff --git a/tests/baselines/reference/unusedLocalsAndParameters.js b/tests/baselines/reference/unusedLocalsAndParameters.js index 5039a9c1712a7..600dbce98f203 100644 --- a/tests/baselines/reference/unusedLocalsAndParameters.js +++ b/tests/baselines/reference/unusedLocalsAndParameters.js @@ -110,7 +110,7 @@ var C = /** @class */ (function () { // Accessor declaration paramter set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -125,7 +125,7 @@ var E = /** @class */ (function () { // Accessor declaration paramter set: function (v) { }, - enumerable: true, + enumerable: false, configurable: true }); return class_1; diff --git a/tests/baselines/reference/unusedLocalsAndParametersDeferred.js b/tests/baselines/reference/unusedLocalsAndParametersDeferred.js index df8b7d7e48731..d17602921677e 100644 --- a/tests/baselines/reference/unusedLocalsAndParametersDeferred.js +++ b/tests/baselines/reference/unusedLocalsAndParametersDeferred.js @@ -207,7 +207,7 @@ var C = /** @class */ (function () { v; }); }, - enumerable: true, + enumerable: false, configurable: true }); return C; @@ -234,7 +234,7 @@ var E = /** @class */ (function () { v; }); }, - enumerable: true, + enumerable: false, configurable: true }); return class_1; diff --git a/tests/baselines/reference/unusedPrivateMembers.js b/tests/baselines/reference/unusedPrivateMembers.js index 05c55c1ecc49d..ddca733ec0960 100644 --- a/tests/baselines/reference/unusedPrivateMembers.js +++ b/tests/baselines/reference/unusedPrivateMembers.js @@ -77,7 +77,7 @@ var Test3 = /** @class */ (function () { get: function () { return 0; }, - enumerable: true, + enumerable: false, configurable: true }); Test3.prototype.test = function () { @@ -93,7 +93,7 @@ var Test4 = /** @class */ (function () { set: function (v) { v; }, - enumerable: true, + enumerable: false, configurable: true }); Test4.prototype.test = function () { diff --git a/tests/baselines/reference/unusedSetterInClass.js b/tests/baselines/reference/unusedSetterInClass.js index 9b7a65eb449f4..3ca0fbda62c3c 100644 --- a/tests/baselines/reference/unusedSetterInClass.js +++ b/tests/baselines/reference/unusedSetterInClass.js @@ -15,7 +15,7 @@ var Employee = /** @class */ (function () { set: function (newName) { this._fullName = newName; }, - enumerable: true, + enumerable: false, configurable: true }); return Employee; diff --git a/tests/baselines/reference/unusedSetterInClass2.js b/tests/baselines/reference/unusedSetterInClass2.js index 9c3111982a9e5..0978cfcd497ef 100644 --- a/tests/baselines/reference/unusedSetterInClass2.js +++ b/tests/baselines/reference/unusedSetterInClass2.js @@ -15,7 +15,7 @@ var Employee = /** @class */ (function () { } Object.defineProperty(Employee.prototype, "p", { set: function (_) { }, - enumerable: true, + enumerable: false, configurable: true }); Employee.prototype.m = function () { diff --git a/tests/baselines/reference/unusedVariablesinModules1.js b/tests/baselines/reference/unusedVariablesinModules1.js index 474145c633600..91606bc151733 100644 --- a/tests/baselines/reference/unusedVariablesinModules1.js +++ b/tests/baselines/reference/unusedVariablesinModules1.js @@ -9,3 +9,4 @@ export var y: string; "use strict"; exports.__esModule = true; var x; +exports.y = void 0; diff --git a/tests/baselines/reference/useBeforeDeclaration_jsx.js b/tests/baselines/reference/useBeforeDeclaration_jsx.js index e95bf25464413..458f03e88772a 100644 --- a/tests/baselines/reference/useBeforeDeclaration_jsx.js +++ b/tests/baselines/reference/useBeforeDeclaration_jsx.js @@ -16,13 +16,16 @@ class C { //// [useBeforeDeclaration_jsx.jsx] -class C { -} -C.a = ; -C.b = ; -C.c = ; -C.d = ; -C.e = {C.y}; -C.x = {}; -C.y = ''; -C.z = () => ; +const C = /** @class */ (() => { + class C { + } + C.a = ; + C.b = ; + C.c = ; + C.d = ; + C.e = {C.y}; + C.x = {}; + C.y = ''; + C.z = () => ; + return C; +})(); diff --git a/tests/baselines/reference/useBeforeDeclaration_propertyAssignment.js b/tests/baselines/reference/useBeforeDeclaration_propertyAssignment.js index 4ee81065518e1..07907687927ad 100644 --- a/tests/baselines/reference/useBeforeDeclaration_propertyAssignment.js +++ b/tests/baselines/reference/useBeforeDeclaration_propertyAssignment.js @@ -25,13 +25,16 @@ export class C { this.c = { c: this.b }; } } -class D { -} -D.A = class extends D.B { - [D.D]() { } // should be an error -}; -D.B = class { -}; -D.C = Object.assign({ [D.D]: 1 }, { get [D.D]() { return 0; } } // should be an error -); -D.D = ''; +const D = /** @class */ (() => { + class D { + } + D.A = class extends D.B { + [D.D]() { } // should be an error + }; + D.B = class { + }; + D.C = Object.assign({ [D.D]: 1 }, { get [D.D]() { return 0; } } // should be an error + ); + D.D = ''; + return D; +})(); diff --git a/tests/baselines/reference/user/TypeScript-React-Native-Starter.log b/tests/baselines/reference/user/TypeScript-React-Native-Starter.log index 56087ce2e9136..4b04501e4ac39 100644 --- a/tests/baselines/reference/user/TypeScript-React-Native-Starter.log +++ b/tests/baselines/reference/user/TypeScript-React-Native-Starter.log @@ -1,9 +1,6 @@ Exit Code: 1 Standard output: -node_modules/@types/react-native/index.d.ts(3425,42): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. -node_modules/@types/react-native/index.d.ts(3438,42): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. node_modules/@types/react-native/index.d.ts(8745,18): error TS2717: Subsequent property declarations must have the same type. Property 'geolocation' must be of type 'Geolocation', but here has type 'GeolocationStatic'. -node_modules/@types/react/index.d.ts(388,23): error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. diff --git a/tests/baselines/reference/user/TypeScript-Vue-Starter.log b/tests/baselines/reference/user/TypeScript-Vue-Starter.log deleted file mode 100644 index 99bf7df534e75..0000000000000 --- a/tests/baselines/reference/user/TypeScript-Vue-Starter.log +++ /dev/null @@ -1,9 +0,0 @@ -Exit Code: 1 -Standard output: -src/components/Hello.spec.ts(4,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. -src/components/Hello.spec.ts(5,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. -src/components/Hello.spec.ts(14,5): error TS2304: Cannot find name 'expect'. - - - -Standard error: diff --git a/tests/baselines/reference/user/TypeScript-WeChat-Starter.log b/tests/baselines/reference/user/TypeScript-WeChat-Starter.log index 825eae70a538a..a9aacbda5d62c 100644 --- a/tests/baselines/reference/user/TypeScript-WeChat-Starter.log +++ b/tests/baselines/reference/user/TypeScript-WeChat-Starter.log @@ -1,16 +1,6 @@ Exit Code: 1 Standard output: -src/App.test.tsx(5,1): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. -src/components/Hello.test.tsx(5,1): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. -src/components/Hello.test.tsx(7,3): error TS2304: Cannot find name 'expect'. -src/components/Hello.test.tsx(10,1): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. -src/components/Hello.test.tsx(12,3): error TS2304: Cannot find name 'expect'. -src/components/Hello.test.tsx(15,1): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. -src/components/Hello.test.tsx(17,3): error TS2304: Cannot find name 'expect'. -src/components/Hello.test.tsx(20,1): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. -src/components/Hello.test.tsx(21,3): error TS2304: Cannot find name 'expect'. -src/components/Hello.test.tsx(26,1): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. -src/components/Hello.test.tsx(27,3): error TS2304: Cannot find name 'expect'. +node_modules/@types/connect/index.d.ts(21,42): error TS2689: Cannot extend an interface 'http.IncomingMessage'. Did you mean 'implements'? diff --git a/tests/baselines/reference/user/adonis-framework.log b/tests/baselines/reference/user/adonis-framework.log index 443cfcb5ffde4..f3e1a0a59e894 100644 --- a/tests/baselines/reference/user/adonis-framework.log +++ b/tests/baselines/reference/user/adonis-framework.log @@ -24,6 +24,7 @@ node_modules/adonis-framework/src/Encryption/index.js(71,34): error TS2769: No o Argument of type 'string' is not assignable to parameter of type 'undefined'. Overload 2 of 4, '(data: string, input_encoding: "utf8" | "ascii" | "binary" | undefined, output_encoding: HexBase64BinaryEncoding): string', gave the following error. Argument of type 'string' is not assignable to parameter of type '"utf8" | "ascii" | "binary" | undefined'. +node_modules/adonis-framework/src/Encryption/index.js(77,27): error TS2322: Type 'string' is not assignable to type 'Buffer'. node_modules/adonis-framework/src/Encryption/index.js(77,50): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/adonis-framework/src/Encryption/index.js(85,23): error TS8024: JSDoc '@param' tag has name 'value', but there is no parameter with that name. node_modules/adonis-framework/src/Encryption/index.js(87,15): error TS2304: Cannot find name 'Mixed'. @@ -32,6 +33,8 @@ node_modules/adonis-framework/src/Encryption/index.js(101,62): error TS2769: No Argument of type 'string' is not assignable to parameter of type 'Utf8AsciiBinaryEncoding'. Overload 2 of 4, '(data: string, input_encoding: "base64" | "binary" | "hex" | undefined, output_encoding: Utf8AsciiBinaryEncoding): string', gave the following error. Argument of type 'string' is not assignable to parameter of type 'Utf8AsciiBinaryEncoding'. +node_modules/adonis-framework/src/Encryption/index.js(102,5): error TS2322: Type 'string' is not assignable to type 'Buffer & string'. + Type 'string' is not assignable to type 'Buffer'. node_modules/adonis-framework/src/Encryption/index.js(114,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Encryption/index.js(119,23): error TS2554: Expected 2 arguments, but got 1. node_modules/adonis-framework/src/Encryption/index.js(183,15): error TS2304: Cannot find name 'Mixed'. diff --git a/tests/baselines/reference/user/bluebird.log b/tests/baselines/reference/user/bluebird.log index 7d9348c9d4096..cf772cb5b6ff3 100644 --- a/tests/baselines/reference/user/bluebird.log +++ b/tests/baselines/reference/user/bluebird.log @@ -6,8 +6,10 @@ node_modules/bluebird/js/release/bluebird.js(10,10): error TS2339: Property 'noC node_modules/bluebird/js/release/debuggability.js(225,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'event' must be of type 'CustomEvent', but here has type 'Event'. node_modules/bluebird/js/release/debuggability.js(232,26): error TS2339: Property 'detail' does not exist on type 'Event'. node_modules/bluebird/js/release/debuggability.js(258,48): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '["multipleResolves", MultipleResolveListener]'. -node_modules/bluebird/js/release/debuggability.js(301,56): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. - Type 'IArguments' is missing the following properties from type 'any[]': pop, push, concat, join, and 26 more. +node_modules/bluebird/js/release/debuggability.js(301,9): error TS2322: Type 'Process' is not assignable to type 'boolean'. +node_modules/bluebird/js/release/debuggability.js(301,28): error TS2684: The 'this' context of type '((...args: any[]) => Process) | ((name: any, ...args: any[]) => boolean)' is not assignable to method's 'this' of type '(this: null, name?: any, ...args: any[]) => Process'. + Type '(name: any, ...args: any[]) => boolean' is not assignable to type '(this: null, name?: any, ...args: any[]) => Process'. + Type 'boolean' is not assignable to type 'Process'. node_modules/bluebird/js/release/debuggability.js(562,19): error TS2350: Only a void function can be called with the 'new' keyword. node_modules/bluebird/js/release/debuggability.js(633,59): error TS2554: Expected 0 arguments, but got 1. node_modules/bluebird/js/release/debuggability.js(807,5): error TS2721: Cannot invoke an object which is possibly 'null'. diff --git a/tests/baselines/reference/user/chrome-devtools-frontend.log b/tests/baselines/reference/user/chrome-devtools-frontend.log index 0a62d4af67571..cac86ea489ec0 100644 --- a/tests/baselines/reference/user/chrome-devtools-frontend.log +++ b/tests/baselines/reference/user/chrome-devtools-frontend.log @@ -12,7 +12,7 @@ node_modules/chrome-devtools-frontend/front_end/Runtime.js(270,9): error TS2322: node_modules/chrome-devtools-frontend/front_end/Runtime.js(280,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(283,12): error TS2554: Expected 2-3 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/Runtime.js(525,9): error TS2322: Type 'Window' is not assignable to type 'Window & typeof globalThis'. - Type 'Window' is missing the following properties from type 'typeof globalThis': globalThis, eval, parseInt, parseFloat, and 872 more. + Type 'Window' is missing the following properties from type 'typeof globalThis': globalThis, eval, parseInt, parseFloat, and 871 more. node_modules/chrome-devtools-frontend/front_end/Runtime.js(527,49): error TS2352: Conversion of type 'Window & typeof globalThis' to type 'new () => any' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Type 'Window & typeof globalThis' provides no match for the signature 'new (): any'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(539,24): error TS2351: This expression is not constructable. @@ -37,6 +37,7 @@ node_modules/chrome-devtools-frontend/front_end/Tests.js(440,10): error TS2554: node_modules/chrome-devtools-frontend/front_end/Tests.js(475,10): error TS2554: Expected 4 arguments, but got 3. node_modules/chrome-devtools-frontend/front_end/Tests.js(571,33): error TS2339: Property 'deprecatedRunAfterPendingDispatches' does not exist on type 'typeof InspectorBackend'. node_modules/chrome-devtools-frontend/front_end/Tests.js(590,57): error TS2554: Expected 0 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/Tests.js(591,21): error TS2339: Property '_target' does not exist on type 'DeviceModeModel'. node_modules/chrome-devtools-frontend/front_end/Tests.js(619,44): error TS2339: Property 'emulationAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/Tests.js(666,38): error TS2339: Property 'inputAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/Tests.js(668,38): error TS2339: Property 'inputAgent' does not exist on type 'Target'. @@ -503,6 +504,8 @@ node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(950,47): node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(952,19): error TS2304: Cannot find name 'DOM'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(954,32): error TS2304: Cannot find name 'CategoryRenderer'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(955,60): error TS2554: Expected 0 arguments, but got 2. +node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(962,14): error TS2339: Property 'setTemplateContext' does not exist on type 'ReportRenderer'. +node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(963,14): error TS2339: Property 'renderReport' does not exist on type 'ReportRenderer'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(967,41): error TS2304: Cannot find name 'DetailsRenderer'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(969,15): error TS2304: Cannot find name 'DOM'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(978,15): error TS2503: Cannot find namespace 'DetailsRenderer'. @@ -680,6 +683,7 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighth Type 'number' is not assignable to type 'void'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19744,7): error TS2339: Property 'expected' does not exist on type 'Error'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(20005,8): error TS2339: Property 'runLighthouseForConnection' does not exist on type 'Window & typeof globalThis'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(20015,15): error TS2554: Expected 0 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(20035,8): error TS2339: Property 'runLighthouseInWorker' does not exist on type 'Window & typeof globalThis'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(20039,15): error TS2339: Property 'runLighthouseForConnection' does not exist on type 'Window & typeof globalThis'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(20046,8): error TS2339: Property 'getDefaultCategories' does not exist on type 'Window & typeof globalThis'. @@ -3057,6 +3061,7 @@ node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(60 Type 'T' is not assignable to type 'DebuggerModel'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(97,56): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. +node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(97,61): error TS2339: Property 'valuesArray' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(122,22): error TS2339: Property 'remove' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(153,44): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. @@ -3113,12 +3118,16 @@ node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js( 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(191,46): error TS2345: Argument of type 'CSSStyleSheetHeader' is not assignable to parameter of type 'K'. 'CSSStyleSheetHeader' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. +node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(192,16): error TS2339: Property 'update' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(204,16): error TS2339: Property '_header' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(205,27): error TS2345: Argument of type 'CSSStyleSheetHeader' is not assignable to parameter of type 'K'. 'CSSStyleSheetHeader' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(206,16): error TS2339: Property 'update' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(216,46): error TS2345: Argument of type 'CSSStyleSheetHeader' is not assignable to parameter of type 'K'. 'CSSStyleSheetHeader' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. +node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(217,16): error TS2339: Property '_header' does not exist on type 'V'. +node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(218,43): error TS2339: Property '_url' does not exist on type 'V'. +node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(219,16): error TS2339: Property 'update' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(221,31): error TS2345: Argument of type 'CSSStyleSheetHeader' is not assignable to parameter of type 'K'. 'CSSStyleSheetHeader' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(261,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. @@ -3145,6 +3154,7 @@ node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBindin 'Script' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(292,46): error TS2345: Argument of type 'Script' is not assignable to parameter of type 'K'. 'Script' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. +node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(293,16): error TS2339: Property 'update' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(349,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(389,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(452,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. @@ -3201,6 +3211,7 @@ node_modules/chrome-devtools-frontend/front_end/bindings/TempFile.js(176,25): er node_modules/chrome-devtools-frontend/front_end/bindings_test_runner/AutomappingTestRunner.js(48,26): error TS2554: Expected 5 arguments, but got 4. node_modules/chrome-devtools-frontend/front_end/bindings_test_runner/AutomappingTestRunner.js(71,80): error TS2345: Argument of type 'Promise' is not assignable to parameter of type '() => Promise'. Type 'Promise' provides no match for the signature '(): Promise'. +node_modules/chrome-devtools-frontend/front_end/bindings_test_runner/AutomappingTestRunner.js(77,28): error TS2554: Expected 4 arguments, but got 3. node_modules/chrome-devtools-frontend/front_end/bindings_test_runner/AutomappingTestRunner.js(82,41): error TS2339: Property '_stabilizedCallback' does not exist on type 'AutomappingTest'. node_modules/chrome-devtools-frontend/front_end/bindings_test_runner/AutomappingTestRunner.js(108,15): error TS2339: Property '_stabilizedCallback' does not exist on type 'AutomappingTest'. node_modules/chrome-devtools-frontend/front_end/bindings_test_runner/AutomappingTestRunner.js(116,27): error TS2339: Property '_stabilizedCallback' does not exist on type 'AutomappingTest'. @@ -3767,10 +3778,6 @@ node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(504,31): node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(505,28): error TS2339: Property '_linkHandlerSettingInstance' does not exist on type 'typeof Linkifier'. node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(506,67): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(508,33): error TS2339: Property '_linkHandlerSettingInstance' does not exist on type 'typeof Linkifier'. -node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(564,9): error TS2322: Type '({ section: string; title: any; handler: () => void; } | { section: string; title: string; handler: any; })[]' is not assignable to type '{ title: string; handler: () => any; }[]'. - Type '{ section: string; title: any; handler: () => void; } | { section: string; title: string; handler: any; }' is not assignable to type '{ title: string; handler: () => any; }'. - Type '{ section: string; title: any; handler: () => void; }' is not assignable to type '{ title: string; handler: () => any; }'. - Object literal may only specify known properties, and 'section' does not exist in type '{ title: string; handler: () => any; }'. node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(565,23): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(572,23): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(580,23): error TS2555: Expected at least 2 arguments, but got 1. @@ -4043,12 +4050,14 @@ node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(21 node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(211,26): error TS2339: Property 'title' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(212,22): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(215,30): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(222,15): error TS2403: Subsequent variable declarations must have the same type. Variable 'args' must be of type 'any[]', but here has type 'any[]'. +node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(222,15): error TS2403: Subsequent variable declarations must have the same type. Variable 'args' must be of type 'string[]', but here has type 'any[]'. +node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(233,15): error TS2403: Subsequent variable declarations must have the same type. Variable 'args' must be of type 'string[]', but here has type 'any[]'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(241,26): error TS2339: Property 'createTextChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(244,28): error TS2339: Property 'createTextChildren' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(244,60): error TS2339: Property 'localizedFailDescription' does not exist on type 'NetworkRequest'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(246,28): error TS2339: Property 'createTextChildren' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(249,34): error TS2339: Property 'ConsoleViewMessage' does not exist on type '{ new (): Console; prototype: Console; }'. +node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(267,11): error TS2403: Subsequent variable declarations must have the same type. Variable 'args' must be of type 'string[]', but here has type 'any[]'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(304,62): error TS2345: Argument of type '{ maxLength: any; }' is not assignable to parameter of type '{ text: string; className: string; lineNumber: number; columnNumber: number; preventClick: boolean; maxLength: number; }'. Type '{ maxLength: any; }' is missing the following properties from type '{ text: string; className: string; lineNumber: number; columnNumber: number; preventClick: boolean; maxLength: number; }': text, className, lineNumber, columnNumber, preventClick node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(304,82): error TS2339: Property 'ConsoleViewMessage' does not exist on type '{ new (): Console; prototype: Console; }'. @@ -4313,6 +4322,8 @@ node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(470 node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(489,56): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageDecorationManager.js(50,72): error TS2345: Argument of type 'ContentProvider' is not assignable to parameter of type 'K'. 'ContentProvider' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. +node_modules/chrome-devtools-frontend/front_end/coverage/CoverageDecorationManager.js(51,22): error TS2339: Property 'removeDecorationsForType' does not exist on type 'V'. +node_modules/chrome-devtools-frontend/front_end/coverage/CoverageDecorationManager.js(52,22): error TS2339: Property 'addLineDecoration' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageDecorationManager.js(115,49): error TS2345: Argument of type 'ContentProvider' is not assignable to parameter of type 'K'. 'ContentProvider' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageDecorationManager.js(169,16): error TS2403: Subsequent variable declarations must have the same type. Variable 'location' must be of type 'Location', but here has type 'CSSLocation'. @@ -4329,9 +4340,9 @@ node_modules/chrome-devtools-frontend/front_end/coverage/CoverageListView.js(18, node_modules/chrome-devtools-frontend/front_end/coverage/CoverageListView.js(19,34): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageListView.js(21,23): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageListView.js(29,23): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/coverage/CoverageListView.js(38,52): error TS2345: Argument of type '({ id: string; title: any; width: string; fixedWidth: boolean; sortable: boolean; align?: undefined; sort?: undefined; } | { id: string; title: any; width: string; fixedWidth: boolean; sortable: boolean; align: string; sort?: undefined; } | { ...; })[]' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }[]'. - Type '{ id: string; title: any; width: string; fixedWidth: boolean; sortable: boolean; align?: undefined; sort?: undefined; } | { id: string; title: any; width: string; fixedWidth: boolean; sortable: boolean; align: string; sort?: undefined; } | { ...; }' is not assignable to type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. - Type '{ id: string; title: any; width: string; fixedWidth: boolean; sortable: boolean; align?: undefined; sort?: undefined; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }': titleDOMFragment, editable, nonSelectable, longText, and 2 more. +node_modules/chrome-devtools-frontend/front_end/coverage/CoverageListView.js(38,52): error TS2345: Argument of type '({ id: string; title: string; width: string; fixedWidth: boolean; sortable: boolean; align?: undefined; sort?: undefined; } | { id: string; title: string; width: string; fixedWidth: boolean; sortable: boolean; align: string; sort?: undefined; } | { ...; })[]' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }[]'. + Type '{ id: string; title: string; width: string; fixedWidth: boolean; sortable: boolean; align?: undefined; sort?: undefined; } | { id: string; title: string; width: string; fixedWidth: boolean; sortable: boolean; align: string; sort?: undefined; } | { ...; }' is not assignable to type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. + Type '{ id: string; title: string; width: string; fixedWidth: boolean; sortable: boolean; align?: undefined; sort?: undefined; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }': titleDOMFragment, editable, nonSelectable, longText, and 2 more. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageListView.js(112,11): error TS2339: Property 'consume' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageListView.js(206,25): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageListView.js(208,25): error TS2555: Expected at least 2 arguments, but got 1. @@ -4567,6 +4578,7 @@ node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1722,13): node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1736,37): error TS2339: Property 'children' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1741,33): error TS2339: Property 'children' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1756,24): error TS2339: Property 'revealed' does not exist on type 'NODE_TYPE'. +node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1764,7): error TS2322: Type 'NODE_TYPE' is not assignable to type 'this'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1764,43): error TS2345: Argument of type 'this' is not assignable to parameter of type 'NODE_TYPE'. 'this' is assignable to the constraint of type 'NODE_TYPE', but 'NODE_TYPE' could be instantiated with a different subtype of constraint '{}'. Type 'DataGridNode' is not assignable to type 'NODE_TYPE'. @@ -4575,6 +4587,7 @@ node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1779,26): node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1784,26): error TS2339: Property '_detach' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1792,19): error TS2339: Property 'revealed' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1793,17): error TS2339: Property '_attach' does not exist on type 'NODE_TYPE'. +node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1810,7): error TS2322: Type 'NODE_TYPE' is not assignable to type 'this'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1810,43): error TS2345: Argument of type 'this' is not assignable to parameter of type 'NODE_TYPE'. 'this' is assignable to the constraint of type 'NODE_TYPE', but 'NODE_TYPE' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1818,48): error TS2339: Property '_isRoot' does not exist on type 'NODE_TYPE'. @@ -5061,6 +5074,7 @@ node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js( Types of parameters 'onfulfilled' and 'onfulfilled' are incompatible. Types of parameters 'value' and 'value' are incompatible. Property 'computedStyle' is missing in type 'CSSMatchedStyles' but required in type 'ComputedStyle'. +node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js(91,34): error TS2339: Property 'spread' does not exist on type 'Promise<[any, any, any, any, any, any, any, any, any, any]>'. node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js(147,52): error TS2339: Property 'keysArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js(179,50): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js(200,74): error TS2339: Property 'consume' does not exist on type 'Event'. @@ -5931,6 +5945,7 @@ node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(47 node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(542,14): error TS2339: Property '_extensionOrigin' does not exist on type 'MessagePort'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(570,9): error TS2345: Argument of type '{ key: any; code: any; keyCode: any; location: any; ctrlKey: any; altKey: any; shiftKey: any; metaKey: any; }' is not assignable to parameter of type 'KeyboardEventInit'. Object literal may only specify known properties, and 'keyCode' does not exist in type 'KeyboardEventInit'. +node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(577,13): error TS2551: Property '__keyCode' does not exist on type 'KeyboardEvent'. Did you mean 'keyCode'? node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(599,76): error TS2345: Argument of type 'symbol' is not assignable to parameter of type 'string'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(603,9): error TS2345: Argument of type 'symbol' is not assignable to parameter of type 'string'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(649,10): error TS2555: Expected at least 2 arguments, but got 1. @@ -7066,56 +7081,56 @@ node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(531,31): error TS2339: Property 'enclosingNodeOrSelfWithClass' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(645,19): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(646,22): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(651,5): error TS2322: Type '{ id: string; title: any; subtitle: any; visible: true; weight: number; hideable: false; nonSelectable: false; alwaysVisible: boolean; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is not assignable to type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }'. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(651,5): error TS2322: Type '{ id: string; title: string; subtitle: string; visible: true; weight: number; hideable: false; nonSelectable: false; alwaysVisible: boolean; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is not assignable to type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }'. Object literal may only specify known properties, and 'alwaysVisible' does not exist in type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }'. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(654,3): error TS2740: Type '{ id: string; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(654,3): error TS2740: Type '{ id: string; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(656,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(659,3): error TS2740: Type '{ id: string; title: any; visible: true; subtitle: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, weight, hideable, nonSelectable, and 4 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(659,3): error TS2740: Type '{ id: string; title: string; visible: true; subtitle: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, weight, hideable, nonSelectable, and 4 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(661,19): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(663,22): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(666,3): error TS2740: Type '{ id: string; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(666,3): error TS2740: Type '{ id: string; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(668,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(671,3): error TS2740: Type '{ id: string; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(671,3): error TS2740: Type '{ id: string; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(673,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(676,3): error TS2740: Type '{ id: string; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(676,3): error TS2740: Type '{ id: string; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(678,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(681,3): error TS2740: Type '{ id: string; title: any; weight: number; align: string; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, hideable, and 4 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(681,3): error TS2740: Type '{ id: string; title: string; weight: number; align: string; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, hideable, and 4 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(683,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(688,3): error TS2740: Type '{ id: string; title: any; visible: true; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, weight, hideable, and 5 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(688,3): error TS2740: Type '{ id: string; title: string; visible: true; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, weight, hideable, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(690,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(694,3): error TS2740: Type '{ id: string; title: any; visible: true; weight: number; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, hideable, nonSelectable, and 4 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(694,3): error TS2740: Type '{ id: string; title: string; visible: true; weight: number; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, hideable, nonSelectable, and 4 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(696,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(701,3): error TS2740: Type '{ id: string; title: any; align: string; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(701,3): error TS2740: Type '{ id: string; title: string; align: string; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(703,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(707,3): error TS2740: Type '{ id: string; title: any; align: string; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(707,3): error TS2740: Type '{ id: string; title: string; align: string; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(709,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(713,3): error TS2740: Type '{ id: string; title: any; visible: true; subtitle: any; align: string; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, weight, hideable, nonSelectable, and 3 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(713,3): error TS2740: Type '{ id: string; title: string; visible: true; subtitle: string; align: string; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, weight, hideable, nonSelectable, and 3 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(715,19): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(717,22): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(721,3): error TS2740: Type '{ id: string; title: any; visible: true; subtitle: any; align: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, weight, hideable, nonSelectable, and 3 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(721,3): error TS2740: Type '{ id: string; title: string; visible: true; subtitle: string; align: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, weight, hideable, nonSelectable, and 3 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(723,19): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(725,22): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(729,3): error TS2740: Type '{ id: string; title: any; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(729,3): error TS2740: Type '{ id: string; title: string; sortingFunction: (a: NetworkNode, b: NetworkNode) => number; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(731,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(734,3): error TS2740: Type '{ id: string; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(734,3): error TS2740: Type '{ id: string; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 6 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(736,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(739,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(739,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(742,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(745,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(745,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(748,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(751,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(751,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(754,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(757,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: any; align: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 4 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(757,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: string; align: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 4 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(760,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(764,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(764,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(767,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(770,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(770,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(773,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(776,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(776,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(779,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(782,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(782,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(785,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(788,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: any; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(788,3): error TS2740: Type '{ id: string; isResponseHeader: true; title: string; sortingFunction: any; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, visible, weight, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(791,19): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogViewColumns.js(795,3): error TS2740: Type '{ id: string; title: string; visible: false; hideable: false; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; subtitle: string; visible: boolean; weight: number; hideable: boolean; nonSelectable: boolean; sortable: boolean; align: string; isResponseHeader: boolean; sortingFunction: (arg0: NetworkNode, arg1: NetworkNode) => number; isCustomHeader: boolean; }': titleDOMFragment, subtitle, weight, nonSelectable, and 5 more. node_modules/chrome-devtools-frontend/front_end/network/NetworkManageCustomHeadersView.js(22,25): error TS2339: Property 'createChild' does not exist on type 'Element'. @@ -7288,11 +7303,11 @@ node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameVi node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(100,53): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(111,39): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(158,58): error TS2339: Property 'value' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(230,3): error TS2741: Property 'title' is missing in type '{ name: string; label: any; }' but required in type '{ name: string; label: string; title: string; }'. +node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(230,3): error TS2741: Property 'title' is missing in type '{ name: string; label: string; }' but required in type '{ name: string; label: string; title: string; }'. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(230,31): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(231,3): error TS2741: Property 'title' is missing in type '{ name: string; label: any; }' but required in type '{ name: string; label: string; title: string; }'. +node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(231,3): error TS2741: Property 'title' is missing in type '{ name: string; label: string; }' but required in type '{ name: string; label: string; title: string; }'. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(231,32): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(232,3): error TS2741: Property 'title' is missing in type '{ name: string; label: any; }' but required in type '{ name: string; label: string; title: string; }'. +node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(232,3): error TS2741: Property 'title' is missing in type '{ name: string; label: string; }' but required in type '{ name: string; label: string; title: string; }'. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(232,35): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(250,14): error TS2339: Property 'createTextChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(251,14): error TS2339: Property 'title' does not exist on type 'Element'. @@ -7749,6 +7764,8 @@ node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystem.j node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystem.js(267,17): error TS2304: Cannot find name 'FileEntry'. node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystem.js(278,17): error TS2304: Cannot find name 'FileError'. node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystem.js(317,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. +node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystem.js(344,16): error TS2345: Argument of type 'string | ArrayBuffer' is not assignable to parameter of type 'string'. + Type 'ArrayBuffer' is not assignable to type 'string'. node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystem.js(344,31): error TS2345: Argument of type 'string | ArrayBuffer' is not assignable to parameter of type 'string'. Type 'ArrayBuffer' is not assignable to type 'string'. node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystem.js(357,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. @@ -7800,6 +7817,7 @@ node_modules/chrome-devtools-frontend/front_end/persistence/Persistence.js(341,5 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/persistence/Persistence.js(343,74): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. +node_modules/chrome-devtools-frontend/front_end/persistence/Persistence.js(345,16): error TS2339: Property 'call' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/persistence/PersistenceActions.js(30,51): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/persistence/PersistenceActions.js(34,16): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/persistence/PersistenceActions.js(39,51): error TS2555: Expected at least 2 arguments, but got 1. @@ -8431,8 +8449,6 @@ node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(131, node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(133,15): error TS2339: Property '_populated' does not exist on type 'ProfileDataGridNode | ProfileDataGridTree'. Property '_populated' does not exist on type 'ProfileDataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(135,15): error TS2339: Property 'populateChildren' does not exist on type 'ProfileDataGridNode | ProfileDataGridTree'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(140,17): error TS2349: This expression is not callable. - Each member of the union type '((comparator: (arg0: T, arg1: T) => any, force: boolean) => any) | ((comparator: (arg0: T, arg1: T) => any, force: boolean) => void)' has signatures, but none of those signatures are compatible with each other. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(153,49): error TS2339: Property '_searchMatchedSelfColumn' does not exist on type 'ProfileDataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(158,49): error TS2339: Property '_searchMatchedTotalColumn' does not exist on type 'ProfileDataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(163,49): error TS2339: Property '_searchMatchedFunctionColumn' does not exist on type 'ProfileDataGridNode'. @@ -8488,8 +8504,8 @@ node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(20,7): e Object literal may only specify known properties, and 'width' does not exist in type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(25,67): error TS2345: Argument of type '{ id: string; title: string; width: string; fixedWidth: true; sortable: true; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. Object literal may only specify known properties, and 'width' does not exist in type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(26,18): error TS2345: Argument of type '{ id: string; title: any; disclosure: true; sortable: true; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. - Type '{ id: string; title: any; disclosure: true; sortable: true; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }': titleDOMFragment, sort, align, fixedWidth, and 4 more. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(26,18): error TS2345: Argument of type '{ id: string; title: string; disclosure: true; sortable: true; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. + Type '{ id: string; title: string; disclosure: true; sortable: true; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }': titleDOMFragment, sort, align, fixedWidth, and 4 more. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(26,49): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(35,52): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(39,54): error TS2555: Expected at least 2 arguments, but got 1. @@ -8813,7 +8829,7 @@ node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(125, node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(128,67): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(130,40): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(148,47): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(148,79): error TS2345: Argument of type '{ id: string; title: any; sortable: false; width: string; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. +node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(148,79): error TS2345: Argument of type '{ id: string; title: string; sortable: false; width: string; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. Object literal may only specify known properties, and 'width' does not exist in type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(150,9): error TS2345: Argument of type '{ id: string; titleDOMFragment: DocumentFragment; sortable: false; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. Type '{ id: string; titleDOMFragment: DocumentFragment; sortable: false; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }': title, sort, align, fixedWidth, and 5 more. @@ -8821,8 +8837,8 @@ node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(150, node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(152,20): error TS2345: Argument of type '{ id: string; titleDOMFragment: DocumentFragment; sortable: false; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. Type '{ id: string; titleDOMFragment: DocumentFragment; sortable: false; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }': title, sort, align, fixedWidth, and 5 more. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(154,64): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(158,18): error TS2345: Argument of type '{ id: string; title: any; sortable: false; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. - Type '{ id: string; title: any; sortable: false; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }': titleDOMFragment, sort, align, fixedWidth, and 5 more. +node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(158,18): error TS2345: Argument of type '{ id: string; title: string; sortable: false; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. + Type '{ id: string; title: string; sortable: false; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }': titleDOMFragment, sort, align, fixedWidth, and 5 more. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(158,46): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(174,29): error TS2339: Property 'createTextChild' does not exist on type 'DocumentFragment'. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(178,29): error TS2339: Property 'createTextChild' does not exist on type 'DocumentFragment'. @@ -8893,6 +8909,8 @@ node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js( node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(324,12): error TS2339: Property 'type' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(329,54): error TS2345: Argument of type '{ lineNumbers: boolean; lineWrapping: boolean; autoHeight: boolean; padBottom: boolean; mimeType: string; }' is not assignable to parameter of type '{ bracketMatchingSetting: Setting; lineNumbers: boolean; lineWrapping: boolean; mimeType: string; autoHeight: boolean; padBottom: boolean; maxHighlightLength: number; placeholder: string; }'. Type '{ lineNumbers: boolean; lineWrapping: boolean; autoHeight: boolean; padBottom: boolean; mimeType: string; }' is missing the following properties from type '{ bracketMatchingSetting: Setting; lineNumbers: boolean; lineWrapping: boolean; mimeType: string; autoHeight: boolean; padBottom: boolean; maxHighlightLength: number; placeholder: string; }': bracketMatchingSetting, maxHighlightLength, placeholder +node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(332,13): error TS2339: Property 'key' does not exist on type 'Event'. +node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(333,11): error TS2339: Property 'consume' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(343,66): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(344,21): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(346,45): error TS2555: Expected at least 2 arguments, but got 1. @@ -9857,8 +9875,10 @@ node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(85,41): 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(86,46): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. +node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(86,63): error TS2339: Property 'valuesArray' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(87,51): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. +node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(87,68): error TS2339: Property 'valuesArray' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(141,49): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(146,44): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. @@ -10482,6 +10502,8 @@ node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(194,22) node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(212,22): error TS2339: Property 'updateTitle' does not exist on type 'NavigatorTreeNode'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(283,55): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. +node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(283,88): error TS2339: Property 'frame' does not exist on type 'V'. +node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(284,34): error TS2345: Argument of type 'V' is not assignable to parameter of type 'NavigatorUISourceCodeTreeNode'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(336,33): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(388,58): error TS2339: Property 'reverse' does not exist on type 'string'. @@ -10652,6 +10674,7 @@ node_modules/chrome-devtools-frontend/front_end/sources/SourcesSearchScope.js(16 node_modules/chrome-devtools-frontend/front_end/sources/SourcesSearchScope.js(183,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/sources/SourcesSearchScope.js(257,29): error TS2339: Property 'mergeOrdered' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesView.js(38,50): error TS2339: Property 'createChild' does not exist on type 'Element'. +node_modules/chrome-devtools-frontend/front_end/sources/SourcesView.js(83,7): error TS2322: Type 'string' is not assignable to type 'boolean'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesView.js(83,34): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/SourcesView.js(101,56): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/SourcesView.js(102,58): error TS2555: Expected at least 2 arguments, but got 1. @@ -10783,6 +10806,7 @@ node_modules/chrome-devtools-frontend/front_end/sources_test_runner/BreakpointMa node_modules/chrome-devtools-frontend/front_end/sources_test_runner/BreakpointManagerTestRunner.js(257,10): error TS2304: Cannot find name 'uiSourceCode'. node_modules/chrome-devtools-frontend/front_end/sources_test_runner/BreakpointManagerTestRunner.js(317,7): error TS2345: Argument of type '{ get: () => any; set: (breakpoints: any) => void; }' is not assignable to parameter of type 'Setting'. Type '{ get: () => any; set: (breakpoints: any) => void; }' is missing the following properties from type 'Setting': _settings, _name, _defaultValue, _eventSupport, and 15 more. +node_modules/chrome-devtools-frontend/front_end/sources_test_runner/BreakpointManagerTestRunner.js(318,21): error TS2339: Property 'defaultMapping' does not exist on type 'BreakpointManager'. node_modules/chrome-devtools-frontend/front_end/sources_test_runner/BreakpointManagerTestRunner.js(333,12): error TS2339: Property 'setBreakpointCallback' does not exist on type 'Window & typeof globalThis'. node_modules/chrome-devtools-frontend/front_end/sources_test_runner/DebuggerTestRunner.js(125,28): error TS2339: Property 'sprintf' does not exist on type 'StringConstructor'. node_modules/chrome-devtools-frontend/front_end/sources_test_runner/DebuggerTestRunner.js(170,17): error TS2339: Property 'sources' does not exist on type 'any[]'. @@ -11009,6 +11033,9 @@ node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(856,13): error TS2339: Property 'style' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(863,27): error TS2345: Argument of type 'number' is not assignable to parameter of type 'K'. 'number' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. +node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(863,47): error TS2345: Argument of type '(decoration: { element: Element; widget: LineWidget; update: () => any; }) => void' is not assignable to parameter of type '(value: V, value2: V, set: Set) => void'. + Types of parameters 'decoration' and 'value' are incompatible. + Type 'V' is not assignable to type '{ element: Element; widget: LineWidget; update: () => any; }'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(879,27): error TS2345: Argument of type 'number' is not assignable to parameter of type 'K'. 'number' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(889,32): error TS2345: Argument of type 'number' is not assignable to parameter of type 'K'. @@ -11126,7 +11153,7 @@ node_modules/chrome-devtools-frontend/front_end/timeline/CountersGraph.js(438,24 node_modules/chrome-devtools-frontend/front_end/timeline/CountersGraph.js(563,19): error TS2339: Property 'preciseMillisToString' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(63,32): error TS2339: Property 'peekLast' does not exist on type 'IterableIterator[]'. node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(95,41): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(95,65): error TS2345: Argument of type '{ id: string; title: any; width: string; fixedWidth: true; sortable: true; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. +node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(95,65): error TS2345: Argument of type '{ id: string; title: string; width: string; fixedWidth: true; sortable: true; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. Object literal may only specify known properties, and 'width' does not exist in type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(97,54): error TS2339: Property 'width' does not exist on type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(158,80): error TS2555: Expected at least 2 arguments, but got 1. @@ -11270,7 +11297,7 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartNetwo node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartNetworkDataProvider.js(309,87): error TS2339: Property 'millisToString' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartNetworkDataProvider.js(313,69): error TS2694: Namespace 'Protocol' has no exported member 'Network'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartNetworkDataProvider.js(360,56): error TS2339: Property 'peekLast' does not exist on type 'number[]'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartNetworkDataProvider.js(372,10): error TS2322: Type '{ startLevel: number; name: any; expanded: boolean; style: { padding: number; height: number; collapsible: boolean; color: string; font: string; backgroundColor: string; nestingLevel: number; useFirstLineForOverview: boolean; useDecoratorsForOverview: boolean; shareHeaderLine: boolean; }; }' is not assignable to type '{ name: string; startLevel: number; expanded: boolean; style: { height: number; padding: number; collapsible: boolean; font: string; color: string; backgroundColor: string; nestingLevel: number; itemsHeight: number; shareHeaderLine: boolean; useFirstLineForOverview: boolean; useDecoratorsForOverview: boolean; }; }'. +node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartNetworkDataProvider.js(372,10): error TS2322: Type '{ startLevel: number; name: string; expanded: boolean; style: { padding: number; height: number; collapsible: boolean; color: string; font: string; backgroundColor: string; nestingLevel: number; useFirstLineForOverview: boolean; useDecoratorsForOverview: boolean; shareHeaderLine: boolean; }; }' is not assignable to type '{ name: string; startLevel: number; expanded: boolean; style: { height: number; padding: number; collapsible: boolean; font: string; color: string; backgroundColor: string; nestingLevel: number; itemsHeight: number; shareHeaderLine: boolean; useFirstLineForOverview: boolean; useDecoratorsForOverview: boolean; }; }'. Types of property 'style' are incompatible. Property 'itemsHeight' is missing in type '{ padding: number; height: number; collapsible: boolean; color: string; font: string; backgroundColor: string; nestingLevel: number; useFirstLineForOverview: boolean; useDecoratorsForOverview: boolean; shareHeaderLine: boolean; }' but required in type '{ height: number; padding: number; collapsible: boolean; font: string; color: string; backgroundColor: string; nestingLevel: number; itemsHeight: number; shareHeaderLine: boolean; useFirstLineForOverview: boolean; useDecoratorsForOverview: boolean; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartNetworkDataProvider.js(391,64): error TS2339: Property 'constrain' does not exist on type 'NumberConstructor'. @@ -11301,6 +11328,7 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelineHistoryManager. Type 'T' is not assignable to type 'PerformanceModel'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineHistoryManager.js(289,17): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineHistoryManager.js(319,48): error TS2339: Property 'boxInWindow' does not exist on type 'Element'. +node_modules/chrome-devtools-frontend/front_end/timeline/TimelineHistoryManager.js(321,31): error TS2339: Property 'focus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineHistoryManager.js(331,29): error TS2339: Property 'enclosingNodeOrSelfWithClass' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineHistoryManager.js(342,23): error TS2339: Property 'enclosingNodeOrSelfWithClass' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineHistoryManager.js(351,19): error TS2339: Property 'key' does not exist on type 'Event'. @@ -11380,13 +11408,13 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(134 node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(162,76): error TS2339: Property 'value' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(173,59): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(289,45): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(289,68): error TS2345: Argument of type '{ id: string; title: any; width: string; fixedWidth: true; sortable: true; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. +node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(289,68): error TS2345: Argument of type '{ id: string; title: string; width: string; fixedWidth: true; sortable: true; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. Object literal may only specify known properties, and 'width' does not exist in type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(290,46): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(290,70): error TS2345: Argument of type '{ id: string; title: any; width: string; fixedWidth: true; sortable: true; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. +node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(290,70): error TS2345: Argument of type '{ id: string; title: string; width: string; fixedWidth: true; sortable: true; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. Object literal may only specify known properties, and 'width' does not exist in type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(291,18): error TS2345: Argument of type '{ id: string; title: any; disclosure: true; sortable: true; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. - Type '{ id: string; title: any; disclosure: true; sortable: true; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }': titleDOMFragment, sort, align, fixedWidth, and 4 more. +node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(291,18): error TS2345: Argument of type '{ id: string; title: string; disclosure: true; sortable: true; }' is not assignable to parameter of type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }'. + Type '{ id: string; title: string; disclosure: true; sortable: true; }' is missing the following properties from type '{ id: string; title: string; titleDOMFragment: DocumentFragment; sortable: boolean; sort: string; align: string; fixedWidth: boolean; editable: boolean; nonSelectable: boolean; longText: boolean; disclosure: boolean; weight: number; }': titleDOMFragment, sort, align, fixedWidth, and 4 more. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(291,49): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(372,31): error TS2339: Property 'removeChildren' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(375,44): error TS2339: Property 'createChild' does not exist on type 'Element'. @@ -11401,8 +11429,7 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(712 node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(717,9): error TS2741: Property 'icon' is missing in type '{ name: string; color: string; }' but required in type '{ name: string; color: string; icon: Element; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(727,9): error TS2741: Property 'icon' is missing in type '{ name: string; color: string; }' but required in type '{ name: string; color: string; icon: Element; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(731,20): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(733,9): error TS2741: Property 'icon' is missing in type '{ name: any; color: string; }' but required in type '{ name: string; color: string; icon: Element; }'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(743,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'name' must be of type 'any', but here has type 'string'. +node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(733,9): error TS2741: Property 'icon' is missing in type '{ name: string; color: string; }' but required in type '{ name: string; color: string; icon: Element; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(753,98): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(754,9): error TS2741: Property 'icon' is missing in type '{ name: any; color: string; }' but required in type '{ name: string; color: string; icon: Element; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(759,5): error TS2741: Property 'icon' is missing in type '{ name: string; color: string; }' but required in type '{ name: string; color: string; icon: Element; }'. @@ -11414,8 +11441,8 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(774 node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(775,22): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(776,22): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(777,22): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(779,61): error TS2345: Argument of type '{ label: any; value: string; }[]' is not assignable to parameter of type '{ value: string; label: string; title: string; default: boolean; }[]'. - Type '{ label: any; value: string; }' is missing the following properties from type '{ value: string; label: string; title: string; default: boolean; }': title, default +node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(779,61): error TS2345: Argument of type '{ label: string; value: string; }[]' is not assignable to parameter of type '{ value: string; label: string; title: string; default: boolean; }[]'. + Type '{ label: string; value: string; }' is missing the following properties from type '{ value: string; label: string; title: string; default: boolean; }': title, default node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(781,84): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(871,25): error TS2339: Property 'asParsedURL' does not exist on type 'string'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(896,25): error TS2339: Property 'asParsedURL' does not exist on type 'string'. @@ -12229,10 +12256,13 @@ node_modules/chrome-devtools-frontend/front_end/ui/SettingsUI.js(119,27): error node_modules/chrome-devtools-frontend/front_end/ui/SettingsUI.js(133,24): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/SettingsUI.js(155,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(26,83): error TS2339: Property 'valuesArray' does not exist on type 'Set'. +node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(34,5): error TS2322: Type 'Set' is not assignable to type 'Set'. + Type 'V' is not assignable to type 'string'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(34,42): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(42,46): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. +node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(42,56): error TS2339: Property 'valuesArray' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(88,15): error TS2339: Property 'consume' does not exist on type 'KeyboardEvent'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(94,15): error TS2339: Property 'consume' does not exist on type 'KeyboardEvent'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(147,39): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. @@ -12873,6 +12903,8 @@ node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(557,33 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(567,5): error TS2322: Type 'V[]' is not assignable to type 'LineMarker[]'. Type 'V' is not assignable to type 'LineMarker'. +node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(584,5): error TS2322: Type 'Set' is not assignable to type 'Set'. + Type 'V' is not assignable to type 'LineMarker'. node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(584,54): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/workspace/Workspace.js(37,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. diff --git a/tests/baselines/reference/user/create-react-app.log b/tests/baselines/reference/user/create-react-app.log index d2ccce82e6a10..3394f11fac602 100644 --- a/tests/baselines/reference/user/create-react-app.log +++ b/tests/baselines/reference/user/create-react-app.log @@ -4,6 +4,8 @@ test/fixtures/issue-5176-flow-class-properties/src/App.js(5,8): error TS8010: Ty test/fixtures/issue-5176-flow-class-properties/src/App.js(5,13): error TS1005: ';' expected. test/fixtures/webpack-message-formatting/src/AppBabel.js(6,8): error TS17008: JSX element 'div' has no corresponding closing tag. test/fixtures/webpack-message-formatting/src/AppBabel.js(8,7): error TS17002: Expected corresponding JSX closing tag for 'span'. +test/fixtures/webpack-message-formatting/src/AppBabel.js(10,3): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? +test/fixtures/webpack-message-formatting/src/AppBabel.js(11,1): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? test/fixtures/webpack-message-formatting/src/AppBabel.js(14,1): error TS1005: ' any' is not assignable to parameter of type 'string | number | Options | undefined'. + Value of type '(er: any) => any' has no properties in common with type 'Options'. Did you mean to call it? node_modules/npm/lib/config.js(135,19): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/config.js(136,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/config.js(137,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. @@ -167,6 +169,8 @@ node_modules/npm/lib/config/core.js(208,24): error TS2339: Property 'list' does node_modules/npm/lib/config/core.js(237,21): error TS2339: Property 'sources' does not exist on type 'Conf'. node_modules/npm/lib/config/core.js(245,17): error TS2339: Property 'emit' does not exist on type 'Conf'. node_modules/npm/lib/config/core.js(279,8): error TS2339: Property '_saving' does not exist on type 'Conf'. +node_modules/npm/lib/config/core.js(288,39): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. + Value of type '(er: any) => any' has no properties in common with type 'Options'. Did you mean to call it? node_modules/npm/lib/config/core.js(307,8): error TS2339: Property 'sources' does not exist on type 'Conf'. node_modules/npm/lib/config/core.js(308,8): error TS2339: Property 'push' does not exist on type 'Conf'. node_modules/npm/lib/config/core.js(309,8): error TS2339: Property '_await' does not exist on type 'Conf'. @@ -237,6 +241,8 @@ node_modules/npm/lib/config/pacote.js(84,31): error TS2339: Property 'config' do node_modules/npm/lib/config/pacote.js(89,19): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/config/pacote.js(90,38): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/config/pacote.js(110,60): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. +node_modules/npm/lib/config/set-user.js(22,18): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. + Value of type '(er: any) => any' has no properties in common with type 'Options'. Did you mean to call it? node_modules/npm/lib/dedupe.js(35,32): error TS2339: Property 'dir' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/dedupe.js(37,11): error TS2339: Property 'command' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/dedupe.js(38,11): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. @@ -387,6 +393,8 @@ node_modules/npm/lib/install.js(948,8): error TS2454: Variable 'previousPath' is node_modules/npm/lib/install.js(985,53): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/install.js(1007,53): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/install/access-error.js(4,60): error TS2554: Expected 0-1 arguments, but got 2. +node_modules/npm/lib/install/access-error.js(5,12): error TS2339: Property 'code' does not exist on type 'Error'. +node_modules/npm/lib/install/access-error.js(6,12): error TS2339: Property 'path' does not exist on type 'Error'. node_modules/npm/lib/install/action/build.js(10,50): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/install/action/extract.js(39,40): error TS2339: Property 'limit' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/install/action/extract.js(81,9): error TS2322: Type 'string' is not assignable to type 'any[]'. @@ -397,6 +405,8 @@ node_modules/npm/lib/install/action/global-link.js(7,7): error TS2339: Property node_modules/npm/lib/install/action/refresh-package-json.js(31,43): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/install/action/remove.js(25,37): error TS2339: Property 'prefix' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/install/action/remove.js(25,51): error TS2339: Property 'prefix' does not exist on type 'typeof EventEmitter'. +node_modules/npm/lib/install/action/remove.js(55,49): error TS2345: Argument of type '(mkdirEr: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(mkdirEr: any) => void' has no properties in common with type 'Options'. node_modules/npm/lib/install/actions.js(126,24): error TS2339: Property 'limit' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/install/actions.js(168,16): error TS2769: No overload matches this call. The last overload gave the following error. @@ -720,6 +730,8 @@ node_modules/npm/lib/search/all-package-metadata.js(33,30): error TS2339: Proper node_modules/npm/lib/search/all-package-metadata.js(36,35): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/search/all-package-metadata.js(146,7): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/search/all-package-metadata.js(239,20): error TS2339: Property 'cache' does not exist on type 'typeof EventEmitter'. +node_modules/npm/lib/search/all-package-metadata.js(241,22): error TS2345: Argument of type '(er: any, made: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. + Value of type '(er: any, made: any) => any' has no properties in common with type 'Options'. Did you mean to call it? node_modules/npm/lib/search/esearch.js(15,36): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/search/esearch.js(35,7): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/search/format-package-stream.js(130,31): error TS2339: Property 'fd' does not exist on type 'WriteStream'. @@ -788,6 +800,8 @@ node_modules/npm/lib/unpublish.js(97,70): error TS2339: Property 'registry' does node_modules/npm/lib/update.js(10,41): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/update.js(17,25): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/update.js(25,11): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. +node_modules/npm/lib/utils/completion/file-completion.js(11,15): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. + Value of type '(er: any) => any' has no properties in common with type 'Options'. Did you mean to call it? node_modules/npm/lib/utils/completion/installed-deep.js(9,19): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/utils/completion/installed-deep.js(12,11): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/utils/completion/installed-deep.js(16,23): error TS2339: Property 'prefix' does not exist on type 'typeof EventEmitter'. @@ -799,6 +813,12 @@ node_modules/npm/lib/utils/completion/installed-shallow.js(22,11): error TS2339: node_modules/npm/lib/utils/completion/installed-shallow.js(57,28): error TS2339: Property 'dir' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/utils/completion/installed-shallow.js(66,23): error TS2339: Property 'globalDir' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/utils/completion/installed-shallow.js(79,14): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. +node_modules/npm/lib/utils/correct-mkdir.js(74,25): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. + Value of type '(er: any) => any' has no properties in common with type 'Options'. Did you mean to call it? +node_modules/npm/lib/utils/correct-mkdir.js(89,18): error TS2345: Argument of type '(er: any, made: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. + Value of type '(er: any, made: any) => any' has no properties in common with type 'Options'. Did you mean to call it? +node_modules/npm/lib/utils/correct-mkdir.js(103,20): error TS2345: Argument of type '(er: any, made: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. + Value of type '(er: any, made: any) => any' has no properties in common with type 'Options'. Did you mean to call it? node_modules/npm/lib/utils/error-handler.js(12,21): error TS2339: Property 'rollbacks' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/utils/error-handler.js(23,36): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/utils/error-handler.js(29,16): error TS2339: Property 'version' does not exist on type 'typeof EventEmitter'. @@ -1063,6 +1083,8 @@ node_modules/npm/test/tap/404-private-registry.js(1,20): error TS2307: Cannot fi node_modules/npm/test/tap/404-private-registry.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/access.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/access.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/access.js(19,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/add-named-update-protocol-port.js(3,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/add-named-update-protocol-port.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/add-remote-git-file.js(10,20): error TS2307: Cannot find module 'tap'. @@ -1084,6 +1106,8 @@ node_modules/npm/test/tap/adduser-always-auth.js(4,18): error TS2307: Cannot fin node_modules/npm/test/tap/adduser-always-auth.js(6,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/adduser-legacy-auth.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/adduser-legacy-auth.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/adduser-legacy-auth.js(45,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/adduser-oauth.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/adduser-oauth.js(7,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/adduser-saml.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. @@ -1174,6 +1198,7 @@ node_modules/npm/test/tap/config-builtin.js(61,13): error TS2531: Object is poss node_modules/npm/test/tap/config-certfile.js(5,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/config-credentials.js(1,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/config-edit.js(6,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/config-edit.js(27,25): error TS2554: Expected 1-2 arguments, but got 3. node_modules/npm/test/tap/config-envReplace.js(6,22): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/config-list.js(3,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/config-malformed.js(1,20): error TS2307: Cannot find module 'tap'. @@ -1208,6 +1233,8 @@ node_modules/npm/test/tap/deprecate.js(1,18): error TS2307: Cannot find module ' node_modules/npm/test/tap/deprecate.js(3,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/dist-tag.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/dist-tag.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/dist-tag.js(49,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/do-not-remove-other-bins.js(8,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/doctor.js(5,20): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/doctor.js(9,23): error TS2307: Cannot find module 'tacks'. @@ -1491,6 +1518,12 @@ node_modules/npm/test/tap/owner.js(2,20): error TS2307: Cannot find module 'tap' node_modules/npm/test/tap/pack-files-and-ignores.js(2,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/pack-files-and-ignores.js(12,21): error TS2307: Cannot find module 'tacks'. node_modules/npm/test/tap/pack-scoped.js(2,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/pack-scoped.js(24,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. +node_modules/npm/test/tap/pack-scoped.js(25,17): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. +node_modules/npm/test/tap/pack-scoped.js(26,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/pack.js(5,22): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/peer-deps.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/peer-deps.js(8,20): error TS2307: Cannot find module 'tap'. @@ -1514,10 +1547,22 @@ node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(137,11): error node_modules/npm/test/tap/ping.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/ping.js(7,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/prepare.js(3,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/prepare.js(16,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. +node_modules/npm/test/tap/prepare.js(17,17): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. +node_modules/npm/test/tap/prepare.js(18,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/prepublish-only.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/prepublish-only.js(5,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/prepublish-only.js(6,21): error TS2307: Cannot find module 'tacks'. node_modules/npm/test/tap/prepublish.js(3,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/prepublish.js(16,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. +node_modules/npm/test/tap/prepublish.js(17,17): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. +node_modules/npm/test/tap/prepublish.js(18,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '(er: any) => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/process-logger.js(2,22): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/process-logger.js(7,61): error TS2554: Expected 1-3 arguments, but got 4. node_modules/npm/test/tap/process-logger.js(8,37): error TS2769: No overload matches this call. @@ -1543,9 +1588,13 @@ node_modules/npm/test/tap/prune.js(5,18): error TS2307: Cannot find module 'npm- node_modules/npm/test/tap/prune.js(8,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/publish-access-scoped.js(4,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/publish-access-scoped.js(7,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/tap/publish-access-scoped.js(31,35): error TS2345: Argument of type '() => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '() => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/publish-access-unscoped-restricted-fails.js(4,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/publish-access-unscoped.js(4,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/publish-access-unscoped.js(7,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/tap/publish-access-unscoped.js(31,35): error TS2345: Argument of type '() => void' is not assignable to parameter of type 'string | number | Options | undefined'. + Type '() => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/publish-config.js(4,22): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/publish-invalid-semver-tag.js(2,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/publish-invalid-semver-tag.js(8,18): error TS2307: Cannot find module 'npm-registry-mock'. diff --git a/tests/baselines/reference/user/puppeteer.log b/tests/baselines/reference/user/puppeteer.log index 4694668e4349f..16eeeaa6d75de 100644 --- a/tests/baselines/reference/user/puppeteer.log +++ b/tests/baselines/reference/user/puppeteer.log @@ -22,6 +22,7 @@ lib/Coverage.js(208,15): error TS2503: Cannot find namespace 'Protocol'. lib/EmulationManager.js(36,16): error TS2503: Cannot find namespace 'Protocol'. lib/ExecutionContext.js(26,15): error TS2503: Cannot find namespace 'Protocol'. lib/ExecutionContext.js(158,18): error TS2503: Cannot find namespace 'Protocol'. +lib/ExecutionContext.js(186,14): error TS2503: Cannot find namespace 'Protocol'. lib/FrameManager.js(151,15): error TS2503: Cannot find namespace 'Protocol'. lib/FrameManager.js(173,15): error TS2503: Cannot find namespace 'Protocol'. lib/FrameManager.js(230,15): error TS2503: Cannot find namespace 'Protocol'. @@ -42,7 +43,7 @@ lib/NetworkManager.js(295,15): error TS2503: Cannot find namespace 'Protocol'. lib/NetworkManager.js(319,15): error TS2503: Cannot find namespace 'Protocol'. lib/NetworkManager.js(529,15): error TS2503: Cannot find namespace 'Protocol'. lib/NetworkManager.js(668,15): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(94,33): error TS2345: Argument of type 'CDPSession' is not assignable to parameter of type 'Puppeteer.CDPSession'. +lib/Page.js(93,33): error TS2345: Argument of type 'CDPSession' is not assignable to parameter of type 'Puppeteer.CDPSession'. Types of property 'on' are incompatible. Type '(event: string | symbol, listener: (...args: any[]) => void) => CDPSession' is not assignable to type '(event: T, listener: (arg: any) => void) => CDPSession'. Types of parameters 'event' and 'event' are incompatible. @@ -52,24 +53,26 @@ lib/Page.js(94,33): error TS2345: Argument of type 'CDPSession' is not assignabl Type 'T' is not assignable to type 'symbol'. Type 'string | number | symbol' is not assignable to type 'symbol'. Type 'string' is not assignable to type 'symbol'. -lib/Page.js(147,15): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(220,15): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(388,20): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(451,7): error TS2740: Type '(...args: any[]) => Promise' is missing the following properties from type 'Window': applicationCache, clientInformation, closed, customElements, and 222 more. -lib/Page.js(461,9): error TS2349: This expression is not callable. +lib/Page.js(94,42): error TS2345: Argument of type 'Worker' is not assignable to parameter of type 'Worker'. + Type 'Worker' is missing the following properties from type 'Worker': onmessage, postMessage, terminate, addEventListener, and 3 more. +lib/Page.js(142,15): error TS2503: Cannot find namespace 'Protocol'. +lib/Page.js(217,15): error TS2503: Cannot find namespace 'Protocol'. +lib/Page.js(385,20): error TS2503: Cannot find namespace 'Protocol'. +lib/Page.js(448,7): error TS2740: Type '(...args: any[]) => Promise' is missing the following properties from type 'Window': applicationCache, clientInformation, closed, customElements, and 222 more. +lib/Page.js(458,9): error TS2349: This expression is not callable. Type 'Window' has no call signatures. -lib/Page.js(497,15): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(507,22): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(520,15): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(530,15): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(555,15): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(608,14): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(944,19): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(1354,15): error TS2503: Cannot find namespace 'Protocol'. +lib/Page.js(494,15): error TS2503: Cannot find namespace 'Protocol'. +lib/Page.js(504,22): error TS2503: Cannot find namespace 'Protocol'. +lib/Page.js(517,15): error TS2503: Cannot find namespace 'Protocol'. +lib/Page.js(527,15): error TS2503: Cannot find namespace 'Protocol'. +lib/Page.js(552,15): error TS2503: Cannot find namespace 'Protocol'. +lib/Page.js(605,14): error TS2503: Cannot find namespace 'Protocol'. +lib/Page.js(941,19): error TS2503: Cannot find namespace 'Protocol'. +lib/Page.js(1352,15): error TS2503: Cannot find namespace 'Protocol'. lib/Target.js(23,15): error TS2503: Cannot find namespace 'Protocol'. lib/Target.js(87,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. Type 'Worker | Worker' is not assignable to type 'Worker'. - Type 'Worker' is missing the following properties from type 'Worker': onmessage, postMessage, terminate, addEventListener, and 3 more. + Type 'Worker' is not assignable to type 'Worker'. Two different types with this name exist, but they are unrelated. lib/Target.js(135,15): error TS2503: Cannot find namespace 'Protocol'. lib/WebSocketTransport.js(32,72): error TS2345: Argument of type 'import("/puppeteer/puppeteer/node_modules/@types/ws/index")' is not assignable to parameter of type 'WebSocket'. Property 'dispatchEvent' is missing in type 'import("/puppeteer/puppeteer/node_modules/@types/ws/index")' but required in type 'WebSocket'. diff --git a/tests/baselines/reference/user/sift.log b/tests/baselines/reference/user/sift.log deleted file mode 100644 index 198e2fd125bae..0000000000000 --- a/tests/baselines/reference/user/sift.log +++ /dev/null @@ -1,7 +0,0 @@ -Exit Code: 1 -Standard output: -node_modules/sift/index.d.ts(80,15): error TS2307: Cannot find module './core'. - - - -Standard error: diff --git a/tests/baselines/reference/user/uglify-js.log b/tests/baselines/reference/user/uglify-js.log index ba4059e5ed215..c1b96a8130b81 100644 --- a/tests/baselines/reference/user/uglify-js.log +++ b/tests/baselines/reference/user/uglify-js.log @@ -1,90 +1,102 @@ Exit Code: 1 Standard output: -node_modules/uglify-js/lib/ast.js(223,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/ast.js(902,5): error TS2322: Type '{ _visit: (node: any, descend: any) => any; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(220,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/ast.js(899,5): error TS2322: Type '{ _visit: (node: any, descend: any) => any; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'. Object literal may only specify known properties, but '_visit' does not exist in type 'TreeWalker'. Did you mean to write 'visit'? -node_modules/uglify-js/lib/ast.js(903,14): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(910,14): error TS2339: Property 'pop' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(965,25): error TS2339: Property 'self' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(966,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(984,31): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(988,29): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(187,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(535,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(875,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1139,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1155,51): error TS2349: This expression is not callable. +node_modules/uglify-js/lib/ast.js(900,14): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(907,14): error TS2339: Property 'pop' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(962,25): error TS2339: Property 'self' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(963,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(981,31): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(985,29): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(188,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(536,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(876,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(881,12): error TS2339: Property 'defun_ids' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(882,12): error TS2339: Property 'defun_visited' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(884,12): error TS2339: Property 'in_loop' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(885,12): error TS2339: Property 'loop_ids' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(890,12): error TS2339: Property 'safe_ids' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1141,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1156,51): error TS2349: This expression is not callable. Not all constituents of type 'true | ((node: any, tw: any) => any)' are callable. Type 'true' has no call signatures. -node_modules/uglify-js/lib/compress.js(1229,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1250,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1296,112): error TS2454: Variable 'args' is used before being assigned. -node_modules/uglify-js/lib/compress.js(1297,29): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(1315,29): error TS2322: Type 'false' is not assignable to type 'number'. -node_modules/uglify-js/lib/compress.js(1323,29): error TS2322: Type 'false' is not assignable to type 'never'. -node_modules/uglify-js/lib/compress.js(1441,53): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1552,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1576,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1591,46): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1622,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1654,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1670,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1767,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1798,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1920,49): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...never[]]'. +node_modules/uglify-js/lib/compress.js(1230,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1251,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1297,112): error TS2454: Variable 'args' is used before being assigned. +node_modules/uglify-js/lib/compress.js(1298,29): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(1316,29): error TS2322: Type 'false' is not assignable to type 'number'. +node_modules/uglify-js/lib/compress.js(1324,29): error TS2322: Type 'false' is not assignable to type 'never'. +node_modules/uglify-js/lib/compress.js(1469,53): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1580,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1604,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1619,46): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1650,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1682,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1698,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1795,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1826,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1948,49): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...never[]]'. Type 'number[]' is missing the following properties from type '[number, number, ...never[]]': 0, 1 -node_modules/uglify-js/lib/compress.js(2251,59): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2289,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[number, number, ...never[]]'. +node_modules/uglify-js/lib/compress.js(2279,59): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2317,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[number, number, ...never[]]'. Type 'any[]' is missing the following properties from type '[number, number, ...never[]]': 0, 1 -node_modules/uglify-js/lib/compress.js(2437,34): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3206,55): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -node_modules/uglify-js/lib/compress.js(3207,25): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/compress.js(3207,55): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -node_modules/uglify-js/lib/compress.js(3207,56): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/compress.js(3248,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3327,33): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(3734,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3760,29): error TS2322: Type '"f"' is not assignable to type 'boolean'. -node_modules/uglify-js/lib/compress.js(3893,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3946,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3964,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(4079,63): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4209,12): error TS2339: Property 'push' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(4305,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4326,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(4336,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(4421,32): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4660,17): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead. -node_modules/uglify-js/lib/compress.js(4728,45): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4839,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4931,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(4946,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(5057,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(5207,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(5300,37): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(5549,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[string | RegExp, (string | undefined)?]'. +node_modules/uglify-js/lib/compress.js(2465,34): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3252,55): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +node_modules/uglify-js/lib/compress.js(3253,25): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/compress.js(3253,55): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +node_modules/uglify-js/lib/compress.js(3253,56): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/compress.js(3294,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3373,33): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(3780,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3806,29): error TS2322: Type '"f"' is not assignable to type 'boolean'. +node_modules/uglify-js/lib/compress.js(3939,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3940,74): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(3992,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4012,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(4129,63): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4259,12): error TS2339: Property 'push' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(4358,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4379,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(4389,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(4474,32): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4713,17): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead. +node_modules/uglify-js/lib/compress.js(4888,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4890,55): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(4894,56): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(4895,12): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(4980,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(4995,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(5104,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5106,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(5254,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(5347,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5603,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[string | RegExp, (string | undefined)?]'. Property '0' is missing in type 'any[]' but required in type '[string | RegExp, (string | undefined)?]'. -node_modules/uglify-js/lib/compress.js(5713,45): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(5720,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: (half: any) => void; indentation: () => number; current_width: () => number; should_break: () => boolean; has_parens: () => boolean; newline: () => void; print: (str: any) => void; ... 23 more ...; parent: (n: any) => any; }'. -node_modules/uglify-js/lib/compress.js(5724,36): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(5729,41): error TS2339: Property 'get' does not exist on type 'string'. -node_modules/uglify-js/lib/compress.js(6236,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned. -node_modules/uglify-js/lib/compress.js(6860,29): error TS2367: This condition will always return 'false' since the types 'boolean' and 'string' have no overlap. -node_modules/uglify-js/lib/compress.js(6902,47): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6983,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(7055,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(7061,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(7548,43): error TS2454: Variable 'property' is used before being assigned. -node_modules/uglify-js/lib/compress.js(7563,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(7566,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'. -node_modules/uglify-js/lib/compress.js(7572,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(7605,34): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5767,45): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5774,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: (half: any) => void; indentation: () => number; current_width: () => number; should_break: () => boolean; has_parens: () => boolean; newline: () => void; print: (str: any) => void; ... 23 more ...; parent: (n: any) => any; }'. +node_modules/uglify-js/lib/compress.js(5778,36): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(5783,41): error TS2339: Property 'get' does not exist on type 'string'. +node_modules/uglify-js/lib/compress.js(6311,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned. +node_modules/uglify-js/lib/compress.js(6935,29): error TS2367: This condition will always return 'false' since the types 'boolean' and 'string' have no overlap. +node_modules/uglify-js/lib/compress.js(6977,47): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(7058,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(7130,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(7136,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(7139,41): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(7701,43): error TS2454: Variable 'property' is used before being assigned. +node_modules/uglify-js/lib/compress.js(7716,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(7719,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'. +node_modules/uglify-js/lib/compress.js(7725,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(7758,34): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/minify.js(186,75): error TS2339: Property 'compress' does not exist on type 'Compressor'. node_modules/uglify-js/lib/mozilla-ast.js(566,33): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/output.js(459,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(460,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/output.js(475,16): error TS2339: Property 'push' does not exist on type 'TreeWalker'. node_modules/uglify-js/lib/output.js(749,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(1151,44): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(1433,58): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +node_modules/uglify-js/lib/output.js(1153,44): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(1442,58): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. node_modules/uglify-js/lib/parse.js(354,20): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. Type 'undefined' is not assignable to type 'number'. node_modules/uglify-js/lib/parse.js(433,32): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. @@ -120,8 +132,10 @@ node_modules/uglify-js/lib/scope.js(89,21): error TS2339: Property 'defun' does node_modules/uglify-js/lib/scope.js(89,35): error TS2339: Property 'defun' does not exist on type 'SymbolDef'. node_modules/uglify-js/lib/scope.js(103,29): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/scope.js(158,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/scope.js(165,38): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. node_modules/uglify-js/lib/scope.js(193,47): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/scope.js(418,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/scope.js(431,49): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. node_modules/uglify-js/lib/scope.js(486,30): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/scope.js(511,30): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/sourcemap.js(55,25): error TS2304: Cannot find name 'MOZ_SourceMap'. diff --git a/tests/baselines/reference/user/webpack.log b/tests/baselines/reference/user/webpack.log index 244f3088778c4..8832c02484655 100644 --- a/tests/baselines/reference/user/webpack.log +++ b/tests/baselines/reference/user/webpack.log @@ -4,29 +4,13 @@ lib/ContextModule.js(436,34): error TS2341: Property 'moduleGraph' is private an lib/ContextModule.js(465,34): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. lib/ContextModule.js(767,34): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. lib/Dependency.js(139,29): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. -lib/ExternalModule.js(284,54): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. +lib/ExternalModule.js(285,54): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. +lib/FileSystemInfo.js(373,4): error TS2345: Argument of type '({ type, context, path, expected }: { type: any; context: any; path: any; expected: any; }, callback: any) => void' is not assignable to parameter of type 'AsyncFunction<{ type: number; path: string; context?: string; expected?: string; }, Error>'. + Types of parameters '__0' and 'callback' are incompatible. + Type '(err?: Error, result?: { type: number; path: string; context?: string; expected?: string; }) => void' is missing the following properties from type '{ type: any; context: any; path: any; expected: any; }': type, context, path, expected lib/Module.js(625,34): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. -lib/MultiCompiler.js(15,65): error TS2300: Duplicate identifier 'AsyncSeriesHook'. -lib/MultiCompiler.js(16,77): error TS2300: Duplicate identifier 'SyncBailHook'. -lib/MultiCompiler.js(17,70): error TS2300: Duplicate identifier 'WatchOptions'. -lib/MultiCompiler.js(18,37): error TS2300: Duplicate identifier 'Compiler'. -lib/MultiCompiler.js(19,34): error TS2300: Duplicate identifier 'Stats'. -lib/MultiCompiler.js(20,37): error TS2300: Duplicate identifier 'Watching'. -lib/MultiCompiler.js(21,52): error TS2300: Duplicate identifier 'InputFileSystem'. -lib/MultiCompiler.js(22,59): error TS2300: Duplicate identifier 'IntermediateFileSystem'. -lib/MultiCompiler.js(23,53): error TS2300: Duplicate identifier 'OutputFileSystem'. -lib/MultiCompiler.js(25,23): error TS2300: Duplicate identifier 'CompilerStatus'. -lib/MultiCompiler.js(33,14): error TS2300: Duplicate identifier 'Callback'. -lib/MultiCompiler.js(39,14): error TS2300: Duplicate identifier 'RunWithDependenciesHandler'. -lib/MultiCompiler.js(105,6): error TS2300: Duplicate identifier 'outputPath'. -lib/MultiCompiler.js(120,6): error TS2300: Duplicate identifier 'inputFileSystem'. -lib/MultiCompiler.js(124,6): error TS2300: Duplicate identifier 'outputFileSystem'. -lib/MultiCompiler.js(128,6): error TS2300: Duplicate identifier 'intermediateFileSystem'. -lib/MultiCompiler.js(135,6): error TS2300: Duplicate identifier 'inputFileSystem'. -lib/MultiCompiler.js(144,6): error TS2300: Duplicate identifier 'outputFileSystem'. -lib/MultiCompiler.js(153,6): error TS2300: Duplicate identifier 'intermediateFileSystem'. lib/dependencies/ExportsInfoDependency.js(81,9): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. -lib/dependencies/HarmonyExportImportedSpecifierDependency.js(567,40): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. +lib/dependencies/HarmonyExportImportedSpecifierDependency.js(575,40): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. lib/dependencies/HarmonyImportDependency.js(195,37): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. lib/dependencies/HarmonyImportDependency.js(197,36): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. lib/dependencies/HarmonyImportDependency.js(203,19): error TS2341: Property 'moduleGraph' is private and only accessible within class 'ChunkGraph'. diff --git a/tests/baselines/reference/voidReturnIndexUnionInference.types b/tests/baselines/reference/voidReturnIndexUnionInference.types index 20a962b9fef16..fa7d87b8f63af 100644 --- a/tests/baselines/reference/voidReturnIndexUnionInference.types +++ b/tests/baselines/reference/voidReturnIndexUnionInference.types @@ -43,9 +43,9 @@ function bad

(props: Readonly

) { safeInvoke(props.onFoo, "blah"); >safeInvoke(props.onFoo, "blah") : boolean | undefined >safeInvoke : (func: ((arg1: A1) => R) | null | undefined, arg1: A1) => R | undefined ->props.onFoo : P["onFoo"] +>props.onFoo : P["onFoo"] | undefined >props : Readonly

->onFoo : P["onFoo"] +>onFoo : P["onFoo"] | undefined >"blah" : "blah" // ERROR HERE!!! @@ -53,9 +53,9 @@ function bad

(props: Readonly

) { safeInvoke(props.onBar, "blah"); >safeInvoke(props.onBar, "blah") : void | undefined >safeInvoke : (func: ((arg1: A1) => R) | null | undefined, arg1: A1) => R | undefined ->props.onBar : P["onBar"] +>props.onBar : P["onBar"] | undefined >props : Readonly

->onBar : P["onBar"] +>onBar : P["onBar"] | undefined >"blah" : "blah" } diff --git a/tests/baselines/reference/withExportDecl.js b/tests/baselines/reference/withExportDecl.js index 97d528ecd62f6..ff26e8f2c68f6 100644 --- a/tests/baselines/reference/withExportDecl.js +++ b/tests/baselines/reference/withExportDecl.js @@ -63,6 +63,7 @@ define(["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; var simpleVar; + exports.exportedSimpleVar = void 0; var anotherVar; var varWithSimpleType; var varWithArrayType; @@ -71,6 +72,7 @@ define(["require", "exports"], function (require, exports) { var withComplicatedValue = { x: 30, y: 70, desc: "position" }; exports.exportedWithComplicatedValue = { x: 30, y: 70, desc: "position" }; var arrayVar = ['a', 'b']; + exports.exportedArrayVar = void 0; exports.exportedArrayVar.push({ x: 30, y: 'hello world' }); function simpleFunction() { return { @@ -97,9 +99,9 @@ define(["require", "exports"], function (require, exports) { } m3.foo = foo; })(m3 = exports.m3 || (exports.m3 = {})); - exports.eVar2 = 10; + exports.eVar1 = void 0, exports.eVar2 = 10; var eVar22; - exports.eVar3 = 10; + exports.eVar3 = 10, exports.eVar4 = void 0, exports.eVar5 = void 0; }); diff --git a/tests/baselines/reference/wrappedAndRecursiveConstraints4.types b/tests/baselines/reference/wrappedAndRecursiveConstraints4.types index 7f129898206a7..38282d76645ae 100644 --- a/tests/baselines/reference/wrappedAndRecursiveConstraints4.types +++ b/tests/baselines/reference/wrappedAndRecursiveConstraints4.types @@ -39,8 +39,8 @@ var r = c.foo(''); >'' : "" var r2 = r({ length: 3, charAt: (x: number) => { '' } }); // error ->r2 : any ->r({ length: 3, charAt: (x: number) => { '' } }) : any +>r2 : string +>r({ length: 3, charAt: (x: number) => { '' } }) : string >r : (x: V) => V >{ length: 3, charAt: (x: number) => { '' } } : { length: number; charAt: (x: number) => void; } >length : number diff --git a/tests/cases/compiler/binderBinaryExpressionStressJs.ts b/tests/cases/compiler/binderBinaryExpressionStressJs.ts new file mode 100644 index 0000000000000..f6af2b9fbc6a1 --- /dev/null +++ b/tests/cases/compiler/binderBinaryExpressionStressJs.ts @@ -0,0 +1,4973 @@ +// @target: esnext +// @noTypesAndSymbols: true +// @allowJs: true +// @noEmit: true +// @filename: file.js +// regression test for https://github.com/microsoft/TypeScript/issues/35633 +// If we need to emit comments or subsitutions for a node, we have to skip the trampoline +// that allows us to handle emitting arbitrarily complex binary expressions +// so we simplify the emit as much as possible to allow us to emit. In addition, +// we disable the type & symbol baselines just because they're _way too big_ +// because of how we print them. We should be able to print them now, but 50k lines +// were never realistically going to be reviewed, and it takes a few seconds to +// generate besides. + +// Two test cases, just in case; numeric: +0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 209 + 210 + 211 + 212 + 213 + 214 + 215 + 216 + 217 + 218 + 219 + 220 + 221 + 222 + 223 + 224 + 225 + 226 + 227 + 228 + 229 + 230 + 231 + 232 + 233 + 234 + 235 + 236 + 237 + 238 + 239 + 240 + 241 + 242 + 243 + 244 + 245 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + 257 + 258 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 267 + 268 + 269 + 270 + 271 + 272 + 273 + 274 + 275 + 276 + 277 + 278 + 279 + 280 + 281 + 282 + 283 + 284 + 285 + 286 + 287 + 288 + 289 + 290 + 291 + 292 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 303 + 304 + 305 + 306 + 307 + 308 + 309 + 310 + 311 + 312 + 313 + 314 + 315 + 316 + 317 + 318 + 319 + 320 + 321 + 322 + 323 + 324 + 325 + 326 + 327 + 328 + 329 + 330 + 331 + 332 + 333 + 334 + 335 + 336 + 337 + 338 + 339 + 340 + 341 + 342 + 343 + 344 + 345 + 346 + 347 + 348 + 349 + 350 + 351 + 352 + 353 + 354 + 355 + 356 + 357 + 358 + 359 + 360 + 361 + 362 + 363 + 364 + 365 + 366 + 367 + 368 + 369 + 370 + 371 + 372 + 373 + 374 + 375 + 376 + 377 + 378 + 379 + 380 + 381 + 382 + 383 + 384 + 385 + 386 + 387 + 388 + 389 + 390 + 391 + 392 + 393 + 394 + 395 + 396 + 397 + 398 + 399 + 400 + 401 + 402 + 403 + 404 + 405 + 406 + 407 + 408 + 409 + 410 + 411 + 412 + 413 + 414 + 415 + 416 + 417 + 418 + 419 + 420 + 421 + 422 + 423 + 424 + 425 + 426 + 427 + 428 + 429 + 430 + 431 + 432 + 433 + 434 + 435 + 436 + 437 + 438 + 439 + 440 + 441 + 442 + 443 + 444 + 445 + 446 + 447 + 448 + 449 + 450 + 451 + 452 + 453 + 454 + 455 + 456 + 457 + 458 + 459 + 460 + 461 + 462 + 463 + 464 + 465 + 466 + 467 + 468 + 469 + 470 + 471 + 472 + 473 + 474 + 475 + 476 + 477 + 478 + 479 + 480 + 481 + 482 + 483 + 484 + 485 + 486 + 487 + 488 + 489 + 490 + 491 + 492 + 493 + 494 + 495 + 496 + 497 + 498 + 499 + 500 + 501 + 502 + 503 + 504 + 505 + 506 + 507 + 508 + 509 + 510 + 511 + 512 + 513 + 514 + 515 + 516 + 517 + 518 + 519 + 520 + 521 + 522 + 523 + 524 + 525 + 526 + 527 + 528 + 529 + 530 + 531 + 532 + 533 + 534 + 535 + 536 + 537 + 538 + 539 + 540 + 541 + 542 + 543 + 544 + 545 + 546 + 547 + 548 + 549 + 550 + 551 + 552 + 553 + 554 + 555 + 556 + 557 + 558 + 559 + 560 + 561 + 562 + 563 + 564 + 565 + 566 + 567 + 568 + 569 + 570 + 571 + 572 + 573 + 574 + 575 + 576 + 577 + 578 + 579 + 580 + 581 + 582 + 583 + 584 + 585 + 586 + 587 + 588 + 589 + 590 + 591 + 592 + 593 + 594 + 595 + 596 + 597 + 598 + 599 + 600 + 601 + 602 + 603 + 604 + 605 + 606 + 607 + 608 + 609 + 610 + 611 + 612 + 613 + 614 + 615 + 616 + 617 + 618 + 619 + 620 + 621 + 622 + 623 + 624 + 625 + 626 + 627 + 628 + 629 + 630 + 631 + 632 + 633 + 634 + 635 + 636 + 637 + 638 + 639 + 640 + 641 + 642 + 643 + 644 + 645 + 646 + 647 + 648 + 649 + 650 + 651 + 652 + 653 + 654 + 655 + 656 + 657 + 658 + 659 + 660 + 661 + 662 + 663 + 664 + 665 + 666 + 667 + 668 + 669 + 670 + 671 + 672 + 673 + 674 + 675 + 676 + 677 + 678 + 679 + 680 + 681 + 682 + 683 + 684 + 685 + 686 + 687 + 688 + 689 + 690 + 691 + 692 + 693 + 694 + 695 + 696 + 697 + 698 + 699 + 700 + 701 + 702 + 703 + 704 + 705 + 706 + 707 + 708 + 709 + 710 + 711 + 712 + 713 + 714 + 715 + 716 + 717 + 718 + 719 + 720 + 721 + 722 + 723 + 724 + 725 + 726 + 727 + 728 + 729 + 730 + 731 + 732 + 733 + 734 + 735 + 736 + 737 + 738 + 739 + 740 + 741 + 742 + 743 + 744 + 745 + 746 + 747 + 748 + 749 + 750 + 751 + 752 + 753 + 754 + 755 + 756 + 757 + 758 + 759 + 760 + 761 + 762 + 763 + 764 + 765 + 766 + 767 + 768 + 769 + 770 + 771 + 772 + 773 + 774 + 775 + 776 + 777 + 778 + 779 + 780 + 781 + 782 + 783 + 784 + 785 + 786 + 787 + 788 + 789 + 790 + 791 + 792 + 793 + 794 + 795 + 796 + 797 + 798 + 799 + 800 + 801 + 802 + 803 + 804 + 805 + 806 + 807 + 808 + 809 + 810 + 811 + 812 + 813 + 814 + 815 + 816 + 817 + 818 + 819 + 820 + 821 + 822 + 823 + 824 + 825 + 826 + 827 + 828 + 829 + 830 + 831 + 832 + 833 + 834 + 835 + 836 + 837 + 838 + 839 + 840 + 841 + 842 + 843 + 844 + 845 + 846 + 847 + 848 + 849 + 850 + 851 + 852 + 853 + 854 + 855 + 856 + 857 + 858 + 859 + 860 + 861 + 862 + 863 + 864 + 865 + 866 + 867 + 868 + 869 + 870 + 871 + 872 + 873 + 874 + 875 + 876 + 877 + 878 + 879 + 880 + 881 + 882 + 883 + 884 + 885 + 886 + 887 + 888 + 889 + 890 + 891 + 892 + 893 + 894 + 895 + 896 + 897 + 898 + 899 + 900 + 901 + 902 + 903 + 904 + 905 + 906 + 907 + 908 + 909 + 910 + 911 + 912 + 913 + 914 + 915 + 916 + 917 + 918 + 919 + 920 + 921 + 922 + 923 + 924 + 925 + 926 + 927 + 928 + 929 + 930 + 931 + 932 + 933 + 934 + 935 + 936 + 937 + 938 + 939 + 940 + 941 + 942 + 943 + 944 + 945 + 946 + 947 + 948 + 949 + 950 + 951 + 952 + 953 + 954 + 955 + 956 + 957 + 958 + 959 + 960 + 961 + 962 + 963 + 964 + 965 + 966 + 967 + 968 + 969 + 970 + 971 + 972 + 973 + 974 + 975 + 976 + 977 + 978 + 979 + 980 + 981 + 982 + 983 + 984 + 985 + 986 + 987 + 988 + 989 + 990 + 991 + 992 + 993 + 994 + 995 + 996 + 997 + 998 + 999 + 1000 + 1001 + 1002 + 1003 + 1004 + 1005 + 1006 + 1007 + 1008 + 1009 + 1010 + 1011 + 1012 + 1013 + 1014 + 1015 + 1016 + 1017 + 1018 + 1019 + 1020 + 1021 + 1022 + 1023 + 1024 + 1025 + 1026 + 1027 + 1028 + 1029 + 1030 + 1031 + 1032 + 1033 + 1034 + 1035 + 1036 + 1037 + 1038 + 1039 + 1040 + 1041 + 1042 + 1043 + 1044 + 1045 + 1046 + 1047 + 1048 + 1049 + 1050 + 1051 + 1052 + 1053 + 1054 + 1055 + 1056 + 1057 + 1058 + 1059 + 1060 + 1061 + 1062 + 1063 + 1064 + 1065 + 1066 + 1067 + 1068 + 1069 + 1070 + 1071 + 1072 + 1073 + 1074 + 1075 + 1076 + 1077 + 1078 + 1079 + 1080 + 1081 + 1082 + 1083 + 1084 + 1085 + 1086 + 1087 + 1088 + 1089 + 1090 + 1091 + 1092 + 1093 + 1094 + 1095 + 1096 + 1097 + 1098 + 1099 + 1100 + 1101 + 1102 + 1103 + 1104 + 1105 + 1106 + 1107 + 1108 + 1109 + 1110 + 1111 + 1112 + 1113 + 1114 + 1115 + 1116 + 1117 + 1118 + 1119 + 1120 + 1121 + 1122 + 1123 + 1124 + 1125 + 1126 + 1127 + 1128 + 1129 + 1130 + 1131 + 1132 + 1133 + 1134 + 1135 + 1136 + 1137 + 1138 + 1139 + 1140 + 1141 + 1142 + 1143 + 1144 + 1145 + 1146 + 1147 + 1148 + 1149 + 1150 + 1151 + 1152 + 1153 + 1154 + 1155 + 1156 + 1157 + 1158 + 1159 + 1160 + 1161 + 1162 + 1163 + 1164 + 1165 + 1166 + 1167 + 1168 + 1169 + 1170 + 1171 + 1172 + 1173 + 1174 + 1175 + 1176 + 1177 + 1178 + 1179 + 1180 + 1181 + 1182 + 1183 + 1184 + 1185 + 1186 + 1187 + 1188 + 1189 + 1190 + 1191 + 1192 + 1193 + 1194 + 1195 + 1196 + 1197 + 1198 + 1199 + 1200 + 1201 + 1202 + 1203 + 1204 + 1205 + 1206 + 1207 + 1208 + 1209 + 1210 + 1211 + 1212 + 1213 + 1214 + 1215 + 1216 + 1217 + 1218 + 1219 + 1220 + 1221 + 1222 + 1223 + 1224 + 1225 + 1226 + 1227 + 1228 + 1229 + 1230 + 1231 + 1232 + 1233 + 1234 + 1235 + 1236 + 1237 + 1238 + 1239 + 1240 + 1241 + 1242 + 1243 + 1244 + 1245 + 1246 + 1247 + 1248 + 1249 + 1250 + 1251 + 1252 + 1253 + 1254 + 1255 + 1256 + 1257 + 1258 + 1259 + 1260 + 1261 + 1262 + 1263 + 1264 + 1265 + 1266 + 1267 + 1268 + 1269 + 1270 + 1271 + 1272 + 1273 + 1274 + 1275 + 1276 + 1277 + 1278 + 1279 + 1280 + 1281 + 1282 + 1283 + 1284 + 1285 + 1286 + 1287 + 1288 + 1289 + 1290 + 1291 + 1292 + 1293 + 1294 + 1295 + 1296 + 1297 + 1298 + 1299 + 1300 + 1301 + 1302 + 1303 + 1304 + 1305 + 1306 + 1307 + 1308 + 1309 + 1310 + 1311 + 1312 + 1313 + 1314 + 1315 + 1316 + 1317 + 1318 + 1319 + 1320 + 1321 + 1322 + 1323 + 1324 + 1325 + 1326 + 1327 + 1328 + 1329 + 1330 + 1331 + 1332 + 1333 + 1334 + 1335 + 1336 + 1337 + 1338 + 1339 + 1340 + 1341 + 1342 + 1343 + 1344 + 1345 + 1346 + 1347 + 1348 + 1349 + 1350 + 1351 + 1352 + 1353 + 1354 + 1355 + 1356 + 1357 + 1358 + 1359 + 1360 + 1361 + 1362 + 1363 + 1364 + 1365 + 1366 + 1367 + 1368 + 1369 + 1370 + 1371 + 1372 + 1373 + 1374 + 1375 + 1376 + 1377 + 1378 + 1379 + 1380 + 1381 + 1382 + 1383 + 1384 + 1385 + 1386 + 1387 + 1388 + 1389 + 1390 + 1391 + 1392 + 1393 + 1394 + 1395 + 1396 + 1397 + 1398 + 1399 + 1400 + 1401 + 1402 + 1403 + 1404 + 1405 + 1406 + 1407 + 1408 + 1409 + 1410 + 1411 + 1412 + 1413 + 1414 + 1415 + 1416 + 1417 + 1418 + 1419 + 1420 + 1421 + 1422 + 1423 + 1424 + 1425 + 1426 + 1427 + 1428 + 1429 + 1430 + 1431 + 1432 + 1433 + 1434 + 1435 + 1436 + 1437 + 1438 + 1439 + 1440 + 1441 + 1442 + 1443 + 1444 + 1445 + 1446 + 1447 + 1448 + 1449 + 1450 + 1451 + 1452 + 1453 + 1454 + 1455 + 1456 + 1457 + 1458 + 1459 + 1460 + 1461 + 1462 + 1463 + 1464 + 1465 + 1466 + 1467 + 1468 + 1469 + 1470 + 1471 + 1472 + 1473 + 1474 + 1475 + 1476 + 1477 + 1478 + 1479 + 1480 + 1481 + 1482 + 1483 + 1484 + 1485 + 1486 + 1487 + 1488 + 1489 + 1490 + 1491 + 1492 + 1493 + 1494 + 1495 + 1496 + 1497 + 1498 + 1499; + +// And stringy, as from https://github.com/openlayers/ol2/blob/master/tests/speed/wmscaps.js +var caps = +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +'' + +''; diff --git a/tests/cases/compiler/circularOptionalityRemoval.ts b/tests/cases/compiler/circularOptionalityRemoval.ts new file mode 100644 index 0000000000000..20a6a4085703a --- /dev/null +++ b/tests/cases/compiler/circularOptionalityRemoval.ts @@ -0,0 +1,7 @@ +// @strictNullChecks: true + +// Constructed repro +function fn1(x: number | undefined = x > 0 ? x : 0) { } + +// Report from user +function fn2(x?: string = someCondition ? 'value1' : x) { } \ No newline at end of file diff --git a/tests/cases/compiler/classInConvertedLoopES5.ts b/tests/cases/compiler/classInConvertedLoopES5.ts new file mode 100644 index 0000000000000..bc2801f5877e3 --- /dev/null +++ b/tests/cases/compiler/classInConvertedLoopES5.ts @@ -0,0 +1,10 @@ +// @target: es5 +const classesByRow: Record = {}; +for (const row of ['1', '2', '3', '4', '5']) { + class RowClass { + row = row; + static factory = () => new RowClass(); + } + + classesByRow[row] = RowClass; +} \ No newline at end of file diff --git a/tests/cases/compiler/crashInEmitTokenWithComment.ts b/tests/cases/compiler/crashInEmitTokenWithComment.ts new file mode 100644 index 0000000000000..41d2ca1892933 --- /dev/null +++ b/tests/cases/compiler/crashInEmitTokenWithComment.ts @@ -0,0 +1,7 @@ +// @noTypesAndSymbols: true + +// GH#32358 +const fn = (param: string) => undefined; + +const foo = {bar: 'a'}; +fn(({[foo.bar]: c}) => undefined); \ No newline at end of file diff --git a/tests/cases/compiler/discriminableUnionWithIntersectedMembers.ts b/tests/cases/compiler/discriminableUnionWithIntersectedMembers.ts new file mode 100644 index 0000000000000..445431101b372 --- /dev/null +++ b/tests/cases/compiler/discriminableUnionWithIntersectedMembers.ts @@ -0,0 +1,14 @@ +// regression test for https://github.com/microsoft/TypeScript/issues/33243 +type X = + | { x: 'x', y: number } & { y: number } + | { x: 'y', y: number, z?: boolean } & { y: number } + +// error +const x: X = 4 as any as { x: 'x' | 'y', y: number }; + +type Y = + | { x: 'x', y: number } + | { x: 'y', y: number, z?: boolean } + +// no error +const y: Y = 4 as any as { x: 'x' | 'y', y: number }; \ No newline at end of file diff --git a/tests/cases/compiler/emitHelpersWithLocalCollisions.ts b/tests/cases/compiler/emitHelpersWithLocalCollisions.ts new file mode 100644 index 0000000000000..c10e037abc934 --- /dev/null +++ b/tests/cases/compiler/emitHelpersWithLocalCollisions.ts @@ -0,0 +1,12 @@ +// @target: es6 +// @module: * +// @moduleResolution: classic +// @experimentalDecorators: true +// @filename: a.ts +// @noTypesAndSymbols: true +declare var dec: any, __decorate: any; +@dec export class A { +} + +const o = { a: 1 }; +const y = { ...o }; diff --git a/tests/cases/compiler/errorsForCallAndAssignmentAreSimilar.ts b/tests/cases/compiler/errorsForCallAndAssignmentAreSimilar.ts new file mode 100644 index 0000000000000..218397dfb77c2 --- /dev/null +++ b/tests/cases/compiler/errorsForCallAndAssignmentAreSimilar.ts @@ -0,0 +1,18 @@ +function minimalExample1() { + type Disc = + | { kind: "hddvd" } + | { kind: "bluray" } + + function foo(x: Disc[]) { + } + + foo([ + { kind: "bluray", }, + { kind: "hdpvd", } + ]); + + const ds: Disc[] = [ + { kind: "bluray", }, + { kind: "hdpvd", } + ]; +} \ No newline at end of file diff --git a/tests/cases/compiler/esModuleInteropWithExportStar.ts b/tests/cases/compiler/esModuleInteropWithExportStar.ts new file mode 100644 index 0000000000000..460221eabe52d --- /dev/null +++ b/tests/cases/compiler/esModuleInteropWithExportStar.ts @@ -0,0 +1,12 @@ +// @esModuleInterop: true +// @target: es3,es5 +// @filename: fs.d.ts +export const x: number; +// @filename: mjts.ts +import * as fs from "./fs"; + +fs; + +export * from "./fs"; +export {x} from "./fs"; +export {x as y} from "./fs"; diff --git a/tests/cases/compiler/getSetEnumerable.ts b/tests/cases/compiler/getSetEnumerable.ts new file mode 100644 index 0000000000000..295aaef7ffbdf --- /dev/null +++ b/tests/cases/compiler/getSetEnumerable.ts @@ -0,0 +1,27 @@ +// @target: ES5 + +class GetSetEnumerableClassGet { + get prop() { return true;} +} + +class GetSetEnumerableClassSet { + set prop(value: boolean) { } +} + +class GetSetEnumerableClassGetSet { + get prop() { return true;} + set prop(value: boolean) { } +} + +const GetSetEnumerableObjectGet = { + get prop() { return true; } +}; + +const GetSetEnumerableObjectSet = { + set prop(value: boolean) { } +}; + +const GetSetEnumerableObjectGetSet = { + get prop() { return true; }, + set prop(value: boolean) { } +}; diff --git a/tests/cases/compiler/importNonExportedMember2.ts b/tests/cases/compiler/importNonExportedMember2.ts new file mode 100644 index 0000000000000..010aa115d45a5 --- /dev/null +++ b/tests/cases/compiler/importNonExportedMember2.ts @@ -0,0 +1,6 @@ +// @Filename: a.ts +export {} +interface Foo {} + +// @Filename: b.ts +import { Foo } from './a'; diff --git a/tests/cases/compiler/importNonExportedMember3.ts b/tests/cases/compiler/importNonExportedMember3.ts new file mode 100644 index 0000000000000..fe9e9a2043b57 --- /dev/null +++ b/tests/cases/compiler/importNonExportedMember3.ts @@ -0,0 +1,8 @@ +// @Filename: a.ts +export {} +interface Foo {} +interface Foo {} +namespace Foo {} + +// @Filename: b.ts +import { Foo } from './a'; diff --git a/tests/cases/compiler/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts b/tests/cases/compiler/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts new file mode 100644 index 0000000000000..a68ea9beee6d2 --- /dev/null +++ b/tests/cases/compiler/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts @@ -0,0 +1,22 @@ +type AnyFunction = (...args: any[]) => any; +type Params = Parameters>; + +interface Wrapper { + call(event: K, ...args: Params): void; +} + +interface AWrapped { + foo(): void; +} + +class A { + foo: Wrapper; +} + +interface BWrapped extends AWrapped { + bar(): void; +} + +class B extends A { + foo: Wrapper; +} \ No newline at end of file diff --git a/tests/cases/compiler/jsFileCompilationAwaitModifier.ts b/tests/cases/compiler/jsFileCompilationAwaitModifier.ts new file mode 100644 index 0000000000000..5387247f4cb92 --- /dev/null +++ b/tests/cases/compiler/jsFileCompilationAwaitModifier.ts @@ -0,0 +1,14 @@ +// @declaration: true +// @allowJs: true +// @outDir: ./out +// @lib: es2015 +// @filename: a.js +class Foo { + async a() { + await Promise.resolve(1); + } + + b = async () => { + await Promise.resolve(1); + } +} diff --git a/tests/cases/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx b/tests/cases/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx new file mode 100644 index 0000000000000..dd39d304f5e1e --- /dev/null +++ b/tests/cases/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx @@ -0,0 +1,25 @@ +// @jsx: react +/// + +import * as React from "react"; + +interface MyProps { + x: number; +} + +function MyComp4(props: MyProps, context: any, bad: any, verybad: any) { + return

; +} +function MyComp3(props: MyProps, context: any, bad: any) { + return
; +} +function MyComp2(props: MyProps, context: any) { + return
+} + +const a = ; // using `MyComp` as a component should error - it expects more arguments than react provides +const b = ; // using `MyComp` as a component should error - it expects more arguments than react provides +const c = ; // Should be OK, `context` is allowed, per react rules + +declare function MyTagWithOptionalNonJSXBits(props: MyProps, context: any, nonReactArg?: string): JSX.Element; +const d = ; // Technically OK, but probably questionable \ No newline at end of file diff --git a/tests/cases/compiler/privateFieldAssignabilityFromUnknown.ts b/tests/cases/compiler/privateFieldAssignabilityFromUnknown.ts new file mode 100644 index 0000000000000..09f8cf460ed29 --- /dev/null +++ b/tests/cases/compiler/privateFieldAssignabilityFromUnknown.ts @@ -0,0 +1,5 @@ +export class Class { + #field: any +} + +const task: Class = {} as unknown; diff --git a/tests/cases/compiler/spliceTuples.ts b/tests/cases/compiler/spliceTuples.ts new file mode 100644 index 0000000000000..22f1cb185832b --- /dev/null +++ b/tests/cases/compiler/spliceTuples.ts @@ -0,0 +1,23 @@ +declare const sb: [string, boolean]; + +let k1: [number, string, boolean]; +k1 = [1, ...sb]; + +let k2: [number, string, boolean, number]; +k2 = [1, ...sb, 1]; + +declare const sb_: [string, ...boolean[]]; + +let k3: [number, string, ...boolean[]]; +k3 = [1, ...sb_]; + +declare const sbb_: [string, boolean, ...boolean[]]; + +let k4: [number, string, ...boolean[]]; +k4 = [1, ...sbb_]; + +let k5: [number, string, boolean, ...boolean[]]; +k5 = [1, ...sbb_]; + +let k6: [number, string, boolean, boolean, ...boolean[]]; +k6 = [1, ...sbb_]; diff --git a/tests/cases/compiler/thisInClassBodyStaticESNext.ts b/tests/cases/compiler/thisInClassBodyStaticESNext.ts new file mode 100644 index 0000000000000..ae72e6f0bde88 --- /dev/null +++ b/tests/cases/compiler/thisInClassBodyStaticESNext.ts @@ -0,0 +1,11 @@ +// @target: esnext +// @useDefineForClassFields: true + +// all are allowed with es-compliant class field emit +class Foo { + x = this + static t = this + static at = () => this + static ft = function () { return this } + static mt() { return this } +} diff --git a/tests/cases/compiler/truthinessCallExpressionCoercion1.ts b/tests/cases/compiler/truthinessCallExpressionCoercion1.ts new file mode 100644 index 0000000000000..04331cbeadd04 --- /dev/null +++ b/tests/cases/compiler/truthinessCallExpressionCoercion1.ts @@ -0,0 +1,68 @@ +// @strictNullChecks:true + +function onlyErrorsWhenTestingNonNullableFunctionType(required: () => boolean, optional?: () => boolean) { + // error + required ? console.log('required') : undefined; + + // ok + optional ? console.log('optional') : undefined; + + // ok + !!required ? console.log('not required') : undefined; + + // ok + required() ? console.log('required call') : undefined; +} + +function onlyErrorsWhenUnusedInBody() { + function test() { return Math.random() > 0.5; } + + // error + test ? console.log('test') : undefined; + + // ok + test ? console.log(test) : undefined; + + // ok + test ? test() : undefined; + + // ok + test + ? [() => null].forEach(() => { test(); }) + : undefined; + + // error + test + ? [() => null].forEach(test => { test() }) + : undefined; +} + +function checksPropertyAccess() { + const x = { + foo: { + bar() { return true; } + } + } + + // error + x.foo.bar ? console.log('x.foo.bar') : undefined; + + // ok + x.foo.bar ? x.foo.bar : undefined; +} + +class Foo { + maybeIsUser?: () => boolean; + + isUser() { + return true; + } + + test() { + // error + this.isUser ? console.log('this.isUser') : undefined; + + // ok + this.maybeIsUser ? console.log('this.maybeIsUser') : undefined; + } +} diff --git a/tests/cases/compiler/tryCatchFinallyControlFlow.ts b/tests/cases/compiler/tryCatchFinallyControlFlow.ts index 694d9f0c4d576..83909b5ddb035 100644 --- a/tests/cases/compiler/tryCatchFinallyControlFlow.ts +++ b/tests/cases/compiler/tryCatchFinallyControlFlow.ts @@ -108,6 +108,124 @@ function f7() { x; // Unreachable } +function f8() { + let x: 0 | 1 = 0; + (() => { + try { + x = 1; + return; + } + finally { + x; // 0 | 1 + } + x; // Unreachable + })(); + x; // 1 +} + +function f9() { + let x: 0 | 1 | 2 = 0; + (() => { + try { + if (!!true) { + x = 1; + return; + } + } + finally { + x; // 0 | 1 + } + x; // 0 + x = 2; + })(); + x; // 1 | 2 +} + +function f10() { + let x: 0 | 1 | 2 | 3 = 0; + (() => { + try { + x = 1; + return; + } + catch (e) { + x = 2; + } + finally { + x; // 0 | 1 | 2 + } + x; // 2 + x = 3; + })(); + x; // 1 | 3 +} + +function f11() { + let x: 0 | 1 | 2 | 3 | 4 | 5 = 0; + (() => { + try { + if (!!true) { + x = 1; + return; + } + if (!!true) { + x = 2; + throw 0; + } + } + catch (e) { + x; // 0 | 1 | 2 + x = 3; + } + finally { + x; // 0 | 1 | 2 | 3 + if (!!true) { + x = 4; + } + } + x; // 0 | 3 | 4 + x = 5; + })(); + x; // 1 | 4 | 5 +} + +function f12() { + let x: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 = 0; + (() => { + try { + if (!!true) { + x = 1; + return; + } + if (!!true) { + x = 2; + throw 0; + } + } + catch (e) { + x; // 0 | 1 | 2 + x = 3; + } + finally { + x; // 0 | 1 | 2 | 3 + if (!!true) { + x = 4; + return; + } + if (!!true) { + x = 5; + return; + } + x = 6; + return; + x; // unreachable + } + x; // unreachable + x = 7; // no effect + })(); + x; // 4 | 5 | 6 +} + // Repro from #35644 const main = () => { @@ -126,3 +244,18 @@ const main = () => { return; } } + +// Repro from #36828 + +function t1() { + const x = (() => { + try { + return 'x'; + } + catch (e) { + return null; + } + x; // Unreachable + })(); + x; // Reachable +} diff --git a/tests/cases/compiler/tsxUnionMemberChecksFilterDataProps.tsx b/tests/cases/compiler/tsxUnionMemberChecksFilterDataProps.tsx new file mode 100644 index 0000000000000..8c49e4ff8bb3b --- /dev/null +++ b/tests/cases/compiler/tsxUnionMemberChecksFilterDataProps.tsx @@ -0,0 +1,10 @@ +// @jsx: react +// @esModuleInterop: true +/// +import React, { ReactElement } from "react"; + +declare function NotHappy(props: ({ fixed?: boolean } | { value?: number })): ReactElement; +declare function Happy(props: { fixed?: boolean, value?: number }): ReactElement; + +const RootNotHappy = () => (); +const RootHappy = () => (); diff --git a/tests/cases/conformance/classes/members/privateNames/privateNameAmbientNoImplicitAny.ts b/tests/cases/conformance/classes/members/privateNames/privateNameAmbientNoImplicitAny.ts new file mode 100644 index 0000000000000..02a83e8b1491d --- /dev/null +++ b/tests/cases/conformance/classes/members/privateNames/privateNameAmbientNoImplicitAny.ts @@ -0,0 +1,8 @@ +// @noImplicitAny: true +// @target: ESNext +declare class A { + #prop; +} +class B { + #prop; +} \ No newline at end of file diff --git a/tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts b/tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts new file mode 100644 index 0000000000000..2b1bbd372181a --- /dev/null +++ b/tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts @@ -0,0 +1,26 @@ +// @target: ES5, ES2015, esnext + +function tag (str: any, ...args: any[]): any { + return str +} + +const a = tag`123` +const b = tag`123 ${100}` +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +const a1 = tag`${ 100 }\0` // \0 +const a2 = tag`${ 100 }\00` // \\00 +const a3 = tag`${ 100 }\u` // \\u +const a4 = tag`${ 100 }\u0` // \\u0 +const a5 = tag`${ 100 }\u00` // \\u00 +const a6 = tag`${ 100 }\u000` // \\u000 +const a7 = tag`${ 100 }\u0000` // \u0000 +const a8 = tag`${ 100 }\u{` // \\u{ +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +const a12 = tag`${ 100 }\x` // \\x +const a13 = tag`${ 100 }\x0` // \\x0 +const a14 = tag`${ 100 }\x00` // \x00 diff --git a/tests/cases/conformance/es6/destructuring/destructuringSpread.ts b/tests/cases/conformance/es6/destructuring/destructuringSpread.ts new file mode 100644 index 0000000000000..85904ab164a9e --- /dev/null +++ b/tests/cases/conformance/es6/destructuring/destructuringSpread.ts @@ -0,0 +1,27 @@ +const { x } = { + ...{}, + x: 0 +}; + +const { y } = { + y: 0, + ...{} +}; + +const { z, a, b } = { + z: 0, + ...{ a: 0, b: 0 } +}; + +const { c, d, e, f, g } = { + ...{ + ...{ + ...{ + c: 0, + }, + d: 0 + }, + e: 0 + }, + f: 0 +}; diff --git a/tests/cases/conformance/externalModules/typeOnly/exportNamespace1.ts b/tests/cases/conformance/externalModules/typeOnly/exportNamespace1.ts new file mode 100644 index 0000000000000..d8c6eeb9c1995 --- /dev/null +++ b/tests/cases/conformance/externalModules/typeOnly/exportNamespace1.ts @@ -0,0 +1,12 @@ +// @Filename: a.ts +export class A {} + +// @Filename: b.ts +export type { A } from './a'; + +// @Filename: c.ts +export * from './b'; + +// @Filename: d.ts +import { A } from './c'; +new A(); // Error diff --git a/tests/cases/conformance/externalModules/typeOnly/exportNamespace2.ts b/tests/cases/conformance/externalModules/typeOnly/exportNamespace2.ts new file mode 100644 index 0000000000000..9f693c9def2cb --- /dev/null +++ b/tests/cases/conformance/externalModules/typeOnly/exportNamespace2.ts @@ -0,0 +1,13 @@ +// @Filename: a.ts +export class A {} + +// @Filename: b.ts +export * as a from './a'; + +// @Filename: c.ts +import type { a } from './b'; +export { a }; + +// @Filename: d.ts +import { a } from './c'; +new a.A(); // Error diff --git a/tests/cases/conformance/externalModules/typeOnly/exportNamespace3.ts b/tests/cases/conformance/externalModules/typeOnly/exportNamespace3.ts new file mode 100644 index 0000000000000..35473df9c6102 --- /dev/null +++ b/tests/cases/conformance/externalModules/typeOnly/exportNamespace3.ts @@ -0,0 +1,12 @@ +// @Filename: a.ts +export class A {} + +// @Filename: b.ts +export type { A } from './a'; + +// @Filename: c.ts +export * as a from './b'; + +// @Filename: d.ts +import { a } from './c'; +new a.A(); // Error diff --git a/tests/cases/conformance/externalModules/typeOnly/exportNamespace4.ts b/tests/cases/conformance/externalModules/typeOnly/exportNamespace4.ts new file mode 100644 index 0000000000000..889552e6643fe --- /dev/null +++ b/tests/cases/conformance/externalModules/typeOnly/exportNamespace4.ts @@ -0,0 +1,16 @@ +// @Filename: a.ts +export class A {} + +// @Filename: b.ts +export type * from './a'; // Grammar error + +// @Filename: c.ts +export type * as ns from './a'; // Grammar error + +// @Filename: d.ts +import { A } from './b'; +A; + +// @Filename: e.ts +import { ns } from './c'; +ns.A; diff --git a/tests/cases/conformance/jsdoc/exportedAliasedEnumTag.ts b/tests/cases/conformance/jsdoc/exportedAliasedEnumTag.ts new file mode 100644 index 0000000000000..e2916ea8b2277 --- /dev/null +++ b/tests/cases/conformance/jsdoc/exportedAliasedEnumTag.ts @@ -0,0 +1,9 @@ +// @noemit: true +// @allowjs: true +// @filename: exportedAliasedEnumTag.js +var middlewarify = module.exports = {}; + +/** @enum */ +middlewarify.Type = { + BEFORE: 'before' +}; diff --git a/tests/cases/conformance/jsdoc/jsdocImplements_class.ts b/tests/cases/conformance/jsdoc/jsdocImplements_class.ts new file mode 100644 index 0000000000000..2a9d63a072a86 --- /dev/null +++ b/tests/cases/conformance/jsdoc/jsdocImplements_class.ts @@ -0,0 +1,25 @@ +// @allowJs: true +// @checkJs: true +// @declaration: true +// @emitDeclarationOnly: true +// @outDir: ./out + +// @Filename: /a.js +class A { + /** @return {number} */ + method() { throw new Error(); } +} +/** @implements {A} */ +class B { + method() { return 0 } +} + +/** @implements A */ +class B2 { + /** @return {string} */ + method() { return "" } +} + +/** @implements {A} */ +class B3 { +} diff --git a/tests/cases/conformance/jsdoc/jsdocImplements_interface.ts b/tests/cases/conformance/jsdoc/jsdocImplements_interface.ts new file mode 100644 index 0000000000000..2c797e814539b --- /dev/null +++ b/tests/cases/conformance/jsdoc/jsdocImplements_interface.ts @@ -0,0 +1,26 @@ +// @allowJs: true +// @checkJs: true +// @declaration: true +// @emitDeclarationOnly: true +// @outDir: ./out + +// @Filename: /defs.d.ts +interface A { + mNumber(): number; +} +// @Filename: /a.js +/** @implements A */ +class B { + mNumber() { + return 0; + } +} +/** @implements {A} */ +class B2 { + mNumber() { + return ""; + } +} +/** @implements A */ +class B3 { +} diff --git a/tests/cases/conformance/jsdoc/jsdocImplements_interface_multiple.ts b/tests/cases/conformance/jsdoc/jsdocImplements_interface_multiple.ts new file mode 100644 index 0000000000000..187d8c2189a9c --- /dev/null +++ b/tests/cases/conformance/jsdoc/jsdocImplements_interface_multiple.ts @@ -0,0 +1,35 @@ +// @allowJs: true +// @checkJs: true +// @declaration: true +// @emitDeclarationOnly: true +// @outDir: ./out + +// @Filename: /defs.d.ts +interface Drawable { + draw(): number; +} +interface Sizable { + size(): number; +} +// @Filename: /a.js +/** + * @implements {Drawable} + * @implements Sizable + **/ +class Square { + draw() { + return 0; + } + size() { + return 0; + } +} +/** + * @implements Drawable + * @implements {Sizable} + **/ +class BadSquare { + size() { + return 0; + } +} \ No newline at end of file diff --git a/tests/cases/conformance/jsdoc/jsdocImplements_missingType.ts b/tests/cases/conformance/jsdoc/jsdocImplements_missingType.ts new file mode 100644 index 0000000000000..80604ff1cbaef --- /dev/null +++ b/tests/cases/conformance/jsdoc/jsdocImplements_missingType.ts @@ -0,0 +1,11 @@ +// @allowJs: true +// @checkJs: true +// @declaration: true +// @emitDeclarationOnly: true +// @outDir: ./out + +// @Filename: /a.js +class A { constructor() { this.x = 0; } } +/** @implements */ +class B { +} diff --git a/tests/cases/conformance/jsdoc/jsdocImplements_properties.ts b/tests/cases/conformance/jsdoc/jsdocImplements_properties.ts new file mode 100644 index 0000000000000..8e94fef2925e2 --- /dev/null +++ b/tests/cases/conformance/jsdoc/jsdocImplements_properties.ts @@ -0,0 +1,20 @@ +// @allowJs: true +// @checkJs: true +// @declaration: true +// @emitDeclarationOnly: true +// @outDir: ./out + +// @Filename: /a.js +class A { constructor() { this.x = 0; } } +/** @implements A*/ +class B {} + +/** @implements A*/ +class B2 { + x = 10 +} + +/** @implements {A}*/ +class B3 { + constructor() { this.x = 10 } +} diff --git a/tests/cases/conformance/jsdoc/jsdocImplements_signatures.ts b/tests/cases/conformance/jsdoc/jsdocImplements_signatures.ts new file mode 100644 index 0000000000000..a6cc1d972e535 --- /dev/null +++ b/tests/cases/conformance/jsdoc/jsdocImplements_signatures.ts @@ -0,0 +1,14 @@ +// @allowJs: true +// @checkJs: true +// @declaration: true +// @emitDeclarationOnly: true +// @outDir: ./out + +// @Filename: /defs.d.ts +interface Sig { + [index: string]: string +} +// @Filename: /a.js +/** @implements {Sig} */ +class B { +} diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx index 0c2d25078646a..e7918999465ec 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx @@ -3,6 +3,7 @@ // @noLib: true // @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts +// @strictNullChecks: true import React = require('react'); diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx index 632b9d5d84908..2f452a0aaf629 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx @@ -3,6 +3,7 @@ // @noLib: true // @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts +// @strictNullChecks: true import React = require('react'); @@ -55,4 +56,4 @@ let k5 =
My Div
My Div
-
; \ No newline at end of file + ; diff --git a/tests/cases/conformance/jsx/jsxParsingError3.tsx b/tests/cases/conformance/jsx/jsxParsingError3.tsx new file mode 100644 index 0000000000000..2913dfc7daf6f --- /dev/null +++ b/tests/cases/conformance/jsx/jsxParsingError3.tsx @@ -0,0 +1,27 @@ +//@jsx: preserve + +//@filename: file.tsx +declare module JSX { + interface Element {} + interface IntrinsicElements { + [s: string]: any; + } +} + +// @filename: Error1.tsx +let x1 =
}
; + +// @filename: Error2.tsx +let x2 =
>
; + +// @filename: Error3.tsx +let x3 =
{"foo"}}
; + +// @filename: Error4.tsx +let x4 =
{"foo"}>
; + +// @filename: Error5.tsx +let x5 =
}{"foo"}
; + +// @filename: Error6.tsx +let x6 =
>{"foo"}
; diff --git a/tests/cases/conformance/types/spread/objectSpread.ts b/tests/cases/conformance/types/spread/objectSpread.ts index 5917bdf6dcf95..7d4ed52983e1f 100644 --- a/tests/cases/conformance/types/spread/objectSpread.ts +++ b/tests/cases/conformance/types/spread/objectSpread.ts @@ -8,23 +8,14 @@ let addAfter: { a: number, b: string, c: boolean } = { ...o, c: false } let addBefore: { a: number, b: string, c: boolean } = { c: false, ...o } -// Note: ignore still changes the order that properties are printed -let ignore: { a: number, b: string } = - { b: 'ignored', ...o } let override: { a: number, b: string } = { ...o, b: 'override' } let nested: { a: number, b: boolean, c: string } = { ...{ a: 3, ...{ b: false, c: 'overriden' } }, c: 'whatever' } let combined: { a: number, b: string, c: boolean } = { ...o, ...o2 } -let combinedBefore: { a: number, b: string, c: boolean } = - { b: 'ok', ...o, ...o2 } -let combinedMid: { a: number, b: string, c: boolean } = - { ...o, b: 'ok', ...o2 } let combinedAfter: { a: number, b: string, c: boolean } = { ...o, ...o2, b: 'ok' } -let combinedNested: { a: number, b: boolean, c: string, d: string } = - { ...{ a: 4, ...{ b: false, c: 'overriden' } }, d: 'actually new', ...{ a: 5, d: 'maybe new' } } let combinedNestedChangeType: { a: number, b: boolean, c: number } = { ...{ a: 1, ...{ b: false, c: 'overriden' } }, c: -1 } let propertyNested: { a: { a: number, b: string } } = @@ -92,8 +83,6 @@ cplus.plus(); // new field's type conflicting with existing field is OK let changeTypeAfter: { a: string, b: string } = { ...o, a: 'wrong type?' } -let changeTypeBefore: { a: number, b: string } = - { a: 'wrong type?', ...o }; let changeTypeBoth: { a: string, b: number } = { ...o, ...swap }; @@ -110,8 +99,6 @@ function container( // computed property let computedFirst: { a: number, b: string, "before everything": number } = { ['before everything']: 12, ...o, b: 'yes' } - let computedMiddle: { a: number, b: string, c: boolean, "in the middle": number } = - { ...o, ['in the middle']: 13, b: 'maybe?', ...o2 } let computedAfter: { a: number, b: string, "at the end": number } = { ...o, b: 'yeah', ['at the end']: 14 } } diff --git a/tests/cases/conformance/types/spread/objectSpreadNegative.ts b/tests/cases/conformance/types/spread/objectSpreadNegative.ts index f31d62e2faf19..00dfd440667b3 100644 --- a/tests/cases/conformance/types/spread/objectSpreadNegative.ts +++ b/tests/cases/conformance/types/spread/objectSpreadNegative.ts @@ -1,4 +1,5 @@ // @target: es5 +// @strictNullChecks: true let o = { a: 1, b: 'no' } /// private propagates @@ -8,12 +9,12 @@ class PrivateOptionalX { class PublicX { public x: number; } -let publicX: PublicX; -let privateOptionalX: PrivateOptionalX; +declare let publicX: PublicX; +declare let privateOptionalX: PrivateOptionalX; let o2 = { ...publicX, ...privateOptionalX }; let sn: number = o2.x; // error, x is private -let optionalString: { sn?: string }; -let optionalNumber: { sn?: number }; +declare let optionalString: { sn?: string }; +declare let optionalNumber: { sn?: number }; let allOptional: { sn: string | number } = { ...optionalString, ...optionalNumber }; // error, 'sn' is optional in source, required in target @@ -28,6 +29,22 @@ spread = b; // error, missing 's' // literal repeats are not allowed, but spread repeats are fine let duplicated = { b: 'bad', ...o, b: 'bad', ...o2, b: 'bad' } let duplicatedSpread = { ...o, ...o } +// Note: ignore changes the order that properties are printed +let ignore: { a: number, b: string } = + { b: 'ignored', ...o } + +let o3 = { a: 1, b: 'no' } +let o4 = { b: 'yes', c: true } +let combinedBefore: { a: number, b: string, c: boolean } = + { b: 'ok', ...o3, ...o4 } +let combinedMid: { a: number, b: string, c: boolean } = + { ...o3, b: 'ok', ...o4 } +let combinedNested: { a: number, b: boolean, c: string, d: string } = + { ...{ a: 4, ...{ b: false, c: 'overriden' } }, d: 'actually new', ...{ a: 5, d: 'maybe new' } } +let changeTypeBefore: { a: number, b: string } = + { a: 'wrong type?', ...o3 }; +let computedMiddle: { a: number, b: string, c: boolean, "in the middle": number } = + { ...o3, ['in the middle']: 13, b: 'maybe?', ...o4 } // primitives are not allowed, except for falsy ones let spreadNum = { ...12 }; diff --git a/tests/cases/conformance/types/spread/spreadOverwritesProperty.ts b/tests/cases/conformance/types/spread/spreadOverwritesProperty.ts new file mode 100644 index 0000000000000..bfbb11348d93e --- /dev/null +++ b/tests/cases/conformance/types/spread/spreadOverwritesProperty.ts @@ -0,0 +1,13 @@ +// without strict null checks, none of these should be an error +declare var ab: { a: number, b: number }; +declare var abq: { a: number, b?: number }; +var unused1 = { b: 1, ...ab } +var unused2 = { ...ab, ...ab } +var unused3 = { b: 1, ...abq } + +function g(obj: { x: number | undefined }) { + return { x: 1, ...obj }; +} +function h(obj: { x: number }) { + return { x: 1, ...obj }; +} diff --git a/tests/cases/conformance/types/spread/spreadOverwritesPropertyStrict.ts b/tests/cases/conformance/types/spread/spreadOverwritesPropertyStrict.ts new file mode 100644 index 0000000000000..65d53dcd77533 --- /dev/null +++ b/tests/cases/conformance/types/spread/spreadOverwritesPropertyStrict.ts @@ -0,0 +1,17 @@ +// @strict: true +declare var ab: { a: number, b: number }; +declare var abq: { a: number, b?: number }; +var unused1 = { b: 1, ...ab } // error +var unused2 = { ...ab, ...ab } // ok, overwritten error doesn't apply to spreads +var unused3 = { b: 1, ...abq } // ok, abq might have b: undefined +var unused4 = { ...ab, b: 1 } // ok, we don't care that b in ab is overwritten +var unused5 = { ...abq, b: 1 } // ok +function g(obj: { x: number | undefined }) { + return { x: 1, ...obj }; // ok, obj might have x: undefined +} +function f(obj: { x: number } | undefined) { + return { x: 1, ...obj }; // ok, obj might be undefined +} +function h(obj: { x: number } | { x: string }) { + return { x: 1, ...obj } // error +} diff --git a/tests/cases/conformance/types/thisType/thisTypeAccessibility.ts b/tests/cases/conformance/types/thisType/thisTypeAccessibility.ts index 6cdc9e712257c..1ceb3a06068ca 100644 --- a/tests/cases/conformance/types/thisType/thisTypeAccessibility.ts +++ b/tests/cases/conformance/types/thisType/thisTypeAccessibility.ts @@ -13,6 +13,15 @@ interface MyClass { extension3(p: number): void; } +class MyGenericClass { + private p: T; + protected pp: T; + public ppp: T; + private static sp: number; + protected static spp: number; + public static sppp: number; +} + MyClass.prototype.extension1 = function (this: MyClass, p: number) { this.p = p; this.pp = p; @@ -41,3 +50,12 @@ function extension3 (this: T, p: number) { } MyClass.prototype.extension3 = extension3; + +function extension4(this: MyGenericClass, p: T) { + this.p = p; + this.pp = p; + this.ppp = p; + MyGenericClass.sp = p; + MyGenericClass.spp = p; + MyGenericClass.sppp = p; +} diff --git a/tests/cases/docker/azure-sdk/Dockerfile b/tests/cases/docker/azure-sdk/Dockerfile index 627d7a63e9626..d6a919889311a 100644 --- a/tests/cases/docker/azure-sdk/Dockerfile +++ b/tests/cases/docker/azure-sdk/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /azure-sdk/sdk/core/core-http # Sync up all TS versions used internally so they're all linked from a known location RUN rush add -p "typescript@3.5.1" --dev -m # Relink installed TSes to built TS -WORKDIR /azure-sdk/common/temp/node_modules/.registry.npmjs.org/typescript/3.5.1/node_modules +WORKDIR /azure-sdk/common/temp/node_modules/.pnpm/registry.npmjs.org/typescript/3.5.1/node_modules RUN rm -rf typescript COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz RUN mkdir /typescript diff --git a/tests/cases/docker/office-ui-fabric/Dockerfile b/tests/cases/docker/office-ui-fabric/Dockerfile index c86d7c7a6bba6..8022d8f7debbc 100644 --- a/tests/cases/docker/office-ui-fabric/Dockerfile +++ b/tests/cases/docker/office-ui-fabric/Dockerfile @@ -1,4 +1,6 @@ FROM node:current +ENV CI=true +ENV TF_BUILD=true RUN npm install -g yarn lerna --force RUN git clone https://github.com/OfficeDev/office-ui-fabric-react.git /office-ui-fabric-react WORKDIR /office-ui-fabric-react @@ -18,4 +20,4 @@ RUN yarn add typescript@../../typescript.tgz --exact --ignore-scripts WORKDIR /office-ui-fabric-react RUN yarn ENTRYPOINT [ "lerna" ] -CMD [ "run", "build", "--stream", "--concurrency", "1", "--", "--production", "--lint" ] \ No newline at end of file +CMD [ "run", "build", "--stream", "--concurrency", "1", "--loglevel", "error", "--", "--production", "--lint", "--silent" ] \ No newline at end of file diff --git a/tests/cases/docker/rxjs/Dockerfile b/tests/cases/docker/rxjs/Dockerfile new file mode 100644 index 0000000000000..d9899c1c85e3f --- /dev/null +++ b/tests/cases/docker/rxjs/Dockerfile @@ -0,0 +1,14 @@ +FROM node:10 +RUN git clone https://github.com/ReactiveX/rxjs /rxjs +WORKDIR /rxjs +RUN git pull +COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz +RUN mkdir /typescript +RUN tar -xzvf /typescript.tgz -C /typescript +RUN rm ./package-lock.json +RUN npm i -D typescript@/typescript/package +RUN npm install +# Set entrypoint back to bash (`node` base image made it `node`) +ENTRYPOINT [ "/bin/bash", "-c" , "exec \"${@:0}\";"] +# Build +CMD npm run build_all \ No newline at end of file diff --git a/tests/cases/docker/vue-next/Dockerfile b/tests/cases/docker/vue-next/Dockerfile new file mode 100644 index 0000000000000..8fa6b9cb1577b --- /dev/null +++ b/tests/cases/docker/vue-next/Dockerfile @@ -0,0 +1,11 @@ +FROM node:current +RUN npm install -g yarn lerna --force +RUN git clone https://github.com/vuejs/vue-next.git /vue-next +WORKDIR /vue-next +RUN git pull +COPY --from=typescript/typescript /typescript/typescript-*.tgz typescript.tgz +# Sync up all TS versions used internally to the new one +RUN yarn add typescript@./typescript.tgz --exact --dev --ignore-scripts -W +RUN yarn +ENTRYPOINT [ "npm" ] +CMD [ "run", "build", "--production", "--", "--types" ] \ No newline at end of file diff --git a/tests/cases/fourslash/bestCommonTypeObjectLiterals.ts b/tests/cases/fourslash/bestCommonTypeObjectLiterals.ts new file mode 100644 index 0000000000000..1eac7edd26a4e --- /dev/null +++ b/tests/cases/fourslash/bestCommonTypeObjectLiterals.ts @@ -0,0 +1,37 @@ +/// + +////var a = { name: 'bob', age: 18 }; +////var b = { name: 'jim', age: 20 }; +////var /*1*/c = [a, b]; + +////var a1 = { name: 'bob', age: 18 }; +////var b1 = { name: 'jim', age: 20, dob: new Date() }; +////var /*2*/c1 = [a1, b1]; + +////var a2 = { name: 'bob', age: 18, address: 'springfield' }; +////var b2 = { name: 'jim', age: 20, dob: new Date() }; +////var /*3*/c2 = [a2, b2]; + +////interface I { +//// name: string; +//// age: number; +////} + +////var i: I; +////var /*4*/c3 = [i, a]; + +verify.quickInfos({ + 1: "var c: {\n name: string;\n age: number;\n}[]", + 2: "var c1: {\n name: string;\n age: number;\n}[]", + 3: + `var c2: ({ + name: string; + age: number; + address: string; +} | { + name: string; + age: number; + dob: Date; +})[]`, + 4: "var c3: {\n name: string;\n age: number;\n}[]" +}); diff --git a/tests/cases/fourslash/bestCommonTypeObjectLiterals1.ts b/tests/cases/fourslash/bestCommonTypeObjectLiterals1.ts index be076b9fe0254..cdad2f3729ea5 100644 --- a/tests/cases/fourslash/bestCommonTypeObjectLiterals1.ts +++ b/tests/cases/fourslash/bestCommonTypeObjectLiterals1.ts @@ -20,6 +20,9 @@ ////var i: I; ////var /*4*/c3 = [i, a]; +verify.quickInfos({ + 4: "var c3: I[]" +}); verify.quickInfos({ 1: "var c: {\n name: string;\n age: number;\n}[]", 2: "var c1: {\n name: string;\n age: number;\n}[]", diff --git a/tests/cases/fourslash/callHierarchyCrossFile.ts b/tests/cases/fourslash/callHierarchyCrossFile.ts new file mode 100644 index 0000000000000..240c2b258015b --- /dev/null +++ b/tests/cases/fourslash/callHierarchyCrossFile.ts @@ -0,0 +1,19 @@ +/// + +// @filename: /a.ts +////export function /**/createModelReference() {} + +// @filename: /b.ts +////import { createModelReference } from "./a"; +////function openElementsAtEditor() { +//// createModelReference(); +////} + +// @filename: /c.ts +////import { createModelReference } from "./a"; +////function registerDefaultLanguageCommand() { +//// createModelReference(); +////} + +goTo.marker(); +verify.baselineCallHierarchy(); diff --git a/tests/cases/fourslash/codeFixAddMissingAsync.ts b/tests/cases/fourslash/codeFixAddMissingAsync.ts new file mode 100644 index 0000000000000..f4c6876a17cff --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingAsync.ts @@ -0,0 +1,26 @@ +/// +////interface Stuff { +//// b: () => Promise; +////} +//// +////function foo(): Stuff | Date { +//// return { +//// b: () => "hello", +//// } +////} + +verify.codeFix({ + description: ts.Diagnostics.Add_async_modifier_to_containing_function.message, + index: 0, + newFileContent: +`interface Stuff { + b: () => Promise; +} + +function foo(): Stuff | Date { + return { + b: async () => "hello", + } +}` + }); + \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixAddMissingAsync2.ts b/tests/cases/fourslash/codeFixAddMissingAsync2.ts new file mode 100644 index 0000000000000..3f610ae141bbd --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingAsync2.ts @@ -0,0 +1,26 @@ +/// +////interface Stuff { +//// b: () => Promise; +////} +//// +////function foo(): Stuff | Date { +//// return { +//// b: _ => "hello", +//// } +////} + +verify.codeFix({ + description: ts.Diagnostics.Add_async_modifier_to_containing_function.message, + index: 0, + newFileContent: +`interface Stuff { + b: () => Promise; +} + +function foo(): Stuff | Date { + return { + b: async (_) => "hello", + } +}` + }); + \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixAddMissingMember14.ts b/tests/cases/fourslash/codeFixAddMissingMember14.ts new file mode 100644 index 0000000000000..8adc084677d45 --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingMember14.ts @@ -0,0 +1,18 @@ +/// + +////interface Foo {} +////class Foo {} +////Foo.test(); + +verify.codeFix({ + description: ignoreInterpolations(ts.Diagnostics.Declare_static_method_0), + index: 0, + newFileContent: +`interface Foo {} +class Foo { + static test() { + throw new Error("Method not implemented."); + } +} +Foo.test();` +}); diff --git a/tests/cases/fourslash/codeFixAddMissingMember15.ts b/tests/cases/fourslash/codeFixAddMissingMember15.ts new file mode 100644 index 0000000000000..fb0ab39b020a5 --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingMember15.ts @@ -0,0 +1,16 @@ +/// + +////interface Foo {} +////class Foo {} +////Foo.test; + +verify.codeFix({ + description: ignoreInterpolations(ts.Diagnostics.Declare_static_property_0), + index: 0, + newFileContent: +`interface Foo {} +class Foo { + static test: any; +} +Foo.test;` +}); diff --git a/tests/cases/fourslash/codeFixAddMissingMember16.ts b/tests/cases/fourslash/codeFixAddMissingMember16.ts new file mode 100644 index 0000000000000..6f3918af90632 --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingMember16.ts @@ -0,0 +1,9 @@ +/// + +////interface Foo {} +////namespace Foo { +//// export function bar() { } +////} +////Foo.test(); + +verify.not.codeFixAvailable(); diff --git a/tests/cases/fourslash/codeFixAddMissingSuperCall.ts b/tests/cases/fourslash/codeFixAddMissingSuperCall.ts new file mode 100644 index 0000000000000..6da7635074d0b --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingSuperCall.ts @@ -0,0 +1,22 @@ +/// + +////class A {} +////class B extends A { +//// [|constructor|]() {} +////} + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Add_missing_super_call.message } +]) + +verify.codeFix({ + description: ts.Diagnostics.Add_missing_super_call.message, + newFileContent: +`class A {} +class B extends A { + constructor() { + super(); + } +}` +}); + diff --git a/tests/cases/fourslash/codeFixAddMissingSuperCall1.ts b/tests/cases/fourslash/codeFixAddMissingSuperCall1.ts new file mode 100644 index 0000000000000..1f6a9b037cb03 --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingSuperCall1.ts @@ -0,0 +1,22 @@ +/// + +////class A {} +////class B extends A { +//// [|public constructor|]() {} +////} + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Add_missing_super_call.message } +]) + +verify.codeFix({ + description: ts.Diagnostics.Add_missing_super_call.message, + newFileContent: +`class A {} +class B extends A { + public constructor() { + super(); + } +}` +}); + diff --git a/tests/cases/fourslash/codeFixAddMissingSuperCall2.ts b/tests/cases/fourslash/codeFixAddMissingSuperCall2.ts new file mode 100644 index 0000000000000..119199c30f9ba --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingSuperCall2.ts @@ -0,0 +1,22 @@ +/// + +////class A {} +////class B extends A { +//// public [|constructor|]() {} +////} + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Add_missing_super_call.message } +]) + +verify.codeFix({ + description: ts.Diagnostics.Add_missing_super_call.message, + newFileContent: +`class A {} +class B extends A { + public constructor() { + super(); + } +}` +}); + diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceAutoImports.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceAutoImports.ts new file mode 100644 index 0000000000000..3a08ffa5e5a2a --- /dev/null +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceAutoImports.ts @@ -0,0 +1,40 @@ +/// + +// @Filename: types1.ts +////type A = {}; +////export default A; + +// @Filename: types2.ts +////export type B = {}; +////export type C = {}; +////export type D = {}; + +// @Filename: interface.ts +////import A from './types1'; +////import { B, C, D } from './types2'; +//// +////export interface Base { +//// a: A; +//// b(p1: C): D; +////} + +// @Filename: index.ts +////import { Base } from './interface'; +//// +////export class C implements Base {[| |]} + +goTo.file('index.ts'); +verify.codeFix({ + description: "Implement interface 'Base'", + newFileContent: +`import { Base } from './interface'; +import A from './types1'; +import { B, C, D } from './types2'; + +export class C implements Base { + a: A; + b(p1: C): D { + throw new Error("Method not implemented."); + } +}`, +}); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceAutoImports_typeOnly.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceAutoImports_typeOnly.ts new file mode 100644 index 0000000000000..9f261a72c2aed --- /dev/null +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceAutoImports_typeOnly.ts @@ -0,0 +1,42 @@ +/// + +// @importsNotUsedAsValues: error + +// @Filename: types1.ts +////type A = {}; +////export default A; + +// @Filename: types2.ts +////export type B = {}; +////export type C = {}; +////export type D = {}; + +// @Filename: interface.ts +////import type A from './types1'; +////import type { B, C, D } from './types2'; +//// +////export interface Base { +//// a: A; +//// b(p1: C): D; +////} + +// @Filename: index.ts +////import type { Base } from './interface'; +//// +////export class C implements Base {[| |]} + +goTo.file('index.ts'); +verify.codeFix({ + description: "Implement interface 'Base'", + newFileContent: +`import type { Base } from './interface'; +import type A from './types1'; +import type { B, C, D } from './types2'; + +export class C implements Base { + a: A; + b(p1: C): D { + throw new Error("Method not implemented."); + } +}`, +}); diff --git a/tests/cases/fourslash/codeFixClassImplementInterface_typeInOtherFile.ts b/tests/cases/fourslash/codeFixClassImplementInterface_typeInOtherFile.ts index ed5d29cd767aa..f1fb7d5f7ca03 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterface_typeInOtherFile.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterface_typeInOtherFile.ts @@ -15,10 +15,10 @@ goTo.file("/C.ts"); verify.codeFix({ description: "Implement interface 'I'", newFileContent: -`import { I } from "./I"; +`import { I, J } from "./I"; export class C implements I { - x: import("./I").J; - m(): import("./I").J { + x: J; + m(): J { throw new Error("Method not implemented."); } }`, diff --git a/tests/cases/fourslash/codeFixInferFromUsageContextualImport4.ts b/tests/cases/fourslash/codeFixInferFromUsageContextualImport4.ts new file mode 100644 index 0000000000000..fbb6336a869b0 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageContextualImport4.ts @@ -0,0 +1,34 @@ +/// + +// @strict: true +// @noImplicitAny: true +// @noLib: true + +// @Filename: /getEmail.ts +////import { User, Settings } from './a'; +////export declare function getEmail(user: User, settings: Settings): string; + +// @Filename: /a.ts +////export interface User {} +////export interface Settings {} + +// @Filename: /b.ts +////import { getEmail } from './getEmail'; +//// +////export function f([|user|], settings) { +//// getEmail(user, settings); +////} + +goTo.file("/b.ts"); + +verify.codeFix({ + index: 0, + description: "Infer parameter types from usage", + newFileContent: +`import { getEmail } from './getEmail'; +import { User, Settings } from './a'; + +export function f(user: User, settings: Settings) { + getEmail(user, settings); +}` +}); diff --git a/tests/cases/fourslash/codeFixInvalidJsxCharacters1.ts b/tests/cases/fourslash/codeFixInvalidJsxCharacters1.ts new file mode 100644 index 0000000000000..60495c8b8142a --- /dev/null +++ b/tests/cases/fourslash/codeFixInvalidJsxCharacters1.ts @@ -0,0 +1,19 @@ +/// + +// @jsx: react +// @filename: main.tsx + +//// let x1 =
}
; + +verify.codeFix({ + description: "Wrap invalid character in an expression container", + newFileContent: +`let x1 =
{'}'}
;`, + index: 0, +}); +verify.codeFix({ + description: "Convert invalid character to its html entity code", + newFileContent: +`let x1 =
}
;`, + index: 1, +}); diff --git a/tests/cases/fourslash/codeFixInvalidJsxCharacters2.ts b/tests/cases/fourslash/codeFixInvalidJsxCharacters2.ts new file mode 100644 index 0000000000000..ef8747d48652d --- /dev/null +++ b/tests/cases/fourslash/codeFixInvalidJsxCharacters2.ts @@ -0,0 +1,19 @@ +/// + +// @jsx: react +// @filename: main.tsx + +//// let x2 =
>
; + +verify.codeFix({ + description: "Wrap invalid character in an expression container", + newFileContent: +`let x2 =
{'>'}
;`, + index: 0, +}); +verify.codeFix({ + description: "Convert invalid character to its html entity code", + newFileContent: +`let x2 =
>
;`, + index: 1, +}); diff --git a/tests/cases/fourslash/codeFixInvalidJsxCharacters3.ts b/tests/cases/fourslash/codeFixInvalidJsxCharacters3.ts new file mode 100644 index 0000000000000..d9d97c0bec282 --- /dev/null +++ b/tests/cases/fourslash/codeFixInvalidJsxCharacters3.ts @@ -0,0 +1,19 @@ +/// + +// @jsx: react +// @filename: main.tsx + +//// let x3 =
{"foo"}}
; + +verify.codeFix({ + description: "Wrap invalid character in an expression container", + newFileContent: +`let x3 =
{"foo"}{'}'}
;`, + index: 0, +}); +verify.codeFix({ + description: "Convert invalid character to its html entity code", + newFileContent: +`let x3 =
{"foo"}}
;`, + index: 1, +}); diff --git a/tests/cases/fourslash/codeFixInvalidJsxCharacters4.ts b/tests/cases/fourslash/codeFixInvalidJsxCharacters4.ts new file mode 100644 index 0000000000000..cbb0e01d29377 --- /dev/null +++ b/tests/cases/fourslash/codeFixInvalidJsxCharacters4.ts @@ -0,0 +1,19 @@ +/// + +// @jsx: react +// @filename: main.tsx + +//// let x4 =
{"foo"}>
; + +verify.codeFix({ + description: "Wrap invalid character in an expression container", + newFileContent: +`let x4 =
{"foo"}{'>'}
;`, + index: 0, +}); +verify.codeFix({ + description: "Convert invalid character to its html entity code", + newFileContent: +`let x4 =
{"foo"}>
;`, + index: 1, +}); diff --git a/tests/cases/fourslash/codeFixInvalidJsxCharacters5.ts b/tests/cases/fourslash/codeFixInvalidJsxCharacters5.ts new file mode 100644 index 0000000000000..abc3e7ba16e1c --- /dev/null +++ b/tests/cases/fourslash/codeFixInvalidJsxCharacters5.ts @@ -0,0 +1,19 @@ +/// + +// @jsx: react +// @filename: main.tsx + +//// let x5 =
}{"foo"}
; + +verify.codeFix({ + description: "Wrap invalid character in an expression container", + newFileContent: +`let x5 =
{'}'}{"foo"}
;`, + index: 0, +}); +verify.codeFix({ + description: "Convert invalid character to its html entity code", + newFileContent: +`let x5 =
}{"foo"}
;`, + index: 1, +}); diff --git a/tests/cases/fourslash/codeFixInvalidJsxCharacters6.ts b/tests/cases/fourslash/codeFixInvalidJsxCharacters6.ts new file mode 100644 index 0000000000000..f29e9ed2b8b2c --- /dev/null +++ b/tests/cases/fourslash/codeFixInvalidJsxCharacters6.ts @@ -0,0 +1,19 @@ +/// + +// @jsx: react +// @filename: main.tsx + +//// let x6 =
>{"foo"}
; + +verify.codeFix({ + description: "Wrap invalid character in an expression container", + newFileContent: +`let x6 =
{'>'}{"foo"}
;`, + index: 0, +}); +verify.codeFix({ + description: "Convert invalid character to its html entity code", + newFileContent: +`let x6 =
>{"foo"}
;`, + index: 1, +}); diff --git a/tests/cases/fourslash/completionForStringLiteral_quotePreference.ts b/tests/cases/fourslash/completionForStringLiteral_quotePreference.ts new file mode 100644 index 0000000000000..62d2fef2a751e --- /dev/null +++ b/tests/cases/fourslash/completionForStringLiteral_quotePreference.ts @@ -0,0 +1,25 @@ +/// + +////enum A { +//// A, +//// B, +//// C +////} +////interface B { +//// a: keyof typeof A; +////} +////const b: B = { +//// a: /**/ +////} + +verify.completions({ + marker: "", + includes: [ + { name: "'A'" }, + { name: "'B'" }, + { name: "'C'" }, + ], + preferences: { + quotePreference: 'single', + }, +}); diff --git a/tests/cases/fourslash/completionForStringLiteral_quotePreference1.ts b/tests/cases/fourslash/completionForStringLiteral_quotePreference1.ts new file mode 100644 index 0000000000000..7f244f5d1670b --- /dev/null +++ b/tests/cases/fourslash/completionForStringLiteral_quotePreference1.ts @@ -0,0 +1,23 @@ +/// + +////enum A { +//// A, +//// B, +//// C +////} +////interface B { +//// a: keyof typeof A; +////} +////const b: B = { +//// a: /**/ +////} + +verify.completions({ + marker: "", + includes: [ + { name: '"A"' }, + { name: '"B"' }, + { name: '"C"' }, + ], + preferences: { quotePreference: "double" }, +}); diff --git a/tests/cases/fourslash/completionForStringLiteral_quotePreference2.ts b/tests/cases/fourslash/completionForStringLiteral_quotePreference2.ts new file mode 100644 index 0000000000000..f81afc56f417c --- /dev/null +++ b/tests/cases/fourslash/completionForStringLiteral_quotePreference2.ts @@ -0,0 +1,17 @@ +/// + +////const a = { +//// '#': 'a' +////}; +////a[|./**/|] + +verify.completions({ + marker: "", + includes: [ + { name: "#", insertText: "['#']", replacementSpan: test.ranges()[0] }, + ], + preferences: { + includeInsertTextCompletions: true, + quotePreference: "single", + }, +}); diff --git a/tests/cases/fourslash/completionForStringLiteral_quotePreference3.ts b/tests/cases/fourslash/completionForStringLiteral_quotePreference3.ts new file mode 100644 index 0000000000000..1045a03fcb02e --- /dev/null +++ b/tests/cases/fourslash/completionForStringLiteral_quotePreference3.ts @@ -0,0 +1,17 @@ +/// + +////const a = { +//// "#": "a" +////}; +////a[|./**/|] + +verify.completions({ + marker: "", + includes: [ + { name: "#", insertText: '["#"]', replacementSpan: test.ranges()[0] }, + ], + preferences: { + includeInsertTextCompletions: true, + quotePreference: "double" + }, +}); diff --git a/tests/cases/fourslash/completionForStringLiteral_quotePreference4.ts b/tests/cases/fourslash/completionForStringLiteral_quotePreference4.ts new file mode 100644 index 0000000000000..300720b8d06c5 --- /dev/null +++ b/tests/cases/fourslash/completionForStringLiteral_quotePreference4.ts @@ -0,0 +1,13 @@ +/// + +////type T = 0 | 1; +////const t: T = /**/ + +verify.completions({ + marker: "", + includes: [ + { name: "0" }, + { name: "1" }, + ], + isNewIdentifierLocation: true +}); diff --git a/tests/cases/fourslash/completionForStringLiteral_quotePreference5.ts b/tests/cases/fourslash/completionForStringLiteral_quotePreference5.ts new file mode 100644 index 0000000000000..455ac73bb7711 --- /dev/null +++ b/tests/cases/fourslash/completionForStringLiteral_quotePreference5.ts @@ -0,0 +1,14 @@ +/// + +////type T = "0" | "1"; +////const t: T = /**/ + +verify.completions({ + marker: "", + includes: [ + { name: "'1'" }, + { name: "'0'" }, + ], + isNewIdentifierLocation: true, + preferences: { quotePreference: "single" } +}); diff --git a/tests/cases/fourslash/completionForStringLiteral_quotePreference6.ts b/tests/cases/fourslash/completionForStringLiteral_quotePreference6.ts new file mode 100644 index 0000000000000..c54445faa2b64 --- /dev/null +++ b/tests/cases/fourslash/completionForStringLiteral_quotePreference6.ts @@ -0,0 +1,14 @@ +/// + +////type T = "0" | "1"; +////const t: T = /**/ + +verify.completions({ + marker: "", + includes: [ + { name: '"1"' }, + { name: '"0"' }, + ], + isNewIdentifierLocation: true, + preferences: { quotePreference: "double" } +}); diff --git a/tests/cases/fourslash/completionsGenericIndexedAccess3.ts b/tests/cases/fourslash/completionsGenericIndexedAccess3.ts new file mode 100644 index 0000000000000..730cdd8f631dd --- /dev/null +++ b/tests/cases/fourslash/completionsGenericIndexedAccess3.ts @@ -0,0 +1,35 @@ +/// + +////interface CustomElements { +//// 'component-one': { +//// foo?: string; +//// }, +//// 'component-two': { +//// bar?: string; +//// } +////} +//// +////interface Options { +//// props: CustomElements[T]; +////} +//// +////declare function create(name: T, options: Options): void; +//// +////create('component-one', { props: { /*1*/ } }); +////create('component-two', { props: { /*2*/ } }); + +verify.completions({ + marker: "1", + exact: [{ + name: "foo", + sortText: completion.SortText.OptionalMember + }] +}); + +verify.completions({ + marker: "2", + exact: [{ + name: "bar", + sortText: completion.SortText.OptionalMember + }] +}); diff --git a/tests/cases/fourslash/completionsGenericIndexedAccess4.ts b/tests/cases/fourslash/completionsGenericIndexedAccess4.ts new file mode 100644 index 0000000000000..0edeaedf9821f --- /dev/null +++ b/tests/cases/fourslash/completionsGenericIndexedAccess4.ts @@ -0,0 +1,45 @@ +/// + +////interface CustomElements { +//// 'component-one': { +//// foo?: string; +//// }, +//// 'component-two': { +//// bar?: string; +//// } +////} +//// +////interface Options { +//// props: CustomElements[T]; +////} +//// +////declare function create(name: T, options: Options): void; +////declare function create(name: T, options: Options): void; +//// +////create('hello', { props: { /*1*/ } }) +////create('goodbye', { props: { /*2*/ } }) +////create('component-one', { props: { /*3*/ } }); + +verify.completions({ + marker: "1", + exact: [{ + name: "foo", + sortText: completion.SortText.OptionalMember + }] +}); + +verify.completions({ + marker: "2", + exact: [{ + name: "bar", + sortText: completion.SortText.OptionalMember + }] +}); + +verify.completions({ + marker: "3", + exact: [{ + name: "foo", + sortText: completion.SortText.OptionalMember + }] +}); diff --git a/tests/cases/fourslash/completionsGenericIndexedAccess5.ts b/tests/cases/fourslash/completionsGenericIndexedAccess5.ts new file mode 100644 index 0000000000000..70ac6214d88b7 --- /dev/null +++ b/tests/cases/fourslash/completionsGenericIndexedAccess5.ts @@ -0,0 +1,30 @@ +/// + +////interface CustomElements { +//// 'component-one': { +//// foo?: string; +//// }, +//// 'component-two': { +//// bar?: string; +//// } +////} +//// +////interface Options { +//// props?: {} & { x: CustomElements[(T extends string ? T : never) & string][] }['x']; +////} +//// +////declare function f(k: T, options: Options): void; +//// +////f("component-one", { +//// props: [{ +//// /**/ +//// }] +////}) + +verify.completions({ + marker: "", + exact: [{ + name: "foo", + sortText: completion.SortText.OptionalMember + }] +}); diff --git a/tests/cases/fourslash/completionsGenericIndexedAccess6.ts b/tests/cases/fourslash/completionsGenericIndexedAccess6.ts new file mode 100644 index 0000000000000..ae77524709393 --- /dev/null +++ b/tests/cases/fourslash/completionsGenericIndexedAccess6.ts @@ -0,0 +1,25 @@ +/// + +// @Filename: component.tsx + +////interface CustomElements { +//// 'component-one': { +//// foo?: string; +//// }, +//// 'component-two': { +//// bar?: string; +//// } +////} +//// +////type Options = { kind: T } & Required<{ x: CustomElements[(T extends string ? T : never) & string] }['x']>; +//// +////declare function Component(props: Options): void; +//// +////const c = + +verify.completions({ + marker: "", + exact: [{ + name: "foo" + }] +}) diff --git a/tests/cases/fourslash/completionsObjectLiteralWithPartialConstraint.ts b/tests/cases/fourslash/completionsObjectLiteralWithPartialConstraint.ts new file mode 100644 index 0000000000000..ebd47f3d9a995 --- /dev/null +++ b/tests/cases/fourslash/completionsObjectLiteralWithPartialConstraint.ts @@ -0,0 +1,64 @@ +/// + +////interface MyOptions { +//// hello?: boolean; +//// world?: boolean; +////} +////declare function bar(options?: Partial): void; +////bar({ hello: true, /*1*/ }); +//// +////interface Test { +//// keyPath?: string; +//// autoIncrement?: boolean; +////} +//// +////function test>(opt: T) { } +//// +////test({ +//// a: { +//// keyPath: 'x.y', +//// autoIncrement: true +//// }, +//// b: { +//// /*2*/ +//// } +////}); +////type Colors = { +//// rgb: { r: number, g: number, b: number }; +//// hsl: { h: number, s: number, l: number } +////}; +//// +////function createColor(kind: T, values: Colors[T]) { } +//// +////createColor('rgb', { +//// /*3*/ +////}); +//// +////declare function f(x: T, y: { a: U, b: V }[T]): void; +//// +////f('a', { +//// /*4*/ +////}); +//// +////declare function f2(x: T): void; +////f2({ +//// /*5*/ +////}); +//// +////type X = { a: { a }, b: { b } } +//// +////function f4(p: { kind: T } & X[T]) { } +//// +////f4({ +//// kind: "a", +//// /*6*/ +////}) + +verify.completions( + { marker: "1", exact: [{ name: "world", sortText: completion.SortText.OptionalMember }] }, + { marker: "2", exact: [{ name: "keyPath", sortText: completion.SortText.OptionalMember }, { name: "autoIncrement", sortText: completion.SortText.OptionalMember }] }, + { marker: "3", exact: ["r", "g", "b"] }, + { marker: "4", exact: [{ name: "a", sortText: completion.SortText.OptionalMember }] }, + { marker: "5", exact: [{ name: "x", sortText: completion.SortText.OptionalMember }] }, + { marker: "6", exact: ["a"] }, +); \ No newline at end of file diff --git a/tests/cases/fourslash/convertFunctionToEs6Class_noQuickInfoForIIFE.ts b/tests/cases/fourslash/convertFunctionToEs6Class_noQuickInfoForIIFE.ts new file mode 100644 index 0000000000000..9211fecd911c3 --- /dev/null +++ b/tests/cases/fourslash/convertFunctionToEs6Class_noQuickInfoForIIFE.ts @@ -0,0 +1,14 @@ +/// + +// @allowJs: true + +// @Filename: /a.js +////(/*1*/function () { +//// const foo = () => { +//// this.x = 10; +//// }; +//// foo; +////})(); + +goTo.marker("1"); +verify.not.codeFixAvailable() diff --git a/tests/cases/fourslash/docCommentTemplateClassDeclProperty01.ts b/tests/cases/fourslash/docCommentTemplateClassDeclProperty01.ts new file mode 100644 index 0000000000000..ee235f34cec3b --- /dev/null +++ b/tests/cases/fourslash/docCommentTemplateClassDeclProperty01.ts @@ -0,0 +1,39 @@ +/// + +const singleLineOffset = 3; +const multiLineOffset = 12; + + +////class C { +//// /** /*0*/ */ +//// foo = (p0) => { +//// return p0; +//// }; +//// /*1*/ +//// bar = (p1) => { +//// return p1; +//// } +//// /*2*/ +//// baz = function (p2, p3) { +//// return p2; +//// } +////} + +verify.docCommentTemplateAt("0", multiLineOffset, + `/** + * + * @param p0 + */`); +verify.docCommentTemplateAt("1", multiLineOffset, + `/** + * + * @param p1 + */`); +verify.docCommentTemplateAt("2", multiLineOffset, + `/** + * + * @param p2 + * @param p3 + */`); + + diff --git a/tests/cases/fourslash/emptyExportFindReferences.ts b/tests/cases/fourslash/emptyExportFindReferences.ts new file mode 100644 index 0000000000000..84995a2ae93aa --- /dev/null +++ b/tests/cases/fourslash/emptyExportFindReferences.ts @@ -0,0 +1,10 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +//// /**/module.exports = { +//// +//// } + +goTo.marker(); +verify.occurrencesAtPositionCount(1); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsExportEquals.ts b/tests/cases/fourslash/findAllRefsExportEquals.ts index 647023b43ff60..f0fb88e5ab3d6 100644 --- a/tests/cases/fourslash/findAllRefsExportEquals.ts +++ b/tests/cases/fourslash/findAllRefsExportEquals.ts @@ -14,4 +14,4 @@ const b = { definition: '(alias) type T = number\nimport T = require("./a")', ra verify.referenceGroups([r0, r2], [a, b]); verify.referenceGroups(r3, [b, a]); verify.referenceGroups(r4, [mod, a, b]); -verify.referenceGroups(r1, [mod]); +verify.referenceGroups(r1, [a, b]); diff --git a/tests/cases/fourslash/findAllRefsInExport1.ts b/tests/cases/fourslash/findAllRefsInExport1.ts deleted file mode 100644 index 02ec901177f33..0000000000000 --- a/tests/cases/fourslash/findAllRefsInExport1.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// - -//// class C {} -//// /*1*/export { C /*2*/as D }; - -goTo.marker("1"); -verify.noReferences(); - -goTo.marker("2"); -verify.noReferences(); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefs_importType_exportEquals.ts b/tests/cases/fourslash/findAllRefs_importType_exportEquals.ts index 61e66de94cac5..59967af0d9ce5 100644 --- a/tests/cases/fourslash/findAllRefs_importType_exportEquals.ts +++ b/tests/cases/fourslash/findAllRefs_importType_exportEquals.ts @@ -19,7 +19,7 @@ verify.referenceGroups(r1, [{ definition: "namespace T", ranges: [r1, r2] }]); const t: FourSlashInterface.ReferenceGroup = { definition: "type T = number\nnamespace T", ranges: [r0, r1, r2, r3] }; verify.referenceGroups(r2, [t]); verify.referenceGroups([r3, r4], [{ definition: 'module "/a"', ranges: [r4, rExport] }, t]); -verify.referenceGroups(rExport, [{ definition: 'module "/a"', ranges: [r3, r4, rExport] }]); +verify.referenceGroups(rExport, [t]); verify.renameLocations(r0, [r0, r2]); verify.renameLocations(r1, [r1, r2]); diff --git a/tests/cases/fourslash/findAllRefs_importType_js.ts b/tests/cases/fourslash/findAllRefs_importType_js.ts index 0f952ae28e3ca..ee57b862066d1 100644 --- a/tests/cases/fourslash/findAllRefs_importType_js.ts +++ b/tests/cases/fourslash/findAllRefs_importType_js.ts @@ -18,6 +18,11 @@ verify.noErrors(); // TODO: GH#24025 const [rModuleDef, rModule, r0Def, r0, r1Def, r1, r2Def, r2, r3Def, r3, r4Def, r4, r5] = test.ranges(); +verify.referenceGroups([r3, r4], [ + { definition: 'module "/a"', ranges: [r4, rModule] }, + { definition: "(local class) C", ranges: [r0] }, + { definition: "(alias) (local class) export=\nimport export=", ranges: [r3] }, +]); verify.referenceGroups(rModule, [{ definition: 'module "/a"', ranges: [r3, r4, rModule] }]); verify.referenceGroups(r0, [ { definition: "(local class) C", ranges: [r0] }, @@ -33,6 +38,6 @@ verify.referenceGroups(r2, [ ]); verify.referenceGroups([r3, r4], [ { definition: 'module "/a"', ranges: [r4, rModule] }, - { definition: "(local class) C", ranges: [r0] }, - { definition: "(alias) (local class) export=\nimport export=", ranges: [r3] }, + //{ definition: "(local class) C", ranges: [r0] }, + //{ definition: "(alias) (local class) export=\nimport export=", ranges: [r3] }, ]); diff --git a/tests/cases/fourslash/formatNoSpaceBeforeCloseBrace.ts b/tests/cases/fourslash/formatNoSpaceBeforeCloseBrace.ts new file mode 100644 index 0000000000000..931d06df8aecc --- /dev/null +++ b/tests/cases/fourslash/formatNoSpaceBeforeCloseBrace.ts @@ -0,0 +1,6 @@ +/// + +////foo(1, /* comment */ ); + +format.document(); +verify.currentFileContentIs(`foo(1, /* comment */);`); diff --git a/tests/cases/fourslash/formatNoSpaceBeforeCloseBrace1.ts b/tests/cases/fourslash/formatNoSpaceBeforeCloseBrace1.ts new file mode 100644 index 0000000000000..b71ca4a261745 --- /dev/null +++ b/tests/cases/fourslash/formatNoSpaceBeforeCloseBrace1.ts @@ -0,0 +1,6 @@ +/// + +////new Foo(1, /* comment */ ); + +format.document(); +verify.currentFileContentIs(`new Foo(1, /* comment */);`); diff --git a/tests/cases/fourslash/formatNoSpaceBeforeCloseBrace2.ts b/tests/cases/fourslash/formatNoSpaceBeforeCloseBrace2.ts new file mode 100644 index 0000000000000..a227ac4ec1e48 --- /dev/null +++ b/tests/cases/fourslash/formatNoSpaceBeforeCloseBrace2.ts @@ -0,0 +1,6 @@ +/// + +////new Foo(1, ); + +format.document(); +verify.currentFileContentIs(`new Foo(1,);`); diff --git a/tests/cases/fourslash/formatTsxClosingAfterJsxText.ts b/tests/cases/fourslash/formatTsxClosingAfterJsxText.ts new file mode 100644 index 0000000000000..36c5cd2688416 --- /dev/null +++ b/tests/cases/fourslash/formatTsxClosingAfterJsxText.ts @@ -0,0 +1,31 @@ +/// +// @Filename: foo.tsx +//// +////const a = ( +////
+//// text +////
+////) +////const b = ( +////
+//// text +//// twice +////
+////) +//// + + +format.document(); +verify.currentFileContentIs(` +const a = ( +
+ text +
+) +const b = ( +
+ text + twice +
+) +`); diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index f7c2932511a7a..beb9d0c4d841f 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -317,7 +317,7 @@ declare namespace FourSlashInterface { baselineQuickInfo(): void; baselineSmartSelection(): void; nameOrDottedNameSpanTextIs(text: string): void; - outliningSpansInCurrentFile(spans: Range[]): void; + outliningSpansInCurrentFile(spans: Range[], kind?: "comment" | "region" | "code" | "imports"): void; outliningHintSpansInCurrentFile(spans: Range[]): void; todoCommentsInCurrentFile(descriptors: string[]): void; matchingBracePositionInCurrentFile(bracePosition: number, expectedMatchPosition: number): void; @@ -359,6 +359,7 @@ declare namespace FourSlashInterface { renameInfoSucceeded(displayName?: string, fullDisplayName?: string, kind?: string, kindModifiers?: string, fileToRename?: string, range?: Range, allowRenameOfImportPath?: boolean): void; renameInfoFailed(message?: string, allowRenameOfImportPath?: boolean): void; renameLocations(startRanges: ArrayOrSingle, options: RenameLocationsOptions): void; + baselineRename(marker: string, options: RenameOptions): void; /** Verify the quick info available at the current marker. */ quickInfoIs(expectedText: string, expectedDocumentation?: string): void; @@ -723,6 +724,8 @@ declare namespace FourSlashInterface { readonly ranges: ReadonlyArray; readonly providePrefixAndSuffixTextForRename?: boolean; }; + + type RenameOptions = { readonly findInStrings?: boolean, readonly findInComments?: boolean, readonly providePrefixAndSuffixTextForRename?: boolean }; type RenameLocationOptions = Range | { readonly range: Range, readonly prefixText?: string, readonly suffixText?: string }; type DiagnosticIgnoredInterpolations = { template: string } } diff --git a/tests/cases/fourslash/getRenameInfoTests2.ts b/tests/cases/fourslash/getRenameInfoTests2.ts index 93e8e451b4a16..880bca7378a62 100644 --- a/tests/cases/fourslash/getRenameInfoTests2.ts +++ b/tests/cases/fourslash/getRenameInfoTests2.ts @@ -1,6 +1,6 @@ /// -/////**/class C { +////class C /**/extends null { //// ////} diff --git a/tests/cases/fourslash/highlightsForExportFromUnfoundModule.ts b/tests/cases/fourslash/highlightsForExportFromUnfoundModule.ts new file mode 100644 index 0000000000000..146441505d574 --- /dev/null +++ b/tests/cases/fourslash/highlightsForExportFromUnfoundModule.ts @@ -0,0 +1,17 @@ +/// + +// @allowJs: true + +// @Filename: a.js +//// import foo from 'unfound'; +//// export { +//// foo, +//// }; + +// @Filename: b.js +//// export { +//// /**/foo +//// } from './a'; + +goTo.marker(); +verify.baselineRename("", { }); diff --git a/tests/cases/fourslash/importNameCodeFix_typeOnly.ts b/tests/cases/fourslash/importNameCodeFix_typeOnly.ts new file mode 100644 index 0000000000000..ad16ea4203229 --- /dev/null +++ b/tests/cases/fourslash/importNameCodeFix_typeOnly.ts @@ -0,0 +1,16 @@ +/// + +// @importsNotUsedAsValues: error + +// @Filename: types.ts +////export class A {} + +// @Filename: index.ts +////const a: /**/A + +goTo.marker(""); +verify.importFixAtPosition([ +`import type { A } from "./types"; + +const a: A` +]); diff --git a/tests/cases/fourslash/importNameCodeFix_typeOnly2.ts b/tests/cases/fourslash/importNameCodeFix_typeOnly2.ts new file mode 100644 index 0000000000000..534275fd6e3c2 --- /dev/null +++ b/tests/cases/fourslash/importNameCodeFix_typeOnly2.ts @@ -0,0 +1,19 @@ +/// + +// @importsNotUsedAsValues: error + +// @Filename: types.ts +////export class A {} + +// @Filename: index.ts +////const a: A = new A(); + +goTo.file("index.ts"); +verify.codeFixAll({ + fixAllDescription: ts.Diagnostics.Add_all_missing_imports.message, + fixId: "fixMissingImport", + newFileContent: +`import { A } from "./types"; + +const a: A = new A();` +}); diff --git a/tests/cases/fourslash/outlineSpansBlockCommentsWithoutStatements.ts b/tests/cases/fourslash/outlineSpansBlockCommentsWithoutStatements.ts new file mode 100644 index 0000000000000..1d0fd91e78327 --- /dev/null +++ b/tests/cases/fourslash/outlineSpansBlockCommentsWithoutStatements.ts @@ -0,0 +1,9 @@ +/// + +// #22732 + +////[|/* +///// * Some text +//// */|] + +verify.outliningHintSpansInCurrentFile(test.ranges()); diff --git a/tests/cases/fourslash/outlineSpansTrailingBlockCommentsAfterStatements.ts b/tests/cases/fourslash/outlineSpansTrailingBlockCommentsAfterStatements.ts new file mode 100644 index 0000000000000..2397be94b56f1 --- /dev/null +++ b/tests/cases/fourslash/outlineSpansTrailingBlockCommentsAfterStatements.ts @@ -0,0 +1,10 @@ +/// + +// #22732 + +////console.log(0); +////[|/* +///// * Some text +//// */|] + +verify.outliningHintSpansInCurrentFile(test.ranges()); diff --git a/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts b/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts index 58cc8159b926c..b330d87b22324 100644 --- a/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts +++ b/tests/cases/fourslash/quickInfoDisplayPartsParameters.ts @@ -1,10 +1,11 @@ /// -////function /*1*/foo(/*2*/param: string, /*3*/optionalParam?: string, /*4*/paramWithInitializer = "hello", .../*5*/restParam: string[]) { -//// /*6*/param = "Hello"; -//// /*7*/optionalParam = "World"; -//// /*8*/paramWithInitializer = "Hello"; -//// /*9*/restParam[0] = "World"; -////} +//// /** @return *crunch* */ +//// function /*1*/foo(/*2*/param: string, /*3*/optionalParam?: string, /*4*/paramWithInitializer = "hello", .../*5*/restParam: string[]) { +//// /*6*/param = "Hello"; +//// /*7*/optionalParam = "World"; +//// /*8*/paramWithInitializer = "Hello"; +//// /*9*/restParam[0] = "World"; +//// } -verify.baselineQuickInfo(); \ No newline at end of file +verify.baselineQuickInfo(); diff --git a/tests/cases/fourslash/quickfixImplementInterfaceUnreachableTypeUsesRelativeImport.ts b/tests/cases/fourslash/quickfixImplementInterfaceUnreachableTypeUsesRelativeImport.ts index ba6cd702ea00f..5db9047035513 100644 --- a/tests/cases/fourslash/quickfixImplementInterfaceUnreachableTypeUsesRelativeImport.ts +++ b/tests/cases/fourslash/quickfixImplementInterfaceUnreachableTypeUsesRelativeImport.ts @@ -17,10 +17,12 @@ verify.codeFix({ index: 0, description: "Implement interface 'Foo'", newFileContent: { - "/tests/cases/fourslash/index.ts": `import { Foo } from './interface'; + "/tests/cases/fourslash/index.ts": +`import { Foo } from './interface'; +import { Class } from './class'; class X implements Foo { - x: import("./class").Class; + x: Class; }` } }); diff --git a/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_OnModuleSpecifier.ts b/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_OnModuleSpecifier.ts new file mode 100644 index 0000000000000..850a2d2863fc8 --- /dev/null +++ b/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_OnModuleSpecifier.ts @@ -0,0 +1,6 @@ +/// + +////import { x } from /*x*/"foo"/*y*/; + +goTo.select("x", "y"); +verify.not.refactorAvailable(ts.Diagnostics.Convert_to_template_string.message); diff --git a/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateBackTick.ts b/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateBackTick.ts index fcb1998dfd058..1e4ffa0b49e38 100644 --- a/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateBackTick.ts +++ b/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateBackTick.ts @@ -3,10 +3,4 @@ //// const foo = "/*x*/w/*y*/ith back`tick" goTo.select("x", "y"); -edit.applyRefactor({ - refactorName: "Convert to template string", - actionName: "Convert to template string", - actionDescription: ts.Diagnostics.Convert_to_template_string.message, - newContent: -"const foo = `with back\\`tick`", -}); +verify.not.refactorAvailable(ts.Diagnostics.Convert_to_template_string.message); diff --git a/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateBinaryExprSingleQuote.ts b/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateBinaryExprSingleQuote.ts new file mode 100644 index 0000000000000..1063ad2ac77c7 --- /dev/null +++ b/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateBinaryExprSingleQuote.ts @@ -0,0 +1,12 @@ +/// + +//// const foo = '/*x*/f/*y*/oobar is ' + (42 + 6) + ' years old' + +goTo.select("x", "y"); +edit.applyRefactor({ + refactorName: "Convert to template string", + actionName: "Convert to template string", + actionDescription: ts.Diagnostics.Convert_to_template_string.message, + newContent: +`const foo = \`foobar is \${42 + 6} years old\``, +}); diff --git a/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateSimple.ts b/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateSimple.ts index 11fee10594b8a..86b1300ad0184 100644 --- a/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateSimple.ts +++ b/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateSimple.ts @@ -3,10 +3,4 @@ //// const foo = "/*x*/f/*y*/oobar rocks" goTo.select("x", "y"); -edit.applyRefactor({ - refactorName: "Convert to template string", - actionName: "Convert to template string", - actionDescription: ts.Diagnostics.Convert_to_template_string.message, - newContent: -`const foo = \`foobar rocks\``, -}); +verify.not.refactorAvailable(ts.Diagnostics.Convert_to_template_string.message); \ No newline at end of file diff --git a/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateSingleQuote.ts b/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateSingleQuote.ts index 0b6c94dadcddb..8883cbb3ae35e 100644 --- a/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateSingleQuote.ts +++ b/tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateSingleQuote.ts @@ -3,10 +3,4 @@ //// const foo = '/*x*/f/*y*/oobar rocks' goTo.select("x", "y"); -edit.applyRefactor({ - refactorName: "Convert to template string", - actionName: "Convert to template string", - actionDescription: ts.Diagnostics.Convert_to_template_string.message, - newContent: -`const foo = \`foobar rocks\``, -}); +verify.not.refactorAvailable(ts.Diagnostics.Convert_to_template_string.message); diff --git a/tests/cases/fourslash/referencesForDeclarationKeywords.ts b/tests/cases/fourslash/referencesForDeclarationKeywords.ts new file mode 100644 index 0000000000000..aeb8870ee2388 --- /dev/null +++ b/tests/cases/fourslash/referencesForDeclarationKeywords.ts @@ -0,0 +1,89 @@ +/// +////[|{| "id": "baseDecl" |}class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "baseDecl" |}Base|] {}|] +////[|{| "id": "implemented1Decl" |}interface [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "implemented1Decl" |}Implemented1|] {}|] +////[|{| "id": "classDecl1" |}[|class|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "classDecl1" |}C1|] [|extends|] [|Base|] [|implements|] [|Implemented1|] { +//// [|{| "id": "getDecl" |}[|get|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "getDecl" |}e|]() { return 1; }|] +//// [|{| "id": "setDecl" |}[|set|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "setDecl" |}e|](v) {}|] +////}|] +////[|{| "id": "interfaceDecl1" |}[|interface|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "interfaceDecl1" |}I1|] [|extends|] [|Base|] { }|] +////[|{| "id": "typeDecl" |}[|type|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "typeDecl" |}T|] = { }|] +////[|{| "id": "enumDecl" |}[|enum|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "enumDecl" |}E|] { }|] +////[|{| "id": "namespaceDecl" |}[|namespace|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "namespaceDecl" |}N|] { }|] +////[|{| "id": "moduleDecl" |}[|module|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "moduleDecl" |}M|] { }|] +////[|{| "id": "functionDecl" |}[|function|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "functionDecl" |}fn|]() {}|] +////[|{| "id": "varDecl" |}[|var|] [|{| "isWriteAccess": false, "isDefinition": true, "contextRangeId": "varDecl" |}x|];|] +////[|{| "id": "letDecl" |}[|let|] [|{| "isWriteAccess": false, "isDefinition": true, "contextRangeId": "letDecl" |}y|];|] +////[|{| "id": "constDecl" |}[|const|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "constDecl" |}z|] = 1;|] +////interface Implemented2 {} +////interface Implemented3 {} +////class C2 [|implements|] Implemented2, Implemented3 {} +////interface I2 [|extends|] Implemented2, Implemented3 {} + +const [ + baseDecl, + baseDecl_name, + implemented1Decl, + implemented1Decl_name, + classDecl1, + classDecl1_classKeyword, + classDecl1_name, + classDecl1_extendsKeyword, + classDecl1_extendsName, + classDecl1_implementsKeyword, + classDecl1_implementsName, + getDecl, + getDecl_getKeyword, + getDecl_name, + setDecl, + setDecl_setKeyword, + setDecl_name, + interfaceDecl1, + interfaceDecl1_interfaceKeyword, + interfaceDecl1_name, + interfaceDecl1_extendsKeyword, + interfaceDecl1_extendsName, + typeDecl, + typeDecl_typeKeyword, + typeDecl_name, + enumDecl, + enumDecl_enumKeyword, + enumDecl_name, + namespaceDecl, + namespaceDecl_namespaceKeyword, + namespaceDecl_name, + moduleDecl, + moduleDecl_moduleKeyword, + moduleDecl_name, + functionDecl, + functionDecl_functionKeyword, + functionDecl_name, + varDecl, + varDecl_varKeyword, + varDecl_name, + letDecl, + letDecl_letKeyword, + letDecl_name, + constDecl, + constDecl_constKeyword, + constDecl_name, + classDecl2_implementsKeyword, + interfaceDecl2_extendsKeyword, +] = test.ranges(); +verify.referenceGroups(classDecl1_classKeyword, [{ definition: "class C1", ranges: [classDecl1_name] }]); +verify.referenceGroups(classDecl1_extendsKeyword, [{ definition: "class Base", ranges: [baseDecl_name, classDecl1_extendsName, interfaceDecl1_extendsName] }]); +verify.referenceGroups(classDecl1_implementsKeyword, [{ definition: "interface Implemented1", ranges: [implemented1Decl_name, classDecl1_implementsName] }]); +for (const keyword of [getDecl_getKeyword, setDecl_setKeyword]) { + verify.referenceGroups(keyword, [{ definition: "(property) C1.e: number", ranges: [getDecl_name, setDecl_name] }]); +} +verify.referenceGroups(interfaceDecl1_interfaceKeyword, [{ definition: "interface I1", ranges: [interfaceDecl1_name] }]); +verify.referenceGroups(interfaceDecl1_extendsKeyword, [{ definition: "class Base", ranges: [baseDecl_name, classDecl1_extendsName, interfaceDecl1_extendsName] }]); +verify.referenceGroups(typeDecl_typeKeyword, [{ definition: "type T = {}", ranges: [typeDecl_name] }]); +verify.referenceGroups(enumDecl_enumKeyword, [{ definition: "enum E", ranges: [enumDecl_name] }]); +verify.referenceGroups(namespaceDecl_namespaceKeyword, [{ definition: "namespace N", ranges: [namespaceDecl_name] }]); +verify.referenceGroups(moduleDecl_moduleKeyword, [{ definition: "namespace M", ranges: [moduleDecl_name] }]); +verify.referenceGroups(functionDecl_functionKeyword, [{ definition: "function fn(): void", ranges: [functionDecl_name] }]); +verify.referenceGroups(varDecl_varKeyword, [{ definition: "var x: any", ranges: [varDecl_name] }]); +verify.referenceGroups(letDecl_letKeyword, [{ definition: "let y: any", ranges: [letDecl_name] }]); +verify.referenceGroups(constDecl_constKeyword, [{ definition: "const z: 1", ranges: [constDecl_name] }]); +verify.noReferences(classDecl2_implementsKeyword); +verify.noReferences(interfaceDecl2_extendsKeyword); \ No newline at end of file diff --git a/tests/cases/fourslash/referencesForExpressionKeywords.ts b/tests/cases/fourslash/referencesForExpressionKeywords.ts new file mode 100644 index 0000000000000..c64919b765941 --- /dev/null +++ b/tests/cases/fourslash/referencesForExpressionKeywords.ts @@ -0,0 +1,44 @@ +/// + +////[|class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -1 |}C|] { +//// [|static [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -1 |}x|] = 1;|] +////}|] +////[|new|] [|C|](); +////[|void|] [|C|]; +////[|typeof|] [|C|]; +////[|delete|] [|C|].[|x|]; +////async function* f() { +//// [|yield|] [|C|]; +//// [|await|] [|C|]; +////} +////"x" [|in|] [|C|]; +////undefined [|instanceof|] [|C|]; +////undefined [|as|] [|C|]; + +const [ + classDecl, + classDecl_name, + fieldDecl, + fieldDecl_name, + newKeyword, + newC, + voidKeyword, + voidC, + typeofKeyword, + typeofC, + deleteKeyword, + deleteC, + deleteCx, + yieldKeyword, + yieldC, + awaitKeyword, + awaitC, + inKeyword, + inC, + instanceofKeyword, + instanceofC, + asKeyword, + asC, +] = test.ranges(); +verify.referenceGroups([newKeyword, voidKeyword, typeofKeyword, yieldKeyword, awaitKeyword, inKeyword, instanceofKeyword, asKeyword], [{ definition: "class C", ranges: [classDecl_name, newC, voidC, typeofC, deleteC, yieldC, awaitC, inC, instanceofC, asC] }]); +verify.referenceGroups(deleteKeyword, [{ definition: "(property) C.x: number", ranges: [fieldDecl_name, deleteCx] }]); \ No newline at end of file diff --git a/tests/cases/fourslash/referencesForModifiers.ts b/tests/cases/fourslash/referencesForModifiers.ts new file mode 100644 index 0000000000000..2cfa7eebce77b --- /dev/null +++ b/tests/cases/fourslash/referencesForModifiers.ts @@ -0,0 +1,27 @@ +/// + +////[|/*declareModifier*/declare /*abstractModifier*/abstract class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -1 |}C1|] { +//// [|/*staticModifier*/static [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -1 |}a|];|] +//// [|/*readonlyModifier*/readonly [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -1 |}b|];|] +//// [|/*publicModifier*/public [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -1 |}c|];|] +//// [|/*protectedModifier*/protected [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -1 |}d|];|] +//// [|/*privateModifier*/private [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -1 |}e|];|] +////}|] +////[|/*constModifier*/const enum [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -1 |}E|] { +////}|] +////[|/*asyncModifier*/async function [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -1 |}fn|]() {}|] +////[|/*exportModifier*/export /*defaultModifier*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -1 |}default|] class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}C2|] {}|] + +const [, classDef1,, aDef,, bDef,, cDef,, dDef,, eDef,, enumDef,, functionDef,, classDef2Default, classDef2Name] = test.ranges(); +for (const modifier of ["declareModifier", "abstractModifier"]) { + verify.referenceGroups(modifier, [{ definition: "class C1", ranges: [classDef1] }]); +} +verify.referenceGroups("staticModifier", [{ definition: "(property) C1.a: any", ranges: [aDef] }]); +verify.referenceGroups("readonlyModifier", [{ definition: "(property) C1.b: any", ranges: [bDef] }]); +verify.referenceGroups("publicModifier", [{ definition: "(property) C1.c: any", ranges: [cDef] }]); +verify.referenceGroups("protectedModifier", [{ definition: "(property) C1.d: any", ranges: [dDef] }]); +verify.referenceGroups("privateModifier", [{ definition: "(property) C1.e: any", ranges: [eDef] }]); +verify.referenceGroups("constModifier", [{ definition: "const enum E", ranges: [enumDef] }]); +verify.referenceGroups("asyncModifier", [{ definition: "function fn(): Promise", ranges: [functionDef] }]); +verify.referenceGroups("exportModifier", [{ definition: "class C2", ranges: [classDef2Name] }]); +verify.referenceGroups("defaultModifier", [{ definition: "class C2", ranges: [classDef2Default] }]); diff --git a/tests/cases/fourslash/referencesForStatementKeywords.ts b/tests/cases/fourslash/referencesForStatementKeywords.ts new file mode 100644 index 0000000000000..e5a171f0d9f10 --- /dev/null +++ b/tests/cases/fourslash/referencesForStatementKeywords.ts @@ -0,0 +1,272 @@ +/// + +// @filename: /main.ts +////// import ... = ... +////[|{| "id": "importEqualsDecl1" |}[|import|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "importEqualsDecl1" |}A|] = [|require|]("[|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "importEqualsDecl1" |}./a|]");|] +////[|{| "id": "namespaceDecl1" |}namespace [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "namespaceDecl1" |}N|] { }|] +////[|{| "id": "importEqualsDecl2" |}[|import|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "importEqualsDecl2" |}N2|] = [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "importEqualsDecl2" |}N|];|] +//// +////// import ... from ... +////[|{| "id": "importDecl1" |}[|import|] [|type|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "importDecl1" |}B|] [|from|] "[|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "importDecl1" |}./b|]";|] +////[|{| "id": "importDecl2" |}[|import|] [|type|] * [|as|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "importDecl2" |}C|] [|from|] "[|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "importDecl2" |}./c|]";|] +////[|{| "id": "importDecl3" |}[|import|] [|type|] { [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "importDecl3" |}D|] } [|from|] "[|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "importDecl3" |}./d|]";|] +////[|{| "id": "importDecl4" |}[|import|] [|type|] { e1, e2 [|as|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "importDecl4" |}e3|] } [|from|] "[|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "importDecl4" |}./e|]";|] +//// +////// import "module" +////[|{| "id": "importDecl5" |}[|import|] "[|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "importDecl5" |}./f|]";|] +//// +////// export ... from ... +////[|{| "id": "exportDecl1" |}[|export|] [|type|] * [|from|] "[|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "exportDecl1" |}./g|]";|] +////[|{| "id": "exportDecl2" |}[|export|] [|type|] [|{| "id": "exportDecl2_namespaceExport" |}* [|as|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "exportDecl2_namespaceExport" |}H|]|] [|from|] "[|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "exportDecl2" |}./h|]";|] +////[|{| "id": "exportDecl3" |}[|export|] [|type|] { [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "exportDecl3" |}I|] } [|from|] "[|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "exportDecl3" |}./i|]";|] +////[|{| "id": "exportDecl4" |}[|export|] [|type|] { j1, j2 [|as|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "exportDecl4" |}j3|] } [|from|] "[|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "exportDecl4" |}./j|]";|] +////[|{| "id": "typeDecl1" |}type [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "typeDecl1" |}Z1|] = 1;|] +////[|{| "id": "exportDecl5" |}[|export|] [|type|] { [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "exportDecl5" |}Z1|] };|] +////type Z2 = 2; +////type Z3 = 3; +////[|{| "id": "exportDecl6" |}[|export|] [|type|] { z2, z3 [|as|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "exportDecl6" |}z4|] };|] + +// @filename: /main2.ts +////[|{| "id": "varDecl1" |}const [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "varDecl1" |}x|] = {};|] +////[|{| "id": "exportAssignment1" |}[|export|] = [|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "exportAssignment1"|}x|];|] + +// @filename: /main3.ts +////[|{| "id": "varDecl3" |}const [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "varDecl3" |}y|] = {};|] +////[|{| "id": "exportAssignment2" |}[|export|] [|default|] [|{| "isWriteAccess": false, "isDefinition": false, "contextRangeId": "exportAssignment2"|}y|];|] + +// @filename: /a.ts +////export const a = 1; + +// @filename: /b.ts +////[|{| "id": "classDecl1" |}export default class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "classDecl1" |}B|] {}|] + +// @filename: /c.ts +////export const c = 1; + +// @filename: /d.ts +////[|{| "id": "classDecl2" |}export class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "classDecl2" |}D|] {}|] + +// @filename: /e.ts +////export const e1 = 1; +////export const e2 = 2; + +// @filename: /f.ts +////export const f = 1; + +// @filename: /g.ts +////export const g = 1; + +// @filename: /h.ts +////export const h = 1; + +// @filename: /i.ts +////[|{| "id": "classDecl3" |}export class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "classDecl3" |}I|] {}|] + +// @filename: /j.ts +////export const j1 = 1; +////export const j2 = 2; + +const [ + // main.ts + importEqualsDecl1, + importEqualsDecl1_importKeyword, + importEqualsDecl1_name, + importEqualsDecl1_requireKeyword, + importEqualsDecl1_module, + + namespaceDecl1, + namespaceDecl1_name, + + importEqualsDecl2, + importEqualsDecl2_importKeyword, + importEqualsDecl2_name, + importEqualsDecl2_reference, + + importDecl1, + importDecl1_importKeyword, + importDecl1_typeKeyword, + importDecl1_name, + importDecl1_fromKeyword, + importDecl1_module, + + importDecl2, + importDecl2_importKeyword, + importDecl2_typeKeyword, + importDecl2_asKeyword, + importDecl2_name, + importDecl2_fromKeyword, + importDecl2_module, + + importDecl3, + importDecl3_importKeyword, + importDecl3_typeKeyword, + importDecl3_name, + importDecl3_fromKeyword, + importDecl3_module, + + importDecl4, + importDecl4_importKeyword, + importDecl4_typeKeyword, + importDecl4_asKeyword, + importDecl4_name, + importDecl4_fromKeyword, + importDecl4_module, + + importDecl5, + importDecl5_importKeyword, + importDecl5_module, + + exportDecl1, + exportDecl1_exportKeyword, + exportDecl1_typeKeyword, + exportDecl1_fromKeyword, + exportDecl1_module, + + exportDecl2, + exportDecl2_exportKeyword, + exportDecl2_typeKeyword, + exportDecl2_namespaceExport, + exportDecl2_asKeyword, + exportDecl2_name, + exportDecl2_fromKeyword, + exportDecl2_module, + + exportDecl3, + exportDecl3_exportKeyword, + exportDecl3_typeKeyword, + exportDecl3_name, + exportDecl3_fromKeyword, + exportDecl3_module, + + exportDecl4, + exportDecl4_exportKeyword, + exportDecl4_typeKeyword, + exportDecl4_asKeyword, + exportDecl4_name, + exportDecl4_fromKeyword, + exportDecl4_module, + + typeDecl1, + typeDecl1_name, + + exportDecl5, + exportDecl5_exportKeyword, + exportDecl5_typeKeyword, + exportDecl5_name, + + exportDecl6, + exportDecl6_exportKeyword, + exportDecl6_typeKeyword, + exportDecl6_asKeyword, + exportDecl6_name, + + // main2.ts + varDecl1, + varDecl1_name, + + exportAssignment1, + exportAssignment1_exportKeyword, + exportAssignment1_name, + + // main3.ts + varDecl2, + varDecl2_name, + + exportAssignment2, + exportAssignment2_exportKeyword, + exportAssignment2_defaultKeyword, + exportAssignment2_name, + + // a.ts + // b.ts + classDecl1, + classDecl1_name, + + // c.ts + // d.ts + classDecl2, + classDecl2_name, + + // e.ts + // f.ts + // g.ts + // h.ts + // i.ts + classDecl3, + classDecl3_name, + // j.ts + +] = test.ranges(); + + +// importEqualsDecl1: +verify.referenceGroups(importEqualsDecl1_importKeyword, [{ definition: "import A = require(\"./a\")", ranges: [importEqualsDecl1_name] }]); +verify.referenceGroups(importEqualsDecl1_requireKeyword, [{ definition: "module \"/a\"", ranges: [importEqualsDecl1_module] }]); + +// importEqualsDecl2: +verify.referenceGroups(importEqualsDecl2_importKeyword, [{ definition: "(alias) namespace N2\nimport N2 = N", ranges: [importEqualsDecl2_name] }]); + +// importDecl1: +verify.referenceGroups([importDecl1_importKeyword, importDecl1_typeKeyword], [ + { definition: "(alias) class B\nimport B", ranges: [importDecl1_name] }, + { definition: "class B", ranges: [classDecl1_name] } +]); +verify.referenceGroups(importDecl1_fromKeyword, [{ definition: "module \"/b\"", ranges: [importDecl1_module] }]); + +// importDecl2: +verify.referenceGroups([importDecl2_importKeyword, importDecl2_typeKeyword, importDecl2_asKeyword], [{ definition: "import C", ranges: [importDecl2_name] }]); +verify.referenceGroups([importDecl2_fromKeyword], [{ definition: "module \"/c\"", ranges: [importDecl2_module] }]); + +// importDecl3: +verify.referenceGroups([importDecl3_importKeyword, importDecl3_typeKeyword], [ + { definition: "(alias) class D\nimport D", ranges: [importDecl3_name] }, + { definition: "class D", ranges: [classDecl2_name] } +]); +verify.referenceGroups(importDecl3_fromKeyword, [{ definition: "module \"/d\"", ranges: [importDecl3_module] }]); + +// importDecl4: +verify.noReferences(importDecl4_importKeyword); +verify.noReferences(importDecl4_typeKeyword); +verify.referenceGroups(importDecl4_fromKeyword, [{ definition: "module \"/e\"", ranges: [importDecl4_module] }]); +verify.referenceGroups(importDecl4_asKeyword, [{ definition: "(alias) const e3: 2\nimport e3", ranges: [importDecl4_name] }]); + +// importDecl5 +verify.referenceGroups(importDecl5_importKeyword, [{ definition: "module \"/f\"", ranges: [importDecl5_module] }]); + +// exportDecl1: +verify.referenceGroups([exportDecl1_exportKeyword, exportDecl1_typeKeyword, exportDecl1_fromKeyword], [{ definition: "module \"/g\"", ranges: [exportDecl1_module] }]); + +// exportDecl2: +verify.referenceGroups([exportDecl2_exportKeyword, exportDecl2_typeKeyword, exportDecl2_asKeyword], [{ definition: "import H", ranges: [exportDecl2_name] }]); +verify.referenceGroups([exportDecl2_fromKeyword], [{ definition: "module \"/h\"", ranges: [exportDecl2_module] }]); + +// exportDecl3: +verify.referenceGroups([exportDecl3_exportKeyword, exportDecl3_typeKeyword], [ + { definition: "(alias) class I\nexport I", ranges: [exportDecl3_name] }, + { definition: "class I", ranges: [classDecl3_name] } +]); +verify.referenceGroups(exportDecl3_fromKeyword, [{ definition: "module \"/i\"", ranges: [exportDecl3_module] }]); + +// exportDecl4: +verify.noReferences(exportDecl4_exportKeyword); +verify.noReferences(exportDecl4_typeKeyword); +verify.referenceGroups(exportDecl4_fromKeyword, [{ definition: "module \"/j\"", ranges: [exportDecl4_module] }]); +verify.referenceGroups(exportDecl4_asKeyword, [{ definition: "(alias) const j3: 2\nexport j3", ranges: [exportDecl4_name] }]); + +// exportDecl5: +verify.referenceGroups([exportDecl5_exportKeyword, exportDecl5_typeKeyword], [{ definition: "type Z1 = 1", ranges: [typeDecl1_name, exportDecl5_name] }]); + +// exportDecl6: +verify.noReferences(exportDecl6_exportKeyword); +verify.noReferences(exportDecl6_typeKeyword); +verify.referenceGroups(exportDecl6_asKeyword, [{ definition: "export z4", ranges: [exportDecl6_name] }]); + +// exportAssignment1: +verify.referenceGroups(exportAssignment1_exportKeyword, [ + { definition: "const x: {}", ranges: [varDecl1_name, exportAssignment1_name] } +]); + +// exportAssignment2: +verify.referenceGroups(exportAssignment2_exportKeyword, [ + { definition: "const y: {}", ranges: [varDecl2_name, exportAssignment2_name] } +]); diff --git a/tests/cases/fourslash/referencesForTypeKeywords.ts b/tests/cases/fourslash/referencesForTypeKeywords.ts new file mode 100644 index 0000000000000..cfd37a43960c0 --- /dev/null +++ b/tests/cases/fourslash/referencesForTypeKeywords.ts @@ -0,0 +1,43 @@ +/// + +////[|{| "id": "interfaceDecl" |}interface [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "interfaceDecl" |}I|] {}|] +////function f() {} +////type A1 = T [|extends|] [|U|] ? 1 : 0; +////type A2 = T extends [|infer|] [|{| "isWriteAccess": true, "isDefinition": true |}U|] ? 1 : 0; +////type A3 = { [[|{| "id": "mappedType_param" |}[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "mappedType_param" |}P|] [|in|] keyof T|]]: 1 }; +////type A4<[|{| "isWriteAccess": true, "isDefinition": true |}T|]> = [|keyof|] [|T|]; +////type A5<[|{| "isWriteAccess": true, "isDefinition": true |}T|]> = [|readonly|] [|T|][]; + +const [ + interfaceDecl, + interfaceDecl_name, + + typeParam_extendsKeyword, + typeParam_constraint, + + typeParamA1_name, + conditionalType_extendsKeyword, + conditionalType_extendsType, + + inferType_inferKeyword, + inferType_type, + + mappedType_param, + mappedType_name, + mappedType_inOperator, + + typeParamA4_name, + keyofOperator_keyofKeyword, + keyofOperator_type, + + typeParamA5_name, + readonlyOperator_readonlyKeyword, + readonlyOperator_elementType, +] = test.ranges(); + +verify.referenceGroups(typeParam_extendsKeyword, [{ definition: "interface I", ranges: [interfaceDecl_name, typeParam_constraint] }]); +verify.referenceGroups(conditionalType_extendsKeyword, [{ definition: "(type parameter) U in type A1", ranges: [typeParamA1_name, conditionalType_extendsType] }]); +verify.referenceGroups(inferType_inferKeyword, [{ definition: "(type parameter) U", ranges: [inferType_type] }]); +verify.referenceGroups(mappedType_inOperator, [{ definition: "(type parameter) P", ranges: [mappedType_name] }]); +verify.referenceGroups(keyofOperator_keyofKeyword, [{ definition: "(type parameter) T in type A4", ranges: [typeParamA4_name, keyofOperator_type] }]); +verify.referenceGroups(readonlyOperator_readonlyKeyword, [{ definition: "(type parameter) T in type A5", ranges: [typeParamA5_name, readonlyOperator_elementType] }]); \ No newline at end of file diff --git a/tests/cases/fourslash/renameDeclarationKeywords.ts b/tests/cases/fourslash/renameDeclarationKeywords.ts new file mode 100644 index 0000000000000..0a762150ff65a --- /dev/null +++ b/tests/cases/fourslash/renameDeclarationKeywords.ts @@ -0,0 +1,95 @@ +/// + +////[|{| "id": "baseDecl" |}class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "baseDecl" |}Base|] {}|] +////[|{| "id": "implemented1Decl" |}interface [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "implemented1Decl" |}Implemented1|] {}|] +////[|{| "id": "classDecl1" |}[|class|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "classDecl1" |}C1|] [|extends|] [|Base|] [|implements|] [|Implemented1|] { +//// [|{| "id": "getDecl" |}[|get|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "getDecl" |}e|]() { return 1; }|] +//// [|{| "id": "setDecl" |}[|set|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "setDecl" |}e|](v) {}|] +////}|] +////[|{| "id": "interfaceDecl1" |}[|interface|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "interfaceDecl1" |}I1|] [|extends|] [|Base|] { }|] +////[|{| "id": "typeDecl" |}[|type|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "typeDecl" |}T|] = { }|] +////[|{| "id": "enumDecl" |}[|enum|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "enumDecl" |}E|] { }|] +////[|{| "id": "namespaceDecl" |}[|namespace|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "namespaceDecl" |}N|] { }|] +////[|{| "id": "moduleDecl" |}[|module|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "moduleDecl" |}M|] { }|] +////[|{| "id": "functionDecl" |}[|function|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "functionDecl" |}fn|]() {}|] +////[|{| "id": "varDecl" |}[|var|] [|{| "isWriteAccess": false, "isDefinition": true, "contextRangeId": "varDecl" |}x|];|] +////[|{| "id": "letDecl" |}[|let|] [|{| "isWriteAccess": false, "isDefinition": true, "contextRangeId": "letDecl" |}y|];|] +////[|{| "id": "constDecl" |}[|const|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "constDecl" |}z|] = 1;|] + +const [ + baseDecl, + baseDecl_name, + + implemented1Decl, + implemented1Decl_name, + + classDecl1, + classDecl1_classKeyword, + classDecl1_name, + classDecl1_extendsKeyword, + classDecl1_extendsName, + classDecl1_implementsKeyword, + classDecl1_implementsName, + + getDecl, + getDecl_getKeyword, + getDecl_name, + + setDecl, + setDecl_setKeyword, + setDecl_name, + + interfaceDecl1, + interfaceDecl1_interfaceKeyword, + interfaceDecl1_name, + interfaceDecl1_extendsKeyword, + interfaceDecl1_extendsName, + + typeDecl, + typeDecl_typeKeyword, + typeDecl_name, + + enumDecl, + enumDecl_enumKeyword, + enumDecl_name, + + namespaceDecl, + namespaceDecl_namespaceKeyword, + namespaceDecl_name, + + moduleDecl, + moduleDecl_moduleKeyword, + moduleDecl_name, + + functionDecl, + functionDecl_functionKeyword, + functionDecl_name, + + varDecl, + varDecl_varKeyword, + varDecl_name, + + letDecl, + letDecl_letKeyword, + letDecl_name, + + constDecl, + constDecl_constKeyword, + constDecl_name, +] = test.ranges(); +verify.renameLocations(classDecl1_classKeyword, [{ range: classDecl1_name }]); +verify.renameLocations(classDecl1_extendsKeyword, [{ range: baseDecl_name }, { range: classDecl1_extendsName }, { range: interfaceDecl1_extendsName }]); +verify.renameLocations(classDecl1_implementsKeyword, [{ range: implemented1Decl_name }, { range: classDecl1_implementsName }]); +for (const keyword of [getDecl_getKeyword, setDecl_setKeyword]) { + verify.renameLocations(keyword, [{ range: getDecl_name }, { range: setDecl_name }]); +} +verify.renameLocations(interfaceDecl1_interfaceKeyword, [{ range: interfaceDecl1_name }]); +verify.renameLocations(interfaceDecl1_extendsKeyword, [{ range: baseDecl_name }, { range: classDecl1_extendsName }, { range: interfaceDecl1_extendsName }]); +verify.renameLocations(typeDecl_typeKeyword, [{ range: typeDecl_name }]); +verify.renameLocations(enumDecl_enumKeyword, [{ range: enumDecl_name }]); +verify.renameLocations(namespaceDecl_namespaceKeyword, [{ range: namespaceDecl_name }]); +verify.renameLocations(moduleDecl_moduleKeyword, [{ range: moduleDecl_name }]); +verify.renameLocations(functionDecl_functionKeyword, [{ range: functionDecl_name }]); +verify.renameLocations(varDecl_varKeyword, [{ range: varDecl_name }]); +verify.renameLocations(letDecl_letKeyword, [{ range: letDecl_name }]); +verify.renameLocations(constDecl_constKeyword, [{ range: constDecl_name }]); \ No newline at end of file diff --git a/tests/cases/fourslash/renameExportCrash.ts b/tests/cases/fourslash/renameExportCrash.ts new file mode 100644 index 0000000000000..f0b430c3c20ec --- /dev/null +++ b/tests/cases/fourslash/renameExportCrash.ts @@ -0,0 +1,9 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js +//// let a; +//// module.exports = /**/a; +//// exports["foo"] = a; + +verify.baselineRename("", { }); diff --git a/tests/cases/fourslash/renameExportSpecifier.ts b/tests/cases/fourslash/renameExportSpecifier.ts new file mode 100644 index 0000000000000..2ad344ee50b73 --- /dev/null +++ b/tests/cases/fourslash/renameExportSpecifier.ts @@ -0,0 +1,11 @@ +/// + +// @Filename: a.ts +////const name = {}; +////export { name as name/**/ }; + +// @Filename: b.ts +////import { name } from './a'; +////const x = name.toString(); + +verify.baselineRename("", { providePrefixAndSuffixTextForRename: false }); diff --git a/tests/cases/fourslash/renameExportSpecifier2.ts b/tests/cases/fourslash/renameExportSpecifier2.ts new file mode 100644 index 0000000000000..deafa466225e0 --- /dev/null +++ b/tests/cases/fourslash/renameExportSpecifier2.ts @@ -0,0 +1,11 @@ +/// + +// @Filename: a.ts +////const name = {}; +////export { name/**/ }; + +// @Filename: b.ts +////import { name } from './a'; +////const x = name.toString(); + +verify.baselineRename("", { providePrefixAndSuffixTextForRename: false }); diff --git a/tests/cases/fourslash/renameJSDocNamepath.ts b/tests/cases/fourslash/renameJSDocNamepath.ts new file mode 100644 index 0000000000000..015314a6548bd --- /dev/null +++ b/tests/cases/fourslash/renameJSDocNamepath.ts @@ -0,0 +1,11 @@ +// @noLib: true + +/// + +//// /** +//// * @type {module:foo/A} x +//// */ +//// var x = 1 +//// var /*0*/A = 0; + +verify.baselineRename("0", {}); diff --git a/tests/cases/fourslash/renameModifiers.ts b/tests/cases/fourslash/renameModifiers.ts new file mode 100644 index 0000000000000..ab2258a1d08cf --- /dev/null +++ b/tests/cases/fourslash/renameModifiers.ts @@ -0,0 +1,34 @@ +/// + +////[|[|declare|] [|abstract|] class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -3 |}C1|] { +//// [|[|static|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}a|];|] +//// [|[|readonly|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}b|];|] +//// [|[|public|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}c|];|] +//// [|[|protected|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}d|];|] +//// [|[|private|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}e|];|] +////}|] +////[|[|const|] enum [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}E|] { +////}|] +////[|[|async|] function [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}fn|]() {}|] +////[|[|export|] [|default|] class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -3 |}C2|] {}|] + +const [ + class1Def, declareKeyword, abstractKeyword, class1Name, + aDef, staticKeyword, aName, + bDef, readonlyKeyword, bName, + cDef, publicKeyword, cName, + dDef, protectedKeyword, dName, + eDef, privateKeyword, eName, + enumDef, constKeyword, enumName, + functionDef, asyncKeyword, functionName, + class2Def, exportKeyword, defaultKeyword, class2Name, +] = test.ranges(); +verify.renameLocations([declareKeyword, abstractKeyword], [{ range: class1Name }]); +verify.renameLocations([staticKeyword], [{ range: aName }]); +verify.renameLocations([readonlyKeyword], [{ range: bName }]); +verify.renameLocations([publicKeyword], [{ range: cName }]); +verify.renameLocations([protectedKeyword], [{ range: dName }]); +verify.renameLocations([privateKeyword], [{ range: eName }]); +verify.renameLocations([constKeyword], [{ range: enumName }]); +verify.renameLocations([asyncKeyword], [{ range: functionName }]); +verify.renameLocations([exportKeyword, defaultKeyword], [{ range: class2Name }]); diff --git a/tests/cases/fourslash/server/getOutliningSpansForRegions.ts b/tests/cases/fourslash/server/getOutliningSpansForRegions.ts index 81d2409cf9db7..dbfe68204dc75 100644 --- a/tests/cases/fourslash/server/getOutliningSpansForRegions.ts +++ b/tests/cases/fourslash/server/getOutliningSpansForRegions.ts @@ -48,4 +48,4 @@ ////// #endregion ////*/ -verify.outliningSpansInCurrentFile(test.ranges(), "region"); +verify.outliningSpansInCurrentFile(test.ranges(), "region"); \ No newline at end of file diff --git a/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath.ts b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath.ts new file mode 100644 index 0000000000000..9c2e95a8085c1 --- /dev/null +++ b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath.ts @@ -0,0 +1,12 @@ +/// + +// @Filename: /a.ts +////// leading trivia +////import * as foo from ""; // trailing trivia + +verify.codeFix({ + description: "Remove import from ''", + newFileContent: +`// leading trivia + // trailing trivia`, +}); diff --git a/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath1.ts b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath1.ts new file mode 100644 index 0000000000000..5fadafcd210c9 --- /dev/null +++ b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath1.ts @@ -0,0 +1,22 @@ +/// + +// @Filename: /a.ts +////// leading trivia +////import * as foo from ""; +////import { b } from "./b"; +////import { c } from "./c"; + +// @Filename: /b.ts +////export const b = null; + +// @Filename: /c.ts +////export const c = null; + +verify.codeFix({ + index: 0, + description: "Remove import from ''", + newFileContent: +`// leading trivia +import { b } from "./b"; +import { c } from "./c";`, +}); diff --git a/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath2.ts b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath2.ts new file mode 100644 index 0000000000000..03f812c943f7f --- /dev/null +++ b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath2.ts @@ -0,0 +1,22 @@ +/// + +// @Filename: /a.ts +////// leading trivia +////import { b } from "./b"; +////import * as foo from ""; +////import { c } from "./c"; + +// @Filename: /b.ts +////export const b = null; + +// @Filename: /c.ts +////export const c = null; + +verify.codeFix({ + index: 1, + description: "Remove import from ''", + newFileContent: +`// leading trivia +import { b } from "./b"; +import { c } from "./c";`, +}); diff --git a/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath3.ts b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath3.ts new file mode 100644 index 0000000000000..430bb31b8727a --- /dev/null +++ b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath3.ts @@ -0,0 +1,23 @@ +/// + +// @Filename: /a.ts +////// leading trivia +////import { b } from "./b"; +////import { c } from "./c"; +////import * as foo from ""; + +// @Filename: /b.ts +////export const b = null; + +// @Filename: /c.ts +////export const c = null; + +verify.codeFix({ + index: 2, + description: "Remove import from ''", + newFileContent: +`// leading trivia +import { b } from "./b"; +import { c } from "./c"; +`, +}); diff --git a/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath4.ts b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath4.ts new file mode 100644 index 0000000000000..8ea32f73d7acb --- /dev/null +++ b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath4.ts @@ -0,0 +1,35 @@ +/// + +// @Filename: /a.ts +////// leading trivia +////import * as a from ""; +////import * as b from ""; +////import * as c from ""; + +verify.codeFix({ + index: 0, + description: "Remove import from ''", + newFileContent: +`// leading trivia +import * as b from ""; +import * as c from "";`, +}); + +verify.codeFix({ + index: 1, + description: "Remove import from ''", + newFileContent: +`// leading trivia +import * as a from ""; +import * as c from "";`, +}); + +verify.codeFix({ + index: 2, + description: "Remove import from ''", + newFileContent: +`// leading trivia +import * as a from ""; +import * as b from ""; +` +}); diff --git a/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath5.ts b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath5.ts new file mode 100644 index 0000000000000..293ddecf428ee --- /dev/null +++ b/tests/cases/fourslash/unusedImportDeclaration_withEmptyPath5.ts @@ -0,0 +1,44 @@ +/// + +// @Filename: /main.ts +////// leading trivia +////import { a } from "./a"; +////import { b } from "./b"; +////import { c } from "./c"; + +// @Filename: /a.ts +////export const a = null; + +// @Filename: /b.ts +////export const b = null; + +// @Filename: /c.ts +////export const c = null; + +verify.codeFix({ + index: 0, + description: "Remove import from './a'", + newFileContent: +`// leading trivia +import { b } from "./b"; +import { c } from "./c";`, +}); + +verify.codeFix({ + index: 1, + description: "Remove import from './b'", + newFileContent: +`// leading trivia +import { a } from "./a"; +import { c } from "./c";`, +}); + +verify.codeFix({ + index: 2, + description: "Remove import from './c'", + newFileContent: +`// leading trivia +import { a } from "./a"; +import { b } from "./b"; +`, +}); diff --git a/tests/cases/fourslash/unusedVariableInClass4.ts b/tests/cases/fourslash/unusedVariableInClass4.ts new file mode 100644 index 0000000000000..ec5d5f973a2d6 --- /dev/null +++ b/tests/cases/fourslash/unusedVariableInClass4.ts @@ -0,0 +1,11 @@ +/// + +// @noUnusedLocals: false +////class greeter { +//// [|private greeting: string;|] +////} + +verify.codeFix({ + description: "Remove unused declaration for: 'greeting'", + newRangeContent: "", +}); diff --git a/tests/cases/fourslash/unusedVariableInClass5.ts b/tests/cases/fourslash/unusedVariableInClass5.ts new file mode 100644 index 0000000000000..c1e9f58f52719 --- /dev/null +++ b/tests/cases/fourslash/unusedVariableInClass5.ts @@ -0,0 +1,10 @@ +/// + +// @noUnusedLocals: true +// @target: esnext +////declare class greeter { +//// #private; +//// private name; +////} + +verify.noErrors() diff --git a/tests/cases/user/TypeScript-React-Starter/test.json b/tests/cases/user/TypeScript-React-Starter/test.json index caa97357cb741..98d38680468fb 100644 --- a/tests/cases/user/TypeScript-React-Starter/test.json +++ b/tests/cases/user/TypeScript-React-Starter/test.json @@ -1,4 +1,4 @@ { - "cloneUrl": "https://github.com/Microsoft/TypeScript-React-Starter", + "cloneUrl": "https://github.com/Microsoft/TypeScript-React-Starter.git", "types": ["jest", "node"] } diff --git a/tests/cases/user/TypeScript-Vue-Starter/test.json b/tests/cases/user/TypeScript-Vue-Starter/test.json index 4504c4c1cd515..ca7390f56390d 100644 --- a/tests/cases/user/TypeScript-Vue-Starter/test.json +++ b/tests/cases/user/TypeScript-Vue-Starter/test.json @@ -1,4 +1,4 @@ { "cloneUrl": "https://github.com/Microsoft/TypeScript-Vue-Starter.git", - "types": [] + "types": ["jest"] } diff --git a/tests/cases/user/TypeScript-WeChat-Starter/test.json b/tests/cases/user/TypeScript-WeChat-Starter/test.json index 92c47595d1a3b..fbcd73f2c12b5 100644 --- a/tests/cases/user/TypeScript-WeChat-Starter/test.json +++ b/tests/cases/user/TypeScript-WeChat-Starter/test.json @@ -1,4 +1,4 @@ { - "cloneUrl": "https://github.com/Microsoft/TypeScript-React-Starter", + "cloneUrl": "https://github.com/Microsoft/TypeScript-WeChat-Starter.git", "types": [] }